@valbuild/next 0.60.27 → 0.62.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/client/dist/valbuild-next-client.cjs.dev.js +2 -2
- package/client/dist/valbuild-next-client.cjs.prod.js +2 -2
- package/client/dist/valbuild-next-client.esm.js +2 -2
- package/dist/{ValContext-a73be368.cjs.dev.js → ValContext-8eb2ec77.cjs.dev.js} +13 -13
- package/dist/ValContext-df4a9ae7.cjs.js +7 -0
- package/dist/{ValContext-37ea12ae.cjs.prod.js → ValContext-df4a9ae7.cjs.prod.js} +13 -13
- package/dist/{ValContext-e5293493.esm.js → ValContext-ea0b967a.esm.js} +13 -13
- package/dist/ValNextProvider-06d5c71e.cjs.js +7 -0
- package/dist/{ValNextProvider-676d6cb8.cjs.prod.js → ValNextProvider-06d5c71e.cjs.prod.js} +4 -4
- package/dist/{ValNextProvider-23099a43.esm.js → ValNextProvider-259bf24d.esm.js} +4 -4
- package/dist/{ValNextProvider-ef4fdca6.cjs.dev.js → ValNextProvider-3df6c619.cjs.dev.js} +4 -4
- package/dist/asyncToGenerator-0859ab5c.esm.js +334 -0
- package/dist/asyncToGenerator-3551d940.cjs.prod.js +337 -0
- package/dist/asyncToGenerator-ba66657c.cjs.dev.js +337 -0
- package/dist/declarations/src/external_exempt_from_val_quickjs.d.ts +4 -2
- package/dist/declarations/src/server/initValServer.d.ts +5 -3
- package/dist/valbuild-next.cjs.dev.js +5 -1
- package/dist/valbuild-next.cjs.prod.js +5 -1
- package/dist/valbuild-next.esm.js +2 -2
- package/package.json +5 -5
- package/rsc/dist/valbuild-next-rsc.cjs.dev.js +75 -76
- package/rsc/dist/valbuild-next-rsc.cjs.prod.js +75 -76
- package/rsc/dist/valbuild-next-rsc.esm.js +77 -78
- package/server/dist/valbuild-next-server.cjs.dev.js +12 -344
- package/server/dist/valbuild-next-server.cjs.prod.js +12 -344
- package/server/dist/valbuild-next-server.esm.js +6 -338
- package/dist/ValContext-37ea12ae.cjs.js +0 -7
- package/dist/ValNextProvider-676d6cb8.cjs.js +0 -7
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
function _regeneratorRuntime() {
|
|
2
|
+
_regeneratorRuntime = function () {
|
|
3
|
+
return e;
|
|
4
|
+
};
|
|
5
|
+
var t,
|
|
6
|
+
e = {},
|
|
7
|
+
r = Object.prototype,
|
|
8
|
+
n = r.hasOwnProperty,
|
|
9
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
10
|
+
t[e] = r.value;
|
|
11
|
+
},
|
|
12
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
13
|
+
a = i.iterator || "@@iterator",
|
|
14
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
15
|
+
u = i.toStringTag || "@@toStringTag";
|
|
16
|
+
function define(t, e, r) {
|
|
17
|
+
return Object.defineProperty(t, e, {
|
|
18
|
+
value: r,
|
|
19
|
+
enumerable: !0,
|
|
20
|
+
configurable: !0,
|
|
21
|
+
writable: !0
|
|
22
|
+
}), t[e];
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
define({}, "");
|
|
26
|
+
} catch (t) {
|
|
27
|
+
define = function (t, e, r) {
|
|
28
|
+
return t[e] = r;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function wrap(t, e, r, n) {
|
|
32
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
33
|
+
a = Object.create(i.prototype),
|
|
34
|
+
c = new Context(n || []);
|
|
35
|
+
return o(a, "_invoke", {
|
|
36
|
+
value: makeInvokeMethod(t, r, c)
|
|
37
|
+
}), a;
|
|
38
|
+
}
|
|
39
|
+
function tryCatch(t, e, r) {
|
|
40
|
+
try {
|
|
41
|
+
return {
|
|
42
|
+
type: "normal",
|
|
43
|
+
arg: t.call(e, r)
|
|
44
|
+
};
|
|
45
|
+
} catch (t) {
|
|
46
|
+
return {
|
|
47
|
+
type: "throw",
|
|
48
|
+
arg: t
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
e.wrap = wrap;
|
|
53
|
+
var h = "suspendedStart",
|
|
54
|
+
l = "suspendedYield",
|
|
55
|
+
f = "executing",
|
|
56
|
+
s = "completed",
|
|
57
|
+
y = {};
|
|
58
|
+
function Generator() {}
|
|
59
|
+
function GeneratorFunction() {}
|
|
60
|
+
function GeneratorFunctionPrototype() {}
|
|
61
|
+
var p = {};
|
|
62
|
+
define(p, a, function () {
|
|
63
|
+
return this;
|
|
64
|
+
});
|
|
65
|
+
var d = Object.getPrototypeOf,
|
|
66
|
+
v = d && d(d(values([])));
|
|
67
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
68
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
69
|
+
function defineIteratorMethods(t) {
|
|
70
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
71
|
+
define(t, e, function (t) {
|
|
72
|
+
return this._invoke(e, t);
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function AsyncIterator(t, e) {
|
|
77
|
+
function invoke(r, o, i, a) {
|
|
78
|
+
var c = tryCatch(t[r], t, o);
|
|
79
|
+
if ("throw" !== c.type) {
|
|
80
|
+
var u = c.arg,
|
|
81
|
+
h = u.value;
|
|
82
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
83
|
+
invoke("next", t, i, a);
|
|
84
|
+
}, function (t) {
|
|
85
|
+
invoke("throw", t, i, a);
|
|
86
|
+
}) : e.resolve(h).then(function (t) {
|
|
87
|
+
u.value = t, i(u);
|
|
88
|
+
}, function (t) {
|
|
89
|
+
return invoke("throw", t, i, a);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
a(c.arg);
|
|
93
|
+
}
|
|
94
|
+
var r;
|
|
95
|
+
o(this, "_invoke", {
|
|
96
|
+
value: function (t, n) {
|
|
97
|
+
function callInvokeWithMethodAndArg() {
|
|
98
|
+
return new e(function (e, r) {
|
|
99
|
+
invoke(t, n, e, r);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function makeInvokeMethod(e, r, n) {
|
|
107
|
+
var o = h;
|
|
108
|
+
return function (i, a) {
|
|
109
|
+
if (o === f) throw new Error("Generator is already running");
|
|
110
|
+
if (o === s) {
|
|
111
|
+
if ("throw" === i) throw a;
|
|
112
|
+
return {
|
|
113
|
+
value: t,
|
|
114
|
+
done: !0
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
for (n.method = i, n.arg = a;;) {
|
|
118
|
+
var c = n.delegate;
|
|
119
|
+
if (c) {
|
|
120
|
+
var u = maybeInvokeDelegate(c, n);
|
|
121
|
+
if (u) {
|
|
122
|
+
if (u === y) continue;
|
|
123
|
+
return u;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
127
|
+
if (o === h) throw o = s, n.arg;
|
|
128
|
+
n.dispatchException(n.arg);
|
|
129
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
130
|
+
o = f;
|
|
131
|
+
var p = tryCatch(e, r, n);
|
|
132
|
+
if ("normal" === p.type) {
|
|
133
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
134
|
+
return {
|
|
135
|
+
value: p.arg,
|
|
136
|
+
done: n.done
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function maybeInvokeDelegate(e, r) {
|
|
144
|
+
var n = r.method,
|
|
145
|
+
o = e.iterator[n];
|
|
146
|
+
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;
|
|
147
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
148
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
149
|
+
var a = i.arg;
|
|
150
|
+
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);
|
|
151
|
+
}
|
|
152
|
+
function pushTryEntry(t) {
|
|
153
|
+
var e = {
|
|
154
|
+
tryLoc: t[0]
|
|
155
|
+
};
|
|
156
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
157
|
+
}
|
|
158
|
+
function resetTryEntry(t) {
|
|
159
|
+
var e = t.completion || {};
|
|
160
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
161
|
+
}
|
|
162
|
+
function Context(t) {
|
|
163
|
+
this.tryEntries = [{
|
|
164
|
+
tryLoc: "root"
|
|
165
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
166
|
+
}
|
|
167
|
+
function values(e) {
|
|
168
|
+
if (e || "" === e) {
|
|
169
|
+
var r = e[a];
|
|
170
|
+
if (r) return r.call(e);
|
|
171
|
+
if ("function" == typeof e.next) return e;
|
|
172
|
+
if (!isNaN(e.length)) {
|
|
173
|
+
var o = -1,
|
|
174
|
+
i = function next() {
|
|
175
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
176
|
+
return next.value = t, next.done = !0, next;
|
|
177
|
+
};
|
|
178
|
+
return i.next = i;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
182
|
+
}
|
|
183
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
184
|
+
value: GeneratorFunctionPrototype,
|
|
185
|
+
configurable: !0
|
|
186
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
187
|
+
value: GeneratorFunction,
|
|
188
|
+
configurable: !0
|
|
189
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
190
|
+
var e = "function" == typeof t && t.constructor;
|
|
191
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
192
|
+
}, e.mark = function (t) {
|
|
193
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
194
|
+
}, e.awrap = function (t) {
|
|
195
|
+
return {
|
|
196
|
+
__await: t
|
|
197
|
+
};
|
|
198
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
199
|
+
return this;
|
|
200
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
201
|
+
void 0 === i && (i = Promise);
|
|
202
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
203
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
204
|
+
return t.done ? t.value : a.next();
|
|
205
|
+
});
|
|
206
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
207
|
+
return this;
|
|
208
|
+
}), define(g, "toString", function () {
|
|
209
|
+
return "[object Generator]";
|
|
210
|
+
}), e.keys = function (t) {
|
|
211
|
+
var e = Object(t),
|
|
212
|
+
r = [];
|
|
213
|
+
for (var n in e) r.push(n);
|
|
214
|
+
return r.reverse(), function next() {
|
|
215
|
+
for (; r.length;) {
|
|
216
|
+
var t = r.pop();
|
|
217
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
218
|
+
}
|
|
219
|
+
return next.done = !0, next;
|
|
220
|
+
};
|
|
221
|
+
}, e.values = values, Context.prototype = {
|
|
222
|
+
constructor: Context,
|
|
223
|
+
reset: function (e) {
|
|
224
|
+
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);
|
|
225
|
+
},
|
|
226
|
+
stop: function () {
|
|
227
|
+
this.done = !0;
|
|
228
|
+
var t = this.tryEntries[0].completion;
|
|
229
|
+
if ("throw" === t.type) throw t.arg;
|
|
230
|
+
return this.rval;
|
|
231
|
+
},
|
|
232
|
+
dispatchException: function (e) {
|
|
233
|
+
if (this.done) throw e;
|
|
234
|
+
var r = this;
|
|
235
|
+
function handle(n, o) {
|
|
236
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
237
|
+
}
|
|
238
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
239
|
+
var i = this.tryEntries[o],
|
|
240
|
+
a = i.completion;
|
|
241
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
242
|
+
if (i.tryLoc <= this.prev) {
|
|
243
|
+
var c = n.call(i, "catchLoc"),
|
|
244
|
+
u = n.call(i, "finallyLoc");
|
|
245
|
+
if (c && u) {
|
|
246
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
247
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
248
|
+
} else if (c) {
|
|
249
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
250
|
+
} else {
|
|
251
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
252
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
abrupt: function (t, e) {
|
|
258
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
259
|
+
var o = this.tryEntries[r];
|
|
260
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
261
|
+
var i = o;
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
266
|
+
var a = i ? i.completion : {};
|
|
267
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
268
|
+
},
|
|
269
|
+
complete: function (t, e) {
|
|
270
|
+
if ("throw" === t.type) throw t.arg;
|
|
271
|
+
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;
|
|
272
|
+
},
|
|
273
|
+
finish: function (t) {
|
|
274
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
275
|
+
var r = this.tryEntries[e];
|
|
276
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
catch: function (t) {
|
|
280
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
281
|
+
var r = this.tryEntries[e];
|
|
282
|
+
if (r.tryLoc === t) {
|
|
283
|
+
var n = r.completion;
|
|
284
|
+
if ("throw" === n.type) {
|
|
285
|
+
var o = n.arg;
|
|
286
|
+
resetTryEntry(r);
|
|
287
|
+
}
|
|
288
|
+
return o;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
throw new Error("illegal catch attempt");
|
|
292
|
+
},
|
|
293
|
+
delegateYield: function (e, r, n) {
|
|
294
|
+
return this.delegate = {
|
|
295
|
+
iterator: values(e),
|
|
296
|
+
resultName: r,
|
|
297
|
+
nextLoc: n
|
|
298
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
299
|
+
}
|
|
300
|
+
}, e;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
304
|
+
try {
|
|
305
|
+
var info = gen[key](arg);
|
|
306
|
+
var value = info.value;
|
|
307
|
+
} catch (error) {
|
|
308
|
+
reject(error);
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
if (info.done) {
|
|
312
|
+
resolve(value);
|
|
313
|
+
} else {
|
|
314
|
+
Promise.resolve(value).then(_next, _throw);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
function _asyncToGenerator(fn) {
|
|
318
|
+
return function () {
|
|
319
|
+
var self = this,
|
|
320
|
+
args = arguments;
|
|
321
|
+
return new Promise(function (resolve, reject) {
|
|
322
|
+
var gen = fn.apply(self, args);
|
|
323
|
+
function _next(value) {
|
|
324
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
325
|
+
}
|
|
326
|
+
function _throw(err) {
|
|
327
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
328
|
+
}
|
|
329
|
+
_next(undefined);
|
|
330
|
+
});
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export { _asyncToGenerator as _, _regeneratorRuntime as a };
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _regeneratorRuntime() {
|
|
4
|
+
_regeneratorRuntime = function () {
|
|
5
|
+
return e;
|
|
6
|
+
};
|
|
7
|
+
var t,
|
|
8
|
+
e = {},
|
|
9
|
+
r = Object.prototype,
|
|
10
|
+
n = r.hasOwnProperty,
|
|
11
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
12
|
+
t[e] = r.value;
|
|
13
|
+
},
|
|
14
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
15
|
+
a = i.iterator || "@@iterator",
|
|
16
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
17
|
+
u = i.toStringTag || "@@toStringTag";
|
|
18
|
+
function define(t, e, r) {
|
|
19
|
+
return Object.defineProperty(t, e, {
|
|
20
|
+
value: r,
|
|
21
|
+
enumerable: !0,
|
|
22
|
+
configurable: !0,
|
|
23
|
+
writable: !0
|
|
24
|
+
}), t[e];
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
define({}, "");
|
|
28
|
+
} catch (t) {
|
|
29
|
+
define = function (t, e, r) {
|
|
30
|
+
return t[e] = r;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function wrap(t, e, r, n) {
|
|
34
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
35
|
+
a = Object.create(i.prototype),
|
|
36
|
+
c = new Context(n || []);
|
|
37
|
+
return o(a, "_invoke", {
|
|
38
|
+
value: makeInvokeMethod(t, r, c)
|
|
39
|
+
}), a;
|
|
40
|
+
}
|
|
41
|
+
function tryCatch(t, e, r) {
|
|
42
|
+
try {
|
|
43
|
+
return {
|
|
44
|
+
type: "normal",
|
|
45
|
+
arg: t.call(e, r)
|
|
46
|
+
};
|
|
47
|
+
} catch (t) {
|
|
48
|
+
return {
|
|
49
|
+
type: "throw",
|
|
50
|
+
arg: t
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
e.wrap = wrap;
|
|
55
|
+
var h = "suspendedStart",
|
|
56
|
+
l = "suspendedYield",
|
|
57
|
+
f = "executing",
|
|
58
|
+
s = "completed",
|
|
59
|
+
y = {};
|
|
60
|
+
function Generator() {}
|
|
61
|
+
function GeneratorFunction() {}
|
|
62
|
+
function GeneratorFunctionPrototype() {}
|
|
63
|
+
var p = {};
|
|
64
|
+
define(p, a, function () {
|
|
65
|
+
return this;
|
|
66
|
+
});
|
|
67
|
+
var d = Object.getPrototypeOf,
|
|
68
|
+
v = d && d(d(values([])));
|
|
69
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
70
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
71
|
+
function defineIteratorMethods(t) {
|
|
72
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
73
|
+
define(t, e, function (t) {
|
|
74
|
+
return this._invoke(e, t);
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function AsyncIterator(t, e) {
|
|
79
|
+
function invoke(r, o, i, a) {
|
|
80
|
+
var c = tryCatch(t[r], t, o);
|
|
81
|
+
if ("throw" !== c.type) {
|
|
82
|
+
var u = c.arg,
|
|
83
|
+
h = u.value;
|
|
84
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
85
|
+
invoke("next", t, i, a);
|
|
86
|
+
}, function (t) {
|
|
87
|
+
invoke("throw", t, i, a);
|
|
88
|
+
}) : e.resolve(h).then(function (t) {
|
|
89
|
+
u.value = t, i(u);
|
|
90
|
+
}, function (t) {
|
|
91
|
+
return invoke("throw", t, i, a);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
a(c.arg);
|
|
95
|
+
}
|
|
96
|
+
var r;
|
|
97
|
+
o(this, "_invoke", {
|
|
98
|
+
value: function (t, n) {
|
|
99
|
+
function callInvokeWithMethodAndArg() {
|
|
100
|
+
return new e(function (e, r) {
|
|
101
|
+
invoke(t, n, e, r);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function makeInvokeMethod(e, r, n) {
|
|
109
|
+
var o = h;
|
|
110
|
+
return function (i, a) {
|
|
111
|
+
if (o === f) throw new Error("Generator is already running");
|
|
112
|
+
if (o === s) {
|
|
113
|
+
if ("throw" === i) throw a;
|
|
114
|
+
return {
|
|
115
|
+
value: t,
|
|
116
|
+
done: !0
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
for (n.method = i, n.arg = a;;) {
|
|
120
|
+
var c = n.delegate;
|
|
121
|
+
if (c) {
|
|
122
|
+
var u = maybeInvokeDelegate(c, n);
|
|
123
|
+
if (u) {
|
|
124
|
+
if (u === y) continue;
|
|
125
|
+
return u;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
129
|
+
if (o === h) throw o = s, n.arg;
|
|
130
|
+
n.dispatchException(n.arg);
|
|
131
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
132
|
+
o = f;
|
|
133
|
+
var p = tryCatch(e, r, n);
|
|
134
|
+
if ("normal" === p.type) {
|
|
135
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
136
|
+
return {
|
|
137
|
+
value: p.arg,
|
|
138
|
+
done: n.done
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function maybeInvokeDelegate(e, r) {
|
|
146
|
+
var n = r.method,
|
|
147
|
+
o = e.iterator[n];
|
|
148
|
+
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;
|
|
149
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
150
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
151
|
+
var a = i.arg;
|
|
152
|
+
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);
|
|
153
|
+
}
|
|
154
|
+
function pushTryEntry(t) {
|
|
155
|
+
var e = {
|
|
156
|
+
tryLoc: t[0]
|
|
157
|
+
};
|
|
158
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
159
|
+
}
|
|
160
|
+
function resetTryEntry(t) {
|
|
161
|
+
var e = t.completion || {};
|
|
162
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
163
|
+
}
|
|
164
|
+
function Context(t) {
|
|
165
|
+
this.tryEntries = [{
|
|
166
|
+
tryLoc: "root"
|
|
167
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
168
|
+
}
|
|
169
|
+
function values(e) {
|
|
170
|
+
if (e || "" === e) {
|
|
171
|
+
var r = e[a];
|
|
172
|
+
if (r) return r.call(e);
|
|
173
|
+
if ("function" == typeof e.next) return e;
|
|
174
|
+
if (!isNaN(e.length)) {
|
|
175
|
+
var o = -1,
|
|
176
|
+
i = function next() {
|
|
177
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
178
|
+
return next.value = t, next.done = !0, next;
|
|
179
|
+
};
|
|
180
|
+
return i.next = i;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
184
|
+
}
|
|
185
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
186
|
+
value: GeneratorFunctionPrototype,
|
|
187
|
+
configurable: !0
|
|
188
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
189
|
+
value: GeneratorFunction,
|
|
190
|
+
configurable: !0
|
|
191
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
192
|
+
var e = "function" == typeof t && t.constructor;
|
|
193
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
194
|
+
}, e.mark = function (t) {
|
|
195
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
196
|
+
}, e.awrap = function (t) {
|
|
197
|
+
return {
|
|
198
|
+
__await: t
|
|
199
|
+
};
|
|
200
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
201
|
+
return this;
|
|
202
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
203
|
+
void 0 === i && (i = Promise);
|
|
204
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
205
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
206
|
+
return t.done ? t.value : a.next();
|
|
207
|
+
});
|
|
208
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
209
|
+
return this;
|
|
210
|
+
}), define(g, "toString", function () {
|
|
211
|
+
return "[object Generator]";
|
|
212
|
+
}), e.keys = function (t) {
|
|
213
|
+
var e = Object(t),
|
|
214
|
+
r = [];
|
|
215
|
+
for (var n in e) r.push(n);
|
|
216
|
+
return r.reverse(), function next() {
|
|
217
|
+
for (; r.length;) {
|
|
218
|
+
var t = r.pop();
|
|
219
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
220
|
+
}
|
|
221
|
+
return next.done = !0, next;
|
|
222
|
+
};
|
|
223
|
+
}, e.values = values, Context.prototype = {
|
|
224
|
+
constructor: Context,
|
|
225
|
+
reset: function (e) {
|
|
226
|
+
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);
|
|
227
|
+
},
|
|
228
|
+
stop: function () {
|
|
229
|
+
this.done = !0;
|
|
230
|
+
var t = this.tryEntries[0].completion;
|
|
231
|
+
if ("throw" === t.type) throw t.arg;
|
|
232
|
+
return this.rval;
|
|
233
|
+
},
|
|
234
|
+
dispatchException: function (e) {
|
|
235
|
+
if (this.done) throw e;
|
|
236
|
+
var r = this;
|
|
237
|
+
function handle(n, o) {
|
|
238
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
239
|
+
}
|
|
240
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
241
|
+
var i = this.tryEntries[o],
|
|
242
|
+
a = i.completion;
|
|
243
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
244
|
+
if (i.tryLoc <= this.prev) {
|
|
245
|
+
var c = n.call(i, "catchLoc"),
|
|
246
|
+
u = n.call(i, "finallyLoc");
|
|
247
|
+
if (c && u) {
|
|
248
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
249
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
250
|
+
} else if (c) {
|
|
251
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
252
|
+
} else {
|
|
253
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
254
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
abrupt: function (t, e) {
|
|
260
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
261
|
+
var o = this.tryEntries[r];
|
|
262
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
263
|
+
var i = o;
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
268
|
+
var a = i ? i.completion : {};
|
|
269
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
270
|
+
},
|
|
271
|
+
complete: function (t, e) {
|
|
272
|
+
if ("throw" === t.type) throw t.arg;
|
|
273
|
+
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;
|
|
274
|
+
},
|
|
275
|
+
finish: function (t) {
|
|
276
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
277
|
+
var r = this.tryEntries[e];
|
|
278
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
catch: function (t) {
|
|
282
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
283
|
+
var r = this.tryEntries[e];
|
|
284
|
+
if (r.tryLoc === t) {
|
|
285
|
+
var n = r.completion;
|
|
286
|
+
if ("throw" === n.type) {
|
|
287
|
+
var o = n.arg;
|
|
288
|
+
resetTryEntry(r);
|
|
289
|
+
}
|
|
290
|
+
return o;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
throw new Error("illegal catch attempt");
|
|
294
|
+
},
|
|
295
|
+
delegateYield: function (e, r, n) {
|
|
296
|
+
return this.delegate = {
|
|
297
|
+
iterator: values(e),
|
|
298
|
+
resultName: r,
|
|
299
|
+
nextLoc: n
|
|
300
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
301
|
+
}
|
|
302
|
+
}, e;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
306
|
+
try {
|
|
307
|
+
var info = gen[key](arg);
|
|
308
|
+
var value = info.value;
|
|
309
|
+
} catch (error) {
|
|
310
|
+
reject(error);
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
if (info.done) {
|
|
314
|
+
resolve(value);
|
|
315
|
+
} else {
|
|
316
|
+
Promise.resolve(value).then(_next, _throw);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
function _asyncToGenerator(fn) {
|
|
320
|
+
return function () {
|
|
321
|
+
var self = this,
|
|
322
|
+
args = arguments;
|
|
323
|
+
return new Promise(function (resolve, reject) {
|
|
324
|
+
var gen = fn.apply(self, args);
|
|
325
|
+
function _next(value) {
|
|
326
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
327
|
+
}
|
|
328
|
+
function _throw(err) {
|
|
329
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
330
|
+
}
|
|
331
|
+
_next(undefined);
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
exports._asyncToGenerator = _asyncToGenerator;
|
|
337
|
+
exports._regeneratorRuntime = _regeneratorRuntime;
|