@scout9/app 1.0.0-alpha.0.8.8 → 1.0.0-alpha.0.9.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/_rollupPluginBabelHelpers-9c73c95c.cjs +733 -0
- package/dist/{dev-b085bde6.cjs → dev-024a0325.cjs} +204 -203
- package/dist/{index-02973b72.cjs → index-93d877d8.cjs} +112 -112
- package/dist/index.cjs +5 -4
- package/dist/{macros-f62cceac.cjs → macros-77983cef.cjs} +4 -2
- package/dist/{multipart-parser-efb778dc.cjs → multipart-parser-593e5511.cjs} +5 -4
- package/dist/schemas.cjs +2 -1
- package/dist/spirits.cjs +1175 -2
- package/dist/testing-tools.cjs +4 -3
- package/package.json +1 -1
- package/src/public.d.ts +5 -0
- package/src/runtime/schemas/entity.js +1 -0
- package/src/testing-tools/spirits.js +67 -7
- package/types/index.d.ts +32 -27
- package/types/index.d.ts.map +1 -1
- package/dist/spirits-2d7d7919.cjs +0 -1734
|
@@ -0,0 +1,733 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _callSuper(t, o, e) {
|
|
4
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
5
|
+
}
|
|
6
|
+
function _construct(t, e, r) {
|
|
7
|
+
if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
|
|
8
|
+
var o = [null];
|
|
9
|
+
o.push.apply(o, e);
|
|
10
|
+
var p = new (t.bind.apply(t, o))();
|
|
11
|
+
return r && _setPrototypeOf(p, r.prototype), p;
|
|
12
|
+
}
|
|
13
|
+
function _isNativeReflectConstruct() {
|
|
14
|
+
try {
|
|
15
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
16
|
+
} catch (t) {}
|
|
17
|
+
return (_isNativeReflectConstruct = function () {
|
|
18
|
+
return !!t;
|
|
19
|
+
})();
|
|
20
|
+
}
|
|
21
|
+
function _iterableToArrayLimit(r, l) {
|
|
22
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
23
|
+
if (null != t) {
|
|
24
|
+
var e,
|
|
25
|
+
n,
|
|
26
|
+
i,
|
|
27
|
+
u,
|
|
28
|
+
a = [],
|
|
29
|
+
f = !0,
|
|
30
|
+
o = !1;
|
|
31
|
+
try {
|
|
32
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
33
|
+
if (Object(t) !== t) return;
|
|
34
|
+
f = !1;
|
|
35
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
36
|
+
} catch (r) {
|
|
37
|
+
o = !0, n = r;
|
|
38
|
+
} finally {
|
|
39
|
+
try {
|
|
40
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
41
|
+
} finally {
|
|
42
|
+
if (o) throw n;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return a;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function ownKeys(e, r) {
|
|
49
|
+
var t = Object.keys(e);
|
|
50
|
+
if (Object.getOwnPropertySymbols) {
|
|
51
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
52
|
+
r && (o = o.filter(function (r) {
|
|
53
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
54
|
+
})), t.push.apply(t, o);
|
|
55
|
+
}
|
|
56
|
+
return t;
|
|
57
|
+
}
|
|
58
|
+
function _objectSpread2(e) {
|
|
59
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
60
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
61
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
62
|
+
_defineProperty(e, r, t[r]);
|
|
63
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
64
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return e;
|
|
68
|
+
}
|
|
69
|
+
function _regeneratorRuntime() {
|
|
70
|
+
_regeneratorRuntime = function () {
|
|
71
|
+
return e;
|
|
72
|
+
};
|
|
73
|
+
var t,
|
|
74
|
+
e = {},
|
|
75
|
+
r = Object.prototype,
|
|
76
|
+
n = r.hasOwnProperty,
|
|
77
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
78
|
+
t[e] = r.value;
|
|
79
|
+
},
|
|
80
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
81
|
+
a = i.iterator || "@@iterator",
|
|
82
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
83
|
+
u = i.toStringTag || "@@toStringTag";
|
|
84
|
+
function define(t, e, r) {
|
|
85
|
+
return Object.defineProperty(t, e, {
|
|
86
|
+
value: r,
|
|
87
|
+
enumerable: !0,
|
|
88
|
+
configurable: !0,
|
|
89
|
+
writable: !0
|
|
90
|
+
}), t[e];
|
|
91
|
+
}
|
|
92
|
+
try {
|
|
93
|
+
define({}, "");
|
|
94
|
+
} catch (t) {
|
|
95
|
+
define = function (t, e, r) {
|
|
96
|
+
return t[e] = r;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function wrap(t, e, r, n) {
|
|
100
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
101
|
+
a = Object.create(i.prototype),
|
|
102
|
+
c = new Context(n || []);
|
|
103
|
+
return o(a, "_invoke", {
|
|
104
|
+
value: makeInvokeMethod(t, r, c)
|
|
105
|
+
}), a;
|
|
106
|
+
}
|
|
107
|
+
function tryCatch(t, e, r) {
|
|
108
|
+
try {
|
|
109
|
+
return {
|
|
110
|
+
type: "normal",
|
|
111
|
+
arg: t.call(e, r)
|
|
112
|
+
};
|
|
113
|
+
} catch (t) {
|
|
114
|
+
return {
|
|
115
|
+
type: "throw",
|
|
116
|
+
arg: t
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
e.wrap = wrap;
|
|
121
|
+
var h = "suspendedStart",
|
|
122
|
+
l = "suspendedYield",
|
|
123
|
+
f = "executing",
|
|
124
|
+
s = "completed",
|
|
125
|
+
y = {};
|
|
126
|
+
function Generator() {}
|
|
127
|
+
function GeneratorFunction() {}
|
|
128
|
+
function GeneratorFunctionPrototype() {}
|
|
129
|
+
var p = {};
|
|
130
|
+
define(p, a, function () {
|
|
131
|
+
return this;
|
|
132
|
+
});
|
|
133
|
+
var d = Object.getPrototypeOf,
|
|
134
|
+
v = d && d(d(values([])));
|
|
135
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
136
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
137
|
+
function defineIteratorMethods(t) {
|
|
138
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
139
|
+
define(t, e, function (t) {
|
|
140
|
+
return this._invoke(e, t);
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
function AsyncIterator(t, e) {
|
|
145
|
+
function invoke(r, o, i, a) {
|
|
146
|
+
var c = tryCatch(t[r], t, o);
|
|
147
|
+
if ("throw" !== c.type) {
|
|
148
|
+
var u = c.arg,
|
|
149
|
+
h = u.value;
|
|
150
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
151
|
+
invoke("next", t, i, a);
|
|
152
|
+
}, function (t) {
|
|
153
|
+
invoke("throw", t, i, a);
|
|
154
|
+
}) : e.resolve(h).then(function (t) {
|
|
155
|
+
u.value = t, i(u);
|
|
156
|
+
}, function (t) {
|
|
157
|
+
return invoke("throw", t, i, a);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
a(c.arg);
|
|
161
|
+
}
|
|
162
|
+
var r;
|
|
163
|
+
o(this, "_invoke", {
|
|
164
|
+
value: function (t, n) {
|
|
165
|
+
function callInvokeWithMethodAndArg() {
|
|
166
|
+
return new e(function (e, r) {
|
|
167
|
+
invoke(t, n, e, r);
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
function makeInvokeMethod(e, r, n) {
|
|
175
|
+
var o = h;
|
|
176
|
+
return function (i, a) {
|
|
177
|
+
if (o === f) throw new Error("Generator is already running");
|
|
178
|
+
if (o === s) {
|
|
179
|
+
if ("throw" === i) throw a;
|
|
180
|
+
return {
|
|
181
|
+
value: t,
|
|
182
|
+
done: !0
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
for (n.method = i, n.arg = a;;) {
|
|
186
|
+
var c = n.delegate;
|
|
187
|
+
if (c) {
|
|
188
|
+
var u = maybeInvokeDelegate(c, n);
|
|
189
|
+
if (u) {
|
|
190
|
+
if (u === y) continue;
|
|
191
|
+
return u;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
195
|
+
if (o === h) throw o = s, n.arg;
|
|
196
|
+
n.dispatchException(n.arg);
|
|
197
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
198
|
+
o = f;
|
|
199
|
+
var p = tryCatch(e, r, n);
|
|
200
|
+
if ("normal" === p.type) {
|
|
201
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
202
|
+
return {
|
|
203
|
+
value: p.arg,
|
|
204
|
+
done: n.done
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
function maybeInvokeDelegate(e, r) {
|
|
212
|
+
var n = r.method,
|
|
213
|
+
o = e.iterator[n];
|
|
214
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
215
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
216
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
217
|
+
var a = i.arg;
|
|
218
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
219
|
+
}
|
|
220
|
+
function pushTryEntry(t) {
|
|
221
|
+
var e = {
|
|
222
|
+
tryLoc: t[0]
|
|
223
|
+
};
|
|
224
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
225
|
+
}
|
|
226
|
+
function resetTryEntry(t) {
|
|
227
|
+
var e = t.completion || {};
|
|
228
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
229
|
+
}
|
|
230
|
+
function Context(t) {
|
|
231
|
+
this.tryEntries = [{
|
|
232
|
+
tryLoc: "root"
|
|
233
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
234
|
+
}
|
|
235
|
+
function values(e) {
|
|
236
|
+
if (e || "" === e) {
|
|
237
|
+
var r = e[a];
|
|
238
|
+
if (r) return r.call(e);
|
|
239
|
+
if ("function" == typeof e.next) return e;
|
|
240
|
+
if (!isNaN(e.length)) {
|
|
241
|
+
var o = -1,
|
|
242
|
+
i = function next() {
|
|
243
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
244
|
+
return next.value = t, next.done = !0, next;
|
|
245
|
+
};
|
|
246
|
+
return i.next = i;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
250
|
+
}
|
|
251
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
252
|
+
value: GeneratorFunctionPrototype,
|
|
253
|
+
configurable: !0
|
|
254
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
255
|
+
value: GeneratorFunction,
|
|
256
|
+
configurable: !0
|
|
257
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
258
|
+
var e = "function" == typeof t && t.constructor;
|
|
259
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
260
|
+
}, e.mark = function (t) {
|
|
261
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
262
|
+
}, e.awrap = function (t) {
|
|
263
|
+
return {
|
|
264
|
+
__await: t
|
|
265
|
+
};
|
|
266
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
267
|
+
return this;
|
|
268
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
269
|
+
void 0 === i && (i = Promise);
|
|
270
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
271
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
272
|
+
return t.done ? t.value : a.next();
|
|
273
|
+
});
|
|
274
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
275
|
+
return this;
|
|
276
|
+
}), define(g, "toString", function () {
|
|
277
|
+
return "[object Generator]";
|
|
278
|
+
}), e.keys = function (t) {
|
|
279
|
+
var e = Object(t),
|
|
280
|
+
r = [];
|
|
281
|
+
for (var n in e) r.push(n);
|
|
282
|
+
return r.reverse(), function next() {
|
|
283
|
+
for (; r.length;) {
|
|
284
|
+
var t = r.pop();
|
|
285
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
286
|
+
}
|
|
287
|
+
return next.done = !0, next;
|
|
288
|
+
};
|
|
289
|
+
}, e.values = values, Context.prototype = {
|
|
290
|
+
constructor: Context,
|
|
291
|
+
reset: function (e) {
|
|
292
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
293
|
+
},
|
|
294
|
+
stop: function () {
|
|
295
|
+
this.done = !0;
|
|
296
|
+
var t = this.tryEntries[0].completion;
|
|
297
|
+
if ("throw" === t.type) throw t.arg;
|
|
298
|
+
return this.rval;
|
|
299
|
+
},
|
|
300
|
+
dispatchException: function (e) {
|
|
301
|
+
if (this.done) throw e;
|
|
302
|
+
var r = this;
|
|
303
|
+
function handle(n, o) {
|
|
304
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
305
|
+
}
|
|
306
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
307
|
+
var i = this.tryEntries[o],
|
|
308
|
+
a = i.completion;
|
|
309
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
310
|
+
if (i.tryLoc <= this.prev) {
|
|
311
|
+
var c = n.call(i, "catchLoc"),
|
|
312
|
+
u = n.call(i, "finallyLoc");
|
|
313
|
+
if (c && u) {
|
|
314
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
315
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
316
|
+
} else if (c) {
|
|
317
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
318
|
+
} else {
|
|
319
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
320
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
abrupt: function (t, e) {
|
|
326
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
327
|
+
var o = this.tryEntries[r];
|
|
328
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
329
|
+
var i = o;
|
|
330
|
+
break;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
334
|
+
var a = i ? i.completion : {};
|
|
335
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
336
|
+
},
|
|
337
|
+
complete: function (t, e) {
|
|
338
|
+
if ("throw" === t.type) throw t.arg;
|
|
339
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
340
|
+
},
|
|
341
|
+
finish: function (t) {
|
|
342
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
343
|
+
var r = this.tryEntries[e];
|
|
344
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
catch: function (t) {
|
|
348
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
349
|
+
var r = this.tryEntries[e];
|
|
350
|
+
if (r.tryLoc === t) {
|
|
351
|
+
var n = r.completion;
|
|
352
|
+
if ("throw" === n.type) {
|
|
353
|
+
var o = n.arg;
|
|
354
|
+
resetTryEntry(r);
|
|
355
|
+
}
|
|
356
|
+
return o;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
throw new Error("illegal catch attempt");
|
|
360
|
+
},
|
|
361
|
+
delegateYield: function (e, r, n) {
|
|
362
|
+
return this.delegate = {
|
|
363
|
+
iterator: values(e),
|
|
364
|
+
resultName: r,
|
|
365
|
+
nextLoc: n
|
|
366
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
367
|
+
}
|
|
368
|
+
}, e;
|
|
369
|
+
}
|
|
370
|
+
function _toPrimitive(t, r) {
|
|
371
|
+
if ("object" != typeof t || !t) return t;
|
|
372
|
+
var e = t[Symbol.toPrimitive];
|
|
373
|
+
if (void 0 !== e) {
|
|
374
|
+
var i = e.call(t, r || "default");
|
|
375
|
+
if ("object" != typeof i) return i;
|
|
376
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
377
|
+
}
|
|
378
|
+
return ("string" === r ? String : Number)(t);
|
|
379
|
+
}
|
|
380
|
+
function _toPropertyKey(t) {
|
|
381
|
+
var i = _toPrimitive(t, "string");
|
|
382
|
+
return "symbol" == typeof i ? i : String(i);
|
|
383
|
+
}
|
|
384
|
+
function _typeof(o) {
|
|
385
|
+
"@babel/helpers - typeof";
|
|
386
|
+
|
|
387
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
388
|
+
return typeof o;
|
|
389
|
+
} : function (o) {
|
|
390
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
391
|
+
}, _typeof(o);
|
|
392
|
+
}
|
|
393
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
394
|
+
try {
|
|
395
|
+
var info = gen[key](arg);
|
|
396
|
+
var value = info.value;
|
|
397
|
+
} catch (error) {
|
|
398
|
+
reject(error);
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
if (info.done) {
|
|
402
|
+
resolve(value);
|
|
403
|
+
} else {
|
|
404
|
+
Promise.resolve(value).then(_next, _throw);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
function _asyncToGenerator(fn) {
|
|
408
|
+
return function () {
|
|
409
|
+
var self = this,
|
|
410
|
+
args = arguments;
|
|
411
|
+
return new Promise(function (resolve, reject) {
|
|
412
|
+
var gen = fn.apply(self, args);
|
|
413
|
+
function _next(value) {
|
|
414
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
415
|
+
}
|
|
416
|
+
function _throw(err) {
|
|
417
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
418
|
+
}
|
|
419
|
+
_next(undefined);
|
|
420
|
+
});
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
function _classCallCheck(instance, Constructor) {
|
|
424
|
+
if (!(instance instanceof Constructor)) {
|
|
425
|
+
throw new TypeError("Cannot call a class as a function");
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
function _defineProperties(target, props) {
|
|
429
|
+
for (var i = 0; i < props.length; i++) {
|
|
430
|
+
var descriptor = props[i];
|
|
431
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
432
|
+
descriptor.configurable = true;
|
|
433
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
434
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
438
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
439
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
440
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
441
|
+
writable: false
|
|
442
|
+
});
|
|
443
|
+
return Constructor;
|
|
444
|
+
}
|
|
445
|
+
function _defineProperty(obj, key, value) {
|
|
446
|
+
key = _toPropertyKey(key);
|
|
447
|
+
if (key in obj) {
|
|
448
|
+
Object.defineProperty(obj, key, {
|
|
449
|
+
value: value,
|
|
450
|
+
enumerable: true,
|
|
451
|
+
configurable: true,
|
|
452
|
+
writable: true
|
|
453
|
+
});
|
|
454
|
+
} else {
|
|
455
|
+
obj[key] = value;
|
|
456
|
+
}
|
|
457
|
+
return obj;
|
|
458
|
+
}
|
|
459
|
+
function _inherits(subClass, superClass) {
|
|
460
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
461
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
462
|
+
}
|
|
463
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
464
|
+
constructor: {
|
|
465
|
+
value: subClass,
|
|
466
|
+
writable: true,
|
|
467
|
+
configurable: true
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
Object.defineProperty(subClass, "prototype", {
|
|
471
|
+
writable: false
|
|
472
|
+
});
|
|
473
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
474
|
+
}
|
|
475
|
+
function _getPrototypeOf(o) {
|
|
476
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
477
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
478
|
+
};
|
|
479
|
+
return _getPrototypeOf(o);
|
|
480
|
+
}
|
|
481
|
+
function _setPrototypeOf(o, p) {
|
|
482
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
483
|
+
o.__proto__ = p;
|
|
484
|
+
return o;
|
|
485
|
+
};
|
|
486
|
+
return _setPrototypeOf(o, p);
|
|
487
|
+
}
|
|
488
|
+
function _isNativeFunction(fn) {
|
|
489
|
+
try {
|
|
490
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
491
|
+
} catch (e) {
|
|
492
|
+
return typeof fn === "function";
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
function _wrapNativeSuper(Class) {
|
|
496
|
+
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
497
|
+
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
498
|
+
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
499
|
+
if (typeof Class !== "function") {
|
|
500
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
501
|
+
}
|
|
502
|
+
if (typeof _cache !== "undefined") {
|
|
503
|
+
if (_cache.has(Class)) return _cache.get(Class);
|
|
504
|
+
_cache.set(Class, Wrapper);
|
|
505
|
+
}
|
|
506
|
+
function Wrapper() {
|
|
507
|
+
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
|
508
|
+
}
|
|
509
|
+
Wrapper.prototype = Object.create(Class.prototype, {
|
|
510
|
+
constructor: {
|
|
511
|
+
value: Wrapper,
|
|
512
|
+
enumerable: false,
|
|
513
|
+
writable: true,
|
|
514
|
+
configurable: true
|
|
515
|
+
}
|
|
516
|
+
});
|
|
517
|
+
return _setPrototypeOf(Wrapper, Class);
|
|
518
|
+
};
|
|
519
|
+
return _wrapNativeSuper(Class);
|
|
520
|
+
}
|
|
521
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
522
|
+
if (source == null) return {};
|
|
523
|
+
var target = {};
|
|
524
|
+
var sourceKeys = Object.keys(source);
|
|
525
|
+
var key, i;
|
|
526
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
527
|
+
key = sourceKeys[i];
|
|
528
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
529
|
+
target[key] = source[key];
|
|
530
|
+
}
|
|
531
|
+
return target;
|
|
532
|
+
}
|
|
533
|
+
function _objectWithoutProperties(source, excluded) {
|
|
534
|
+
if (source == null) return {};
|
|
535
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
536
|
+
var key, i;
|
|
537
|
+
if (Object.getOwnPropertySymbols) {
|
|
538
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
539
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
540
|
+
key = sourceSymbolKeys[i];
|
|
541
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
542
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
543
|
+
target[key] = source[key];
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
return target;
|
|
547
|
+
}
|
|
548
|
+
function _assertThisInitialized(self) {
|
|
549
|
+
if (self === void 0) {
|
|
550
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
551
|
+
}
|
|
552
|
+
return self;
|
|
553
|
+
}
|
|
554
|
+
function _possibleConstructorReturn(self, call) {
|
|
555
|
+
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
556
|
+
return call;
|
|
557
|
+
} else if (call !== void 0) {
|
|
558
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
559
|
+
}
|
|
560
|
+
return _assertThisInitialized(self);
|
|
561
|
+
}
|
|
562
|
+
function _slicedToArray(arr, i) {
|
|
563
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
564
|
+
}
|
|
565
|
+
function _toConsumableArray(arr) {
|
|
566
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
567
|
+
}
|
|
568
|
+
function _arrayWithoutHoles(arr) {
|
|
569
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
570
|
+
}
|
|
571
|
+
function _arrayWithHoles(arr) {
|
|
572
|
+
if (Array.isArray(arr)) return arr;
|
|
573
|
+
}
|
|
574
|
+
function _iterableToArray(iter) {
|
|
575
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
576
|
+
}
|
|
577
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
578
|
+
if (!o) return;
|
|
579
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
580
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
581
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
582
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
583
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
584
|
+
}
|
|
585
|
+
function _arrayLikeToArray(arr, len) {
|
|
586
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
587
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
588
|
+
return arr2;
|
|
589
|
+
}
|
|
590
|
+
function _nonIterableSpread() {
|
|
591
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
592
|
+
}
|
|
593
|
+
function _nonIterableRest() {
|
|
594
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
595
|
+
}
|
|
596
|
+
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
597
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
598
|
+
if (!it) {
|
|
599
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
600
|
+
if (it) o = it;
|
|
601
|
+
var i = 0;
|
|
602
|
+
var F = function () {};
|
|
603
|
+
return {
|
|
604
|
+
s: F,
|
|
605
|
+
n: function () {
|
|
606
|
+
if (i >= o.length) return {
|
|
607
|
+
done: true
|
|
608
|
+
};
|
|
609
|
+
return {
|
|
610
|
+
done: false,
|
|
611
|
+
value: o[i++]
|
|
612
|
+
};
|
|
613
|
+
},
|
|
614
|
+
e: function (e) {
|
|
615
|
+
throw e;
|
|
616
|
+
},
|
|
617
|
+
f: F
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
621
|
+
}
|
|
622
|
+
var normalCompletion = true,
|
|
623
|
+
didErr = false,
|
|
624
|
+
err;
|
|
625
|
+
return {
|
|
626
|
+
s: function () {
|
|
627
|
+
it = it.call(o);
|
|
628
|
+
},
|
|
629
|
+
n: function () {
|
|
630
|
+
var step = it.next();
|
|
631
|
+
normalCompletion = step.done;
|
|
632
|
+
return step;
|
|
633
|
+
},
|
|
634
|
+
e: function (e) {
|
|
635
|
+
didErr = true;
|
|
636
|
+
err = e;
|
|
637
|
+
},
|
|
638
|
+
f: function () {
|
|
639
|
+
try {
|
|
640
|
+
if (!normalCompletion && it.return != null) it.return();
|
|
641
|
+
} finally {
|
|
642
|
+
if (didErr) throw err;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
function _classPrivateFieldGet(receiver, privateMap) {
|
|
648
|
+
var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get");
|
|
649
|
+
return _classApplyDescriptorGet(receiver, descriptor);
|
|
650
|
+
}
|
|
651
|
+
function _classPrivateFieldSet(receiver, privateMap, value) {
|
|
652
|
+
var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set");
|
|
653
|
+
_classApplyDescriptorSet(receiver, descriptor, value);
|
|
654
|
+
return value;
|
|
655
|
+
}
|
|
656
|
+
function _classExtractFieldDescriptor(receiver, privateMap, action) {
|
|
657
|
+
if (!privateMap.has(receiver)) {
|
|
658
|
+
throw new TypeError("attempted to " + action + " private field on non-instance");
|
|
659
|
+
}
|
|
660
|
+
return privateMap.get(receiver);
|
|
661
|
+
}
|
|
662
|
+
function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {
|
|
663
|
+
_classCheckPrivateStaticAccess(receiver, classConstructor);
|
|
664
|
+
_classCheckPrivateStaticFieldDescriptor(descriptor, "get");
|
|
665
|
+
return _classApplyDescriptorGet(receiver, descriptor);
|
|
666
|
+
}
|
|
667
|
+
function _classApplyDescriptorGet(receiver, descriptor) {
|
|
668
|
+
if (descriptor.get) {
|
|
669
|
+
return descriptor.get.call(receiver);
|
|
670
|
+
}
|
|
671
|
+
return descriptor.value;
|
|
672
|
+
}
|
|
673
|
+
function _classApplyDescriptorSet(receiver, descriptor, value) {
|
|
674
|
+
if (descriptor.set) {
|
|
675
|
+
descriptor.set.call(receiver, value);
|
|
676
|
+
} else {
|
|
677
|
+
if (!descriptor.writable) {
|
|
678
|
+
throw new TypeError("attempted to set read only private field");
|
|
679
|
+
}
|
|
680
|
+
descriptor.value = value;
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
function _classCheckPrivateStaticAccess(receiver, classConstructor) {
|
|
684
|
+
if (receiver !== classConstructor) {
|
|
685
|
+
throw new TypeError("Private static access of wrong provenance");
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
function _classCheckPrivateStaticFieldDescriptor(descriptor, action) {
|
|
689
|
+
if (descriptor === undefined) {
|
|
690
|
+
throw new TypeError("attempted to " + action + " private static field before its declaration");
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
function _classPrivateMethodGet(receiver, privateSet, fn) {
|
|
694
|
+
if (!privateSet.has(receiver)) {
|
|
695
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
696
|
+
}
|
|
697
|
+
return fn;
|
|
698
|
+
}
|
|
699
|
+
function _checkPrivateRedeclaration(obj, privateCollection) {
|
|
700
|
+
if (privateCollection.has(obj)) {
|
|
701
|
+
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
705
|
+
_checkPrivateRedeclaration(obj, privateMap);
|
|
706
|
+
privateMap.set(obj, value);
|
|
707
|
+
}
|
|
708
|
+
function _classPrivateMethodInitSpec(obj, privateSet) {
|
|
709
|
+
_checkPrivateRedeclaration(obj, privateSet);
|
|
710
|
+
privateSet.add(obj);
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
exports._assertThisInitialized = _assertThisInitialized;
|
|
714
|
+
exports._asyncToGenerator = _asyncToGenerator;
|
|
715
|
+
exports._callSuper = _callSuper;
|
|
716
|
+
exports._classCallCheck = _classCallCheck;
|
|
717
|
+
exports._classPrivateFieldGet = _classPrivateFieldGet;
|
|
718
|
+
exports._classPrivateFieldInitSpec = _classPrivateFieldInitSpec;
|
|
719
|
+
exports._classPrivateFieldSet = _classPrivateFieldSet;
|
|
720
|
+
exports._classPrivateMethodGet = _classPrivateMethodGet;
|
|
721
|
+
exports._classPrivateMethodInitSpec = _classPrivateMethodInitSpec;
|
|
722
|
+
exports._classStaticPrivateFieldSpecGet = _classStaticPrivateFieldSpecGet;
|
|
723
|
+
exports._createClass = _createClass;
|
|
724
|
+
exports._createForOfIteratorHelper = _createForOfIteratorHelper;
|
|
725
|
+
exports._defineProperty = _defineProperty;
|
|
726
|
+
exports._inherits = _inherits;
|
|
727
|
+
exports._objectSpread2 = _objectSpread2;
|
|
728
|
+
exports._objectWithoutProperties = _objectWithoutProperties;
|
|
729
|
+
exports._regeneratorRuntime = _regeneratorRuntime;
|
|
730
|
+
exports._slicedToArray = _slicedToArray;
|
|
731
|
+
exports._toConsumableArray = _toConsumableArray;
|
|
732
|
+
exports._typeof = _typeof;
|
|
733
|
+
exports._wrapNativeSuper = _wrapNativeSuper;
|