@entur-partner/app-shell 2.4.6 → 2.4.7

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.
@@ -16,328 +16,53 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
16
16
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
17
17
  var createAuth0Client__default = /*#__PURE__*/_interopDefaultLegacy(createAuth0Client);
18
18
 
19
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
20
- try {
21
- var info = gen[key](arg);
22
- var value = info.value;
23
- } catch (error) {
24
- reject(error);
25
- return;
26
- }
27
-
28
- if (info.done) {
29
- resolve(value);
30
- } else {
31
- Promise.resolve(value).then(_next, _throw);
32
- }
33
- }
34
-
35
- function _asyncToGenerator(fn) {
36
- return function () {
37
- var self = this,
38
- args = arguments;
39
- return new Promise(function (resolve, reject) {
40
- var gen = fn.apply(self, args);
41
-
42
- function _next(value) {
43
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
44
- }
45
-
46
- function _throw(err) {
47
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
48
- }
19
+ function _regeneratorRuntime() {
20
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
49
21
 
50
- _next(undefined);
51
- });
52
- };
53
- }
54
-
55
- function _extends() {
56
- _extends = Object.assign || function (target) {
57
- for (var i = 1; i < arguments.length; i++) {
58
- var source = arguments[i];
59
-
60
- for (var key in source) {
61
- if (Object.prototype.hasOwnProperty.call(source, key)) {
62
- target[key] = source[key];
63
- }
64
- }
65
- }
66
-
67
- return target;
22
+ _regeneratorRuntime = function () {
23
+ return exports;
68
24
  };
69
25
 
70
- return _extends.apply(this, arguments);
71
- }
72
-
73
- function _objectWithoutPropertiesLoose(source, excluded) {
74
- if (source == null) return {};
75
- var target = {};
76
- var sourceKeys = Object.keys(source);
77
- var key, i;
78
-
79
- for (i = 0; i < sourceKeys.length; i++) {
80
- key = sourceKeys[i];
81
- if (excluded.indexOf(key) >= 0) continue;
82
- target[key] = source[key];
26
+ var exports = {},
27
+ Op = Object.prototype,
28
+ hasOwn = Op.hasOwnProperty,
29
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
30
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
31
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
32
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
33
+
34
+ function define(obj, key, value) {
35
+ return Object.defineProperty(obj, key, {
36
+ value: value,
37
+ enumerable: !0,
38
+ configurable: !0,
39
+ writable: !0
40
+ }), obj[key];
83
41
  }
84
42
 
85
- return target;
86
- }
87
-
88
- var runtime = {exports: {}};
89
-
90
- /**
91
- * Copyright (c) 2014-present, Facebook, Inc.
92
- *
93
- * This source code is licensed under the MIT license found in the
94
- * LICENSE file in the root directory of this source tree.
95
- */
96
-
97
- (function (module) {
98
- var runtime = /*#__PURE__*/function (exports) {
99
-
100
- var Op = Object.prototype;
101
- var hasOwn = Op.hasOwnProperty;
102
- var undefined$1; // More compressible than void 0.
103
-
104
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
105
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
106
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
107
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
108
-
109
- function define(obj, key, value) {
110
- Object.defineProperty(obj, key, {
111
- value: value,
112
- enumerable: true,
113
- configurable: true,
114
- writable: true
115
- });
116
- return obj[key];
117
- }
118
-
119
- try {
120
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
121
- define({}, "");
122
- } catch (err) {
123
- define = function define(obj, key, value) {
124
- return obj[key] = value;
125
- };
126
- }
127
-
128
- function wrap(innerFn, outerFn, self, tryLocsList) {
129
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
130
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
131
- var generator = Object.create(protoGenerator.prototype);
132
- var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
133
- // .throw, and .return methods.
134
-
135
- generator._invoke = makeInvokeMethod(innerFn, self, context);
136
- return generator;
137
- }
138
-
139
- exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
140
- // record like context.tryEntries[i].completion. This interface could
141
- // have been (and was previously) designed to take a closure to be
142
- // invoked without arguments, but in all the cases we care about we
143
- // already have an existing method we want to call, so there's no need
144
- // to create a new function object. We can even get away with assuming
145
- // the method takes exactly one argument, since that happens to be true
146
- // in every case, so we don't have to touch the arguments object. The
147
- // only additional allocation required is the completion record, which
148
- // has a stable shape and so hopefully should be cheap to allocate.
149
-
150
- function tryCatch(fn, obj, arg) {
151
- try {
152
- return {
153
- type: "normal",
154
- arg: fn.call(obj, arg)
155
- };
156
- } catch (err) {
157
- return {
158
- type: "throw",
159
- arg: err
160
- };
161
- }
162
- }
163
-
164
- var GenStateSuspendedStart = "suspendedStart";
165
- var GenStateSuspendedYield = "suspendedYield";
166
- var GenStateExecuting = "executing";
167
- var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
168
- // breaking out of the dispatch switch statement.
169
-
170
- var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
171
- // .constructor.prototype properties for functions that return Generator
172
- // objects. For full spec compliance, you may wish to configure your
173
- // minifier not to mangle the names of these two functions.
174
-
175
- function Generator() {}
176
-
177
- function GeneratorFunction() {}
178
-
179
- function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
180
- // don't natively support it.
181
-
182
-
183
- var IteratorPrototype = {};
184
- define(IteratorPrototype, iteratorSymbol, function () {
185
- return this;
186
- });
187
- var getProto = Object.getPrototypeOf;
188
- var NativeIteratorPrototype = getProto && /*#__PURE__*/getProto( /*#__PURE__*/getProto( /*#__PURE__*/values([])));
189
-
190
- if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
191
- // This environment has a native %IteratorPrototype%; use it instead
192
- // of the polyfill.
193
- IteratorPrototype = NativeIteratorPrototype;
194
- }
195
-
196
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = /*#__PURE__*/Object.create(IteratorPrototype);
197
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
198
- define(Gp, "constructor", GeneratorFunctionPrototype);
199
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
200
- GeneratorFunction.displayName = /*#__PURE__*/define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
201
- // Iterator interface in terms of a single ._invoke method.
202
-
203
- function defineIteratorMethods(prototype) {
204
- ["next", "throw", "return"].forEach(function (method) {
205
- define(prototype, method, function (arg) {
206
- return this._invoke(method, arg);
207
- });
208
- });
209
- }
210
-
211
- exports.isGeneratorFunction = function (genFun) {
212
- var ctor = typeof genFun === "function" && genFun.constructor;
213
- return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
214
- // do is to check its .name property.
215
- (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
216
- };
217
-
218
- exports.mark = function (genFun) {
219
- if (Object.setPrototypeOf) {
220
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
221
- } else {
222
- genFun.__proto__ = GeneratorFunctionPrototype;
223
- define(genFun, toStringTagSymbol, "GeneratorFunction");
224
- }
225
-
226
- genFun.prototype = Object.create(Gp);
227
- return genFun;
228
- }; // Within the body of any async function, `await x` is transformed to
229
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
230
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
231
- // meant to be awaited.
232
-
233
-
234
- exports.awrap = function (arg) {
235
- return {
236
- __await: arg
237
- };
238
- };
239
-
240
- function AsyncIterator(generator, PromiseImpl) {
241
- function invoke(method, arg, resolve, reject) {
242
- var record = tryCatch(generator[method], generator, arg);
243
-
244
- if (record.type === "throw") {
245
- reject(record.arg);
246
- } else {
247
- var result = record.arg;
248
- var value = result.value;
249
-
250
- if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
251
- return PromiseImpl.resolve(value.__await).then(function (value) {
252
- invoke("next", value, resolve, reject);
253
- }, function (err) {
254
- invoke("throw", err, resolve, reject);
255
- });
256
- }
257
-
258
- return PromiseImpl.resolve(value).then(function (unwrapped) {
259
- // When a yielded Promise is resolved, its final value becomes
260
- // the .value of the Promise<{value,done}> result for the
261
- // current iteration.
262
- result.value = unwrapped;
263
- resolve(result);
264
- }, function (error) {
265
- // If a rejected Promise was yielded, throw the rejection back
266
- // into the async generator function so it can be handled there.
267
- return invoke("throw", error, resolve, reject);
268
- });
269
- }
270
- }
271
-
272
- var previousPromise;
273
-
274
- function enqueue(method, arg) {
275
- function callInvokeWithMethodAndArg() {
276
- return new PromiseImpl(function (resolve, reject) {
277
- invoke(method, arg, resolve, reject);
278
- });
279
- }
280
-
281
- return previousPromise = // If enqueue has been called before, then we want to wait until
282
- // all previous Promises have been resolved before calling invoke,
283
- // so that results are always delivered in the correct order. If
284
- // enqueue has not been called before, then it is important to
285
- // call invoke immediately, without waiting on a callback to fire,
286
- // so that the async generator function has the opportunity to do
287
- // any necessary setup in a predictable way. This predictability
288
- // is why the Promise constructor synchronously invokes its
289
- // executor callback, and why async functions synchronously
290
- // execute code before the first await. Since we implement simple
291
- // async functions in terms of async generators, it is especially
292
- // important to get this right, even though it requires care.
293
- previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
294
- // invocations of the iterator.
295
- callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
296
- } // Define the unified helper method that is used to implement .next,
297
- // .throw, and .return (see defineIteratorMethods).
298
-
299
-
300
- this._invoke = enqueue;
301
- }
302
-
303
- defineIteratorMethods(AsyncIterator.prototype);
304
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
305
- return this;
306
- });
307
- exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
308
- // AsyncIterator objects; they just return a Promise for the value of
309
- // the final result produced by the iterator.
310
-
311
- exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
312
- if (PromiseImpl === void 0) PromiseImpl = Promise;
313
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
314
- return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
315
- : iter.next().then(function (result) {
316
- return result.done ? result.value : iter.next();
317
- });
43
+ try {
44
+ define({}, "");
45
+ } catch (err) {
46
+ define = function (obj, key, value) {
47
+ return obj[key] = value;
318
48
  };
49
+ }
319
50
 
320
- function makeInvokeMethod(innerFn, self, context) {
321
- var state = GenStateSuspendedStart;
322
- return function invoke(method, arg) {
323
- if (state === GenStateExecuting) {
324
- throw new Error("Generator is already running");
325
- }
326
-
327
- if (state === GenStateCompleted) {
328
- if (method === "throw") {
329
- throw arg;
330
- } // Be forgiving, per 25.3.3.3.3 of the spec:
331
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
332
-
333
-
51
+ function wrap(innerFn, outerFn, self, tryLocsList) {
52
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
53
+ generator = Object.create(protoGenerator.prototype),
54
+ context = new Context(tryLocsList || []);
55
+ return generator._invoke = function (innerFn, self, context) {
56
+ var state = "suspendedStart";
57
+ return function (method, arg) {
58
+ if ("executing" === state) throw new Error("Generator is already running");
59
+
60
+ if ("completed" === state) {
61
+ if ("throw" === method) throw arg;
334
62
  return doneResult();
335
63
  }
336
64
 
337
- context.method = method;
338
- context.arg = arg;
339
-
340
- while (true) {
65
+ for (context.method = method, context.arg = arg;;) {
341
66
  var delegate = context.delegate;
342
67
 
343
68
  if (delegate) {
@@ -349,471 +74,360 @@ var runtime = {exports: {}};
349
74
  }
350
75
  }
351
76
 
352
- if (context.method === "next") {
353
- // Setting context._sent for legacy support of Babel's
354
- // function.sent implementation.
355
- context.sent = context._sent = context.arg;
356
- } else if (context.method === "throw") {
357
- if (state === GenStateSuspendedStart) {
358
- state = GenStateCompleted;
359
- throw context.arg;
360
- }
361
-
77
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
78
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
362
79
  context.dispatchException(context.arg);
363
- } else if (context.method === "return") {
364
- context.abrupt("return", context.arg);
365
- }
366
-
367
- state = GenStateExecuting;
80
+ } else "return" === context.method && context.abrupt("return", context.arg);
81
+ state = "executing";
368
82
  var record = tryCatch(innerFn, self, context);
369
83
 
370
- if (record.type === "normal") {
371
- // If an exception is thrown from innerFn, we leave state ===
372
- // GenStateExecuting and loop back for another invocation.
373
- state = context.done ? GenStateCompleted : GenStateSuspendedYield;
374
-
375
- if (record.arg === ContinueSentinel) {
376
- continue;
377
- }
378
-
84
+ if ("normal" === record.type) {
85
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
379
86
  return {
380
87
  value: record.arg,
381
88
  done: context.done
382
89
  };
383
- } else if (record.type === "throw") {
384
- state = GenStateCompleted; // Dispatch the exception by looping back around to the
385
- // context.dispatchException(context.arg) call above.
386
-
387
- context.method = "throw";
388
- context.arg = record.arg;
389
- }
390
- }
391
- };
392
- } // Call delegate.iterator[context.method](context.arg) and handle the
393
- // result, either by returning a { value, done } result from the
394
- // delegate iterator, or by modifying context.method and context.arg,
395
- // setting context.delegate to null, and returning the ContinueSentinel.
396
-
397
-
398
- function maybeInvokeDelegate(delegate, context) {
399
- var method = delegate.iterator[context.method];
400
-
401
- if (method === undefined$1) {
402
- // A .throw or .return when the delegate iterator has no .throw
403
- // method always terminates the yield* loop.
404
- context.delegate = null;
405
-
406
- if (context.method === "throw") {
407
- // Note: ["return"] must be used for ES3 parsing compatibility.
408
- if (delegate.iterator["return"]) {
409
- // If the delegate iterator has a return method, give it a
410
- // chance to clean up.
411
- context.method = "return";
412
- context.arg = undefined$1;
413
- maybeInvokeDelegate(delegate, context);
414
-
415
- if (context.method === "throw") {
416
- // If maybeInvokeDelegate(context) changed context.method from
417
- // "return" to "throw", let that override the TypeError below.
418
- return ContinueSentinel;
419
- }
420
90
  }
421
91
 
422
- context.method = "throw";
423
- context.arg = new TypeError("The iterator does not provide a 'throw' method");
92
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
424
93
  }
94
+ };
95
+ }(innerFn, self, context), generator;
96
+ }
425
97
 
426
- return ContinueSentinel;
427
- }
428
-
429
- var record = tryCatch(method, delegate.iterator, context.arg);
430
-
431
- if (record.type === "throw") {
432
- context.method = "throw";
433
- context.arg = record.arg;
434
- context.delegate = null;
435
- return ContinueSentinel;
436
- }
437
-
438
- var info = record.arg;
439
-
440
- if (!info) {
441
- context.method = "throw";
442
- context.arg = new TypeError("iterator result is not an object");
443
- context.delegate = null;
444
- return ContinueSentinel;
445
- }
446
-
447
- if (info.done) {
448
- // Assign the result of the finished delegate to the temporary
449
- // variable specified by delegate.resultName (see delegateYield).
450
- context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
451
-
452
- context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
453
- // exception, let the outer generator proceed normally. If
454
- // context.method was "next", forget context.arg since it has been
455
- // "consumed" by the delegate iterator. If context.method was
456
- // "return", allow the original .return call to continue in the
457
- // outer generator.
458
-
459
- if (context.method !== "return") {
460
- context.method = "next";
461
- context.arg = undefined$1;
462
- }
463
- } else {
464
- // Re-yield the result returned by the delegate method.
465
- return info;
466
- } // The delegate iterator is finished, so forget it and continue with
467
- // the outer generator.
98
+ function tryCatch(fn, obj, arg) {
99
+ try {
100
+ return {
101
+ type: "normal",
102
+ arg: fn.call(obj, arg)
103
+ };
104
+ } catch (err) {
105
+ return {
106
+ type: "throw",
107
+ arg: err
108
+ };
109
+ }
110
+ }
468
111
 
112
+ exports.wrap = wrap;
113
+ var ContinueSentinel = {};
469
114
 
470
- context.delegate = null;
471
- return ContinueSentinel;
472
- } // Define Generator.prototype.{next,throw,return} in terms of the
473
- // unified ._invoke helper method.
115
+ function Generator() {}
474
116
 
117
+ function GeneratorFunction() {}
475
118
 
476
- defineIteratorMethods(Gp);
477
- define(Gp, toStringTagSymbol, "Generator"); // A Generator should always return itself as the iterator object when the
478
- // @@iterator function is called on it. Some browsers' implementations of the
479
- // iterator prototype chain incorrectly implement this, causing the Generator
480
- // object to not be returned from this call. This ensures that doesn't happen.
481
- // See https://github.com/facebook/regenerator/issues/274 for more details.
119
+ function GeneratorFunctionPrototype() {}
482
120
 
483
- define(Gp, iteratorSymbol, function () {
484
- return this;
485
- });
486
- define(Gp, "toString", function () {
487
- return "[object Generator]";
121
+ var IteratorPrototype = {};
122
+ define(IteratorPrototype, iteratorSymbol, function () {
123
+ return this;
124
+ });
125
+ var getProto = Object.getPrototypeOf,
126
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
127
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
128
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
129
+
130
+ function defineIteratorMethods(prototype) {
131
+ ["next", "throw", "return"].forEach(function (method) {
132
+ define(prototype, method, function (arg) {
133
+ return this._invoke(method, arg);
134
+ });
488
135
  });
136
+ }
489
137
 
490
- function pushTryEntry(locs) {
491
- var entry = {
492
- tryLoc: locs[0]
493
- };
494
-
495
- if (1 in locs) {
496
- entry.catchLoc = locs[1];
497
- }
498
-
499
- if (2 in locs) {
500
- entry.finallyLoc = locs[2];
501
- entry.afterLoc = locs[3];
138
+ function AsyncIterator(generator, PromiseImpl) {
139
+ function invoke(method, arg, resolve, reject) {
140
+ var record = tryCatch(generator[method], generator, arg);
141
+
142
+ if ("throw" !== record.type) {
143
+ var result = record.arg,
144
+ value = result.value;
145
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
146
+ invoke("next", value, resolve, reject);
147
+ }, function (err) {
148
+ invoke("throw", err, resolve, reject);
149
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
150
+ result.value = unwrapped, resolve(result);
151
+ }, function (error) {
152
+ return invoke("throw", error, resolve, reject);
153
+ });
502
154
  }
503
155
 
504
- this.tryEntries.push(entry);
505
- }
506
-
507
- function resetTryEntry(entry) {
508
- var record = entry.completion || {};
509
- record.type = "normal";
510
- delete record.arg;
511
- entry.completion = record;
512
- }
513
-
514
- function Context(tryLocsList) {
515
- // The root entry object (effectively a try statement without a catch
516
- // or a finally block) gives us a place to store values thrown from
517
- // locations where there is no enclosing try statement.
518
- this.tryEntries = [{
519
- tryLoc: "root"
520
- }];
521
- tryLocsList.forEach(pushTryEntry, this);
522
- this.reset(true);
156
+ reject(record.arg);
523
157
  }
524
158
 
525
- exports.keys = function (object) {
526
- var keys = [];
159
+ var previousPromise;
527
160
 
528
- for (var key in object) {
529
- keys.push(key);
161
+ this._invoke = function (method, arg) {
162
+ function callInvokeWithMethodAndArg() {
163
+ return new PromiseImpl(function (resolve, reject) {
164
+ invoke(method, arg, resolve, reject);
165
+ });
530
166
  }
531
167
 
532
- keys.reverse(); // Rather than returning an object with a next method, we keep
533
- // things simple and return the next function itself.
534
-
535
- return function next() {
536
- while (keys.length) {
537
- var key = keys.pop();
538
-
539
- if (key in object) {
540
- next.value = key;
541
- next.done = false;
542
- return next;
543
- }
544
- } // To avoid creating an additional object, we just hang the .value
545
- // and .done properties off the next function object itself. This
546
- // also ensures that the minifier will not anonymize the function.
547
-
548
-
549
- next.done = true;
550
- return next;
551
- };
168
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
552
169
  };
170
+ }
553
171
 
554
- function values(iterable) {
555
- if (iterable) {
556
- var iteratorMethod = iterable[iteratorSymbol];
557
-
558
- if (iteratorMethod) {
559
- return iteratorMethod.call(iterable);
560
- }
561
-
562
- if (typeof iterable.next === "function") {
563
- return iterable;
564
- }
565
-
566
- if (!isNaN(iterable.length)) {
567
- var i = -1,
568
- next = function next() {
569
- while (++i < iterable.length) {
570
- if (hasOwn.call(iterable, i)) {
571
- next.value = iterable[i];
572
- next.done = false;
573
- return next;
574
- }
575
- }
576
-
577
- next.value = undefined$1;
578
- next.done = true;
579
- return next;
580
- };
581
-
582
- return next.next = next;
583
- }
584
- } // Return an iterator with no values.
172
+ function maybeInvokeDelegate(delegate, context) {
173
+ var method = delegate.iterator[context.method];
585
174
 
175
+ if (undefined === method) {
176
+ if (context.delegate = null, "throw" === context.method) {
177
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
178
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
179
+ }
586
180
 
587
- return {
588
- next: doneResult
589
- };
181
+ return ContinueSentinel;
590
182
  }
591
183
 
592
- exports.values = values;
184
+ var record = tryCatch(method, delegate.iterator, context.arg);
185
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
186
+ var info = record.arg;
187
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
188
+ }
593
189
 
594
- function doneResult() {
595
- return {
596
- value: undefined$1,
597
- done: true
598
- };
599
- }
190
+ function pushTryEntry(locs) {
191
+ var entry = {
192
+ tryLoc: locs[0]
193
+ };
194
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
195
+ }
600
196
 
601
- Context.prototype = {
602
- constructor: Context,
603
- reset: function reset(skipTempReset) {
604
- this.prev = 0;
605
- this.next = 0; // Resetting context._sent for legacy support of Babel's
606
- // function.sent implementation.
607
-
608
- this.sent = this._sent = undefined$1;
609
- this.done = false;
610
- this.delegate = null;
611
- this.method = "next";
612
- this.arg = undefined$1;
613
- this.tryEntries.forEach(resetTryEntry);
614
-
615
- if (!skipTempReset) {
616
- for (var name in this) {
617
- // Not sure about the optimal order of these conditions:
618
- if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
619
- this[name] = undefined$1;
620
- }
621
- }
622
- }
623
- },
624
- stop: function stop() {
625
- this.done = true;
626
- var rootEntry = this.tryEntries[0];
627
- var rootRecord = rootEntry.completion;
197
+ function resetTryEntry(entry) {
198
+ var record = entry.completion || {};
199
+ record.type = "normal", delete record.arg, entry.completion = record;
200
+ }
628
201
 
629
- if (rootRecord.type === "throw") {
630
- throw rootRecord.arg;
631
- }
202
+ function Context(tryLocsList) {
203
+ this.tryEntries = [{
204
+ tryLoc: "root"
205
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
206
+ }
632
207
 
633
- return this.rval;
634
- },
635
- dispatchException: function dispatchException(exception) {
636
- if (this.done) {
637
- throw exception;
638
- }
208
+ function values(iterable) {
209
+ if (iterable) {
210
+ var iteratorMethod = iterable[iteratorSymbol];
211
+ if (iteratorMethod) return iteratorMethod.call(iterable);
212
+ if ("function" == typeof iterable.next) return iterable;
639
213
 
640
- var context = this;
214
+ if (!isNaN(iterable.length)) {
215
+ var i = -1,
216
+ next = function next() {
217
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
641
218
 
642
- function handle(loc, caught) {
643
- record.type = "throw";
644
- record.arg = exception;
645
- context.next = loc;
219
+ return next.value = undefined, next.done = !0, next;
220
+ };
646
221
 
647
- if (caught) {
648
- // If the dispatched exception was caught by a catch block,
649
- // then let that catch block handle the exception normally.
650
- context.method = "next";
651
- context.arg = undefined$1;
652
- }
222
+ return next.next = next;
223
+ }
224
+ }
653
225
 
654
- return !!caught;
655
- }
226
+ return {
227
+ next: doneResult
228
+ };
229
+ }
656
230
 
657
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
658
- var entry = this.tryEntries[i];
659
- var record = entry.completion;
231
+ function doneResult() {
232
+ return {
233
+ value: undefined,
234
+ done: !0
235
+ };
236
+ }
660
237
 
661
- if (entry.tryLoc === "root") {
662
- // Exception thrown outside of any try block that could handle
663
- // it, so set the completion value of the entire function to
664
- // throw the exception.
665
- return handle("end");
666
- }
238
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
239
+ var ctor = "function" == typeof genFun && genFun.constructor;
240
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
241
+ }, exports.mark = function (genFun) {
242
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
243
+ }, exports.awrap = function (arg) {
244
+ return {
245
+ __await: arg
246
+ };
247
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
248
+ return this;
249
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
250
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
251
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
252
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
253
+ return result.done ? result.value : iter.next();
254
+ });
255
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
256
+ return this;
257
+ }), define(Gp, "toString", function () {
258
+ return "[object Generator]";
259
+ }), exports.keys = function (object) {
260
+ var keys = [];
261
+
262
+ for (var key in object) keys.push(key);
263
+
264
+ return keys.reverse(), function next() {
265
+ for (; keys.length;) {
266
+ var key = keys.pop();
267
+ if (key in object) return next.value = key, next.done = !1, next;
268
+ }
667
269
 
668
- if (entry.tryLoc <= this.prev) {
669
- var hasCatch = hasOwn.call(entry, "catchLoc");
670
- var hasFinally = hasOwn.call(entry, "finallyLoc");
270
+ return next.done = !0, next;
271
+ };
272
+ }, exports.values = values, Context.prototype = {
273
+ constructor: Context,
274
+ reset: function (skipTempReset) {
275
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
276
+ },
277
+ stop: function () {
278
+ this.done = !0;
279
+ var rootRecord = this.tryEntries[0].completion;
280
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
281
+ return this.rval;
282
+ },
283
+ dispatchException: function (exception) {
284
+ if (this.done) throw exception;
285
+ var context = this;
671
286
 
672
- if (hasCatch && hasFinally) {
673
- if (this.prev < entry.catchLoc) {
674
- return handle(entry.catchLoc, true);
675
- } else if (this.prev < entry.finallyLoc) {
676
- return handle(entry.finallyLoc);
677
- }
678
- } else if (hasCatch) {
679
- if (this.prev < entry.catchLoc) {
680
- return handle(entry.catchLoc, true);
681
- }
682
- } else if (hasFinally) {
683
- if (this.prev < entry.finallyLoc) {
684
- return handle(entry.finallyLoc);
685
- }
686
- } else {
687
- throw new Error("try statement without catch or finally");
688
- }
689
- }
690
- }
691
- },
692
- abrupt: function abrupt(type, arg) {
693
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
694
- var entry = this.tryEntries[i];
287
+ function handle(loc, caught) {
288
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
289
+ }
695
290
 
696
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
697
- var finallyEntry = entry;
698
- break;
291
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
292
+ var entry = this.tryEntries[i],
293
+ record = entry.completion;
294
+ if ("root" === entry.tryLoc) return handle("end");
295
+
296
+ if (entry.tryLoc <= this.prev) {
297
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
298
+ hasFinally = hasOwn.call(entry, "finallyLoc");
299
+
300
+ if (hasCatch && hasFinally) {
301
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
302
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
303
+ } else if (hasCatch) {
304
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
305
+ } else {
306
+ if (!hasFinally) throw new Error("try statement without catch or finally");
307
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
699
308
  }
700
309
  }
310
+ }
311
+ },
312
+ abrupt: function (type, arg) {
313
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
314
+ var entry = this.tryEntries[i];
701
315
 
702
- if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
703
- // Ignore the finally entry if control is not jumping to a
704
- // location outside the try/catch block.
705
- finallyEntry = null;
316
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
317
+ var finallyEntry = entry;
318
+ break;
706
319
  }
320
+ }
707
321
 
708
- var record = finallyEntry ? finallyEntry.completion : {};
709
- record.type = type;
710
- record.arg = arg;
322
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
323
+ var record = finallyEntry ? finallyEntry.completion : {};
324
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
325
+ },
326
+ complete: function (record, afterLoc) {
327
+ if ("throw" === record.type) throw record.arg;
328
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
329
+ },
330
+ finish: function (finallyLoc) {
331
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
332
+ var entry = this.tryEntries[i];
333
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
334
+ }
335
+ },
336
+ catch: function (tryLoc) {
337
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
338
+ var entry = this.tryEntries[i];
711
339
 
712
- if (finallyEntry) {
713
- this.method = "next";
714
- this.next = finallyEntry.finallyLoc;
715
- return ContinueSentinel;
716
- }
340
+ if (entry.tryLoc === tryLoc) {
341
+ var record = entry.completion;
717
342
 
718
- return this.complete(record);
719
- },
720
- complete: function complete(record, afterLoc) {
721
- if (record.type === "throw") {
722
- throw record.arg;
723
- }
343
+ if ("throw" === record.type) {
344
+ var thrown = record.arg;
345
+ resetTryEntry(entry);
346
+ }
724
347
 
725
- if (record.type === "break" || record.type === "continue") {
726
- this.next = record.arg;
727
- } else if (record.type === "return") {
728
- this.rval = this.arg = record.arg;
729
- this.method = "return";
730
- this.next = "end";
731
- } else if (record.type === "normal" && afterLoc) {
732
- this.next = afterLoc;
348
+ return thrown;
733
349
  }
350
+ }
734
351
 
735
- return ContinueSentinel;
736
- },
737
- finish: function finish(finallyLoc) {
738
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
739
- var entry = this.tryEntries[i];
352
+ throw new Error("illegal catch attempt");
353
+ },
354
+ delegateYield: function (iterable, resultName, nextLoc) {
355
+ return this.delegate = {
356
+ iterator: values(iterable),
357
+ resultName: resultName,
358
+ nextLoc: nextLoc
359
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
360
+ }
361
+ }, exports;
362
+ }
740
363
 
741
- if (entry.finallyLoc === finallyLoc) {
742
- this.complete(entry.completion, entry.afterLoc);
743
- resetTryEntry(entry);
744
- return ContinueSentinel;
745
- }
746
- }
747
- },
748
- "catch": function _catch(tryLoc) {
749
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
750
- var entry = this.tryEntries[i];
364
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
365
+ try {
366
+ var info = gen[key](arg);
367
+ var value = info.value;
368
+ } catch (error) {
369
+ reject(error);
370
+ return;
371
+ }
751
372
 
752
- if (entry.tryLoc === tryLoc) {
753
- var record = entry.completion;
373
+ if (info.done) {
374
+ resolve(value);
375
+ } else {
376
+ Promise.resolve(value).then(_next, _throw);
377
+ }
378
+ }
754
379
 
755
- if (record.type === "throw") {
756
- var thrown = record.arg;
757
- resetTryEntry(entry);
758
- }
380
+ function _asyncToGenerator(fn) {
381
+ return function () {
382
+ var self = this,
383
+ args = arguments;
384
+ return new Promise(function (resolve, reject) {
385
+ var gen = fn.apply(self, args);
759
386
 
760
- return thrown;
761
- }
762
- } // The context.catch method must only be called with a location
763
- // argument that corresponds to a known catch block.
387
+ function _next(value) {
388
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
389
+ }
764
390
 
391
+ function _throw(err) {
392
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
393
+ }
765
394
 
766
- throw new Error("illegal catch attempt");
767
- },
768
- delegateYield: function delegateYield(iterable, resultName, nextLoc) {
769
- this.delegate = {
770
- iterator: values(iterable),
771
- resultName: resultName,
772
- nextLoc: nextLoc
773
- };
395
+ _next(undefined);
396
+ });
397
+ };
398
+ }
774
399
 
775
- if (this.method === "next") {
776
- // Deliberately forget the last sent value so that we don't
777
- // accidentally pass it on to the delegate.
778
- this.arg = undefined$1;
779
- }
400
+ function _extends() {
401
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
402
+ for (var i = 1; i < arguments.length; i++) {
403
+ var source = arguments[i];
780
404
 
781
- return ContinueSentinel;
405
+ for (var key in source) {
406
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
407
+ target[key] = source[key];
408
+ }
782
409
  }
783
- }; // Regardless of whether this script is executing as a CommonJS module
784
- // or not, return the runtime object so that we can declare the variable
785
- // regeneratorRuntime in the outer scope, which allows this module to be
786
- // injected easily by `bin/regenerator --include-runtime script.js`.
410
+ }
787
411
 
788
- return exports;
789
- }( // If this script is executing as a CommonJS module, use module.exports
790
- // as the regeneratorRuntime namespace. Otherwise create a new empty
791
- // object. Either way, the resulting object will be used to initialize
792
- // the regeneratorRuntime variable at the top of this file.
793
- module.exports );
412
+ return target;
413
+ };
414
+ return _extends.apply(this, arguments);
415
+ }
794
416
 
795
- try {
796
- regeneratorRuntime = runtime;
797
- } catch (accidentalStrictMode) {
798
- // This module should not be running in strict mode, so the above
799
- // assignment should always work unless something is misconfigured. Just
800
- // in case runtime.js accidentally runs in strict mode, in modern engines
801
- // we can explicitly access globalThis. In older engines we can escape
802
- // strict mode using a global Function call. This could conceivably fail
803
- // if a Content Security Policy forbids using Function, but in that case
804
- // the proper solution is to fix the accidental strict mode problem. If
805
- // you've misconfigured your bundler to force strict mode and applied a
806
- // CSP to forbid Function, and you're not willing to fix either of those
807
- // problems, please detail your unique predicament in a GitHub issue.
808
- if (typeof globalThis === "object") {
809
- globalThis.regeneratorRuntime = runtime;
810
- } else {
811
- Function("r", "regeneratorRuntime = r")(runtime);
812
- }
417
+ function _objectWithoutPropertiesLoose(source, excluded) {
418
+ if (source == null) return {};
419
+ var target = {};
420
+ var sourceKeys = Object.keys(source);
421
+ var key, i;
422
+
423
+ for (i = 0; i < sourceKeys.length; i++) {
424
+ key = sourceKeys[i];
425
+ if (excluded.indexOf(key) >= 0) continue;
426
+ target[key] = source[key];
813
427
  }
814
- })(runtime);
815
428
 
816
- var _regeneratorRuntime = runtime.exports;
429
+ return target;
430
+ }
817
431
 
818
432
  var initialState$1 = {
819
433
  status: 'AUTHENTICATING'
@@ -882,9 +496,9 @@ var AuthProvider = function AuthProvider(_ref) {
882
496
 
883
497
  React.useEffect(function () {
884
498
  var initAuth0 = /*#__PURE__*/function () {
885
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
499
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
886
500
  var client, route, postLoginRoute, isAuthenticated, auth0User, token, user;
887
- return _regeneratorRuntime.wrap(function _callee$(_context) {
501
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
888
502
  while (1) {
889
503
  switch (_context.prev = _context.next) {
890
504
  case 0:
@@ -964,10 +578,10 @@ var AuthProvider = function AuthProvider(_ref) {
964
578
  }();
965
579
 
966
580
  initAuth0()["catch"]( /*#__PURE__*/function () {
967
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(error) {
581
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(error) {
968
582
  var _localStorage$getItem, lastRetryEpochSeconds, nowEpochSeconds, timeSinceLastRetry, minimumTimeForRetry;
969
583
 
970
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
584
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
971
585
  while (1) {
972
586
  switch (_context2.prev = _context2.next) {
973
587
  case 0:
@@ -1032,10 +646,10 @@ var AuthProvider = function AuthProvider(_ref) {
1032
646
  };
1033
647
 
1034
648
  var login = /*#__PURE__*/function () {
1035
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(redirectUri) {
649
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(redirectUri) {
1036
650
  var _window, location;
1037
651
 
1038
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
652
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1039
653
  while (1) {
1040
654
  switch (_context3.prev = _context3.next) {
1041
655
  case 0:
@@ -1064,8 +678,8 @@ var AuthProvider = function AuthProvider(_ref) {
1064
678
  }();
1065
679
 
1066
680
  var getToken = /*#__PURE__*/function () {
1067
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(options) {
1068
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
681
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(options) {
682
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1069
683
  while (1) {
1070
684
  switch (_context4.prev = _context4.next) {
1071
685
  case 0:
@@ -1411,9 +1025,9 @@ var OrganisationSelector = function OrganisationSelector(_ref) {
1411
1025
 
1412
1026
  React.useEffect(function () {
1413
1027
  var fetchOrganisations = /*#__PURE__*/function () {
1414
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
1028
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1415
1029
  var token, organisations;
1416
- return _regeneratorRuntime.wrap(function _callee$(_context) {
1030
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1417
1031
  while (1) {
1418
1032
  switch (_context.prev = _context.next) {
1419
1033
  case 0: