@plasmicpkgs/plasmic-query 0.0.178 → 0.0.179

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