@openfeature/flagd-provider 0.3.0 → 0.5.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/README.md +32 -16
- package/index.cjs +877 -882
- package/index.js +835 -837
- package/lib/configuration.d.ts +33 -0
- package/lib/flagd-provider.d.ts +9 -13
- package/lib/service/grpc/service.d.ts +9 -12
- package/lib/service/service.d.ts +7 -0
- package/package.json +2 -3
- package/lib/service/Service.d.ts +0 -7
- package/lib/service/http/service.d.ts +0 -16
package/index.js
CHANGED
|
@@ -1,26 +1,33 @@
|
|
|
1
|
-
import { StandardResolutionReasons, ErrorCode } from '@openfeature/nodejs-sdk';
|
|
2
|
-
import axios from 'axios';
|
|
3
|
-
import { GrpcTransport } from '@protobuf-ts/grpc-transport';
|
|
4
1
|
import * as grpc from '@grpc/grpc-js';
|
|
2
|
+
import { ParseError } from '@openfeature/js-sdk';
|
|
3
|
+
import { GrpcTransport } from '@protobuf-ts/grpc-transport';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
5
|
+
/******************************************************************************
|
|
6
|
+
Copyright (c) Microsoft Corporation.
|
|
7
|
+
|
|
8
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
9
|
+
purpose with or without fee is hereby granted.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
12
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
13
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
14
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
15
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
16
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
17
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
+
***************************************************************************** */
|
|
19
|
+
|
|
20
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
21
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
23
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
24
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
25
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
26
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27
|
+
});
|
|
28
|
+
}
|
|
22
29
|
|
|
23
|
-
var
|
|
30
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
24
31
|
|
|
25
32
|
var fails$c = function (exec) {
|
|
26
33
|
try {
|
|
@@ -32,15 +39,7 @@ var fails$c = function (exec) {
|
|
|
32
39
|
|
|
33
40
|
var fails$b = fails$c;
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
var descriptors = !fails$b(function () {
|
|
37
|
-
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
38
|
-
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
var fails$a = fails$c;
|
|
42
|
-
|
|
43
|
-
var functionBindNative = !fails$a(function () {
|
|
42
|
+
var functionBindNative = !fails$b(function () {
|
|
44
43
|
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
|
45
44
|
var test = (function () { /* empty */ }).bind();
|
|
46
45
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
@@ -49,49 +48,16 @@ var functionBindNative = !fails$a(function () {
|
|
|
49
48
|
|
|
50
49
|
var NATIVE_BIND$1 = functionBindNative;
|
|
51
50
|
|
|
52
|
-
var call$7 = Function.prototype.call;
|
|
53
|
-
|
|
54
|
-
var functionCall = NATIVE_BIND$1 ? call$7.bind(call$7) : function () {
|
|
55
|
-
return call$7.apply(call$7, arguments);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
var objectPropertyIsEnumerable = {};
|
|
59
|
-
|
|
60
|
-
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
61
|
-
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
62
|
-
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
63
|
-
|
|
64
|
-
// Nashorn ~ JDK8 bug
|
|
65
|
-
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
66
|
-
|
|
67
|
-
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
68
|
-
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
69
|
-
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
70
|
-
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
71
|
-
return !!descriptor && descriptor.enumerable;
|
|
72
|
-
} : $propertyIsEnumerable;
|
|
73
|
-
|
|
74
|
-
var createPropertyDescriptor$3 = function (bitmap, value) {
|
|
75
|
-
return {
|
|
76
|
-
enumerable: !(bitmap & 1),
|
|
77
|
-
configurable: !(bitmap & 2),
|
|
78
|
-
writable: !(bitmap & 4),
|
|
79
|
-
value: value
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
var NATIVE_BIND = functionBindNative;
|
|
84
|
-
|
|
85
51
|
var FunctionPrototype$1 = Function.prototype;
|
|
86
52
|
var bind = FunctionPrototype$1.bind;
|
|
87
|
-
var call$
|
|
88
|
-
var uncurryThis$b = NATIVE_BIND && bind.bind(call$
|
|
53
|
+
var call$7 = FunctionPrototype$1.call;
|
|
54
|
+
var uncurryThis$b = NATIVE_BIND$1 && bind.bind(call$7, call$7);
|
|
89
55
|
|
|
90
|
-
var functionUncurryThis = NATIVE_BIND ? function (fn) {
|
|
56
|
+
var functionUncurryThis = NATIVE_BIND$1 ? function (fn) {
|
|
91
57
|
return fn && uncurryThis$b(fn);
|
|
92
58
|
} : function (fn) {
|
|
93
59
|
return fn && function () {
|
|
94
|
-
return call$
|
|
60
|
+
return call$7.apply(fn, arguments);
|
|
95
61
|
};
|
|
96
62
|
};
|
|
97
63
|
|
|
@@ -105,14 +71,14 @@ var classofRaw$1 = function (it) {
|
|
|
105
71
|
};
|
|
106
72
|
|
|
107
73
|
var uncurryThis$9 = functionUncurryThis;
|
|
108
|
-
var fails$
|
|
74
|
+
var fails$a = fails$c;
|
|
109
75
|
var classof$2 = classofRaw$1;
|
|
110
76
|
|
|
111
77
|
var $Object$4 = Object;
|
|
112
78
|
var split = uncurryThis$9(''.split);
|
|
113
79
|
|
|
114
80
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
115
|
-
var indexedObject = fails$
|
|
81
|
+
var indexedObject = fails$a(function () {
|
|
116
82
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
117
83
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
118
84
|
return !$Object$4('z').propertyIsEnumerable(0);
|
|
@@ -137,43 +103,115 @@ var toIndexedObject$5 = function (it) {
|
|
|
137
103
|
return IndexedObject$1(requireObjectCoercible$1(it));
|
|
138
104
|
};
|
|
139
105
|
|
|
106
|
+
var check = function (it) {
|
|
107
|
+
return it && it.Math == Math && it;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
111
|
+
var global$c =
|
|
112
|
+
// eslint-disable-next-line es-x/no-global-this -- safe
|
|
113
|
+
check(typeof globalThis == 'object' && globalThis) ||
|
|
114
|
+
check(typeof window == 'object' && window) ||
|
|
115
|
+
// eslint-disable-next-line no-restricted-globals -- safe
|
|
116
|
+
check(typeof self == 'object' && self) ||
|
|
117
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
118
|
+
// eslint-disable-next-line no-new-func -- fallback
|
|
119
|
+
(function () { return this; })() || Function('return this')();
|
|
120
|
+
|
|
121
|
+
var shared$3 = {exports: {}};
|
|
122
|
+
|
|
123
|
+
var global$b = global$c;
|
|
124
|
+
|
|
125
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
126
|
+
var defineProperty$5 = Object.defineProperty;
|
|
127
|
+
|
|
128
|
+
var defineGlobalProperty$3 = function (key, value) {
|
|
129
|
+
try {
|
|
130
|
+
defineProperty$5(global$b, key, { value: value, configurable: true, writable: true });
|
|
131
|
+
} catch (error) {
|
|
132
|
+
global$b[key] = value;
|
|
133
|
+
} return value;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
var global$a = global$c;
|
|
137
|
+
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
138
|
+
|
|
139
|
+
var SHARED = '__core-js_shared__';
|
|
140
|
+
var store$3 = global$a[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
141
|
+
|
|
142
|
+
var sharedStore = store$3;
|
|
143
|
+
|
|
144
|
+
var store$2 = sharedStore;
|
|
145
|
+
|
|
146
|
+
(shared$3.exports = function (key, value) {
|
|
147
|
+
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
148
|
+
})('versions', []).push({
|
|
149
|
+
version: '3.22.8',
|
|
150
|
+
mode: 'global',
|
|
151
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
152
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.22.8/LICENSE',
|
|
153
|
+
source: 'https://github.com/zloirock/core-js'
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
var requireObjectCoercible = requireObjectCoercible$2;
|
|
157
|
+
|
|
158
|
+
var $Object$3 = Object;
|
|
159
|
+
|
|
160
|
+
// `ToObject` abstract operation
|
|
161
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
162
|
+
var toObject$3 = function (argument) {
|
|
163
|
+
return $Object$3(requireObjectCoercible(argument));
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
167
|
+
var toObject$2 = toObject$3;
|
|
168
|
+
|
|
169
|
+
var hasOwnProperty = uncurryThis$8({}.hasOwnProperty);
|
|
170
|
+
|
|
171
|
+
// `HasOwnProperty` abstract operation
|
|
172
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
173
|
+
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
|
174
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
175
|
+
return hasOwnProperty(toObject$2(it), key);
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
179
|
+
|
|
180
|
+
var id = 0;
|
|
181
|
+
var postfix = Math.random();
|
|
182
|
+
var toString$1 = uncurryThis$7(1.0.toString);
|
|
183
|
+
|
|
184
|
+
var uid$2 = function (key) {
|
|
185
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);
|
|
186
|
+
};
|
|
187
|
+
|
|
140
188
|
// `IsCallable` abstract operation
|
|
141
189
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
142
190
|
var isCallable$f = function (argument) {
|
|
143
191
|
return typeof argument == 'function';
|
|
144
192
|
};
|
|
145
193
|
|
|
194
|
+
var global$9 = global$c;
|
|
146
195
|
var isCallable$e = isCallable$f;
|
|
147
196
|
|
|
148
|
-
var isObject$5 = function (it) {
|
|
149
|
-
return typeof it == 'object' ? it !== null : isCallable$e(it);
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
var global$b = global$c;
|
|
153
|
-
var isCallable$d = isCallable$f;
|
|
154
|
-
|
|
155
197
|
var aFunction = function (argument) {
|
|
156
|
-
return isCallable$
|
|
198
|
+
return isCallable$e(argument) ? argument : undefined;
|
|
157
199
|
};
|
|
158
200
|
|
|
159
201
|
var getBuiltIn$4 = function (namespace, method) {
|
|
160
|
-
return arguments.length < 2 ? aFunction(global$
|
|
202
|
+
return arguments.length < 2 ? aFunction(global$9[namespace]) : global$9[namespace] && global$9[namespace][method];
|
|
161
203
|
};
|
|
162
204
|
|
|
163
|
-
var uncurryThis$8 = functionUncurryThis;
|
|
164
|
-
|
|
165
|
-
var objectIsPrototypeOf = uncurryThis$8({}.isPrototypeOf);
|
|
166
|
-
|
|
167
205
|
var getBuiltIn$3 = getBuiltIn$4;
|
|
168
206
|
|
|
169
207
|
var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
|
|
170
208
|
|
|
171
|
-
var global$
|
|
209
|
+
var global$8 = global$c;
|
|
172
210
|
var userAgent = engineUserAgent;
|
|
173
211
|
|
|
174
|
-
var process = global$
|
|
175
|
-
var Deno = global$
|
|
176
|
-
var versions = process && process.versions || Deno && Deno.version;
|
|
212
|
+
var process$1 = global$8.process;
|
|
213
|
+
var Deno = global$8.Deno;
|
|
214
|
+
var versions = process$1 && process$1.versions || Deno && Deno.version;
|
|
177
215
|
var v8 = versions && versions.v8;
|
|
178
216
|
var match, version;
|
|
179
217
|
|
|
@@ -199,10 +237,10 @@ var engineV8Version = version;
|
|
|
199
237
|
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
200
238
|
|
|
201
239
|
var V8_VERSION = engineV8Version;
|
|
202
|
-
var fails$
|
|
240
|
+
var fails$9 = fails$c;
|
|
203
241
|
|
|
204
242
|
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
|
205
|
-
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$
|
|
243
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$9(function () {
|
|
206
244
|
var symbol = Symbol();
|
|
207
245
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
208
246
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -219,179 +257,189 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
|
219
257
|
&& !Symbol.sham
|
|
220
258
|
&& typeof Symbol.iterator == 'symbol';
|
|
221
259
|
|
|
222
|
-
var
|
|
223
|
-
var
|
|
224
|
-
var
|
|
260
|
+
var global$7 = global$c;
|
|
261
|
+
var shared$2 = shared$3.exports;
|
|
262
|
+
var hasOwn$9 = hasOwnProperty_1;
|
|
263
|
+
var uid$1 = uid$2;
|
|
264
|
+
var NATIVE_SYMBOL = nativeSymbol;
|
|
225
265
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
226
266
|
|
|
227
|
-
var
|
|
267
|
+
var WellKnownSymbolsStore = shared$2('wks');
|
|
268
|
+
var Symbol$1 = global$7.Symbol;
|
|
269
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
270
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
228
271
|
|
|
229
|
-
var
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
272
|
+
var wellKnownSymbol$8 = function (name) {
|
|
273
|
+
if (!hasOwn$9(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
274
|
+
var description = 'Symbol.' + name;
|
|
275
|
+
if (NATIVE_SYMBOL && hasOwn$9(Symbol$1, name)) {
|
|
276
|
+
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
277
|
+
} else if (USE_SYMBOL_AS_UID$1 && symbolFor) {
|
|
278
|
+
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
279
|
+
} else {
|
|
280
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
281
|
+
}
|
|
282
|
+
} return WellKnownSymbolsStore[name];
|
|
234
283
|
};
|
|
235
284
|
|
|
236
|
-
var $
|
|
285
|
+
var isCallable$d = isCallable$f;
|
|
237
286
|
|
|
238
|
-
var
|
|
239
|
-
|
|
240
|
-
return $String$3(argument);
|
|
241
|
-
} catch (error) {
|
|
242
|
-
return 'Object';
|
|
243
|
-
}
|
|
287
|
+
var isObject$5 = function (it) {
|
|
288
|
+
return typeof it == 'object' ? it !== null : isCallable$d(it);
|
|
244
289
|
};
|
|
245
290
|
|
|
246
|
-
var
|
|
247
|
-
var tryToString = tryToString$1;
|
|
291
|
+
var isObject$4 = isObject$5;
|
|
248
292
|
|
|
293
|
+
var $String$3 = String;
|
|
249
294
|
var $TypeError$5 = TypeError;
|
|
250
295
|
|
|
251
|
-
// `Assert:
|
|
252
|
-
var
|
|
253
|
-
if (
|
|
254
|
-
throw $TypeError$5(
|
|
296
|
+
// `Assert: Type(argument) is Object`
|
|
297
|
+
var anObject$7 = function (argument) {
|
|
298
|
+
if (isObject$4(argument)) return argument;
|
|
299
|
+
throw $TypeError$5($String$3(argument) + ' is not an object');
|
|
255
300
|
};
|
|
256
301
|
|
|
257
|
-
var
|
|
302
|
+
var objectDefineProperties = {};
|
|
258
303
|
|
|
259
|
-
|
|
260
|
-
// https://tc39.es/ecma262/#sec-getmethod
|
|
261
|
-
var getMethod$1 = function (V, P) {
|
|
262
|
-
var func = V[P];
|
|
263
|
-
return func == null ? undefined : aCallable(func);
|
|
264
|
-
};
|
|
304
|
+
var fails$8 = fails$c;
|
|
265
305
|
|
|
266
|
-
|
|
267
|
-
var
|
|
268
|
-
|
|
306
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
307
|
+
var descriptors = !fails$8(function () {
|
|
308
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
309
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
310
|
+
});
|
|
269
311
|
|
|
270
|
-
var $
|
|
312
|
+
var DESCRIPTORS$9 = descriptors;
|
|
313
|
+
var fails$7 = fails$c;
|
|
271
314
|
|
|
272
|
-
//
|
|
273
|
-
// https://
|
|
274
|
-
var
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
};
|
|
315
|
+
// V8 ~ Chrome 36-
|
|
316
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
317
|
+
var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$7(function () {
|
|
318
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
319
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
320
|
+
value: 42,
|
|
321
|
+
writable: false
|
|
322
|
+
}).prototype != 42;
|
|
323
|
+
});
|
|
281
324
|
|
|
282
|
-
var
|
|
325
|
+
var objectDefineProperty = {};
|
|
283
326
|
|
|
284
|
-
var global$
|
|
327
|
+
var global$6 = global$c;
|
|
328
|
+
var isObject$3 = isObject$5;
|
|
285
329
|
|
|
286
|
-
|
|
287
|
-
|
|
330
|
+
var document$1 = global$6.document;
|
|
331
|
+
// typeof document.createElement is 'object' in old IE
|
|
332
|
+
var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
|
|
288
333
|
|
|
289
|
-
var
|
|
290
|
-
|
|
291
|
-
defineProperty$5(global$9, key, { value: value, configurable: true, writable: true });
|
|
292
|
-
} catch (error) {
|
|
293
|
-
global$9[key] = value;
|
|
294
|
-
} return value;
|
|
334
|
+
var documentCreateElement$2 = function (it) {
|
|
335
|
+
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
295
336
|
};
|
|
296
337
|
|
|
297
|
-
var
|
|
298
|
-
var
|
|
338
|
+
var DESCRIPTORS$8 = descriptors;
|
|
339
|
+
var fails$6 = fails$c;
|
|
340
|
+
var createElement = documentCreateElement$2;
|
|
299
341
|
|
|
300
|
-
|
|
301
|
-
var
|
|
342
|
+
// Thanks to IE8 for its funny defineProperty
|
|
343
|
+
var ie8DomDefine = !DESCRIPTORS$8 && !fails$6(function () {
|
|
344
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
345
|
+
return Object.defineProperty(createElement('div'), 'a', {
|
|
346
|
+
get: function () { return 7; }
|
|
347
|
+
}).a != 7;
|
|
348
|
+
});
|
|
302
349
|
|
|
303
|
-
var
|
|
350
|
+
var NATIVE_BIND = functionBindNative;
|
|
304
351
|
|
|
305
|
-
var
|
|
352
|
+
var call$6 = Function.prototype.call;
|
|
306
353
|
|
|
307
|
-
(
|
|
308
|
-
return
|
|
309
|
-
}
|
|
310
|
-
version: '3.22.8',
|
|
311
|
-
mode: 'global',
|
|
312
|
-
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
313
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.22.8/LICENSE',
|
|
314
|
-
source: 'https://github.com/zloirock/core-js'
|
|
315
|
-
});
|
|
354
|
+
var functionCall = NATIVE_BIND ? call$6.bind(call$6) : function () {
|
|
355
|
+
return call$6.apply(call$6, arguments);
|
|
356
|
+
};
|
|
316
357
|
|
|
317
|
-
var
|
|
358
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
359
|
+
|
|
360
|
+
var objectIsPrototypeOf = uncurryThis$6({}.isPrototypeOf);
|
|
361
|
+
|
|
362
|
+
var getBuiltIn$2 = getBuiltIn$4;
|
|
363
|
+
var isCallable$c = isCallable$f;
|
|
364
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
365
|
+
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
318
366
|
|
|
319
367
|
var $Object$2 = Object;
|
|
320
368
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
369
|
+
var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
|
|
370
|
+
return typeof it == 'symbol';
|
|
371
|
+
} : function (it) {
|
|
372
|
+
var $Symbol = getBuiltIn$2('Symbol');
|
|
373
|
+
return isCallable$c($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$2(it));
|
|
325
374
|
};
|
|
326
375
|
|
|
327
|
-
var
|
|
328
|
-
var toObject$2 = toObject$3;
|
|
329
|
-
|
|
330
|
-
var hasOwnProperty = uncurryThis$7({}.hasOwnProperty);
|
|
376
|
+
var $String$2 = String;
|
|
331
377
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
378
|
+
var tryToString$1 = function (argument) {
|
|
379
|
+
try {
|
|
380
|
+
return $String$2(argument);
|
|
381
|
+
} catch (error) {
|
|
382
|
+
return 'Object';
|
|
383
|
+
}
|
|
337
384
|
};
|
|
338
385
|
|
|
339
|
-
var
|
|
386
|
+
var isCallable$b = isCallable$f;
|
|
387
|
+
var tryToString = tryToString$1;
|
|
340
388
|
|
|
341
|
-
var
|
|
342
|
-
var postfix = Math.random();
|
|
343
|
-
var toString$1 = uncurryThis$6(1.0.toString);
|
|
389
|
+
var $TypeError$4 = TypeError;
|
|
344
390
|
|
|
345
|
-
|
|
346
|
-
|
|
391
|
+
// `Assert: IsCallable(argument) is true`
|
|
392
|
+
var aCallable$1 = function (argument) {
|
|
393
|
+
if (isCallable$b(argument)) return argument;
|
|
394
|
+
throw $TypeError$4(tryToString(argument) + ' is not a function');
|
|
347
395
|
};
|
|
348
396
|
|
|
349
|
-
var
|
|
350
|
-
var shared$2 = shared$3.exports;
|
|
351
|
-
var hasOwn$9 = hasOwnProperty_1;
|
|
352
|
-
var uid$1 = uid$2;
|
|
353
|
-
var NATIVE_SYMBOL = nativeSymbol;
|
|
354
|
-
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
397
|
+
var aCallable = aCallable$1;
|
|
355
398
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
var
|
|
359
|
-
var
|
|
399
|
+
// `GetMethod` abstract operation
|
|
400
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
401
|
+
var getMethod$1 = function (V, P) {
|
|
402
|
+
var func = V[P];
|
|
403
|
+
return func == null ? undefined : aCallable(func);
|
|
404
|
+
};
|
|
360
405
|
|
|
361
|
-
var
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
406
|
+
var call$5 = functionCall;
|
|
407
|
+
var isCallable$a = isCallable$f;
|
|
408
|
+
var isObject$2 = isObject$5;
|
|
409
|
+
|
|
410
|
+
var $TypeError$3 = TypeError;
|
|
411
|
+
|
|
412
|
+
// `OrdinaryToPrimitive` abstract operation
|
|
413
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
414
|
+
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
415
|
+
var fn, val;
|
|
416
|
+
if (pref === 'string' && isCallable$a(fn = input.toString) && !isObject$2(val = call$5(fn, input))) return val;
|
|
417
|
+
if (isCallable$a(fn = input.valueOf) && !isObject$2(val = call$5(fn, input))) return val;
|
|
418
|
+
if (pref !== 'string' && isCallable$a(fn = input.toString) && !isObject$2(val = call$5(fn, input))) return val;
|
|
419
|
+
throw $TypeError$3("Can't convert object to primitive value");
|
|
372
420
|
};
|
|
373
421
|
|
|
374
422
|
var call$4 = functionCall;
|
|
375
|
-
var isObject$
|
|
423
|
+
var isObject$1 = isObject$5;
|
|
376
424
|
var isSymbol$1 = isSymbol$2;
|
|
377
425
|
var getMethod = getMethod$1;
|
|
378
426
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
379
427
|
var wellKnownSymbol$7 = wellKnownSymbol$8;
|
|
380
428
|
|
|
381
|
-
var $TypeError$
|
|
429
|
+
var $TypeError$2 = TypeError;
|
|
382
430
|
var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
|
|
383
431
|
|
|
384
432
|
// `ToPrimitive` abstract operation
|
|
385
433
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
386
434
|
var toPrimitive$1 = function (input, pref) {
|
|
387
|
-
if (!isObject$
|
|
435
|
+
if (!isObject$1(input) || isSymbol$1(input)) return input;
|
|
388
436
|
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
389
437
|
var result;
|
|
390
438
|
if (exoticToPrim) {
|
|
391
439
|
if (pref === undefined) pref = 'default';
|
|
392
440
|
result = call$4(exoticToPrim, input, pref);
|
|
393
|
-
if (!isObject$
|
|
394
|
-
throw $TypeError$
|
|
441
|
+
if (!isObject$1(result) || isSymbol$1(result)) return result;
|
|
442
|
+
throw $TypeError$2("Can't convert object to primitive value");
|
|
395
443
|
}
|
|
396
444
|
if (pref === undefined) pref = 'number';
|
|
397
445
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -407,101 +455,29 @@ var toPropertyKey$2 = function (argument) {
|
|
|
407
455
|
return isSymbol(key) ? key : key + '';
|
|
408
456
|
};
|
|
409
457
|
|
|
410
|
-
var global$6 = global$c;
|
|
411
|
-
var isObject$2 = isObject$5;
|
|
412
|
-
|
|
413
|
-
var document$1 = global$6.document;
|
|
414
|
-
// typeof document.createElement is 'object' in old IE
|
|
415
|
-
var EXISTS$1 = isObject$2(document$1) && isObject$2(document$1.createElement);
|
|
416
|
-
|
|
417
|
-
var documentCreateElement$2 = function (it) {
|
|
418
|
-
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
419
|
-
};
|
|
420
|
-
|
|
421
|
-
var DESCRIPTORS$9 = descriptors;
|
|
422
|
-
var fails$7 = fails$c;
|
|
423
|
-
var createElement = documentCreateElement$2;
|
|
424
|
-
|
|
425
|
-
// Thanks to IE8 for its funny defineProperty
|
|
426
|
-
var ie8DomDefine = !DESCRIPTORS$9 && !fails$7(function () {
|
|
427
|
-
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
428
|
-
return Object.defineProperty(createElement('div'), 'a', {
|
|
429
|
-
get: function () { return 7; }
|
|
430
|
-
}).a != 7;
|
|
431
|
-
});
|
|
432
|
-
|
|
433
|
-
var DESCRIPTORS$8 = descriptors;
|
|
434
|
-
var call$3 = functionCall;
|
|
435
|
-
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
436
|
-
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
437
|
-
var toIndexedObject$4 = toIndexedObject$5;
|
|
438
|
-
var toPropertyKey$1 = toPropertyKey$2;
|
|
439
|
-
var hasOwn$8 = hasOwnProperty_1;
|
|
440
|
-
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
441
|
-
|
|
442
|
-
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
443
|
-
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
444
|
-
|
|
445
|
-
// `Object.getOwnPropertyDescriptor` method
|
|
446
|
-
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
447
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
448
|
-
O = toIndexedObject$4(O);
|
|
449
|
-
P = toPropertyKey$1(P);
|
|
450
|
-
if (IE8_DOM_DEFINE$1) try {
|
|
451
|
-
return $getOwnPropertyDescriptor$1(O, P);
|
|
452
|
-
} catch (error) { /* empty */ }
|
|
453
|
-
if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$3(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
454
|
-
};
|
|
455
|
-
|
|
456
|
-
var objectDefineProperty = {};
|
|
457
|
-
|
|
458
458
|
var DESCRIPTORS$7 = descriptors;
|
|
459
|
-
var
|
|
460
|
-
|
|
461
|
-
// V8 ~ Chrome 36-
|
|
462
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
463
|
-
var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$6(function () {
|
|
464
|
-
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
465
|
-
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
466
|
-
value: 42,
|
|
467
|
-
writable: false
|
|
468
|
-
}).prototype != 42;
|
|
469
|
-
});
|
|
470
|
-
|
|
471
|
-
var isObject$1 = isObject$5;
|
|
472
|
-
|
|
473
|
-
var $String$2 = String;
|
|
474
|
-
var $TypeError$2 = TypeError;
|
|
475
|
-
|
|
476
|
-
// `Assert: Type(argument) is Object`
|
|
477
|
-
var anObject$7 = function (argument) {
|
|
478
|
-
if (isObject$1(argument)) return argument;
|
|
479
|
-
throw $TypeError$2($String$2(argument) + ' is not an object');
|
|
480
|
-
};
|
|
481
|
-
|
|
482
|
-
var DESCRIPTORS$6 = descriptors;
|
|
483
|
-
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
459
|
+
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
484
460
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
485
461
|
var anObject$6 = anObject$7;
|
|
486
|
-
var toPropertyKey = toPropertyKey$2;
|
|
462
|
+
var toPropertyKey$1 = toPropertyKey$2;
|
|
487
463
|
|
|
488
464
|
var $TypeError$1 = TypeError;
|
|
489
465
|
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
490
466
|
var $defineProperty = Object.defineProperty;
|
|
491
467
|
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
492
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
468
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
493
469
|
var ENUMERABLE = 'enumerable';
|
|
494
470
|
var CONFIGURABLE$1 = 'configurable';
|
|
495
471
|
var WRITABLE = 'writable';
|
|
496
472
|
|
|
497
473
|
// `Object.defineProperty` method
|
|
498
474
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
499
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
475
|
+
objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
500
476
|
anObject$6(O);
|
|
501
|
-
P = toPropertyKey(P);
|
|
477
|
+
P = toPropertyKey$1(P);
|
|
502
478
|
anObject$6(Attributes);
|
|
503
479
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
504
|
-
var current = $getOwnPropertyDescriptor(O, P);
|
|
480
|
+
var current = $getOwnPropertyDescriptor$1(O, P);
|
|
505
481
|
if (current && current[WRITABLE]) {
|
|
506
482
|
O[P] = Attributes.value;
|
|
507
483
|
Attributes = {
|
|
@@ -513,9 +489,9 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
513
489
|
} return $defineProperty(O, P, Attributes);
|
|
514
490
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
515
491
|
anObject$6(O);
|
|
516
|
-
P = toPropertyKey(P);
|
|
492
|
+
P = toPropertyKey$1(P);
|
|
517
493
|
anObject$6(Attributes);
|
|
518
|
-
if (IE8_DOM_DEFINE) try {
|
|
494
|
+
if (IE8_DOM_DEFINE$1) try {
|
|
519
495
|
return $defineProperty(O, P, Attributes);
|
|
520
496
|
} catch (error) { /* empty */ }
|
|
521
497
|
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$1('Accessors not supported');
|
|
@@ -523,59 +499,159 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
523
499
|
return O;
|
|
524
500
|
};
|
|
525
501
|
|
|
526
|
-
var
|
|
527
|
-
var
|
|
528
|
-
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
502
|
+
var ceil = Math.ceil;
|
|
503
|
+
var floor = Math.floor;
|
|
529
504
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
505
|
+
// `Math.trunc` method
|
|
506
|
+
// https://tc39.es/ecma262/#sec-math.trunc
|
|
507
|
+
// eslint-disable-next-line es-x/no-math-trunc -- safe
|
|
508
|
+
var mathTrunc = Math.trunc || function trunc(x) {
|
|
509
|
+
var n = +x;
|
|
510
|
+
return (n > 0 ? floor : ceil)(n);
|
|
535
511
|
};
|
|
536
512
|
|
|
537
|
-
var
|
|
513
|
+
var trunc = mathTrunc;
|
|
538
514
|
|
|
539
|
-
|
|
540
|
-
|
|
515
|
+
// `ToIntegerOrInfinity` abstract operation
|
|
516
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
517
|
+
var toIntegerOrInfinity$2 = function (argument) {
|
|
518
|
+
var number = +argument;
|
|
519
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
520
|
+
return number !== number || number === 0 ? 0 : trunc(number);
|
|
521
|
+
};
|
|
541
522
|
|
|
542
|
-
var
|
|
543
|
-
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
544
|
-
var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
|
|
523
|
+
var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
|
|
545
524
|
|
|
546
|
-
var
|
|
547
|
-
|
|
548
|
-
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
549
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
525
|
+
var max = Math.max;
|
|
526
|
+
var min$1 = Math.min;
|
|
550
527
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
528
|
+
// Helper for a popular repeating case of the spec:
|
|
529
|
+
// Let integer be ? ToInteger(index).
|
|
530
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
531
|
+
var toAbsoluteIndex$1 = function (index, length) {
|
|
532
|
+
var integer = toIntegerOrInfinity$1(index);
|
|
533
|
+
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
555
534
|
};
|
|
556
535
|
|
|
557
|
-
var
|
|
558
|
-
var isCallable$9 = isCallable$f;
|
|
559
|
-
var store$1 = sharedStore;
|
|
560
|
-
|
|
561
|
-
var functionToString = uncurryThis$5(Function.toString);
|
|
536
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$2;
|
|
562
537
|
|
|
563
|
-
|
|
564
|
-
if (!isCallable$9(store$1.inspectSource)) {
|
|
565
|
-
store$1.inspectSource = function (it) {
|
|
566
|
-
return functionToString(it);
|
|
567
|
-
};
|
|
568
|
-
}
|
|
538
|
+
var min = Math.min;
|
|
569
539
|
|
|
570
|
-
|
|
540
|
+
// `ToLength` abstract operation
|
|
541
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
542
|
+
var toLength$1 = function (argument) {
|
|
543
|
+
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
544
|
+
};
|
|
571
545
|
|
|
572
|
-
var
|
|
573
|
-
var isCallable$8 = isCallable$f;
|
|
574
|
-
var inspectSource$1 = inspectSource$2;
|
|
546
|
+
var toLength = toLength$1;
|
|
575
547
|
|
|
576
|
-
|
|
548
|
+
// `LengthOfArrayLike` abstract operation
|
|
549
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
550
|
+
var lengthOfArrayLike$1 = function (obj) {
|
|
551
|
+
return toLength(obj.length);
|
|
552
|
+
};
|
|
577
553
|
|
|
578
|
-
var
|
|
554
|
+
var toIndexedObject$4 = toIndexedObject$5;
|
|
555
|
+
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
556
|
+
var lengthOfArrayLike = lengthOfArrayLike$1;
|
|
557
|
+
|
|
558
|
+
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
559
|
+
var createMethod = function (IS_INCLUDES) {
|
|
560
|
+
return function ($this, el, fromIndex) {
|
|
561
|
+
var O = toIndexedObject$4($this);
|
|
562
|
+
var length = lengthOfArrayLike(O);
|
|
563
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
564
|
+
var value;
|
|
565
|
+
// Array#includes uses SameValueZero equality algorithm
|
|
566
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
567
|
+
if (IS_INCLUDES && el != el) while (length > index) {
|
|
568
|
+
value = O[index++];
|
|
569
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
570
|
+
if (value != value) return true;
|
|
571
|
+
// Array#indexOf ignores holes, Array#includes - not
|
|
572
|
+
} else for (;length > index; index++) {
|
|
573
|
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
574
|
+
} return !IS_INCLUDES && -1;
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
var arrayIncludes = {
|
|
579
|
+
// `Array.prototype.includes` method
|
|
580
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
581
|
+
includes: createMethod(true),
|
|
582
|
+
// `Array.prototype.indexOf` method
|
|
583
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
584
|
+
indexOf: createMethod(false)
|
|
585
|
+
};
|
|
586
|
+
|
|
587
|
+
var hiddenKeys$4 = {};
|
|
588
|
+
|
|
589
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
590
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
591
|
+
var toIndexedObject$3 = toIndexedObject$5;
|
|
592
|
+
var indexOf = arrayIncludes.indexOf;
|
|
593
|
+
var hiddenKeys$3 = hiddenKeys$4;
|
|
594
|
+
|
|
595
|
+
var push = uncurryThis$5([].push);
|
|
596
|
+
|
|
597
|
+
var objectKeysInternal = function (object, names) {
|
|
598
|
+
var O = toIndexedObject$3(object);
|
|
599
|
+
var i = 0;
|
|
600
|
+
var result = [];
|
|
601
|
+
var key;
|
|
602
|
+
for (key in O) !hasOwn$8(hiddenKeys$3, key) && hasOwn$8(O, key) && push(result, key);
|
|
603
|
+
// Don't enum bug & hidden keys
|
|
604
|
+
while (names.length > i) if (hasOwn$8(O, key = names[i++])) {
|
|
605
|
+
~indexOf(result, key) || push(result, key);
|
|
606
|
+
}
|
|
607
|
+
return result;
|
|
608
|
+
};
|
|
609
|
+
|
|
610
|
+
// IE8- don't enum bug keys
|
|
611
|
+
var enumBugKeys$3 = [
|
|
612
|
+
'constructor',
|
|
613
|
+
'hasOwnProperty',
|
|
614
|
+
'isPrototypeOf',
|
|
615
|
+
'propertyIsEnumerable',
|
|
616
|
+
'toLocaleString',
|
|
617
|
+
'toString',
|
|
618
|
+
'valueOf'
|
|
619
|
+
];
|
|
620
|
+
|
|
621
|
+
var internalObjectKeys$1 = objectKeysInternal;
|
|
622
|
+
var enumBugKeys$2 = enumBugKeys$3;
|
|
623
|
+
|
|
624
|
+
// `Object.keys` method
|
|
625
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
626
|
+
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
627
|
+
var objectKeys$2 = Object.keys || function keys(O) {
|
|
628
|
+
return internalObjectKeys$1(O, enumBugKeys$2);
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
var DESCRIPTORS$6 = descriptors;
|
|
632
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
633
|
+
var definePropertyModule$2 = objectDefineProperty;
|
|
634
|
+
var anObject$5 = anObject$7;
|
|
635
|
+
var toIndexedObject$2 = toIndexedObject$5;
|
|
636
|
+
var objectKeys$1 = objectKeys$2;
|
|
637
|
+
|
|
638
|
+
// `Object.defineProperties` method
|
|
639
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
640
|
+
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
|
641
|
+
objectDefineProperties.f = DESCRIPTORS$6 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
642
|
+
anObject$5(O);
|
|
643
|
+
var props = toIndexedObject$2(Properties);
|
|
644
|
+
var keys = objectKeys$1(Properties);
|
|
645
|
+
var length = keys.length;
|
|
646
|
+
var index = 0;
|
|
647
|
+
var key;
|
|
648
|
+
while (length > index) definePropertyModule$2.f(O, key = keys[index++], props[key]);
|
|
649
|
+
return O;
|
|
650
|
+
};
|
|
651
|
+
|
|
652
|
+
var getBuiltIn$1 = getBuiltIn$4;
|
|
653
|
+
|
|
654
|
+
var html$1 = getBuiltIn$1('document', 'documentElement');
|
|
579
655
|
|
|
580
656
|
var shared$1 = shared$3.exports;
|
|
581
657
|
var uid = uid$2;
|
|
@@ -586,17 +662,166 @@ var sharedKey$3 = function (key) {
|
|
|
586
662
|
return keys[key] || (keys[key] = uid(key));
|
|
587
663
|
};
|
|
588
664
|
|
|
589
|
-
|
|
665
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
666
|
+
|
|
667
|
+
var anObject$4 = anObject$7;
|
|
668
|
+
var definePropertiesModule = objectDefineProperties;
|
|
669
|
+
var enumBugKeys$1 = enumBugKeys$3;
|
|
670
|
+
var hiddenKeys$2 = hiddenKeys$4;
|
|
671
|
+
var html = html$1;
|
|
672
|
+
var documentCreateElement$1 = documentCreateElement$2;
|
|
673
|
+
var sharedKey$2 = sharedKey$3;
|
|
674
|
+
|
|
675
|
+
var GT = '>';
|
|
676
|
+
var LT = '<';
|
|
677
|
+
var PROTOTYPE = 'prototype';
|
|
678
|
+
var SCRIPT = 'script';
|
|
679
|
+
var IE_PROTO$1 = sharedKey$2('IE_PROTO');
|
|
680
|
+
|
|
681
|
+
var EmptyConstructor = function () { /* empty */ };
|
|
682
|
+
|
|
683
|
+
var scriptTag = function (content) {
|
|
684
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
685
|
+
};
|
|
686
|
+
|
|
687
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
688
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
689
|
+
activeXDocument.write(scriptTag(''));
|
|
690
|
+
activeXDocument.close();
|
|
691
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
692
|
+
activeXDocument = null; // avoid memory leak
|
|
693
|
+
return temp;
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
697
|
+
var NullProtoObjectViaIFrame = function () {
|
|
698
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
699
|
+
var iframe = documentCreateElement$1('iframe');
|
|
700
|
+
var JS = 'java' + SCRIPT + ':';
|
|
701
|
+
var iframeDocument;
|
|
702
|
+
iframe.style.display = 'none';
|
|
703
|
+
html.appendChild(iframe);
|
|
704
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
705
|
+
iframe.src = String(JS);
|
|
706
|
+
iframeDocument = iframe.contentWindow.document;
|
|
707
|
+
iframeDocument.open();
|
|
708
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
709
|
+
iframeDocument.close();
|
|
710
|
+
return iframeDocument.F;
|
|
711
|
+
};
|
|
712
|
+
|
|
713
|
+
// Check for document.domain and active x support
|
|
714
|
+
// No need to use active x approach when document.domain is not set
|
|
715
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
716
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
717
|
+
// avoid IE GC bug
|
|
718
|
+
var activeXDocument;
|
|
719
|
+
var NullProtoObject = function () {
|
|
720
|
+
try {
|
|
721
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
722
|
+
} catch (error) { /* ignore */ }
|
|
723
|
+
NullProtoObject = typeof document != 'undefined'
|
|
724
|
+
? document.domain && activeXDocument
|
|
725
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
726
|
+
: NullProtoObjectViaIFrame()
|
|
727
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
728
|
+
var length = enumBugKeys$1.length;
|
|
729
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
|
|
730
|
+
return NullProtoObject();
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
hiddenKeys$2[IE_PROTO$1] = true;
|
|
734
|
+
|
|
735
|
+
// `Object.create` method
|
|
736
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
737
|
+
// eslint-disable-next-line es-x/no-object-create -- safe
|
|
738
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
739
|
+
var result;
|
|
740
|
+
if (O !== null) {
|
|
741
|
+
EmptyConstructor[PROTOTYPE] = anObject$4(O);
|
|
742
|
+
result = new EmptyConstructor();
|
|
743
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
744
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
745
|
+
result[IE_PROTO$1] = O;
|
|
746
|
+
} else result = NullProtoObject();
|
|
747
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
var wellKnownSymbol$6 = wellKnownSymbol$8;
|
|
751
|
+
var create$1 = objectCreate;
|
|
752
|
+
var defineProperty$4 = objectDefineProperty.f;
|
|
753
|
+
|
|
754
|
+
var UNSCOPABLES = wellKnownSymbol$6('unscopables');
|
|
755
|
+
var ArrayPrototype = Array.prototype;
|
|
756
|
+
|
|
757
|
+
// Array.prototype[@@unscopables]
|
|
758
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
759
|
+
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
760
|
+
defineProperty$4(ArrayPrototype, UNSCOPABLES, {
|
|
761
|
+
configurable: true,
|
|
762
|
+
value: create$1(null)
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
// add a key to Array.prototype[@@unscopables]
|
|
767
|
+
var addToUnscopables$1 = function (key) {
|
|
768
|
+
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
var iterators = {};
|
|
772
|
+
|
|
773
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
774
|
+
var isCallable$9 = isCallable$f;
|
|
775
|
+
var store$1 = sharedStore;
|
|
776
|
+
|
|
777
|
+
var functionToString = uncurryThis$4(Function.toString);
|
|
778
|
+
|
|
779
|
+
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
780
|
+
if (!isCallable$9(store$1.inspectSource)) {
|
|
781
|
+
store$1.inspectSource = function (it) {
|
|
782
|
+
return functionToString(it);
|
|
783
|
+
};
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
var inspectSource$2 = store$1.inspectSource;
|
|
787
|
+
|
|
788
|
+
var global$5 = global$c;
|
|
789
|
+
var isCallable$8 = isCallable$f;
|
|
790
|
+
var inspectSource$1 = inspectSource$2;
|
|
791
|
+
|
|
792
|
+
var WeakMap$1 = global$5.WeakMap;
|
|
793
|
+
|
|
794
|
+
var nativeWeakMap = isCallable$8(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
|
|
795
|
+
|
|
796
|
+
var createPropertyDescriptor$3 = function (bitmap, value) {
|
|
797
|
+
return {
|
|
798
|
+
enumerable: !(bitmap & 1),
|
|
799
|
+
configurable: !(bitmap & 2),
|
|
800
|
+
writable: !(bitmap & 4),
|
|
801
|
+
value: value
|
|
802
|
+
};
|
|
803
|
+
};
|
|
804
|
+
|
|
805
|
+
var DESCRIPTORS$5 = descriptors;
|
|
806
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
807
|
+
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
808
|
+
|
|
809
|
+
var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
|
|
810
|
+
return definePropertyModule$1.f(object, key, createPropertyDescriptor$2(1, value));
|
|
811
|
+
} : function (object, key, value) {
|
|
812
|
+
object[key] = value;
|
|
813
|
+
return object;
|
|
814
|
+
};
|
|
590
815
|
|
|
591
816
|
var NATIVE_WEAK_MAP = nativeWeakMap;
|
|
592
817
|
var global$4 = global$c;
|
|
593
|
-
var uncurryThis$
|
|
818
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
594
819
|
var isObject = isObject$5;
|
|
595
820
|
var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
|
|
596
|
-
var hasOwn$
|
|
821
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
597
822
|
var shared = sharedStore;
|
|
598
|
-
var sharedKey$
|
|
599
|
-
var hiddenKeys$
|
|
823
|
+
var sharedKey$1 = sharedKey$3;
|
|
824
|
+
var hiddenKeys$1 = hiddenKeys$4;
|
|
600
825
|
|
|
601
826
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
602
827
|
var TypeError$1 = global$4.TypeError;
|
|
@@ -618,9 +843,9 @@ var getterFor = function (TYPE) {
|
|
|
618
843
|
|
|
619
844
|
if (NATIVE_WEAK_MAP || shared.state) {
|
|
620
845
|
var store = shared.state || (shared.state = new WeakMap());
|
|
621
|
-
var wmget = uncurryThis$
|
|
622
|
-
var wmhas = uncurryThis$
|
|
623
|
-
var wmset = uncurryThis$
|
|
846
|
+
var wmget = uncurryThis$3(store.get);
|
|
847
|
+
var wmhas = uncurryThis$3(store.has);
|
|
848
|
+
var wmset = uncurryThis$3(store.set);
|
|
624
849
|
set = function (it, metadata) {
|
|
625
850
|
if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
626
851
|
metadata.facade = it;
|
|
@@ -634,19 +859,19 @@ if (NATIVE_WEAK_MAP || shared.state) {
|
|
|
634
859
|
return wmhas(store, it);
|
|
635
860
|
};
|
|
636
861
|
} else {
|
|
637
|
-
var STATE = sharedKey$
|
|
638
|
-
hiddenKeys$
|
|
862
|
+
var STATE = sharedKey$1('state');
|
|
863
|
+
hiddenKeys$1[STATE] = true;
|
|
639
864
|
set = function (it, metadata) {
|
|
640
|
-
if (hasOwn$
|
|
865
|
+
if (hasOwn$7(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
641
866
|
metadata.facade = it;
|
|
642
867
|
createNonEnumerableProperty$4(it, STATE, metadata);
|
|
643
868
|
return metadata;
|
|
644
869
|
};
|
|
645
870
|
get = function (it) {
|
|
646
|
-
return hasOwn$
|
|
871
|
+
return hasOwn$7(it, STATE) ? it[STATE] : {};
|
|
647
872
|
};
|
|
648
873
|
has = function (it) {
|
|
649
|
-
return hasOwn$
|
|
874
|
+
return hasOwn$7(it, STATE);
|
|
650
875
|
};
|
|
651
876
|
}
|
|
652
877
|
|
|
@@ -658,24 +883,85 @@ var internalState = {
|
|
|
658
883
|
getterFor: getterFor
|
|
659
884
|
};
|
|
660
885
|
|
|
661
|
-
var
|
|
662
|
-
var isCallable$7 = isCallable$f;
|
|
663
|
-
var hasOwn$5 = hasOwnProperty_1;
|
|
664
|
-
var DESCRIPTORS$3 = descriptors;
|
|
665
|
-
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
666
|
-
var inspectSource = inspectSource$2;
|
|
667
|
-
var InternalStateModule$1 = internalState;
|
|
886
|
+
var objectGetOwnPropertyDescriptor = {};
|
|
668
887
|
|
|
669
|
-
var
|
|
670
|
-
var getInternalState$1 = InternalStateModule$1.get;
|
|
671
|
-
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
672
|
-
var defineProperty$4 = Object.defineProperty;
|
|
888
|
+
var objectPropertyIsEnumerable = {};
|
|
673
889
|
|
|
674
|
-
var
|
|
675
|
-
|
|
676
|
-
|
|
890
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
891
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
892
|
+
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
677
893
|
|
|
678
|
-
|
|
894
|
+
// Nashorn ~ JDK8 bug
|
|
895
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
896
|
+
|
|
897
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
898
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
899
|
+
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
900
|
+
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
901
|
+
return !!descriptor && descriptor.enumerable;
|
|
902
|
+
} : $propertyIsEnumerable;
|
|
903
|
+
|
|
904
|
+
var DESCRIPTORS$4 = descriptors;
|
|
905
|
+
var call$3 = functionCall;
|
|
906
|
+
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
907
|
+
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
908
|
+
var toIndexedObject$1 = toIndexedObject$5;
|
|
909
|
+
var toPropertyKey = toPropertyKey$2;
|
|
910
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
911
|
+
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
912
|
+
|
|
913
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
914
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
915
|
+
|
|
916
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
917
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
918
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$4 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
919
|
+
O = toIndexedObject$1(O);
|
|
920
|
+
P = toPropertyKey(P);
|
|
921
|
+
if (IE8_DOM_DEFINE) try {
|
|
922
|
+
return $getOwnPropertyDescriptor(O, P);
|
|
923
|
+
} catch (error) { /* empty */ }
|
|
924
|
+
if (hasOwn$6(O, P)) return createPropertyDescriptor$1(!call$3(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
925
|
+
};
|
|
926
|
+
|
|
927
|
+
var makeBuiltIn$2 = {exports: {}};
|
|
928
|
+
|
|
929
|
+
var DESCRIPTORS$3 = descriptors;
|
|
930
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
931
|
+
|
|
932
|
+
var FunctionPrototype = Function.prototype;
|
|
933
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
934
|
+
var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
|
|
935
|
+
|
|
936
|
+
var EXISTS = hasOwn$5(FunctionPrototype, 'name');
|
|
937
|
+
// additional protection from minified / mangled / dropped function names
|
|
938
|
+
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
939
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
940
|
+
|
|
941
|
+
var functionName = {
|
|
942
|
+
EXISTS: EXISTS,
|
|
943
|
+
PROPER: PROPER,
|
|
944
|
+
CONFIGURABLE: CONFIGURABLE
|
|
945
|
+
};
|
|
946
|
+
|
|
947
|
+
var fails$5 = fails$c;
|
|
948
|
+
var isCallable$7 = isCallable$f;
|
|
949
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
950
|
+
var DESCRIPTORS$2 = descriptors;
|
|
951
|
+
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
952
|
+
var inspectSource = inspectSource$2;
|
|
953
|
+
var InternalStateModule$1 = internalState;
|
|
954
|
+
|
|
955
|
+
var enforceInternalState = InternalStateModule$1.enforce;
|
|
956
|
+
var getInternalState$1 = InternalStateModule$1.get;
|
|
957
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
958
|
+
var defineProperty$3 = Object.defineProperty;
|
|
959
|
+
|
|
960
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$5(function () {
|
|
961
|
+
return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
962
|
+
});
|
|
963
|
+
|
|
964
|
+
var TEMPLATE = String(String).split('String');
|
|
679
965
|
|
|
680
966
|
var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
681
967
|
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
@@ -683,20 +969,20 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
|
683
969
|
}
|
|
684
970
|
if (options && options.getter) name = 'get ' + name;
|
|
685
971
|
if (options && options.setter) name = 'set ' + name;
|
|
686
|
-
if (!hasOwn$
|
|
687
|
-
defineProperty$
|
|
972
|
+
if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
973
|
+
defineProperty$3(value, 'name', { value: name, configurable: true });
|
|
688
974
|
}
|
|
689
|
-
if (CONFIGURABLE_LENGTH && options && hasOwn$
|
|
690
|
-
defineProperty$
|
|
975
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
|
|
976
|
+
defineProperty$3(value, 'length', { value: options.arity });
|
|
691
977
|
}
|
|
692
978
|
try {
|
|
693
|
-
if (options && hasOwn$
|
|
694
|
-
if (DESCRIPTORS$
|
|
979
|
+
if (options && hasOwn$4(options, 'constructor') && options.constructor) {
|
|
980
|
+
if (DESCRIPTORS$2) defineProperty$3(value, 'prototype', { writable: false });
|
|
695
981
|
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
696
982
|
} else if (value.prototype) value.prototype = undefined;
|
|
697
983
|
} catch (error) { /* empty */ }
|
|
698
984
|
var state = enforceInternalState(value);
|
|
699
|
-
if (!hasOwn$
|
|
985
|
+
if (!hasOwn$4(state, 'source')) {
|
|
700
986
|
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
701
987
|
} return value;
|
|
702
988
|
};
|
|
@@ -730,494 +1016,136 @@ var defineBuiltIn$4 = function (O, key, value, options) {
|
|
|
730
1016
|
|
|
731
1017
|
var objectGetOwnPropertyNames = {};
|
|
732
1018
|
|
|
733
|
-
var
|
|
734
|
-
var
|
|
735
|
-
|
|
736
|
-
// `Math.trunc` method
|
|
737
|
-
// https://tc39.es/ecma262/#sec-math.trunc
|
|
738
|
-
// eslint-disable-next-line es-x/no-math-trunc -- safe
|
|
739
|
-
var mathTrunc = Math.trunc || function trunc(x) {
|
|
740
|
-
var n = +x;
|
|
741
|
-
return (n > 0 ? floor : ceil)(n);
|
|
742
|
-
};
|
|
743
|
-
|
|
744
|
-
var trunc = mathTrunc;
|
|
745
|
-
|
|
746
|
-
// `ToIntegerOrInfinity` abstract operation
|
|
747
|
-
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
748
|
-
var toIntegerOrInfinity$2 = function (argument) {
|
|
749
|
-
var number = +argument;
|
|
750
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
751
|
-
return number !== number || number === 0 ? 0 : trunc(number);
|
|
752
|
-
};
|
|
753
|
-
|
|
754
|
-
var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
|
|
755
|
-
|
|
756
|
-
var max = Math.max;
|
|
757
|
-
var min$1 = Math.min;
|
|
758
|
-
|
|
759
|
-
// Helper for a popular repeating case of the spec:
|
|
760
|
-
// Let integer be ? ToInteger(index).
|
|
761
|
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
762
|
-
var toAbsoluteIndex$1 = function (index, length) {
|
|
763
|
-
var integer = toIntegerOrInfinity$1(index);
|
|
764
|
-
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
765
|
-
};
|
|
766
|
-
|
|
767
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$2;
|
|
768
|
-
|
|
769
|
-
var min = Math.min;
|
|
770
|
-
|
|
771
|
-
// `ToLength` abstract operation
|
|
772
|
-
// https://tc39.es/ecma262/#sec-tolength
|
|
773
|
-
var toLength$1 = function (argument) {
|
|
774
|
-
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
775
|
-
};
|
|
776
|
-
|
|
777
|
-
var toLength = toLength$1;
|
|
778
|
-
|
|
779
|
-
// `LengthOfArrayLike` abstract operation
|
|
780
|
-
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
781
|
-
var lengthOfArrayLike$1 = function (obj) {
|
|
782
|
-
return toLength(obj.length);
|
|
783
|
-
};
|
|
784
|
-
|
|
785
|
-
var toIndexedObject$3 = toIndexedObject$5;
|
|
786
|
-
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
787
|
-
var lengthOfArrayLike = lengthOfArrayLike$1;
|
|
788
|
-
|
|
789
|
-
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
790
|
-
var createMethod = function (IS_INCLUDES) {
|
|
791
|
-
return function ($this, el, fromIndex) {
|
|
792
|
-
var O = toIndexedObject$3($this);
|
|
793
|
-
var length = lengthOfArrayLike(O);
|
|
794
|
-
var index = toAbsoluteIndex(fromIndex, length);
|
|
795
|
-
var value;
|
|
796
|
-
// Array#includes uses SameValueZero equality algorithm
|
|
797
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
798
|
-
if (IS_INCLUDES && el != el) while (length > index) {
|
|
799
|
-
value = O[index++];
|
|
800
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
801
|
-
if (value != value) return true;
|
|
802
|
-
// Array#indexOf ignores holes, Array#includes - not
|
|
803
|
-
} else for (;length > index; index++) {
|
|
804
|
-
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
805
|
-
} return !IS_INCLUDES && -1;
|
|
806
|
-
};
|
|
807
|
-
};
|
|
808
|
-
|
|
809
|
-
var arrayIncludes = {
|
|
810
|
-
// `Array.prototype.includes` method
|
|
811
|
-
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
812
|
-
includes: createMethod(true),
|
|
813
|
-
// `Array.prototype.indexOf` method
|
|
814
|
-
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
815
|
-
indexOf: createMethod(false)
|
|
816
|
-
};
|
|
817
|
-
|
|
818
|
-
var uncurryThis$3 = functionUncurryThis;
|
|
819
|
-
var hasOwn$4 = hasOwnProperty_1;
|
|
820
|
-
var toIndexedObject$2 = toIndexedObject$5;
|
|
821
|
-
var indexOf = arrayIncludes.indexOf;
|
|
822
|
-
var hiddenKeys$2 = hiddenKeys$4;
|
|
823
|
-
|
|
824
|
-
var push = uncurryThis$3([].push);
|
|
825
|
-
|
|
826
|
-
var objectKeysInternal = function (object, names) {
|
|
827
|
-
var O = toIndexedObject$2(object);
|
|
828
|
-
var i = 0;
|
|
829
|
-
var result = [];
|
|
830
|
-
var key;
|
|
831
|
-
for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push(result, key);
|
|
832
|
-
// Don't enum bug & hidden keys
|
|
833
|
-
while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
|
|
834
|
-
~indexOf(result, key) || push(result, key);
|
|
835
|
-
}
|
|
836
|
-
return result;
|
|
837
|
-
};
|
|
838
|
-
|
|
839
|
-
// IE8- don't enum bug keys
|
|
840
|
-
var enumBugKeys$3 = [
|
|
841
|
-
'constructor',
|
|
842
|
-
'hasOwnProperty',
|
|
843
|
-
'isPrototypeOf',
|
|
844
|
-
'propertyIsEnumerable',
|
|
845
|
-
'toLocaleString',
|
|
846
|
-
'toString',
|
|
847
|
-
'valueOf'
|
|
848
|
-
];
|
|
849
|
-
|
|
850
|
-
var internalObjectKeys$1 = objectKeysInternal;
|
|
851
|
-
var enumBugKeys$2 = enumBugKeys$3;
|
|
1019
|
+
var internalObjectKeys = objectKeysInternal;
|
|
1020
|
+
var enumBugKeys = enumBugKeys$3;
|
|
852
1021
|
|
|
853
|
-
var hiddenKeys
|
|
1022
|
+
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
|
|
854
1023
|
|
|
855
1024
|
// `Object.getOwnPropertyNames` method
|
|
856
1025
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
857
1026
|
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
|
858
1027
|
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
859
|
-
return internalObjectKeys
|
|
1028
|
+
return internalObjectKeys(O, hiddenKeys);
|
|
860
1029
|
};
|
|
861
1030
|
|
|
862
1031
|
var objectGetOwnPropertySymbols = {};
|
|
863
1032
|
|
|
864
|
-
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
|
865
|
-
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
866
|
-
|
|
867
|
-
var getBuiltIn$1 = getBuiltIn$4;
|
|
868
|
-
var uncurryThis$2 = functionUncurryThis;
|
|
869
|
-
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
870
|
-
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
871
|
-
var anObject$5 = anObject$7;
|
|
872
|
-
|
|
873
|
-
var concat$1 = uncurryThis$2([].concat);
|
|
874
|
-
|
|
875
|
-
// all object keys, includes non-enumerable and symbols
|
|
876
|
-
var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
877
|
-
var keys = getOwnPropertyNamesModule.f(anObject$5(it));
|
|
878
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
879
|
-
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
880
|
-
};
|
|
881
|
-
|
|
882
|
-
var hasOwn$3 = hasOwnProperty_1;
|
|
883
|
-
var ownKeys = ownKeys$1;
|
|
884
|
-
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
885
|
-
var definePropertyModule$1 = objectDefineProperty;
|
|
886
|
-
|
|
887
|
-
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
888
|
-
var keys = ownKeys(source);
|
|
889
|
-
var defineProperty = definePropertyModule$1.f;
|
|
890
|
-
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
891
|
-
for (var i = 0; i < keys.length; i++) {
|
|
892
|
-
var key = keys[i];
|
|
893
|
-
if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
|
|
894
|
-
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
};
|
|
898
|
-
|
|
899
|
-
var fails$4 = fails$c;
|
|
900
|
-
var isCallable$5 = isCallable$f;
|
|
901
|
-
|
|
902
|
-
var replacement = /#|\.prototype\./;
|
|
903
|
-
|
|
904
|
-
var isForced$1 = function (feature, detection) {
|
|
905
|
-
var value = data[normalize(feature)];
|
|
906
|
-
return value == POLYFILL ? true
|
|
907
|
-
: value == NATIVE ? false
|
|
908
|
-
: isCallable$5(detection) ? fails$4(detection)
|
|
909
|
-
: !!detection;
|
|
910
|
-
};
|
|
911
|
-
|
|
912
|
-
var normalize = isForced$1.normalize = function (string) {
|
|
913
|
-
return String(string).replace(replacement, '.').toLowerCase();
|
|
914
|
-
};
|
|
915
|
-
|
|
916
|
-
var data = isForced$1.data = {};
|
|
917
|
-
var NATIVE = isForced$1.NATIVE = 'N';
|
|
918
|
-
var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
919
|
-
|
|
920
|
-
var isForced_1 = isForced$1;
|
|
921
|
-
|
|
922
|
-
var global$3 = global$c;
|
|
923
|
-
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
924
|
-
var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
|
|
925
|
-
var defineBuiltIn$3 = defineBuiltIn$4;
|
|
926
|
-
var defineGlobalProperty = defineGlobalProperty$3;
|
|
927
|
-
var copyConstructorProperties = copyConstructorProperties$1;
|
|
928
|
-
var isForced = isForced_1;
|
|
929
|
-
|
|
930
|
-
/*
|
|
931
|
-
options.target - name of the target object
|
|
932
|
-
options.global - target is the global object
|
|
933
|
-
options.stat - export as static methods of target
|
|
934
|
-
options.proto - export as prototype methods of target
|
|
935
|
-
options.real - real prototype method for the `pure` version
|
|
936
|
-
options.forced - export even if the native feature is available
|
|
937
|
-
options.bind - bind methods to the target, required for the `pure` version
|
|
938
|
-
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
939
|
-
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
940
|
-
options.sham - add a flag to not completely full polyfills
|
|
941
|
-
options.enumerable - export as enumerable property
|
|
942
|
-
options.dontCallGetSet - prevent calling a getter on target
|
|
943
|
-
options.name - the .name of the function if it does not match the key
|
|
944
|
-
*/
|
|
945
|
-
var _export = function (options, source) {
|
|
946
|
-
var TARGET = options.target;
|
|
947
|
-
var GLOBAL = options.global;
|
|
948
|
-
var STATIC = options.stat;
|
|
949
|
-
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
950
|
-
if (GLOBAL) {
|
|
951
|
-
target = global$3;
|
|
952
|
-
} else if (STATIC) {
|
|
953
|
-
target = global$3[TARGET] || defineGlobalProperty(TARGET, {});
|
|
954
|
-
} else {
|
|
955
|
-
target = (global$3[TARGET] || {}).prototype;
|
|
956
|
-
}
|
|
957
|
-
if (target) for (key in source) {
|
|
958
|
-
sourceProperty = source[key];
|
|
959
|
-
if (options.dontCallGetSet) {
|
|
960
|
-
descriptor = getOwnPropertyDescriptor(target, key);
|
|
961
|
-
targetProperty = descriptor && descriptor.value;
|
|
962
|
-
} else targetProperty = target[key];
|
|
963
|
-
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
964
|
-
// contained in target
|
|
965
|
-
if (!FORCED && targetProperty !== undefined) {
|
|
966
|
-
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
967
|
-
copyConstructorProperties(sourceProperty, targetProperty);
|
|
968
|
-
}
|
|
969
|
-
// add a flag to not completely full polyfills
|
|
970
|
-
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
971
|
-
createNonEnumerableProperty$2(sourceProperty, 'sham', true);
|
|
972
|
-
}
|
|
973
|
-
defineBuiltIn$3(target, key, sourceProperty, options);
|
|
974
|
-
}
|
|
975
|
-
};
|
|
976
|
-
|
|
977
|
-
var internalObjectKeys = objectKeysInternal;
|
|
978
|
-
var enumBugKeys$1 = enumBugKeys$3;
|
|
979
|
-
|
|
980
|
-
// `Object.keys` method
|
|
981
|
-
// https://tc39.es/ecma262/#sec-object.keys
|
|
982
|
-
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
983
|
-
var objectKeys$2 = Object.keys || function keys(O) {
|
|
984
|
-
return internalObjectKeys(O, enumBugKeys$1);
|
|
985
|
-
};
|
|
986
|
-
|
|
987
|
-
var DESCRIPTORS$2 = descriptors;
|
|
988
|
-
var uncurryThis$1 = functionUncurryThis;
|
|
989
|
-
var call$2 = functionCall;
|
|
990
|
-
var fails$3 = fails$c;
|
|
991
|
-
var objectKeys$1 = objectKeys$2;
|
|
992
|
-
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
993
|
-
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
994
|
-
var toObject$1 = toObject$3;
|
|
995
|
-
var IndexedObject = indexedObject;
|
|
996
|
-
|
|
997
|
-
// eslint-disable-next-line es-x/no-object-assign -- safe
|
|
998
|
-
var $assign = Object.assign;
|
|
999
|
-
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
1000
|
-
var defineProperty$3 = Object.defineProperty;
|
|
1001
|
-
var concat = uncurryThis$1([].concat);
|
|
1002
|
-
|
|
1003
|
-
// `Object.assign` method
|
|
1004
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
1005
|
-
var objectAssign = !$assign || fails$3(function () {
|
|
1006
|
-
// should have correct order of operations (Edge bug)
|
|
1007
|
-
if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
|
|
1008
|
-
enumerable: true,
|
|
1009
|
-
get: function () {
|
|
1010
|
-
defineProperty$3(this, 'b', {
|
|
1011
|
-
value: 3,
|
|
1012
|
-
enumerable: false
|
|
1013
|
-
});
|
|
1014
|
-
}
|
|
1015
|
-
}), { b: 2 })).b !== 1) return true;
|
|
1016
|
-
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1017
|
-
var A = {};
|
|
1018
|
-
var B = {};
|
|
1019
|
-
// eslint-disable-next-line es-x/no-symbol -- safe
|
|
1020
|
-
var symbol = Symbol();
|
|
1021
|
-
var alphabet = 'abcdefghijklmnopqrst';
|
|
1022
|
-
A[symbol] = 7;
|
|
1023
|
-
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1024
|
-
return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
|
|
1025
|
-
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1026
|
-
var T = toObject$1(target);
|
|
1027
|
-
var argumentsLength = arguments.length;
|
|
1028
|
-
var index = 1;
|
|
1029
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1030
|
-
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1031
|
-
while (argumentsLength > index) {
|
|
1032
|
-
var S = IndexedObject(arguments[index++]);
|
|
1033
|
-
var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
|
|
1034
|
-
var length = keys.length;
|
|
1035
|
-
var j = 0;
|
|
1036
|
-
var key;
|
|
1037
|
-
while (length > j) {
|
|
1038
|
-
key = keys[j++];
|
|
1039
|
-
if (!DESCRIPTORS$2 || call$2(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1040
|
-
}
|
|
1041
|
-
} return T;
|
|
1042
|
-
} : $assign;
|
|
1043
|
-
|
|
1044
|
-
var $$2 = _export;
|
|
1045
|
-
var assign = objectAssign;
|
|
1046
|
-
|
|
1047
|
-
// `Object.assign` method
|
|
1048
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
1049
|
-
// eslint-disable-next-line es-x/no-object-assign -- required for testing
|
|
1050
|
-
$$2({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1051
|
-
assign: assign
|
|
1052
|
-
});
|
|
1053
|
-
|
|
1054
|
-
/******************************************************************************
|
|
1055
|
-
Copyright (c) Microsoft Corporation.
|
|
1056
|
-
|
|
1057
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1058
|
-
purpose with or without fee is hereby granted.
|
|
1059
|
-
|
|
1060
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1061
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1062
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1063
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1064
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1065
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1066
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1067
|
-
***************************************************************************** */
|
|
1068
|
-
|
|
1069
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
1070
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1071
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1072
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
1073
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
1074
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
1075
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1076
|
-
});
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
class HTTPService{constructor(a){this.url=`${a.protocol}://${a.host}:${a.port}`;}resolveBoolean(a,b,c){return __awaiter(this,void 0,void 0,function*(){try{const d=yield axios.post(`${this.url}/flags/${encodeURIComponent(a)}/resolve/boolean`,c);return checkResponse(d,"boolean")?{value:d.data.value,reason:d.data.reason,variant:d.data.variant}:{value:b,reason:StandardResolutionReasons.ERROR,errorCode:ErrorCode.PARSE_ERROR}}catch(a){return {reason:StandardResolutionReasons.ERROR,errorCode:getErrorCode(a),value:b}}})}resolveNumber(a,b,c){return __awaiter(this,void 0,void 0,function*(){try{const d=yield axios.post(/**
|
|
1080
|
-
* JavaScript numbers are always 64-bit floating point
|
|
1081
|
-
*/`${this.url}/flags/${encodeURIComponent(a)}/resolve/float`,c);return checkResponse(d,"number")?{value:d.data.value,reason:d.data.reason,variant:d.data.variant}:{value:b,reason:StandardResolutionReasons.ERROR,errorCode:ErrorCode.PARSE_ERROR}}catch(a){return {reason:StandardResolutionReasons.ERROR,errorCode:getErrorCode(a),value:b}}})}resolveString(a,b,c){return __awaiter(this,void 0,void 0,function*(){try{const d=yield axios.post(`${this.url}/flags/${encodeURIComponent(a)}/resolve/string`,c);return checkResponse(d,"string")?{value:d.data.value,reason:d.data.reason,variant:d.data.variant}:{value:b,reason:StandardResolutionReasons.ERROR,errorCode:ErrorCode.PARSE_ERROR}}catch(a){return {reason:StandardResolutionReasons.ERROR,errorCode:getErrorCode(a),value:b}}})}resolveObject(a,b,c){return __awaiter(this,void 0,void 0,function*(){try{const d=yield axios.post(`${this.url}/flags/${encodeURIComponent(a)}/resolve/object`,c);return checkResponse(d,"object")?{value:d.data.value,reason:d.data.reason,variant:d.data.variant}:{value:b,reason:StandardResolutionReasons.ERROR,errorCode:ErrorCode.PARSE_ERROR}}catch(a){return {reason:StandardResolutionReasons.ERROR,errorCode:getErrorCode(a),value:b}}})}}function getErrorCode(a){var b;const c=null===(b=null===a||void 0===a?void 0:a.response)||void 0===b?void 0:b.status;let d=StandardResolutionReasons.UNKNOWN;return null!=c&&(404==c?d=ErrorCode.FLAG_NOT_FOUND:400==c&&(d=ErrorCode.TYPE_MISMATCH)),d}function checkResponse(a,b){return !!(a.data&&typeof a.data.value===b&&"string"==typeof a.data.variant&&"string"==typeof a.data.reason)}
|
|
1082
|
-
|
|
1083
|
-
var objectDefineProperties = {};
|
|
1084
|
-
|
|
1085
|
-
var DESCRIPTORS$1 = descriptors;
|
|
1086
|
-
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1087
|
-
var definePropertyModule = objectDefineProperty;
|
|
1088
|
-
var anObject$4 = anObject$7;
|
|
1089
|
-
var toIndexedObject$1 = toIndexedObject$5;
|
|
1090
|
-
var objectKeys = objectKeys$2;
|
|
1091
|
-
|
|
1092
|
-
// `Object.defineProperties` method
|
|
1093
|
-
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1094
|
-
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
|
1095
|
-
objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1096
|
-
anObject$4(O);
|
|
1097
|
-
var props = toIndexedObject$1(Properties);
|
|
1098
|
-
var keys = objectKeys(Properties);
|
|
1099
|
-
var length = keys.length;
|
|
1100
|
-
var index = 0;
|
|
1101
|
-
var key;
|
|
1102
|
-
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
1103
|
-
return O;
|
|
1104
|
-
};
|
|
1105
|
-
|
|
1106
|
-
var getBuiltIn = getBuiltIn$4;
|
|
1107
|
-
|
|
1108
|
-
var html$1 = getBuiltIn('document', 'documentElement');
|
|
1109
|
-
|
|
1110
|
-
/* global ActiveXObject -- old IE, WSH */
|
|
1033
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
|
1034
|
+
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
1111
1035
|
|
|
1036
|
+
var getBuiltIn = getBuiltIn$4;
|
|
1037
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
1038
|
+
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
1039
|
+
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
1112
1040
|
var anObject$3 = anObject$7;
|
|
1113
|
-
var definePropertiesModule = objectDefineProperties;
|
|
1114
|
-
var enumBugKeys = enumBugKeys$3;
|
|
1115
|
-
var hiddenKeys = hiddenKeys$4;
|
|
1116
|
-
var html = html$1;
|
|
1117
|
-
var documentCreateElement$1 = documentCreateElement$2;
|
|
1118
|
-
var sharedKey$1 = sharedKey$3;
|
|
1119
|
-
|
|
1120
|
-
var GT = '>';
|
|
1121
|
-
var LT = '<';
|
|
1122
|
-
var PROTOTYPE = 'prototype';
|
|
1123
|
-
var SCRIPT = 'script';
|
|
1124
|
-
var IE_PROTO$1 = sharedKey$1('IE_PROTO');
|
|
1125
1041
|
|
|
1126
|
-
var
|
|
1042
|
+
var concat$1 = uncurryThis$2([].concat);
|
|
1127
1043
|
|
|
1128
|
-
|
|
1129
|
-
|
|
1044
|
+
// all object keys, includes non-enumerable and symbols
|
|
1045
|
+
var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
1046
|
+
var keys = getOwnPropertyNamesModule.f(anObject$3(it));
|
|
1047
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
1048
|
+
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
1130
1049
|
};
|
|
1131
1050
|
|
|
1132
|
-
|
|
1133
|
-
var
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
var temp = activeXDocument.parentWindow.Object;
|
|
1137
|
-
activeXDocument = null; // avoid memory leak
|
|
1138
|
-
return temp;
|
|
1139
|
-
};
|
|
1051
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
1052
|
+
var ownKeys = ownKeys$1;
|
|
1053
|
+
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
1054
|
+
var definePropertyModule = objectDefineProperty;
|
|
1140
1055
|
|
|
1141
|
-
|
|
1142
|
-
var
|
|
1143
|
-
|
|
1144
|
-
var
|
|
1145
|
-
var
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
iframeDocument = iframe.contentWindow.document;
|
|
1152
|
-
iframeDocument.open();
|
|
1153
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
|
1154
|
-
iframeDocument.close();
|
|
1155
|
-
return iframeDocument.F;
|
|
1056
|
+
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
1057
|
+
var keys = ownKeys(source);
|
|
1058
|
+
var defineProperty = definePropertyModule.f;
|
|
1059
|
+
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
1060
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1061
|
+
var key = keys[i];
|
|
1062
|
+
if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
|
|
1063
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1156
1066
|
};
|
|
1157
1067
|
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
// see https://github.com/es-shims/es5-shim/issues/150
|
|
1161
|
-
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
1162
|
-
// avoid IE GC bug
|
|
1163
|
-
var activeXDocument;
|
|
1164
|
-
var NullProtoObject = function () {
|
|
1165
|
-
try {
|
|
1166
|
-
activeXDocument = new ActiveXObject('htmlfile');
|
|
1167
|
-
} catch (error) { /* ignore */ }
|
|
1168
|
-
NullProtoObject = typeof document != 'undefined'
|
|
1169
|
-
? document.domain && activeXDocument
|
|
1170
|
-
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
1171
|
-
: NullProtoObjectViaIFrame()
|
|
1172
|
-
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
1173
|
-
var length = enumBugKeys.length;
|
|
1174
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
1175
|
-
return NullProtoObject();
|
|
1176
|
-
};
|
|
1068
|
+
var fails$4 = fails$c;
|
|
1069
|
+
var isCallable$5 = isCallable$f;
|
|
1177
1070
|
|
|
1178
|
-
|
|
1071
|
+
var replacement = /#|\.prototype\./;
|
|
1179
1072
|
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
EmptyConstructor[PROTOTYPE] = anObject$3(O);
|
|
1187
|
-
result = new EmptyConstructor();
|
|
1188
|
-
EmptyConstructor[PROTOTYPE] = null;
|
|
1189
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
1190
|
-
result[IE_PROTO$1] = O;
|
|
1191
|
-
} else result = NullProtoObject();
|
|
1192
|
-
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1073
|
+
var isForced$1 = function (feature, detection) {
|
|
1074
|
+
var value = data[normalize(feature)];
|
|
1075
|
+
return value == POLYFILL ? true
|
|
1076
|
+
: value == NATIVE ? false
|
|
1077
|
+
: isCallable$5(detection) ? fails$4(detection)
|
|
1078
|
+
: !!detection;
|
|
1193
1079
|
};
|
|
1194
1080
|
|
|
1195
|
-
var
|
|
1196
|
-
|
|
1197
|
-
|
|
1081
|
+
var normalize = isForced$1.normalize = function (string) {
|
|
1082
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
1083
|
+
};
|
|
1198
1084
|
|
|
1199
|
-
var
|
|
1200
|
-
var
|
|
1085
|
+
var data = isForced$1.data = {};
|
|
1086
|
+
var NATIVE = isForced$1.NATIVE = 'N';
|
|
1087
|
+
var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
1201
1088
|
|
|
1202
|
-
|
|
1203
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1204
|
-
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
1205
|
-
defineProperty$2(ArrayPrototype, UNSCOPABLES, {
|
|
1206
|
-
configurable: true,
|
|
1207
|
-
value: create$1(null)
|
|
1208
|
-
});
|
|
1209
|
-
}
|
|
1089
|
+
var isForced_1 = isForced$1;
|
|
1210
1090
|
|
|
1211
|
-
|
|
1212
|
-
var
|
|
1213
|
-
|
|
1214
|
-
|
|
1091
|
+
var global$3 = global$c;
|
|
1092
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
1093
|
+
var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
|
|
1094
|
+
var defineBuiltIn$3 = defineBuiltIn$4;
|
|
1095
|
+
var defineGlobalProperty = defineGlobalProperty$3;
|
|
1096
|
+
var copyConstructorProperties = copyConstructorProperties$1;
|
|
1097
|
+
var isForced = isForced_1;
|
|
1215
1098
|
|
|
1216
|
-
|
|
1099
|
+
/*
|
|
1100
|
+
options.target - name of the target object
|
|
1101
|
+
options.global - target is the global object
|
|
1102
|
+
options.stat - export as static methods of target
|
|
1103
|
+
options.proto - export as prototype methods of target
|
|
1104
|
+
options.real - real prototype method for the `pure` version
|
|
1105
|
+
options.forced - export even if the native feature is available
|
|
1106
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
1107
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
1108
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
1109
|
+
options.sham - add a flag to not completely full polyfills
|
|
1110
|
+
options.enumerable - export as enumerable property
|
|
1111
|
+
options.dontCallGetSet - prevent calling a getter on target
|
|
1112
|
+
options.name - the .name of the function if it does not match the key
|
|
1113
|
+
*/
|
|
1114
|
+
var _export = function (options, source) {
|
|
1115
|
+
var TARGET = options.target;
|
|
1116
|
+
var GLOBAL = options.global;
|
|
1117
|
+
var STATIC = options.stat;
|
|
1118
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
1119
|
+
if (GLOBAL) {
|
|
1120
|
+
target = global$3;
|
|
1121
|
+
} else if (STATIC) {
|
|
1122
|
+
target = global$3[TARGET] || defineGlobalProperty(TARGET, {});
|
|
1123
|
+
} else {
|
|
1124
|
+
target = (global$3[TARGET] || {}).prototype;
|
|
1125
|
+
}
|
|
1126
|
+
if (target) for (key in source) {
|
|
1127
|
+
sourceProperty = source[key];
|
|
1128
|
+
if (options.dontCallGetSet) {
|
|
1129
|
+
descriptor = getOwnPropertyDescriptor(target, key);
|
|
1130
|
+
targetProperty = descriptor && descriptor.value;
|
|
1131
|
+
} else targetProperty = target[key];
|
|
1132
|
+
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
1133
|
+
// contained in target
|
|
1134
|
+
if (!FORCED && targetProperty !== undefined) {
|
|
1135
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
1136
|
+
copyConstructorProperties(sourceProperty, targetProperty);
|
|
1137
|
+
}
|
|
1138
|
+
// add a flag to not completely full polyfills
|
|
1139
|
+
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
1140
|
+
createNonEnumerableProperty$2(sourceProperty, 'sham', true);
|
|
1141
|
+
}
|
|
1142
|
+
defineBuiltIn$3(target, key, sourceProperty, options);
|
|
1143
|
+
}
|
|
1144
|
+
};
|
|
1217
1145
|
|
|
1218
|
-
var fails$
|
|
1146
|
+
var fails$3 = fails$c;
|
|
1219
1147
|
|
|
1220
|
-
var correctPrototypeGetter = !fails$
|
|
1148
|
+
var correctPrototypeGetter = !fails$3(function () {
|
|
1221
1149
|
function F() { /* empty */ }
|
|
1222
1150
|
F.prototype.constructor = null;
|
|
1223
1151
|
// eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
|
|
@@ -1226,7 +1154,7 @@ var correctPrototypeGetter = !fails$2(function () {
|
|
|
1226
1154
|
|
|
1227
1155
|
var hasOwn$2 = hasOwnProperty_1;
|
|
1228
1156
|
var isCallable$4 = isCallable$f;
|
|
1229
|
-
var toObject = toObject$3;
|
|
1157
|
+
var toObject$1 = toObject$3;
|
|
1230
1158
|
var sharedKey = sharedKey$3;
|
|
1231
1159
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1232
1160
|
|
|
@@ -1238,7 +1166,7 @@ var ObjectPrototype = $Object$1.prototype;
|
|
|
1238
1166
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1239
1167
|
// eslint-disable-next-line es-x/no-object-getprototypeof -- safe
|
|
1240
1168
|
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
|
|
1241
|
-
var object = toObject(O);
|
|
1169
|
+
var object = toObject$1(O);
|
|
1242
1170
|
if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
|
|
1243
1171
|
var constructor = object.constructor;
|
|
1244
1172
|
if (isCallable$4(constructor) && object instanceof constructor) {
|
|
@@ -1246,7 +1174,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
|
|
|
1246
1174
|
} return object instanceof $Object$1 ? ObjectPrototype : null;
|
|
1247
1175
|
};
|
|
1248
1176
|
|
|
1249
|
-
var fails$
|
|
1177
|
+
var fails$2 = fails$c;
|
|
1250
1178
|
var isCallable$3 = isCallable$f;
|
|
1251
1179
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1252
1180
|
var defineBuiltIn$2 = defineBuiltIn$4;
|
|
@@ -1270,7 +1198,7 @@ if ([].keys) {
|
|
|
1270
1198
|
}
|
|
1271
1199
|
}
|
|
1272
1200
|
|
|
1273
|
-
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$
|
|
1201
|
+
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$2(function () {
|
|
1274
1202
|
var test = {};
|
|
1275
1203
|
// FF44- legacy iterators case
|
|
1276
1204
|
return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
|
|
@@ -1291,7 +1219,7 @@ var iteratorsCore = {
|
|
|
1291
1219
|
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
1292
1220
|
};
|
|
1293
1221
|
|
|
1294
|
-
var defineProperty$
|
|
1222
|
+
var defineProperty$2 = objectDefineProperty.f;
|
|
1295
1223
|
var hasOwn$1 = hasOwnProperty_1;
|
|
1296
1224
|
var wellKnownSymbol$4 = wellKnownSymbol$8;
|
|
1297
1225
|
|
|
@@ -1300,7 +1228,7 @@ var TO_STRING_TAG$3 = wellKnownSymbol$4('toStringTag');
|
|
|
1300
1228
|
var setToStringTag$2 = function (target, TAG, STATIC) {
|
|
1301
1229
|
if (target && !STATIC) target = target.prototype;
|
|
1302
1230
|
if (target && !hasOwn$1(target, TO_STRING_TAG$3)) {
|
|
1303
|
-
defineProperty$
|
|
1231
|
+
defineProperty$2(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
|
|
1304
1232
|
}
|
|
1305
1233
|
};
|
|
1306
1234
|
|
|
@@ -1332,7 +1260,7 @@ var aPossiblePrototype$1 = function (argument) {
|
|
|
1332
1260
|
|
|
1333
1261
|
/* eslint-disable no-proto -- safe */
|
|
1334
1262
|
|
|
1335
|
-
var uncurryThis = functionUncurryThis;
|
|
1263
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
1336
1264
|
var anObject$2 = anObject$7;
|
|
1337
1265
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1338
1266
|
|
|
@@ -1346,7 +1274,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1346
1274
|
var setter;
|
|
1347
1275
|
try {
|
|
1348
1276
|
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
1349
|
-
setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1277
|
+
setter = uncurryThis$1(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1350
1278
|
setter(test, []);
|
|
1351
1279
|
CORRECT_SETTER = test instanceof Array;
|
|
1352
1280
|
} catch (error) { /* empty */ }
|
|
@@ -1359,8 +1287,8 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1359
1287
|
};
|
|
1360
1288
|
}() : undefined);
|
|
1361
1289
|
|
|
1362
|
-
var $$
|
|
1363
|
-
var call$
|
|
1290
|
+
var $$2 = _export;
|
|
1291
|
+
var call$2 = functionCall;
|
|
1364
1292
|
var FunctionName = functionName;
|
|
1365
1293
|
var isCallable$1 = isCallable$f;
|
|
1366
1294
|
var createIteratorConstructor = createIteratorConstructor$1;
|
|
@@ -1429,7 +1357,7 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
|
|
|
1429
1357
|
createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
|
|
1430
1358
|
} else {
|
|
1431
1359
|
INCORRECT_VALUES_NAME = true;
|
|
1432
|
-
defaultIterator = function values() { return call$
|
|
1360
|
+
defaultIterator = function values() { return call$2(nativeIterator, this); };
|
|
1433
1361
|
}
|
|
1434
1362
|
}
|
|
1435
1363
|
|
|
@@ -1444,7 +1372,7 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
|
|
|
1444
1372
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1445
1373
|
defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
|
|
1446
1374
|
}
|
|
1447
|
-
} else $$
|
|
1375
|
+
} else $$2({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1448
1376
|
}
|
|
1449
1377
|
|
|
1450
1378
|
// define iterator
|
|
@@ -1460,9 +1388,9 @@ var toIndexedObject = toIndexedObject$5;
|
|
|
1460
1388
|
var addToUnscopables = addToUnscopables$1;
|
|
1461
1389
|
var Iterators = iterators;
|
|
1462
1390
|
var InternalStateModule = internalState;
|
|
1463
|
-
var defineProperty = objectDefineProperty.f;
|
|
1391
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
1464
1392
|
var defineIterator = defineIterator$1;
|
|
1465
|
-
var DESCRIPTORS = descriptors;
|
|
1393
|
+
var DESCRIPTORS$1 = descriptors;
|
|
1466
1394
|
|
|
1467
1395
|
var ARRAY_ITERATOR = 'Array Iterator';
|
|
1468
1396
|
var setInternalState = InternalStateModule.set;
|
|
@@ -1512,8 +1440,8 @@ addToUnscopables('values');
|
|
|
1512
1440
|
addToUnscopables('entries');
|
|
1513
1441
|
|
|
1514
1442
|
// V8 ~ Chrome 45- bug
|
|
1515
|
-
if (DESCRIPTORS && values.name !== 'values') try {
|
|
1516
|
-
defineProperty(values, 'name', { value: 'values' });
|
|
1443
|
+
if (DESCRIPTORS$1 && values.name !== 'values') try {
|
|
1444
|
+
defineProperty$1(values, 'name', { value: 'values' });
|
|
1517
1445
|
} catch (error) { /* empty */ }
|
|
1518
1446
|
|
|
1519
1447
|
// iterable DOM collections
|
|
@@ -1599,12 +1527,12 @@ for (var COLLECTION_NAME in DOMIterables) {
|
|
|
1599
1527
|
|
|
1600
1528
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
1601
1529
|
|
|
1602
|
-
var
|
|
1530
|
+
var $$1 = _export;
|
|
1603
1531
|
var global$1 = global$c;
|
|
1604
1532
|
|
|
1605
1533
|
// `globalThis` object
|
|
1606
1534
|
// https://tc39.es/ecma262/#sec-globalthis
|
|
1607
|
-
|
|
1535
|
+
$$1({ global: true }, {
|
|
1608
1536
|
globalThis: global$1
|
|
1609
1537
|
});
|
|
1610
1538
|
|
|
@@ -4623,7 +4551,7 @@ var regexpFlags = function () {
|
|
|
4623
4551
|
return result;
|
|
4624
4552
|
};
|
|
4625
4553
|
|
|
4626
|
-
var call = functionCall;
|
|
4554
|
+
var call$1 = functionCall;
|
|
4627
4555
|
var hasOwn = hasOwnProperty_1;
|
|
4628
4556
|
var isPrototypeOf = objectIsPrototypeOf;
|
|
4629
4557
|
var regExpFlags = regexpFlags;
|
|
@@ -4633,21 +4561,21 @@ var RegExpPrototype$1 = RegExp.prototype;
|
|
|
4633
4561
|
var regexpGetFlags = function (R) {
|
|
4634
4562
|
var flags = R.flags;
|
|
4635
4563
|
return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
|
|
4636
|
-
? call(regExpFlags, R) : flags;
|
|
4564
|
+
? call$1(regExpFlags, R) : flags;
|
|
4637
4565
|
};
|
|
4638
4566
|
|
|
4639
4567
|
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
|
4640
4568
|
var defineBuiltIn = defineBuiltIn$4;
|
|
4641
4569
|
var anObject = anObject$7;
|
|
4642
4570
|
var $toString = toString;
|
|
4643
|
-
var fails = fails$c;
|
|
4571
|
+
var fails$1 = fails$c;
|
|
4644
4572
|
var getRegExpFlags = regexpGetFlags;
|
|
4645
4573
|
|
|
4646
4574
|
var TO_STRING = 'toString';
|
|
4647
4575
|
var RegExpPrototype = RegExp.prototype;
|
|
4648
4576
|
var n$ToString = RegExpPrototype[TO_STRING];
|
|
4649
4577
|
|
|
4650
|
-
var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
|
|
4578
|
+
var NOT_GENERIC = fails$1(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
|
|
4651
4579
|
// FF44- RegExp#toString has a wrong name
|
|
4652
4580
|
var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;
|
|
4653
4581
|
|
|
@@ -4779,8 +4707,78 @@ class ResolveObjectResponse$Type extends MessageType{constructor(){super("schema
|
|
|
4779
4707
|
* @generated from protobuf rpc: ResolveObject(schema.v1.ResolveObjectRequest) returns (schema.v1.ResolveObjectResponse);
|
|
4780
4708
|
*/resolveObject(a,b){const c=this.methods[4],d=this._transport.mergeOptions(b);return stackIntercept("unary",this._transport,c,d,a)}}
|
|
4781
4709
|
|
|
4782
|
-
class GRPCService{constructor(a){const{host:
|
|
4710
|
+
class GRPCService{constructor(a,b){const{host:c,port:d,tls:e,socketPath:f}=a;this.client=b?b:new ServiceClient(new GrpcTransport({host:f?`unix://${f}`:`${c}:${d}`,channelCredentials:e?grpc.credentials.createSsl():grpc.credentials.createInsecure()}));}resolveBoolean(a,b){return __awaiter(this,void 0,void 0,function*(){const{response:c}=yield this.client.resolveBoolean({flagKey:a,context:this.convertContext(b)});return {value:c.value,reason:c.reason,variant:c.variant}})}resolveString(a,b){return __awaiter(this,void 0,void 0,function*(){const{response:c}=yield this.client.resolveString({flagKey:a,context:this.convertContext(b)});return {value:c.value,reason:c.reason,variant:c.variant}})}resolveNumber(a,b){return __awaiter(this,void 0,void 0,function*(){const{response:c}=yield this.client.resolveFloat({flagKey:a,context:this.convertContext(b)});return {value:c.value,reason:c.reason,variant:c.variant}})}resolveObject(a,b){return __awaiter(this,void 0,void 0,function*(){const{response:c}=yield this.client.resolveObject({flagKey:a,context:this.convertContext(b)});if(c.value!==void 0)return {value:Struct.toJson(c.value),reason:c.reason,variant:c.variant};throw new ParseError("Object value undefined or missing.")})}convertContext(a){// JsonObject closely matches EvaluationContext, this is a safe cast.
|
|
4711
|
+
try{return Struct.fromJson(a)}catch(a){throw new ParseError(`Error serializing context.`)}}}
|
|
4712
|
+
|
|
4713
|
+
var DESCRIPTORS = descriptors;
|
|
4714
|
+
var uncurryThis = functionUncurryThis;
|
|
4715
|
+
var call = functionCall;
|
|
4716
|
+
var fails = fails$c;
|
|
4717
|
+
var objectKeys = objectKeys$2;
|
|
4718
|
+
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
4719
|
+
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
4720
|
+
var toObject = toObject$3;
|
|
4721
|
+
var IndexedObject = indexedObject;
|
|
4722
|
+
|
|
4723
|
+
// eslint-disable-next-line es-x/no-object-assign -- safe
|
|
4724
|
+
var $assign = Object.assign;
|
|
4725
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
4726
|
+
var defineProperty = Object.defineProperty;
|
|
4727
|
+
var concat = uncurryThis([].concat);
|
|
4728
|
+
|
|
4729
|
+
// `Object.assign` method
|
|
4730
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
4731
|
+
var objectAssign = !$assign || fails(function () {
|
|
4732
|
+
// should have correct order of operations (Edge bug)
|
|
4733
|
+
if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
4734
|
+
enumerable: true,
|
|
4735
|
+
get: function () {
|
|
4736
|
+
defineProperty(this, 'b', {
|
|
4737
|
+
value: 3,
|
|
4738
|
+
enumerable: false
|
|
4739
|
+
});
|
|
4740
|
+
}
|
|
4741
|
+
}), { b: 2 })).b !== 1) return true;
|
|
4742
|
+
// should work with symbols and should have deterministic property order (V8 bug)
|
|
4743
|
+
var A = {};
|
|
4744
|
+
var B = {};
|
|
4745
|
+
// eslint-disable-next-line es-x/no-symbol -- safe
|
|
4746
|
+
var symbol = Symbol();
|
|
4747
|
+
var alphabet = 'abcdefghijklmnopqrst';
|
|
4748
|
+
A[symbol] = 7;
|
|
4749
|
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
4750
|
+
return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
|
|
4751
|
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
4752
|
+
var T = toObject(target);
|
|
4753
|
+
var argumentsLength = arguments.length;
|
|
4754
|
+
var index = 1;
|
|
4755
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
4756
|
+
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
4757
|
+
while (argumentsLength > index) {
|
|
4758
|
+
var S = IndexedObject(arguments[index++]);
|
|
4759
|
+
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
4760
|
+
var length = keys.length;
|
|
4761
|
+
var j = 0;
|
|
4762
|
+
var key;
|
|
4763
|
+
while (length > j) {
|
|
4764
|
+
key = keys[j++];
|
|
4765
|
+
if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
4766
|
+
}
|
|
4767
|
+
} return T;
|
|
4768
|
+
} : $assign;
|
|
4769
|
+
|
|
4770
|
+
var $ = _export;
|
|
4771
|
+
var assign = objectAssign;
|
|
4772
|
+
|
|
4773
|
+
// `Object.assign` method
|
|
4774
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
4775
|
+
// eslint-disable-next-line es-x/no-object-assign -- required for testing
|
|
4776
|
+
$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
4777
|
+
assign: assign
|
|
4778
|
+
});
|
|
4779
|
+
|
|
4780
|
+
const DEFAULT_CONFIG={host:"localhost",port:8013,tls:!1};var ENV_VAR;(function(a){a.FLAGD_HOST="FLAGD_HOST",a.FLAGD_PORT="FLAGD_PORT",a.FLAGD_TLS="FLAGD_TLS",a.FLAGD_SOCKET_PATH="FLAGD_SOCKET_PATH";})(ENV_VAR||(ENV_VAR={}));const getEnvVarConfig=()=>{var a;return Object.assign(Object.assign(Object.assign(Object.assign({},process.env[ENV_VAR.FLAGD_HOST]&&{host:process.env[ENV_VAR.FLAGD_HOST]}),+process.env[ENV_VAR.FLAGD_PORT]&&{port:+process.env[ENV_VAR.FLAGD_PORT]}),process.env[ENV_VAR.FLAGD_TLS]&&{tls:"true"===(null===(a=process.env[ENV_VAR.FLAGD_TLS])||void 0===a?void 0:a.toLowerCase())}),process.env[ENV_VAR.FLAGD_SOCKET_PATH]&&{socketPath:process.env[ENV_VAR.FLAGD_SOCKET_PATH]})};function getConfig(a={}){return Object.assign(Object.assign(Object.assign({},DEFAULT_CONFIG),getEnvVarConfig()),a)}
|
|
4783
4781
|
|
|
4784
|
-
class FlagdProvider{constructor(a){this.metadata={name:"
|
|
4782
|
+
class FlagdProvider{constructor(a,b){this.metadata={name:"flagd Provider"},this._service=b?b:new GRPCService(getConfig(a));}resolveBooleanEvaluation(a,b,c){return this._service.resolveBoolean(a,c)}resolveStringEvaluation(a,b,c){return this._service.resolveString(a,c)}resolveNumberEvaluation(a,b,c){return this._service.resolveNumber(a,c)}resolveObjectEvaluation(a,b,c){return this._service.resolveObject(a,c)}}
|
|
4785
4783
|
|
|
4786
4784
|
export { FlagdProvider };
|