@dereekb/model 10.1.30 → 11.0.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/index.cjs.js +2669 -1443
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -6,90 +6,9 @@ var util = require('@dereekb/util');
|
|
|
6
6
|
var classTransformer = require('class-transformer');
|
|
7
7
|
var classValidator = require('class-validator');
|
|
8
8
|
|
|
9
|
-
/******************************************************************************
|
|
10
|
-
Copyright (c) Microsoft Corporation.
|
|
11
|
-
|
|
12
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
13
|
-
purpose with or without fee is hereby granted.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
16
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
17
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
18
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
19
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
20
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
21
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
22
|
-
***************************************************************************** */
|
|
23
|
-
|
|
24
|
-
function __decorate(decorators, target, key, desc) {
|
|
25
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
26
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
27
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
28
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function __metadata(metadataKey, metadataValue) {
|
|
32
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
46
|
-
var e = new Error(message);
|
|
47
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const ADDRESS_LINE_MAX_LENGTH = 50;
|
|
51
|
-
const ADDRESS_CITY_MAX_LENGTH = 80;
|
|
52
|
-
const ADDRESS_STATE_MAX_LENGTH = 30;
|
|
53
|
-
const ADDRESS_STATE_CODE_MAX_LENGTH = 2;
|
|
54
|
-
const ADDRESS_ZIP_MAX_LENGTH = 11;
|
|
55
|
-
const ADDRESS_COUNTRY_MAX_LENGTH = 80;
|
|
56
|
-
class AbstractUnitedStatesAddressWithoutStateParams {}
|
|
57
|
-
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(ADDRESS_LINE_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "line1", void 0);
|
|
58
|
-
__decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsString(), classValidator.MaxLength(ADDRESS_LINE_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "line2", void 0);
|
|
59
|
-
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(ADDRESS_CITY_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "city", void 0);
|
|
60
|
-
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.Matches(util.ZIP_CODE_STRING_REGEX), classValidator.MaxLength(ADDRESS_ZIP_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "zip", void 0);
|
|
61
|
-
/**
|
|
62
|
-
* UnitedStatesAddress that enforces a StateCode for the state value.
|
|
63
|
-
*/
|
|
64
|
-
class UnitedStatesAddressWithStateCodeParams extends AbstractUnitedStatesAddressWithoutStateParams {}
|
|
65
|
-
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.Matches(util.US_STATE_CODE_STRING_REGEX), classValidator.MinLength(ADDRESS_STATE_CODE_MAX_LENGTH), classValidator.MaxLength(ADDRESS_STATE_CODE_MAX_LENGTH), __metadata("design:type", String)], UnitedStatesAddressWithStateCodeParams.prototype, "state", void 0);
|
|
66
|
-
/**
|
|
67
|
-
* UnitedStatesAddress that enforces a State for the state value.
|
|
68
|
-
*/
|
|
69
|
-
class UnitedStatesAddressWithStateStringParams extends AbstractUnitedStatesAddressWithoutStateParams {}
|
|
70
|
-
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(ADDRESS_STATE_MAX_LENGTH), __metadata("design:type", String)], UnitedStatesAddressWithStateStringParams.prototype, "state", void 0);
|
|
71
|
-
|
|
72
9
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
73
10
|
|
|
74
|
-
var
|
|
75
|
-
return it && it.Math === Math && it;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
79
|
-
var global$f =
|
|
80
|
-
// eslint-disable-next-line es/no-global-this -- safe
|
|
81
|
-
check(typeof globalThis == 'object' && globalThis) ||
|
|
82
|
-
check(typeof window == 'object' && window) ||
|
|
83
|
-
// eslint-disable-next-line no-restricted-globals -- safe
|
|
84
|
-
check(typeof self == 'object' && self) ||
|
|
85
|
-
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
86
|
-
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
87
|
-
// eslint-disable-next-line no-new-func -- fallback
|
|
88
|
-
(function () { return this; })() || Function('return this')();
|
|
89
|
-
|
|
90
|
-
var objectGetOwnPropertyDescriptor = {};
|
|
91
|
-
|
|
92
|
-
var fails$e = function (exec) {
|
|
11
|
+
var fails$g = function (exec) {
|
|
93
12
|
try {
|
|
94
13
|
return !!exec();
|
|
95
14
|
} catch (error) {
|
|
@@ -97,107 +16,66 @@ var fails$e = function (exec) {
|
|
|
97
16
|
}
|
|
98
17
|
};
|
|
99
18
|
|
|
100
|
-
var fails$
|
|
101
|
-
|
|
102
|
-
// Detect IE8's incomplete defineProperty implementation
|
|
103
|
-
var descriptors = !fails$d(function () {
|
|
104
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
105
|
-
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
var fails$c = fails$e;
|
|
19
|
+
var fails$f = fails$g;
|
|
109
20
|
|
|
110
|
-
var functionBindNative = !fails$
|
|
21
|
+
var functionBindNative = !fails$f(function () {
|
|
111
22
|
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
112
23
|
var test = (function () { /* empty */ }).bind();
|
|
113
24
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
114
25
|
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
115
26
|
});
|
|
116
27
|
|
|
117
|
-
var NATIVE_BIND$
|
|
118
|
-
|
|
119
|
-
var call$7 = Function.prototype.call;
|
|
120
|
-
|
|
121
|
-
var functionCall = NATIVE_BIND$1 ? call$7.bind(call$7) : function () {
|
|
122
|
-
return call$7.apply(call$7, arguments);
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
var objectPropertyIsEnumerable = {};
|
|
126
|
-
|
|
127
|
-
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
128
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
129
|
-
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
130
|
-
|
|
131
|
-
// Nashorn ~ JDK8 bug
|
|
132
|
-
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
133
|
-
|
|
134
|
-
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
135
|
-
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
136
|
-
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
137
|
-
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
138
|
-
return !!descriptor && descriptor.enumerable;
|
|
139
|
-
} : $propertyIsEnumerable;
|
|
140
|
-
|
|
141
|
-
var createPropertyDescriptor$3 = function (bitmap, value) {
|
|
142
|
-
return {
|
|
143
|
-
enumerable: !(bitmap & 1),
|
|
144
|
-
configurable: !(bitmap & 2),
|
|
145
|
-
writable: !(bitmap & 4),
|
|
146
|
-
value: value
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
var NATIVE_BIND = functionBindNative;
|
|
28
|
+
var NATIVE_BIND$3 = functionBindNative;
|
|
151
29
|
|
|
152
|
-
var FunctionPrototype$
|
|
153
|
-
var call$
|
|
154
|
-
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$
|
|
30
|
+
var FunctionPrototype$2 = Function.prototype;
|
|
31
|
+
var call$e = FunctionPrototype$2.call;
|
|
32
|
+
var uncurryThisWithBind = NATIVE_BIND$3 && FunctionPrototype$2.bind.bind(call$e, call$e);
|
|
155
33
|
|
|
156
|
-
var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
|
|
34
|
+
var functionUncurryThis = NATIVE_BIND$3 ? uncurryThisWithBind : function (fn) {
|
|
157
35
|
return function () {
|
|
158
|
-
return call$
|
|
36
|
+
return call$e.apply(fn, arguments);
|
|
159
37
|
};
|
|
160
38
|
};
|
|
161
39
|
|
|
162
|
-
var uncurryThis$
|
|
40
|
+
var uncurryThis$f = functionUncurryThis;
|
|
163
41
|
|
|
164
|
-
var toString$3 = uncurryThis$
|
|
165
|
-
var stringSlice$2 = uncurryThis$
|
|
42
|
+
var toString$3 = uncurryThis$f({}.toString);
|
|
43
|
+
var stringSlice$2 = uncurryThis$f(''.slice);
|
|
166
44
|
|
|
167
|
-
var classofRaw$
|
|
45
|
+
var classofRaw$2 = function (it) {
|
|
168
46
|
return stringSlice$2(toString$3(it), 8, -1);
|
|
169
47
|
};
|
|
170
48
|
|
|
171
|
-
var uncurryThis$
|
|
172
|
-
var fails$
|
|
173
|
-
var classof$
|
|
49
|
+
var uncurryThis$e = functionUncurryThis;
|
|
50
|
+
var fails$e = fails$g;
|
|
51
|
+
var classof$5 = classofRaw$2;
|
|
174
52
|
|
|
175
53
|
var $Object$4 = Object;
|
|
176
|
-
var split = uncurryThis$
|
|
54
|
+
var split = uncurryThis$e(''.split);
|
|
177
55
|
|
|
178
56
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
179
|
-
var indexedObject = fails$
|
|
57
|
+
var indexedObject = fails$e(function () {
|
|
180
58
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
181
59
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
182
60
|
return !$Object$4('z').propertyIsEnumerable(0);
|
|
183
61
|
}) ? function (it) {
|
|
184
|
-
return classof$
|
|
62
|
+
return classof$5(it) === 'String' ? split(it, '') : $Object$4(it);
|
|
185
63
|
} : $Object$4;
|
|
186
64
|
|
|
187
65
|
// we can't use just `it == null` since of `document.all` special case
|
|
188
66
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
189
|
-
var isNullOrUndefined$
|
|
67
|
+
var isNullOrUndefined$4 = function (it) {
|
|
190
68
|
return it === null || it === undefined;
|
|
191
69
|
};
|
|
192
70
|
|
|
193
|
-
var isNullOrUndefined$
|
|
71
|
+
var isNullOrUndefined$3 = isNullOrUndefined$4;
|
|
194
72
|
|
|
195
|
-
var $TypeError$
|
|
73
|
+
var $TypeError$c = TypeError;
|
|
196
74
|
|
|
197
75
|
// `RequireObjectCoercible` abstract operation
|
|
198
76
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
199
77
|
var requireObjectCoercible$2 = function (it) {
|
|
200
|
-
if (isNullOrUndefined$
|
|
78
|
+
if (isNullOrUndefined$3(it)) throw new $TypeError$c("Can't call method on " + it);
|
|
201
79
|
return it;
|
|
202
80
|
};
|
|
203
81
|
|
|
@@ -209,47 +87,97 @@ var toIndexedObject$5 = function (it) {
|
|
|
209
87
|
return IndexedObject$1(requireObjectCoercible$1(it));
|
|
210
88
|
};
|
|
211
89
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
// `IsCallable` abstract operation
|
|
216
|
-
// https://tc39.es/ecma262/#sec-iscallable
|
|
217
|
-
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
218
|
-
var isCallable$e = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
219
|
-
return typeof argument == 'function' || argument === documentAll;
|
|
220
|
-
} : function (argument) {
|
|
221
|
-
return typeof argument == 'function';
|
|
90
|
+
var check = function (it) {
|
|
91
|
+
return it && it.Math === Math && it;
|
|
222
92
|
};
|
|
223
93
|
|
|
224
|
-
|
|
94
|
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
95
|
+
var global$m =
|
|
96
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
|
97
|
+
check(typeof globalThis == 'object' && globalThis) ||
|
|
98
|
+
check(typeof window == 'object' && window) ||
|
|
99
|
+
// eslint-disable-next-line no-restricted-globals -- safe
|
|
100
|
+
check(typeof self == 'object' && self) ||
|
|
101
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
102
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
103
|
+
// eslint-disable-next-line no-new-func -- fallback
|
|
104
|
+
(function () { return this; })() || Function('return this')();
|
|
105
|
+
|
|
106
|
+
var shared$4 = {exports: {}};
|
|
107
|
+
|
|
108
|
+
var global$l = global$m;
|
|
109
|
+
|
|
110
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
111
|
+
var defineProperty$6 = Object.defineProperty;
|
|
225
112
|
|
|
226
|
-
var
|
|
227
|
-
|
|
113
|
+
var defineGlobalProperty$3 = function (key, value) {
|
|
114
|
+
try {
|
|
115
|
+
defineProperty$6(global$l, key, { value: value, configurable: true, writable: true });
|
|
116
|
+
} catch (error) {
|
|
117
|
+
global$l[key] = value;
|
|
118
|
+
} return value;
|
|
228
119
|
};
|
|
229
120
|
|
|
230
|
-
var global$
|
|
231
|
-
var
|
|
121
|
+
var global$k = global$m;
|
|
122
|
+
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
232
123
|
|
|
233
|
-
var
|
|
234
|
-
|
|
124
|
+
var SHARED = '__core-js_shared__';
|
|
125
|
+
var store$3 = global$k[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
126
|
+
|
|
127
|
+
var sharedStore = store$3;
|
|
128
|
+
|
|
129
|
+
var store$2 = sharedStore;
|
|
130
|
+
|
|
131
|
+
(shared$4.exports = function (key, value) {
|
|
132
|
+
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
133
|
+
})('versions', []).push({
|
|
134
|
+
version: '3.35.1',
|
|
135
|
+
mode: 'global',
|
|
136
|
+
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
137
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
|
|
138
|
+
source: 'https://github.com/zloirock/core-js'
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
var requireObjectCoercible = requireObjectCoercible$2;
|
|
142
|
+
|
|
143
|
+
var $Object$3 = Object;
|
|
144
|
+
|
|
145
|
+
// `ToObject` abstract operation
|
|
146
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
147
|
+
var toObject$3 = function (argument) {
|
|
148
|
+
return $Object$3(requireObjectCoercible(argument));
|
|
235
149
|
};
|
|
236
150
|
|
|
237
|
-
var
|
|
238
|
-
|
|
151
|
+
var uncurryThis$d = functionUncurryThis;
|
|
152
|
+
var toObject$2 = toObject$3;
|
|
153
|
+
|
|
154
|
+
var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
|
|
155
|
+
|
|
156
|
+
// `HasOwnProperty` abstract operation
|
|
157
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
158
|
+
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
159
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
160
|
+
return hasOwnProperty(toObject$2(it), key);
|
|
239
161
|
};
|
|
240
162
|
|
|
241
|
-
var uncurryThis$
|
|
163
|
+
var uncurryThis$c = functionUncurryThis;
|
|
164
|
+
|
|
165
|
+
var id = 0;
|
|
166
|
+
var postfix = Math.random();
|
|
167
|
+
var toString$2 = uncurryThis$c(1.0.toString);
|
|
242
168
|
|
|
243
|
-
var
|
|
169
|
+
var uid$2 = function (key) {
|
|
170
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36);
|
|
171
|
+
};
|
|
244
172
|
|
|
245
173
|
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
246
174
|
|
|
247
|
-
var global$
|
|
248
|
-
var userAgent = engineUserAgent;
|
|
175
|
+
var global$j = global$m;
|
|
176
|
+
var userAgent$3 = engineUserAgent;
|
|
249
177
|
|
|
250
|
-
var process = global$
|
|
251
|
-
var Deno = global$
|
|
252
|
-
var versions = process && process.versions || Deno && Deno.version;
|
|
178
|
+
var process$3 = global$j.process;
|
|
179
|
+
var Deno$1 = global$j.Deno;
|
|
180
|
+
var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
|
|
253
181
|
var v8 = versions && versions.v8;
|
|
254
182
|
var match, version;
|
|
255
183
|
|
|
@@ -262,10 +190,10 @@ if (v8) {
|
|
|
262
190
|
|
|
263
191
|
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
264
192
|
// so check `userAgent` even if `.v8` exists, but 0
|
|
265
|
-
if (!version && userAgent) {
|
|
266
|
-
match = userAgent.match(/Edge\/(\d+)/);
|
|
193
|
+
if (!version && userAgent$3) {
|
|
194
|
+
match = userAgent$3.match(/Edge\/(\d+)/);
|
|
267
195
|
if (!match || match[1] >= 74) {
|
|
268
|
-
match = userAgent.match(/Chrome\/(\d+)/);
|
|
196
|
+
match = userAgent$3.match(/Chrome\/(\d+)/);
|
|
269
197
|
if (match) version = +match[1];
|
|
270
198
|
}
|
|
271
199
|
}
|
|
@@ -273,14 +201,14 @@ if (!version && userAgent) {
|
|
|
273
201
|
var engineV8Version = version;
|
|
274
202
|
|
|
275
203
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
276
|
-
var V8_VERSION = engineV8Version;
|
|
277
|
-
var fails$
|
|
278
|
-
var global$
|
|
204
|
+
var V8_VERSION$1 = engineV8Version;
|
|
205
|
+
var fails$d = fails$g;
|
|
206
|
+
var global$i = global$m;
|
|
279
207
|
|
|
280
|
-
var $String$5 = global$
|
|
208
|
+
var $String$5 = global$i.String;
|
|
281
209
|
|
|
282
210
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
283
|
-
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$
|
|
211
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
|
|
284
212
|
var symbol = Symbol('symbol detection');
|
|
285
213
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
286
214
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -288,7 +216,7 @@ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$a(func
|
|
|
288
216
|
// of course, fail.
|
|
289
217
|
return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
290
218
|
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
291
|
-
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
219
|
+
!Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
|
|
292
220
|
});
|
|
293
221
|
|
|
294
222
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
@@ -298,174 +226,207 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
|
298
226
|
&& !Symbol.sham
|
|
299
227
|
&& typeof Symbol.iterator == 'symbol';
|
|
300
228
|
|
|
301
|
-
var
|
|
302
|
-
var
|
|
303
|
-
var
|
|
229
|
+
var global$h = global$m;
|
|
230
|
+
var shared$3 = shared$4.exports;
|
|
231
|
+
var hasOwn$9 = hasOwnProperty_1;
|
|
232
|
+
var uid$1 = uid$2;
|
|
233
|
+
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
304
234
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
305
235
|
|
|
306
|
-
var $
|
|
236
|
+
var Symbol$1 = global$h.Symbol;
|
|
237
|
+
var WellKnownSymbolsStore = shared$3('wks');
|
|
238
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
307
239
|
|
|
308
|
-
var
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
240
|
+
var wellKnownSymbol$e = function (name) {
|
|
241
|
+
if (!hasOwn$9(WellKnownSymbolsStore, name)) {
|
|
242
|
+
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$9(Symbol$1, name)
|
|
243
|
+
? Symbol$1[name]
|
|
244
|
+
: createWellKnownSymbol('Symbol.' + name);
|
|
245
|
+
} return WellKnownSymbolsStore[name];
|
|
313
246
|
};
|
|
314
247
|
|
|
315
|
-
|
|
248
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
249
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
316
250
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
251
|
+
// `IsCallable` abstract operation
|
|
252
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
|
253
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
254
|
+
var isCallable$j = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
255
|
+
return typeof argument == 'function' || argument === documentAll;
|
|
256
|
+
} : function (argument) {
|
|
257
|
+
return typeof argument == 'function';
|
|
323
258
|
};
|
|
324
259
|
|
|
325
|
-
var isCallable$
|
|
326
|
-
var tryToString = tryToString$1;
|
|
327
|
-
|
|
328
|
-
var $TypeError$5 = TypeError;
|
|
260
|
+
var isCallable$i = isCallable$j;
|
|
329
261
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
if (isCallable$a(argument)) return argument;
|
|
333
|
-
throw new $TypeError$5(tryToString(argument) + ' is not a function');
|
|
262
|
+
var isObject$9 = function (it) {
|
|
263
|
+
return typeof it == 'object' ? it !== null : isCallable$i(it);
|
|
334
264
|
};
|
|
335
265
|
|
|
336
|
-
var
|
|
337
|
-
var isNullOrUndefined = isNullOrUndefined$2;
|
|
266
|
+
var isObject$8 = isObject$9;
|
|
338
267
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
268
|
+
var $String$4 = String;
|
|
269
|
+
var $TypeError$b = TypeError;
|
|
270
|
+
|
|
271
|
+
// `Assert: Type(argument) is Object`
|
|
272
|
+
var anObject$b = function (argument) {
|
|
273
|
+
if (isObject$8(argument)) return argument;
|
|
274
|
+
throw new $TypeError$b($String$4(argument) + ' is not an object');
|
|
344
275
|
};
|
|
345
276
|
|
|
346
|
-
var
|
|
347
|
-
var isCallable$9 = isCallable$e;
|
|
348
|
-
var isObject$6 = isObject$7;
|
|
277
|
+
var objectDefineProperties = {};
|
|
349
278
|
|
|
350
|
-
var $
|
|
279
|
+
var fails$c = fails$g;
|
|
351
280
|
|
|
352
|
-
//
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
if (isCallable$9(fn = input.valueOf) && !isObject$6(val = call$5(fn, input))) return val;
|
|
358
|
-
if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$6(val = call$5(fn, input))) return val;
|
|
359
|
-
throw new $TypeError$4("Can't convert object to primitive value");
|
|
360
|
-
};
|
|
281
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
282
|
+
var descriptors = !fails$c(function () {
|
|
283
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
284
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
285
|
+
});
|
|
361
286
|
|
|
362
|
-
var
|
|
287
|
+
var DESCRIPTORS$b = descriptors;
|
|
288
|
+
var fails$b = fails$g;
|
|
289
|
+
|
|
290
|
+
// V8 ~ Chrome 36-
|
|
291
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
292
|
+
var v8PrototypeDefineBug = DESCRIPTORS$b && fails$b(function () {
|
|
293
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
294
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
295
|
+
value: 42,
|
|
296
|
+
writable: false
|
|
297
|
+
}).prototype !== 42;
|
|
298
|
+
});
|
|
363
299
|
|
|
364
|
-
var
|
|
300
|
+
var objectDefineProperty = {};
|
|
365
301
|
|
|
366
|
-
|
|
367
|
-
var
|
|
302
|
+
var global$g = global$m;
|
|
303
|
+
var isObject$7 = isObject$9;
|
|
368
304
|
|
|
369
|
-
var
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
305
|
+
var document$3 = global$g.document;
|
|
306
|
+
// typeof document.createElement is 'object' in old IE
|
|
307
|
+
var EXISTS$1 = isObject$7(document$3) && isObject$7(document$3.createElement);
|
|
308
|
+
|
|
309
|
+
var documentCreateElement$2 = function (it) {
|
|
310
|
+
return EXISTS$1 ? document$3.createElement(it) : {};
|
|
375
311
|
};
|
|
376
312
|
|
|
377
|
-
var
|
|
378
|
-
var
|
|
313
|
+
var DESCRIPTORS$a = descriptors;
|
|
314
|
+
var fails$a = fails$g;
|
|
315
|
+
var createElement$1 = documentCreateElement$2;
|
|
379
316
|
|
|
380
|
-
|
|
381
|
-
var
|
|
317
|
+
// Thanks to IE8 for its funny defineProperty
|
|
318
|
+
var ie8DomDefine = !DESCRIPTORS$a && !fails$a(function () {
|
|
319
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
320
|
+
return Object.defineProperty(createElement$1('div'), 'a', {
|
|
321
|
+
get: function () { return 7; }
|
|
322
|
+
}).a !== 7;
|
|
323
|
+
});
|
|
382
324
|
|
|
383
|
-
var
|
|
325
|
+
var NATIVE_BIND$2 = functionBindNative;
|
|
384
326
|
|
|
385
|
-
var
|
|
327
|
+
var call$d = Function.prototype.call;
|
|
386
328
|
|
|
387
|
-
(
|
|
388
|
-
return
|
|
389
|
-
}
|
|
390
|
-
version: '3.35.1',
|
|
391
|
-
mode: 'global',
|
|
392
|
-
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
393
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
|
|
394
|
-
source: 'https://github.com/zloirock/core-js'
|
|
395
|
-
});
|
|
329
|
+
var functionCall = NATIVE_BIND$2 ? call$d.bind(call$d) : function () {
|
|
330
|
+
return call$d.apply(call$d, arguments);
|
|
331
|
+
};
|
|
396
332
|
|
|
397
|
-
var
|
|
333
|
+
var global$f = global$m;
|
|
334
|
+
var isCallable$h = isCallable$j;
|
|
398
335
|
|
|
399
|
-
var
|
|
336
|
+
var aFunction = function (argument) {
|
|
337
|
+
return isCallable$h(argument) ? argument : undefined;
|
|
338
|
+
};
|
|
400
339
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
var toObject$3 = function (argument) {
|
|
404
|
-
return $Object$2(requireObjectCoercible(argument));
|
|
340
|
+
var getBuiltIn$7 = function (namespace, method) {
|
|
341
|
+
return arguments.length < 2 ? aFunction(global$f[namespace]) : global$f[namespace] && global$f[namespace][method];
|
|
405
342
|
};
|
|
406
343
|
|
|
407
|
-
var uncurryThis$
|
|
408
|
-
var toObject$2 = toObject$3;
|
|
344
|
+
var uncurryThis$b = functionUncurryThis;
|
|
409
345
|
|
|
410
|
-
var
|
|
346
|
+
var objectIsPrototypeOf = uncurryThis$b({}.isPrototypeOf);
|
|
411
347
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
var
|
|
416
|
-
|
|
348
|
+
var getBuiltIn$6 = getBuiltIn$7;
|
|
349
|
+
var isCallable$g = isCallable$j;
|
|
350
|
+
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
351
|
+
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
352
|
+
|
|
353
|
+
var $Object$2 = Object;
|
|
354
|
+
|
|
355
|
+
var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
|
|
356
|
+
return typeof it == 'symbol';
|
|
357
|
+
} : function (it) {
|
|
358
|
+
var $Symbol = getBuiltIn$6('Symbol');
|
|
359
|
+
return isCallable$g($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$2(it));
|
|
417
360
|
};
|
|
418
361
|
|
|
419
|
-
var
|
|
362
|
+
var $String$3 = String;
|
|
420
363
|
|
|
421
|
-
var
|
|
422
|
-
|
|
423
|
-
|
|
364
|
+
var tryToString$4 = function (argument) {
|
|
365
|
+
try {
|
|
366
|
+
return $String$3(argument);
|
|
367
|
+
} catch (error) {
|
|
368
|
+
return 'Object';
|
|
369
|
+
}
|
|
370
|
+
};
|
|
424
371
|
|
|
425
|
-
var
|
|
426
|
-
|
|
372
|
+
var isCallable$f = isCallable$j;
|
|
373
|
+
var tryToString$3 = tryToString$4;
|
|
374
|
+
|
|
375
|
+
var $TypeError$a = TypeError;
|
|
376
|
+
|
|
377
|
+
// `Assert: IsCallable(argument) is true`
|
|
378
|
+
var aCallable$8 = function (argument) {
|
|
379
|
+
if (isCallable$f(argument)) return argument;
|
|
380
|
+
throw new $TypeError$a(tryToString$3(argument) + ' is not a function');
|
|
427
381
|
};
|
|
428
382
|
|
|
429
|
-
var
|
|
430
|
-
var
|
|
431
|
-
var hasOwn$8 = hasOwnProperty_1;
|
|
432
|
-
var uid$1 = uid$2;
|
|
433
|
-
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
434
|
-
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
383
|
+
var aCallable$7 = aCallable$8;
|
|
384
|
+
var isNullOrUndefined$2 = isNullOrUndefined$4;
|
|
435
385
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
var
|
|
386
|
+
// `GetMethod` abstract operation
|
|
387
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
388
|
+
var getMethod$3 = function (V, P) {
|
|
389
|
+
var func = V[P];
|
|
390
|
+
return isNullOrUndefined$2(func) ? undefined : aCallable$7(func);
|
|
391
|
+
};
|
|
439
392
|
|
|
440
|
-
var
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
393
|
+
var call$c = functionCall;
|
|
394
|
+
var isCallable$e = isCallable$j;
|
|
395
|
+
var isObject$6 = isObject$9;
|
|
396
|
+
|
|
397
|
+
var $TypeError$9 = TypeError;
|
|
398
|
+
|
|
399
|
+
// `OrdinaryToPrimitive` abstract operation
|
|
400
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
401
|
+
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
402
|
+
var fn, val;
|
|
403
|
+
if (pref === 'string' && isCallable$e(fn = input.toString) && !isObject$6(val = call$c(fn, input))) return val;
|
|
404
|
+
if (isCallable$e(fn = input.valueOf) && !isObject$6(val = call$c(fn, input))) return val;
|
|
405
|
+
if (pref !== 'string' && isCallable$e(fn = input.toString) && !isObject$6(val = call$c(fn, input))) return val;
|
|
406
|
+
throw new $TypeError$9("Can't convert object to primitive value");
|
|
446
407
|
};
|
|
447
408
|
|
|
448
|
-
var call$
|
|
449
|
-
var isObject$5 = isObject$
|
|
409
|
+
var call$b = functionCall;
|
|
410
|
+
var isObject$5 = isObject$9;
|
|
450
411
|
var isSymbol$1 = isSymbol$2;
|
|
451
|
-
var getMethod = getMethod$
|
|
412
|
+
var getMethod$2 = getMethod$3;
|
|
452
413
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
453
|
-
var wellKnownSymbol$
|
|
414
|
+
var wellKnownSymbol$d = wellKnownSymbol$e;
|
|
454
415
|
|
|
455
|
-
var $TypeError$
|
|
456
|
-
var TO_PRIMITIVE = wellKnownSymbol$
|
|
416
|
+
var $TypeError$8 = TypeError;
|
|
417
|
+
var TO_PRIMITIVE = wellKnownSymbol$d('toPrimitive');
|
|
457
418
|
|
|
458
419
|
// `ToPrimitive` abstract operation
|
|
459
420
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
460
421
|
var toPrimitive$1 = function (input, pref) {
|
|
461
422
|
if (!isObject$5(input) || isSymbol$1(input)) return input;
|
|
462
|
-
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
423
|
+
var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
|
|
463
424
|
var result;
|
|
464
425
|
if (exoticToPrim) {
|
|
465
426
|
if (pref === undefined) pref = 'default';
|
|
466
|
-
result = call$
|
|
427
|
+
result = call$b(exoticToPrim, input, pref);
|
|
467
428
|
if (!isObject$5(result) || isSymbol$1(result)) return result;
|
|
468
|
-
throw new $TypeError$
|
|
429
|
+
throw new $TypeError$8("Can't convert object to primitive value");
|
|
469
430
|
}
|
|
470
431
|
if (pref === undefined) pref = 'number';
|
|
471
432
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -481,101 +442,29 @@ var toPropertyKey$2 = function (argument) {
|
|
|
481
442
|
return isSymbol(key) ? key : key + '';
|
|
482
443
|
};
|
|
483
444
|
|
|
484
|
-
var global$8 = global$f;
|
|
485
|
-
var isObject$4 = isObject$7;
|
|
486
|
-
|
|
487
|
-
var document$1 = global$8.document;
|
|
488
|
-
// typeof document.createElement is 'object' in old IE
|
|
489
|
-
var EXISTS$1 = isObject$4(document$1) && isObject$4(document$1.createElement);
|
|
490
|
-
|
|
491
|
-
var documentCreateElement$2 = function (it) {
|
|
492
|
-
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
493
|
-
};
|
|
494
|
-
|
|
495
445
|
var DESCRIPTORS$9 = descriptors;
|
|
496
|
-
var fails$9 = fails$e;
|
|
497
|
-
var createElement = documentCreateElement$2;
|
|
498
|
-
|
|
499
|
-
// Thanks to IE8 for its funny defineProperty
|
|
500
|
-
var ie8DomDefine = !DESCRIPTORS$9 && !fails$9(function () {
|
|
501
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
502
|
-
return Object.defineProperty(createElement('div'), 'a', {
|
|
503
|
-
get: function () { return 7; }
|
|
504
|
-
}).a !== 7;
|
|
505
|
-
});
|
|
506
|
-
|
|
507
|
-
var DESCRIPTORS$8 = descriptors;
|
|
508
|
-
var call$3 = functionCall;
|
|
509
|
-
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
510
|
-
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
511
|
-
var toIndexedObject$4 = toIndexedObject$5;
|
|
512
|
-
var toPropertyKey$1 = toPropertyKey$2;
|
|
513
|
-
var hasOwn$7 = hasOwnProperty_1;
|
|
514
446
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
515
|
-
|
|
516
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
517
|
-
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
518
|
-
|
|
519
|
-
// `Object.getOwnPropertyDescriptor` method
|
|
520
|
-
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
521
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
522
|
-
O = toIndexedObject$4(O);
|
|
523
|
-
P = toPropertyKey$1(P);
|
|
524
|
-
if (IE8_DOM_DEFINE$1) try {
|
|
525
|
-
return $getOwnPropertyDescriptor$1(O, P);
|
|
526
|
-
} catch (error) { /* empty */ }
|
|
527
|
-
if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$3(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
528
|
-
};
|
|
529
|
-
|
|
530
|
-
var objectDefineProperty = {};
|
|
531
|
-
|
|
532
|
-
var DESCRIPTORS$7 = descriptors;
|
|
533
|
-
var fails$8 = fails$e;
|
|
534
|
-
|
|
535
|
-
// V8 ~ Chrome 36-
|
|
536
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
537
|
-
var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$8(function () {
|
|
538
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
539
|
-
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
540
|
-
value: 42,
|
|
541
|
-
writable: false
|
|
542
|
-
}).prototype !== 42;
|
|
543
|
-
});
|
|
544
|
-
|
|
545
|
-
var isObject$3 = isObject$7;
|
|
546
|
-
|
|
547
|
-
var $String$3 = String;
|
|
548
|
-
var $TypeError$2 = TypeError;
|
|
549
|
-
|
|
550
|
-
// `Assert: Type(argument) is Object`
|
|
551
|
-
var anObject$6 = function (argument) {
|
|
552
|
-
if (isObject$3(argument)) return argument;
|
|
553
|
-
throw new $TypeError$2($String$3(argument) + ' is not an object');
|
|
554
|
-
};
|
|
555
|
-
|
|
556
|
-
var DESCRIPTORS$6 = descriptors;
|
|
557
|
-
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
558
447
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
559
|
-
var anObject$
|
|
560
|
-
var toPropertyKey = toPropertyKey$2;
|
|
448
|
+
var anObject$a = anObject$b;
|
|
449
|
+
var toPropertyKey$1 = toPropertyKey$2;
|
|
561
450
|
|
|
562
|
-
var $TypeError$
|
|
451
|
+
var $TypeError$7 = TypeError;
|
|
563
452
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
564
453
|
var $defineProperty = Object.defineProperty;
|
|
565
454
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
566
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
455
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
567
456
|
var ENUMERABLE = 'enumerable';
|
|
568
457
|
var CONFIGURABLE$1 = 'configurable';
|
|
569
458
|
var WRITABLE = 'writable';
|
|
570
459
|
|
|
571
460
|
// `Object.defineProperty` method
|
|
572
461
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
573
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
574
|
-
anObject$
|
|
575
|
-
P = toPropertyKey(P);
|
|
576
|
-
anObject$
|
|
462
|
+
objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
463
|
+
anObject$a(O);
|
|
464
|
+
P = toPropertyKey$1(P);
|
|
465
|
+
anObject$a(Attributes);
|
|
577
466
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
578
|
-
var current = $getOwnPropertyDescriptor(O, P);
|
|
467
|
+
var current = $getOwnPropertyDescriptor$1(O, P);
|
|
579
468
|
if (current && current[WRITABLE]) {
|
|
580
469
|
O[P] = Attributes.value;
|
|
581
470
|
Attributes = {
|
|
@@ -586,184 +475,494 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
586
475
|
}
|
|
587
476
|
} return $defineProperty(O, P, Attributes);
|
|
588
477
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
589
|
-
anObject$
|
|
590
|
-
P = toPropertyKey(P);
|
|
591
|
-
anObject$
|
|
592
|
-
if (IE8_DOM_DEFINE) try {
|
|
478
|
+
anObject$a(O);
|
|
479
|
+
P = toPropertyKey$1(P);
|
|
480
|
+
anObject$a(Attributes);
|
|
481
|
+
if (IE8_DOM_DEFINE$1) try {
|
|
593
482
|
return $defineProperty(O, P, Attributes);
|
|
594
483
|
} catch (error) { /* empty */ }
|
|
595
|
-
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$
|
|
484
|
+
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$7('Accessors not supported');
|
|
596
485
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
597
486
|
return O;
|
|
598
487
|
};
|
|
599
488
|
|
|
600
|
-
var
|
|
601
|
-
var
|
|
602
|
-
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
489
|
+
var ceil = Math.ceil;
|
|
490
|
+
var floor = Math.floor;
|
|
603
491
|
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
492
|
+
// `Math.trunc` method
|
|
493
|
+
// https://tc39.es/ecma262/#sec-math.trunc
|
|
494
|
+
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
495
|
+
var mathTrunc = Math.trunc || function trunc(x) {
|
|
496
|
+
var n = +x;
|
|
497
|
+
return (n > 0 ? floor : ceil)(n);
|
|
609
498
|
};
|
|
610
499
|
|
|
611
|
-
var
|
|
500
|
+
var trunc = mathTrunc;
|
|
612
501
|
|
|
613
|
-
|
|
614
|
-
|
|
502
|
+
// `ToIntegerOrInfinity` abstract operation
|
|
503
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
504
|
+
var toIntegerOrInfinity$2 = function (argument) {
|
|
505
|
+
var number = +argument;
|
|
506
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
507
|
+
return number !== number || number === 0 ? 0 : trunc(number);
|
|
508
|
+
};
|
|
615
509
|
|
|
616
|
-
var
|
|
617
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
618
|
-
var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
|
|
510
|
+
var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
|
|
619
511
|
|
|
620
|
-
var
|
|
621
|
-
|
|
622
|
-
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
623
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
512
|
+
var max = Math.max;
|
|
513
|
+
var min$1 = Math.min;
|
|
624
514
|
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
515
|
+
// Helper for a popular repeating case of the spec:
|
|
516
|
+
// Let integer be ? ToInteger(index).
|
|
517
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
518
|
+
var toAbsoluteIndex$1 = function (index, length) {
|
|
519
|
+
var integer = toIntegerOrInfinity$1(index);
|
|
520
|
+
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
629
521
|
};
|
|
630
522
|
|
|
631
|
-
var
|
|
632
|
-
var isCallable$8 = isCallable$e;
|
|
633
|
-
var store$1 = sharedStore;
|
|
634
|
-
|
|
635
|
-
var functionToString = uncurryThis$6(Function.toString);
|
|
636
|
-
|
|
637
|
-
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
638
|
-
if (!isCallable$8(store$1.inspectSource)) {
|
|
639
|
-
store$1.inspectSource = function (it) {
|
|
640
|
-
return functionToString(it);
|
|
641
|
-
};
|
|
642
|
-
}
|
|
523
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$2;
|
|
643
524
|
|
|
644
|
-
var
|
|
525
|
+
var min = Math.min;
|
|
645
526
|
|
|
646
|
-
|
|
647
|
-
|
|
527
|
+
// `ToLength` abstract operation
|
|
528
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
529
|
+
var toLength$1 = function (argument) {
|
|
530
|
+
var len = toIntegerOrInfinity(argument);
|
|
531
|
+
return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
532
|
+
};
|
|
648
533
|
|
|
649
|
-
var
|
|
534
|
+
var toLength = toLength$1;
|
|
650
535
|
|
|
651
|
-
|
|
536
|
+
// `LengthOfArrayLike` abstract operation
|
|
537
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
538
|
+
var lengthOfArrayLike$2 = function (obj) {
|
|
539
|
+
return toLength(obj.length);
|
|
540
|
+
};
|
|
652
541
|
|
|
653
|
-
var
|
|
654
|
-
var
|
|
542
|
+
var toIndexedObject$4 = toIndexedObject$5;
|
|
543
|
+
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
544
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$2;
|
|
655
545
|
|
|
656
|
-
|
|
546
|
+
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
547
|
+
var createMethod = function (IS_INCLUDES) {
|
|
548
|
+
return function ($this, el, fromIndex) {
|
|
549
|
+
var O = toIndexedObject$4($this);
|
|
550
|
+
var length = lengthOfArrayLike$1(O);
|
|
551
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
552
|
+
var value;
|
|
553
|
+
// Array#includes uses SameValueZero equality algorithm
|
|
554
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
555
|
+
if (IS_INCLUDES && el !== el) while (length > index) {
|
|
556
|
+
value = O[index++];
|
|
557
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
558
|
+
if (value !== value) return true;
|
|
559
|
+
// Array#indexOf ignores holes, Array#includes - not
|
|
560
|
+
} else for (;length > index; index++) {
|
|
561
|
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
562
|
+
} return !IS_INCLUDES && -1;
|
|
563
|
+
};
|
|
564
|
+
};
|
|
657
565
|
|
|
658
|
-
var
|
|
659
|
-
|
|
566
|
+
var arrayIncludes = {
|
|
567
|
+
// `Array.prototype.includes` method
|
|
568
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
569
|
+
includes: createMethod(true),
|
|
570
|
+
// `Array.prototype.indexOf` method
|
|
571
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
572
|
+
indexOf: createMethod(false)
|
|
660
573
|
};
|
|
661
574
|
|
|
662
575
|
var hiddenKeys$4 = {};
|
|
663
576
|
|
|
664
|
-
var
|
|
665
|
-
var
|
|
666
|
-
var
|
|
667
|
-
var
|
|
668
|
-
var hasOwn$5 = hasOwnProperty_1;
|
|
669
|
-
var shared$1 = sharedStore;
|
|
670
|
-
var sharedKey$2 = sharedKey$3;
|
|
577
|
+
var uncurryThis$a = functionUncurryThis;
|
|
578
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
579
|
+
var toIndexedObject$3 = toIndexedObject$5;
|
|
580
|
+
var indexOf$1 = arrayIncludes.indexOf;
|
|
671
581
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
672
582
|
|
|
673
|
-
var
|
|
674
|
-
var TypeError$1 = global$6.TypeError;
|
|
675
|
-
var WeakMap = global$6.WeakMap;
|
|
676
|
-
var set, get, has;
|
|
583
|
+
var push = uncurryThis$a([].push);
|
|
677
584
|
|
|
678
|
-
var
|
|
679
|
-
|
|
585
|
+
var objectKeysInternal = function (object, names) {
|
|
586
|
+
var O = toIndexedObject$3(object);
|
|
587
|
+
var i = 0;
|
|
588
|
+
var result = [];
|
|
589
|
+
var key;
|
|
590
|
+
for (key in O) !hasOwn$8(hiddenKeys$3, key) && hasOwn$8(O, key) && push(result, key);
|
|
591
|
+
// Don't enum bug & hidden keys
|
|
592
|
+
while (names.length > i) if (hasOwn$8(O, key = names[i++])) {
|
|
593
|
+
~indexOf$1(result, key) || push(result, key);
|
|
594
|
+
}
|
|
595
|
+
return result;
|
|
680
596
|
};
|
|
681
597
|
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
598
|
+
// IE8- don't enum bug keys
|
|
599
|
+
var enumBugKeys$3 = [
|
|
600
|
+
'constructor',
|
|
601
|
+
'hasOwnProperty',
|
|
602
|
+
'isPrototypeOf',
|
|
603
|
+
'propertyIsEnumerable',
|
|
604
|
+
'toLocaleString',
|
|
605
|
+
'toString',
|
|
606
|
+
'valueOf'
|
|
607
|
+
];
|
|
690
608
|
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
609
|
+
var internalObjectKeys$1 = objectKeysInternal;
|
|
610
|
+
var enumBugKeys$2 = enumBugKeys$3;
|
|
611
|
+
|
|
612
|
+
// `Object.keys` method
|
|
613
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
614
|
+
// eslint-disable-next-line es/no-object-keys -- safe
|
|
615
|
+
var objectKeys$2 = Object.keys || function keys(O) {
|
|
616
|
+
return internalObjectKeys$1(O, enumBugKeys$2);
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
var DESCRIPTORS$8 = descriptors;
|
|
620
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
621
|
+
var definePropertyModule$3 = objectDefineProperty;
|
|
622
|
+
var anObject$9 = anObject$b;
|
|
623
|
+
var toIndexedObject$2 = toIndexedObject$5;
|
|
624
|
+
var objectKeys$1 = objectKeys$2;
|
|
625
|
+
|
|
626
|
+
// `Object.defineProperties` method
|
|
627
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
628
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
629
|
+
objectDefineProperties.f = DESCRIPTORS$8 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
630
|
+
anObject$9(O);
|
|
631
|
+
var props = toIndexedObject$2(Properties);
|
|
632
|
+
var keys = objectKeys$1(Properties);
|
|
633
|
+
var length = keys.length;
|
|
634
|
+
var index = 0;
|
|
635
|
+
var key;
|
|
636
|
+
while (length > index) definePropertyModule$3.f(O, key = keys[index++], props[key]);
|
|
637
|
+
return O;
|
|
638
|
+
};
|
|
639
|
+
|
|
640
|
+
var getBuiltIn$5 = getBuiltIn$7;
|
|
641
|
+
|
|
642
|
+
var html$2 = getBuiltIn$5('document', 'documentElement');
|
|
643
|
+
|
|
644
|
+
var shared$2 = shared$4.exports;
|
|
645
|
+
var uid = uid$2;
|
|
646
|
+
|
|
647
|
+
var keys = shared$2('keys');
|
|
648
|
+
|
|
649
|
+
var sharedKey$3 = function (key) {
|
|
650
|
+
return keys[key] || (keys[key] = uid(key));
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
654
|
+
var anObject$8 = anObject$b;
|
|
655
|
+
var definePropertiesModule = objectDefineProperties;
|
|
656
|
+
var enumBugKeys$1 = enumBugKeys$3;
|
|
657
|
+
var hiddenKeys$2 = hiddenKeys$4;
|
|
658
|
+
var html$1 = html$2;
|
|
659
|
+
var documentCreateElement$1 = documentCreateElement$2;
|
|
660
|
+
var sharedKey$2 = sharedKey$3;
|
|
661
|
+
|
|
662
|
+
var GT = '>';
|
|
663
|
+
var LT = '<';
|
|
664
|
+
var PROTOTYPE = 'prototype';
|
|
665
|
+
var SCRIPT = 'script';
|
|
666
|
+
var IE_PROTO$1 = sharedKey$2('IE_PROTO');
|
|
667
|
+
|
|
668
|
+
var EmptyConstructor = function () { /* empty */ };
|
|
669
|
+
|
|
670
|
+
var scriptTag = function (content) {
|
|
671
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
675
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
676
|
+
activeXDocument.write(scriptTag(''));
|
|
677
|
+
activeXDocument.close();
|
|
678
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
679
|
+
activeXDocument = null; // avoid memory leak
|
|
680
|
+
return temp;
|
|
681
|
+
};
|
|
682
|
+
|
|
683
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
684
|
+
var NullProtoObjectViaIFrame = function () {
|
|
685
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
686
|
+
var iframe = documentCreateElement$1('iframe');
|
|
687
|
+
var JS = 'java' + SCRIPT + ':';
|
|
688
|
+
var iframeDocument;
|
|
689
|
+
iframe.style.display = 'none';
|
|
690
|
+
html$1.appendChild(iframe);
|
|
691
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
692
|
+
iframe.src = String(JS);
|
|
693
|
+
iframeDocument = iframe.contentWindow.document;
|
|
694
|
+
iframeDocument.open();
|
|
695
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
696
|
+
iframeDocument.close();
|
|
697
|
+
return iframeDocument.F;
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
// Check for document.domain and active x support
|
|
701
|
+
// No need to use active x approach when document.domain is not set
|
|
702
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
703
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
704
|
+
// avoid IE GC bug
|
|
705
|
+
var activeXDocument;
|
|
706
|
+
var NullProtoObject = function () {
|
|
707
|
+
try {
|
|
708
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
709
|
+
} catch (error) { /* ignore */ }
|
|
710
|
+
NullProtoObject = typeof document != 'undefined'
|
|
711
|
+
? document.domain && activeXDocument
|
|
712
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
713
|
+
: NullProtoObjectViaIFrame()
|
|
714
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
715
|
+
var length = enumBugKeys$1.length;
|
|
716
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
|
|
717
|
+
return NullProtoObject();
|
|
718
|
+
};
|
|
719
|
+
|
|
720
|
+
hiddenKeys$2[IE_PROTO$1] = true;
|
|
721
|
+
|
|
722
|
+
// `Object.create` method
|
|
723
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
724
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
725
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
726
|
+
var result;
|
|
727
|
+
if (O !== null) {
|
|
728
|
+
EmptyConstructor[PROTOTYPE] = anObject$8(O);
|
|
729
|
+
result = new EmptyConstructor();
|
|
730
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
731
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
732
|
+
result[IE_PROTO$1] = O;
|
|
733
|
+
} else result = NullProtoObject();
|
|
734
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
var wellKnownSymbol$c = wellKnownSymbol$e;
|
|
738
|
+
var create$2 = objectCreate;
|
|
739
|
+
var defineProperty$5 = objectDefineProperty.f;
|
|
740
|
+
|
|
741
|
+
var UNSCOPABLES = wellKnownSymbol$c('unscopables');
|
|
742
|
+
var ArrayPrototype$1 = Array.prototype;
|
|
743
|
+
|
|
744
|
+
// Array.prototype[@@unscopables]
|
|
745
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
746
|
+
if (ArrayPrototype$1[UNSCOPABLES] === undefined) {
|
|
747
|
+
defineProperty$5(ArrayPrototype$1, UNSCOPABLES, {
|
|
748
|
+
configurable: true,
|
|
749
|
+
value: create$2(null)
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
// add a key to Array.prototype[@@unscopables]
|
|
754
|
+
var addToUnscopables$1 = function (key) {
|
|
755
|
+
ArrayPrototype$1[UNSCOPABLES][key] = true;
|
|
756
|
+
};
|
|
757
|
+
|
|
758
|
+
var iterators = {};
|
|
759
|
+
|
|
760
|
+
var global$e = global$m;
|
|
761
|
+
var isCallable$d = isCallable$j;
|
|
762
|
+
|
|
763
|
+
var WeakMap$1 = global$e.WeakMap;
|
|
764
|
+
|
|
765
|
+
var weakMapBasicDetection = isCallable$d(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
766
|
+
|
|
767
|
+
var createPropertyDescriptor$3 = function (bitmap, value) {
|
|
768
|
+
return {
|
|
769
|
+
enumerable: !(bitmap & 1),
|
|
770
|
+
configurable: !(bitmap & 2),
|
|
771
|
+
writable: !(bitmap & 4),
|
|
772
|
+
value: value
|
|
773
|
+
};
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
var DESCRIPTORS$7 = descriptors;
|
|
777
|
+
var definePropertyModule$2 = objectDefineProperty;
|
|
778
|
+
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
779
|
+
|
|
780
|
+
var createNonEnumerableProperty$4 = DESCRIPTORS$7 ? function (object, key, value) {
|
|
781
|
+
return definePropertyModule$2.f(object, key, createPropertyDescriptor$2(1, value));
|
|
782
|
+
} : function (object, key, value) {
|
|
783
|
+
object[key] = value;
|
|
784
|
+
return object;
|
|
785
|
+
};
|
|
786
|
+
|
|
787
|
+
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
788
|
+
var global$d = global$m;
|
|
789
|
+
var isObject$4 = isObject$9;
|
|
790
|
+
var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
|
|
791
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
792
|
+
var shared$1 = sharedStore;
|
|
793
|
+
var sharedKey$1 = sharedKey$3;
|
|
794
|
+
var hiddenKeys$1 = hiddenKeys$4;
|
|
795
|
+
|
|
796
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
797
|
+
var TypeError$2 = global$d.TypeError;
|
|
798
|
+
var WeakMap = global$d.WeakMap;
|
|
799
|
+
var set$1, get, has;
|
|
800
|
+
|
|
801
|
+
var enforce = function (it) {
|
|
802
|
+
return has(it) ? get(it) : set$1(it, {});
|
|
803
|
+
};
|
|
804
|
+
|
|
805
|
+
var getterFor = function (TYPE) {
|
|
806
|
+
return function (it) {
|
|
807
|
+
var state;
|
|
808
|
+
if (!isObject$4(it) || (state = get(it)).type !== TYPE) {
|
|
809
|
+
throw new TypeError$2('Incompatible receiver, ' + TYPE + ' required');
|
|
810
|
+
} return state;
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
|
|
814
|
+
if (NATIVE_WEAK_MAP || shared$1.state) {
|
|
815
|
+
var store$1 = shared$1.state || (shared$1.state = new WeakMap());
|
|
816
|
+
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
817
|
+
store$1.get = store$1.get;
|
|
818
|
+
store$1.has = store$1.has;
|
|
819
|
+
store$1.set = store$1.set;
|
|
697
820
|
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
698
|
-
set = function (it, metadata) {
|
|
699
|
-
if (store.has(it)) throw new TypeError$
|
|
821
|
+
set$1 = function (it, metadata) {
|
|
822
|
+
if (store$1.has(it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
700
823
|
metadata.facade = it;
|
|
701
|
-
store.set(it, metadata);
|
|
824
|
+
store$1.set(it, metadata);
|
|
702
825
|
return metadata;
|
|
703
826
|
};
|
|
704
827
|
get = function (it) {
|
|
705
|
-
return store.get(it) || {};
|
|
828
|
+
return store$1.get(it) || {};
|
|
706
829
|
};
|
|
707
830
|
has = function (it) {
|
|
708
|
-
return store.has(it);
|
|
831
|
+
return store$1.has(it);
|
|
709
832
|
};
|
|
710
833
|
} else {
|
|
711
|
-
var STATE = sharedKey$
|
|
712
|
-
hiddenKeys$
|
|
713
|
-
set = function (it, metadata) {
|
|
714
|
-
if (hasOwn$
|
|
834
|
+
var STATE = sharedKey$1('state');
|
|
835
|
+
hiddenKeys$1[STATE] = true;
|
|
836
|
+
set$1 = function (it, metadata) {
|
|
837
|
+
if (hasOwn$7(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
715
838
|
metadata.facade = it;
|
|
716
839
|
createNonEnumerableProperty$3(it, STATE, metadata);
|
|
717
840
|
return metadata;
|
|
718
841
|
};
|
|
719
842
|
get = function (it) {
|
|
720
|
-
return hasOwn$
|
|
843
|
+
return hasOwn$7(it, STATE) ? it[STATE] : {};
|
|
721
844
|
};
|
|
722
845
|
has = function (it) {
|
|
723
|
-
return hasOwn$
|
|
846
|
+
return hasOwn$7(it, STATE);
|
|
724
847
|
};
|
|
725
848
|
}
|
|
726
849
|
|
|
727
850
|
var internalState = {
|
|
728
|
-
set: set,
|
|
851
|
+
set: set$1,
|
|
729
852
|
get: get,
|
|
730
853
|
has: has,
|
|
731
854
|
enforce: enforce,
|
|
732
855
|
getterFor: getterFor
|
|
733
856
|
};
|
|
734
857
|
|
|
735
|
-
var
|
|
736
|
-
|
|
737
|
-
var
|
|
858
|
+
var objectGetOwnPropertyDescriptor = {};
|
|
859
|
+
|
|
860
|
+
var objectPropertyIsEnumerable = {};
|
|
861
|
+
|
|
862
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
863
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
864
|
+
var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
|
|
865
|
+
|
|
866
|
+
// Nashorn ~ JDK8 bug
|
|
867
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
868
|
+
|
|
869
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
870
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
871
|
+
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
872
|
+
var descriptor = getOwnPropertyDescriptor$2(this, V);
|
|
873
|
+
return !!descriptor && descriptor.enumerable;
|
|
874
|
+
} : $propertyIsEnumerable;
|
|
875
|
+
|
|
876
|
+
var DESCRIPTORS$6 = descriptors;
|
|
877
|
+
var call$a = functionCall;
|
|
878
|
+
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
879
|
+
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
880
|
+
var toIndexedObject$1 = toIndexedObject$5;
|
|
881
|
+
var toPropertyKey = toPropertyKey$2;
|
|
882
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
883
|
+
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
884
|
+
|
|
885
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
886
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
887
|
+
|
|
888
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
889
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
890
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
891
|
+
O = toIndexedObject$1(O);
|
|
892
|
+
P = toPropertyKey(P);
|
|
893
|
+
if (IE8_DOM_DEFINE) try {
|
|
894
|
+
return $getOwnPropertyDescriptor(O, P);
|
|
895
|
+
} catch (error) { /* empty */ }
|
|
896
|
+
if (hasOwn$6(O, P)) return createPropertyDescriptor$1(!call$a(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
897
|
+
};
|
|
898
|
+
|
|
899
|
+
var makeBuiltIn$3 = {exports: {}};
|
|
900
|
+
|
|
901
|
+
var DESCRIPTORS$5 = descriptors;
|
|
902
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
903
|
+
|
|
904
|
+
var FunctionPrototype$1 = Function.prototype;
|
|
905
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
906
|
+
var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
|
|
907
|
+
|
|
908
|
+
var EXISTS = hasOwn$5(FunctionPrototype$1, 'name');
|
|
909
|
+
// additional protection from minified / mangled / dropped function names
|
|
910
|
+
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
911
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
912
|
+
|
|
913
|
+
var functionName = {
|
|
914
|
+
EXISTS: EXISTS,
|
|
915
|
+
PROPER: PROPER,
|
|
916
|
+
CONFIGURABLE: CONFIGURABLE
|
|
917
|
+
};
|
|
918
|
+
|
|
919
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
920
|
+
var isCallable$c = isCallable$j;
|
|
921
|
+
var store = sharedStore;
|
|
922
|
+
|
|
923
|
+
var functionToString = uncurryThis$9(Function.toString);
|
|
924
|
+
|
|
925
|
+
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
926
|
+
if (!isCallable$c(store.inspectSource)) {
|
|
927
|
+
store.inspectSource = function (it) {
|
|
928
|
+
return functionToString(it);
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
var inspectSource$3 = store.inspectSource;
|
|
933
|
+
|
|
934
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
935
|
+
var fails$9 = fails$g;
|
|
936
|
+
var isCallable$b = isCallable$j;
|
|
738
937
|
var hasOwn$4 = hasOwnProperty_1;
|
|
739
|
-
var DESCRIPTORS$
|
|
938
|
+
var DESCRIPTORS$4 = descriptors;
|
|
740
939
|
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
741
|
-
var inspectSource = inspectSource$
|
|
742
|
-
var InternalStateModule$
|
|
940
|
+
var inspectSource$2 = inspectSource$3;
|
|
941
|
+
var InternalStateModule$2 = internalState;
|
|
743
942
|
|
|
744
|
-
var enforceInternalState = InternalStateModule$
|
|
745
|
-
var getInternalState$2 = InternalStateModule$
|
|
943
|
+
var enforceInternalState = InternalStateModule$2.enforce;
|
|
944
|
+
var getInternalState$2 = InternalStateModule$2.get;
|
|
746
945
|
var $String$2 = String;
|
|
747
946
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
748
947
|
var defineProperty$4 = Object.defineProperty;
|
|
749
|
-
var stringSlice$1 = uncurryThis$
|
|
750
|
-
var replace$1 = uncurryThis$
|
|
751
|
-
var join = uncurryThis$
|
|
948
|
+
var stringSlice$1 = uncurryThis$8(''.slice);
|
|
949
|
+
var replace$1 = uncurryThis$8(''.replace);
|
|
950
|
+
var join = uncurryThis$8([].join);
|
|
752
951
|
|
|
753
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS$
|
|
952
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$9(function () {
|
|
754
953
|
return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
755
954
|
});
|
|
756
955
|
|
|
757
956
|
var TEMPLATE = String(String).split('String');
|
|
758
957
|
|
|
759
|
-
var makeBuiltIn$
|
|
958
|
+
var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
|
|
760
959
|
if (stringSlice$1($String$2(name), 0, 7) === 'Symbol(') {
|
|
761
960
|
name = '[' + replace$1($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
762
961
|
}
|
|
763
962
|
if (options && options.getter) name = 'get ' + name;
|
|
764
963
|
if (options && options.setter) name = 'set ' + name;
|
|
765
964
|
if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
766
|
-
if (DESCRIPTORS$
|
|
965
|
+
if (DESCRIPTORS$4) defineProperty$4(value, 'name', { value: name, configurable: true });
|
|
767
966
|
else value.name = name;
|
|
768
967
|
}
|
|
769
968
|
if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
|
|
@@ -771,7 +970,7 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
|
771
970
|
}
|
|
772
971
|
try {
|
|
773
972
|
if (options && hasOwn$4(options, 'constructor') && options.constructor) {
|
|
774
|
-
if (DESCRIPTORS$
|
|
973
|
+
if (DESCRIPTORS$4) defineProperty$4(value, 'prototype', { writable: false });
|
|
775
974
|
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
776
975
|
} else if (value.prototype) value.prototype = undefined;
|
|
777
976
|
} catch (error) { /* empty */ }
|
|
@@ -783,20 +982,20 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
|
783
982
|
|
|
784
983
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
785
984
|
// eslint-disable-next-line no-extend-native -- required
|
|
786
|
-
Function.prototype.toString = makeBuiltIn$
|
|
787
|
-
return isCallable$
|
|
985
|
+
Function.prototype.toString = makeBuiltIn$2(function toString() {
|
|
986
|
+
return isCallable$b(this) && getInternalState$2(this).source || inspectSource$2(this);
|
|
788
987
|
}, 'toString');
|
|
789
988
|
|
|
790
|
-
var isCallable$
|
|
791
|
-
var definePropertyModule$
|
|
792
|
-
var makeBuiltIn = makeBuiltIn$
|
|
989
|
+
var isCallable$a = isCallable$j;
|
|
990
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
991
|
+
var makeBuiltIn$1 = makeBuiltIn$3.exports;
|
|
793
992
|
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
794
993
|
|
|
795
|
-
var defineBuiltIn$
|
|
994
|
+
var defineBuiltIn$5 = function (O, key, value, options) {
|
|
796
995
|
if (!options) options = {};
|
|
797
996
|
var simple = options.enumerable;
|
|
798
997
|
var name = options.name !== undefined ? options.name : key;
|
|
799
|
-
if (isCallable$
|
|
998
|
+
if (isCallable$a(value)) makeBuiltIn$1(value, name, options);
|
|
800
999
|
if (options.global) {
|
|
801
1000
|
if (simple) O[key] = value;
|
|
802
1001
|
else defineGlobalProperty$1(key, value);
|
|
@@ -806,7 +1005,7 @@ var defineBuiltIn$3 = function (O, key, value, options) {
|
|
|
806
1005
|
else if (O[key]) simple = true;
|
|
807
1006
|
} catch (error) { /* empty */ }
|
|
808
1007
|
if (simple) O[key] = value;
|
|
809
|
-
else definePropertyModule$
|
|
1008
|
+
else definePropertyModule$1.f(O, key, {
|
|
810
1009
|
value: value,
|
|
811
1010
|
enumerable: false,
|
|
812
1011
|
configurable: !options.nonConfigurable,
|
|
@@ -817,203 +1016,85 @@ var defineBuiltIn$3 = function (O, key, value, options) {
|
|
|
817
1016
|
|
|
818
1017
|
var objectGetOwnPropertyNames = {};
|
|
819
1018
|
|
|
820
|
-
var
|
|
821
|
-
var
|
|
1019
|
+
var internalObjectKeys = objectKeysInternal;
|
|
1020
|
+
var enumBugKeys = enumBugKeys$3;
|
|
822
1021
|
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
//
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
1022
|
+
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
|
|
1023
|
+
|
|
1024
|
+
// `Object.getOwnPropertyNames` method
|
|
1025
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
1026
|
+
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
1027
|
+
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
1028
|
+
return internalObjectKeys(O, hiddenKeys);
|
|
829
1029
|
};
|
|
830
1030
|
|
|
831
|
-
var
|
|
832
|
-
|
|
833
|
-
// `ToIntegerOrInfinity` abstract operation
|
|
834
|
-
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
835
|
-
var toIntegerOrInfinity$2 = function (argument) {
|
|
836
|
-
var number = +argument;
|
|
837
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
838
|
-
return number !== number || number === 0 ? 0 : trunc(number);
|
|
839
|
-
};
|
|
840
|
-
|
|
841
|
-
var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
|
|
842
|
-
|
|
843
|
-
var max = Math.max;
|
|
844
|
-
var min$1 = Math.min;
|
|
845
|
-
|
|
846
|
-
// Helper for a popular repeating case of the spec:
|
|
847
|
-
// Let integer be ? ToInteger(index).
|
|
848
|
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
849
|
-
var toAbsoluteIndex$1 = function (index, length) {
|
|
850
|
-
var integer = toIntegerOrInfinity$1(index);
|
|
851
|
-
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
852
|
-
};
|
|
853
|
-
|
|
854
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$2;
|
|
855
|
-
|
|
856
|
-
var min = Math.min;
|
|
857
|
-
|
|
858
|
-
// `ToLength` abstract operation
|
|
859
|
-
// https://tc39.es/ecma262/#sec-tolength
|
|
860
|
-
var toLength$1 = function (argument) {
|
|
861
|
-
var len = toIntegerOrInfinity(argument);
|
|
862
|
-
return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
863
|
-
};
|
|
864
|
-
|
|
865
|
-
var toLength = toLength$1;
|
|
866
|
-
|
|
867
|
-
// `LengthOfArrayLike` abstract operation
|
|
868
|
-
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
869
|
-
var lengthOfArrayLike$1 = function (obj) {
|
|
870
|
-
return toLength(obj.length);
|
|
871
|
-
};
|
|
872
|
-
|
|
873
|
-
var toIndexedObject$3 = toIndexedObject$5;
|
|
874
|
-
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
875
|
-
var lengthOfArrayLike = lengthOfArrayLike$1;
|
|
876
|
-
|
|
877
|
-
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
878
|
-
var createMethod = function (IS_INCLUDES) {
|
|
879
|
-
return function ($this, el, fromIndex) {
|
|
880
|
-
var O = toIndexedObject$3($this);
|
|
881
|
-
var length = lengthOfArrayLike(O);
|
|
882
|
-
var index = toAbsoluteIndex(fromIndex, length);
|
|
883
|
-
var value;
|
|
884
|
-
// Array#includes uses SameValueZero equality algorithm
|
|
885
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
886
|
-
if (IS_INCLUDES && el !== el) while (length > index) {
|
|
887
|
-
value = O[index++];
|
|
888
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
889
|
-
if (value !== value) return true;
|
|
890
|
-
// Array#indexOf ignores holes, Array#includes - not
|
|
891
|
-
} else for (;length > index; index++) {
|
|
892
|
-
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
893
|
-
} return !IS_INCLUDES && -1;
|
|
894
|
-
};
|
|
895
|
-
};
|
|
896
|
-
|
|
897
|
-
var arrayIncludes = {
|
|
898
|
-
// `Array.prototype.includes` method
|
|
899
|
-
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
900
|
-
includes: createMethod(true),
|
|
901
|
-
// `Array.prototype.indexOf` method
|
|
902
|
-
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
903
|
-
indexOf: createMethod(false)
|
|
904
|
-
};
|
|
905
|
-
|
|
906
|
-
var uncurryThis$4 = functionUncurryThis;
|
|
907
|
-
var hasOwn$3 = hasOwnProperty_1;
|
|
908
|
-
var toIndexedObject$2 = toIndexedObject$5;
|
|
909
|
-
var indexOf$1 = arrayIncludes.indexOf;
|
|
910
|
-
var hiddenKeys$2 = hiddenKeys$4;
|
|
911
|
-
|
|
912
|
-
var push = uncurryThis$4([].push);
|
|
913
|
-
|
|
914
|
-
var objectKeysInternal = function (object, names) {
|
|
915
|
-
var O = toIndexedObject$2(object);
|
|
916
|
-
var i = 0;
|
|
917
|
-
var result = [];
|
|
918
|
-
var key;
|
|
919
|
-
for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push(result, key);
|
|
920
|
-
// Don't enum bug & hidden keys
|
|
921
|
-
while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
|
|
922
|
-
~indexOf$1(result, key) || push(result, key);
|
|
923
|
-
}
|
|
924
|
-
return result;
|
|
925
|
-
};
|
|
926
|
-
|
|
927
|
-
// IE8- don't enum bug keys
|
|
928
|
-
var enumBugKeys$3 = [
|
|
929
|
-
'constructor',
|
|
930
|
-
'hasOwnProperty',
|
|
931
|
-
'isPrototypeOf',
|
|
932
|
-
'propertyIsEnumerable',
|
|
933
|
-
'toLocaleString',
|
|
934
|
-
'toString',
|
|
935
|
-
'valueOf'
|
|
936
|
-
];
|
|
937
|
-
|
|
938
|
-
var internalObjectKeys$1 = objectKeysInternal;
|
|
939
|
-
var enumBugKeys$2 = enumBugKeys$3;
|
|
940
|
-
|
|
941
|
-
var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
|
|
942
|
-
|
|
943
|
-
// `Object.getOwnPropertyNames` method
|
|
944
|
-
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
945
|
-
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
946
|
-
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
947
|
-
return internalObjectKeys$1(O, hiddenKeys$1);
|
|
948
|
-
};
|
|
949
|
-
|
|
950
|
-
var objectGetOwnPropertySymbols = {};
|
|
1031
|
+
var objectGetOwnPropertySymbols = {};
|
|
951
1032
|
|
|
952
1033
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
953
1034
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
954
1035
|
|
|
955
|
-
var getBuiltIn$
|
|
956
|
-
var uncurryThis$
|
|
1036
|
+
var getBuiltIn$4 = getBuiltIn$7;
|
|
1037
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
957
1038
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
958
1039
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
959
|
-
var anObject$
|
|
1040
|
+
var anObject$7 = anObject$b;
|
|
960
1041
|
|
|
961
|
-
var concat$1 = uncurryThis$
|
|
1042
|
+
var concat$1 = uncurryThis$7([].concat);
|
|
962
1043
|
|
|
963
1044
|
// all object keys, includes non-enumerable and symbols
|
|
964
|
-
var ownKeys$1 = getBuiltIn$
|
|
965
|
-
var keys = getOwnPropertyNamesModule.f(anObject$
|
|
1045
|
+
var ownKeys$1 = getBuiltIn$4('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
1046
|
+
var keys = getOwnPropertyNamesModule.f(anObject$7(it));
|
|
966
1047
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
967
1048
|
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
968
1049
|
};
|
|
969
1050
|
|
|
970
|
-
var hasOwn$
|
|
1051
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
971
1052
|
var ownKeys = ownKeys$1;
|
|
972
1053
|
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
973
|
-
var definePropertyModule
|
|
1054
|
+
var definePropertyModule = objectDefineProperty;
|
|
974
1055
|
|
|
975
1056
|
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
976
1057
|
var keys = ownKeys(source);
|
|
977
|
-
var defineProperty = definePropertyModule
|
|
1058
|
+
var defineProperty = definePropertyModule.f;
|
|
978
1059
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
979
1060
|
for (var i = 0; i < keys.length; i++) {
|
|
980
1061
|
var key = keys[i];
|
|
981
|
-
if (!hasOwn$
|
|
1062
|
+
if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
|
|
982
1063
|
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
983
1064
|
}
|
|
984
1065
|
}
|
|
985
1066
|
};
|
|
986
1067
|
|
|
987
|
-
var fails$
|
|
988
|
-
var isCallable$
|
|
1068
|
+
var fails$8 = fails$g;
|
|
1069
|
+
var isCallable$9 = isCallable$j;
|
|
989
1070
|
|
|
990
1071
|
var replacement = /#|\.prototype\./;
|
|
991
1072
|
|
|
992
|
-
var isForced$
|
|
1073
|
+
var isForced$2 = function (feature, detection) {
|
|
993
1074
|
var value = data[normalize(feature)];
|
|
994
1075
|
return value === POLYFILL ? true
|
|
995
1076
|
: value === NATIVE ? false
|
|
996
|
-
: isCallable$
|
|
1077
|
+
: isCallable$9(detection) ? fails$8(detection)
|
|
997
1078
|
: !!detection;
|
|
998
1079
|
};
|
|
999
1080
|
|
|
1000
|
-
var normalize = isForced$
|
|
1081
|
+
var normalize = isForced$2.normalize = function (string) {
|
|
1001
1082
|
return String(string).replace(replacement, '.').toLowerCase();
|
|
1002
1083
|
};
|
|
1003
1084
|
|
|
1004
|
-
var data = isForced$
|
|
1005
|
-
var NATIVE = isForced$
|
|
1006
|
-
var POLYFILL = isForced$
|
|
1085
|
+
var data = isForced$2.data = {};
|
|
1086
|
+
var NATIVE = isForced$2.NATIVE = 'N';
|
|
1087
|
+
var POLYFILL = isForced$2.POLYFILL = 'P';
|
|
1007
1088
|
|
|
1008
|
-
var isForced_1 = isForced$
|
|
1089
|
+
var isForced_1 = isForced$2;
|
|
1009
1090
|
|
|
1010
|
-
var global$
|
|
1011
|
-
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
1091
|
+
var global$c = global$m;
|
|
1092
|
+
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
1012
1093
|
var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
|
|
1013
|
-
var defineBuiltIn$
|
|
1094
|
+
var defineBuiltIn$4 = defineBuiltIn$5;
|
|
1014
1095
|
var defineGlobalProperty = defineGlobalProperty$3;
|
|
1015
1096
|
var copyConstructorProperties = copyConstructorProperties$1;
|
|
1016
|
-
var isForced = isForced_1;
|
|
1097
|
+
var isForced$1 = isForced_1;
|
|
1017
1098
|
|
|
1018
1099
|
/*
|
|
1019
1100
|
options.target - name of the target object
|
|
@@ -1036,19 +1117,19 @@ var _export = function (options, source) {
|
|
|
1036
1117
|
var STATIC = options.stat;
|
|
1037
1118
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
1038
1119
|
if (GLOBAL) {
|
|
1039
|
-
target = global$
|
|
1120
|
+
target = global$c;
|
|
1040
1121
|
} else if (STATIC) {
|
|
1041
|
-
target = global$
|
|
1122
|
+
target = global$c[TARGET] || defineGlobalProperty(TARGET, {});
|
|
1042
1123
|
} else {
|
|
1043
|
-
target = global$
|
|
1124
|
+
target = global$c[TARGET] && global$c[TARGET].prototype;
|
|
1044
1125
|
}
|
|
1045
1126
|
if (target) for (key in source) {
|
|
1046
1127
|
sourceProperty = source[key];
|
|
1047
1128
|
if (options.dontCallGetSet) {
|
|
1048
|
-
descriptor = getOwnPropertyDescriptor(target, key);
|
|
1129
|
+
descriptor = getOwnPropertyDescriptor$1(target, key);
|
|
1049
1130
|
targetProperty = descriptor && descriptor.value;
|
|
1050
1131
|
} else targetProperty = target[key];
|
|
1051
|
-
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
1132
|
+
FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
1052
1133
|
// contained in target
|
|
1053
1134
|
if (!FORCED && targetProperty !== undefined) {
|
|
1054
1135
|
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
@@ -1058,833 +1139,761 @@ var _export = function (options, source) {
|
|
|
1058
1139
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
1059
1140
|
createNonEnumerableProperty$2(sourceProperty, 'sham', true);
|
|
1060
1141
|
}
|
|
1061
|
-
defineBuiltIn$
|
|
1142
|
+
defineBuiltIn$4(target, key, sourceProperty, options);
|
|
1062
1143
|
}
|
|
1063
1144
|
};
|
|
1064
1145
|
|
|
1065
|
-
var
|
|
1066
|
-
|
|
1067
|
-
var TO_STRING_TAG$2 = wellKnownSymbol$6('toStringTag');
|
|
1068
|
-
var test = {};
|
|
1069
|
-
|
|
1070
|
-
test[TO_STRING_TAG$2] = 'z';
|
|
1146
|
+
var fails$7 = fails$g;
|
|
1071
1147
|
|
|
1072
|
-
var
|
|
1148
|
+
var correctPrototypeGetter = !fails$7(function () {
|
|
1149
|
+
function F() { /* empty */ }
|
|
1150
|
+
F.prototype.constructor = null;
|
|
1151
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
1152
|
+
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
1153
|
+
});
|
|
1073
1154
|
|
|
1074
|
-
var
|
|
1075
|
-
var isCallable$
|
|
1076
|
-
var
|
|
1077
|
-
var
|
|
1155
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
1156
|
+
var isCallable$8 = isCallable$j;
|
|
1157
|
+
var toObject$1 = toObject$3;
|
|
1158
|
+
var sharedKey = sharedKey$3;
|
|
1159
|
+
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1078
1160
|
|
|
1079
|
-
var
|
|
1161
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1080
1162
|
var $Object$1 = Object;
|
|
1163
|
+
var ObjectPrototype = $Object$1.prototype;
|
|
1081
1164
|
|
|
1082
|
-
//
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
var
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1165
|
+
// `Object.getPrototypeOf` method
|
|
1166
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1167
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
1168
|
+
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
|
|
1169
|
+
var object = toObject$1(O);
|
|
1170
|
+
if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
|
|
1171
|
+
var constructor = object.constructor;
|
|
1172
|
+
if (isCallable$8(constructor) && object instanceof constructor) {
|
|
1173
|
+
return constructor.prototype;
|
|
1174
|
+
} return object instanceof $Object$1 ? ObjectPrototype : null;
|
|
1090
1175
|
};
|
|
1091
1176
|
|
|
1092
|
-
|
|
1093
|
-
var
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
// builtinTag case
|
|
1099
|
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
1100
|
-
// ES3 arguments fallback
|
|
1101
|
-
: (result = classofRaw(O)) === 'Object' && isCallable$3(O.callee) ? 'Arguments' : result;
|
|
1102
|
-
};
|
|
1177
|
+
var fails$6 = fails$g;
|
|
1178
|
+
var isCallable$7 = isCallable$j;
|
|
1179
|
+
var isObject$3 = isObject$9;
|
|
1180
|
+
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1181
|
+
var defineBuiltIn$3 = defineBuiltIn$5;
|
|
1182
|
+
var wellKnownSymbol$b = wellKnownSymbol$e;
|
|
1103
1183
|
|
|
1104
|
-
var
|
|
1184
|
+
var ITERATOR$5 = wellKnownSymbol$b('iterator');
|
|
1185
|
+
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
1105
1186
|
|
|
1106
|
-
|
|
1187
|
+
// `%IteratorPrototype%` object
|
|
1188
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
1189
|
+
var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
1107
1190
|
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1191
|
+
/* eslint-disable es/no-array-prototype-keys -- safe */
|
|
1192
|
+
if ([].keys) {
|
|
1193
|
+
arrayIterator = [].keys();
|
|
1194
|
+
// Safari 8 has buggy iterators w/o `next`
|
|
1195
|
+
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
|
|
1196
|
+
else {
|
|
1197
|
+
PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
|
|
1198
|
+
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1112
1201
|
|
|
1113
|
-
var
|
|
1202
|
+
var NEW_ITERATOR_PROTOTYPE = !isObject$3(IteratorPrototype$2) || fails$6(function () {
|
|
1203
|
+
var test = {};
|
|
1204
|
+
// FF44- legacy iterators case
|
|
1205
|
+
return IteratorPrototype$2[ITERATOR$5].call(test) !== test;
|
|
1206
|
+
});
|
|
1114
1207
|
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
return result;
|
|
1208
|
+
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
|
|
1209
|
+
|
|
1210
|
+
// `%IteratorPrototype%[@@iterator]()` method
|
|
1211
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1212
|
+
if (!isCallable$7(IteratorPrototype$2[ITERATOR$5])) {
|
|
1213
|
+
defineBuiltIn$3(IteratorPrototype$2, ITERATOR$5, function () {
|
|
1214
|
+
return this;
|
|
1215
|
+
});
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
var iteratorsCore = {
|
|
1219
|
+
IteratorPrototype: IteratorPrototype$2,
|
|
1220
|
+
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
1129
1221
|
};
|
|
1130
1222
|
|
|
1131
|
-
var
|
|
1132
|
-
var
|
|
1223
|
+
var defineProperty$3 = objectDefineProperty.f;
|
|
1224
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
1225
|
+
var wellKnownSymbol$a = wellKnownSymbol$e;
|
|
1133
1226
|
|
|
1134
|
-
|
|
1135
|
-
var $RegExp$2 = global$4.RegExp;
|
|
1227
|
+
var TO_STRING_TAG$2 = wellKnownSymbol$a('toStringTag');
|
|
1136
1228
|
|
|
1137
|
-
var
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
}
|
|
1229
|
+
var setToStringTag$4 = function (target, TAG, STATIC) {
|
|
1230
|
+
if (target && !STATIC) target = target.prototype;
|
|
1231
|
+
if (target && !hasOwn$1(target, TO_STRING_TAG$2)) {
|
|
1232
|
+
defineProperty$3(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
|
|
1233
|
+
}
|
|
1234
|
+
};
|
|
1142
1235
|
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
var
|
|
1146
|
-
|
|
1147
|
-
|
|
1236
|
+
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
1237
|
+
var create$1 = objectCreate;
|
|
1238
|
+
var createPropertyDescriptor = createPropertyDescriptor$3;
|
|
1239
|
+
var setToStringTag$3 = setToStringTag$4;
|
|
1240
|
+
var Iterators$4 = iterators;
|
|
1148
1241
|
|
|
1149
|
-
var
|
|
1150
|
-
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
1151
|
-
var re = $RegExp$2('^r', 'gy');
|
|
1152
|
-
re.lastIndex = 2;
|
|
1153
|
-
return re.exec('str') !== null;
|
|
1154
|
-
});
|
|
1242
|
+
var returnThis$1 = function () { return this; };
|
|
1155
1243
|
|
|
1156
|
-
var
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1244
|
+
var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
1245
|
+
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1246
|
+
IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
|
|
1247
|
+
setToStringTag$3(IteratorConstructor, TO_STRING_TAG, false);
|
|
1248
|
+
Iterators$4[TO_STRING_TAG] = returnThis$1;
|
|
1249
|
+
return IteratorConstructor;
|
|
1160
1250
|
};
|
|
1161
1251
|
|
|
1162
|
-
var
|
|
1163
|
-
|
|
1164
|
-
var internalObjectKeys = objectKeysInternal;
|
|
1165
|
-
var enumBugKeys$1 = enumBugKeys$3;
|
|
1252
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
1253
|
+
var aCallable$6 = aCallable$8;
|
|
1166
1254
|
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
// eslint-disable-next-line es/no-object-
|
|
1170
|
-
|
|
1171
|
-
|
|
1255
|
+
var functionUncurryThisAccessor = function (object, key, method) {
|
|
1256
|
+
try {
|
|
1257
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1258
|
+
return uncurryThis$6(aCallable$6(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
1259
|
+
} catch (error) { /* empty */ }
|
|
1172
1260
|
};
|
|
1173
1261
|
|
|
1174
|
-
var
|
|
1175
|
-
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1176
|
-
var definePropertyModule = objectDefineProperty;
|
|
1177
|
-
var anObject$2 = anObject$6;
|
|
1178
|
-
var toIndexedObject$1 = toIndexedObject$5;
|
|
1179
|
-
var objectKeys$1 = objectKeys$2;
|
|
1262
|
+
var isObject$2 = isObject$9;
|
|
1180
1263
|
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1184
|
-
objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1185
|
-
anObject$2(O);
|
|
1186
|
-
var props = toIndexedObject$1(Properties);
|
|
1187
|
-
var keys = objectKeys$1(Properties);
|
|
1188
|
-
var length = keys.length;
|
|
1189
|
-
var index = 0;
|
|
1190
|
-
var key;
|
|
1191
|
-
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
1192
|
-
return O;
|
|
1264
|
+
var isPossiblePrototype$1 = function (argument) {
|
|
1265
|
+
return isObject$2(argument) || argument === null;
|
|
1193
1266
|
};
|
|
1194
1267
|
|
|
1195
|
-
var
|
|
1268
|
+
var isPossiblePrototype = isPossiblePrototype$1;
|
|
1196
1269
|
|
|
1197
|
-
var
|
|
1270
|
+
var $String$1 = String;
|
|
1271
|
+
var $TypeError$6 = TypeError;
|
|
1198
1272
|
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
var hiddenKeys = hiddenKeys$4;
|
|
1204
|
-
var html = html$1;
|
|
1205
|
-
var documentCreateElement$1 = documentCreateElement$2;
|
|
1206
|
-
var sharedKey$1 = sharedKey$3;
|
|
1273
|
+
var aPossiblePrototype$1 = function (argument) {
|
|
1274
|
+
if (isPossiblePrototype(argument)) return argument;
|
|
1275
|
+
throw new $TypeError$6("Can't set " + $String$1(argument) + ' as a prototype');
|
|
1276
|
+
};
|
|
1207
1277
|
|
|
1208
|
-
|
|
1209
|
-
var
|
|
1210
|
-
var
|
|
1211
|
-
var
|
|
1212
|
-
var IE_PROTO$1 = sharedKey$1('IE_PROTO');
|
|
1278
|
+
/* eslint-disable no-proto -- safe */
|
|
1279
|
+
var uncurryThisAccessor = functionUncurryThisAccessor;
|
|
1280
|
+
var anObject$6 = anObject$b;
|
|
1281
|
+
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1213
1282
|
|
|
1214
|
-
|
|
1283
|
+
// `Object.setPrototypeOf` method
|
|
1284
|
+
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
1285
|
+
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
1286
|
+
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
1287
|
+
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
1288
|
+
var CORRECT_SETTER = false;
|
|
1289
|
+
var test = {};
|
|
1290
|
+
var setter;
|
|
1291
|
+
try {
|
|
1292
|
+
setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
|
|
1293
|
+
setter(test, []);
|
|
1294
|
+
CORRECT_SETTER = test instanceof Array;
|
|
1295
|
+
} catch (error) { /* empty */ }
|
|
1296
|
+
return function setPrototypeOf(O, proto) {
|
|
1297
|
+
anObject$6(O);
|
|
1298
|
+
aPossiblePrototype(proto);
|
|
1299
|
+
if (CORRECT_SETTER) setter(O, proto);
|
|
1300
|
+
else O.__proto__ = proto;
|
|
1301
|
+
return O;
|
|
1302
|
+
};
|
|
1303
|
+
}() : undefined);
|
|
1215
1304
|
|
|
1216
|
-
var
|
|
1217
|
-
|
|
1218
|
-
|
|
1305
|
+
var $$8 = _export;
|
|
1306
|
+
var call$9 = functionCall;
|
|
1307
|
+
var FunctionName = functionName;
|
|
1308
|
+
var isCallable$6 = isCallable$j;
|
|
1309
|
+
var createIteratorConstructor = iteratorCreateConstructor;
|
|
1310
|
+
var getPrototypeOf = objectGetPrototypeOf;
|
|
1311
|
+
var setPrototypeOf$1 = objectSetPrototypeOf;
|
|
1312
|
+
var setToStringTag$2 = setToStringTag$4;
|
|
1313
|
+
var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
|
|
1314
|
+
var defineBuiltIn$2 = defineBuiltIn$5;
|
|
1315
|
+
var wellKnownSymbol$9 = wellKnownSymbol$e;
|
|
1316
|
+
var Iterators$3 = iterators;
|
|
1317
|
+
var IteratorsCore = iteratorsCore;
|
|
1219
1318
|
|
|
1220
|
-
|
|
1221
|
-
var
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1319
|
+
var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
|
1320
|
+
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
1321
|
+
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
1322
|
+
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
1323
|
+
var ITERATOR$4 = wellKnownSymbol$9('iterator');
|
|
1324
|
+
var KEYS = 'keys';
|
|
1325
|
+
var VALUES = 'values';
|
|
1326
|
+
var ENTRIES = 'entries';
|
|
1228
1327
|
|
|
1229
|
-
|
|
1230
|
-
var NullProtoObjectViaIFrame = function () {
|
|
1231
|
-
// Thrash, waste and sodomy: IE GC bug
|
|
1232
|
-
var iframe = documentCreateElement$1('iframe');
|
|
1233
|
-
var JS = 'java' + SCRIPT + ':';
|
|
1234
|
-
var iframeDocument;
|
|
1235
|
-
iframe.style.display = 'none';
|
|
1236
|
-
html.appendChild(iframe);
|
|
1237
|
-
// https://github.com/zloirock/core-js/issues/475
|
|
1238
|
-
iframe.src = String(JS);
|
|
1239
|
-
iframeDocument = iframe.contentWindow.document;
|
|
1240
|
-
iframeDocument.open();
|
|
1241
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
|
1242
|
-
iframeDocument.close();
|
|
1243
|
-
return iframeDocument.F;
|
|
1244
|
-
};
|
|
1328
|
+
var returnThis = function () { return this; };
|
|
1245
1329
|
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
// see https://github.com/es-shims/es5-shim/issues/150
|
|
1249
|
-
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
1250
|
-
// avoid IE GC bug
|
|
1251
|
-
var activeXDocument;
|
|
1252
|
-
var NullProtoObject = function () {
|
|
1253
|
-
try {
|
|
1254
|
-
activeXDocument = new ActiveXObject('htmlfile');
|
|
1255
|
-
} catch (error) { /* ignore */ }
|
|
1256
|
-
NullProtoObject = typeof document != 'undefined'
|
|
1257
|
-
? document.domain && activeXDocument
|
|
1258
|
-
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
1259
|
-
: NullProtoObjectViaIFrame()
|
|
1260
|
-
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
1261
|
-
var length = enumBugKeys.length;
|
|
1262
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
1263
|
-
return NullProtoObject();
|
|
1264
|
-
};
|
|
1330
|
+
var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
|
1331
|
+
createIteratorConstructor(IteratorConstructor, NAME, next);
|
|
1265
1332
|
|
|
1266
|
-
|
|
1333
|
+
var getIterationMethod = function (KIND) {
|
|
1334
|
+
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
|
1335
|
+
if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
|
|
1267
1336
|
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
if (O !== null) {
|
|
1274
|
-
EmptyConstructor[PROTOTYPE] = anObject$1(O);
|
|
1275
|
-
result = new EmptyConstructor();
|
|
1276
|
-
EmptyConstructor[PROTOTYPE] = null;
|
|
1277
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
1278
|
-
result[IE_PROTO$1] = O;
|
|
1279
|
-
} else result = NullProtoObject();
|
|
1280
|
-
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1281
|
-
};
|
|
1337
|
+
switch (KIND) {
|
|
1338
|
+
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
|
1339
|
+
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
|
1340
|
+
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
|
1341
|
+
}
|
|
1282
1342
|
|
|
1283
|
-
|
|
1284
|
-
|
|
1343
|
+
return function () { return new IteratorConstructor(this); };
|
|
1344
|
+
};
|
|
1285
1345
|
|
|
1286
|
-
|
|
1287
|
-
var
|
|
1346
|
+
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1347
|
+
var INCORRECT_VALUES_NAME = false;
|
|
1348
|
+
var IterablePrototype = Iterable.prototype;
|
|
1349
|
+
var nativeIterator = IterablePrototype[ITERATOR$4]
|
|
1350
|
+
|| IterablePrototype['@@iterator']
|
|
1351
|
+
|| DEFAULT && IterablePrototype[DEFAULT];
|
|
1352
|
+
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
|
1353
|
+
var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
|
1354
|
+
var CurrentIteratorPrototype, methods, KEY;
|
|
1288
1355
|
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1356
|
+
// fix native
|
|
1357
|
+
if (anyNativeIterator) {
|
|
1358
|
+
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
|
|
1359
|
+
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
|
|
1360
|
+
if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
|
|
1361
|
+
if (setPrototypeOf$1) {
|
|
1362
|
+
setPrototypeOf$1(CurrentIteratorPrototype, IteratorPrototype);
|
|
1363
|
+
} else if (!isCallable$6(CurrentIteratorPrototype[ITERATOR$4])) {
|
|
1364
|
+
defineBuiltIn$2(CurrentIteratorPrototype, ITERATOR$4, returnThis);
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
// Set @@toStringTag to native iterators
|
|
1368
|
+
setToStringTag$2(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1293
1371
|
|
|
1294
|
-
|
|
1295
|
-
|
|
1372
|
+
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
1373
|
+
if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
1374
|
+
if (CONFIGURABLE_FUNCTION_NAME) {
|
|
1375
|
+
createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
|
|
1376
|
+
} else {
|
|
1377
|
+
INCORRECT_VALUES_NAME = true;
|
|
1378
|
+
defaultIterator = function values() { return call$9(nativeIterator, this); };
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1296
1381
|
|
|
1297
|
-
//
|
|
1298
|
-
|
|
1382
|
+
// export additional methods
|
|
1383
|
+
if (DEFAULT) {
|
|
1384
|
+
methods = {
|
|
1385
|
+
values: getIterationMethod(VALUES),
|
|
1386
|
+
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
|
1387
|
+
entries: getIterationMethod(ENTRIES)
|
|
1388
|
+
};
|
|
1389
|
+
if (FORCED) for (KEY in methods) {
|
|
1390
|
+
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1391
|
+
defineBuiltIn$2(IterablePrototype, KEY, methods[KEY]);
|
|
1392
|
+
}
|
|
1393
|
+
} else $$8({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1394
|
+
}
|
|
1299
1395
|
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1396
|
+
// define iterator
|
|
1397
|
+
if (IterablePrototype[ITERATOR$4] !== defaultIterator) {
|
|
1398
|
+
defineBuiltIn$2(IterablePrototype, ITERATOR$4, defaultIterator, { name: DEFAULT });
|
|
1399
|
+
}
|
|
1400
|
+
Iterators$3[NAME] = defaultIterator;
|
|
1305
1401
|
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
var call$2 = functionCall;
|
|
1309
|
-
var uncurryThis$2 = functionUncurryThis;
|
|
1310
|
-
var toString = toString$1;
|
|
1311
|
-
var regexpFlags = regexpFlags$1;
|
|
1312
|
-
var stickyHelpers = regexpStickyHelpers;
|
|
1313
|
-
var shared = shared$4.exports;
|
|
1314
|
-
var create$2 = objectCreate;
|
|
1315
|
-
var getInternalState$1 = internalState.get;
|
|
1316
|
-
var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
|
|
1317
|
-
var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
1402
|
+
return methods;
|
|
1403
|
+
};
|
|
1318
1404
|
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
var
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
var replace = uncurryThis$2(''.replace);
|
|
1325
|
-
var stringSlice = uncurryThis$2(''.slice);
|
|
1405
|
+
// `CreateIterResultObject` abstract operation
|
|
1406
|
+
// https://tc39.es/ecma262/#sec-createiterresultobject
|
|
1407
|
+
var createIterResultObject$1 = function (value, done) {
|
|
1408
|
+
return { value: value, done: done };
|
|
1409
|
+
};
|
|
1326
1410
|
|
|
1327
|
-
var
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1411
|
+
var toIndexedObject = toIndexedObject$5;
|
|
1412
|
+
var addToUnscopables = addToUnscopables$1;
|
|
1413
|
+
var Iterators$2 = iterators;
|
|
1414
|
+
var InternalStateModule$1 = internalState;
|
|
1415
|
+
var defineProperty$2 = objectDefineProperty.f;
|
|
1416
|
+
var defineIterator = iteratorDefine;
|
|
1417
|
+
var createIterResultObject = createIterResultObject$1;
|
|
1418
|
+
var DESCRIPTORS$3 = descriptors;
|
|
1334
1419
|
|
|
1335
|
-
var
|
|
1420
|
+
var ARRAY_ITERATOR = 'Array Iterator';
|
|
1421
|
+
var setInternalState$1 = InternalStateModule$1.set;
|
|
1422
|
+
var getInternalState$1 = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
|
|
1336
1423
|
|
|
1337
|
-
//
|
|
1338
|
-
|
|
1424
|
+
// `Array.prototype.entries` method
|
|
1425
|
+
// https://tc39.es/ecma262/#sec-array.prototype.entries
|
|
1426
|
+
// `Array.prototype.keys` method
|
|
1427
|
+
// https://tc39.es/ecma262/#sec-array.prototype.keys
|
|
1428
|
+
// `Array.prototype.values` method
|
|
1429
|
+
// https://tc39.es/ecma262/#sec-array.prototype.values
|
|
1430
|
+
// `Array.prototype[@@iterator]` method
|
|
1431
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
|
1432
|
+
// `CreateArrayIterator` internal method
|
|
1433
|
+
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
1434
|
+
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
|
1435
|
+
setInternalState$1(this, {
|
|
1436
|
+
type: ARRAY_ITERATOR,
|
|
1437
|
+
target: toIndexedObject(iterated), // target
|
|
1438
|
+
index: 0, // next index
|
|
1439
|
+
kind: kind // kind
|
|
1440
|
+
});
|
|
1441
|
+
// `%ArrayIteratorPrototype%.next` method
|
|
1442
|
+
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
|
|
1443
|
+
}, function () {
|
|
1444
|
+
var state = getInternalState$1(this);
|
|
1445
|
+
var target = state.target;
|
|
1446
|
+
var index = state.index++;
|
|
1447
|
+
if (!target || index >= target.length) {
|
|
1448
|
+
state.target = undefined;
|
|
1449
|
+
return createIterResultObject(undefined, true);
|
|
1450
|
+
}
|
|
1451
|
+
switch (state.kind) {
|
|
1452
|
+
case 'keys': return createIterResultObject(index, false);
|
|
1453
|
+
case 'values': return createIterResultObject(target[index], false);
|
|
1454
|
+
} return createIterResultObject([index, target[index]], false);
|
|
1455
|
+
}, 'values');
|
|
1339
1456
|
|
|
1340
|
-
|
|
1457
|
+
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
1458
|
+
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
1459
|
+
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
1460
|
+
var values = Iterators$2.Arguments = Iterators$2.Array;
|
|
1341
1461
|
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
var str = toString(string);
|
|
1347
|
-
var raw = state.raw;
|
|
1348
|
-
var result, reCopy, lastIndex, match, i, object, group;
|
|
1462
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1463
|
+
addToUnscopables('keys');
|
|
1464
|
+
addToUnscopables('values');
|
|
1465
|
+
addToUnscopables('entries');
|
|
1349
1466
|
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
return result;
|
|
1355
|
-
}
|
|
1467
|
+
// V8 ~ Chrome 45- bug
|
|
1468
|
+
if (DESCRIPTORS$3 && values.name !== 'values') try {
|
|
1469
|
+
defineProperty$2(values, 'name', { value: 'values' });
|
|
1470
|
+
} catch (error) { /* empty */ }
|
|
1356
1471
|
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1472
|
+
// iterable DOM collections
|
|
1473
|
+
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
1474
|
+
var domIterables = {
|
|
1475
|
+
CSSRuleList: 0,
|
|
1476
|
+
CSSStyleDeclaration: 0,
|
|
1477
|
+
CSSValueList: 0,
|
|
1478
|
+
ClientRectList: 0,
|
|
1479
|
+
DOMRectList: 0,
|
|
1480
|
+
DOMStringList: 0,
|
|
1481
|
+
DOMTokenList: 1,
|
|
1482
|
+
DataTransferItemList: 0,
|
|
1483
|
+
FileList: 0,
|
|
1484
|
+
HTMLAllCollection: 0,
|
|
1485
|
+
HTMLCollection: 0,
|
|
1486
|
+
HTMLFormElement: 0,
|
|
1487
|
+
HTMLSelectElement: 0,
|
|
1488
|
+
MediaList: 0,
|
|
1489
|
+
MimeTypeArray: 0,
|
|
1490
|
+
NamedNodeMap: 0,
|
|
1491
|
+
NodeList: 1,
|
|
1492
|
+
PaintRequestList: 0,
|
|
1493
|
+
Plugin: 0,
|
|
1494
|
+
PluginArray: 0,
|
|
1495
|
+
SVGLengthList: 0,
|
|
1496
|
+
SVGNumberList: 0,
|
|
1497
|
+
SVGPathSegList: 0,
|
|
1498
|
+
SVGPointList: 0,
|
|
1499
|
+
SVGStringList: 0,
|
|
1500
|
+
SVGTransformList: 0,
|
|
1501
|
+
SourceBufferList: 0,
|
|
1502
|
+
StyleSheetList: 0,
|
|
1503
|
+
TextTrackCueList: 0,
|
|
1504
|
+
TextTrackList: 0,
|
|
1505
|
+
TouchList: 0
|
|
1506
|
+
};
|
|
1363
1507
|
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
if (indexOf(flags, 'g') === -1) {
|
|
1367
|
-
flags += 'g';
|
|
1368
|
-
}
|
|
1508
|
+
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
|
1509
|
+
var documentCreateElement = documentCreateElement$2;
|
|
1369
1510
|
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
|
|
1373
|
-
source = '(?: ' + source + ')';
|
|
1374
|
-
strCopy = ' ' + strCopy;
|
|
1375
|
-
charsAdded++;
|
|
1376
|
-
}
|
|
1377
|
-
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
|
1378
|
-
// simulate the 'y' flag.
|
|
1379
|
-
reCopy = new RegExp('^(?:' + source + ')', flags);
|
|
1380
|
-
}
|
|
1511
|
+
var classList = documentCreateElement('span').classList;
|
|
1512
|
+
var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
|
|
1381
1513
|
|
|
1382
|
-
|
|
1383
|
-
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
|
1384
|
-
}
|
|
1385
|
-
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
1514
|
+
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
1386
1515
|
|
|
1387
|
-
|
|
1516
|
+
var global$b = global$m;
|
|
1517
|
+
var DOMIterables = domIterables;
|
|
1518
|
+
var DOMTokenListPrototype = domTokenListPrototype;
|
|
1519
|
+
var ArrayIteratorMethods = es_array_iterator;
|
|
1520
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$4;
|
|
1521
|
+
var setToStringTag$1 = setToStringTag$4;
|
|
1522
|
+
var wellKnownSymbol$8 = wellKnownSymbol$e;
|
|
1388
1523
|
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
match.input = stringSlice(match.input, charsAdded);
|
|
1392
|
-
match[0] = stringSlice(match[0], charsAdded);
|
|
1393
|
-
match.index = re.lastIndex;
|
|
1394
|
-
re.lastIndex += match[0].length;
|
|
1395
|
-
} else re.lastIndex = 0;
|
|
1396
|
-
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
|
1397
|
-
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
|
1398
|
-
}
|
|
1399
|
-
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
1400
|
-
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
1401
|
-
// for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
|
|
1402
|
-
call$2(nativeReplace, match[0], reCopy, function () {
|
|
1403
|
-
for (i = 1; i < arguments.length - 2; i++) {
|
|
1404
|
-
if (arguments[i] === undefined) match[i] = undefined;
|
|
1405
|
-
}
|
|
1406
|
-
});
|
|
1407
|
-
}
|
|
1524
|
+
var ITERATOR$3 = wellKnownSymbol$8('iterator');
|
|
1525
|
+
var ArrayValues = ArrayIteratorMethods.values;
|
|
1408
1526
|
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1527
|
+
var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
1528
|
+
if (CollectionPrototype) {
|
|
1529
|
+
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
1530
|
+
if (CollectionPrototype[ITERATOR$3] !== ArrayValues) try {
|
|
1531
|
+
createNonEnumerableProperty(CollectionPrototype, ITERATOR$3, ArrayValues);
|
|
1532
|
+
} catch (error) {
|
|
1533
|
+
CollectionPrototype[ITERATOR$3] = ArrayValues;
|
|
1534
|
+
}
|
|
1535
|
+
setToStringTag$1(CollectionPrototype, COLLECTION_NAME, true);
|
|
1536
|
+
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
|
|
1537
|
+
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
1538
|
+
if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
|
|
1539
|
+
createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
|
|
1540
|
+
} catch (error) {
|
|
1541
|
+
CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
|
|
1414
1542
|
}
|
|
1415
1543
|
}
|
|
1544
|
+
}
|
|
1545
|
+
};
|
|
1416
1546
|
|
|
1417
|
-
|
|
1418
|
-
|
|
1547
|
+
for (var COLLECTION_NAME in DOMIterables) {
|
|
1548
|
+
handlePrototype(global$b[COLLECTION_NAME] && global$b[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
1419
1549
|
}
|
|
1420
1550
|
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
var $$2 = _export;
|
|
1424
|
-
var exec = regexpExec;
|
|
1551
|
+
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
1425
1552
|
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1553
|
+
/******************************************************************************
|
|
1554
|
+
Copyright (c) Microsoft Corporation.
|
|
1555
|
+
|
|
1556
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
1557
|
+
purpose with or without fee is hereby granted.
|
|
1558
|
+
|
|
1559
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1560
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1561
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1562
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1563
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1564
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1565
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
1566
|
+
***************************************************************************** */
|
|
1567
|
+
|
|
1568
|
+
function __decorate(decorators, target, key, desc) {
|
|
1569
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1570
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1571
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1572
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
function __metadata(metadataKey, metadataValue) {
|
|
1576
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1580
|
+
var e = new Error(message);
|
|
1581
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1582
|
+
};
|
|
1431
1583
|
|
|
1432
|
-
const
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
const
|
|
1584
|
+
const ADDRESS_LINE_MAX_LENGTH = 50;
|
|
1585
|
+
const ADDRESS_CITY_MAX_LENGTH = 80;
|
|
1586
|
+
const ADDRESS_STATE_MAX_LENGTH = 30;
|
|
1587
|
+
const ADDRESS_STATE_CODE_MAX_LENGTH = 2;
|
|
1588
|
+
const ADDRESS_ZIP_MAX_LENGTH = 11;
|
|
1589
|
+
const ADDRESS_COUNTRY_MAX_LENGTH = 80;
|
|
1590
|
+
class AbstractUnitedStatesAddressWithoutStateParams {
|
|
1591
|
+
constructor() {
|
|
1592
|
+
this.line1 = void 0;
|
|
1593
|
+
this.line2 = void 0;
|
|
1594
|
+
this.city = void 0;
|
|
1595
|
+
this.zip = void 0;
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(ADDRESS_LINE_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "line1", void 0);
|
|
1599
|
+
__decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsString(), classValidator.MaxLength(ADDRESS_LINE_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "line2", void 0);
|
|
1600
|
+
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(ADDRESS_CITY_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "city", void 0);
|
|
1601
|
+
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.Matches(util.ZIP_CODE_STRING_REGEX), classValidator.MaxLength(ADDRESS_ZIP_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "zip", void 0);
|
|
1437
1602
|
/**
|
|
1438
|
-
*
|
|
1603
|
+
* UnitedStatesAddress that enforces a StateCode for the state value.
|
|
1439
1604
|
*/
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1605
|
+
class UnitedStatesAddressWithStateCodeParams extends AbstractUnitedStatesAddressWithoutStateParams {
|
|
1606
|
+
constructor(...args) {
|
|
1607
|
+
super(...args);
|
|
1608
|
+
this.state = void 0;
|
|
1609
|
+
}
|
|
1443
1610
|
}
|
|
1611
|
+
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.Matches(util.US_STATE_CODE_STRING_REGEX), classValidator.MinLength(ADDRESS_STATE_CODE_MAX_LENGTH), classValidator.MaxLength(ADDRESS_STATE_CODE_MAX_LENGTH), __metadata("design:type", String)], UnitedStatesAddressWithStateCodeParams.prototype, "state", void 0);
|
|
1444
1612
|
/**
|
|
1445
|
-
*
|
|
1613
|
+
* UnitedStatesAddress that enforces a State for the state value.
|
|
1446
1614
|
*/
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
this.t = template.t;
|
|
1452
|
-
this.d = template.d;
|
|
1453
|
-
}
|
|
1615
|
+
class UnitedStatesAddressWithStateStringParams extends AbstractUnitedStatesAddressWithoutStateParams {
|
|
1616
|
+
constructor(...args) {
|
|
1617
|
+
super(...args);
|
|
1618
|
+
this.state = void 0;
|
|
1454
1619
|
}
|
|
1455
1620
|
}
|
|
1456
|
-
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.
|
|
1457
|
-
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(WEBSITE_LINK_ENCODED_DATA_MAX_LENGTH), __metadata("design:type", String)], WebsiteLink.prototype, "d", void 0);
|
|
1458
|
-
|
|
1459
|
-
var wellKnownSymbol$4 = wellKnownSymbol$8;
|
|
1460
|
-
var create$1 = objectCreate;
|
|
1461
|
-
var defineProperty$3 = objectDefineProperty.f;
|
|
1462
|
-
|
|
1463
|
-
var UNSCOPABLES = wellKnownSymbol$4('unscopables');
|
|
1464
|
-
var ArrayPrototype = Array.prototype;
|
|
1465
|
-
|
|
1466
|
-
// Array.prototype[@@unscopables]
|
|
1467
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1468
|
-
if (ArrayPrototype[UNSCOPABLES] === undefined) {
|
|
1469
|
-
defineProperty$3(ArrayPrototype, UNSCOPABLES, {
|
|
1470
|
-
configurable: true,
|
|
1471
|
-
value: create$1(null)
|
|
1472
|
-
});
|
|
1473
|
-
}
|
|
1621
|
+
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(ADDRESS_STATE_MAX_LENGTH), __metadata("design:type", String)], UnitedStatesAddressWithStateStringParams.prototype, "state", void 0);
|
|
1474
1622
|
|
|
1475
|
-
|
|
1476
|
-
var addToUnscopables$1 = function (key) {
|
|
1477
|
-
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
1478
|
-
};
|
|
1623
|
+
var wellKnownSymbol$7 = wellKnownSymbol$e;
|
|
1479
1624
|
|
|
1480
|
-
var
|
|
1625
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$7('toStringTag');
|
|
1626
|
+
var test = {};
|
|
1481
1627
|
|
|
1482
|
-
|
|
1628
|
+
test[TO_STRING_TAG$1] = 'z';
|
|
1483
1629
|
|
|
1484
|
-
var
|
|
1485
|
-
function F() { /* empty */ }
|
|
1486
|
-
F.prototype.constructor = null;
|
|
1487
|
-
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
1488
|
-
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
1489
|
-
});
|
|
1630
|
+
var toStringTagSupport = String(test) === '[object z]';
|
|
1490
1631
|
|
|
1491
|
-
var
|
|
1492
|
-
var isCallable$
|
|
1493
|
-
var
|
|
1494
|
-
var
|
|
1495
|
-
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1632
|
+
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1633
|
+
var isCallable$5 = isCallable$j;
|
|
1634
|
+
var classofRaw$1 = classofRaw$2;
|
|
1635
|
+
var wellKnownSymbol$6 = wellKnownSymbol$e;
|
|
1496
1636
|
|
|
1497
|
-
var
|
|
1637
|
+
var TO_STRING_TAG = wellKnownSymbol$6('toStringTag');
|
|
1498
1638
|
var $Object = Object;
|
|
1499
|
-
var ObjectPrototype = $Object.prototype;
|
|
1500
|
-
|
|
1501
|
-
// `Object.getPrototypeOf` method
|
|
1502
|
-
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1503
|
-
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
1504
|
-
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
|
1505
|
-
var object = toObject$1(O);
|
|
1506
|
-
if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
|
|
1507
|
-
var constructor = object.constructor;
|
|
1508
|
-
if (isCallable$2(constructor) && object instanceof constructor) {
|
|
1509
|
-
return constructor.prototype;
|
|
1510
|
-
} return object instanceof $Object ? ObjectPrototype : null;
|
|
1511
|
-
};
|
|
1512
|
-
|
|
1513
|
-
var fails$1 = fails$e;
|
|
1514
|
-
var isCallable$1 = isCallable$e;
|
|
1515
|
-
var isObject$1 = isObject$7;
|
|
1516
|
-
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1517
|
-
var defineBuiltIn$1 = defineBuiltIn$3;
|
|
1518
|
-
var wellKnownSymbol$3 = wellKnownSymbol$8;
|
|
1519
|
-
|
|
1520
|
-
var ITERATOR$2 = wellKnownSymbol$3('iterator');
|
|
1521
|
-
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
1522
|
-
|
|
1523
|
-
// `%IteratorPrototype%` object
|
|
1524
|
-
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
1525
|
-
var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
1526
|
-
|
|
1527
|
-
/* eslint-disable es/no-array-prototype-keys -- safe */
|
|
1528
|
-
if ([].keys) {
|
|
1529
|
-
arrayIterator = [].keys();
|
|
1530
|
-
// Safari 8 has buggy iterators w/o `next`
|
|
1531
|
-
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
|
|
1532
|
-
else {
|
|
1533
|
-
PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
|
|
1534
|
-
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
1639
|
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
// FF44- legacy iterators case
|
|
1541
|
-
return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
|
|
1542
|
-
});
|
|
1543
|
-
|
|
1544
|
-
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
|
|
1545
|
-
|
|
1546
|
-
// `%IteratorPrototype%[@@iterator]()` method
|
|
1547
|
-
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1548
|
-
if (!isCallable$1(IteratorPrototype$2[ITERATOR$2])) {
|
|
1549
|
-
defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
|
|
1550
|
-
return this;
|
|
1551
|
-
});
|
|
1552
|
-
}
|
|
1640
|
+
// ES3 wrong here
|
|
1641
|
+
var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
|
|
1553
1642
|
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1643
|
+
// fallback for IE11 Script Access Denied error
|
|
1644
|
+
var tryGet = function (it, key) {
|
|
1645
|
+
try {
|
|
1646
|
+
return it[key];
|
|
1647
|
+
} catch (error) { /* empty */ }
|
|
1557
1648
|
};
|
|
1558
1649
|
|
|
1559
|
-
|
|
1560
|
-
var
|
|
1561
|
-
var
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
}
|
|
1650
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
|
1651
|
+
var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
|
|
1652
|
+
var O, tag, result;
|
|
1653
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1654
|
+
// @@toStringTag case
|
|
1655
|
+
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
|
|
1656
|
+
// builtinTag case
|
|
1657
|
+
: CORRECT_ARGUMENTS ? classofRaw$1(O)
|
|
1658
|
+
// ES3 arguments fallback
|
|
1659
|
+
: (result = classofRaw$1(O)) === 'Object' && isCallable$5(O.callee) ? 'Arguments' : result;
|
|
1570
1660
|
};
|
|
1571
1661
|
|
|
1572
|
-
var
|
|
1573
|
-
var create = objectCreate;
|
|
1574
|
-
var createPropertyDescriptor = createPropertyDescriptor$3;
|
|
1575
|
-
var setToStringTag$2 = setToStringTag$3;
|
|
1576
|
-
var Iterators$2 = iterators;
|
|
1577
|
-
|
|
1578
|
-
var returnThis$1 = function () { return this; };
|
|
1579
|
-
|
|
1580
|
-
var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
1581
|
-
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1582
|
-
IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
|
|
1583
|
-
setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
|
|
1584
|
-
Iterators$2[TO_STRING_TAG] = returnThis$1;
|
|
1585
|
-
return IteratorConstructor;
|
|
1586
|
-
};
|
|
1662
|
+
var classof$3 = classof$4;
|
|
1587
1663
|
|
|
1588
|
-
var
|
|
1589
|
-
var aCallable = aCallable$2;
|
|
1664
|
+
var $String = String;
|
|
1590
1665
|
|
|
1591
|
-
var
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
return uncurryThis$1(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
1595
|
-
} catch (error) { /* empty */ }
|
|
1666
|
+
var toString$1 = function (argument) {
|
|
1667
|
+
if (classof$3(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
|
|
1668
|
+
return $String(argument);
|
|
1596
1669
|
};
|
|
1597
1670
|
|
|
1598
|
-
var
|
|
1671
|
+
var anObject$5 = anObject$b;
|
|
1599
1672
|
|
|
1600
|
-
|
|
1601
|
-
|
|
1673
|
+
// `RegExp.prototype.flags` getter implementation
|
|
1674
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
1675
|
+
var regexpFlags$1 = function () {
|
|
1676
|
+
var that = anObject$5(this);
|
|
1677
|
+
var result = '';
|
|
1678
|
+
if (that.hasIndices) result += 'd';
|
|
1679
|
+
if (that.global) result += 'g';
|
|
1680
|
+
if (that.ignoreCase) result += 'i';
|
|
1681
|
+
if (that.multiline) result += 'm';
|
|
1682
|
+
if (that.dotAll) result += 's';
|
|
1683
|
+
if (that.unicode) result += 'u';
|
|
1684
|
+
if (that.unicodeSets) result += 'v';
|
|
1685
|
+
if (that.sticky) result += 'y';
|
|
1686
|
+
return result;
|
|
1602
1687
|
};
|
|
1603
1688
|
|
|
1604
|
-
var
|
|
1689
|
+
var fails$5 = fails$g;
|
|
1690
|
+
var global$a = global$m;
|
|
1605
1691
|
|
|
1606
|
-
|
|
1607
|
-
var $
|
|
1692
|
+
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
1693
|
+
var $RegExp$2 = global$a.RegExp;
|
|
1608
1694
|
|
|
1609
|
-
var
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1695
|
+
var UNSUPPORTED_Y$1 = fails$5(function () {
|
|
1696
|
+
var re = $RegExp$2('a', 'y');
|
|
1697
|
+
re.lastIndex = 2;
|
|
1698
|
+
return re.exec('abcd') !== null;
|
|
1699
|
+
});
|
|
1613
1700
|
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
var
|
|
1617
|
-
|
|
1701
|
+
// UC Browser bug
|
|
1702
|
+
// https://github.com/zloirock/core-js/issues/1008
|
|
1703
|
+
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$5(function () {
|
|
1704
|
+
return !$RegExp$2('a', 'y').sticky;
|
|
1705
|
+
});
|
|
1618
1706
|
|
|
1619
|
-
|
|
1620
|
-
// https://
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
var test = {};
|
|
1626
|
-
var setter;
|
|
1627
|
-
try {
|
|
1628
|
-
setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
|
|
1629
|
-
setter(test, []);
|
|
1630
|
-
CORRECT_SETTER = test instanceof Array;
|
|
1631
|
-
} catch (error) { /* empty */ }
|
|
1632
|
-
return function setPrototypeOf(O, proto) {
|
|
1633
|
-
anObject(O);
|
|
1634
|
-
aPossiblePrototype(proto);
|
|
1635
|
-
if (CORRECT_SETTER) setter(O, proto);
|
|
1636
|
-
else O.__proto__ = proto;
|
|
1637
|
-
return O;
|
|
1638
|
-
};
|
|
1639
|
-
}() : undefined);
|
|
1707
|
+
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$5(function () {
|
|
1708
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
1709
|
+
var re = $RegExp$2('^r', 'gy');
|
|
1710
|
+
re.lastIndex = 2;
|
|
1711
|
+
return re.exec('str') !== null;
|
|
1712
|
+
});
|
|
1640
1713
|
|
|
1641
|
-
var
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
var getPrototypeOf = objectGetPrototypeOf;
|
|
1647
|
-
var setPrototypeOf = objectSetPrototypeOf;
|
|
1648
|
-
var setToStringTag$1 = setToStringTag$3;
|
|
1649
|
-
var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
|
|
1650
|
-
var defineBuiltIn = defineBuiltIn$3;
|
|
1651
|
-
var wellKnownSymbol$1 = wellKnownSymbol$8;
|
|
1652
|
-
var Iterators$1 = iterators;
|
|
1653
|
-
var IteratorsCore = iteratorsCore;
|
|
1714
|
+
var regexpStickyHelpers = {
|
|
1715
|
+
BROKEN_CARET: BROKEN_CARET,
|
|
1716
|
+
MISSED_STICKY: MISSED_STICKY,
|
|
1717
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y$1
|
|
1718
|
+
};
|
|
1654
1719
|
|
|
1655
|
-
var
|
|
1656
|
-
var
|
|
1657
|
-
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
1658
|
-
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
1659
|
-
var ITERATOR$1 = wellKnownSymbol$1('iterator');
|
|
1660
|
-
var KEYS = 'keys';
|
|
1661
|
-
var VALUES = 'values';
|
|
1662
|
-
var ENTRIES = 'entries';
|
|
1720
|
+
var fails$4 = fails$g;
|
|
1721
|
+
var global$9 = global$m;
|
|
1663
1722
|
|
|
1664
|
-
|
|
1723
|
+
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
1724
|
+
var $RegExp$1 = global$9.RegExp;
|
|
1665
1725
|
|
|
1666
|
-
var
|
|
1667
|
-
|
|
1726
|
+
var regexpUnsupportedDotAll = fails$4(function () {
|
|
1727
|
+
var re = $RegExp$1('.', 's');
|
|
1728
|
+
return !(re.dotAll && re.test('\n') && re.flags === 's');
|
|
1729
|
+
});
|
|
1668
1730
|
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
|
|
1731
|
+
var fails$3 = fails$g;
|
|
1732
|
+
var global$8 = global$m;
|
|
1672
1733
|
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
|
1676
|
-
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
|
1677
|
-
}
|
|
1734
|
+
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
1735
|
+
var $RegExp = global$8.RegExp;
|
|
1678
1736
|
|
|
1679
|
-
|
|
1680
|
-
|
|
1737
|
+
var regexpUnsupportedNcg = fails$3(function () {
|
|
1738
|
+
var re = $RegExp('(?<a>b)', 'g');
|
|
1739
|
+
return re.exec('b').groups.a !== 'b' ||
|
|
1740
|
+
'b'.replace(re, '$<a>c') !== 'bc';
|
|
1741
|
+
});
|
|
1681
1742
|
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1743
|
+
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
1744
|
+
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
1745
|
+
var call$8 = functionCall;
|
|
1746
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
1747
|
+
var toString = toString$1;
|
|
1748
|
+
var regexpFlags = regexpFlags$1;
|
|
1749
|
+
var stickyHelpers = regexpStickyHelpers;
|
|
1750
|
+
var shared = shared$4.exports;
|
|
1751
|
+
var create = objectCreate;
|
|
1752
|
+
var getInternalState = internalState.get;
|
|
1753
|
+
var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
|
|
1754
|
+
var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
1691
1755
|
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
} else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
|
|
1700
|
-
defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
// Set @@toStringTag to native iterators
|
|
1704
|
-
setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
|
1705
|
-
}
|
|
1706
|
-
}
|
|
1756
|
+
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
1757
|
+
var nativeExec = RegExp.prototype.exec;
|
|
1758
|
+
var patchedExec = nativeExec;
|
|
1759
|
+
var charAt = uncurryThis$5(''.charAt);
|
|
1760
|
+
var indexOf = uncurryThis$5(''.indexOf);
|
|
1761
|
+
var replace = uncurryThis$5(''.replace);
|
|
1762
|
+
var stringSlice = uncurryThis$5(''.slice);
|
|
1707
1763
|
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
}
|
|
1716
|
-
}
|
|
1764
|
+
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
1765
|
+
var re1 = /a/;
|
|
1766
|
+
var re2 = /b*/g;
|
|
1767
|
+
call$8(nativeExec, re1, 'a');
|
|
1768
|
+
call$8(nativeExec, re2, 'a');
|
|
1769
|
+
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
1770
|
+
})();
|
|
1717
1771
|
|
|
1718
|
-
|
|
1719
|
-
if (DEFAULT) {
|
|
1720
|
-
methods = {
|
|
1721
|
-
values: getIterationMethod(VALUES),
|
|
1722
|
-
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
|
1723
|
-
entries: getIterationMethod(ENTRIES)
|
|
1724
|
-
};
|
|
1725
|
-
if (FORCED) for (KEY in methods) {
|
|
1726
|
-
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1727
|
-
defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
|
|
1728
|
-
}
|
|
1729
|
-
} else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1730
|
-
}
|
|
1772
|
+
var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
|
|
1731
1773
|
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
|
|
1735
|
-
}
|
|
1736
|
-
Iterators$1[NAME] = defaultIterator;
|
|
1774
|
+
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
|
1775
|
+
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
|
1737
1776
|
|
|
1738
|
-
|
|
1739
|
-
};
|
|
1777
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
|
|
1740
1778
|
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
var
|
|
1744
|
-
|
|
1745
|
-
|
|
1779
|
+
if (PATCH) {
|
|
1780
|
+
patchedExec = function exec(string) {
|
|
1781
|
+
var re = this;
|
|
1782
|
+
var state = getInternalState(re);
|
|
1783
|
+
var str = toString(string);
|
|
1784
|
+
var raw = state.raw;
|
|
1785
|
+
var result, reCopy, lastIndex, match, i, object, group;
|
|
1746
1786
|
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
var createIterResultObject = createIterResultObject$1;
|
|
1754
|
-
var DESCRIPTORS$1 = descriptors;
|
|
1787
|
+
if (raw) {
|
|
1788
|
+
raw.lastIndex = re.lastIndex;
|
|
1789
|
+
result = call$8(patchedExec, raw, str);
|
|
1790
|
+
re.lastIndex = raw.lastIndex;
|
|
1791
|
+
return result;
|
|
1792
|
+
}
|
|
1755
1793
|
|
|
1756
|
-
var
|
|
1757
|
-
var
|
|
1758
|
-
var
|
|
1794
|
+
var groups = state.groups;
|
|
1795
|
+
var sticky = UNSUPPORTED_Y && re.sticky;
|
|
1796
|
+
var flags = call$8(regexpFlags, re);
|
|
1797
|
+
var source = re.source;
|
|
1798
|
+
var charsAdded = 0;
|
|
1799
|
+
var strCopy = str;
|
|
1759
1800
|
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
// https://tc39.es/ecma262/#sec-array.prototype.values
|
|
1766
|
-
// `Array.prototype[@@iterator]` method
|
|
1767
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
|
1768
|
-
// `CreateArrayIterator` internal method
|
|
1769
|
-
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
1770
|
-
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
|
1771
|
-
setInternalState(this, {
|
|
1772
|
-
type: ARRAY_ITERATOR,
|
|
1773
|
-
target: toIndexedObject(iterated), // target
|
|
1774
|
-
index: 0, // next index
|
|
1775
|
-
kind: kind // kind
|
|
1776
|
-
});
|
|
1777
|
-
// `%ArrayIteratorPrototype%.next` method
|
|
1778
|
-
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
|
|
1779
|
-
}, function () {
|
|
1780
|
-
var state = getInternalState(this);
|
|
1781
|
-
var target = state.target;
|
|
1782
|
-
var index = state.index++;
|
|
1783
|
-
if (!target || index >= target.length) {
|
|
1784
|
-
state.target = undefined;
|
|
1785
|
-
return createIterResultObject(undefined, true);
|
|
1786
|
-
}
|
|
1787
|
-
switch (state.kind) {
|
|
1788
|
-
case 'keys': return createIterResultObject(index, false);
|
|
1789
|
-
case 'values': return createIterResultObject(target[index], false);
|
|
1790
|
-
} return createIterResultObject([index, target[index]], false);
|
|
1791
|
-
}, 'values');
|
|
1801
|
+
if (sticky) {
|
|
1802
|
+
flags = replace(flags, 'y', '');
|
|
1803
|
+
if (indexOf(flags, 'g') === -1) {
|
|
1804
|
+
flags += 'g';
|
|
1805
|
+
}
|
|
1792
1806
|
|
|
1793
|
-
|
|
1794
|
-
//
|
|
1795
|
-
|
|
1796
|
-
|
|
1807
|
+
strCopy = stringSlice(str, re.lastIndex);
|
|
1808
|
+
// Support anchored sticky behavior.
|
|
1809
|
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
|
|
1810
|
+
source = '(?: ' + source + ')';
|
|
1811
|
+
strCopy = ' ' + strCopy;
|
|
1812
|
+
charsAdded++;
|
|
1813
|
+
}
|
|
1814
|
+
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
|
1815
|
+
// simulate the 'y' flag.
|
|
1816
|
+
reCopy = new RegExp('^(?:' + source + ')', flags);
|
|
1817
|
+
}
|
|
1797
1818
|
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1819
|
+
if (NPCG_INCLUDED) {
|
|
1820
|
+
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
|
1821
|
+
}
|
|
1822
|
+
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
1802
1823
|
|
|
1803
|
-
|
|
1804
|
-
if (DESCRIPTORS$1 && values.name !== 'values') try {
|
|
1805
|
-
defineProperty$1(values, 'name', { value: 'values' });
|
|
1806
|
-
} catch (error) { /* empty */ }
|
|
1824
|
+
match = call$8(nativeExec, sticky ? reCopy : re, strCopy);
|
|
1807
1825
|
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
NodeList: 1,
|
|
1828
|
-
PaintRequestList: 0,
|
|
1829
|
-
Plugin: 0,
|
|
1830
|
-
PluginArray: 0,
|
|
1831
|
-
SVGLengthList: 0,
|
|
1832
|
-
SVGNumberList: 0,
|
|
1833
|
-
SVGPathSegList: 0,
|
|
1834
|
-
SVGPointList: 0,
|
|
1835
|
-
SVGStringList: 0,
|
|
1836
|
-
SVGTransformList: 0,
|
|
1837
|
-
SourceBufferList: 0,
|
|
1838
|
-
StyleSheetList: 0,
|
|
1839
|
-
TextTrackCueList: 0,
|
|
1840
|
-
TextTrackList: 0,
|
|
1841
|
-
TouchList: 0
|
|
1842
|
-
};
|
|
1826
|
+
if (sticky) {
|
|
1827
|
+
if (match) {
|
|
1828
|
+
match.input = stringSlice(match.input, charsAdded);
|
|
1829
|
+
match[0] = stringSlice(match[0], charsAdded);
|
|
1830
|
+
match.index = re.lastIndex;
|
|
1831
|
+
re.lastIndex += match[0].length;
|
|
1832
|
+
} else re.lastIndex = 0;
|
|
1833
|
+
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
|
1834
|
+
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
|
1835
|
+
}
|
|
1836
|
+
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
1837
|
+
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
1838
|
+
// for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
|
|
1839
|
+
call$8(nativeReplace, match[0], reCopy, function () {
|
|
1840
|
+
for (i = 1; i < arguments.length - 2; i++) {
|
|
1841
|
+
if (arguments[i] === undefined) match[i] = undefined;
|
|
1842
|
+
}
|
|
1843
|
+
});
|
|
1844
|
+
}
|
|
1843
1845
|
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
+
if (match && groups) {
|
|
1847
|
+
match.groups = object = create(null);
|
|
1848
|
+
for (i = 0; i < groups.length; i++) {
|
|
1849
|
+
group = groups[i];
|
|
1850
|
+
object[group[0]] = match[group[1]];
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1846
1853
|
|
|
1847
|
-
|
|
1848
|
-
|
|
1854
|
+
return match;
|
|
1855
|
+
};
|
|
1856
|
+
}
|
|
1849
1857
|
|
|
1850
|
-
var
|
|
1858
|
+
var regexpExec = patchedExec;
|
|
1851
1859
|
|
|
1852
|
-
var
|
|
1853
|
-
var
|
|
1854
|
-
var DOMTokenListPrototype = domTokenListPrototype;
|
|
1855
|
-
var ArrayIteratorMethods = es_array_iterator;
|
|
1856
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$4;
|
|
1857
|
-
var setToStringTag = setToStringTag$3;
|
|
1858
|
-
var wellKnownSymbol = wellKnownSymbol$8;
|
|
1860
|
+
var $$7 = _export;
|
|
1861
|
+
var exec$1 = regexpExec;
|
|
1859
1862
|
|
|
1860
|
-
|
|
1861
|
-
|
|
1863
|
+
// `RegExp.prototype.exec` method
|
|
1864
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
1865
|
+
$$7({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, {
|
|
1866
|
+
exec: exec$1
|
|
1867
|
+
});
|
|
1862
1868
|
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1869
|
+
const UNKNOWN_WEBSITE_LINK_TYPE = 'u';
|
|
1870
|
+
/**
|
|
1871
|
+
* Max length of WebsiteLink's data type.
|
|
1872
|
+
*/
|
|
1873
|
+
const WEBSITE_LINK_TYPE_MAX_LENGTH = 32;
|
|
1874
|
+
/**
|
|
1875
|
+
* Alpha-numeric type between 1 and 32 characters only allowed.
|
|
1876
|
+
*/
|
|
1877
|
+
const WEBSITE_LINK_TYPE_REGEX = /^[a-zA-Z0-9]{1,32}$/;
|
|
1878
|
+
function isValidWebsiteLinkType(input) {
|
|
1879
|
+
return WEBSITE_LINK_TYPE_REGEX.test(input);
|
|
1880
|
+
}
|
|
1881
|
+
/**
|
|
1882
|
+
* Default max length of WebsiteLink's data string.
|
|
1883
|
+
*/
|
|
1884
|
+
const WEBSITE_LINK_ENCODED_DATA_MAX_LENGTH = 1000;
|
|
1885
|
+
class WebsiteLink {
|
|
1886
|
+
constructor(template) {
|
|
1887
|
+
this.t = void 0;
|
|
1888
|
+
this.d = void 0;
|
|
1889
|
+
if (template != null) {
|
|
1890
|
+
this.t = template.t;
|
|
1891
|
+
this.d = template.d;
|
|
1879
1892
|
}
|
|
1880
1893
|
}
|
|
1881
|
-
};
|
|
1882
|
-
|
|
1883
|
-
for (var COLLECTION_NAME in DOMIterables) {
|
|
1884
|
-
handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
1885
1894
|
}
|
|
1886
|
-
|
|
1887
|
-
|
|
1895
|
+
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.Matches(WEBSITE_LINK_TYPE_REGEX), classValidator.MaxLength(WEBSITE_LINK_TYPE_MAX_LENGTH), __metadata("design:type", String)], WebsiteLink.prototype, "t", void 0);
|
|
1896
|
+
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(WEBSITE_LINK_ENCODED_DATA_MAX_LENGTH), __metadata("design:type", String)], WebsiteLink.prototype, "d", void 0);
|
|
1888
1897
|
|
|
1889
1898
|
/**
|
|
1890
1899
|
* Max length of WebsiteLink's data type.
|
|
@@ -1913,6 +1922,10 @@ const WEBSITE_FILE_LINK_DATA_MAX_LENGTH = WEBSITE_LINK_ENCODED_DATA_MAX_LENGTH -
|
|
|
1913
1922
|
const WEBSITE_FILE_LINK_DATA_REGEX = /^[^|]+$/;
|
|
1914
1923
|
class WebsiteFileLink {
|
|
1915
1924
|
constructor(template) {
|
|
1925
|
+
this.type = void 0;
|
|
1926
|
+
this.mime = void 0;
|
|
1927
|
+
this.name = void 0;
|
|
1928
|
+
this.data = void 0;
|
|
1916
1929
|
if (template != null) {
|
|
1917
1930
|
this.type = template.type;
|
|
1918
1931
|
this.mime = template.mime;
|
|
@@ -2191,6 +2204,7 @@ function grantedRoleMapReader(map) {
|
|
|
2191
2204
|
}
|
|
2192
2205
|
class GrantedRoleMapReaderInstance {
|
|
2193
2206
|
constructor(_map) {
|
|
2207
|
+
this._map = void 0;
|
|
2194
2208
|
this._map = _map;
|
|
2195
2209
|
}
|
|
2196
2210
|
hasNoAccess() {
|
|
@@ -2204,53 +2218,1163 @@ class GrantedRoleMapReaderInstance {
|
|
|
2204
2218
|
result[role] = value;
|
|
2205
2219
|
}
|
|
2206
2220
|
}
|
|
2207
|
-
});
|
|
2208
|
-
return result;
|
|
2209
|
-
}
|
|
2210
|
-
hasRole(role) {
|
|
2211
|
-
return this.hasRoles('any', role);
|
|
2221
|
+
});
|
|
2222
|
+
return result;
|
|
2223
|
+
}
|
|
2224
|
+
hasRole(role) {
|
|
2225
|
+
return this.hasRoles('any', role);
|
|
2226
|
+
}
|
|
2227
|
+
hasRoles(setIncludes, inputRoles) {
|
|
2228
|
+
if (this._map[FULL_ACCESS_ROLE_KEY]) {
|
|
2229
|
+
return true;
|
|
2230
|
+
} else {
|
|
2231
|
+
return this.containsRoles(setIncludes, inputRoles);
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
containsRoles(setIncludes, inputRoles) {
|
|
2235
|
+
const roles = util.iterableToArray(inputRoles);
|
|
2236
|
+
if (setIncludes === 'any') {
|
|
2237
|
+
return this.containsAnyRole(roles);
|
|
2238
|
+
} else {
|
|
2239
|
+
return this.containsEachRole(roles);
|
|
2240
|
+
}
|
|
2241
|
+
}
|
|
2242
|
+
containsAnyRole(roles) {
|
|
2243
|
+
for (const role of roles) {
|
|
2244
|
+
if (this._map[role]) {
|
|
2245
|
+
return true;
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
return false;
|
|
2249
|
+
}
|
|
2250
|
+
containsEachRole(roles) {
|
|
2251
|
+
for (const role of roles) {
|
|
2252
|
+
if (!this._map[role]) {
|
|
2253
|
+
return false;
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
return true;
|
|
2257
|
+
}
|
|
2258
|
+
}
|
|
2259
|
+
/**
|
|
2260
|
+
* Converts the input array of roles to a GrantedRoleKeysMap.
|
|
2261
|
+
*
|
|
2262
|
+
* @param roles
|
|
2263
|
+
* @returns
|
|
2264
|
+
*/
|
|
2265
|
+
function grantedRoleKeysMapFromArray(roles, value = true) {
|
|
2266
|
+
return util.arrayToObject(roles, x => x, () => value);
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2269
|
+
var global$7 = global$m;
|
|
2270
|
+
var classof$2 = classofRaw$2;
|
|
2271
|
+
|
|
2272
|
+
var engineIsNode = classof$2(global$7.process) === 'process';
|
|
2273
|
+
|
|
2274
|
+
var makeBuiltIn = makeBuiltIn$3.exports;
|
|
2275
|
+
var defineProperty$1 = objectDefineProperty;
|
|
2276
|
+
|
|
2277
|
+
var defineBuiltInAccessor$1 = function (target, name, descriptor) {
|
|
2278
|
+
if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
|
|
2279
|
+
if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
|
|
2280
|
+
return defineProperty$1.f(target, name, descriptor);
|
|
2281
|
+
};
|
|
2282
|
+
|
|
2283
|
+
var getBuiltIn$3 = getBuiltIn$7;
|
|
2284
|
+
var defineBuiltInAccessor = defineBuiltInAccessor$1;
|
|
2285
|
+
var wellKnownSymbol$5 = wellKnownSymbol$e;
|
|
2286
|
+
var DESCRIPTORS$2 = descriptors;
|
|
2287
|
+
|
|
2288
|
+
var SPECIES$2 = wellKnownSymbol$5('species');
|
|
2289
|
+
|
|
2290
|
+
var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
2291
|
+
var Constructor = getBuiltIn$3(CONSTRUCTOR_NAME);
|
|
2292
|
+
|
|
2293
|
+
if (DESCRIPTORS$2 && Constructor && !Constructor[SPECIES$2]) {
|
|
2294
|
+
defineBuiltInAccessor(Constructor, SPECIES$2, {
|
|
2295
|
+
configurable: true,
|
|
2296
|
+
get: function () { return this; }
|
|
2297
|
+
});
|
|
2298
|
+
}
|
|
2299
|
+
};
|
|
2300
|
+
|
|
2301
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
2302
|
+
|
|
2303
|
+
var $TypeError$5 = TypeError;
|
|
2304
|
+
|
|
2305
|
+
var anInstance$1 = function (it, Prototype) {
|
|
2306
|
+
if (isPrototypeOf$1(Prototype, it)) return it;
|
|
2307
|
+
throw new $TypeError$5('Incorrect invocation');
|
|
2308
|
+
};
|
|
2309
|
+
|
|
2310
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
2311
|
+
var fails$2 = fails$g;
|
|
2312
|
+
var isCallable$4 = isCallable$j;
|
|
2313
|
+
var classof$1 = classof$4;
|
|
2314
|
+
var getBuiltIn$2 = getBuiltIn$7;
|
|
2315
|
+
var inspectSource$1 = inspectSource$3;
|
|
2316
|
+
|
|
2317
|
+
var noop = function () { /* empty */ };
|
|
2318
|
+
var construct = getBuiltIn$2('Reflect', 'construct');
|
|
2319
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
2320
|
+
var exec = uncurryThis$4(constructorRegExp.exec);
|
|
2321
|
+
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
|
|
2322
|
+
|
|
2323
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
2324
|
+
if (!isCallable$4(argument)) return false;
|
|
2325
|
+
try {
|
|
2326
|
+
construct(noop, [], argument);
|
|
2327
|
+
return true;
|
|
2328
|
+
} catch (error) {
|
|
2329
|
+
return false;
|
|
2330
|
+
}
|
|
2331
|
+
};
|
|
2332
|
+
|
|
2333
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
2334
|
+
if (!isCallable$4(argument)) return false;
|
|
2335
|
+
switch (classof$1(argument)) {
|
|
2336
|
+
case 'AsyncFunction':
|
|
2337
|
+
case 'GeneratorFunction':
|
|
2338
|
+
case 'AsyncGeneratorFunction': return false;
|
|
2339
|
+
}
|
|
2340
|
+
try {
|
|
2341
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
|
2342
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
2343
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
2344
|
+
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource$1(argument));
|
|
2345
|
+
} catch (error) {
|
|
2346
|
+
return true;
|
|
2347
|
+
}
|
|
2348
|
+
};
|
|
2349
|
+
|
|
2350
|
+
isConstructorLegacy.sham = true;
|
|
2351
|
+
|
|
2352
|
+
// `IsConstructor` abstract operation
|
|
2353
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
|
2354
|
+
var isConstructor$1 = !construct || fails$2(function () {
|
|
2355
|
+
var called;
|
|
2356
|
+
return isConstructorModern(isConstructorModern.call)
|
|
2357
|
+
|| !isConstructorModern(Object)
|
|
2358
|
+
|| !isConstructorModern(function () { called = true; })
|
|
2359
|
+
|| called;
|
|
2360
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
|
2361
|
+
|
|
2362
|
+
var isConstructor = isConstructor$1;
|
|
2363
|
+
var tryToString$2 = tryToString$4;
|
|
2364
|
+
|
|
2365
|
+
var $TypeError$4 = TypeError;
|
|
2366
|
+
|
|
2367
|
+
// `Assert: IsConstructor(argument) is true`
|
|
2368
|
+
var aConstructor$1 = function (argument) {
|
|
2369
|
+
if (isConstructor(argument)) return argument;
|
|
2370
|
+
throw new $TypeError$4(tryToString$2(argument) + ' is not a constructor');
|
|
2371
|
+
};
|
|
2372
|
+
|
|
2373
|
+
var anObject$4 = anObject$b;
|
|
2374
|
+
var aConstructor = aConstructor$1;
|
|
2375
|
+
var isNullOrUndefined$1 = isNullOrUndefined$4;
|
|
2376
|
+
var wellKnownSymbol$4 = wellKnownSymbol$e;
|
|
2377
|
+
|
|
2378
|
+
var SPECIES$1 = wellKnownSymbol$4('species');
|
|
2379
|
+
|
|
2380
|
+
// `SpeciesConstructor` abstract operation
|
|
2381
|
+
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
2382
|
+
var speciesConstructor$1 = function (O, defaultConstructor) {
|
|
2383
|
+
var C = anObject$4(O).constructor;
|
|
2384
|
+
var S;
|
|
2385
|
+
return C === undefined || isNullOrUndefined$1(S = anObject$4(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
|
|
2386
|
+
};
|
|
2387
|
+
|
|
2388
|
+
var NATIVE_BIND$1 = functionBindNative;
|
|
2389
|
+
|
|
2390
|
+
var FunctionPrototype = Function.prototype;
|
|
2391
|
+
var apply$1 = FunctionPrototype.apply;
|
|
2392
|
+
var call$7 = FunctionPrototype.call;
|
|
2393
|
+
|
|
2394
|
+
// eslint-disable-next-line es/no-reflect -- safe
|
|
2395
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$7.bind(apply$1) : function () {
|
|
2396
|
+
return call$7.apply(apply$1, arguments);
|
|
2397
|
+
});
|
|
2398
|
+
|
|
2399
|
+
var classofRaw = classofRaw$2;
|
|
2400
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
2401
|
+
|
|
2402
|
+
var functionUncurryThisClause = function (fn) {
|
|
2403
|
+
// Nashorn bug:
|
|
2404
|
+
// https://github.com/zloirock/core-js/issues/1128
|
|
2405
|
+
// https://github.com/zloirock/core-js/issues/1130
|
|
2406
|
+
if (classofRaw(fn) === 'Function') return uncurryThis$3(fn);
|
|
2407
|
+
};
|
|
2408
|
+
|
|
2409
|
+
var uncurryThis$2 = functionUncurryThisClause;
|
|
2410
|
+
var aCallable$5 = aCallable$8;
|
|
2411
|
+
var NATIVE_BIND = functionBindNative;
|
|
2412
|
+
|
|
2413
|
+
var bind$4 = uncurryThis$2(uncurryThis$2.bind);
|
|
2414
|
+
|
|
2415
|
+
// optional / simple context binding
|
|
2416
|
+
var functionBindContext = function (fn, that) {
|
|
2417
|
+
aCallable$5(fn);
|
|
2418
|
+
return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
|
|
2419
|
+
return fn.apply(that, arguments);
|
|
2420
|
+
};
|
|
2421
|
+
};
|
|
2422
|
+
|
|
2423
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
2424
|
+
|
|
2425
|
+
var arraySlice$1 = uncurryThis$1([].slice);
|
|
2426
|
+
|
|
2427
|
+
var $TypeError$3 = TypeError;
|
|
2428
|
+
|
|
2429
|
+
var validateArgumentsLength$1 = function (passed, required) {
|
|
2430
|
+
if (passed < required) throw new $TypeError$3('Not enough arguments');
|
|
2431
|
+
return passed;
|
|
2432
|
+
};
|
|
2433
|
+
|
|
2434
|
+
var userAgent$2 = engineUserAgent;
|
|
2435
|
+
|
|
2436
|
+
// eslint-disable-next-line redos/no-vulnerable -- safe
|
|
2437
|
+
var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
|
|
2438
|
+
|
|
2439
|
+
var global$6 = global$m;
|
|
2440
|
+
var apply = functionApply;
|
|
2441
|
+
var bind$3 = functionBindContext;
|
|
2442
|
+
var isCallable$3 = isCallable$j;
|
|
2443
|
+
var hasOwn = hasOwnProperty_1;
|
|
2444
|
+
var fails$1 = fails$g;
|
|
2445
|
+
var html = html$2;
|
|
2446
|
+
var arraySlice = arraySlice$1;
|
|
2447
|
+
var createElement = documentCreateElement$2;
|
|
2448
|
+
var validateArgumentsLength = validateArgumentsLength$1;
|
|
2449
|
+
var IS_IOS$1 = engineIsIos;
|
|
2450
|
+
var IS_NODE$3 = engineIsNode;
|
|
2451
|
+
|
|
2452
|
+
var set = global$6.setImmediate;
|
|
2453
|
+
var clear = global$6.clearImmediate;
|
|
2454
|
+
var process$2 = global$6.process;
|
|
2455
|
+
var Dispatch = global$6.Dispatch;
|
|
2456
|
+
var Function$1 = global$6.Function;
|
|
2457
|
+
var MessageChannel = global$6.MessageChannel;
|
|
2458
|
+
var String$1 = global$6.String;
|
|
2459
|
+
var counter = 0;
|
|
2460
|
+
var queue$2 = {};
|
|
2461
|
+
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
2462
|
+
var $location, defer, channel, port;
|
|
2463
|
+
|
|
2464
|
+
fails$1(function () {
|
|
2465
|
+
// Deno throws a ReferenceError on `location` access without `--location` flag
|
|
2466
|
+
$location = global$6.location;
|
|
2467
|
+
});
|
|
2468
|
+
|
|
2469
|
+
var run = function (id) {
|
|
2470
|
+
if (hasOwn(queue$2, id)) {
|
|
2471
|
+
var fn = queue$2[id];
|
|
2472
|
+
delete queue$2[id];
|
|
2473
|
+
fn();
|
|
2474
|
+
}
|
|
2475
|
+
};
|
|
2476
|
+
|
|
2477
|
+
var runner = function (id) {
|
|
2478
|
+
return function () {
|
|
2479
|
+
run(id);
|
|
2480
|
+
};
|
|
2481
|
+
};
|
|
2482
|
+
|
|
2483
|
+
var eventListener = function (event) {
|
|
2484
|
+
run(event.data);
|
|
2485
|
+
};
|
|
2486
|
+
|
|
2487
|
+
var globalPostMessageDefer = function (id) {
|
|
2488
|
+
// old engines have not location.origin
|
|
2489
|
+
global$6.postMessage(String$1(id), $location.protocol + '//' + $location.host);
|
|
2490
|
+
};
|
|
2491
|
+
|
|
2492
|
+
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
2493
|
+
if (!set || !clear) {
|
|
2494
|
+
set = function setImmediate(handler) {
|
|
2495
|
+
validateArgumentsLength(arguments.length, 1);
|
|
2496
|
+
var fn = isCallable$3(handler) ? handler : Function$1(handler);
|
|
2497
|
+
var args = arraySlice(arguments, 1);
|
|
2498
|
+
queue$2[++counter] = function () {
|
|
2499
|
+
apply(fn, undefined, args);
|
|
2500
|
+
};
|
|
2501
|
+
defer(counter);
|
|
2502
|
+
return counter;
|
|
2503
|
+
};
|
|
2504
|
+
clear = function clearImmediate(id) {
|
|
2505
|
+
delete queue$2[id];
|
|
2506
|
+
};
|
|
2507
|
+
// Node.js 0.8-
|
|
2508
|
+
if (IS_NODE$3) {
|
|
2509
|
+
defer = function (id) {
|
|
2510
|
+
process$2.nextTick(runner(id));
|
|
2511
|
+
};
|
|
2512
|
+
// Sphere (JS game engine) Dispatch API
|
|
2513
|
+
} else if (Dispatch && Dispatch.now) {
|
|
2514
|
+
defer = function (id) {
|
|
2515
|
+
Dispatch.now(runner(id));
|
|
2516
|
+
};
|
|
2517
|
+
// Browsers with MessageChannel, includes WebWorkers
|
|
2518
|
+
// except iOS - https://github.com/zloirock/core-js/issues/624
|
|
2519
|
+
} else if (MessageChannel && !IS_IOS$1) {
|
|
2520
|
+
channel = new MessageChannel();
|
|
2521
|
+
port = channel.port2;
|
|
2522
|
+
channel.port1.onmessage = eventListener;
|
|
2523
|
+
defer = bind$3(port.postMessage, port);
|
|
2524
|
+
// Browsers with postMessage, skip WebWorkers
|
|
2525
|
+
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
2526
|
+
} else if (
|
|
2527
|
+
global$6.addEventListener &&
|
|
2528
|
+
isCallable$3(global$6.postMessage) &&
|
|
2529
|
+
!global$6.importScripts &&
|
|
2530
|
+
$location && $location.protocol !== 'file:' &&
|
|
2531
|
+
!fails$1(globalPostMessageDefer)
|
|
2532
|
+
) {
|
|
2533
|
+
defer = globalPostMessageDefer;
|
|
2534
|
+
global$6.addEventListener('message', eventListener, false);
|
|
2535
|
+
// IE8-
|
|
2536
|
+
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
|
2537
|
+
defer = function (id) {
|
|
2538
|
+
html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
|
|
2539
|
+
html.removeChild(this);
|
|
2540
|
+
run(id);
|
|
2541
|
+
};
|
|
2542
|
+
};
|
|
2543
|
+
// Rest old browsers
|
|
2544
|
+
} else {
|
|
2545
|
+
defer = function (id) {
|
|
2546
|
+
setTimeout(runner(id), 0);
|
|
2547
|
+
};
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
var task$1 = {
|
|
2552
|
+
set: set,
|
|
2553
|
+
clear: clear
|
|
2554
|
+
};
|
|
2555
|
+
|
|
2556
|
+
var global$5 = global$m;
|
|
2557
|
+
var DESCRIPTORS$1 = descriptors;
|
|
2558
|
+
|
|
2559
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
2560
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
2561
|
+
|
|
2562
|
+
// Avoid NodeJS experimental warning
|
|
2563
|
+
var safeGetBuiltIn$1 = function (name) {
|
|
2564
|
+
if (!DESCRIPTORS$1) return global$5[name];
|
|
2565
|
+
var descriptor = getOwnPropertyDescriptor(global$5, name);
|
|
2566
|
+
return descriptor && descriptor.value;
|
|
2567
|
+
};
|
|
2568
|
+
|
|
2569
|
+
var Queue$2 = function () {
|
|
2570
|
+
this.head = null;
|
|
2571
|
+
this.tail = null;
|
|
2572
|
+
};
|
|
2573
|
+
|
|
2574
|
+
Queue$2.prototype = {
|
|
2575
|
+
add: function (item) {
|
|
2576
|
+
var entry = { item: item, next: null };
|
|
2577
|
+
var tail = this.tail;
|
|
2578
|
+
if (tail) tail.next = entry;
|
|
2579
|
+
else this.head = entry;
|
|
2580
|
+
this.tail = entry;
|
|
2581
|
+
},
|
|
2582
|
+
get: function () {
|
|
2583
|
+
var entry = this.head;
|
|
2584
|
+
if (entry) {
|
|
2585
|
+
var next = this.head = entry.next;
|
|
2586
|
+
if (next === null) this.tail = null;
|
|
2587
|
+
return entry.item;
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
};
|
|
2591
|
+
|
|
2592
|
+
var queue$1 = Queue$2;
|
|
2593
|
+
|
|
2594
|
+
var userAgent$1 = engineUserAgent;
|
|
2595
|
+
|
|
2596
|
+
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && typeof Pebble != 'undefined';
|
|
2597
|
+
|
|
2598
|
+
var userAgent = engineUserAgent;
|
|
2599
|
+
|
|
2600
|
+
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
|
|
2601
|
+
|
|
2602
|
+
var global$4 = global$m;
|
|
2603
|
+
var safeGetBuiltIn = safeGetBuiltIn$1;
|
|
2604
|
+
var bind$2 = functionBindContext;
|
|
2605
|
+
var macrotask = task$1.set;
|
|
2606
|
+
var Queue$1 = queue$1;
|
|
2607
|
+
var IS_IOS = engineIsIos;
|
|
2608
|
+
var IS_IOS_PEBBLE = engineIsIosPebble;
|
|
2609
|
+
var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
|
|
2610
|
+
var IS_NODE$2 = engineIsNode;
|
|
2611
|
+
|
|
2612
|
+
var MutationObserver = global$4.MutationObserver || global$4.WebKitMutationObserver;
|
|
2613
|
+
var document$2 = global$4.document;
|
|
2614
|
+
var process$1 = global$4.process;
|
|
2615
|
+
var Promise$1 = global$4.Promise;
|
|
2616
|
+
var microtask$1 = safeGetBuiltIn('queueMicrotask');
|
|
2617
|
+
var notify$1, toggle, node, promise, then;
|
|
2618
|
+
|
|
2619
|
+
// modern engines have queueMicrotask method
|
|
2620
|
+
if (!microtask$1) {
|
|
2621
|
+
var queue = new Queue$1();
|
|
2622
|
+
|
|
2623
|
+
var flush = function () {
|
|
2624
|
+
var parent, fn;
|
|
2625
|
+
if (IS_NODE$2 && (parent = process$1.domain)) parent.exit();
|
|
2626
|
+
while (fn = queue.get()) try {
|
|
2627
|
+
fn();
|
|
2628
|
+
} catch (error) {
|
|
2629
|
+
if (queue.head) notify$1();
|
|
2630
|
+
throw error;
|
|
2631
|
+
}
|
|
2632
|
+
if (parent) parent.enter();
|
|
2633
|
+
};
|
|
2634
|
+
|
|
2635
|
+
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
|
|
2636
|
+
// also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
|
|
2637
|
+
if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
|
|
2638
|
+
toggle = true;
|
|
2639
|
+
node = document$2.createTextNode('');
|
|
2640
|
+
new MutationObserver(flush).observe(node, { characterData: true });
|
|
2641
|
+
notify$1 = function () {
|
|
2642
|
+
node.data = toggle = !toggle;
|
|
2643
|
+
};
|
|
2644
|
+
// environments with maybe non-completely correct, but existent Promise
|
|
2645
|
+
} else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
|
|
2646
|
+
// Promise.resolve without an argument throws an error in LG WebOS 2
|
|
2647
|
+
promise = Promise$1.resolve(undefined);
|
|
2648
|
+
// workaround of WebKit ~ iOS Safari 10.1 bug
|
|
2649
|
+
promise.constructor = Promise$1;
|
|
2650
|
+
then = bind$2(promise.then, promise);
|
|
2651
|
+
notify$1 = function () {
|
|
2652
|
+
then(flush);
|
|
2653
|
+
};
|
|
2654
|
+
// Node.js without promises
|
|
2655
|
+
} else if (IS_NODE$2) {
|
|
2656
|
+
notify$1 = function () {
|
|
2657
|
+
process$1.nextTick(flush);
|
|
2658
|
+
};
|
|
2659
|
+
// for other environments - macrotask based on:
|
|
2660
|
+
// - setImmediate
|
|
2661
|
+
// - MessageChannel
|
|
2662
|
+
// - window.postMessage
|
|
2663
|
+
// - onreadystatechange
|
|
2664
|
+
// - setTimeout
|
|
2665
|
+
} else {
|
|
2666
|
+
// `webpack` dev server bug on IE global methods - use bind(fn, global)
|
|
2667
|
+
macrotask = bind$2(macrotask, global$4);
|
|
2668
|
+
notify$1 = function () {
|
|
2669
|
+
macrotask(flush);
|
|
2670
|
+
};
|
|
2671
|
+
}
|
|
2672
|
+
|
|
2673
|
+
microtask$1 = function (fn) {
|
|
2674
|
+
if (!queue.head) notify$1();
|
|
2675
|
+
queue.add(fn);
|
|
2676
|
+
};
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
var microtask_1 = microtask$1;
|
|
2680
|
+
|
|
2681
|
+
var hostReportErrors$1 = function (a, b) {
|
|
2682
|
+
try {
|
|
2683
|
+
// eslint-disable-next-line no-console -- safe
|
|
2684
|
+
arguments.length === 1 ? console.error(a) : console.error(a, b);
|
|
2685
|
+
} catch (error) { /* empty */ }
|
|
2686
|
+
};
|
|
2687
|
+
|
|
2688
|
+
var perform$3 = function (exec) {
|
|
2689
|
+
try {
|
|
2690
|
+
return { error: false, value: exec() };
|
|
2691
|
+
} catch (error) {
|
|
2692
|
+
return { error: true, value: error };
|
|
2693
|
+
}
|
|
2694
|
+
};
|
|
2695
|
+
|
|
2696
|
+
var global$3 = global$m;
|
|
2697
|
+
|
|
2698
|
+
var promiseNativeConstructor = global$3.Promise;
|
|
2699
|
+
|
|
2700
|
+
/* global Deno -- Deno case */
|
|
2701
|
+
var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
|
|
2702
|
+
|
|
2703
|
+
var IS_DENO$1 = engineIsDeno;
|
|
2704
|
+
var IS_NODE$1 = engineIsNode;
|
|
2705
|
+
|
|
2706
|
+
var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
|
|
2707
|
+
&& typeof window == 'object'
|
|
2708
|
+
&& typeof document == 'object';
|
|
2709
|
+
|
|
2710
|
+
var global$2 = global$m;
|
|
2711
|
+
var NativePromiseConstructor$3 = promiseNativeConstructor;
|
|
2712
|
+
var isCallable$2 = isCallable$j;
|
|
2713
|
+
var isForced = isForced_1;
|
|
2714
|
+
var inspectSource = inspectSource$3;
|
|
2715
|
+
var wellKnownSymbol$3 = wellKnownSymbol$e;
|
|
2716
|
+
var IS_BROWSER = engineIsBrowser;
|
|
2717
|
+
var IS_DENO = engineIsDeno;
|
|
2718
|
+
var V8_VERSION = engineV8Version;
|
|
2719
|
+
|
|
2720
|
+
NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
|
|
2721
|
+
var SPECIES = wellKnownSymbol$3('species');
|
|
2722
|
+
var SUBCLASSING = false;
|
|
2723
|
+
var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$2(global$2.PromiseRejectionEvent);
|
|
2724
|
+
|
|
2725
|
+
var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
|
|
2726
|
+
var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
|
|
2727
|
+
var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
|
|
2728
|
+
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
2729
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
2730
|
+
// We can't detect it synchronously, so just check versions
|
|
2731
|
+
if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
|
|
2732
|
+
// We can't use @@species feature detection in V8 since it causes
|
|
2733
|
+
// deoptimization and performance degradation
|
|
2734
|
+
// https://github.com/zloirock/core-js/issues/679
|
|
2735
|
+
if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
|
|
2736
|
+
// Detect correctness of subclassing with @@species support
|
|
2737
|
+
var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
|
|
2738
|
+
var FakePromise = function (exec) {
|
|
2739
|
+
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
2740
|
+
};
|
|
2741
|
+
var constructor = promise.constructor = {};
|
|
2742
|
+
constructor[SPECIES] = FakePromise;
|
|
2743
|
+
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
|
|
2744
|
+
if (!SUBCLASSING) return true;
|
|
2745
|
+
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
2746
|
+
} return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
|
|
2747
|
+
});
|
|
2748
|
+
|
|
2749
|
+
var promiseConstructorDetection = {
|
|
2750
|
+
CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
|
|
2751
|
+
REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
|
|
2752
|
+
SUBCLASSING: SUBCLASSING
|
|
2753
|
+
};
|
|
2754
|
+
|
|
2755
|
+
var newPromiseCapability$2 = {};
|
|
2756
|
+
|
|
2757
|
+
var aCallable$4 = aCallable$8;
|
|
2758
|
+
|
|
2759
|
+
var $TypeError$2 = TypeError;
|
|
2760
|
+
|
|
2761
|
+
var PromiseCapability = function (C) {
|
|
2762
|
+
var resolve, reject;
|
|
2763
|
+
this.promise = new C(function ($$resolve, $$reject) {
|
|
2764
|
+
if (resolve !== undefined || reject !== undefined) throw new $TypeError$2('Bad Promise constructor');
|
|
2765
|
+
resolve = $$resolve;
|
|
2766
|
+
reject = $$reject;
|
|
2767
|
+
});
|
|
2768
|
+
this.resolve = aCallable$4(resolve);
|
|
2769
|
+
this.reject = aCallable$4(reject);
|
|
2770
|
+
};
|
|
2771
|
+
|
|
2772
|
+
// `NewPromiseCapability` abstract operation
|
|
2773
|
+
// https://tc39.es/ecma262/#sec-newpromisecapability
|
|
2774
|
+
newPromiseCapability$2.f = function (C) {
|
|
2775
|
+
return new PromiseCapability(C);
|
|
2776
|
+
};
|
|
2777
|
+
|
|
2778
|
+
var $$6 = _export;
|
|
2779
|
+
var IS_NODE = engineIsNode;
|
|
2780
|
+
var global$1 = global$m;
|
|
2781
|
+
var call$6 = functionCall;
|
|
2782
|
+
var defineBuiltIn$1 = defineBuiltIn$5;
|
|
2783
|
+
var setPrototypeOf = objectSetPrototypeOf;
|
|
2784
|
+
var setToStringTag = setToStringTag$4;
|
|
2785
|
+
var setSpecies = setSpecies$1;
|
|
2786
|
+
var aCallable$3 = aCallable$8;
|
|
2787
|
+
var isCallable$1 = isCallable$j;
|
|
2788
|
+
var isObject$1 = isObject$9;
|
|
2789
|
+
var anInstance = anInstance$1;
|
|
2790
|
+
var speciesConstructor = speciesConstructor$1;
|
|
2791
|
+
var task = task$1.set;
|
|
2792
|
+
var microtask = microtask_1;
|
|
2793
|
+
var hostReportErrors = hostReportErrors$1;
|
|
2794
|
+
var perform$2 = perform$3;
|
|
2795
|
+
var Queue = queue$1;
|
|
2796
|
+
var InternalStateModule = internalState;
|
|
2797
|
+
var NativePromiseConstructor$2 = promiseNativeConstructor;
|
|
2798
|
+
var PromiseConstructorDetection = promiseConstructorDetection;
|
|
2799
|
+
var newPromiseCapabilityModule$3 = newPromiseCapability$2;
|
|
2800
|
+
|
|
2801
|
+
var PROMISE = 'Promise';
|
|
2802
|
+
var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
|
|
2803
|
+
var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
|
|
2804
|
+
var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
|
|
2805
|
+
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
|
2806
|
+
var setInternalState = InternalStateModule.set;
|
|
2807
|
+
var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
|
|
2808
|
+
var PromiseConstructor = NativePromiseConstructor$2;
|
|
2809
|
+
var PromisePrototype = NativePromisePrototype$1;
|
|
2810
|
+
var TypeError$1 = global$1.TypeError;
|
|
2811
|
+
var document$1 = global$1.document;
|
|
2812
|
+
var process = global$1.process;
|
|
2813
|
+
var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
|
|
2814
|
+
var newGenericPromiseCapability = newPromiseCapability$1;
|
|
2815
|
+
|
|
2816
|
+
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$1.dispatchEvent);
|
|
2817
|
+
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
2818
|
+
var REJECTION_HANDLED = 'rejectionhandled';
|
|
2819
|
+
var PENDING = 0;
|
|
2820
|
+
var FULFILLED = 1;
|
|
2821
|
+
var REJECTED = 2;
|
|
2822
|
+
var HANDLED = 1;
|
|
2823
|
+
var UNHANDLED = 2;
|
|
2824
|
+
|
|
2825
|
+
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
|
2826
|
+
|
|
2827
|
+
// helpers
|
|
2828
|
+
var isThenable = function (it) {
|
|
2829
|
+
var then;
|
|
2830
|
+
return isObject$1(it) && isCallable$1(then = it.then) ? then : false;
|
|
2831
|
+
};
|
|
2832
|
+
|
|
2833
|
+
var callReaction = function (reaction, state) {
|
|
2834
|
+
var value = state.value;
|
|
2835
|
+
var ok = state.state === FULFILLED;
|
|
2836
|
+
var handler = ok ? reaction.ok : reaction.fail;
|
|
2837
|
+
var resolve = reaction.resolve;
|
|
2838
|
+
var reject = reaction.reject;
|
|
2839
|
+
var domain = reaction.domain;
|
|
2840
|
+
var result, then, exited;
|
|
2841
|
+
try {
|
|
2842
|
+
if (handler) {
|
|
2843
|
+
if (!ok) {
|
|
2844
|
+
if (state.rejection === UNHANDLED) onHandleUnhandled(state);
|
|
2845
|
+
state.rejection = HANDLED;
|
|
2846
|
+
}
|
|
2847
|
+
if (handler === true) result = value;
|
|
2848
|
+
else {
|
|
2849
|
+
if (domain) domain.enter();
|
|
2850
|
+
result = handler(value); // can throw
|
|
2851
|
+
if (domain) {
|
|
2852
|
+
domain.exit();
|
|
2853
|
+
exited = true;
|
|
2854
|
+
}
|
|
2855
|
+
}
|
|
2856
|
+
if (result === reaction.promise) {
|
|
2857
|
+
reject(new TypeError$1('Promise-chain cycle'));
|
|
2858
|
+
} else if (then = isThenable(result)) {
|
|
2859
|
+
call$6(then, result, resolve, reject);
|
|
2860
|
+
} else resolve(result);
|
|
2861
|
+
} else reject(value);
|
|
2862
|
+
} catch (error) {
|
|
2863
|
+
if (domain && !exited) domain.exit();
|
|
2864
|
+
reject(error);
|
|
2212
2865
|
}
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2866
|
+
};
|
|
2867
|
+
|
|
2868
|
+
var notify = function (state, isReject) {
|
|
2869
|
+
if (state.notified) return;
|
|
2870
|
+
state.notified = true;
|
|
2871
|
+
microtask(function () {
|
|
2872
|
+
var reactions = state.reactions;
|
|
2873
|
+
var reaction;
|
|
2874
|
+
while (reaction = reactions.get()) {
|
|
2875
|
+
callReaction(reaction, state);
|
|
2876
|
+
}
|
|
2877
|
+
state.notified = false;
|
|
2878
|
+
if (isReject && !state.rejection) onUnhandled(state);
|
|
2879
|
+
});
|
|
2880
|
+
};
|
|
2881
|
+
|
|
2882
|
+
var dispatchEvent = function (name, promise, reason) {
|
|
2883
|
+
var event, handler;
|
|
2884
|
+
if (DISPATCH_EVENT) {
|
|
2885
|
+
event = document$1.createEvent('Event');
|
|
2886
|
+
event.promise = promise;
|
|
2887
|
+
event.reason = reason;
|
|
2888
|
+
event.initEvent(name, false, true);
|
|
2889
|
+
global$1.dispatchEvent(event);
|
|
2890
|
+
} else event = { promise: promise, reason: reason };
|
|
2891
|
+
if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$1['on' + name])) handler(event);
|
|
2892
|
+
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
2893
|
+
};
|
|
2894
|
+
|
|
2895
|
+
var onUnhandled = function (state) {
|
|
2896
|
+
call$6(task, global$1, function () {
|
|
2897
|
+
var promise = state.facade;
|
|
2898
|
+
var value = state.value;
|
|
2899
|
+
var IS_UNHANDLED = isUnhandled(state);
|
|
2900
|
+
var result;
|
|
2901
|
+
if (IS_UNHANDLED) {
|
|
2902
|
+
result = perform$2(function () {
|
|
2903
|
+
if (IS_NODE) {
|
|
2904
|
+
process.emit('unhandledRejection', value, promise);
|
|
2905
|
+
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
2906
|
+
});
|
|
2907
|
+
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
2908
|
+
state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
|
|
2909
|
+
if (result.error) throw result.value;
|
|
2910
|
+
}
|
|
2911
|
+
});
|
|
2912
|
+
};
|
|
2913
|
+
|
|
2914
|
+
var isUnhandled = function (state) {
|
|
2915
|
+
return state.rejection !== HANDLED && !state.parent;
|
|
2916
|
+
};
|
|
2917
|
+
|
|
2918
|
+
var onHandleUnhandled = function (state) {
|
|
2919
|
+
call$6(task, global$1, function () {
|
|
2920
|
+
var promise = state.facade;
|
|
2921
|
+
if (IS_NODE) {
|
|
2922
|
+
process.emit('rejectionHandled', promise);
|
|
2923
|
+
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
|
|
2924
|
+
});
|
|
2925
|
+
};
|
|
2926
|
+
|
|
2927
|
+
var bind$1 = function (fn, state, unwrap) {
|
|
2928
|
+
return function (value) {
|
|
2929
|
+
fn(state, value, unwrap);
|
|
2930
|
+
};
|
|
2931
|
+
};
|
|
2932
|
+
|
|
2933
|
+
var internalReject = function (state, value, unwrap) {
|
|
2934
|
+
if (state.done) return;
|
|
2935
|
+
state.done = true;
|
|
2936
|
+
if (unwrap) state = unwrap;
|
|
2937
|
+
state.value = value;
|
|
2938
|
+
state.state = REJECTED;
|
|
2939
|
+
notify(state, true);
|
|
2940
|
+
};
|
|
2941
|
+
|
|
2942
|
+
var internalResolve = function (state, value, unwrap) {
|
|
2943
|
+
if (state.done) return;
|
|
2944
|
+
state.done = true;
|
|
2945
|
+
if (unwrap) state = unwrap;
|
|
2946
|
+
try {
|
|
2947
|
+
if (state.facade === value) throw new TypeError$1("Promise can't be resolved itself");
|
|
2948
|
+
var then = isThenable(value);
|
|
2949
|
+
if (then) {
|
|
2950
|
+
microtask(function () {
|
|
2951
|
+
var wrapper = { done: false };
|
|
2952
|
+
try {
|
|
2953
|
+
call$6(then, value,
|
|
2954
|
+
bind$1(internalResolve, wrapper, state),
|
|
2955
|
+
bind$1(internalReject, wrapper, state)
|
|
2956
|
+
);
|
|
2957
|
+
} catch (error) {
|
|
2958
|
+
internalReject(wrapper, error, state);
|
|
2959
|
+
}
|
|
2960
|
+
});
|
|
2216
2961
|
} else {
|
|
2217
|
-
|
|
2962
|
+
state.value = value;
|
|
2963
|
+
state.state = FULFILLED;
|
|
2964
|
+
notify(state, false);
|
|
2218
2965
|
}
|
|
2966
|
+
} catch (error) {
|
|
2967
|
+
internalReject({ done: false }, error, state);
|
|
2219
2968
|
}
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2969
|
+
};
|
|
2970
|
+
|
|
2971
|
+
// constructor polyfill
|
|
2972
|
+
if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
2973
|
+
// 25.4.3.1 Promise(executor)
|
|
2974
|
+
PromiseConstructor = function Promise(executor) {
|
|
2975
|
+
anInstance(this, PromisePrototype);
|
|
2976
|
+
aCallable$3(executor);
|
|
2977
|
+
call$6(Internal, this);
|
|
2978
|
+
var state = getInternalPromiseState(this);
|
|
2979
|
+
try {
|
|
2980
|
+
executor(bind$1(internalResolve, state), bind$1(internalReject, state));
|
|
2981
|
+
} catch (error) {
|
|
2982
|
+
internalReject(state, error);
|
|
2983
|
+
}
|
|
2984
|
+
};
|
|
2985
|
+
|
|
2986
|
+
PromisePrototype = PromiseConstructor.prototype;
|
|
2987
|
+
|
|
2988
|
+
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
2989
|
+
Internal = function Promise(executor) {
|
|
2990
|
+
setInternalState(this, {
|
|
2991
|
+
type: PROMISE,
|
|
2992
|
+
done: false,
|
|
2993
|
+
notified: false,
|
|
2994
|
+
parent: false,
|
|
2995
|
+
reactions: new Queue(),
|
|
2996
|
+
rejection: false,
|
|
2997
|
+
state: PENDING,
|
|
2998
|
+
value: undefined
|
|
2999
|
+
});
|
|
3000
|
+
};
|
|
3001
|
+
|
|
3002
|
+
// `Promise.prototype.then` method
|
|
3003
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
|
3004
|
+
Internal.prototype = defineBuiltIn$1(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
|
3005
|
+
var state = getInternalPromiseState(this);
|
|
3006
|
+
var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
|
|
3007
|
+
state.parent = true;
|
|
3008
|
+
reaction.ok = isCallable$1(onFulfilled) ? onFulfilled : true;
|
|
3009
|
+
reaction.fail = isCallable$1(onRejected) && onRejected;
|
|
3010
|
+
reaction.domain = IS_NODE ? process.domain : undefined;
|
|
3011
|
+
if (state.state === PENDING) state.reactions.add(reaction);
|
|
3012
|
+
else microtask(function () {
|
|
3013
|
+
callReaction(reaction, state);
|
|
3014
|
+
});
|
|
3015
|
+
return reaction.promise;
|
|
3016
|
+
});
|
|
3017
|
+
|
|
3018
|
+
OwnPromiseCapability = function () {
|
|
3019
|
+
var promise = new Internal();
|
|
3020
|
+
var state = getInternalPromiseState(promise);
|
|
3021
|
+
this.promise = promise;
|
|
3022
|
+
this.resolve = bind$1(internalResolve, state);
|
|
3023
|
+
this.reject = bind$1(internalReject, state);
|
|
3024
|
+
};
|
|
3025
|
+
|
|
3026
|
+
newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
|
|
3027
|
+
return C === PromiseConstructor || C === PromiseWrapper
|
|
3028
|
+
? new OwnPromiseCapability(C)
|
|
3029
|
+
: newGenericPromiseCapability(C);
|
|
3030
|
+
};
|
|
3031
|
+
|
|
3032
|
+
if (isCallable$1(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
|
|
3033
|
+
nativeThen = NativePromisePrototype$1.then;
|
|
3034
|
+
|
|
3035
|
+
if (!NATIVE_PROMISE_SUBCLASSING) {
|
|
3036
|
+
// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
|
|
3037
|
+
defineBuiltIn$1(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
|
|
3038
|
+
var that = this;
|
|
3039
|
+
return new PromiseConstructor(function (resolve, reject) {
|
|
3040
|
+
call$6(nativeThen, that, resolve, reject);
|
|
3041
|
+
}).then(onFulfilled, onRejected);
|
|
3042
|
+
// https://github.com/zloirock/core-js/issues/640
|
|
3043
|
+
}, { unsafe: true });
|
|
3044
|
+
}
|
|
3045
|
+
|
|
3046
|
+
// make `.constructor === Promise` work for native promise-based APIs
|
|
3047
|
+
try {
|
|
3048
|
+
delete NativePromisePrototype$1.constructor;
|
|
3049
|
+
} catch (error) { /* empty */ }
|
|
3050
|
+
|
|
3051
|
+
// make `instanceof Promise` work for native promise-based APIs
|
|
3052
|
+
if (setPrototypeOf) {
|
|
3053
|
+
setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
|
|
2226
3054
|
}
|
|
2227
3055
|
}
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
3056
|
+
}
|
|
3057
|
+
|
|
3058
|
+
$$6({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
|
|
3059
|
+
Promise: PromiseConstructor
|
|
3060
|
+
});
|
|
3061
|
+
|
|
3062
|
+
setToStringTag(PromiseConstructor, PROMISE, false);
|
|
3063
|
+
setSpecies(PROMISE);
|
|
3064
|
+
|
|
3065
|
+
var wellKnownSymbol$2 = wellKnownSymbol$e;
|
|
3066
|
+
var Iterators$1 = iterators;
|
|
3067
|
+
|
|
3068
|
+
var ITERATOR$2 = wellKnownSymbol$2('iterator');
|
|
3069
|
+
var ArrayPrototype = Array.prototype;
|
|
3070
|
+
|
|
3071
|
+
// check on default Array iterator
|
|
3072
|
+
var isArrayIteratorMethod$1 = function (it) {
|
|
3073
|
+
return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
|
|
3074
|
+
};
|
|
3075
|
+
|
|
3076
|
+
var classof = classof$4;
|
|
3077
|
+
var getMethod$1 = getMethod$3;
|
|
3078
|
+
var isNullOrUndefined = isNullOrUndefined$4;
|
|
3079
|
+
var Iterators = iterators;
|
|
3080
|
+
var wellKnownSymbol$1 = wellKnownSymbol$e;
|
|
3081
|
+
|
|
3082
|
+
var ITERATOR$1 = wellKnownSymbol$1('iterator');
|
|
3083
|
+
|
|
3084
|
+
var getIteratorMethod$2 = function (it) {
|
|
3085
|
+
if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$1)
|
|
3086
|
+
|| getMethod$1(it, '@@iterator')
|
|
3087
|
+
|| Iterators[classof(it)];
|
|
3088
|
+
};
|
|
3089
|
+
|
|
3090
|
+
var call$5 = functionCall;
|
|
3091
|
+
var aCallable$2 = aCallable$8;
|
|
3092
|
+
var anObject$3 = anObject$b;
|
|
3093
|
+
var tryToString$1 = tryToString$4;
|
|
3094
|
+
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
3095
|
+
|
|
3096
|
+
var $TypeError$1 = TypeError;
|
|
3097
|
+
|
|
3098
|
+
var getIterator$1 = function (argument, usingIterator) {
|
|
3099
|
+
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
3100
|
+
if (aCallable$2(iteratorMethod)) return anObject$3(call$5(iteratorMethod, argument));
|
|
3101
|
+
throw new $TypeError$1(tryToString$1(argument) + ' is not iterable');
|
|
3102
|
+
};
|
|
3103
|
+
|
|
3104
|
+
var call$4 = functionCall;
|
|
3105
|
+
var anObject$2 = anObject$b;
|
|
3106
|
+
var getMethod = getMethod$3;
|
|
3107
|
+
|
|
3108
|
+
var iteratorClose$1 = function (iterator, kind, value) {
|
|
3109
|
+
var innerResult, innerError;
|
|
3110
|
+
anObject$2(iterator);
|
|
3111
|
+
try {
|
|
3112
|
+
innerResult = getMethod(iterator, 'return');
|
|
3113
|
+
if (!innerResult) {
|
|
3114
|
+
if (kind === 'throw') throw value;
|
|
3115
|
+
return value;
|
|
2233
3116
|
}
|
|
2234
|
-
|
|
3117
|
+
innerResult = call$4(innerResult, iterator);
|
|
3118
|
+
} catch (error) {
|
|
3119
|
+
innerError = true;
|
|
3120
|
+
innerResult = error;
|
|
2235
3121
|
}
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
3122
|
+
if (kind === 'throw') throw value;
|
|
3123
|
+
if (innerError) throw innerResult;
|
|
3124
|
+
anObject$2(innerResult);
|
|
3125
|
+
return value;
|
|
3126
|
+
};
|
|
3127
|
+
|
|
3128
|
+
var bind = functionBindContext;
|
|
3129
|
+
var call$3 = functionCall;
|
|
3130
|
+
var anObject$1 = anObject$b;
|
|
3131
|
+
var tryToString = tryToString$4;
|
|
3132
|
+
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
3133
|
+
var lengthOfArrayLike = lengthOfArrayLike$2;
|
|
3134
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
3135
|
+
var getIterator = getIterator$1;
|
|
3136
|
+
var getIteratorMethod = getIteratorMethod$2;
|
|
3137
|
+
var iteratorClose = iteratorClose$1;
|
|
3138
|
+
|
|
3139
|
+
var $TypeError = TypeError;
|
|
3140
|
+
|
|
3141
|
+
var Result = function (stopped, result) {
|
|
3142
|
+
this.stopped = stopped;
|
|
3143
|
+
this.result = result;
|
|
3144
|
+
};
|
|
3145
|
+
|
|
3146
|
+
var ResultPrototype = Result.prototype;
|
|
3147
|
+
|
|
3148
|
+
var iterate$2 = function (iterable, unboundFunction, options) {
|
|
3149
|
+
var that = options && options.that;
|
|
3150
|
+
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
3151
|
+
var IS_RECORD = !!(options && options.IS_RECORD);
|
|
3152
|
+
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
3153
|
+
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
3154
|
+
var fn = bind(unboundFunction, that);
|
|
3155
|
+
var iterator, iterFn, index, length, result, next, step;
|
|
3156
|
+
|
|
3157
|
+
var stop = function (condition) {
|
|
3158
|
+
if (iterator) iteratorClose(iterator, 'normal', condition);
|
|
3159
|
+
return new Result(true, condition);
|
|
3160
|
+
};
|
|
3161
|
+
|
|
3162
|
+
var callFn = function (value) {
|
|
3163
|
+
if (AS_ENTRIES) {
|
|
3164
|
+
anObject$1(value);
|
|
3165
|
+
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
3166
|
+
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
3167
|
+
};
|
|
3168
|
+
|
|
3169
|
+
if (IS_RECORD) {
|
|
3170
|
+
iterator = iterable.iterator;
|
|
3171
|
+
} else if (IS_ITERATOR) {
|
|
3172
|
+
iterator = iterable;
|
|
3173
|
+
} else {
|
|
3174
|
+
iterFn = getIteratorMethod(iterable);
|
|
3175
|
+
if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable');
|
|
3176
|
+
// optimisation for array iterators
|
|
3177
|
+
if (isArrayIteratorMethod(iterFn)) {
|
|
3178
|
+
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
3179
|
+
result = callFn(iterable[index]);
|
|
3180
|
+
if (result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
3181
|
+
} return new Result(false);
|
|
2241
3182
|
}
|
|
2242
|
-
|
|
3183
|
+
iterator = getIterator(iterable, iterFn);
|
|
3184
|
+
}
|
|
3185
|
+
|
|
3186
|
+
next = IS_RECORD ? iterable.next : iterator.next;
|
|
3187
|
+
while (!(step = call$3(next, iterator)).done) {
|
|
3188
|
+
try {
|
|
3189
|
+
result = callFn(step.value);
|
|
3190
|
+
} catch (error) {
|
|
3191
|
+
iteratorClose(iterator, 'throw', error);
|
|
3192
|
+
}
|
|
3193
|
+
if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
3194
|
+
} return new Result(false);
|
|
3195
|
+
};
|
|
3196
|
+
|
|
3197
|
+
var wellKnownSymbol = wellKnownSymbol$e;
|
|
3198
|
+
|
|
3199
|
+
var ITERATOR = wellKnownSymbol('iterator');
|
|
3200
|
+
var SAFE_CLOSING = false;
|
|
3201
|
+
|
|
3202
|
+
try {
|
|
3203
|
+
var called = 0;
|
|
3204
|
+
var iteratorWithReturn = {
|
|
3205
|
+
next: function () {
|
|
3206
|
+
return { done: !!called++ };
|
|
3207
|
+
},
|
|
3208
|
+
'return': function () {
|
|
3209
|
+
SAFE_CLOSING = true;
|
|
3210
|
+
}
|
|
3211
|
+
};
|
|
3212
|
+
iteratorWithReturn[ITERATOR] = function () {
|
|
3213
|
+
return this;
|
|
3214
|
+
};
|
|
3215
|
+
// eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
|
|
3216
|
+
Array.from(iteratorWithReturn, function () { throw 2; });
|
|
3217
|
+
} catch (error) { /* empty */ }
|
|
3218
|
+
|
|
3219
|
+
var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
|
|
3220
|
+
try {
|
|
3221
|
+
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
|
3222
|
+
} catch (error) { return false; } // workaround of old WebKit + `eval` bug
|
|
3223
|
+
var ITERATION_SUPPORT = false;
|
|
3224
|
+
try {
|
|
3225
|
+
var object = {};
|
|
3226
|
+
object[ITERATOR] = function () {
|
|
3227
|
+
return {
|
|
3228
|
+
next: function () {
|
|
3229
|
+
return { done: ITERATION_SUPPORT = true };
|
|
3230
|
+
}
|
|
3231
|
+
};
|
|
3232
|
+
};
|
|
3233
|
+
exec(object);
|
|
3234
|
+
} catch (error) { /* empty */ }
|
|
3235
|
+
return ITERATION_SUPPORT;
|
|
3236
|
+
};
|
|
3237
|
+
|
|
3238
|
+
var NativePromiseConstructor$1 = promiseNativeConstructor;
|
|
3239
|
+
var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
|
|
3240
|
+
var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
|
|
3241
|
+
|
|
3242
|
+
var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
|
|
3243
|
+
NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
|
|
3244
|
+
});
|
|
3245
|
+
|
|
3246
|
+
var $$5 = _export;
|
|
3247
|
+
var call$2 = functionCall;
|
|
3248
|
+
var aCallable$1 = aCallable$8;
|
|
3249
|
+
var newPromiseCapabilityModule$2 = newPromiseCapability$2;
|
|
3250
|
+
var perform$1 = perform$3;
|
|
3251
|
+
var iterate$1 = iterate$2;
|
|
3252
|
+
var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
|
|
3253
|
+
|
|
3254
|
+
// `Promise.all` method
|
|
3255
|
+
// https://tc39.es/ecma262/#sec-promise.all
|
|
3256
|
+
$$5({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
|
|
3257
|
+
all: function all(iterable) {
|
|
3258
|
+
var C = this;
|
|
3259
|
+
var capability = newPromiseCapabilityModule$2.f(C);
|
|
3260
|
+
var resolve = capability.resolve;
|
|
3261
|
+
var reject = capability.reject;
|
|
3262
|
+
var result = perform$1(function () {
|
|
3263
|
+
var $promiseResolve = aCallable$1(C.resolve);
|
|
3264
|
+
var values = [];
|
|
3265
|
+
var counter = 0;
|
|
3266
|
+
var remaining = 1;
|
|
3267
|
+
iterate$1(iterable, function (promise) {
|
|
3268
|
+
var index = counter++;
|
|
3269
|
+
var alreadyCalled = false;
|
|
3270
|
+
remaining++;
|
|
3271
|
+
call$2($promiseResolve, C, promise).then(function (value) {
|
|
3272
|
+
if (alreadyCalled) return;
|
|
3273
|
+
alreadyCalled = true;
|
|
3274
|
+
values[index] = value;
|
|
3275
|
+
--remaining || resolve(values);
|
|
3276
|
+
}, reject);
|
|
3277
|
+
});
|
|
3278
|
+
--remaining || resolve(values);
|
|
3279
|
+
});
|
|
3280
|
+
if (result.error) reject(result.value);
|
|
3281
|
+
return capability.promise;
|
|
3282
|
+
}
|
|
3283
|
+
});
|
|
3284
|
+
|
|
3285
|
+
var $$4 = _export;
|
|
3286
|
+
var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
|
|
3287
|
+
var NativePromiseConstructor = promiseNativeConstructor;
|
|
3288
|
+
var getBuiltIn$1 = getBuiltIn$7;
|
|
3289
|
+
var isCallable = isCallable$j;
|
|
3290
|
+
var defineBuiltIn = defineBuiltIn$5;
|
|
3291
|
+
|
|
3292
|
+
var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
|
|
3293
|
+
|
|
3294
|
+
// `Promise.prototype.catch` method
|
|
3295
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
3296
|
+
$$4({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
|
|
3297
|
+
'catch': function (onRejected) {
|
|
3298
|
+
return this.then(undefined, onRejected);
|
|
3299
|
+
}
|
|
3300
|
+
});
|
|
3301
|
+
|
|
3302
|
+
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
|
|
3303
|
+
if (isCallable(NativePromiseConstructor)) {
|
|
3304
|
+
var method = getBuiltIn$1('Promise').prototype['catch'];
|
|
3305
|
+
if (NativePromisePrototype['catch'] !== method) {
|
|
3306
|
+
defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });
|
|
2243
3307
|
}
|
|
2244
3308
|
}
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
3309
|
+
|
|
3310
|
+
var $$3 = _export;
|
|
3311
|
+
var call$1 = functionCall;
|
|
3312
|
+
var aCallable = aCallable$8;
|
|
3313
|
+
var newPromiseCapabilityModule$1 = newPromiseCapability$2;
|
|
3314
|
+
var perform = perform$3;
|
|
3315
|
+
var iterate = iterate$2;
|
|
3316
|
+
var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
|
|
3317
|
+
|
|
3318
|
+
// `Promise.race` method
|
|
3319
|
+
// https://tc39.es/ecma262/#sec-promise.race
|
|
3320
|
+
$$3({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
|
|
3321
|
+
race: function race(iterable) {
|
|
3322
|
+
var C = this;
|
|
3323
|
+
var capability = newPromiseCapabilityModule$1.f(C);
|
|
3324
|
+
var reject = capability.reject;
|
|
3325
|
+
var result = perform(function () {
|
|
3326
|
+
var $promiseResolve = aCallable(C.resolve);
|
|
3327
|
+
iterate(iterable, function (promise) {
|
|
3328
|
+
call$1($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
3329
|
+
});
|
|
3330
|
+
});
|
|
3331
|
+
if (result.error) reject(result.value);
|
|
3332
|
+
return capability.promise;
|
|
3333
|
+
}
|
|
3334
|
+
});
|
|
3335
|
+
|
|
3336
|
+
var $$2 = _export;
|
|
3337
|
+
var newPromiseCapabilityModule = newPromiseCapability$2;
|
|
3338
|
+
var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
|
|
3339
|
+
|
|
3340
|
+
// `Promise.reject` method
|
|
3341
|
+
// https://tc39.es/ecma262/#sec-promise.reject
|
|
3342
|
+
$$2({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
|
|
3343
|
+
reject: function reject(r) {
|
|
3344
|
+
var capability = newPromiseCapabilityModule.f(this);
|
|
3345
|
+
var capabilityReject = capability.reject;
|
|
3346
|
+
capabilityReject(r);
|
|
3347
|
+
return capability.promise;
|
|
3348
|
+
}
|
|
3349
|
+
});
|
|
3350
|
+
|
|
3351
|
+
var anObject = anObject$b;
|
|
3352
|
+
var isObject = isObject$9;
|
|
3353
|
+
var newPromiseCapability = newPromiseCapability$2;
|
|
3354
|
+
|
|
3355
|
+
var promiseResolve$1 = function (C, x) {
|
|
3356
|
+
anObject(C);
|
|
3357
|
+
if (isObject(x) && x.constructor === C) return x;
|
|
3358
|
+
var promiseCapability = newPromiseCapability.f(C);
|
|
3359
|
+
var resolve = promiseCapability.resolve;
|
|
3360
|
+
resolve(x);
|
|
3361
|
+
return promiseCapability.promise;
|
|
3362
|
+
};
|
|
3363
|
+
|
|
3364
|
+
var $$1 = _export;
|
|
3365
|
+
var getBuiltIn = getBuiltIn$7;
|
|
3366
|
+
var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
|
|
3367
|
+
var promiseResolve = promiseResolve$1;
|
|
3368
|
+
|
|
3369
|
+
getBuiltIn('Promise');
|
|
3370
|
+
|
|
3371
|
+
// `Promise.resolve` method
|
|
3372
|
+
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
3373
|
+
$$1({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
3374
|
+
resolve: function resolve(x) {
|
|
3375
|
+
return promiseResolve(this, x);
|
|
3376
|
+
}
|
|
3377
|
+
});
|
|
2254
3378
|
|
|
2255
3379
|
function noAccessContextGrantedModelRoles(context, data) {
|
|
2256
3380
|
return contextGrantedModelRoles(context, data, noAccessRoleMap());
|
|
@@ -2269,38 +3393,83 @@ function contextGrantedModelRoles(context, data, roles) {
|
|
|
2269
3393
|
/**
|
|
2270
3394
|
* Abstract ModelPermissionService implementation.
|
|
2271
3395
|
*/
|
|
3396
|
+
|
|
3397
|
+
function _await$2(value, then, direct) {
|
|
3398
|
+
if (direct) {
|
|
3399
|
+
return then ? then(value) : value;
|
|
3400
|
+
}
|
|
3401
|
+
if (!value || !value.then) {
|
|
3402
|
+
value = Promise.resolve(value);
|
|
3403
|
+
}
|
|
3404
|
+
return then ? value.then(then) : value;
|
|
3405
|
+
}
|
|
3406
|
+
function _invoke$1(body, then) {
|
|
3407
|
+
var result = body();
|
|
3408
|
+
if (result && result.then) {
|
|
3409
|
+
return result.then(then);
|
|
3410
|
+
}
|
|
3411
|
+
return then(result);
|
|
3412
|
+
}
|
|
3413
|
+
function _call(body, then, direct) {
|
|
3414
|
+
if (direct) {
|
|
3415
|
+
return then ? then(body()) : body();
|
|
3416
|
+
}
|
|
3417
|
+
try {
|
|
3418
|
+
var result = Promise.resolve(body());
|
|
3419
|
+
return then ? result.then(then) : result;
|
|
3420
|
+
} catch (e) {
|
|
3421
|
+
return Promise.reject(e);
|
|
3422
|
+
}
|
|
3423
|
+
}
|
|
2272
3424
|
class AbstractModelPermissionService {
|
|
2273
3425
|
constructor(modelLoader) {
|
|
3426
|
+
this.modelLoader = void 0;
|
|
2274
3427
|
this.modelLoader = modelLoader;
|
|
2275
3428
|
}
|
|
2276
3429
|
roleMapForKeyContext(key, context) {
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
3430
|
+
const _this = this;
|
|
3431
|
+
return _call(function () {
|
|
3432
|
+
return _await$2(_this.modelLoader.loadModelForKey(key, context), function (model) {
|
|
3433
|
+
let result;
|
|
3434
|
+
return _invoke$1(function () {
|
|
3435
|
+
if (model != null) {
|
|
3436
|
+
return _await$2(_this.roleMapForModelContext(model, context), function (_this$roleMapForModel) {
|
|
3437
|
+
result = _this$roleMapForModel;
|
|
3438
|
+
});
|
|
3439
|
+
} else {
|
|
3440
|
+
result = noAccessContextGrantedModelRoles(context);
|
|
3441
|
+
}
|
|
3442
|
+
}, function () {
|
|
3443
|
+
return result;
|
|
3444
|
+
});
|
|
3445
|
+
});
|
|
2286
3446
|
});
|
|
2287
3447
|
}
|
|
2288
3448
|
roleMapForModelContext(model, context) {
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
3449
|
+
const _this2 = this;
|
|
3450
|
+
return _call(function () {
|
|
3451
|
+
return _await$2(_this2.outputForModel(model, context), function (output) {
|
|
3452
|
+
let result;
|
|
3453
|
+
return _invoke$1(function () {
|
|
3454
|
+
if (output != null && _this2.isUsableOutputForRoles(output, context)) {
|
|
3455
|
+
return _await$2(_this2.getRoleMapForOutput(output, context, model), function (_this2$getRoleMapForO) {
|
|
3456
|
+
result = _this2$getRoleMapForO;
|
|
3457
|
+
});
|
|
3458
|
+
} else {
|
|
3459
|
+
result = noAccessContextGrantedModelRoles(context, output);
|
|
3460
|
+
}
|
|
3461
|
+
}, function () {
|
|
3462
|
+
return result;
|
|
3463
|
+
});
|
|
3464
|
+
});
|
|
2298
3465
|
});
|
|
2299
3466
|
}
|
|
2300
3467
|
getRoleMapForOutput(output, context, model) {
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
return
|
|
3468
|
+
const _this3 = this;
|
|
3469
|
+
return _call(function () {
|
|
3470
|
+
return _await$2(_this3.roleMapForModel(output, context, model), function (roleMap) {
|
|
3471
|
+
return contextGrantedModelRoles(context, output, roleMap);
|
|
3472
|
+
});
|
|
2304
3473
|
});
|
|
2305
3474
|
}
|
|
2306
3475
|
isUsableOutputForRoles(output, context) {
|
|
@@ -2355,7 +3524,7 @@ const TransformStringValueToBoolean = () => classTransformer.Transform(transform
|
|
|
2355
3524
|
var DESCRIPTORS = descriptors;
|
|
2356
3525
|
var uncurryThis = functionUncurryThis;
|
|
2357
3526
|
var call = functionCall;
|
|
2358
|
-
var fails = fails$
|
|
3527
|
+
var fails = fails$g;
|
|
2359
3528
|
var objectKeys = objectKeys$2;
|
|
2360
3529
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
2361
3530
|
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
@@ -2419,31 +3588,64 @@ $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign },
|
|
|
2419
3588
|
assign: assign
|
|
2420
3589
|
});
|
|
2421
3590
|
|
|
3591
|
+
function _await$1(value, then, direct) {
|
|
3592
|
+
if (direct) {
|
|
3593
|
+
return then ? then(value) : value;
|
|
3594
|
+
}
|
|
3595
|
+
if (!value || !value.then) {
|
|
3596
|
+
value = Promise.resolve(value);
|
|
3597
|
+
}
|
|
3598
|
+
return then ? value.then(then) : value;
|
|
3599
|
+
} /**
|
|
3600
|
+
* Creates a new TransformAndValidateObjectFactory.
|
|
3601
|
+
*
|
|
3602
|
+
* @param defaults
|
|
3603
|
+
* @returns
|
|
3604
|
+
*/
|
|
3605
|
+
|
|
3606
|
+
function _invoke(body, then) {
|
|
3607
|
+
var result = body();
|
|
3608
|
+
if (result && result.then) {
|
|
3609
|
+
return result.then(then);
|
|
3610
|
+
}
|
|
3611
|
+
return then(result);
|
|
3612
|
+
}
|
|
3613
|
+
function _async$1(f) {
|
|
3614
|
+
return function () {
|
|
3615
|
+
for (var args = [], i = 0; i < arguments.length; i++) {
|
|
3616
|
+
args[i] = arguments[i];
|
|
3617
|
+
}
|
|
3618
|
+
try {
|
|
3619
|
+
return Promise.resolve(f.apply(this, args));
|
|
3620
|
+
} catch (e) {
|
|
3621
|
+
return Promise.reject(e);
|
|
3622
|
+
}
|
|
3623
|
+
};
|
|
3624
|
+
}
|
|
2422
3625
|
function transformAndValidateObject(config) {
|
|
2423
3626
|
const transformToResult = transformAndValidateObjectResult(config.classType, config.fn, config.optionsForContext);
|
|
2424
3627
|
const {
|
|
2425
3628
|
handleValidationError
|
|
2426
3629
|
} = config;
|
|
2427
|
-
return (input, context) => transformToResult(input, context).then(
|
|
3630
|
+
return (input, context) => transformToResult(input, context).then(_async$1(function (x) {
|
|
2428
3631
|
const object = x.object;
|
|
2429
3632
|
let result;
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
}
|
|
3633
|
+
return _invoke(function () {
|
|
3634
|
+
if (x.success) {
|
|
3635
|
+
result = x.result;
|
|
3636
|
+
} else {
|
|
3637
|
+
return _await$1(handleValidationError(x.validationErrors), function (_handleValidationErro) {
|
|
3638
|
+
result = _handleValidationErro;
|
|
3639
|
+
});
|
|
3640
|
+
}
|
|
3641
|
+
}, function () {
|
|
3642
|
+
return {
|
|
3643
|
+
object,
|
|
3644
|
+
result
|
|
3645
|
+
};
|
|
3646
|
+
});
|
|
2439
3647
|
}));
|
|
2440
3648
|
}
|
|
2441
|
-
/**
|
|
2442
|
-
* Creates a new TransformAndValidateObjectFactory.
|
|
2443
|
-
*
|
|
2444
|
-
* @param defaults
|
|
2445
|
-
* @returns
|
|
2446
|
-
*/
|
|
2447
3649
|
function transformAndValidateObjectFactory(defaults) {
|
|
2448
3650
|
const {
|
|
2449
3651
|
handleValidationError: defaultHandleValidationError,
|
|
@@ -2453,7 +3655,7 @@ function transformAndValidateObjectFactory(defaults) {
|
|
|
2453
3655
|
const config = {
|
|
2454
3656
|
classType,
|
|
2455
3657
|
fn,
|
|
2456
|
-
handleValidationError: handleValidationError
|
|
3658
|
+
handleValidationError: handleValidationError != null ? handleValidationError : defaultHandleValidationError,
|
|
2457
3659
|
optionsForContext
|
|
2458
3660
|
};
|
|
2459
3661
|
return transformAndValidateObject(config);
|
|
@@ -2467,31 +3669,33 @@ function transformAndValidateObjectFactory(defaults) {
|
|
|
2467
3669
|
* @returns
|
|
2468
3670
|
*/
|
|
2469
3671
|
function transformAndValidateObjectResult(classType, fn, inputOptionsForContext) {
|
|
2470
|
-
const optionsForContext = inputOptionsForContext
|
|
2471
|
-
return (input, context)
|
|
3672
|
+
const optionsForContext = inputOptionsForContext != null ? inputOptionsForContext : () => ({});
|
|
3673
|
+
return _async$1(function (input, context) {
|
|
2472
3674
|
const {
|
|
2473
3675
|
transform: transformOptions,
|
|
2474
3676
|
validate: validateOptions
|
|
2475
3677
|
} = optionsForContext(context);
|
|
2476
|
-
const object = classTransformer.plainToInstance(classType, input, Object.assign(
|
|
3678
|
+
const object = classTransformer.plainToInstance(classType, input, Object.assign({}, transformOptions, {
|
|
2477
3679
|
// Note: Each variable on the target class must be marked with the @Expose() annotation.
|
|
2478
3680
|
excludeExtraneousValues: true
|
|
2479
3681
|
}));
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
3682
|
+
return _await$1(classValidator.validate(object, validateOptions), function (validationErrors) {
|
|
3683
|
+
if (validationErrors.length) {
|
|
3684
|
+
return {
|
|
3685
|
+
object,
|
|
3686
|
+
validationErrors,
|
|
3687
|
+
success: false
|
|
3688
|
+
};
|
|
3689
|
+
} else {
|
|
3690
|
+
return _await$1(fn(object), function (result) {
|
|
3691
|
+
return {
|
|
3692
|
+
object,
|
|
3693
|
+
result,
|
|
3694
|
+
success: true
|
|
3695
|
+
};
|
|
3696
|
+
});
|
|
3697
|
+
}
|
|
3698
|
+
});
|
|
2495
3699
|
});
|
|
2496
3700
|
}
|
|
2497
3701
|
|
|
@@ -2518,15 +3722,37 @@ function toTransformAndValidateFunctionResult(objectOutput) {
|
|
|
2518
3722
|
});
|
|
2519
3723
|
}
|
|
2520
3724
|
|
|
3725
|
+
function _await(value, then, direct) {
|
|
3726
|
+
if (direct) {
|
|
3727
|
+
return then ? then(value) : value;
|
|
3728
|
+
}
|
|
3729
|
+
if (!value || !value.then) {
|
|
3730
|
+
value = Promise.resolve(value);
|
|
3731
|
+
}
|
|
3732
|
+
return then ? value.then(then) : value;
|
|
3733
|
+
}
|
|
3734
|
+
function _async(f) {
|
|
3735
|
+
return function () {
|
|
3736
|
+
for (var args = [], i = 0; i < arguments.length; i++) {
|
|
3737
|
+
args[i] = arguments[i];
|
|
3738
|
+
}
|
|
3739
|
+
try {
|
|
3740
|
+
return Promise.resolve(f.apply(this, args));
|
|
3741
|
+
} catch (e) {
|
|
3742
|
+
return Promise.reject(e);
|
|
3743
|
+
}
|
|
3744
|
+
};
|
|
3745
|
+
}
|
|
2521
3746
|
function transformAndValidateResultFactory(defaults) {
|
|
2522
3747
|
const factory = transformAndValidateObjectFactory(defaults);
|
|
2523
3748
|
return (classType, fn, handleValidationError) => {
|
|
2524
3749
|
const transformAndValidateObjectFn = factory(classType, fn, handleValidationError);
|
|
2525
|
-
return (input, context)
|
|
2526
|
-
|
|
3750
|
+
return _async(function (input, context) {
|
|
3751
|
+
return _await(transformAndValidateObjectFn(input, context), function ({
|
|
2527
3752
|
result
|
|
2528
|
-
}
|
|
2529
|
-
|
|
3753
|
+
}) {
|
|
3754
|
+
return result;
|
|
3755
|
+
});
|
|
2530
3756
|
});
|
|
2531
3757
|
};
|
|
2532
3758
|
}
|
|
@@ -2543,7 +3769,7 @@ function IsISO8601DayString(validationOptions) {
|
|
|
2543
3769
|
options: validationOptions,
|
|
2544
3770
|
validator: {
|
|
2545
3771
|
validate: util.isISO8601DayString,
|
|
2546
|
-
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args
|
|
3772
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args == null ? void 0 : args.value}" is not a ISO8601DayString.`, validationOptions)
|
|
2547
3773
|
}
|
|
2548
3774
|
});
|
|
2549
3775
|
};
|
|
@@ -2561,7 +3787,7 @@ function IsMinuteOfDay(validationOptions) {
|
|
|
2561
3787
|
options: validationOptions,
|
|
2562
3788
|
validator: {
|
|
2563
3789
|
validate: util.isMinuteOfDay,
|
|
2564
|
-
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args
|
|
3790
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args == null ? void 0 : args.value}" is not a valid minute of the day.`, validationOptions)
|
|
2565
3791
|
}
|
|
2566
3792
|
});
|
|
2567
3793
|
};
|
|
@@ -2579,7 +3805,7 @@ function IsE164PhoneNumber(validationOptions) {
|
|
|
2579
3805
|
options: validationOptions,
|
|
2580
3806
|
validator: {
|
|
2581
3807
|
validate: x => util.isE164PhoneNumber(x, false),
|
|
2582
|
-
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args
|
|
3808
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args == null ? void 0 : args.value}" is not a E164PhoneNumber with no extension.`, validationOptions)
|
|
2583
3809
|
}
|
|
2584
3810
|
});
|
|
2585
3811
|
};
|
|
@@ -2599,7 +3825,7 @@ function IsE164PhoneNumberWithOptionalExtension(validationOptions) {
|
|
|
2599
3825
|
options: validationOptions,
|
|
2600
3826
|
validator: {
|
|
2601
3827
|
validate: x => util.isE164PhoneNumber(x, true),
|
|
2602
|
-
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args
|
|
3828
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args == null ? void 0 : args.value}" is not an E164PhoneNumber or has an invalid extension.`, validationOptions)
|
|
2603
3829
|
}
|
|
2604
3830
|
});
|
|
2605
3831
|
};
|
|
@@ -2619,7 +3845,7 @@ function IsE164PhoneNumberWithExtension(validationOptions) {
|
|
|
2619
3845
|
options: validationOptions,
|
|
2620
3846
|
validator: {
|
|
2621
3847
|
validate: util.isE164PhoneNumberWithExtension,
|
|
2622
|
-
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args
|
|
3848
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args == null ? void 0 : args.value}" is not a E164PhoneNumberWithExtension.`, validationOptions)
|
|
2623
3849
|
}
|
|
2624
3850
|
});
|
|
2625
3851
|
};
|
|
@@ -2656,7 +3882,7 @@ function IsWebsiteUrl(validationOptions) {
|
|
|
2656
3882
|
options: validationOptions,
|
|
2657
3883
|
validator: {
|
|
2658
3884
|
validate: util.isWebsiteUrl,
|
|
2659
|
-
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args
|
|
3885
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args == null ? void 0 : args.value}" is not a valid website url.`, validationOptions)
|
|
2660
3886
|
}
|
|
2661
3887
|
});
|
|
2662
3888
|
};
|
|
@@ -2673,7 +3899,7 @@ function IsWebsiteUrlWithPrefix(validationOptions) {
|
|
|
2673
3899
|
options: validationOptions,
|
|
2674
3900
|
validator: {
|
|
2675
3901
|
validate: util.isWebsiteUrlWithPrefix,
|
|
2676
|
-
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args
|
|
3902
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args == null ? void 0 : args.value}" is not a valid website url that starts with a http/https prefix.`, validationOptions)
|
|
2677
3903
|
}
|
|
2678
3904
|
});
|
|
2679
3905
|
};
|