@vonage/vivid 3.0.0-next.5 → 3.0.0-next.50
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 +133 -4
- package/accordion/index.js +2 -2
- package/accordion-item/index.js +26 -18
- package/action-group/index.js +49 -0
- package/badge/index.js +14 -18
- package/banner/index.js +18 -81
- package/breadcrumb/index.js +20 -16
- package/breadcrumb-item/index.js +14 -9
- package/button/index.js +28 -659
- package/calendar/index.js +37 -8
- package/calendar-event/index.js +117 -0
- package/card/index.js +134 -0
- package/checkbox/index.js +173 -0
- package/dialog/index.js +282 -0
- package/divider/index.js +88 -0
- package/elevation/index.js +4 -31
- package/fab/index.js +102 -0
- package/focus/index.js +20 -3
- package/header/index.js +68 -0
- package/icon/index.js +9 -3
- package/index.js +45 -20
- package/layout/index.js +4 -4
- package/lib/accordion-item/accordion-item.d.ts +2 -2
- package/lib/accordion-item/index.d.ts +2 -1
- package/lib/action-group/action-group.d.ts +10 -0
- package/lib/{sidenav-item/sidenav-item.template.d.ts → action-group/action-group.template.d.ts} +2 -2
- package/lib/{sidenav-item → action-group}/index.d.ts +1 -2
- package/lib/badge/badge.d.ts +6 -6
- package/lib/badge/index.d.ts +1 -1
- package/lib/banner/banner.template.d.ts +0 -2
- package/lib/banner/index.d.ts +1 -0
- package/lib/breadcrumb/breadcrumb.template.d.ts +4 -0
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/lib/breadcrumb-item/index.d.ts +1 -0
- package/lib/button/button.d.ts +6 -5
- package/lib/button/index.d.ts +2 -19
- package/lib/calendar/calendar.d.ts +3 -1
- package/lib/calendar/index.d.ts +0 -1
- package/lib/calendar-event/calendar-event.d.ts +14 -0
- package/lib/calendar-event/calendar-event.template.d.ts +4 -0
- package/lib/calendar-event/index.d.ts +2 -0
- package/lib/card/card.d.ts +10 -0
- package/lib/{text/text.template.d.ts → card/card.template.d.ts} +2 -2
- package/lib/card/index.d.ts +4 -0
- package/lib/checkbox/checkbox.d.ts +5 -0
- package/lib/checkbox/checkbox.template.d.ts +4 -0
- package/lib/checkbox/index.d.ts +4 -0
- package/lib/components.d.ts +22 -10
- package/lib/dialog/dialog.d.ts +20 -0
- package/lib/dialog/dialog.template.d.ts +4 -0
- package/lib/dialog/index.d.ts +5 -0
- package/lib/divider/divider.d.ts +3 -0
- package/lib/divider/divider.template.d.ts +4 -0
- package/lib/divider/index.d.ts +2 -0
- package/lib/elevation/elevation.d.ts +1 -0
- package/lib/elevation/index.d.ts +1 -1
- package/lib/enums.d.ts +11 -5
- package/lib/fab/fab.d.ts +13 -0
- package/lib/fab/fab.template.d.ts +4 -0
- package/lib/fab/index.d.ts +4 -0
- package/lib/focus/index.d.ts +1 -1
- package/lib/header/header.d.ts +5 -0
- package/lib/header/header.template.d.ts +4 -0
- package/lib/header/index.d.ts +3 -0
- package/lib/icon/icon.d.ts +4 -3
- package/lib/layout/index.d.ts +1 -1
- package/lib/layout/layout.d.ts +3 -3
- package/lib/menu/index.d.ts +11 -0
- package/lib/menu/menu.d.ts +7 -0
- package/lib/menu/menu.template.d.ts +3 -0
- package/lib/nav/index.d.ts +2 -0
- package/lib/nav/nav.d.ts +3 -0
- package/lib/nav/nav.template.d.ts +4 -0
- package/lib/nav-disclosure/index.d.ts +4 -0
- package/lib/nav-disclosure/nav-disclosure.d.ts +10 -0
- package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -0
- package/lib/nav-item/index.d.ts +4 -0
- package/lib/{sidenav-item/sidenav-item.d.ts → nav-item/nav-item.d.ts} +2 -2
- package/lib/nav-item/nav-item.template.d.ts +4 -0
- package/lib/{text → note}/index.d.ts +1 -1
- package/lib/note/note.d.ts +10 -0
- package/lib/note/note.template.d.ts +5 -0
- package/lib/popup/index.d.ts +1 -1
- package/lib/popup/popup.d.ts +3 -15
- package/lib/progress/progress.d.ts +1 -1
- package/lib/progress-ring/progress-ring.d.ts +2 -1
- package/lib/side-drawer/index.d.ts +1 -1
- package/lib/side-drawer/side-drawer.d.ts +2 -7
- package/lib/side-drawer/side-drawer.template.d.ts +2 -2
- package/lib/text-anchor/text-anchor.d.ts +1 -1
- package/lib/text-field/index.d.ts +4 -0
- package/lib/text-field/text-field.d.ts +23 -0
- package/lib/text-field/text-field.template.d.ts +5 -0
- package/lib/tooltip/tooltip.d.ts +2 -4
- package/menu/index.js +661 -0
- package/nav/index.js +17 -0
- package/nav-disclosure/index.js +90 -0
- package/nav-item/index.js +43 -0
- package/note/index.js +68 -0
- package/package.json +48 -8
- package/popup/index.js +20 -2082
- package/progress/index.js +33 -24
- package/progress-ring/index.js +9 -3
- package/shared/anchor.js +8 -1
- package/shared/aria-global.js +3 -40
- package/shared/base-progress.js +5 -0
- package/shared/button.js +195 -0
- package/shared/calendar-event.js +26 -0
- package/shared/dialog-polyfill.esm.js +858 -0
- package/shared/enums.js +79 -0
- package/shared/es.object.assign.js +7 -6
- package/shared/export.js +972 -0
- package/shared/focus.js +5 -0
- package/shared/focus2.js +11 -0
- package/shared/form-associated.js +557 -0
- package/shared/icon.js +504 -508
- package/shared/index.js +79 -56
- package/shared/index2.js +26 -10
- package/shared/index3.js +2109 -0
- package/shared/iterators.js +61 -0
- package/shared/object-keys.js +13 -0
- package/shared/patterns/focus.d.ts +3 -0
- package/shared/patterns/index.d.ts +1 -0
- package/shared/ref.js +41 -0
- package/shared/text-anchor.js +2 -11
- package/shared/text-anchor.template.js +5 -2
- package/shared/to-string.js +51 -0
- package/shared/web.dom-collections.iterator.js +61 -1074
- package/side-drawer/index.js +33 -51
- package/styles/fonts/SpeziaCompleteVariableItalicWeb.woff +0 -0
- package/styles/fonts/SpeziaCompleteVariableItalicWeb.woff2 +0 -0
- package/styles/fonts/SpeziaCompleteVariableUprightWeb.woff +0 -0
- package/styles/fonts/SpeziaCompleteVariableUprightWeb.woff2 +0 -0
- package/styles/fonts/SpeziaMonoCompleteVariableWeb.woff +0 -0
- package/styles/fonts/SpeziaMonoCompleteVariableWeb.woff2 +0 -0
- package/styles/fonts/spezia.css +11 -11
- package/styles/themes/dark.css +12 -0
- package/styles/themes/light.css +12 -0
- package/styles/typography/desktop.css +72 -0
- package/text-anchor/index.js +8 -1
- package/text-field/index.js +412 -0
- package/tooltip/index.js +19 -21
- package/lib/text/text.d.ts +0 -10
- package/sidenav-item/index.js +0 -38
- package/text/index.js +0 -45
package/shared/icon.js
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as classofRaw, g as global$8, w as wellKnownSymbol$6, a as getBuiltIn$5, o as objectDefineProperty, d as descriptors, b as objectIsPrototypeOf, f as functionUncurryThis, e as fails$4, i as isCallable$6, h as inspectSource$2, t as tryToString$3, j as anObject$5, k as functionBindNative, l as aCallable$6, m as engineUserAgent, n as documentCreateElement, p as hasOwnProperty_1, q as objectGetOwnPropertyDescriptor, r as isForced_1, s as engineV8Version, _ as _export, u as defineBuiltIn$3, v as functionCall, x as isObject$2, y as internalState, z as getMethod$2, A as lengthOfArrayLike$1, B as requireObjectCoercible$1, C as functionName } from './export.js';
|
|
2
|
+
import { h as html$1, o as objectSetPrototypeOf, s as setToStringTag$1, i as iterators } from './iterators.js';
|
|
3
|
+
import { c as classof$3, t as toString$1 } from './to-string.js';
|
|
2
4
|
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, o as observable } from './index.js';
|
|
3
5
|
import { _ as _curry1, a as _curry2, b as _has } from './_has.js';
|
|
4
6
|
|
|
5
|
-
var
|
|
7
|
+
var classof$2 = classofRaw;
|
|
8
|
+
var global$7 = global$8;
|
|
6
9
|
|
|
7
|
-
var
|
|
10
|
+
var engineIsNode = classof$2(global$7.process) == 'process';
|
|
8
11
|
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
var redefineAll$1 = function (target, src, options) {
|
|
12
|
-
for (var key in src) redefine$2(target, key, src[key], options);
|
|
13
|
-
return target;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
var getBuiltIn$3 = getBuiltIn$4;
|
|
12
|
+
var getBuiltIn$4 = getBuiltIn$5;
|
|
17
13
|
var definePropertyModule = objectDefineProperty;
|
|
18
|
-
var wellKnownSymbol$
|
|
14
|
+
var wellKnownSymbol$5 = wellKnownSymbol$6;
|
|
19
15
|
var DESCRIPTORS = descriptors;
|
|
20
16
|
|
|
21
|
-
var SPECIES$2 = wellKnownSymbol$
|
|
17
|
+
var SPECIES$2 = wellKnownSymbol$5('species');
|
|
22
18
|
|
|
23
19
|
var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
24
|
-
var Constructor = getBuiltIn$
|
|
20
|
+
var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
|
|
25
21
|
var defineProperty = definePropertyModule.f;
|
|
26
22
|
|
|
27
23
|
if (DESCRIPTORS && Constructor && !Constructor[SPECIES$2]) {
|
|
@@ -32,255 +28,31 @@ var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
|
32
28
|
}
|
|
33
29
|
};
|
|
34
30
|
|
|
35
|
-
var global$c = global$e;
|
|
36
31
|
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
37
32
|
|
|
38
|
-
var TypeError$
|
|
33
|
+
var $TypeError$4 = TypeError;
|
|
39
34
|
|
|
40
35
|
var anInstance$1 = function (it, Prototype) {
|
|
41
36
|
if (isPrototypeOf$1(Prototype, it)) return it;
|
|
42
|
-
throw TypeError$
|
|
37
|
+
throw $TypeError$4('Incorrect invocation');
|
|
43
38
|
};
|
|
44
39
|
|
|
45
40
|
var uncurryThis$3 = functionUncurryThis;
|
|
46
|
-
var aCallable$3 = aCallable$4;
|
|
47
|
-
var NATIVE_BIND$1 = functionBindNative;
|
|
48
|
-
|
|
49
|
-
var bind$4 = uncurryThis$3(uncurryThis$3.bind);
|
|
50
|
-
|
|
51
|
-
// optional / simple context binding
|
|
52
|
-
var functionBindContext = function (fn, that) {
|
|
53
|
-
aCallable$3(fn);
|
|
54
|
-
return that === undefined ? fn : NATIVE_BIND$1 ? bind$4(fn, that) : function (/* ...args */) {
|
|
55
|
-
return fn.apply(that, arguments);
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
var wellKnownSymbol$6 = wellKnownSymbol$8;
|
|
60
|
-
var Iterators$1 = iterators;
|
|
61
|
-
|
|
62
|
-
var ITERATOR$2 = wellKnownSymbol$6('iterator');
|
|
63
|
-
var ArrayPrototype = Array.prototype;
|
|
64
|
-
|
|
65
|
-
// check on default Array iterator
|
|
66
|
-
var isArrayIteratorMethod$1 = function (it) {
|
|
67
|
-
return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
var wellKnownSymbol$5 = wellKnownSymbol$8;
|
|
71
|
-
|
|
72
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$5('toStringTag');
|
|
73
|
-
var test = {};
|
|
74
|
-
|
|
75
|
-
test[TO_STRING_TAG$1] = 'z';
|
|
76
|
-
|
|
77
|
-
var toStringTagSupport = String(test) === '[object z]';
|
|
78
|
-
|
|
79
|
-
var global$b = global$e;
|
|
80
|
-
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
81
|
-
var isCallable$4 = isCallable$5;
|
|
82
|
-
var classofRaw = classofRaw$1;
|
|
83
|
-
var wellKnownSymbol$4 = wellKnownSymbol$8;
|
|
84
|
-
|
|
85
|
-
var TO_STRING_TAG = wellKnownSymbol$4('toStringTag');
|
|
86
|
-
var Object$1 = global$b.Object;
|
|
87
|
-
|
|
88
|
-
// ES3 wrong here
|
|
89
|
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
90
|
-
|
|
91
|
-
// fallback for IE11 Script Access Denied error
|
|
92
|
-
var tryGet = function (it, key) {
|
|
93
|
-
try {
|
|
94
|
-
return it[key];
|
|
95
|
-
} catch (error) { /* empty */ }
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
// getting tag from ES6+ `Object.prototype.toString`
|
|
99
|
-
var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
100
|
-
var O, tag, result;
|
|
101
|
-
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
102
|
-
// @@toStringTag case
|
|
103
|
-
: typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
|
|
104
|
-
// builtinTag case
|
|
105
|
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
106
|
-
// ES3 arguments fallback
|
|
107
|
-
: (result = classofRaw(O)) == 'Object' && isCallable$4(O.callee) ? 'Arguments' : result;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
var classof$3 = classof$4;
|
|
111
|
-
var getMethod$1 = getMethod$2;
|
|
112
|
-
var Iterators = iterators;
|
|
113
|
-
var wellKnownSymbol$3 = wellKnownSymbol$8;
|
|
114
|
-
|
|
115
|
-
var ITERATOR$1 = wellKnownSymbol$3('iterator');
|
|
116
|
-
|
|
117
|
-
var getIteratorMethod$2 = function (it) {
|
|
118
|
-
if (it != undefined) return getMethod$1(it, ITERATOR$1)
|
|
119
|
-
|| getMethod$1(it, '@@iterator')
|
|
120
|
-
|| Iterators[classof$3(it)];
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
var global$a = global$e;
|
|
124
|
-
var call$4 = functionCall;
|
|
125
|
-
var aCallable$2 = aCallable$4;
|
|
126
|
-
var anObject$4 = anObject$5;
|
|
127
|
-
var tryToString$2 = tryToString$3;
|
|
128
|
-
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
129
|
-
|
|
130
|
-
var TypeError$5 = global$a.TypeError;
|
|
131
|
-
|
|
132
|
-
var getIterator$1 = function (argument, usingIterator) {
|
|
133
|
-
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
134
|
-
if (aCallable$2(iteratorMethod)) return anObject$4(call$4(iteratorMethod, argument));
|
|
135
|
-
throw TypeError$5(tryToString$2(argument) + ' is not iterable');
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
var call$3 = functionCall;
|
|
139
|
-
var anObject$3 = anObject$5;
|
|
140
|
-
var getMethod = getMethod$2;
|
|
141
|
-
|
|
142
|
-
var iteratorClose$1 = function (iterator, kind, value) {
|
|
143
|
-
var innerResult, innerError;
|
|
144
|
-
anObject$3(iterator);
|
|
145
|
-
try {
|
|
146
|
-
innerResult = getMethod(iterator, 'return');
|
|
147
|
-
if (!innerResult) {
|
|
148
|
-
if (kind === 'throw') throw value;
|
|
149
|
-
return value;
|
|
150
|
-
}
|
|
151
|
-
innerResult = call$3(innerResult, iterator);
|
|
152
|
-
} catch (error) {
|
|
153
|
-
innerError = true;
|
|
154
|
-
innerResult = error;
|
|
155
|
-
}
|
|
156
|
-
if (kind === 'throw') throw value;
|
|
157
|
-
if (innerError) throw innerResult;
|
|
158
|
-
anObject$3(innerResult);
|
|
159
|
-
return value;
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
var global$9 = global$e;
|
|
163
|
-
var bind$3 = functionBindContext;
|
|
164
|
-
var call$2 = functionCall;
|
|
165
|
-
var anObject$2 = anObject$5;
|
|
166
|
-
var tryToString$1 = tryToString$3;
|
|
167
|
-
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
168
|
-
var lengthOfArrayLike = lengthOfArrayLike$1;
|
|
169
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
170
|
-
var getIterator = getIterator$1;
|
|
171
|
-
var getIteratorMethod = getIteratorMethod$2;
|
|
172
|
-
var iteratorClose = iteratorClose$1;
|
|
173
|
-
|
|
174
|
-
var TypeError$4 = global$9.TypeError;
|
|
175
|
-
|
|
176
|
-
var Result = function (stopped, result) {
|
|
177
|
-
this.stopped = stopped;
|
|
178
|
-
this.result = result;
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
var ResultPrototype = Result.prototype;
|
|
182
|
-
|
|
183
|
-
var iterate$1 = function (iterable, unboundFunction, options) {
|
|
184
|
-
var that = options && options.that;
|
|
185
|
-
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
186
|
-
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
187
|
-
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
188
|
-
var fn = bind$3(unboundFunction, that);
|
|
189
|
-
var iterator, iterFn, index, length, result, next, step;
|
|
190
|
-
|
|
191
|
-
var stop = function (condition) {
|
|
192
|
-
if (iterator) iteratorClose(iterator, 'normal', condition);
|
|
193
|
-
return new Result(true, condition);
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
var callFn = function (value) {
|
|
197
|
-
if (AS_ENTRIES) {
|
|
198
|
-
anObject$2(value);
|
|
199
|
-
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
200
|
-
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
if (IS_ITERATOR) {
|
|
204
|
-
iterator = iterable;
|
|
205
|
-
} else {
|
|
206
|
-
iterFn = getIteratorMethod(iterable);
|
|
207
|
-
if (!iterFn) throw TypeError$4(tryToString$1(iterable) + ' is not iterable');
|
|
208
|
-
// optimisation for array iterators
|
|
209
|
-
if (isArrayIteratorMethod(iterFn)) {
|
|
210
|
-
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
211
|
-
result = callFn(iterable[index]);
|
|
212
|
-
if (result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
213
|
-
} return new Result(false);
|
|
214
|
-
}
|
|
215
|
-
iterator = getIterator(iterable, iterFn);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
next = iterator.next;
|
|
219
|
-
while (!(step = call$2(next, iterator)).done) {
|
|
220
|
-
try {
|
|
221
|
-
result = callFn(step.value);
|
|
222
|
-
} catch (error) {
|
|
223
|
-
iteratorClose(iterator, 'throw', error);
|
|
224
|
-
}
|
|
225
|
-
if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
226
|
-
} return new Result(false);
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
var wellKnownSymbol$2 = wellKnownSymbol$8;
|
|
230
|
-
|
|
231
|
-
var ITERATOR = wellKnownSymbol$2('iterator');
|
|
232
|
-
var SAFE_CLOSING = false;
|
|
233
|
-
|
|
234
|
-
try {
|
|
235
|
-
var called = 0;
|
|
236
|
-
var iteratorWithReturn = {
|
|
237
|
-
next: function () {
|
|
238
|
-
return { done: !!called++ };
|
|
239
|
-
},
|
|
240
|
-
'return': function () {
|
|
241
|
-
SAFE_CLOSING = true;
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
iteratorWithReturn[ITERATOR] = function () {
|
|
245
|
-
return this;
|
|
246
|
-
};
|
|
247
|
-
// eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
|
|
248
|
-
Array.from(iteratorWithReturn, function () { throw 2; });
|
|
249
|
-
} catch (error) { /* empty */ }
|
|
250
|
-
|
|
251
|
-
var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
|
|
252
|
-
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
|
253
|
-
var ITERATION_SUPPORT = false;
|
|
254
|
-
try {
|
|
255
|
-
var object = {};
|
|
256
|
-
object[ITERATOR] = function () {
|
|
257
|
-
return {
|
|
258
|
-
next: function () {
|
|
259
|
-
return { done: ITERATION_SUPPORT = true };
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
|
-
};
|
|
263
|
-
exec(object);
|
|
264
|
-
} catch (error) { /* empty */ }
|
|
265
|
-
return ITERATION_SUPPORT;
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
var uncurryThis$2 = functionUncurryThis;
|
|
269
41
|
var fails$3 = fails$4;
|
|
270
|
-
var isCallable$
|
|
271
|
-
var classof$
|
|
272
|
-
var getBuiltIn$
|
|
42
|
+
var isCallable$5 = isCallable$6;
|
|
43
|
+
var classof$1 = classof$3;
|
|
44
|
+
var getBuiltIn$3 = getBuiltIn$5;
|
|
273
45
|
var inspectSource$1 = inspectSource$2;
|
|
274
46
|
|
|
275
47
|
var noop = function () { /* empty */ };
|
|
276
48
|
var empty = [];
|
|
277
|
-
var construct = getBuiltIn$
|
|
49
|
+
var construct = getBuiltIn$3('Reflect', 'construct');
|
|
278
50
|
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
279
|
-
var exec = uncurryThis$
|
|
51
|
+
var exec = uncurryThis$3(constructorRegExp.exec);
|
|
280
52
|
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
281
53
|
|
|
282
54
|
var isConstructorModern = function isConstructor(argument) {
|
|
283
|
-
if (!isCallable$
|
|
55
|
+
if (!isCallable$5(argument)) return false;
|
|
284
56
|
try {
|
|
285
57
|
construct(noop, empty, argument);
|
|
286
58
|
return true;
|
|
@@ -290,8 +62,8 @@ var isConstructorModern = function isConstructor(argument) {
|
|
|
290
62
|
};
|
|
291
63
|
|
|
292
64
|
var isConstructorLegacy = function isConstructor(argument) {
|
|
293
|
-
if (!isCallable$
|
|
294
|
-
switch (classof$
|
|
65
|
+
if (!isCallable$5(argument)) return false;
|
|
66
|
+
switch (classof$1(argument)) {
|
|
295
67
|
case 'AsyncFunction':
|
|
296
68
|
case 'GeneratorFunction':
|
|
297
69
|
case 'AsyncGeneratorFunction': return false;
|
|
@@ -318,53 +90,64 @@ var isConstructor$1 = !construct || fails$3(function () {
|
|
|
318
90
|
|| called;
|
|
319
91
|
}) ? isConstructorLegacy : isConstructorModern;
|
|
320
92
|
|
|
321
|
-
var global$8 = global$e;
|
|
322
93
|
var isConstructor = isConstructor$1;
|
|
323
|
-
var tryToString = tryToString$3;
|
|
94
|
+
var tryToString$2 = tryToString$3;
|
|
324
95
|
|
|
325
|
-
var TypeError$3 =
|
|
96
|
+
var $TypeError$3 = TypeError;
|
|
326
97
|
|
|
327
98
|
// `Assert: IsConstructor(argument) is true`
|
|
328
99
|
var aConstructor$1 = function (argument) {
|
|
329
100
|
if (isConstructor(argument)) return argument;
|
|
330
|
-
throw TypeError$3(tryToString(argument) + ' is not a constructor');
|
|
101
|
+
throw $TypeError$3(tryToString$2(argument) + ' is not a constructor');
|
|
331
102
|
};
|
|
332
103
|
|
|
333
|
-
var anObject$
|
|
104
|
+
var anObject$4 = anObject$5;
|
|
334
105
|
var aConstructor = aConstructor$1;
|
|
335
|
-
var wellKnownSymbol$
|
|
106
|
+
var wellKnownSymbol$4 = wellKnownSymbol$6;
|
|
336
107
|
|
|
337
|
-
var SPECIES$1 = wellKnownSymbol$
|
|
108
|
+
var SPECIES$1 = wellKnownSymbol$4('species');
|
|
338
109
|
|
|
339
110
|
// `SpeciesConstructor` abstract operation
|
|
340
111
|
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
341
112
|
var speciesConstructor$2 = function (O, defaultConstructor) {
|
|
342
|
-
var C = anObject$
|
|
113
|
+
var C = anObject$4(O).constructor;
|
|
343
114
|
var S;
|
|
344
|
-
return C === undefined || (S = anObject$
|
|
115
|
+
return C === undefined || (S = anObject$4(C)[SPECIES$1]) == undefined ? defaultConstructor : aConstructor(S);
|
|
345
116
|
};
|
|
346
117
|
|
|
347
|
-
var NATIVE_BIND = functionBindNative;
|
|
118
|
+
var NATIVE_BIND$1 = functionBindNative;
|
|
348
119
|
|
|
349
120
|
var FunctionPrototype = Function.prototype;
|
|
350
121
|
var apply$1 = FunctionPrototype.apply;
|
|
351
|
-
var call$
|
|
122
|
+
var call$7 = FunctionPrototype.call;
|
|
352
123
|
|
|
353
|
-
// eslint-disable-next-line es/no-reflect -- safe
|
|
354
|
-
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$
|
|
355
|
-
return call$
|
|
124
|
+
// eslint-disable-next-line es-x/no-reflect -- safe
|
|
125
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$7.bind(apply$1) : function () {
|
|
126
|
+
return call$7.apply(apply$1, arguments);
|
|
356
127
|
});
|
|
357
128
|
|
|
129
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
130
|
+
var aCallable$5 = aCallable$6;
|
|
131
|
+
var NATIVE_BIND = functionBindNative;
|
|
132
|
+
|
|
133
|
+
var bind$4 = uncurryThis$2(uncurryThis$2.bind);
|
|
134
|
+
|
|
135
|
+
// optional / simple context binding
|
|
136
|
+
var functionBindContext = function (fn, that) {
|
|
137
|
+
aCallable$5(fn);
|
|
138
|
+
return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
|
|
139
|
+
return fn.apply(that, arguments);
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
|
|
358
143
|
var uncurryThis$1 = functionUncurryThis;
|
|
359
144
|
|
|
360
145
|
var arraySlice$1 = uncurryThis$1([].slice);
|
|
361
146
|
|
|
362
|
-
var
|
|
363
|
-
|
|
364
|
-
var TypeError$2 = global$7.TypeError;
|
|
147
|
+
var $TypeError$2 = TypeError;
|
|
365
148
|
|
|
366
149
|
var validateArgumentsLength$1 = function (passed, required) {
|
|
367
|
-
if (passed < required) throw TypeError$2('Not enough arguments');
|
|
150
|
+
if (passed < required) throw $TypeError$2('Not enough arguments');
|
|
368
151
|
return passed;
|
|
369
152
|
};
|
|
370
153
|
|
|
@@ -372,15 +155,10 @@ var userAgent$2 = engineUserAgent;
|
|
|
372
155
|
|
|
373
156
|
var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
|
|
374
157
|
|
|
375
|
-
var
|
|
376
|
-
var global$6 = global$e;
|
|
377
|
-
|
|
378
|
-
var engineIsNode = classof$1(global$6.process) == 'process';
|
|
379
|
-
|
|
380
|
-
var global$5 = global$e;
|
|
158
|
+
var global$6 = global$8;
|
|
381
159
|
var apply = functionApply;
|
|
382
|
-
var bind$
|
|
383
|
-
var isCallable$
|
|
160
|
+
var bind$3 = functionBindContext;
|
|
161
|
+
var isCallable$4 = isCallable$6;
|
|
384
162
|
var hasOwn = hasOwnProperty_1;
|
|
385
163
|
var fails$2 = fails$4;
|
|
386
164
|
var html = html$1;
|
|
@@ -390,13 +168,13 @@ var validateArgumentsLength = validateArgumentsLength$1;
|
|
|
390
168
|
var IS_IOS$1 = engineIsIos;
|
|
391
169
|
var IS_NODE$2 = engineIsNode;
|
|
392
170
|
|
|
393
|
-
var set = global$
|
|
394
|
-
var clear = global$
|
|
395
|
-
var process$2 = global$
|
|
396
|
-
var Dispatch = global$
|
|
397
|
-
var Function$1 = global$
|
|
398
|
-
var MessageChannel = global$
|
|
399
|
-
var String$
|
|
171
|
+
var set = global$6.setImmediate;
|
|
172
|
+
var clear = global$6.clearImmediate;
|
|
173
|
+
var process$2 = global$6.process;
|
|
174
|
+
var Dispatch = global$6.Dispatch;
|
|
175
|
+
var Function$1 = global$6.Function;
|
|
176
|
+
var MessageChannel = global$6.MessageChannel;
|
|
177
|
+
var String$1 = global$6.String;
|
|
400
178
|
var counter = 0;
|
|
401
179
|
var queue$1 = {};
|
|
402
180
|
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
@@ -404,7 +182,7 @@ var location, defer, channel, port;
|
|
|
404
182
|
|
|
405
183
|
try {
|
|
406
184
|
// Deno throws a ReferenceError on `location` access without `--location` flag
|
|
407
|
-
location = global$
|
|
185
|
+
location = global$6.location;
|
|
408
186
|
} catch (error) { /* empty */ }
|
|
409
187
|
|
|
410
188
|
var run = function (id) {
|
|
@@ -427,14 +205,14 @@ var listener = function (event) {
|
|
|
427
205
|
|
|
428
206
|
var post = function (id) {
|
|
429
207
|
// old engines have not location.origin
|
|
430
|
-
global$
|
|
208
|
+
global$6.postMessage(String$1(id), location.protocol + '//' + location.host);
|
|
431
209
|
};
|
|
432
210
|
|
|
433
211
|
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
434
212
|
if (!set || !clear) {
|
|
435
213
|
set = function setImmediate(handler) {
|
|
436
214
|
validateArgumentsLength(arguments.length, 1);
|
|
437
|
-
var fn = isCallable$
|
|
215
|
+
var fn = isCallable$4(handler) ? handler : Function$1(handler);
|
|
438
216
|
var args = arraySlice(arguments, 1);
|
|
439
217
|
queue$1[++counter] = function () {
|
|
440
218
|
apply(fn, undefined, args);
|
|
@@ -461,18 +239,18 @@ if (!set || !clear) {
|
|
|
461
239
|
channel = new MessageChannel();
|
|
462
240
|
port = channel.port2;
|
|
463
241
|
channel.port1.onmessage = listener;
|
|
464
|
-
defer = bind$
|
|
242
|
+
defer = bind$3(port.postMessage, port);
|
|
465
243
|
// Browsers with postMessage, skip WebWorkers
|
|
466
244
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
467
245
|
} else if (
|
|
468
|
-
global$
|
|
469
|
-
isCallable$
|
|
470
|
-
!global$
|
|
246
|
+
global$6.addEventListener &&
|
|
247
|
+
isCallable$4(global$6.postMessage) &&
|
|
248
|
+
!global$6.importScripts &&
|
|
471
249
|
location && location.protocol !== 'file:' &&
|
|
472
250
|
!fails$2(post)
|
|
473
251
|
) {
|
|
474
252
|
defer = post;
|
|
475
|
-
global$
|
|
253
|
+
global$6.addEventListener('message', listener, false);
|
|
476
254
|
// IE8-
|
|
477
255
|
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
|
478
256
|
defer = function (id) {
|
|
@@ -495,16 +273,16 @@ var task$1 = {
|
|
|
495
273
|
};
|
|
496
274
|
|
|
497
275
|
var userAgent$1 = engineUserAgent;
|
|
498
|
-
var global$
|
|
276
|
+
var global$5 = global$8;
|
|
499
277
|
|
|
500
|
-
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$
|
|
278
|
+
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$5.Pebble !== undefined;
|
|
501
279
|
|
|
502
280
|
var userAgent = engineUserAgent;
|
|
503
281
|
|
|
504
282
|
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
|
|
505
283
|
|
|
506
|
-
var global$
|
|
507
|
-
var bind$
|
|
284
|
+
var global$4 = global$8;
|
|
285
|
+
var bind$2 = functionBindContext;
|
|
508
286
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
509
287
|
var macrotask = task$1.set;
|
|
510
288
|
var IS_IOS = engineIsIos;
|
|
@@ -512,12 +290,12 @@ var IS_IOS_PEBBLE = engineIsIosPebble;
|
|
|
512
290
|
var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
|
|
513
291
|
var IS_NODE$1 = engineIsNode;
|
|
514
292
|
|
|
515
|
-
var MutationObserver = global$
|
|
516
|
-
var document$1 = global$
|
|
517
|
-
var process$1 = global$
|
|
518
|
-
var Promise$1 = global$
|
|
293
|
+
var MutationObserver = global$4.MutationObserver || global$4.WebKitMutationObserver;
|
|
294
|
+
var document$1 = global$4.document;
|
|
295
|
+
var process$1 = global$4.process;
|
|
296
|
+
var Promise$1 = global$4.Promise;
|
|
519
297
|
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
|
|
520
|
-
var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$
|
|
298
|
+
var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$4, 'queueMicrotask');
|
|
521
299
|
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
|
|
522
300
|
|
|
523
301
|
var flush, head, last, notify$1, toggle, node, promise, then;
|
|
@@ -556,7 +334,7 @@ if (!queueMicrotask) {
|
|
|
556
334
|
promise = Promise$1.resolve(undefined);
|
|
557
335
|
// workaround of WebKit ~ iOS Safari 10.1 bug
|
|
558
336
|
promise.constructor = Promise$1;
|
|
559
|
-
then = bind$
|
|
337
|
+
then = bind$2(promise.then, promise);
|
|
560
338
|
notify$1 = function () {
|
|
561
339
|
then(flush);
|
|
562
340
|
};
|
|
@@ -568,12 +346,12 @@ if (!queueMicrotask) {
|
|
|
568
346
|
// for other environments - macrotask based on:
|
|
569
347
|
// - setImmediate
|
|
570
348
|
// - MessageChannel
|
|
571
|
-
// - window.
|
|
349
|
+
// - window.postMessage
|
|
572
350
|
// - onreadystatechange
|
|
573
351
|
// - setTimeout
|
|
574
352
|
} else {
|
|
575
353
|
// strange IE + webpack dev server bug - use .bind(global)
|
|
576
|
-
macrotask = bind$
|
|
354
|
+
macrotask = bind$2(macrotask, global$4);
|
|
577
355
|
notify$1 = function () {
|
|
578
356
|
macrotask(flush);
|
|
579
357
|
};
|
|
@@ -589,50 +367,16 @@ var microtask$1 = queueMicrotask || function (fn) {
|
|
|
589
367
|
} last = task;
|
|
590
368
|
};
|
|
591
369
|
|
|
592
|
-
var
|
|
593
|
-
|
|
594
|
-
var aCallable$1 = aCallable$4;
|
|
595
|
-
|
|
596
|
-
var PromiseCapability = function (C) {
|
|
597
|
-
var resolve, reject;
|
|
598
|
-
this.promise = new C(function ($$resolve, $$reject) {
|
|
599
|
-
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
|
|
600
|
-
resolve = $$resolve;
|
|
601
|
-
reject = $$reject;
|
|
602
|
-
});
|
|
603
|
-
this.resolve = aCallable$1(resolve);
|
|
604
|
-
this.reject = aCallable$1(reject);
|
|
605
|
-
};
|
|
606
|
-
|
|
607
|
-
// `NewPromiseCapability` abstract operation
|
|
608
|
-
// https://tc39.es/ecma262/#sec-newpromisecapability
|
|
609
|
-
newPromiseCapability$2.f = function (C) {
|
|
610
|
-
return new PromiseCapability(C);
|
|
611
|
-
};
|
|
612
|
-
|
|
613
|
-
var anObject = anObject$5;
|
|
614
|
-
var isObject$1 = isObject$2;
|
|
615
|
-
var newPromiseCapability$1 = newPromiseCapability$2;
|
|
616
|
-
|
|
617
|
-
var promiseResolve$2 = function (C, x) {
|
|
618
|
-
anObject(C);
|
|
619
|
-
if (isObject$1(x) && x.constructor === C) return x;
|
|
620
|
-
var promiseCapability = newPromiseCapability$1.f(C);
|
|
621
|
-
var resolve = promiseCapability.resolve;
|
|
622
|
-
resolve(x);
|
|
623
|
-
return promiseCapability.promise;
|
|
624
|
-
};
|
|
625
|
-
|
|
626
|
-
var global$2 = global$e;
|
|
370
|
+
var global$3 = global$8;
|
|
627
371
|
|
|
628
372
|
var hostReportErrors$1 = function (a, b) {
|
|
629
|
-
var console = global$
|
|
373
|
+
var console = global$3.console;
|
|
630
374
|
if (console && console.error) {
|
|
631
375
|
arguments.length == 1 ? console.error(a) : console.error(a, b);
|
|
632
376
|
}
|
|
633
377
|
};
|
|
634
378
|
|
|
635
|
-
var perform$
|
|
379
|
+
var perform$3 = function (exec) {
|
|
636
380
|
try {
|
|
637
381
|
return { error: false, value: exec() };
|
|
638
382
|
} catch (error) {
|
|
@@ -664,71 +408,29 @@ Queue$1.prototype = {
|
|
|
664
408
|
|
|
665
409
|
var queue = Queue$1;
|
|
666
410
|
|
|
667
|
-
var
|
|
411
|
+
var global$2 = global$8;
|
|
668
412
|
|
|
669
|
-
var
|
|
670
|
-
|
|
671
|
-
var
|
|
672
|
-
|
|
673
|
-
var
|
|
674
|
-
var
|
|
675
|
-
var
|
|
676
|
-
var setPrototypeOf = objectSetPrototypeOf;
|
|
677
|
-
var setToStringTag = setToStringTag$1;
|
|
678
|
-
var setSpecies = setSpecies$1;
|
|
679
|
-
var aCallable = aCallable$4;
|
|
680
|
-
var isCallable$1 = isCallable$5;
|
|
681
|
-
var isObject = isObject$2;
|
|
682
|
-
var anInstance = anInstance$1;
|
|
683
|
-
var inspectSource = inspectSource$2;
|
|
684
|
-
var iterate = iterate$1;
|
|
685
|
-
var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
|
|
686
|
-
var speciesConstructor$1 = speciesConstructor$2;
|
|
687
|
-
var task = task$1.set;
|
|
688
|
-
var microtask = microtask$1;
|
|
689
|
-
var promiseResolve$1 = promiseResolve$2;
|
|
690
|
-
var hostReportErrors = hostReportErrors$1;
|
|
691
|
-
var newPromiseCapabilityModule = newPromiseCapability$2;
|
|
692
|
-
var perform = perform$1;
|
|
693
|
-
var Queue = queue;
|
|
694
|
-
var InternalStateModule = internalState;
|
|
413
|
+
var promiseNativeConstructor = global$2.Promise;
|
|
414
|
+
|
|
415
|
+
var engineIsBrowser = typeof window == 'object' && typeof Deno != 'object';
|
|
416
|
+
|
|
417
|
+
var global$1 = global$8;
|
|
418
|
+
var NativePromiseConstructor$4 = promiseNativeConstructor;
|
|
419
|
+
var isCallable$3 = isCallable$6;
|
|
695
420
|
var isForced = isForced_1;
|
|
696
|
-
var
|
|
421
|
+
var inspectSource = inspectSource$2;
|
|
422
|
+
var wellKnownSymbol$3 = wellKnownSymbol$6;
|
|
697
423
|
var IS_BROWSER = engineIsBrowser;
|
|
698
|
-
var IS_NODE = engineIsNode;
|
|
699
424
|
var V8_VERSION = engineV8Version;
|
|
700
425
|
|
|
701
|
-
|
|
702
|
-
var
|
|
703
|
-
|
|
704
|
-
var getInternalState = InternalStateModule.getterFor(PROMISE);
|
|
705
|
-
var setInternalState = InternalStateModule.set;
|
|
706
|
-
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
|
707
|
-
var NativePromisePrototype = NativePromise$1 && NativePromise$1.prototype;
|
|
708
|
-
var PromiseConstructor = NativePromise$1;
|
|
709
|
-
var PromisePrototype = NativePromisePrototype;
|
|
710
|
-
var TypeError$1 = global$1.TypeError;
|
|
711
|
-
var document = global$1.document;
|
|
712
|
-
var process = global$1.process;
|
|
713
|
-
var newPromiseCapability = newPromiseCapabilityModule.f;
|
|
714
|
-
var newGenericPromiseCapability = newPromiseCapability;
|
|
715
|
-
|
|
716
|
-
var DISPATCH_EVENT = !!(document && document.createEvent && global$1.dispatchEvent);
|
|
717
|
-
var NATIVE_REJECTION_EVENT = isCallable$1(global$1.PromiseRejectionEvent);
|
|
718
|
-
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
719
|
-
var REJECTION_HANDLED = 'rejectionhandled';
|
|
720
|
-
var PENDING = 0;
|
|
721
|
-
var FULFILLED = 1;
|
|
722
|
-
var REJECTED = 2;
|
|
723
|
-
var HANDLED = 1;
|
|
724
|
-
var UNHANDLED = 2;
|
|
426
|
+
NativePromiseConstructor$4 && NativePromiseConstructor$4.prototype;
|
|
427
|
+
var SPECIES = wellKnownSymbol$3('species');
|
|
725
428
|
var SUBCLASSING = false;
|
|
429
|
+
var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$3(global$1.PromiseRejectionEvent);
|
|
726
430
|
|
|
727
|
-
var
|
|
728
|
-
|
|
729
|
-
var
|
|
730
|
-
var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);
|
|
731
|
-
var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);
|
|
431
|
+
var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
|
|
432
|
+
var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$4);
|
|
433
|
+
var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$4);
|
|
732
434
|
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
733
435
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
734
436
|
// We can't detect it synchronously, so just check versions
|
|
@@ -738,7 +440,7 @@ var FORCED = isForced(PROMISE, function () {
|
|
|
738
440
|
// https://github.com/zloirock/core-js/issues/679
|
|
739
441
|
if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;
|
|
740
442
|
// Detect correctness of subclassing with @@species support
|
|
741
|
-
var promise = new
|
|
443
|
+
var promise = new NativePromiseConstructor$4(function (resolve) { resolve(1); });
|
|
742
444
|
var FakePromise = function (exec) {
|
|
743
445
|
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
744
446
|
};
|
|
@@ -747,17 +449,89 @@ var FORCED = isForced(PROMISE, function () {
|
|
|
747
449
|
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
|
|
748
450
|
if (!SUBCLASSING) return true;
|
|
749
451
|
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
750
|
-
return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !
|
|
452
|
+
return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_PROMISE_REJECTION_EVENT$1;
|
|
751
453
|
});
|
|
752
454
|
|
|
753
|
-
var
|
|
754
|
-
|
|
755
|
-
|
|
455
|
+
var promiseConstructorDetection = {
|
|
456
|
+
CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
|
|
457
|
+
REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
|
|
458
|
+
SUBCLASSING: SUBCLASSING
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
var newPromiseCapability$2 = {};
|
|
462
|
+
|
|
463
|
+
var aCallable$4 = aCallable$6;
|
|
464
|
+
|
|
465
|
+
var PromiseCapability = function (C) {
|
|
466
|
+
var resolve, reject;
|
|
467
|
+
this.promise = new C(function ($$resolve, $$reject) {
|
|
468
|
+
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
|
|
469
|
+
resolve = $$resolve;
|
|
470
|
+
reject = $$reject;
|
|
471
|
+
});
|
|
472
|
+
this.resolve = aCallable$4(resolve);
|
|
473
|
+
this.reject = aCallable$4(reject);
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
// `NewPromiseCapability` abstract operation
|
|
477
|
+
// https://tc39.es/ecma262/#sec-newpromisecapability
|
|
478
|
+
newPromiseCapability$2.f = function (C) {
|
|
479
|
+
return new PromiseCapability(C);
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
var $$7 = _export;
|
|
483
|
+
var IS_NODE = engineIsNode;
|
|
484
|
+
var global = global$8;
|
|
485
|
+
var call$6 = functionCall;
|
|
486
|
+
var defineBuiltIn$2 = defineBuiltIn$3;
|
|
487
|
+
var setPrototypeOf = objectSetPrototypeOf;
|
|
488
|
+
var setToStringTag = setToStringTag$1;
|
|
489
|
+
var setSpecies = setSpecies$1;
|
|
490
|
+
var aCallable$3 = aCallable$6;
|
|
491
|
+
var isCallable$2 = isCallable$6;
|
|
492
|
+
var isObject$1 = isObject$2;
|
|
493
|
+
var anInstance = anInstance$1;
|
|
494
|
+
var speciesConstructor$1 = speciesConstructor$2;
|
|
495
|
+
var task = task$1.set;
|
|
496
|
+
var microtask = microtask$1;
|
|
497
|
+
var hostReportErrors = hostReportErrors$1;
|
|
498
|
+
var perform$2 = perform$3;
|
|
499
|
+
var Queue = queue;
|
|
500
|
+
var InternalStateModule = internalState;
|
|
501
|
+
var NativePromiseConstructor$3 = promiseNativeConstructor;
|
|
502
|
+
var PromiseConstructorDetection = promiseConstructorDetection;
|
|
503
|
+
var newPromiseCapabilityModule$3 = newPromiseCapability$2;
|
|
504
|
+
|
|
505
|
+
var PROMISE = 'Promise';
|
|
506
|
+
var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
|
|
507
|
+
var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
|
|
508
|
+
var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
|
|
509
|
+
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
|
510
|
+
var setInternalState = InternalStateModule.set;
|
|
511
|
+
var NativePromisePrototype$2 = NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
|
|
512
|
+
var PromiseConstructor = NativePromiseConstructor$3;
|
|
513
|
+
var PromisePrototype = NativePromisePrototype$2;
|
|
514
|
+
var TypeError$1 = global.TypeError;
|
|
515
|
+
var document = global.document;
|
|
516
|
+
var process = global.process;
|
|
517
|
+
var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
|
|
518
|
+
var newGenericPromiseCapability = newPromiseCapability$1;
|
|
519
|
+
|
|
520
|
+
var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
|
|
521
|
+
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
522
|
+
var REJECTION_HANDLED = 'rejectionhandled';
|
|
523
|
+
var PENDING = 0;
|
|
524
|
+
var FULFILLED = 1;
|
|
525
|
+
var REJECTED = 2;
|
|
526
|
+
var HANDLED = 1;
|
|
527
|
+
var UNHANDLED = 2;
|
|
528
|
+
|
|
529
|
+
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
|
756
530
|
|
|
757
531
|
// helpers
|
|
758
532
|
var isThenable = function (it) {
|
|
759
533
|
var then;
|
|
760
|
-
return isObject(it) && isCallable$
|
|
534
|
+
return isObject$1(it) && isCallable$2(then = it.then) ? then : false;
|
|
761
535
|
};
|
|
762
536
|
|
|
763
537
|
var callReaction = function (reaction, state) {
|
|
@@ -786,7 +560,7 @@ var callReaction = function (reaction, state) {
|
|
|
786
560
|
if (result === reaction.promise) {
|
|
787
561
|
reject(TypeError$1('Promise-chain cycle'));
|
|
788
562
|
} else if (then = isThenable(result)) {
|
|
789
|
-
call(then, result, resolve, reject);
|
|
563
|
+
call$6(then, result, resolve, reject);
|
|
790
564
|
} else resolve(result);
|
|
791
565
|
} else reject(value);
|
|
792
566
|
} catch (error) {
|
|
@@ -816,20 +590,20 @@ var dispatchEvent = function (name, promise, reason) {
|
|
|
816
590
|
event.promise = promise;
|
|
817
591
|
event.reason = reason;
|
|
818
592
|
event.initEvent(name, false, true);
|
|
819
|
-
global
|
|
593
|
+
global.dispatchEvent(event);
|
|
820
594
|
} else event = { promise: promise, reason: reason };
|
|
821
|
-
if (!
|
|
595
|
+
if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
|
|
822
596
|
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
823
597
|
};
|
|
824
598
|
|
|
825
599
|
var onUnhandled = function (state) {
|
|
826
|
-
call(task, global
|
|
600
|
+
call$6(task, global, function () {
|
|
827
601
|
var promise = state.facade;
|
|
828
602
|
var value = state.value;
|
|
829
603
|
var IS_UNHANDLED = isUnhandled(state);
|
|
830
604
|
var result;
|
|
831
605
|
if (IS_UNHANDLED) {
|
|
832
|
-
result = perform(function () {
|
|
606
|
+
result = perform$2(function () {
|
|
833
607
|
if (IS_NODE) {
|
|
834
608
|
process.emit('unhandledRejection', value, promise);
|
|
835
609
|
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
@@ -846,7 +620,7 @@ var isUnhandled = function (state) {
|
|
|
846
620
|
};
|
|
847
621
|
|
|
848
622
|
var onHandleUnhandled = function (state) {
|
|
849
|
-
call(task, global
|
|
623
|
+
call$6(task, global, function () {
|
|
850
624
|
var promise = state.facade;
|
|
851
625
|
if (IS_NODE) {
|
|
852
626
|
process.emit('rejectionHandled', promise);
|
|
@@ -854,7 +628,7 @@ var onHandleUnhandled = function (state) {
|
|
|
854
628
|
});
|
|
855
629
|
};
|
|
856
630
|
|
|
857
|
-
var bind = function (fn, state, unwrap) {
|
|
631
|
+
var bind$1 = function (fn, state, unwrap) {
|
|
858
632
|
return function (value) {
|
|
859
633
|
fn(state, value, unwrap);
|
|
860
634
|
};
|
|
@@ -880,9 +654,9 @@ var internalResolve = function (state, value, unwrap) {
|
|
|
880
654
|
microtask(function () {
|
|
881
655
|
var wrapper = { done: false };
|
|
882
656
|
try {
|
|
883
|
-
call(then, value,
|
|
884
|
-
bind(internalResolve, wrapper, state),
|
|
885
|
-
bind(internalReject, wrapper, state)
|
|
657
|
+
call$6(then, value,
|
|
658
|
+
bind$1(internalResolve, wrapper, state),
|
|
659
|
+
bind$1(internalReject, wrapper, state)
|
|
886
660
|
);
|
|
887
661
|
} catch (error) {
|
|
888
662
|
internalReject(wrapper, error, state);
|
|
@@ -899,20 +673,22 @@ var internalResolve = function (state, value, unwrap) {
|
|
|
899
673
|
};
|
|
900
674
|
|
|
901
675
|
// constructor polyfill
|
|
902
|
-
if (
|
|
676
|
+
if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
903
677
|
// 25.4.3.1 Promise(executor)
|
|
904
678
|
PromiseConstructor = function Promise(executor) {
|
|
905
679
|
anInstance(this, PromisePrototype);
|
|
906
|
-
aCallable(executor);
|
|
907
|
-
call(Internal, this);
|
|
908
|
-
var state =
|
|
680
|
+
aCallable$3(executor);
|
|
681
|
+
call$6(Internal, this);
|
|
682
|
+
var state = getInternalPromiseState(this);
|
|
909
683
|
try {
|
|
910
|
-
executor(bind(internalResolve, state), bind(internalReject, state));
|
|
684
|
+
executor(bind$1(internalResolve, state), bind$1(internalReject, state));
|
|
911
685
|
} catch (error) {
|
|
912
686
|
internalReject(state, error);
|
|
913
687
|
}
|
|
914
688
|
};
|
|
689
|
+
|
|
915
690
|
PromisePrototype = PromiseConstructor.prototype;
|
|
691
|
+
|
|
916
692
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
917
693
|
Internal = function Promise(executor) {
|
|
918
694
|
setInternalState(this, {
|
|
@@ -926,117 +702,271 @@ if (FORCED) {
|
|
|
926
702
|
value: undefined
|
|
927
703
|
});
|
|
928
704
|
};
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
return reaction.promise;
|
|
945
|
-
},
|
|
946
|
-
// `Promise.prototype.catch` method
|
|
947
|
-
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
948
|
-
'catch': function (onRejected) {
|
|
949
|
-
return this.then(undefined, onRejected);
|
|
950
|
-
}
|
|
705
|
+
|
|
706
|
+
// `Promise.prototype.then` method
|
|
707
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
|
708
|
+
Internal.prototype = defineBuiltIn$2(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
|
709
|
+
var state = getInternalPromiseState(this);
|
|
710
|
+
var reaction = newPromiseCapability$1(speciesConstructor$1(this, PromiseConstructor));
|
|
711
|
+
state.parent = true;
|
|
712
|
+
reaction.ok = isCallable$2(onFulfilled) ? onFulfilled : true;
|
|
713
|
+
reaction.fail = isCallable$2(onRejected) && onRejected;
|
|
714
|
+
reaction.domain = IS_NODE ? process.domain : undefined;
|
|
715
|
+
if (state.state == PENDING) state.reactions.add(reaction);
|
|
716
|
+
else microtask(function () {
|
|
717
|
+
callReaction(reaction, state);
|
|
718
|
+
});
|
|
719
|
+
return reaction.promise;
|
|
951
720
|
});
|
|
721
|
+
|
|
952
722
|
OwnPromiseCapability = function () {
|
|
953
723
|
var promise = new Internal();
|
|
954
|
-
var state =
|
|
724
|
+
var state = getInternalPromiseState(promise);
|
|
955
725
|
this.promise = promise;
|
|
956
|
-
this.resolve = bind(internalResolve, state);
|
|
957
|
-
this.reject = bind(internalReject, state);
|
|
726
|
+
this.resolve = bind$1(internalResolve, state);
|
|
727
|
+
this.reject = bind$1(internalReject, state);
|
|
958
728
|
};
|
|
959
|
-
|
|
729
|
+
|
|
730
|
+
newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
|
|
960
731
|
return C === PromiseConstructor || C === PromiseWrapper
|
|
961
732
|
? new OwnPromiseCapability(C)
|
|
962
733
|
: newGenericPromiseCapability(C);
|
|
963
734
|
};
|
|
964
735
|
|
|
965
|
-
if (isCallable$
|
|
966
|
-
nativeThen = NativePromisePrototype.then;
|
|
736
|
+
if (isCallable$2(NativePromiseConstructor$3) && NativePromisePrototype$2 !== Object.prototype) {
|
|
737
|
+
nativeThen = NativePromisePrototype$2.then;
|
|
967
738
|
|
|
968
|
-
if (!
|
|
739
|
+
if (!NATIVE_PROMISE_SUBCLASSING) {
|
|
969
740
|
// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
|
|
970
|
-
|
|
741
|
+
defineBuiltIn$2(NativePromisePrototype$2, 'then', function then(onFulfilled, onRejected) {
|
|
971
742
|
var that = this;
|
|
972
743
|
return new PromiseConstructor(function (resolve, reject) {
|
|
973
|
-
call(nativeThen, that, resolve, reject);
|
|
744
|
+
call$6(nativeThen, that, resolve, reject);
|
|
974
745
|
}).then(onFulfilled, onRejected);
|
|
975
746
|
// https://github.com/zloirock/core-js/issues/640
|
|
976
747
|
}, { unsafe: true });
|
|
977
|
-
|
|
978
|
-
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
|
|
979
|
-
redefine$1(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
|
|
980
748
|
}
|
|
981
749
|
|
|
982
750
|
// make `.constructor === Promise` work for native promise-based APIs
|
|
983
751
|
try {
|
|
984
|
-
delete NativePromisePrototype.constructor;
|
|
752
|
+
delete NativePromisePrototype$2.constructor;
|
|
985
753
|
} catch (error) { /* empty */ }
|
|
986
754
|
|
|
987
755
|
// make `instanceof Promise` work for native promise-based APIs
|
|
988
756
|
if (setPrototypeOf) {
|
|
989
|
-
setPrototypeOf(NativePromisePrototype, PromisePrototype);
|
|
757
|
+
setPrototypeOf(NativePromisePrototype$2, PromisePrototype);
|
|
990
758
|
}
|
|
991
759
|
}
|
|
992
760
|
}
|
|
993
761
|
|
|
994
|
-
$$
|
|
762
|
+
$$7({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
|
|
995
763
|
Promise: PromiseConstructor
|
|
996
764
|
});
|
|
997
765
|
|
|
998
766
|
setToStringTag(PromiseConstructor, PROMISE, false);
|
|
999
767
|
setSpecies(PROMISE);
|
|
1000
768
|
|
|
1001
|
-
|
|
769
|
+
var wellKnownSymbol$2 = wellKnownSymbol$6;
|
|
770
|
+
var Iterators$1 = iterators;
|
|
1002
771
|
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
772
|
+
var ITERATOR$2 = wellKnownSymbol$2('iterator');
|
|
773
|
+
var ArrayPrototype = Array.prototype;
|
|
774
|
+
|
|
775
|
+
// check on default Array iterator
|
|
776
|
+
var isArrayIteratorMethod$1 = function (it) {
|
|
777
|
+
return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
|
|
778
|
+
};
|
|
779
|
+
|
|
780
|
+
var classof = classof$3;
|
|
781
|
+
var getMethod$1 = getMethod$2;
|
|
782
|
+
var Iterators = iterators;
|
|
783
|
+
var wellKnownSymbol$1 = wellKnownSymbol$6;
|
|
784
|
+
|
|
785
|
+
var ITERATOR$1 = wellKnownSymbol$1('iterator');
|
|
786
|
+
|
|
787
|
+
var getIteratorMethod$2 = function (it) {
|
|
788
|
+
if (it != undefined) return getMethod$1(it, ITERATOR$1)
|
|
789
|
+
|| getMethod$1(it, '@@iterator')
|
|
790
|
+
|| Iterators[classof(it)];
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
var call$5 = functionCall;
|
|
794
|
+
var aCallable$2 = aCallable$6;
|
|
795
|
+
var anObject$3 = anObject$5;
|
|
796
|
+
var tryToString$1 = tryToString$3;
|
|
797
|
+
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
798
|
+
|
|
799
|
+
var $TypeError$1 = TypeError;
|
|
800
|
+
|
|
801
|
+
var getIterator$1 = function (argument, usingIterator) {
|
|
802
|
+
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
803
|
+
if (aCallable$2(iteratorMethod)) return anObject$3(call$5(iteratorMethod, argument));
|
|
804
|
+
throw $TypeError$1(tryToString$1(argument) + ' is not iterable');
|
|
805
|
+
};
|
|
806
|
+
|
|
807
|
+
var call$4 = functionCall;
|
|
808
|
+
var anObject$2 = anObject$5;
|
|
809
|
+
var getMethod = getMethod$2;
|
|
810
|
+
|
|
811
|
+
var iteratorClose$1 = function (iterator, kind, value) {
|
|
812
|
+
var innerResult, innerError;
|
|
813
|
+
anObject$2(iterator);
|
|
814
|
+
try {
|
|
815
|
+
innerResult = getMethod(iterator, 'return');
|
|
816
|
+
if (!innerResult) {
|
|
817
|
+
if (kind === 'throw') throw value;
|
|
818
|
+
return value;
|
|
819
|
+
}
|
|
820
|
+
innerResult = call$4(innerResult, iterator);
|
|
821
|
+
} catch (error) {
|
|
822
|
+
innerError = true;
|
|
823
|
+
innerResult = error;
|
|
1011
824
|
}
|
|
1012
|
-
|
|
825
|
+
if (kind === 'throw') throw value;
|
|
826
|
+
if (innerError) throw innerResult;
|
|
827
|
+
anObject$2(innerResult);
|
|
828
|
+
return value;
|
|
829
|
+
};
|
|
1013
830
|
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
831
|
+
var bind = functionBindContext;
|
|
832
|
+
var call$3 = functionCall;
|
|
833
|
+
var anObject$1 = anObject$5;
|
|
834
|
+
var tryToString = tryToString$3;
|
|
835
|
+
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
836
|
+
var lengthOfArrayLike = lengthOfArrayLike$1;
|
|
837
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
838
|
+
var getIterator = getIterator$1;
|
|
839
|
+
var getIteratorMethod = getIteratorMethod$2;
|
|
840
|
+
var iteratorClose = iteratorClose$1;
|
|
841
|
+
|
|
842
|
+
var $TypeError = TypeError;
|
|
843
|
+
|
|
844
|
+
var Result = function (stopped, result) {
|
|
845
|
+
this.stopped = stopped;
|
|
846
|
+
this.result = result;
|
|
847
|
+
};
|
|
848
|
+
|
|
849
|
+
var ResultPrototype = Result.prototype;
|
|
850
|
+
|
|
851
|
+
var iterate$2 = function (iterable, unboundFunction, options) {
|
|
852
|
+
var that = options && options.that;
|
|
853
|
+
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
854
|
+
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
855
|
+
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
856
|
+
var fn = bind(unboundFunction, that);
|
|
857
|
+
var iterator, iterFn, index, length, result, next, step;
|
|
858
|
+
|
|
859
|
+
var stop = function (condition) {
|
|
860
|
+
if (iterator) iteratorClose(iterator, 'normal', condition);
|
|
861
|
+
return new Result(true, condition);
|
|
862
|
+
};
|
|
863
|
+
|
|
864
|
+
var callFn = function (value) {
|
|
865
|
+
if (AS_ENTRIES) {
|
|
866
|
+
anObject$1(value);
|
|
867
|
+
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
868
|
+
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
869
|
+
};
|
|
870
|
+
|
|
871
|
+
if (IS_ITERATOR) {
|
|
872
|
+
iterator = iterable;
|
|
873
|
+
} else {
|
|
874
|
+
iterFn = getIteratorMethod(iterable);
|
|
875
|
+
if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable');
|
|
876
|
+
// optimisation for array iterators
|
|
877
|
+
if (isArrayIteratorMethod(iterFn)) {
|
|
878
|
+
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
879
|
+
result = callFn(iterable[index]);
|
|
880
|
+
if (result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
881
|
+
} return new Result(false);
|
|
882
|
+
}
|
|
883
|
+
iterator = getIterator(iterable, iterFn);
|
|
1019
884
|
}
|
|
885
|
+
|
|
886
|
+
next = iterator.next;
|
|
887
|
+
while (!(step = call$3(next, iterator)).done) {
|
|
888
|
+
try {
|
|
889
|
+
result = callFn(step.value);
|
|
890
|
+
} catch (error) {
|
|
891
|
+
iteratorClose(iterator, 'throw', error);
|
|
892
|
+
}
|
|
893
|
+
if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
894
|
+
} return new Result(false);
|
|
895
|
+
};
|
|
896
|
+
|
|
897
|
+
var wellKnownSymbol = wellKnownSymbol$6;
|
|
898
|
+
|
|
899
|
+
var ITERATOR = wellKnownSymbol('iterator');
|
|
900
|
+
var SAFE_CLOSING = false;
|
|
901
|
+
|
|
902
|
+
try {
|
|
903
|
+
var called = 0;
|
|
904
|
+
var iteratorWithReturn = {
|
|
905
|
+
next: function () {
|
|
906
|
+
return { done: !!called++ };
|
|
907
|
+
},
|
|
908
|
+
'return': function () {
|
|
909
|
+
SAFE_CLOSING = true;
|
|
910
|
+
}
|
|
911
|
+
};
|
|
912
|
+
iteratorWithReturn[ITERATOR] = function () {
|
|
913
|
+
return this;
|
|
914
|
+
};
|
|
915
|
+
// eslint-disable-next-line es-x/no-array-from, no-throw-literal -- required for testing
|
|
916
|
+
Array.from(iteratorWithReturn, function () { throw 2; });
|
|
917
|
+
} catch (error) { /* empty */ }
|
|
918
|
+
|
|
919
|
+
var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
|
|
920
|
+
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
|
921
|
+
var ITERATION_SUPPORT = false;
|
|
922
|
+
try {
|
|
923
|
+
var object = {};
|
|
924
|
+
object[ITERATOR] = function () {
|
|
925
|
+
return {
|
|
926
|
+
next: function () {
|
|
927
|
+
return { done: ITERATION_SUPPORT = true };
|
|
928
|
+
}
|
|
929
|
+
};
|
|
930
|
+
};
|
|
931
|
+
exec(object);
|
|
932
|
+
} catch (error) { /* empty */ }
|
|
933
|
+
return ITERATION_SUPPORT;
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
var NativePromiseConstructor$2 = promiseNativeConstructor;
|
|
937
|
+
var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
|
|
938
|
+
var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
|
|
939
|
+
|
|
940
|
+
var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
|
|
941
|
+
NativePromiseConstructor$2.all(iterable).then(undefined, function () { /* empty */ });
|
|
1020
942
|
});
|
|
1021
943
|
|
|
1022
|
-
$$
|
|
1023
|
-
|
|
1024
|
-
|
|
944
|
+
var $$6 = _export;
|
|
945
|
+
var call$2 = functionCall;
|
|
946
|
+
var aCallable$1 = aCallable$6;
|
|
947
|
+
var newPromiseCapabilityModule$2 = newPromiseCapability$2;
|
|
948
|
+
var perform$1 = perform$3;
|
|
949
|
+
var iterate$1 = iterate$2;
|
|
950
|
+
var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
|
|
951
|
+
|
|
952
|
+
// `Promise.all` method
|
|
953
|
+
// https://tc39.es/ecma262/#sec-promise.all
|
|
954
|
+
$$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
|
|
1025
955
|
all: function all(iterable) {
|
|
1026
956
|
var C = this;
|
|
1027
|
-
var capability =
|
|
957
|
+
var capability = newPromiseCapabilityModule$2.f(C);
|
|
1028
958
|
var resolve = capability.resolve;
|
|
1029
959
|
var reject = capability.reject;
|
|
1030
|
-
var result = perform(function () {
|
|
1031
|
-
var $promiseResolve = aCallable(C.resolve);
|
|
960
|
+
var result = perform$1(function () {
|
|
961
|
+
var $promiseResolve = aCallable$1(C.resolve);
|
|
1032
962
|
var values = [];
|
|
1033
963
|
var counter = 0;
|
|
1034
964
|
var remaining = 1;
|
|
1035
|
-
iterate(iterable, function (promise) {
|
|
965
|
+
iterate$1(iterable, function (promise) {
|
|
1036
966
|
var index = counter++;
|
|
1037
967
|
var alreadyCalled = false;
|
|
1038
968
|
remaining++;
|
|
1039
|
-
call($promiseResolve, C, promise).then(function (value) {
|
|
969
|
+
call$2($promiseResolve, C, promise).then(function (value) {
|
|
1040
970
|
if (alreadyCalled) return;
|
|
1041
971
|
alreadyCalled = true;
|
|
1042
972
|
values[index] = value;
|
|
@@ -1047,17 +977,53 @@ $$2({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
|
1047
977
|
});
|
|
1048
978
|
if (result.error) reject(result.value);
|
|
1049
979
|
return capability.promise;
|
|
1050
|
-
}
|
|
1051
|
-
|
|
1052
|
-
|
|
980
|
+
}
|
|
981
|
+
});
|
|
982
|
+
|
|
983
|
+
var $$5 = _export;
|
|
984
|
+
var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
|
|
985
|
+
var NativePromiseConstructor$1 = promiseNativeConstructor;
|
|
986
|
+
var getBuiltIn$2 = getBuiltIn$5;
|
|
987
|
+
var isCallable$1 = isCallable$6;
|
|
988
|
+
var defineBuiltIn$1 = defineBuiltIn$3;
|
|
989
|
+
|
|
990
|
+
var NativePromisePrototype$1 = NativePromiseConstructor$1 && NativePromiseConstructor$1.prototype;
|
|
991
|
+
|
|
992
|
+
// `Promise.prototype.catch` method
|
|
993
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
994
|
+
$$5({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
|
|
995
|
+
'catch': function (onRejected) {
|
|
996
|
+
return this.then(undefined, onRejected);
|
|
997
|
+
}
|
|
998
|
+
});
|
|
999
|
+
|
|
1000
|
+
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
|
|
1001
|
+
if (isCallable$1(NativePromiseConstructor$1)) {
|
|
1002
|
+
var method$1 = getBuiltIn$2('Promise').prototype['catch'];
|
|
1003
|
+
if (NativePromisePrototype$1['catch'] !== method$1) {
|
|
1004
|
+
defineBuiltIn$1(NativePromisePrototype$1, 'catch', method$1, { unsafe: true });
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
var $$4 = _export;
|
|
1009
|
+
var call$1 = functionCall;
|
|
1010
|
+
var aCallable = aCallable$6;
|
|
1011
|
+
var newPromiseCapabilityModule$1 = newPromiseCapability$2;
|
|
1012
|
+
var perform = perform$3;
|
|
1013
|
+
var iterate = iterate$2;
|
|
1014
|
+
var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
|
|
1015
|
+
|
|
1016
|
+
// `Promise.race` method
|
|
1017
|
+
// https://tc39.es/ecma262/#sec-promise.race
|
|
1018
|
+
$$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
|
|
1053
1019
|
race: function race(iterable) {
|
|
1054
1020
|
var C = this;
|
|
1055
|
-
var capability =
|
|
1021
|
+
var capability = newPromiseCapabilityModule$1.f(C);
|
|
1056
1022
|
var reject = capability.reject;
|
|
1057
1023
|
var result = perform(function () {
|
|
1058
1024
|
var $promiseResolve = aCallable(C.resolve);
|
|
1059
1025
|
iterate(iterable, function (promise) {
|
|
1060
|
-
call($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
1026
|
+
call$1($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
1061
1027
|
});
|
|
1062
1028
|
});
|
|
1063
1029
|
if (result.error) reject(result.value);
|
|
@@ -1065,16 +1031,49 @@ $$2({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
|
1065
1031
|
}
|
|
1066
1032
|
});
|
|
1067
1033
|
|
|
1068
|
-
var
|
|
1069
|
-
var
|
|
1034
|
+
var $$3 = _export;
|
|
1035
|
+
var call = functionCall;
|
|
1036
|
+
var newPromiseCapabilityModule = newPromiseCapability$2;
|
|
1037
|
+
var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
|
|
1038
|
+
|
|
1039
|
+
// `Promise.reject` method
|
|
1040
|
+
// https://tc39.es/ecma262/#sec-promise.reject
|
|
1041
|
+
$$3({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
|
|
1042
|
+
reject: function reject(r) {
|
|
1043
|
+
var capability = newPromiseCapabilityModule.f(this);
|
|
1044
|
+
call(capability.reject, undefined, r);
|
|
1045
|
+
return capability.promise;
|
|
1046
|
+
}
|
|
1047
|
+
});
|
|
1070
1048
|
|
|
1071
|
-
var
|
|
1049
|
+
var anObject = anObject$5;
|
|
1050
|
+
var isObject = isObject$2;
|
|
1051
|
+
var newPromiseCapability = newPromiseCapability$2;
|
|
1072
1052
|
|
|
1073
|
-
var
|
|
1074
|
-
|
|
1075
|
-
|
|
1053
|
+
var promiseResolve$2 = function (C, x) {
|
|
1054
|
+
anObject(C);
|
|
1055
|
+
if (isObject(x) && x.constructor === C) return x;
|
|
1056
|
+
var promiseCapability = newPromiseCapability.f(C);
|
|
1057
|
+
var resolve = promiseCapability.resolve;
|
|
1058
|
+
resolve(x);
|
|
1059
|
+
return promiseCapability.promise;
|
|
1076
1060
|
};
|
|
1077
1061
|
|
|
1062
|
+
var $$2 = _export;
|
|
1063
|
+
var getBuiltIn$1 = getBuiltIn$5;
|
|
1064
|
+
var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
|
|
1065
|
+
var promiseResolve$1 = promiseResolve$2;
|
|
1066
|
+
|
|
1067
|
+
getBuiltIn$1('Promise');
|
|
1068
|
+
|
|
1069
|
+
// `Promise.resolve` method
|
|
1070
|
+
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
1071
|
+
$$2({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
1072
|
+
resolve: function resolve(x) {
|
|
1073
|
+
return promiseResolve$1(this, x);
|
|
1074
|
+
}
|
|
1075
|
+
});
|
|
1076
|
+
|
|
1078
1077
|
// a string of all valid unicode whitespaces
|
|
1079
1078
|
var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
1080
1079
|
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
@@ -1140,18 +1139,20 @@ $$1({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
|
|
|
1140
1139
|
});
|
|
1141
1140
|
|
|
1142
1141
|
var $ = _export;
|
|
1143
|
-
var
|
|
1142
|
+
var NativePromiseConstructor = promiseNativeConstructor;
|
|
1144
1143
|
var fails = fails$4;
|
|
1145
|
-
var getBuiltIn = getBuiltIn$
|
|
1146
|
-
var isCallable = isCallable$
|
|
1144
|
+
var getBuiltIn = getBuiltIn$5;
|
|
1145
|
+
var isCallable = isCallable$6;
|
|
1147
1146
|
var speciesConstructor = speciesConstructor$2;
|
|
1148
1147
|
var promiseResolve = promiseResolve$2;
|
|
1149
|
-
var
|
|
1148
|
+
var defineBuiltIn = defineBuiltIn$3;
|
|
1149
|
+
|
|
1150
|
+
var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
|
|
1150
1151
|
|
|
1151
1152
|
// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829
|
|
1152
|
-
var NON_GENERIC = !!
|
|
1153
|
+
var NON_GENERIC = !!NativePromiseConstructor && fails(function () {
|
|
1153
1154
|
// eslint-disable-next-line unicorn/no-thenable -- required for testing
|
|
1154
|
-
|
|
1155
|
+
NativePromisePrototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });
|
|
1155
1156
|
});
|
|
1156
1157
|
|
|
1157
1158
|
// `Promise.prototype.finally` method
|
|
@@ -1172,10 +1173,10 @@ $({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {
|
|
|
1172
1173
|
});
|
|
1173
1174
|
|
|
1174
1175
|
// makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`
|
|
1175
|
-
if (isCallable(
|
|
1176
|
+
if (isCallable(NativePromiseConstructor)) {
|
|
1176
1177
|
var method = getBuiltIn('Promise').prototype['finally'];
|
|
1177
|
-
if (
|
|
1178
|
-
|
|
1178
|
+
if (NativePromisePrototype['finally'] !== method) {
|
|
1179
|
+
defineBuiltIn(NativePromisePrototype, 'finally', method, { unsafe: true });
|
|
1179
1180
|
}
|
|
1180
1181
|
}
|
|
1181
1182
|
|
|
@@ -1332,7 +1333,7 @@ const PLACEHOLDER_ICON = `<svg width="80%" height="80%" viewBox="0 0 64 64">
|
|
|
1332
1333
|
</svg>`;
|
|
1333
1334
|
|
|
1334
1335
|
const BASE_URL = 'https://icon.resources.vonage.com';
|
|
1335
|
-
const ICON_SET_VERSION = '4.0.
|
|
1336
|
+
const ICON_SET_VERSION = '4.0.29';
|
|
1336
1337
|
const PLACEHOLDER_DELAY = 500;
|
|
1337
1338
|
const PLACEHOLDER_TIMEOUT = 2000;
|
|
1338
1339
|
|
|
@@ -1356,25 +1357,20 @@ const loadSvg = iconId => fetch(baseUrlTemplate([iconId, 'svg'].join('.'), ICON_
|
|
|
1356
1357
|
|
|
1357
1358
|
const resolveIcon = memoizeWith$1(identity$1, (iconId = '') => iconId.trim() ? loadSvg(iconId) : Promise.resolve(''));
|
|
1358
1359
|
class Icon extends FoundationElement {
|
|
1359
|
-
constructor() {
|
|
1360
|
-
super(...arguments);
|
|
1361
|
-
this.svg = '';
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
1360
|
async typeChanged() {
|
|
1365
|
-
this.svg =
|
|
1361
|
+
this.svg = undefined;
|
|
1366
1362
|
let timeout = setTimeout(() => {
|
|
1367
1363
|
this.svg = PLACEHOLDER_ICON;
|
|
1368
1364
|
timeout = setTimeout(() => {
|
|
1369
1365
|
if (this.svg === PLACEHOLDER_ICON) {
|
|
1370
|
-
this.svg =
|
|
1366
|
+
this.svg = undefined;
|
|
1371
1367
|
}
|
|
1372
1368
|
}, PLACEHOLDER_TIMEOUT);
|
|
1373
1369
|
}, PLACEHOLDER_DELAY);
|
|
1374
1370
|
await resolveIcon(this.type).then(svg => {
|
|
1375
1371
|
this.svg = svg;
|
|
1376
1372
|
}).catch(() => {
|
|
1377
|
-
this.svg =
|
|
1373
|
+
this.svg = undefined;
|
|
1378
1374
|
}).finally(() => {
|
|
1379
1375
|
clearTimeout(timeout);
|
|
1380
1376
|
});
|
|
@@ -1386,8 +1382,8 @@ __decorate([attr, __metadata("design:type", String)], Icon.prototype, "connotati
|
|
|
1386
1382
|
|
|
1387
1383
|
__decorate([attr, __metadata("design:type", String)], Icon.prototype, "size", void 0);
|
|
1388
1384
|
|
|
1389
|
-
__decorate([observable, __metadata("design:type",
|
|
1385
|
+
__decorate([observable, __metadata("design:type", String)], Icon.prototype, "svg", void 0);
|
|
1390
1386
|
|
|
1391
1387
|
__decorate([attr, __metadata("design:type", String)], Icon.prototype, "type", void 0);
|
|
1392
1388
|
|
|
1393
|
-
export { Icon as I, functionApply as f, speciesConstructor$2 as s
|
|
1389
|
+
export { Icon as I, functionApply as f, speciesConstructor$2 as s };
|