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