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