@bitmovin/api-sdk 1.219.0 → 1.221.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.
@@ -11,6 +11,1958 @@
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
14
+ /***/ "../node_modules/es6-promise/dist/es6-promise.js":
15
+ /*!*******************************************************!*\
16
+ !*** ../node_modules/es6-promise/dist/es6-promise.js ***!
17
+ \*******************************************************/
18
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
19
+
20
+ /*!
21
+ * @overview es6-promise - a tiny implementation of Promises/A+.
22
+ * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
23
+ * @license Licensed under MIT license
24
+ * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
25
+ * @version v4.2.8+1e68dce6
26
+ */
27
+
28
+ (function (global, factory) {
29
+ true ? module.exports = factory() :
30
+ 0;
31
+ }(this, (function () { 'use strict';
32
+
33
+ function objectOrFunction(x) {
34
+ var type = typeof x;
35
+ return x !== null && (type === 'object' || type === 'function');
36
+ }
37
+
38
+ function isFunction(x) {
39
+ return typeof x === 'function';
40
+ }
41
+
42
+
43
+
44
+ var _isArray = void 0;
45
+ if (Array.isArray) {
46
+ _isArray = Array.isArray;
47
+ } else {
48
+ _isArray = function (x) {
49
+ return Object.prototype.toString.call(x) === '[object Array]';
50
+ };
51
+ }
52
+
53
+ var isArray = _isArray;
54
+
55
+ var len = 0;
56
+ var vertxNext = void 0;
57
+ var customSchedulerFn = void 0;
58
+
59
+ var asap = function asap(callback, arg) {
60
+ queue[len] = callback;
61
+ queue[len + 1] = arg;
62
+ len += 2;
63
+ if (len === 2) {
64
+ // If len is 2, that means that we need to schedule an async flush.
65
+ // If additional callbacks are queued before the queue is flushed, they
66
+ // will be processed by this flush that we are scheduling.
67
+ if (customSchedulerFn) {
68
+ customSchedulerFn(flush);
69
+ } else {
70
+ scheduleFlush();
71
+ }
72
+ }
73
+ };
74
+
75
+ function setScheduler(scheduleFn) {
76
+ customSchedulerFn = scheduleFn;
77
+ }
78
+
79
+ function setAsap(asapFn) {
80
+ asap = asapFn;
81
+ }
82
+
83
+ var browserWindow = typeof window !== 'undefined' ? window : undefined;
84
+ var browserGlobal = browserWindow || {};
85
+ var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
86
+ var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
87
+
88
+ // test for web worker but not in IE10
89
+ var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
90
+
91
+ // node
92
+ function useNextTick() {
93
+ // node version 0.10.x displays a deprecation warning when nextTick is used recursively
94
+ // see https://github.com/cujojs/when/issues/410 for details
95
+ return function () {
96
+ return process.nextTick(flush);
97
+ };
98
+ }
99
+
100
+ // vertx
101
+ function useVertxTimer() {
102
+ if (typeof vertxNext !== 'undefined') {
103
+ return function () {
104
+ vertxNext(flush);
105
+ };
106
+ }
107
+
108
+ return useSetTimeout();
109
+ }
110
+
111
+ function useMutationObserver() {
112
+ var iterations = 0;
113
+ var observer = new BrowserMutationObserver(flush);
114
+ var node = document.createTextNode('');
115
+ observer.observe(node, { characterData: true });
116
+
117
+ return function () {
118
+ node.data = iterations = ++iterations % 2;
119
+ };
120
+ }
121
+
122
+ // web worker
123
+ function useMessageChannel() {
124
+ var channel = new MessageChannel();
125
+ channel.port1.onmessage = flush;
126
+ return function () {
127
+ return channel.port2.postMessage(0);
128
+ };
129
+ }
130
+
131
+ function useSetTimeout() {
132
+ // Store setTimeout reference so es6-promise will be unaffected by
133
+ // other code modifying setTimeout (like sinon.useFakeTimers())
134
+ var globalSetTimeout = setTimeout;
135
+ return function () {
136
+ return globalSetTimeout(flush, 1);
137
+ };
138
+ }
139
+
140
+ var queue = new Array(1000);
141
+ function flush() {
142
+ for (var i = 0; i < len; i += 2) {
143
+ var callback = queue[i];
144
+ var arg = queue[i + 1];
145
+
146
+ callback(arg);
147
+
148
+ queue[i] = undefined;
149
+ queue[i + 1] = undefined;
150
+ }
151
+
152
+ len = 0;
153
+ }
154
+
155
+ function attemptVertx() {
156
+ try {
157
+ var vertx = Function('return this')().require('vertx');
158
+ vertxNext = vertx.runOnLoop || vertx.runOnContext;
159
+ return useVertxTimer();
160
+ } catch (e) {
161
+ return useSetTimeout();
162
+ }
163
+ }
164
+
165
+ var scheduleFlush = void 0;
166
+ // Decide what async method to use to triggering processing of queued callbacks:
167
+ if (isNode) {
168
+ scheduleFlush = useNextTick();
169
+ } else if (BrowserMutationObserver) {
170
+ scheduleFlush = useMutationObserver();
171
+ } else if (isWorker) {
172
+ scheduleFlush = useMessageChannel();
173
+ } else if (browserWindow === undefined && "function" === 'function') {
174
+ scheduleFlush = attemptVertx();
175
+ } else {
176
+ scheduleFlush = useSetTimeout();
177
+ }
178
+
179
+ function then(onFulfillment, onRejection) {
180
+ var parent = this;
181
+
182
+ var child = new this.constructor(noop);
183
+
184
+ if (child[PROMISE_ID] === undefined) {
185
+ makePromise(child);
186
+ }
187
+
188
+ var _state = parent._state;
189
+
190
+
191
+ if (_state) {
192
+ var callback = arguments[_state - 1];
193
+ asap(function () {
194
+ return invokeCallback(_state, child, callback, parent._result);
195
+ });
196
+ } else {
197
+ subscribe(parent, child, onFulfillment, onRejection);
198
+ }
199
+
200
+ return child;
201
+ }
202
+
203
+ /**
204
+ `Promise.resolve` returns a promise that will become resolved with the
205
+ passed `value`. It is shorthand for the following:
206
+
207
+ ```javascript
208
+ let promise = new Promise(function(resolve, reject){
209
+ resolve(1);
210
+ });
211
+
212
+ promise.then(function(value){
213
+ // value === 1
214
+ });
215
+ ```
216
+
217
+ Instead of writing the above, your code now simply becomes the following:
218
+
219
+ ```javascript
220
+ let promise = Promise.resolve(1);
221
+
222
+ promise.then(function(value){
223
+ // value === 1
224
+ });
225
+ ```
226
+
227
+ @method resolve
228
+ @static
229
+ @param {Any} value value that the returned promise will be resolved with
230
+ Useful for tooling.
231
+ @return {Promise} a promise that will become fulfilled with the given
232
+ `value`
233
+ */
234
+ function resolve$1(object) {
235
+ /*jshint validthis:true */
236
+ var Constructor = this;
237
+
238
+ if (object && typeof object === 'object' && object.constructor === Constructor) {
239
+ return object;
240
+ }
241
+
242
+ var promise = new Constructor(noop);
243
+ resolve(promise, object);
244
+ return promise;
245
+ }
246
+
247
+ var PROMISE_ID = Math.random().toString(36).substring(2);
248
+
249
+ function noop() {}
250
+
251
+ var PENDING = void 0;
252
+ var FULFILLED = 1;
253
+ var REJECTED = 2;
254
+
255
+ function selfFulfillment() {
256
+ return new TypeError("You cannot resolve a promise with itself");
257
+ }
258
+
259
+ function cannotReturnOwn() {
260
+ return new TypeError('A promises callback cannot return that same promise.');
261
+ }
262
+
263
+ function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
264
+ try {
265
+ then$$1.call(value, fulfillmentHandler, rejectionHandler);
266
+ } catch (e) {
267
+ return e;
268
+ }
269
+ }
270
+
271
+ function handleForeignThenable(promise, thenable, then$$1) {
272
+ asap(function (promise) {
273
+ var sealed = false;
274
+ var error = tryThen(then$$1, thenable, function (value) {
275
+ if (sealed) {
276
+ return;
277
+ }
278
+ sealed = true;
279
+ if (thenable !== value) {
280
+ resolve(promise, value);
281
+ } else {
282
+ fulfill(promise, value);
283
+ }
284
+ }, function (reason) {
285
+ if (sealed) {
286
+ return;
287
+ }
288
+ sealed = true;
289
+
290
+ reject(promise, reason);
291
+ }, 'Settle: ' + (promise._label || ' unknown promise'));
292
+
293
+ if (!sealed && error) {
294
+ sealed = true;
295
+ reject(promise, error);
296
+ }
297
+ }, promise);
298
+ }
299
+
300
+ function handleOwnThenable(promise, thenable) {
301
+ if (thenable._state === FULFILLED) {
302
+ fulfill(promise, thenable._result);
303
+ } else if (thenable._state === REJECTED) {
304
+ reject(promise, thenable._result);
305
+ } else {
306
+ subscribe(thenable, undefined, function (value) {
307
+ return resolve(promise, value);
308
+ }, function (reason) {
309
+ return reject(promise, reason);
310
+ });
311
+ }
312
+ }
313
+
314
+ function handleMaybeThenable(promise, maybeThenable, then$$1) {
315
+ if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
316
+ handleOwnThenable(promise, maybeThenable);
317
+ } else {
318
+ if (then$$1 === undefined) {
319
+ fulfill(promise, maybeThenable);
320
+ } else if (isFunction(then$$1)) {
321
+ handleForeignThenable(promise, maybeThenable, then$$1);
322
+ } else {
323
+ fulfill(promise, maybeThenable);
324
+ }
325
+ }
326
+ }
327
+
328
+ function resolve(promise, value) {
329
+ if (promise === value) {
330
+ reject(promise, selfFulfillment());
331
+ } else if (objectOrFunction(value)) {
332
+ var then$$1 = void 0;
333
+ try {
334
+ then$$1 = value.then;
335
+ } catch (error) {
336
+ reject(promise, error);
337
+ return;
338
+ }
339
+ handleMaybeThenable(promise, value, then$$1);
340
+ } else {
341
+ fulfill(promise, value);
342
+ }
343
+ }
344
+
345
+ function publishRejection(promise) {
346
+ if (promise._onerror) {
347
+ promise._onerror(promise._result);
348
+ }
349
+
350
+ publish(promise);
351
+ }
352
+
353
+ function fulfill(promise, value) {
354
+ if (promise._state !== PENDING) {
355
+ return;
356
+ }
357
+
358
+ promise._result = value;
359
+ promise._state = FULFILLED;
360
+
361
+ if (promise._subscribers.length !== 0) {
362
+ asap(publish, promise);
363
+ }
364
+ }
365
+
366
+ function reject(promise, reason) {
367
+ if (promise._state !== PENDING) {
368
+ return;
369
+ }
370
+ promise._state = REJECTED;
371
+ promise._result = reason;
372
+
373
+ asap(publishRejection, promise);
374
+ }
375
+
376
+ function subscribe(parent, child, onFulfillment, onRejection) {
377
+ var _subscribers = parent._subscribers;
378
+ var length = _subscribers.length;
379
+
380
+
381
+ parent._onerror = null;
382
+
383
+ _subscribers[length] = child;
384
+ _subscribers[length + FULFILLED] = onFulfillment;
385
+ _subscribers[length + REJECTED] = onRejection;
386
+
387
+ if (length === 0 && parent._state) {
388
+ asap(publish, parent);
389
+ }
390
+ }
391
+
392
+ function publish(promise) {
393
+ var subscribers = promise._subscribers;
394
+ var settled = promise._state;
395
+
396
+ if (subscribers.length === 0) {
397
+ return;
398
+ }
399
+
400
+ var child = void 0,
401
+ callback = void 0,
402
+ detail = promise._result;
403
+
404
+ for (var i = 0; i < subscribers.length; i += 3) {
405
+ child = subscribers[i];
406
+ callback = subscribers[i + settled];
407
+
408
+ if (child) {
409
+ invokeCallback(settled, child, callback, detail);
410
+ } else {
411
+ callback(detail);
412
+ }
413
+ }
414
+
415
+ promise._subscribers.length = 0;
416
+ }
417
+
418
+ function invokeCallback(settled, promise, callback, detail) {
419
+ var hasCallback = isFunction(callback),
420
+ value = void 0,
421
+ error = void 0,
422
+ succeeded = true;
423
+
424
+ if (hasCallback) {
425
+ try {
426
+ value = callback(detail);
427
+ } catch (e) {
428
+ succeeded = false;
429
+ error = e;
430
+ }
431
+
432
+ if (promise === value) {
433
+ reject(promise, cannotReturnOwn());
434
+ return;
435
+ }
436
+ } else {
437
+ value = detail;
438
+ }
439
+
440
+ if (promise._state !== PENDING) {
441
+ // noop
442
+ } else if (hasCallback && succeeded) {
443
+ resolve(promise, value);
444
+ } else if (succeeded === false) {
445
+ reject(promise, error);
446
+ } else if (settled === FULFILLED) {
447
+ fulfill(promise, value);
448
+ } else if (settled === REJECTED) {
449
+ reject(promise, value);
450
+ }
451
+ }
452
+
453
+ function initializePromise(promise, resolver) {
454
+ try {
455
+ resolver(function resolvePromise(value) {
456
+ resolve(promise, value);
457
+ }, function rejectPromise(reason) {
458
+ reject(promise, reason);
459
+ });
460
+ } catch (e) {
461
+ reject(promise, e);
462
+ }
463
+ }
464
+
465
+ var id = 0;
466
+ function nextId() {
467
+ return id++;
468
+ }
469
+
470
+ function makePromise(promise) {
471
+ promise[PROMISE_ID] = id++;
472
+ promise._state = undefined;
473
+ promise._result = undefined;
474
+ promise._subscribers = [];
475
+ }
476
+
477
+ function validationError() {
478
+ return new Error('Array Methods must be provided an Array');
479
+ }
480
+
481
+ var Enumerator = function () {
482
+ function Enumerator(Constructor, input) {
483
+ this._instanceConstructor = Constructor;
484
+ this.promise = new Constructor(noop);
485
+
486
+ if (!this.promise[PROMISE_ID]) {
487
+ makePromise(this.promise);
488
+ }
489
+
490
+ if (isArray(input)) {
491
+ this.length = input.length;
492
+ this._remaining = input.length;
493
+
494
+ this._result = new Array(this.length);
495
+
496
+ if (this.length === 0) {
497
+ fulfill(this.promise, this._result);
498
+ } else {
499
+ this.length = this.length || 0;
500
+ this._enumerate(input);
501
+ if (this._remaining === 0) {
502
+ fulfill(this.promise, this._result);
503
+ }
504
+ }
505
+ } else {
506
+ reject(this.promise, validationError());
507
+ }
508
+ }
509
+
510
+ Enumerator.prototype._enumerate = function _enumerate(input) {
511
+ for (var i = 0; this._state === PENDING && i < input.length; i++) {
512
+ this._eachEntry(input[i], i);
513
+ }
514
+ };
515
+
516
+ Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
517
+ var c = this._instanceConstructor;
518
+ var resolve$$1 = c.resolve;
519
+
520
+
521
+ if (resolve$$1 === resolve$1) {
522
+ var _then = void 0;
523
+ var error = void 0;
524
+ var didError = false;
525
+ try {
526
+ _then = entry.then;
527
+ } catch (e) {
528
+ didError = true;
529
+ error = e;
530
+ }
531
+
532
+ if (_then === then && entry._state !== PENDING) {
533
+ this._settledAt(entry._state, i, entry._result);
534
+ } else if (typeof _then !== 'function') {
535
+ this._remaining--;
536
+ this._result[i] = entry;
537
+ } else if (c === Promise$1) {
538
+ var promise = new c(noop);
539
+ if (didError) {
540
+ reject(promise, error);
541
+ } else {
542
+ handleMaybeThenable(promise, entry, _then);
543
+ }
544
+ this._willSettleAt(promise, i);
545
+ } else {
546
+ this._willSettleAt(new c(function (resolve$$1) {
547
+ return resolve$$1(entry);
548
+ }), i);
549
+ }
550
+ } else {
551
+ this._willSettleAt(resolve$$1(entry), i);
552
+ }
553
+ };
554
+
555
+ Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
556
+ var promise = this.promise;
557
+
558
+
559
+ if (promise._state === PENDING) {
560
+ this._remaining--;
561
+
562
+ if (state === REJECTED) {
563
+ reject(promise, value);
564
+ } else {
565
+ this._result[i] = value;
566
+ }
567
+ }
568
+
569
+ if (this._remaining === 0) {
570
+ fulfill(promise, this._result);
571
+ }
572
+ };
573
+
574
+ Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
575
+ var enumerator = this;
576
+
577
+ subscribe(promise, undefined, function (value) {
578
+ return enumerator._settledAt(FULFILLED, i, value);
579
+ }, function (reason) {
580
+ return enumerator._settledAt(REJECTED, i, reason);
581
+ });
582
+ };
583
+
584
+ return Enumerator;
585
+ }();
586
+
587
+ /**
588
+ `Promise.all` accepts an array of promises, and returns a new promise which
589
+ is fulfilled with an array of fulfillment values for the passed promises, or
590
+ rejected with the reason of the first passed promise to be rejected. It casts all
591
+ elements of the passed iterable to promises as it runs this algorithm.
592
+
593
+ Example:
594
+
595
+ ```javascript
596
+ let promise1 = resolve(1);
597
+ let promise2 = resolve(2);
598
+ let promise3 = resolve(3);
599
+ let promises = [ promise1, promise2, promise3 ];
600
+
601
+ Promise.all(promises).then(function(array){
602
+ // The array here would be [ 1, 2, 3 ];
603
+ });
604
+ ```
605
+
606
+ If any of the `promises` given to `all` are rejected, the first promise
607
+ that is rejected will be given as an argument to the returned promises's
608
+ rejection handler. For example:
609
+
610
+ Example:
611
+
612
+ ```javascript
613
+ let promise1 = resolve(1);
614
+ let promise2 = reject(new Error("2"));
615
+ let promise3 = reject(new Error("3"));
616
+ let promises = [ promise1, promise2, promise3 ];
617
+
618
+ Promise.all(promises).then(function(array){
619
+ // Code here never runs because there are rejected promises!
620
+ }, function(error) {
621
+ // error.message === "2"
622
+ });
623
+ ```
624
+
625
+ @method all
626
+ @static
627
+ @param {Array} entries array of promises
628
+ @param {String} label optional string for labeling the promise.
629
+ Useful for tooling.
630
+ @return {Promise} promise that is fulfilled when all `promises` have been
631
+ fulfilled, or rejected if any of them become rejected.
632
+ @static
633
+ */
634
+ function all(entries) {
635
+ return new Enumerator(this, entries).promise;
636
+ }
637
+
638
+ /**
639
+ `Promise.race` returns a new promise which is settled in the same way as the
640
+ first passed promise to settle.
641
+
642
+ Example:
643
+
644
+ ```javascript
645
+ let promise1 = new Promise(function(resolve, reject){
646
+ setTimeout(function(){
647
+ resolve('promise 1');
648
+ }, 200);
649
+ });
650
+
651
+ let promise2 = new Promise(function(resolve, reject){
652
+ setTimeout(function(){
653
+ resolve('promise 2');
654
+ }, 100);
655
+ });
656
+
657
+ Promise.race([promise1, promise2]).then(function(result){
658
+ // result === 'promise 2' because it was resolved before promise1
659
+ // was resolved.
660
+ });
661
+ ```
662
+
663
+ `Promise.race` is deterministic in that only the state of the first
664
+ settled promise matters. For example, even if other promises given to the
665
+ `promises` array argument are resolved, but the first settled promise has
666
+ become rejected before the other promises became fulfilled, the returned
667
+ promise will become rejected:
668
+
669
+ ```javascript
670
+ let promise1 = new Promise(function(resolve, reject){
671
+ setTimeout(function(){
672
+ resolve('promise 1');
673
+ }, 200);
674
+ });
675
+
676
+ let promise2 = new Promise(function(resolve, reject){
677
+ setTimeout(function(){
678
+ reject(new Error('promise 2'));
679
+ }, 100);
680
+ });
681
+
682
+ Promise.race([promise1, promise2]).then(function(result){
683
+ // Code here never runs
684
+ }, function(reason){
685
+ // reason.message === 'promise 2' because promise 2 became rejected before
686
+ // promise 1 became fulfilled
687
+ });
688
+ ```
689
+
690
+ An example real-world use case is implementing timeouts:
691
+
692
+ ```javascript
693
+ Promise.race([ajax('foo.json'), timeout(5000)])
694
+ ```
695
+
696
+ @method race
697
+ @static
698
+ @param {Array} promises array of promises to observe
699
+ Useful for tooling.
700
+ @return {Promise} a promise which settles in the same way as the first passed
701
+ promise to settle.
702
+ */
703
+ function race(entries) {
704
+ /*jshint validthis:true */
705
+ var Constructor = this;
706
+
707
+ if (!isArray(entries)) {
708
+ return new Constructor(function (_, reject) {
709
+ return reject(new TypeError('You must pass an array to race.'));
710
+ });
711
+ } else {
712
+ return new Constructor(function (resolve, reject) {
713
+ var length = entries.length;
714
+ for (var i = 0; i < length; i++) {
715
+ Constructor.resolve(entries[i]).then(resolve, reject);
716
+ }
717
+ });
718
+ }
719
+ }
720
+
721
+ /**
722
+ `Promise.reject` returns a promise rejected with the passed `reason`.
723
+ It is shorthand for the following:
724
+
725
+ ```javascript
726
+ let promise = new Promise(function(resolve, reject){
727
+ reject(new Error('WHOOPS'));
728
+ });
729
+
730
+ promise.then(function(value){
731
+ // Code here doesn't run because the promise is rejected!
732
+ }, function(reason){
733
+ // reason.message === 'WHOOPS'
734
+ });
735
+ ```
736
+
737
+ Instead of writing the above, your code now simply becomes the following:
738
+
739
+ ```javascript
740
+ let promise = Promise.reject(new Error('WHOOPS'));
741
+
742
+ promise.then(function(value){
743
+ // Code here doesn't run because the promise is rejected!
744
+ }, function(reason){
745
+ // reason.message === 'WHOOPS'
746
+ });
747
+ ```
748
+
749
+ @method reject
750
+ @static
751
+ @param {Any} reason value that the returned promise will be rejected with.
752
+ Useful for tooling.
753
+ @return {Promise} a promise rejected with the given `reason`.
754
+ */
755
+ function reject$1(reason) {
756
+ /*jshint validthis:true */
757
+ var Constructor = this;
758
+ var promise = new Constructor(noop);
759
+ reject(promise, reason);
760
+ return promise;
761
+ }
762
+
763
+ function needsResolver() {
764
+ throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
765
+ }
766
+
767
+ function needsNew() {
768
+ throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
769
+ }
770
+
771
+ /**
772
+ Promise objects represent the eventual result of an asynchronous operation. The
773
+ primary way of interacting with a promise is through its `then` method, which
774
+ registers callbacks to receive either a promise's eventual value or the reason
775
+ why the promise cannot be fulfilled.
776
+
777
+ Terminology
778
+ -----------
779
+
780
+ - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
781
+ - `thenable` is an object or function that defines a `then` method.
782
+ - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
783
+ - `exception` is a value that is thrown using the throw statement.
784
+ - `reason` is a value that indicates why a promise was rejected.
785
+ - `settled` the final resting state of a promise, fulfilled or rejected.
786
+
787
+ A promise can be in one of three states: pending, fulfilled, or rejected.
788
+
789
+ Promises that are fulfilled have a fulfillment value and are in the fulfilled
790
+ state. Promises that are rejected have a rejection reason and are in the
791
+ rejected state. A fulfillment value is never a thenable.
792
+
793
+ Promises can also be said to *resolve* a value. If this value is also a
794
+ promise, then the original promise's settled state will match the value's
795
+ settled state. So a promise that *resolves* a promise that rejects will
796
+ itself reject, and a promise that *resolves* a promise that fulfills will
797
+ itself fulfill.
798
+
799
+
800
+ Basic Usage:
801
+ ------------
802
+
803
+ ```js
804
+ let promise = new Promise(function(resolve, reject) {
805
+ // on success
806
+ resolve(value);
807
+
808
+ // on failure
809
+ reject(reason);
810
+ });
811
+
812
+ promise.then(function(value) {
813
+ // on fulfillment
814
+ }, function(reason) {
815
+ // on rejection
816
+ });
817
+ ```
818
+
819
+ Advanced Usage:
820
+ ---------------
821
+
822
+ Promises shine when abstracting away asynchronous interactions such as
823
+ `XMLHttpRequest`s.
824
+
825
+ ```js
826
+ function getJSON(url) {
827
+ return new Promise(function(resolve, reject){
828
+ let xhr = new XMLHttpRequest();
829
+
830
+ xhr.open('GET', url);
831
+ xhr.onreadystatechange = handler;
832
+ xhr.responseType = 'json';
833
+ xhr.setRequestHeader('Accept', 'application/json');
834
+ xhr.send();
835
+
836
+ function handler() {
837
+ if (this.readyState === this.DONE) {
838
+ if (this.status === 200) {
839
+ resolve(this.response);
840
+ } else {
841
+ reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
842
+ }
843
+ }
844
+ };
845
+ });
846
+ }
847
+
848
+ getJSON('/posts.json').then(function(json) {
849
+ // on fulfillment
850
+ }, function(reason) {
851
+ // on rejection
852
+ });
853
+ ```
854
+
855
+ Unlike callbacks, promises are great composable primitives.
856
+
857
+ ```js
858
+ Promise.all([
859
+ getJSON('/posts'),
860
+ getJSON('/comments')
861
+ ]).then(function(values){
862
+ values[0] // => postsJSON
863
+ values[1] // => commentsJSON
864
+
865
+ return values;
866
+ });
867
+ ```
868
+
869
+ @class Promise
870
+ @param {Function} resolver
871
+ Useful for tooling.
872
+ @constructor
873
+ */
874
+
875
+ var Promise$1 = function () {
876
+ function Promise(resolver) {
877
+ this[PROMISE_ID] = nextId();
878
+ this._result = this._state = undefined;
879
+ this._subscribers = [];
880
+
881
+ if (noop !== resolver) {
882
+ typeof resolver !== 'function' && needsResolver();
883
+ this instanceof Promise ? initializePromise(this, resolver) : needsNew();
884
+ }
885
+ }
886
+
887
+ /**
888
+ The primary way of interacting with a promise is through its `then` method,
889
+ which registers callbacks to receive either a promise's eventual value or the
890
+ reason why the promise cannot be fulfilled.
891
+ ```js
892
+ findUser().then(function(user){
893
+ // user is available
894
+ }, function(reason){
895
+ // user is unavailable, and you are given the reason why
896
+ });
897
+ ```
898
+ Chaining
899
+ --------
900
+ The return value of `then` is itself a promise. This second, 'downstream'
901
+ promise is resolved with the return value of the first promise's fulfillment
902
+ or rejection handler, or rejected if the handler throws an exception.
903
+ ```js
904
+ findUser().then(function (user) {
905
+ return user.name;
906
+ }, function (reason) {
907
+ return 'default name';
908
+ }).then(function (userName) {
909
+ // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
910
+ // will be `'default name'`
911
+ });
912
+ findUser().then(function (user) {
913
+ throw new Error('Found user, but still unhappy');
914
+ }, function (reason) {
915
+ throw new Error('`findUser` rejected and we're unhappy');
916
+ }).then(function (value) {
917
+ // never reached
918
+ }, function (reason) {
919
+ // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
920
+ // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
921
+ });
922
+ ```
923
+ If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
924
+ ```js
925
+ findUser().then(function (user) {
926
+ throw new PedagogicalException('Upstream error');
927
+ }).then(function (value) {
928
+ // never reached
929
+ }).then(function (value) {
930
+ // never reached
931
+ }, function (reason) {
932
+ // The `PedgagocialException` is propagated all the way down to here
933
+ });
934
+ ```
935
+ Assimilation
936
+ ------------
937
+ Sometimes the value you want to propagate to a downstream promise can only be
938
+ retrieved asynchronously. This can be achieved by returning a promise in the
939
+ fulfillment or rejection handler. The downstream promise will then be pending
940
+ until the returned promise is settled. This is called *assimilation*.
941
+ ```js
942
+ findUser().then(function (user) {
943
+ return findCommentsByAuthor(user);
944
+ }).then(function (comments) {
945
+ // The user's comments are now available
946
+ });
947
+ ```
948
+ If the assimliated promise rejects, then the downstream promise will also reject.
949
+ ```js
950
+ findUser().then(function (user) {
951
+ return findCommentsByAuthor(user);
952
+ }).then(function (comments) {
953
+ // If `findCommentsByAuthor` fulfills, we'll have the value here
954
+ }, function (reason) {
955
+ // If `findCommentsByAuthor` rejects, we'll have the reason here
956
+ });
957
+ ```
958
+ Simple Example
959
+ --------------
960
+ Synchronous Example
961
+ ```javascript
962
+ let result;
963
+ try {
964
+ result = findResult();
965
+ // success
966
+ } catch(reason) {
967
+ // failure
968
+ }
969
+ ```
970
+ Errback Example
971
+ ```js
972
+ findResult(function(result, err){
973
+ if (err) {
974
+ // failure
975
+ } else {
976
+ // success
977
+ }
978
+ });
979
+ ```
980
+ Promise Example;
981
+ ```javascript
982
+ findResult().then(function(result){
983
+ // success
984
+ }, function(reason){
985
+ // failure
986
+ });
987
+ ```
988
+ Advanced Example
989
+ --------------
990
+ Synchronous Example
991
+ ```javascript
992
+ let author, books;
993
+ try {
994
+ author = findAuthor();
995
+ books = findBooksByAuthor(author);
996
+ // success
997
+ } catch(reason) {
998
+ // failure
999
+ }
1000
+ ```
1001
+ Errback Example
1002
+ ```js
1003
+ function foundBooks(books) {
1004
+ }
1005
+ function failure(reason) {
1006
+ }
1007
+ findAuthor(function(author, err){
1008
+ if (err) {
1009
+ failure(err);
1010
+ // failure
1011
+ } else {
1012
+ try {
1013
+ findBoooksByAuthor(author, function(books, err) {
1014
+ if (err) {
1015
+ failure(err);
1016
+ } else {
1017
+ try {
1018
+ foundBooks(books);
1019
+ } catch(reason) {
1020
+ failure(reason);
1021
+ }
1022
+ }
1023
+ });
1024
+ } catch(error) {
1025
+ failure(err);
1026
+ }
1027
+ // success
1028
+ }
1029
+ });
1030
+ ```
1031
+ Promise Example;
1032
+ ```javascript
1033
+ findAuthor().
1034
+ then(findBooksByAuthor).
1035
+ then(function(books){
1036
+ // found books
1037
+ }).catch(function(reason){
1038
+ // something went wrong
1039
+ });
1040
+ ```
1041
+ @method then
1042
+ @param {Function} onFulfilled
1043
+ @param {Function} onRejected
1044
+ Useful for tooling.
1045
+ @return {Promise}
1046
+ */
1047
+
1048
+ /**
1049
+ `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
1050
+ as the catch block of a try/catch statement.
1051
+ ```js
1052
+ function findAuthor(){
1053
+ throw new Error('couldn't find that author');
1054
+ }
1055
+ // synchronous
1056
+ try {
1057
+ findAuthor();
1058
+ } catch(reason) {
1059
+ // something went wrong
1060
+ }
1061
+ // async with promises
1062
+ findAuthor().catch(function(reason){
1063
+ // something went wrong
1064
+ });
1065
+ ```
1066
+ @method catch
1067
+ @param {Function} onRejection
1068
+ Useful for tooling.
1069
+ @return {Promise}
1070
+ */
1071
+
1072
+
1073
+ Promise.prototype.catch = function _catch(onRejection) {
1074
+ return this.then(null, onRejection);
1075
+ };
1076
+
1077
+ /**
1078
+ `finally` will be invoked regardless of the promise's fate just as native
1079
+ try/catch/finally behaves
1080
+
1081
+ Synchronous example:
1082
+
1083
+ ```js
1084
+ findAuthor() {
1085
+ if (Math.random() > 0.5) {
1086
+ throw new Error();
1087
+ }
1088
+ return new Author();
1089
+ }
1090
+
1091
+ try {
1092
+ return findAuthor(); // succeed or fail
1093
+ } catch(error) {
1094
+ return findOtherAuther();
1095
+ } finally {
1096
+ // always runs
1097
+ // doesn't affect the return value
1098
+ }
1099
+ ```
1100
+
1101
+ Asynchronous example:
1102
+
1103
+ ```js
1104
+ findAuthor().catch(function(reason){
1105
+ return findOtherAuther();
1106
+ }).finally(function(){
1107
+ // author was either found, or not
1108
+ });
1109
+ ```
1110
+
1111
+ @method finally
1112
+ @param {Function} callback
1113
+ @return {Promise}
1114
+ */
1115
+
1116
+
1117
+ Promise.prototype.finally = function _finally(callback) {
1118
+ var promise = this;
1119
+ var constructor = promise.constructor;
1120
+
1121
+ if (isFunction(callback)) {
1122
+ return promise.then(function (value) {
1123
+ return constructor.resolve(callback()).then(function () {
1124
+ return value;
1125
+ });
1126
+ }, function (reason) {
1127
+ return constructor.resolve(callback()).then(function () {
1128
+ throw reason;
1129
+ });
1130
+ });
1131
+ }
1132
+
1133
+ return promise.then(callback, callback);
1134
+ };
1135
+
1136
+ return Promise;
1137
+ }();
1138
+
1139
+ Promise$1.prototype.then = then;
1140
+ Promise$1.all = all;
1141
+ Promise$1.race = race;
1142
+ Promise$1.resolve = resolve$1;
1143
+ Promise$1.reject = reject$1;
1144
+ Promise$1._setScheduler = setScheduler;
1145
+ Promise$1._setAsap = setAsap;
1146
+ Promise$1._asap = asap;
1147
+
1148
+ /*global self*/
1149
+ function polyfill() {
1150
+ var local = void 0;
1151
+
1152
+ if (typeof __webpack_require__.g !== 'undefined') {
1153
+ local = __webpack_require__.g;
1154
+ } else if (typeof self !== 'undefined') {
1155
+ local = self;
1156
+ } else {
1157
+ try {
1158
+ local = Function('return this')();
1159
+ } catch (e) {
1160
+ throw new Error('polyfill failed because global object is unavailable in this environment');
1161
+ }
1162
+ }
1163
+
1164
+ var P = local.Promise;
1165
+
1166
+ if (P) {
1167
+ var promiseToString = null;
1168
+ try {
1169
+ promiseToString = Object.prototype.toString.call(P.resolve());
1170
+ } catch (e) {
1171
+ // silently ignored
1172
+ }
1173
+
1174
+ if (promiseToString === '[object Promise]' && !P.cast) {
1175
+ return;
1176
+ }
1177
+ }
1178
+
1179
+ local.Promise = Promise$1;
1180
+ }
1181
+
1182
+ // Strange compat..
1183
+ Promise$1.polyfill = polyfill;
1184
+ Promise$1.Promise = Promise$1;
1185
+
1186
+ return Promise$1;
1187
+
1188
+ })));
1189
+
1190
+
1191
+
1192
+ //# sourceMappingURL=es6-promise.map
1193
+
1194
+
1195
+ /***/ }),
1196
+
1197
+ /***/ "../node_modules/isomorphic-fetch/fetch-npm-browserify.js":
1198
+ /*!****************************************************************!*\
1199
+ !*** ../node_modules/isomorphic-fetch/fetch-npm-browserify.js ***!
1200
+ \****************************************************************/
1201
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1202
+
1203
+ // the whatwg-fetch polyfill installs the fetch() function
1204
+ // on the global object (window or self)
1205
+ //
1206
+ // Return that as the export for use in Webpack, Browserify etc.
1207
+ __webpack_require__(/*! whatwg-fetch */ "../node_modules/whatwg-fetch/fetch.js");
1208
+ module.exports = self.fetch.bind(self);
1209
+
1210
+
1211
+ /***/ }),
1212
+
1213
+ /***/ "../node_modules/url-join/lib/url-join.js":
1214
+ /*!************************************************!*\
1215
+ !*** ../node_modules/url-join/lib/url-join.js ***!
1216
+ \************************************************/
1217
+ /***/ (function(module, exports, __webpack_require__) {
1218
+
1219
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (name, context, definition) {
1220
+ if ( true && module.exports) module.exports = definition();
1221
+ else if (true) !(__WEBPACK_AMD_DEFINE_FACTORY__ = (definition),
1222
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
1223
+ (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
1224
+ __WEBPACK_AMD_DEFINE_FACTORY__),
1225
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
1226
+ else {}
1227
+ })('urljoin', this, function () {
1228
+
1229
+ function normalize (strArray) {
1230
+ var resultArray = [];
1231
+ if (strArray.length === 0) { return ''; }
1232
+
1233
+ if (typeof strArray[0] !== 'string') {
1234
+ throw new TypeError('Url must be a string. Received ' + strArray[0]);
1235
+ }
1236
+
1237
+ // If the first part is a plain protocol, we combine it with the next part.
1238
+ if (strArray[0].match(/^[^/:]+:\/*$/) && strArray.length > 1) {
1239
+ var first = strArray.shift();
1240
+ strArray[0] = first + strArray[0];
1241
+ }
1242
+
1243
+ // There must be two or three slashes in the file protocol, two slashes in anything else.
1244
+ if (strArray[0].match(/^file:\/\/\//)) {
1245
+ strArray[0] = strArray[0].replace(/^([^/:]+):\/*/, '$1:///');
1246
+ } else {
1247
+ strArray[0] = strArray[0].replace(/^([^/:]+):\/*/, '$1://');
1248
+ }
1249
+
1250
+ for (var i = 0; i < strArray.length; i++) {
1251
+ var component = strArray[i];
1252
+
1253
+ if (typeof component !== 'string') {
1254
+ throw new TypeError('Url must be a string. Received ' + component);
1255
+ }
1256
+
1257
+ if (component === '') { continue; }
1258
+
1259
+ if (i > 0) {
1260
+ // Removing the starting slashes for each component but the first.
1261
+ component = component.replace(/^[\/]+/, '');
1262
+ }
1263
+ if (i < strArray.length - 1) {
1264
+ // Removing the ending slashes for each component but the last.
1265
+ component = component.replace(/[\/]+$/, '');
1266
+ } else {
1267
+ // For the last component we will combine multiple slashes to a single one.
1268
+ component = component.replace(/[\/]+$/, '/');
1269
+ }
1270
+
1271
+ resultArray.push(component);
1272
+
1273
+ }
1274
+
1275
+ var str = resultArray.join('/');
1276
+ // Each input component is now separated by a single slash except the possible first plain protocol part.
1277
+
1278
+ // remove trailing slash before parameters or hash
1279
+ str = str.replace(/\/(\?|&|#[^!])/g, '$1');
1280
+
1281
+ // replace ? in parameters with &
1282
+ var parts = str.split('?');
1283
+ str = parts.shift() + (parts.length > 0 ? '?': '') + parts.join('&');
1284
+
1285
+ return str;
1286
+ }
1287
+
1288
+ return function () {
1289
+ var input;
1290
+
1291
+ if (typeof arguments[0] === 'object') {
1292
+ input = arguments[0];
1293
+ } else {
1294
+ input = [].slice.call(arguments);
1295
+ }
1296
+
1297
+ return normalize(input);
1298
+ };
1299
+
1300
+ });
1301
+
1302
+
1303
+ /***/ }),
1304
+
1305
+ /***/ "../node_modules/whatwg-fetch/fetch.js":
1306
+ /*!*********************************************!*\
1307
+ !*** ../node_modules/whatwg-fetch/fetch.js ***!
1308
+ \*********************************************/
1309
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1310
+
1311
+ "use strict";
1312
+ __webpack_require__.r(__webpack_exports__);
1313
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1314
+ /* harmony export */ DOMException: () => (/* binding */ DOMException),
1315
+ /* harmony export */ Headers: () => (/* binding */ Headers),
1316
+ /* harmony export */ Request: () => (/* binding */ Request),
1317
+ /* harmony export */ Response: () => (/* binding */ Response),
1318
+ /* harmony export */ fetch: () => (/* binding */ fetch)
1319
+ /* harmony export */ });
1320
+ /* eslint-disable no-prototype-builtins */
1321
+ var g =
1322
+ (typeof globalThis !== 'undefined' && globalThis) ||
1323
+ (typeof self !== 'undefined' && self) ||
1324
+ // eslint-disable-next-line no-undef
1325
+ (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g) ||
1326
+ {}
1327
+
1328
+ var support = {
1329
+ searchParams: 'URLSearchParams' in g,
1330
+ iterable: 'Symbol' in g && 'iterator' in Symbol,
1331
+ blob:
1332
+ 'FileReader' in g &&
1333
+ 'Blob' in g &&
1334
+ (function() {
1335
+ try {
1336
+ new Blob()
1337
+ return true
1338
+ } catch (e) {
1339
+ return false
1340
+ }
1341
+ })(),
1342
+ formData: 'FormData' in g,
1343
+ arrayBuffer: 'ArrayBuffer' in g
1344
+ }
1345
+
1346
+ function isDataView(obj) {
1347
+ return obj && DataView.prototype.isPrototypeOf(obj)
1348
+ }
1349
+
1350
+ if (support.arrayBuffer) {
1351
+ var viewClasses = [
1352
+ '[object Int8Array]',
1353
+ '[object Uint8Array]',
1354
+ '[object Uint8ClampedArray]',
1355
+ '[object Int16Array]',
1356
+ '[object Uint16Array]',
1357
+ '[object Int32Array]',
1358
+ '[object Uint32Array]',
1359
+ '[object Float32Array]',
1360
+ '[object Float64Array]'
1361
+ ]
1362
+
1363
+ var isArrayBufferView =
1364
+ ArrayBuffer.isView ||
1365
+ function(obj) {
1366
+ return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
1367
+ }
1368
+ }
1369
+
1370
+ function normalizeName(name) {
1371
+ if (typeof name !== 'string') {
1372
+ name = String(name)
1373
+ }
1374
+ if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {
1375
+ throw new TypeError('Invalid character in header field name: "' + name + '"')
1376
+ }
1377
+ return name.toLowerCase()
1378
+ }
1379
+
1380
+ function normalizeValue(value) {
1381
+ if (typeof value !== 'string') {
1382
+ value = String(value)
1383
+ }
1384
+ return value
1385
+ }
1386
+
1387
+ // Build a destructive iterator for the value list
1388
+ function iteratorFor(items) {
1389
+ var iterator = {
1390
+ next: function() {
1391
+ var value = items.shift()
1392
+ return {done: value === undefined, value: value}
1393
+ }
1394
+ }
1395
+
1396
+ if (support.iterable) {
1397
+ iterator[Symbol.iterator] = function() {
1398
+ return iterator
1399
+ }
1400
+ }
1401
+
1402
+ return iterator
1403
+ }
1404
+
1405
+ function Headers(headers) {
1406
+ this.map = {}
1407
+
1408
+ if (headers instanceof Headers) {
1409
+ headers.forEach(function(value, name) {
1410
+ this.append(name, value)
1411
+ }, this)
1412
+ } else if (Array.isArray(headers)) {
1413
+ headers.forEach(function(header) {
1414
+ if (header.length != 2) {
1415
+ throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)
1416
+ }
1417
+ this.append(header[0], header[1])
1418
+ }, this)
1419
+ } else if (headers) {
1420
+ Object.getOwnPropertyNames(headers).forEach(function(name) {
1421
+ this.append(name, headers[name])
1422
+ }, this)
1423
+ }
1424
+ }
1425
+
1426
+ Headers.prototype.append = function(name, value) {
1427
+ name = normalizeName(name)
1428
+ value = normalizeValue(value)
1429
+ var oldValue = this.map[name]
1430
+ this.map[name] = oldValue ? oldValue + ', ' + value : value
1431
+ }
1432
+
1433
+ Headers.prototype['delete'] = function(name) {
1434
+ delete this.map[normalizeName(name)]
1435
+ }
1436
+
1437
+ Headers.prototype.get = function(name) {
1438
+ name = normalizeName(name)
1439
+ return this.has(name) ? this.map[name] : null
1440
+ }
1441
+
1442
+ Headers.prototype.has = function(name) {
1443
+ return this.map.hasOwnProperty(normalizeName(name))
1444
+ }
1445
+
1446
+ Headers.prototype.set = function(name, value) {
1447
+ this.map[normalizeName(name)] = normalizeValue(value)
1448
+ }
1449
+
1450
+ Headers.prototype.forEach = function(callback, thisArg) {
1451
+ for (var name in this.map) {
1452
+ if (this.map.hasOwnProperty(name)) {
1453
+ callback.call(thisArg, this.map[name], name, this)
1454
+ }
1455
+ }
1456
+ }
1457
+
1458
+ Headers.prototype.keys = function() {
1459
+ var items = []
1460
+ this.forEach(function(value, name) {
1461
+ items.push(name)
1462
+ })
1463
+ return iteratorFor(items)
1464
+ }
1465
+
1466
+ Headers.prototype.values = function() {
1467
+ var items = []
1468
+ this.forEach(function(value) {
1469
+ items.push(value)
1470
+ })
1471
+ return iteratorFor(items)
1472
+ }
1473
+
1474
+ Headers.prototype.entries = function() {
1475
+ var items = []
1476
+ this.forEach(function(value, name) {
1477
+ items.push([name, value])
1478
+ })
1479
+ return iteratorFor(items)
1480
+ }
1481
+
1482
+ if (support.iterable) {
1483
+ Headers.prototype[Symbol.iterator] = Headers.prototype.entries
1484
+ }
1485
+
1486
+ function consumed(body) {
1487
+ if (body._noBody) return
1488
+ if (body.bodyUsed) {
1489
+ return Promise.reject(new TypeError('Already read'))
1490
+ }
1491
+ body.bodyUsed = true
1492
+ }
1493
+
1494
+ function fileReaderReady(reader) {
1495
+ return new Promise(function(resolve, reject) {
1496
+ reader.onload = function() {
1497
+ resolve(reader.result)
1498
+ }
1499
+ reader.onerror = function() {
1500
+ reject(reader.error)
1501
+ }
1502
+ })
1503
+ }
1504
+
1505
+ function readBlobAsArrayBuffer(blob) {
1506
+ var reader = new FileReader()
1507
+ var promise = fileReaderReady(reader)
1508
+ reader.readAsArrayBuffer(blob)
1509
+ return promise
1510
+ }
1511
+
1512
+ function readBlobAsText(blob) {
1513
+ var reader = new FileReader()
1514
+ var promise = fileReaderReady(reader)
1515
+ var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type)
1516
+ var encoding = match ? match[1] : 'utf-8'
1517
+ reader.readAsText(blob, encoding)
1518
+ return promise
1519
+ }
1520
+
1521
+ function readArrayBufferAsText(buf) {
1522
+ var view = new Uint8Array(buf)
1523
+ var chars = new Array(view.length)
1524
+
1525
+ for (var i = 0; i < view.length; i++) {
1526
+ chars[i] = String.fromCharCode(view[i])
1527
+ }
1528
+ return chars.join('')
1529
+ }
1530
+
1531
+ function bufferClone(buf) {
1532
+ if (buf.slice) {
1533
+ return buf.slice(0)
1534
+ } else {
1535
+ var view = new Uint8Array(buf.byteLength)
1536
+ view.set(new Uint8Array(buf))
1537
+ return view.buffer
1538
+ }
1539
+ }
1540
+
1541
+ function Body() {
1542
+ this.bodyUsed = false
1543
+
1544
+ this._initBody = function(body) {
1545
+ /*
1546
+ fetch-mock wraps the Response object in an ES6 Proxy to
1547
+ provide useful test harness features such as flush. However, on
1548
+ ES5 browsers without fetch or Proxy support pollyfills must be used;
1549
+ the proxy-pollyfill is unable to proxy an attribute unless it exists
1550
+ on the object before the Proxy is created. This change ensures
1551
+ Response.bodyUsed exists on the instance, while maintaining the
1552
+ semantic of setting Request.bodyUsed in the constructor before
1553
+ _initBody is called.
1554
+ */
1555
+ // eslint-disable-next-line no-self-assign
1556
+ this.bodyUsed = this.bodyUsed
1557
+ this._bodyInit = body
1558
+ if (!body) {
1559
+ this._noBody = true;
1560
+ this._bodyText = ''
1561
+ } else if (typeof body === 'string') {
1562
+ this._bodyText = body
1563
+ } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
1564
+ this._bodyBlob = body
1565
+ } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
1566
+ this._bodyFormData = body
1567
+ } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
1568
+ this._bodyText = body.toString()
1569
+ } else if (support.arrayBuffer && support.blob && isDataView(body)) {
1570
+ this._bodyArrayBuffer = bufferClone(body.buffer)
1571
+ // IE 10-11 can't handle a DataView body.
1572
+ this._bodyInit = new Blob([this._bodyArrayBuffer])
1573
+ } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
1574
+ this._bodyArrayBuffer = bufferClone(body)
1575
+ } else {
1576
+ this._bodyText = body = Object.prototype.toString.call(body)
1577
+ }
1578
+
1579
+ if (!this.headers.get('content-type')) {
1580
+ if (typeof body === 'string') {
1581
+ this.headers.set('content-type', 'text/plain;charset=UTF-8')
1582
+ } else if (this._bodyBlob && this._bodyBlob.type) {
1583
+ this.headers.set('content-type', this._bodyBlob.type)
1584
+ } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
1585
+ this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
1586
+ }
1587
+ }
1588
+ }
1589
+
1590
+ if (support.blob) {
1591
+ this.blob = function() {
1592
+ var rejected = consumed(this)
1593
+ if (rejected) {
1594
+ return rejected
1595
+ }
1596
+
1597
+ if (this._bodyBlob) {
1598
+ return Promise.resolve(this._bodyBlob)
1599
+ } else if (this._bodyArrayBuffer) {
1600
+ return Promise.resolve(new Blob([this._bodyArrayBuffer]))
1601
+ } else if (this._bodyFormData) {
1602
+ throw new Error('could not read FormData body as blob')
1603
+ } else {
1604
+ return Promise.resolve(new Blob([this._bodyText]))
1605
+ }
1606
+ }
1607
+ }
1608
+
1609
+ this.arrayBuffer = function() {
1610
+ if (this._bodyArrayBuffer) {
1611
+ var isConsumed = consumed(this)
1612
+ if (isConsumed) {
1613
+ return isConsumed
1614
+ } else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
1615
+ return Promise.resolve(
1616
+ this._bodyArrayBuffer.buffer.slice(
1617
+ this._bodyArrayBuffer.byteOffset,
1618
+ this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
1619
+ )
1620
+ )
1621
+ } else {
1622
+ return Promise.resolve(this._bodyArrayBuffer)
1623
+ }
1624
+ } else if (support.blob) {
1625
+ return this.blob().then(readBlobAsArrayBuffer)
1626
+ } else {
1627
+ throw new Error('could not read as ArrayBuffer')
1628
+ }
1629
+ }
1630
+
1631
+ this.text = function() {
1632
+ var rejected = consumed(this)
1633
+ if (rejected) {
1634
+ return rejected
1635
+ }
1636
+
1637
+ if (this._bodyBlob) {
1638
+ return readBlobAsText(this._bodyBlob)
1639
+ } else if (this._bodyArrayBuffer) {
1640
+ return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
1641
+ } else if (this._bodyFormData) {
1642
+ throw new Error('could not read FormData body as text')
1643
+ } else {
1644
+ return Promise.resolve(this._bodyText)
1645
+ }
1646
+ }
1647
+
1648
+ if (support.formData) {
1649
+ this.formData = function() {
1650
+ return this.text().then(decode)
1651
+ }
1652
+ }
1653
+
1654
+ this.json = function() {
1655
+ return this.text().then(JSON.parse)
1656
+ }
1657
+
1658
+ return this
1659
+ }
1660
+
1661
+ // HTTP methods whose capitalization should be normalized
1662
+ var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE']
1663
+
1664
+ function normalizeMethod(method) {
1665
+ var upcased = method.toUpperCase()
1666
+ return methods.indexOf(upcased) > -1 ? upcased : method
1667
+ }
1668
+
1669
+ function Request(input, options) {
1670
+ if (!(this instanceof Request)) {
1671
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
1672
+ }
1673
+
1674
+ options = options || {}
1675
+ var body = options.body
1676
+
1677
+ if (input instanceof Request) {
1678
+ if (input.bodyUsed) {
1679
+ throw new TypeError('Already read')
1680
+ }
1681
+ this.url = input.url
1682
+ this.credentials = input.credentials
1683
+ if (!options.headers) {
1684
+ this.headers = new Headers(input.headers)
1685
+ }
1686
+ this.method = input.method
1687
+ this.mode = input.mode
1688
+ this.signal = input.signal
1689
+ if (!body && input._bodyInit != null) {
1690
+ body = input._bodyInit
1691
+ input.bodyUsed = true
1692
+ }
1693
+ } else {
1694
+ this.url = String(input)
1695
+ }
1696
+
1697
+ this.credentials = options.credentials || this.credentials || 'same-origin'
1698
+ if (options.headers || !this.headers) {
1699
+ this.headers = new Headers(options.headers)
1700
+ }
1701
+ this.method = normalizeMethod(options.method || this.method || 'GET')
1702
+ this.mode = options.mode || this.mode || null
1703
+ this.signal = options.signal || this.signal || (function () {
1704
+ if ('AbortController' in g) {
1705
+ var ctrl = new AbortController();
1706
+ return ctrl.signal;
1707
+ }
1708
+ }());
1709
+ this.referrer = null
1710
+
1711
+ if ((this.method === 'GET' || this.method === 'HEAD') && body) {
1712
+ throw new TypeError('Body not allowed for GET or HEAD requests')
1713
+ }
1714
+ this._initBody(body)
1715
+
1716
+ if (this.method === 'GET' || this.method === 'HEAD') {
1717
+ if (options.cache === 'no-store' || options.cache === 'no-cache') {
1718
+ // Search for a '_' parameter in the query string
1719
+ var reParamSearch = /([?&])_=[^&]*/
1720
+ if (reParamSearch.test(this.url)) {
1721
+ // If it already exists then set the value with the current time
1722
+ this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime())
1723
+ } else {
1724
+ // Otherwise add a new '_' parameter to the end with the current time
1725
+ var reQueryString = /\?/
1726
+ this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime()
1727
+ }
1728
+ }
1729
+ }
1730
+ }
1731
+
1732
+ Request.prototype.clone = function() {
1733
+ return new Request(this, {body: this._bodyInit})
1734
+ }
1735
+
1736
+ function decode(body) {
1737
+ var form = new FormData()
1738
+ body
1739
+ .trim()
1740
+ .split('&')
1741
+ .forEach(function(bytes) {
1742
+ if (bytes) {
1743
+ var split = bytes.split('=')
1744
+ var name = split.shift().replace(/\+/g, ' ')
1745
+ var value = split.join('=').replace(/\+/g, ' ')
1746
+ form.append(decodeURIComponent(name), decodeURIComponent(value))
1747
+ }
1748
+ })
1749
+ return form
1750
+ }
1751
+
1752
+ function parseHeaders(rawHeaders) {
1753
+ var headers = new Headers()
1754
+ // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
1755
+ // https://tools.ietf.org/html/rfc7230#section-3.2
1756
+ var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ')
1757
+ // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
1758
+ // https://github.com/github/fetch/issues/748
1759
+ // https://github.com/zloirock/core-js/issues/751
1760
+ preProcessedHeaders
1761
+ .split('\r')
1762
+ .map(function(header) {
1763
+ return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header
1764
+ })
1765
+ .forEach(function(line) {
1766
+ var parts = line.split(':')
1767
+ var key = parts.shift().trim()
1768
+ if (key) {
1769
+ var value = parts.join(':').trim()
1770
+ try {
1771
+ headers.append(key, value)
1772
+ } catch (error) {
1773
+ console.warn('Response ' + error.message)
1774
+ }
1775
+ }
1776
+ })
1777
+ return headers
1778
+ }
1779
+
1780
+ Body.call(Request.prototype)
1781
+
1782
+ function Response(bodyInit, options) {
1783
+ if (!(this instanceof Response)) {
1784
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
1785
+ }
1786
+ if (!options) {
1787
+ options = {}
1788
+ }
1789
+
1790
+ this.type = 'default'
1791
+ this.status = options.status === undefined ? 200 : options.status
1792
+ if (this.status < 200 || this.status > 599) {
1793
+ throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].")
1794
+ }
1795
+ this.ok = this.status >= 200 && this.status < 300
1796
+ this.statusText = options.statusText === undefined ? '' : '' + options.statusText
1797
+ this.headers = new Headers(options.headers)
1798
+ this.url = options.url || ''
1799
+ this._initBody(bodyInit)
1800
+ }
1801
+
1802
+ Body.call(Response.prototype)
1803
+
1804
+ Response.prototype.clone = function() {
1805
+ return new Response(this._bodyInit, {
1806
+ status: this.status,
1807
+ statusText: this.statusText,
1808
+ headers: new Headers(this.headers),
1809
+ url: this.url
1810
+ })
1811
+ }
1812
+
1813
+ Response.error = function() {
1814
+ var response = new Response(null, {status: 200, statusText: ''})
1815
+ response.ok = false
1816
+ response.status = 0
1817
+ response.type = 'error'
1818
+ return response
1819
+ }
1820
+
1821
+ var redirectStatuses = [301, 302, 303, 307, 308]
1822
+
1823
+ Response.redirect = function(url, status) {
1824
+ if (redirectStatuses.indexOf(status) === -1) {
1825
+ throw new RangeError('Invalid status code')
1826
+ }
1827
+
1828
+ return new Response(null, {status: status, headers: {location: url}})
1829
+ }
1830
+
1831
+ var DOMException = g.DOMException
1832
+ try {
1833
+ new DOMException()
1834
+ } catch (err) {
1835
+ DOMException = function(message, name) {
1836
+ this.message = message
1837
+ this.name = name
1838
+ var error = Error(message)
1839
+ this.stack = error.stack
1840
+ }
1841
+ DOMException.prototype = Object.create(Error.prototype)
1842
+ DOMException.prototype.constructor = DOMException
1843
+ }
1844
+
1845
+ function fetch(input, init) {
1846
+ return new Promise(function(resolve, reject) {
1847
+ var request = new Request(input, init)
1848
+
1849
+ if (request.signal && request.signal.aborted) {
1850
+ return reject(new DOMException('Aborted', 'AbortError'))
1851
+ }
1852
+
1853
+ var xhr = new XMLHttpRequest()
1854
+
1855
+ function abortXhr() {
1856
+ xhr.abort()
1857
+ }
1858
+
1859
+ xhr.onload = function() {
1860
+ var options = {
1861
+ statusText: xhr.statusText,
1862
+ headers: parseHeaders(xhr.getAllResponseHeaders() || '')
1863
+ }
1864
+ // This check if specifically for when a user fetches a file locally from the file system
1865
+ // Only if the status is out of a normal range
1866
+ if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) {
1867
+ options.status = 200;
1868
+ } else {
1869
+ options.status = xhr.status;
1870
+ }
1871
+ options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')
1872
+ var body = 'response' in xhr ? xhr.response : xhr.responseText
1873
+ setTimeout(function() {
1874
+ resolve(new Response(body, options))
1875
+ }, 0)
1876
+ }
1877
+
1878
+ xhr.onerror = function() {
1879
+ setTimeout(function() {
1880
+ reject(new TypeError('Network request failed'))
1881
+ }, 0)
1882
+ }
1883
+
1884
+ xhr.ontimeout = function() {
1885
+ setTimeout(function() {
1886
+ reject(new TypeError('Network request timed out'))
1887
+ }, 0)
1888
+ }
1889
+
1890
+ xhr.onabort = function() {
1891
+ setTimeout(function() {
1892
+ reject(new DOMException('Aborted', 'AbortError'))
1893
+ }, 0)
1894
+ }
1895
+
1896
+ function fixUrl(url) {
1897
+ try {
1898
+ return url === '' && g.location.href ? g.location.href : url
1899
+ } catch (e) {
1900
+ return url
1901
+ }
1902
+ }
1903
+
1904
+ xhr.open(request.method, fixUrl(request.url), true)
1905
+
1906
+ if (request.credentials === 'include') {
1907
+ xhr.withCredentials = true
1908
+ } else if (request.credentials === 'omit') {
1909
+ xhr.withCredentials = false
1910
+ }
1911
+
1912
+ if ('responseType' in xhr) {
1913
+ if (support.blob) {
1914
+ xhr.responseType = 'blob'
1915
+ } else if (
1916
+ support.arrayBuffer
1917
+ ) {
1918
+ xhr.responseType = 'arraybuffer'
1919
+ }
1920
+ }
1921
+
1922
+ if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {
1923
+ var names = [];
1924
+ Object.getOwnPropertyNames(init.headers).forEach(function(name) {
1925
+ names.push(normalizeName(name))
1926
+ xhr.setRequestHeader(name, normalizeValue(init.headers[name]))
1927
+ })
1928
+ request.headers.forEach(function(value, name) {
1929
+ if (names.indexOf(name) === -1) {
1930
+ xhr.setRequestHeader(name, value)
1931
+ }
1932
+ })
1933
+ } else {
1934
+ request.headers.forEach(function(value, name) {
1935
+ xhr.setRequestHeader(name, value)
1936
+ })
1937
+ }
1938
+
1939
+ if (request.signal) {
1940
+ request.signal.addEventListener('abort', abortXhr)
1941
+
1942
+ xhr.onreadystatechange = function() {
1943
+ // DONE (success or failure)
1944
+ if (xhr.readyState === 4) {
1945
+ request.signal.removeEventListener('abort', abortXhr)
1946
+ }
1947
+ }
1948
+ }
1949
+
1950
+ xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
1951
+ })
1952
+ }
1953
+
1954
+ fetch.polyfill = true
1955
+
1956
+ if (!g.fetch) {
1957
+ g.fetch = fetch
1958
+ g.Headers = Headers
1959
+ g.Request = Request
1960
+ g.Response = Response
1961
+ }
1962
+
1963
+
1964
+ /***/ }),
1965
+
14
1966
  /***/ "./BitmovinApi.ts":
15
1967
  /*!************************!*\
16
1968
  !*** ./BitmovinApi.ts ***!
@@ -4643,10 +6595,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
4643
6595
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4644
6596
  exports.RestClient = void 0;
4645
6597
  exports.copyAndPrepareBody = copyAndPrepareBody;
6598
+ var e6p = __webpack_require__(/*! es6-promise */ "../node_modules/es6-promise/dist/es6-promise.js");
4646
6599
  var urljoin = __webpack_require__(/*! url-join */ "../node_modules/url-join/lib/url-join.js");
6600
+ var isomorphicFetch = __webpack_require__(/*! isomorphic-fetch */ "../node_modules/isomorphic-fetch/fetch-npm-browserify.js");
4647
6601
  var BaseAPI_1 = __webpack_require__(/*! ./BaseAPI */ "./common/BaseAPI.ts");
4648
6602
  var NullLogger_1 = __webpack_require__(/*! ./NullLogger */ "./common/NullLogger.ts");
4649
6603
  var BitmovinErrorBuilder_1 = __webpack_require__(/*! ./BitmovinErrorBuilder */ "./common/BitmovinErrorBuilder.ts");
6604
+ e6p.polyfill();
4650
6605
  var BASE_URL = 'https://api.bitmovin.com/v1';
4651
6606
  function prepareUrlParameterValue(parameterValue) {
4652
6607
  if (parameterValue instanceof Date) {
@@ -4742,7 +6697,7 @@ var RestClient = /** @class */ (function () {
4742
6697
  this.apiKey = configuration.apiKey;
4743
6698
  this.tenantOrgId = configuration.tenantOrgId;
4744
6699
  this.baseUrl = configuration.baseUrl || BASE_URL;
4745
- this.fetch = configuration.fetch || fetch;
6700
+ this.fetch = configuration.fetch || isomorphicFetch;
4746
6701
  this.logger = configuration.logger || new NullLogger_1.default();
4747
6702
  this.headers = configuration.headers;
4748
6703
  this.httpHandler = this.buildHttpHandler();
@@ -4827,7 +6782,7 @@ var HeaderHandler = /** @class */ (function (_super) {
4827
6782
  var headers = {
4828
6783
  'X-Api-Key': apiKey,
4829
6784
  'X-Api-Client': 'bitmovin-api-sdk-javascript',
4830
- 'X-Api-Client-Version': '1.219.0',
6785
+ 'X-Api-Client-Version': '1.221.0',
4831
6786
  'Content-Type': 'application/json'
4832
6787
  };
4833
6788
  if (tenantOrgId) {
@@ -57671,6 +59626,26 @@ var AnalyticsLicenseCustomDataFieldLabels = /** @class */ (function () {
57671
59626
  this.customData28 = (0, Mapper_1.map)(obj.customData28);
57672
59627
  this.customData29 = (0, Mapper_1.map)(obj.customData29);
57673
59628
  this.customData30 = (0, Mapper_1.map)(obj.customData30);
59629
+ this.customData31 = (0, Mapper_1.map)(obj.customData31);
59630
+ this.customData32 = (0, Mapper_1.map)(obj.customData32);
59631
+ this.customData33 = (0, Mapper_1.map)(obj.customData33);
59632
+ this.customData34 = (0, Mapper_1.map)(obj.customData34);
59633
+ this.customData35 = (0, Mapper_1.map)(obj.customData35);
59634
+ this.customData36 = (0, Mapper_1.map)(obj.customData36);
59635
+ this.customData37 = (0, Mapper_1.map)(obj.customData37);
59636
+ this.customData38 = (0, Mapper_1.map)(obj.customData38);
59637
+ this.customData39 = (0, Mapper_1.map)(obj.customData39);
59638
+ this.customData40 = (0, Mapper_1.map)(obj.customData40);
59639
+ this.customData41 = (0, Mapper_1.map)(obj.customData41);
59640
+ this.customData42 = (0, Mapper_1.map)(obj.customData42);
59641
+ this.customData43 = (0, Mapper_1.map)(obj.customData43);
59642
+ this.customData44 = (0, Mapper_1.map)(obj.customData44);
59643
+ this.customData45 = (0, Mapper_1.map)(obj.customData45);
59644
+ this.customData46 = (0, Mapper_1.map)(obj.customData46);
59645
+ this.customData47 = (0, Mapper_1.map)(obj.customData47);
59646
+ this.customData48 = (0, Mapper_1.map)(obj.customData48);
59647
+ this.customData49 = (0, Mapper_1.map)(obj.customData49);
59648
+ this.customData50 = (0, Mapper_1.map)(obj.customData50);
57674
59649
  }
57675
59650
  return AnalyticsLicenseCustomDataFieldLabels;
57676
59651
  }());
@@ -93971,98 +95946,6 @@ var VideoApi = /** @class */ (function (_super) {
93971
95946
  exports["default"] = VideoApi;
93972
95947
 
93973
95948
 
93974
- /***/ }),
93975
-
93976
- /***/ "../node_modules/url-join/lib/url-join.js":
93977
- /*!************************************************!*\
93978
- !*** ../node_modules/url-join/lib/url-join.js ***!
93979
- \************************************************/
93980
- /***/ (function(module, exports, __webpack_require__) {
93981
-
93982
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (name, context, definition) {
93983
- if ( true && module.exports) module.exports = definition();
93984
- else if (true) !(__WEBPACK_AMD_DEFINE_FACTORY__ = (definition),
93985
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
93986
- (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
93987
- __WEBPACK_AMD_DEFINE_FACTORY__),
93988
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
93989
- else {}
93990
- })('urljoin', this, function () {
93991
-
93992
- function normalize (strArray) {
93993
- var resultArray = [];
93994
- if (strArray.length === 0) { return ''; }
93995
-
93996
- if (typeof strArray[0] !== 'string') {
93997
- throw new TypeError('Url must be a string. Received ' + strArray[0]);
93998
- }
93999
-
94000
- // If the first part is a plain protocol, we combine it with the next part.
94001
- if (strArray[0].match(/^[^/:]+:\/*$/) && strArray.length > 1) {
94002
- var first = strArray.shift();
94003
- strArray[0] = first + strArray[0];
94004
- }
94005
-
94006
- // There must be two or three slashes in the file protocol, two slashes in anything else.
94007
- if (strArray[0].match(/^file:\/\/\//)) {
94008
- strArray[0] = strArray[0].replace(/^([^/:]+):\/*/, '$1:///');
94009
- } else {
94010
- strArray[0] = strArray[0].replace(/^([^/:]+):\/*/, '$1://');
94011
- }
94012
-
94013
- for (var i = 0; i < strArray.length; i++) {
94014
- var component = strArray[i];
94015
-
94016
- if (typeof component !== 'string') {
94017
- throw new TypeError('Url must be a string. Received ' + component);
94018
- }
94019
-
94020
- if (component === '') { continue; }
94021
-
94022
- if (i > 0) {
94023
- // Removing the starting slashes for each component but the first.
94024
- component = component.replace(/^[\/]+/, '');
94025
- }
94026
- if (i < strArray.length - 1) {
94027
- // Removing the ending slashes for each component but the last.
94028
- component = component.replace(/[\/]+$/, '');
94029
- } else {
94030
- // For the last component we will combine multiple slashes to a single one.
94031
- component = component.replace(/[\/]+$/, '/');
94032
- }
94033
-
94034
- resultArray.push(component);
94035
-
94036
- }
94037
-
94038
- var str = resultArray.join('/');
94039
- // Each input component is now separated by a single slash except the possible first plain protocol part.
94040
-
94041
- // remove trailing slash before parameters or hash
94042
- str = str.replace(/\/(\?|&|#[^!])/g, '$1');
94043
-
94044
- // replace ? in parameters with &
94045
- var parts = str.split('?');
94046
- str = parts.shift() + (parts.length > 0 ? '?': '') + parts.join('&');
94047
-
94048
- return str;
94049
- }
94050
-
94051
- return function () {
94052
- var input;
94053
-
94054
- if (typeof arguments[0] === 'object') {
94055
- input = arguments[0];
94056
- } else {
94057
- input = [].slice.call(arguments);
94058
- }
94059
-
94060
- return normalize(input);
94061
- };
94062
-
94063
- });
94064
-
94065
-
94066
95949
  /***/ })
94067
95950
 
94068
95951
  /******/ });
@@ -94092,6 +95975,47 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (nam
94092
95975
  /******/ }
94093
95976
  /******/
94094
95977
  /************************************************************************/
95978
+ /******/ /* webpack/runtime/define property getters */
95979
+ /******/ (() => {
95980
+ /******/ // define getter functions for harmony exports
95981
+ /******/ __webpack_require__.d = (exports, definition) => {
95982
+ /******/ for(var key in definition) {
95983
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
95984
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
95985
+ /******/ }
95986
+ /******/ }
95987
+ /******/ };
95988
+ /******/ })();
95989
+ /******/
95990
+ /******/ /* webpack/runtime/global */
95991
+ /******/ (() => {
95992
+ /******/ __webpack_require__.g = (function() {
95993
+ /******/ if (typeof globalThis === 'object') return globalThis;
95994
+ /******/ try {
95995
+ /******/ return this || new Function('return this')();
95996
+ /******/ } catch (e) {
95997
+ /******/ if (typeof window === 'object') return window;
95998
+ /******/ }
95999
+ /******/ })();
96000
+ /******/ })();
96001
+ /******/
96002
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
96003
+ /******/ (() => {
96004
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
96005
+ /******/ })();
96006
+ /******/
96007
+ /******/ /* webpack/runtime/make namespace object */
96008
+ /******/ (() => {
96009
+ /******/ // define __esModule on exports
96010
+ /******/ __webpack_require__.r = (exports) => {
96011
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
96012
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
96013
+ /******/ }
96014
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
96015
+ /******/ };
96016
+ /******/ })();
96017
+ /******/
96018
+ /************************************************************************/
94095
96019
  /******/
94096
96020
  /******/ // startup
94097
96021
  /******/ // Load entry module and return exports