@plasmicpkgs/commerce 0.0.5 → 0.0.6

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.
@@ -169,201 +169,198 @@ function createCommonjsModule(fn, module) {
169
169
  return module = { exports: {} }, fn(module, module.exports), module.exports;
170
170
  }
171
171
 
172
- var runtime_1 = createCommonjsModule(function (module) {
173
- /**
174
- * Copyright (c) 2014-present, Facebook, Inc.
175
- *
176
- * This source code is licensed under the MIT license found in the
177
- * LICENSE file in the root directory of this source tree.
178
- */
179
-
180
- var runtime = (function (exports) {
181
-
182
- var Op = Object.prototype;
183
- var hasOwn = Op.hasOwnProperty;
184
- var undefined$1; // More compressible than void 0.
185
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
186
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
187
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
188
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
189
-
190
- function define(obj, key, value) {
191
- Object.defineProperty(obj, key, {
192
- value: value,
193
- enumerable: true,
194
- configurable: true,
195
- writable: true
196
- });
197
- return obj[key];
198
- }
199
- try {
200
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
201
- define({}, "");
202
- } catch (err) {
203
- define = function(obj, key, value) {
204
- return obj[key] = value;
205
- };
206
- }
207
-
208
- function wrap(innerFn, outerFn, self, tryLocsList) {
209
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
210
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
211
- var generator = Object.create(protoGenerator.prototype);
212
- var context = new Context(tryLocsList || []);
213
-
214
- // The ._invoke method unifies the implementations of the .next,
215
- // .throw, and .return methods.
216
- generator._invoke = makeInvokeMethod(innerFn, self, context);
172
+ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
173
+ /**
174
+ * Copyright (c) 2014-present, Facebook, Inc.
175
+ *
176
+ * This source code is licensed under the MIT license found in the
177
+ * LICENSE file in the root directory of this source tree.
178
+ */
179
+ var runtime = function (exports) {
180
+
181
+ var Op = Object.prototype;
182
+ var hasOwn = Op.hasOwnProperty;
183
+ var undefined$1; // More compressible than void 0.
184
+
185
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
186
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
187
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
188
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
189
+
190
+ function define(obj, key, value) {
191
+ Object.defineProperty(obj, key, {
192
+ value: value,
193
+ enumerable: true,
194
+ configurable: true,
195
+ writable: true
196
+ });
197
+ return obj[key];
198
+ }
217
199
 
218
- return generator;
219
- }
220
- exports.wrap = wrap;
221
-
222
- // Try/catch helper to minimize deoptimizations. Returns a completion
223
- // record like context.tryEntries[i].completion. This interface could
224
- // have been (and was previously) designed to take a closure to be
225
- // invoked without arguments, but in all the cases we care about we
226
- // already have an existing method we want to call, so there's no need
227
- // to create a new function object. We can even get away with assuming
228
- // the method takes exactly one argument, since that happens to be true
229
- // in every case, so we don't have to touch the arguments object. The
230
- // only additional allocation required is the completion record, which
231
- // has a stable shape and so hopefully should be cheap to allocate.
232
- function tryCatch(fn, obj, arg) {
233
200
  try {
234
- return { type: "normal", arg: fn.call(obj, arg) };
201
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
202
+ define({}, "");
235
203
  } catch (err) {
236
- return { type: "throw", arg: err };
204
+ define = function define(obj, key, value) {
205
+ return obj[key] = value;
206
+ };
237
207
  }
238
- }
239
208
 
240
- var GenStateSuspendedStart = "suspendedStart";
241
- var GenStateSuspendedYield = "suspendedYield";
242
- var GenStateExecuting = "executing";
243
- var GenStateCompleted = "completed";
244
-
245
- // Returning this object from the innerFn has the same effect as
246
- // breaking out of the dispatch switch statement.
247
- var ContinueSentinel = {};
248
-
249
- // Dummy constructor functions that we use as the .constructor and
250
- // .constructor.prototype properties for functions that return Generator
251
- // objects. For full spec compliance, you may wish to configure your
252
- // minifier not to mangle the names of these two functions.
253
- function Generator() {}
254
- function GeneratorFunction() {}
255
- function GeneratorFunctionPrototype() {}
256
-
257
- // This is a polyfill for %IteratorPrototype% for environments that
258
- // don't natively support it.
259
- var IteratorPrototype = {};
260
- define(IteratorPrototype, iteratorSymbol, function () {
261
- return this;
262
- });
209
+ function wrap(innerFn, outerFn, self, tryLocsList) {
210
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
211
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
212
+ var generator = Object.create(protoGenerator.prototype);
213
+ var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
214
+ // .throw, and .return methods.
263
215
 
264
- var getProto = Object.getPrototypeOf;
265
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
266
- if (NativeIteratorPrototype &&
267
- NativeIteratorPrototype !== Op &&
268
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
269
- // This environment has a native %IteratorPrototype%; use it instead
270
- // of the polyfill.
271
- IteratorPrototype = NativeIteratorPrototype;
272
- }
216
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
217
+ return generator;
218
+ }
273
219
 
274
- var Gp = GeneratorFunctionPrototype.prototype =
275
- Generator.prototype = Object.create(IteratorPrototype);
276
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
277
- define(Gp, "constructor", GeneratorFunctionPrototype);
278
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
279
- GeneratorFunction.displayName = define(
280
- GeneratorFunctionPrototype,
281
- toStringTagSymbol,
282
- "GeneratorFunction"
283
- );
284
-
285
- // Helper for defining the .next, .throw, and .return methods of the
286
- // Iterator interface in terms of a single ._invoke method.
287
- function defineIteratorMethods(prototype) {
288
- ["next", "throw", "return"].forEach(function(method) {
289
- define(prototype, method, function(arg) {
290
- return this._invoke(method, arg);
291
- });
292
- });
293
- }
220
+ exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
221
+ // record like context.tryEntries[i].completion. This interface could
222
+ // have been (and was previously) designed to take a closure to be
223
+ // invoked without arguments, but in all the cases we care about we
224
+ // already have an existing method we want to call, so there's no need
225
+ // to create a new function object. We can even get away with assuming
226
+ // the method takes exactly one argument, since that happens to be true
227
+ // in every case, so we don't have to touch the arguments object. The
228
+ // only additional allocation required is the completion record, which
229
+ // has a stable shape and so hopefully should be cheap to allocate.
230
+
231
+ function tryCatch(fn, obj, arg) {
232
+ try {
233
+ return {
234
+ type: "normal",
235
+ arg: fn.call(obj, arg)
236
+ };
237
+ } catch (err) {
238
+ return {
239
+ type: "throw",
240
+ arg: err
241
+ };
242
+ }
243
+ }
294
244
 
295
- exports.isGeneratorFunction = function(genFun) {
296
- var ctor = typeof genFun === "function" && genFun.constructor;
297
- return ctor
298
- ? ctor === GeneratorFunction ||
299
- // For the native GeneratorFunction constructor, the best we can
300
- // do is to check its .name property.
301
- (ctor.displayName || ctor.name) === "GeneratorFunction"
302
- : false;
303
- };
245
+ var GenStateSuspendedStart = "suspendedStart";
246
+ var GenStateSuspendedYield = "suspendedYield";
247
+ var GenStateExecuting = "executing";
248
+ var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
249
+ // breaking out of the dispatch switch statement.
250
+
251
+ var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
252
+ // .constructor.prototype properties for functions that return Generator
253
+ // objects. For full spec compliance, you may wish to configure your
254
+ // minifier not to mangle the names of these two functions.
255
+
256
+ function Generator() {}
257
+
258
+ function GeneratorFunction() {}
259
+
260
+ function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
261
+ // don't natively support it.
262
+
263
+
264
+ var IteratorPrototype = {};
265
+
266
+ IteratorPrototype[iteratorSymbol] = function () {
267
+ return this;
268
+ };
269
+
270
+ var getProto = Object.getPrototypeOf;
271
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
304
272
 
305
- exports.mark = function(genFun) {
306
- if (Object.setPrototypeOf) {
307
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
308
- } else {
309
- genFun.__proto__ = GeneratorFunctionPrototype;
310
- define(genFun, toStringTagSymbol, "GeneratorFunction");
273
+ if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
274
+ // This environment has a native %IteratorPrototype%; use it instead
275
+ // of the polyfill.
276
+ IteratorPrototype = NativeIteratorPrototype;
311
277
  }
312
- genFun.prototype = Object.create(Gp);
313
- return genFun;
314
- };
315
278
 
316
- // Within the body of any async function, `await x` is transformed to
317
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
318
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
319
- // meant to be awaited.
320
- exports.awrap = function(arg) {
321
- return { __await: arg };
322
- };
279
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
280
+ GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
281
+ GeneratorFunctionPrototype.constructor = GeneratorFunction;
282
+ GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
283
+ // Iterator interface in terms of a single ._invoke method.
323
284
 
324
- function AsyncIterator(generator, PromiseImpl) {
325
- function invoke(method, arg, resolve, reject) {
326
- var record = tryCatch(generator[method], generator, arg);
327
- if (record.type === "throw") {
328
- reject(record.arg);
285
+ function defineIteratorMethods(prototype) {
286
+ ["next", "throw", "return"].forEach(function (method) {
287
+ define(prototype, method, function (arg) {
288
+ return this._invoke(method, arg);
289
+ });
290
+ });
291
+ }
292
+
293
+ exports.isGeneratorFunction = function (genFun) {
294
+ var ctor = typeof genFun === "function" && genFun.constructor;
295
+ return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
296
+ // do is to check its .name property.
297
+ (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
298
+ };
299
+
300
+ exports.mark = function (genFun) {
301
+ if (Object.setPrototypeOf) {
302
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
329
303
  } else {
330
- var result = record.arg;
331
- var value = result.value;
332
- if (value &&
333
- typeof value === "object" &&
334
- hasOwn.call(value, "__await")) {
335
- return PromiseImpl.resolve(value.__await).then(function(value) {
336
- invoke("next", value, resolve, reject);
337
- }, function(err) {
338
- invoke("throw", err, resolve, reject);
304
+ genFun.__proto__ = GeneratorFunctionPrototype;
305
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
306
+ }
307
+
308
+ genFun.prototype = Object.create(Gp);
309
+ return genFun;
310
+ }; // Within the body of any async function, `await x` is transformed to
311
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
312
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
313
+ // meant to be awaited.
314
+
315
+
316
+ exports.awrap = function (arg) {
317
+ return {
318
+ __await: arg
319
+ };
320
+ };
321
+
322
+ function AsyncIterator(generator, PromiseImpl) {
323
+ function invoke(method, arg, resolve, reject) {
324
+ var record = tryCatch(generator[method], generator, arg);
325
+
326
+ if (record.type === "throw") {
327
+ reject(record.arg);
328
+ } else {
329
+ var result = record.arg;
330
+ var value = result.value;
331
+
332
+ if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
333
+ return PromiseImpl.resolve(value.__await).then(function (value) {
334
+ invoke("next", value, resolve, reject);
335
+ }, function (err) {
336
+ invoke("throw", err, resolve, reject);
337
+ });
338
+ }
339
+
340
+ return PromiseImpl.resolve(value).then(function (unwrapped) {
341
+ // When a yielded Promise is resolved, its final value becomes
342
+ // the .value of the Promise<{value,done}> result for the
343
+ // current iteration.
344
+ result.value = unwrapped;
345
+ resolve(result);
346
+ }, function (error) {
347
+ // If a rejected Promise was yielded, throw the rejection back
348
+ // into the async generator function so it can be handled there.
349
+ return invoke("throw", error, resolve, reject);
339
350
  });
340
351
  }
341
-
342
- return PromiseImpl.resolve(value).then(function(unwrapped) {
343
- // When a yielded Promise is resolved, its final value becomes
344
- // the .value of the Promise<{value,done}> result for the
345
- // current iteration.
346
- result.value = unwrapped;
347
- resolve(result);
348
- }, function(error) {
349
- // If a rejected Promise was yielded, throw the rejection back
350
- // into the async generator function so it can be handled there.
351
- return invoke("throw", error, resolve, reject);
352
- });
353
352
  }
354
- }
355
353
 
356
- var previousPromise;
354
+ var previousPromise;
357
355
 
358
- function enqueue(method, arg) {
359
- function callInvokeWithMethodAndArg() {
360
- return new PromiseImpl(function(resolve, reject) {
361
- invoke(method, arg, resolve, reject);
362
- });
363
- }
356
+ function enqueue(method, arg) {
357
+ function callInvokeWithMethodAndArg() {
358
+ return new PromiseImpl(function (resolve, reject) {
359
+ invoke(method, arg, resolve, reject);
360
+ });
361
+ }
364
362
 
365
- return previousPromise =
366
- // If enqueue has been called before, then we want to wait until
363
+ return previousPromise = // If enqueue has been called before, then we want to wait until
367
364
  // all previous Promises have been resolved before calling invoke,
368
365
  // so that results are always delivered in the correct order. If
369
366
  // enqueue has not been called before, then it is important to
@@ -375,554 +372,525 @@ var runtime = (function (exports) {
375
372
  // execute code before the first await. Since we implement simple
376
373
  // async functions in terms of async generators, it is especially
377
374
  // important to get this right, even though it requires care.
378
- previousPromise ? previousPromise.then(
379
- callInvokeWithMethodAndArg,
380
- // Avoid propagating failures to Promises returned by later
381
- // invocations of the iterator.
382
- callInvokeWithMethodAndArg
383
- ) : callInvokeWithMethodAndArg();
375
+ previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
376
+ // invocations of the iterator.
377
+ callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
378
+ } // Define the unified helper method that is used to implement .next,
379
+ // .throw, and .return (see defineIteratorMethods).
380
+
381
+
382
+ this._invoke = enqueue;
384
383
  }
385
384
 
386
- // Define the unified helper method that is used to implement .next,
387
- // .throw, and .return (see defineIteratorMethods).
388
- this._invoke = enqueue;
389
- }
385
+ defineIteratorMethods(AsyncIterator.prototype);
390
386
 
391
- defineIteratorMethods(AsyncIterator.prototype);
392
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
393
- return this;
394
- });
395
- exports.AsyncIterator = AsyncIterator;
396
-
397
- // Note that simple async functions are implemented on top of
398
- // AsyncIterator objects; they just return a Promise for the value of
399
- // the final result produced by the iterator.
400
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
401
- if (PromiseImpl === void 0) PromiseImpl = Promise;
402
-
403
- var iter = new AsyncIterator(
404
- wrap(innerFn, outerFn, self, tryLocsList),
405
- PromiseImpl
406
- );
407
-
408
- return exports.isGeneratorFunction(outerFn)
409
- ? iter // If outerFn is a generator, return the full iterator.
410
- : iter.next().then(function(result) {
411
- return result.done ? result.value : iter.next();
412
- });
413
- };
387
+ AsyncIterator.prototype[asyncIteratorSymbol] = function () {
388
+ return this;
389
+ };
414
390
 
415
- function makeInvokeMethod(innerFn, self, context) {
416
- var state = GenStateSuspendedStart;
391
+ exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
392
+ // AsyncIterator objects; they just return a Promise for the value of
393
+ // the final result produced by the iterator.
417
394
 
418
- return function invoke(method, arg) {
419
- if (state === GenStateExecuting) {
420
- throw new Error("Generator is already running");
421
- }
395
+ exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
396
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
397
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
398
+ return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
399
+ : iter.next().then(function (result) {
400
+ return result.done ? result.value : iter.next();
401
+ });
402
+ };
422
403
 
423
- if (state === GenStateCompleted) {
424
- if (method === "throw") {
425
- throw arg;
404
+ function makeInvokeMethod(innerFn, self, context) {
405
+ var state = GenStateSuspendedStart;
406
+ return function invoke(method, arg) {
407
+ if (state === GenStateExecuting) {
408
+ throw new Error("Generator is already running");
426
409
  }
427
410
 
428
- // Be forgiving, per 25.3.3.3.3 of the spec:
429
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
430
- return doneResult();
431
- }
411
+ if (state === GenStateCompleted) {
412
+ if (method === "throw") {
413
+ throw arg;
414
+ } // Be forgiving, per 25.3.3.3.3 of the spec:
415
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
432
416
 
433
- context.method = method;
434
- context.arg = arg;
435
417
 
436
- while (true) {
437
- var delegate = context.delegate;
438
- if (delegate) {
439
- var delegateResult = maybeInvokeDelegate(delegate, context);
440
- if (delegateResult) {
441
- if (delegateResult === ContinueSentinel) continue;
442
- return delegateResult;
443
- }
418
+ return doneResult();
444
419
  }
445
420
 
446
- if (context.method === "next") {
447
- // Setting context._sent for legacy support of Babel's
448
- // function.sent implementation.
449
- context.sent = context._sent = context.arg;
421
+ context.method = method;
422
+ context.arg = arg;
423
+
424
+ while (true) {
425
+ var delegate = context.delegate;
450
426
 
451
- } else if (context.method === "throw") {
452
- if (state === GenStateSuspendedStart) {
453
- state = GenStateCompleted;
454
- throw context.arg;
427
+ if (delegate) {
428
+ var delegateResult = maybeInvokeDelegate(delegate, context);
429
+
430
+ if (delegateResult) {
431
+ if (delegateResult === ContinueSentinel) continue;
432
+ return delegateResult;
433
+ }
455
434
  }
456
435
 
457
- context.dispatchException(context.arg);
436
+ if (context.method === "next") {
437
+ // Setting context._sent for legacy support of Babel's
438
+ // function.sent implementation.
439
+ context.sent = context._sent = context.arg;
440
+ } else if (context.method === "throw") {
441
+ if (state === GenStateSuspendedStart) {
442
+ state = GenStateCompleted;
443
+ throw context.arg;
444
+ }
458
445
 
459
- } else if (context.method === "return") {
460
- context.abrupt("return", context.arg);
461
- }
446
+ context.dispatchException(context.arg);
447
+ } else if (context.method === "return") {
448
+ context.abrupt("return", context.arg);
449
+ }
462
450
 
463
- state = GenStateExecuting;
451
+ state = GenStateExecuting;
452
+ var record = tryCatch(innerFn, self, context);
464
453
 
465
- var record = tryCatch(innerFn, self, context);
466
- if (record.type === "normal") {
467
- // If an exception is thrown from innerFn, we leave state ===
468
- // GenStateExecuting and loop back for another invocation.
469
- state = context.done
470
- ? GenStateCompleted
471
- : GenStateSuspendedYield;
454
+ if (record.type === "normal") {
455
+ // If an exception is thrown from innerFn, we leave state ===
456
+ // GenStateExecuting and loop back for another invocation.
457
+ state = context.done ? GenStateCompleted : GenStateSuspendedYield;
472
458
 
473
- if (record.arg === ContinueSentinel) {
474
- continue;
475
- }
459
+ if (record.arg === ContinueSentinel) {
460
+ continue;
461
+ }
476
462
 
477
- return {
478
- value: record.arg,
479
- done: context.done
480
- };
463
+ return {
464
+ value: record.arg,
465
+ done: context.done
466
+ };
467
+ } else if (record.type === "throw") {
468
+ state = GenStateCompleted; // Dispatch the exception by looping back around to the
469
+ // context.dispatchException(context.arg) call above.
470
+
471
+ context.method = "throw";
472
+ context.arg = record.arg;
473
+ }
474
+ }
475
+ };
476
+ } // Call delegate.iterator[context.method](context.arg) and handle the
477
+ // result, either by returning a { value, done } result from the
478
+ // delegate iterator, or by modifying context.method and context.arg,
479
+ // setting context.delegate to null, and returning the ContinueSentinel.
480
+
481
+
482
+ function maybeInvokeDelegate(delegate, context) {
483
+ var method = delegate.iterator[context.method];
484
+
485
+ if (method === undefined$1) {
486
+ // A .throw or .return when the delegate iterator has no .throw
487
+ // method always terminates the yield* loop.
488
+ context.delegate = null;
489
+
490
+ if (context.method === "throw") {
491
+ // Note: ["return"] must be used for ES3 parsing compatibility.
492
+ if (delegate.iterator["return"]) {
493
+ // If the delegate iterator has a return method, give it a
494
+ // chance to clean up.
495
+ context.method = "return";
496
+ context.arg = undefined$1;
497
+ maybeInvokeDelegate(delegate, context);
498
+
499
+ if (context.method === "throw") {
500
+ // If maybeInvokeDelegate(context) changed context.method from
501
+ // "return" to "throw", let that override the TypeError below.
502
+ return ContinueSentinel;
503
+ }
504
+ }
481
505
 
482
- } else if (record.type === "throw") {
483
- state = GenStateCompleted;
484
- // Dispatch the exception by looping back around to the
485
- // context.dispatchException(context.arg) call above.
486
506
  context.method = "throw";
487
- context.arg = record.arg;
507
+ context.arg = new TypeError("The iterator does not provide a 'throw' method");
488
508
  }
509
+
510
+ return ContinueSentinel;
489
511
  }
490
- };
491
- }
492
512
 
493
- // Call delegate.iterator[context.method](context.arg) and handle the
494
- // result, either by returning a { value, done } result from the
495
- // delegate iterator, or by modifying context.method and context.arg,
496
- // setting context.delegate to null, and returning the ContinueSentinel.
497
- function maybeInvokeDelegate(delegate, context) {
498
- var method = delegate.iterator[context.method];
499
- if (method === undefined$1) {
500
- // A .throw or .return when the delegate iterator has no .throw
501
- // method always terminates the yield* loop.
502
- context.delegate = null;
513
+ var record = tryCatch(method, delegate.iterator, context.arg);
503
514
 
504
- if (context.method === "throw") {
505
- // Note: ["return"] must be used for ES3 parsing compatibility.
506
- if (delegate.iterator["return"]) {
507
- // If the delegate iterator has a return method, give it a
508
- // chance to clean up.
509
- context.method = "return";
510
- context.arg = undefined$1;
511
- maybeInvokeDelegate(delegate, context);
515
+ if (record.type === "throw") {
516
+ context.method = "throw";
517
+ context.arg = record.arg;
518
+ context.delegate = null;
519
+ return ContinueSentinel;
520
+ }
512
521
 
513
- if (context.method === "throw") {
514
- // If maybeInvokeDelegate(context) changed context.method from
515
- // "return" to "throw", let that override the TypeError below.
516
- return ContinueSentinel;
517
- }
518
- }
522
+ var info = record.arg;
519
523
 
524
+ if (!info) {
520
525
  context.method = "throw";
521
- context.arg = new TypeError(
522
- "The iterator does not provide a 'throw' method");
526
+ context.arg = new TypeError("iterator result is not an object");
527
+ context.delegate = null;
528
+ return ContinueSentinel;
523
529
  }
524
530
 
525
- return ContinueSentinel;
526
- }
531
+ if (info.done) {
532
+ // Assign the result of the finished delegate to the temporary
533
+ // variable specified by delegate.resultName (see delegateYield).
534
+ context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
527
535
 
528
- var record = tryCatch(method, delegate.iterator, context.arg);
536
+ context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
537
+ // exception, let the outer generator proceed normally. If
538
+ // context.method was "next", forget context.arg since it has been
539
+ // "consumed" by the delegate iterator. If context.method was
540
+ // "return", allow the original .return call to continue in the
541
+ // outer generator.
529
542
 
530
- if (record.type === "throw") {
531
- context.method = "throw";
532
- context.arg = record.arg;
533
- context.delegate = null;
534
- return ContinueSentinel;
535
- }
543
+ if (context.method !== "return") {
544
+ context.method = "next";
545
+ context.arg = undefined$1;
546
+ }
547
+ } else {
548
+ // Re-yield the result returned by the delegate method.
549
+ return info;
550
+ } // The delegate iterator is finished, so forget it and continue with
551
+ // the outer generator.
536
552
 
537
- var info = record.arg;
538
553
 
539
- if (! info) {
540
- context.method = "throw";
541
- context.arg = new TypeError("iterator result is not an object");
542
554
  context.delegate = null;
543
555
  return ContinueSentinel;
544
- }
556
+ } // Define Generator.prototype.{next,throw,return} in terms of the
557
+ // unified ._invoke helper method.
545
558
 
546
- if (info.done) {
547
- // Assign the result of the finished delegate to the temporary
548
- // variable specified by delegate.resultName (see delegateYield).
549
- context[delegate.resultName] = info.value;
550
-
551
- // Resume execution at the desired location (see delegateYield).
552
- context.next = delegate.nextLoc;
553
-
554
- // If context.method was "throw" but the delegate handled the
555
- // exception, let the outer generator proceed normally. If
556
- // context.method was "next", forget context.arg since it has been
557
- // "consumed" by the delegate iterator. If context.method was
558
- // "return", allow the original .return call to continue in the
559
- // outer generator.
560
- if (context.method !== "return") {
561
- context.method = "next";
562
- context.arg = undefined$1;
563
- }
564
-
565
- } else {
566
- // Re-yield the result returned by the delegate method.
567
- return info;
568
- }
569
559
 
570
- // The delegate iterator is finished, so forget it and continue with
571
- // the outer generator.
572
- context.delegate = null;
573
- return ContinueSentinel;
574
- }
560
+ defineIteratorMethods(Gp);
561
+ define(Gp, toStringTagSymbol, "Generator"); // A Generator should always return itself as the iterator object when the
562
+ // @@iterator function is called on it. Some browsers' implementations of the
563
+ // iterator prototype chain incorrectly implement this, causing the Generator
564
+ // object to not be returned from this call. This ensures that doesn't happen.
565
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
575
566
 
576
- // Define Generator.prototype.{next,throw,return} in terms of the
577
- // unified ._invoke helper method.
578
- defineIteratorMethods(Gp);
567
+ Gp[iteratorSymbol] = function () {
568
+ return this;
569
+ };
579
570
 
580
- define(Gp, toStringTagSymbol, "Generator");
571
+ Gp.toString = function () {
572
+ return "[object Generator]";
573
+ };
581
574
 
582
- // A Generator should always return itself as the iterator object when the
583
- // @@iterator function is called on it. Some browsers' implementations of the
584
- // iterator prototype chain incorrectly implement this, causing the Generator
585
- // object to not be returned from this call. This ensures that doesn't happen.
586
- // See https://github.com/facebook/regenerator/issues/274 for more details.
587
- define(Gp, iteratorSymbol, function() {
588
- return this;
589
- });
575
+ function pushTryEntry(locs) {
576
+ var entry = {
577
+ tryLoc: locs[0]
578
+ };
590
579
 
591
- define(Gp, "toString", function() {
592
- return "[object Generator]";
593
- });
580
+ if (1 in locs) {
581
+ entry.catchLoc = locs[1];
582
+ }
594
583
 
595
- function pushTryEntry(locs) {
596
- var entry = { tryLoc: locs[0] };
584
+ if (2 in locs) {
585
+ entry.finallyLoc = locs[2];
586
+ entry.afterLoc = locs[3];
587
+ }
597
588
 
598
- if (1 in locs) {
599
- entry.catchLoc = locs[1];
589
+ this.tryEntries.push(entry);
600
590
  }
601
591
 
602
- if (2 in locs) {
603
- entry.finallyLoc = locs[2];
604
- entry.afterLoc = locs[3];
592
+ function resetTryEntry(entry) {
593
+ var record = entry.completion || {};
594
+ record.type = "normal";
595
+ delete record.arg;
596
+ entry.completion = record;
605
597
  }
606
598
 
607
- this.tryEntries.push(entry);
608
- }
609
-
610
- function resetTryEntry(entry) {
611
- var record = entry.completion || {};
612
- record.type = "normal";
613
- delete record.arg;
614
- entry.completion = record;
615
- }
616
-
617
- function Context(tryLocsList) {
618
- // The root entry object (effectively a try statement without a catch
619
- // or a finally block) gives us a place to store values thrown from
620
- // locations where there is no enclosing try statement.
621
- this.tryEntries = [{ tryLoc: "root" }];
622
- tryLocsList.forEach(pushTryEntry, this);
623
- this.reset(true);
624
- }
625
-
626
- exports.keys = function(object) {
627
- var keys = [];
628
- for (var key in object) {
629
- keys.push(key);
599
+ function Context(tryLocsList) {
600
+ // The root entry object (effectively a try statement without a catch
601
+ // or a finally block) gives us a place to store values thrown from
602
+ // locations where there is no enclosing try statement.
603
+ this.tryEntries = [{
604
+ tryLoc: "root"
605
+ }];
606
+ tryLocsList.forEach(pushTryEntry, this);
607
+ this.reset(true);
630
608
  }
631
- keys.reverse();
632
-
633
- // Rather than returning an object with a next method, we keep
634
- // things simple and return the next function itself.
635
- return function next() {
636
- while (keys.length) {
637
- var key = keys.pop();
638
- if (key in object) {
639
- next.value = key;
640
- next.done = false;
641
- return next;
642
- }
643
- }
644
609
 
645
- // To avoid creating an additional object, we just hang the .value
646
- // and .done properties off the next function object itself. This
647
- // also ensures that the minifier will not anonymize the function.
648
- next.done = true;
649
- return next;
650
- };
651
- };
610
+ exports.keys = function (object) {
611
+ var keys = [];
652
612
 
653
- function values(iterable) {
654
- if (iterable) {
655
- var iteratorMethod = iterable[iteratorSymbol];
656
- if (iteratorMethod) {
657
- return iteratorMethod.call(iterable);
613
+ for (var key in object) {
614
+ keys.push(key);
658
615
  }
659
616
 
660
- if (typeof iterable.next === "function") {
661
- return iterable;
662
- }
617
+ keys.reverse(); // Rather than returning an object with a next method, we keep
618
+ // things simple and return the next function itself.
663
619
 
664
- if (!isNaN(iterable.length)) {
665
- var i = -1, next = function next() {
666
- while (++i < iterable.length) {
667
- if (hasOwn.call(iterable, i)) {
668
- next.value = iterable[i];
669
- next.done = false;
670
- return next;
671
- }
672
- }
620
+ return function next() {
621
+ while (keys.length) {
622
+ var key = keys.pop();
673
623
 
674
- next.value = undefined$1;
675
- next.done = true;
624
+ if (key in object) {
625
+ next.value = key;
626
+ next.done = false;
627
+ return next;
628
+ }
629
+ } // To avoid creating an additional object, we just hang the .value
630
+ // and .done properties off the next function object itself. This
631
+ // also ensures that the minifier will not anonymize the function.
676
632
 
677
- return next;
678
- };
679
633
 
680
- return next.next = next;
681
- }
682
- }
634
+ next.done = true;
635
+ return next;
636
+ };
637
+ };
683
638
 
684
- // Return an iterator with no values.
685
- return { next: doneResult };
686
- }
687
- exports.values = values;
639
+ function values(iterable) {
640
+ if (iterable) {
641
+ var iteratorMethod = iterable[iteratorSymbol];
688
642
 
689
- function doneResult() {
690
- return { value: undefined$1, done: true };
691
- }
643
+ if (iteratorMethod) {
644
+ return iteratorMethod.call(iterable);
645
+ }
692
646
 
693
- Context.prototype = {
694
- constructor: Context,
695
-
696
- reset: function(skipTempReset) {
697
- this.prev = 0;
698
- this.next = 0;
699
- // Resetting context._sent for legacy support of Babel's
700
- // function.sent implementation.
701
- this.sent = this._sent = undefined$1;
702
- this.done = false;
703
- this.delegate = null;
704
-
705
- this.method = "next";
706
- this.arg = undefined$1;
707
-
708
- this.tryEntries.forEach(resetTryEntry);
709
-
710
- if (!skipTempReset) {
711
- for (var name in this) {
712
- // Not sure about the optimal order of these conditions:
713
- if (name.charAt(0) === "t" &&
714
- hasOwn.call(this, name) &&
715
- !isNaN(+name.slice(1))) {
716
- this[name] = undefined$1;
717
- }
647
+ if (typeof iterable.next === "function") {
648
+ return iterable;
718
649
  }
719
- }
720
- },
721
650
 
722
- stop: function() {
723
- this.done = true;
651
+ if (!isNaN(iterable.length)) {
652
+ var i = -1,
653
+ next = function next() {
654
+ while (++i < iterable.length) {
655
+ if (hasOwn.call(iterable, i)) {
656
+ next.value = iterable[i];
657
+ next.done = false;
658
+ return next;
659
+ }
660
+ }
724
661
 
725
- var rootEntry = this.tryEntries[0];
726
- var rootRecord = rootEntry.completion;
727
- if (rootRecord.type === "throw") {
728
- throw rootRecord.arg;
729
- }
662
+ next.value = undefined$1;
663
+ next.done = true;
664
+ return next;
665
+ };
730
666
 
731
- return this.rval;
732
- },
667
+ return next.next = next;
668
+ }
669
+ } // Return an iterator with no values.
733
670
 
734
- dispatchException: function(exception) {
735
- if (this.done) {
736
- throw exception;
737
- }
738
671
 
739
- var context = this;
740
- function handle(loc, caught) {
741
- record.type = "throw";
742
- record.arg = exception;
743
- context.next = loc;
672
+ return {
673
+ next: doneResult
674
+ };
675
+ }
744
676
 
745
- if (caught) {
746
- // If the dispatched exception was caught by a catch block,
747
- // then let that catch block handle the exception normally.
748
- context.method = "next";
749
- context.arg = undefined$1;
750
- }
677
+ exports.values = values;
751
678
 
752
- return !! caught;
753
- }
679
+ function doneResult() {
680
+ return {
681
+ value: undefined$1,
682
+ done: true
683
+ };
684
+ }
754
685
 
755
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
756
- var entry = this.tryEntries[i];
757
- var record = entry.completion;
686
+ Context.prototype = {
687
+ constructor: Context,
688
+ reset: function reset(skipTempReset) {
689
+ this.prev = 0;
690
+ this.next = 0; // Resetting context._sent for legacy support of Babel's
691
+ // function.sent implementation.
758
692
 
759
- if (entry.tryLoc === "root") {
760
- // Exception thrown outside of any try block that could handle
761
- // it, so set the completion value of the entire function to
762
- // throw the exception.
763
- return handle("end");
693
+ this.sent = this._sent = undefined$1;
694
+ this.done = false;
695
+ this.delegate = null;
696
+ this.method = "next";
697
+ this.arg = undefined$1;
698
+ this.tryEntries.forEach(resetTryEntry);
699
+
700
+ if (!skipTempReset) {
701
+ for (var name in this) {
702
+ // Not sure about the optimal order of these conditions:
703
+ if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
704
+ this[name] = undefined$1;
705
+ }
706
+ }
764
707
  }
708
+ },
709
+ stop: function stop() {
710
+ this.done = true;
711
+ var rootEntry = this.tryEntries[0];
712
+ var rootRecord = rootEntry.completion;
765
713
 
766
- if (entry.tryLoc <= this.prev) {
767
- var hasCatch = hasOwn.call(entry, "catchLoc");
768
- var hasFinally = hasOwn.call(entry, "finallyLoc");
714
+ if (rootRecord.type === "throw") {
715
+ throw rootRecord.arg;
716
+ }
769
717
 
770
- if (hasCatch && hasFinally) {
771
- if (this.prev < entry.catchLoc) {
772
- return handle(entry.catchLoc, true);
773
- } else if (this.prev < entry.finallyLoc) {
774
- return handle(entry.finallyLoc);
775
- }
718
+ return this.rval;
719
+ },
720
+ dispatchException: function dispatchException(exception) {
721
+ if (this.done) {
722
+ throw exception;
723
+ }
776
724
 
777
- } else if (hasCatch) {
778
- if (this.prev < entry.catchLoc) {
779
- return handle(entry.catchLoc, true);
780
- }
725
+ var context = this;
781
726
 
782
- } else if (hasFinally) {
783
- if (this.prev < entry.finallyLoc) {
784
- return handle(entry.finallyLoc);
785
- }
727
+ function handle(loc, caught) {
728
+ record.type = "throw";
729
+ record.arg = exception;
730
+ context.next = loc;
786
731
 
787
- } else {
788
- throw new Error("try statement without catch or finally");
732
+ if (caught) {
733
+ // If the dispatched exception was caught by a catch block,
734
+ // then let that catch block handle the exception normally.
735
+ context.method = "next";
736
+ context.arg = undefined$1;
789
737
  }
790
- }
791
- }
792
- },
793
738
 
794
- abrupt: function(type, arg) {
795
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
796
- var entry = this.tryEntries[i];
797
- if (entry.tryLoc <= this.prev &&
798
- hasOwn.call(entry, "finallyLoc") &&
799
- this.prev < entry.finallyLoc) {
800
- var finallyEntry = entry;
801
- break;
739
+ return !!caught;
802
740
  }
803
- }
804
741
 
805
- if (finallyEntry &&
806
- (type === "break" ||
807
- type === "continue") &&
808
- finallyEntry.tryLoc <= arg &&
809
- arg <= finallyEntry.finallyLoc) {
810
- // Ignore the finally entry if control is not jumping to a
811
- // location outside the try/catch block.
812
- finallyEntry = null;
813
- }
742
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
743
+ var entry = this.tryEntries[i];
744
+ var record = entry.completion;
814
745
 
815
- var record = finallyEntry ? finallyEntry.completion : {};
816
- record.type = type;
817
- record.arg = arg;
746
+ if (entry.tryLoc === "root") {
747
+ // Exception thrown outside of any try block that could handle
748
+ // it, so set the completion value of the entire function to
749
+ // throw the exception.
750
+ return handle("end");
751
+ }
818
752
 
819
- if (finallyEntry) {
820
- this.method = "next";
821
- this.next = finallyEntry.finallyLoc;
822
- return ContinueSentinel;
823
- }
753
+ if (entry.tryLoc <= this.prev) {
754
+ var hasCatch = hasOwn.call(entry, "catchLoc");
755
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
824
756
 
825
- return this.complete(record);
826
- },
757
+ if (hasCatch && hasFinally) {
758
+ if (this.prev < entry.catchLoc) {
759
+ return handle(entry.catchLoc, true);
760
+ } else if (this.prev < entry.finallyLoc) {
761
+ return handle(entry.finallyLoc);
762
+ }
763
+ } else if (hasCatch) {
764
+ if (this.prev < entry.catchLoc) {
765
+ return handle(entry.catchLoc, true);
766
+ }
767
+ } else if (hasFinally) {
768
+ if (this.prev < entry.finallyLoc) {
769
+ return handle(entry.finallyLoc);
770
+ }
771
+ } else {
772
+ throw new Error("try statement without catch or finally");
773
+ }
774
+ }
775
+ }
776
+ },
777
+ abrupt: function abrupt(type, arg) {
778
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
779
+ var entry = this.tryEntries[i];
827
780
 
828
- complete: function(record, afterLoc) {
829
- if (record.type === "throw") {
830
- throw record.arg;
831
- }
781
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
782
+ var finallyEntry = entry;
783
+ break;
784
+ }
785
+ }
832
786
 
833
- if (record.type === "break" ||
834
- record.type === "continue") {
835
- this.next = record.arg;
836
- } else if (record.type === "return") {
837
- this.rval = this.arg = record.arg;
838
- this.method = "return";
839
- this.next = "end";
840
- } else if (record.type === "normal" && afterLoc) {
841
- this.next = afterLoc;
842
- }
787
+ if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
788
+ // Ignore the finally entry if control is not jumping to a
789
+ // location outside the try/catch block.
790
+ finallyEntry = null;
791
+ }
843
792
 
844
- return ContinueSentinel;
845
- },
793
+ var record = finallyEntry ? finallyEntry.completion : {};
794
+ record.type = type;
795
+ record.arg = arg;
846
796
 
847
- finish: function(finallyLoc) {
848
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
849
- var entry = this.tryEntries[i];
850
- if (entry.finallyLoc === finallyLoc) {
851
- this.complete(entry.completion, entry.afterLoc);
852
- resetTryEntry(entry);
797
+ if (finallyEntry) {
798
+ this.method = "next";
799
+ this.next = finallyEntry.finallyLoc;
853
800
  return ContinueSentinel;
854
801
  }
855
- }
856
- },
857
802
 
858
- "catch": function(tryLoc) {
859
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
860
- var entry = this.tryEntries[i];
861
- if (entry.tryLoc === tryLoc) {
862
- var record = entry.completion;
863
- if (record.type === "throw") {
864
- var thrown = record.arg;
803
+ return this.complete(record);
804
+ },
805
+ complete: function complete(record, afterLoc) {
806
+ if (record.type === "throw") {
807
+ throw record.arg;
808
+ }
809
+
810
+ if (record.type === "break" || record.type === "continue") {
811
+ this.next = record.arg;
812
+ } else if (record.type === "return") {
813
+ this.rval = this.arg = record.arg;
814
+ this.method = "return";
815
+ this.next = "end";
816
+ } else if (record.type === "normal" && afterLoc) {
817
+ this.next = afterLoc;
818
+ }
819
+
820
+ return ContinueSentinel;
821
+ },
822
+ finish: function finish(finallyLoc) {
823
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
824
+ var entry = this.tryEntries[i];
825
+
826
+ if (entry.finallyLoc === finallyLoc) {
827
+ this.complete(entry.completion, entry.afterLoc);
865
828
  resetTryEntry(entry);
829
+ return ContinueSentinel;
866
830
  }
867
- return thrown;
868
831
  }
869
- }
832
+ },
833
+ "catch": function _catch(tryLoc) {
834
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
835
+ var entry = this.tryEntries[i];
870
836
 
871
- // The context.catch method must only be called with a location
872
- // argument that corresponds to a known catch block.
873
- throw new Error("illegal catch attempt");
874
- },
837
+ if (entry.tryLoc === tryLoc) {
838
+ var record = entry.completion;
875
839
 
876
- delegateYield: function(iterable, resultName, nextLoc) {
877
- this.delegate = {
878
- iterator: values(iterable),
879
- resultName: resultName,
880
- nextLoc: nextLoc
881
- };
840
+ if (record.type === "throw") {
841
+ var thrown = record.arg;
842
+ resetTryEntry(entry);
843
+ }
882
844
 
883
- if (this.method === "next") {
884
- // Deliberately forget the last sent value so that we don't
885
- // accidentally pass it on to the delegate.
886
- this.arg = undefined$1;
887
- }
845
+ return thrown;
846
+ }
847
+ } // The context.catch method must only be called with a location
848
+ // argument that corresponds to a known catch block.
888
849
 
889
- return ContinueSentinel;
890
- }
891
- };
892
850
 
893
- // Regardless of whether this script is executing as a CommonJS module
894
- // or not, return the runtime object so that we can declare the variable
895
- // regeneratorRuntime in the outer scope, which allows this module to be
896
- // injected easily by `bin/regenerator --include-runtime script.js`.
897
- return exports;
851
+ throw new Error("illegal catch attempt");
852
+ },
853
+ delegateYield: function delegateYield(iterable, resultName, nextLoc) {
854
+ this.delegate = {
855
+ iterator: values(iterable),
856
+ resultName: resultName,
857
+ nextLoc: nextLoc
858
+ };
859
+
860
+ if (this.method === "next") {
861
+ // Deliberately forget the last sent value so that we don't
862
+ // accidentally pass it on to the delegate.
863
+ this.arg = undefined$1;
864
+ }
865
+
866
+ return ContinueSentinel;
867
+ }
868
+ }; // Regardless of whether this script is executing as a CommonJS module
869
+ // or not, return the runtime object so that we can declare the variable
870
+ // regeneratorRuntime in the outer scope, which allows this module to be
871
+ // injected easily by `bin/regenerator --include-runtime script.js`.
898
872
 
899
- }(
900
- // If this script is executing as a CommonJS module, use module.exports
873
+ return exports;
874
+ }( // If this script is executing as a CommonJS module, use module.exports
901
875
  // as the regeneratorRuntime namespace. Otherwise create a new empty
902
876
  // object. Either way, the resulting object will be used to initialize
903
877
  // the regeneratorRuntime variable at the top of this file.
904
- module.exports
905
- ));
906
-
907
- try {
908
- regeneratorRuntime = runtime;
909
- } catch (accidentalStrictMode) {
910
- // This module should not be running in strict mode, so the above
911
- // assignment should always work unless something is misconfigured. Just
912
- // in case runtime.js accidentally runs in strict mode, in modern engines
913
- // we can explicitly access globalThis. In older engines we can escape
914
- // strict mode using a global Function call. This could conceivably fail
915
- // if a Content Security Policy forbids using Function, but in that case
916
- // the proper solution is to fix the accidental strict mode problem. If
917
- // you've misconfigured your bundler to force strict mode and applied a
918
- // CSP to forbid Function, and you're not willing to fix either of those
919
- // problems, please detail your unique predicament in a GitHub issue.
920
- if (typeof globalThis === "object") {
921
- globalThis.regeneratorRuntime = runtime;
922
- } else {
878
+ module.exports );
879
+
880
+ try {
881
+ regeneratorRuntime = runtime;
882
+ } catch (accidentalStrictMode) {
883
+ // This module should not be running in strict mode, so the above
884
+ // assignment should always work unless something is misconfigured. Just
885
+ // in case runtime.js accidentally runs in strict mode, we can escape
886
+ // strict mode using a global Function call. This could conceivably fail
887
+ // if a Content Security Policy forbids using Function, but in that case
888
+ // the proper solution is to fix the accidental strict mode problem. If
889
+ // you've misconfigured your bundler to force strict mode and applied a
890
+ // CSP to forbid Function, and you're not willing to fix either of those
891
+ // problems, please detail your unique predicament in a GitHub issue.
923
892
  Function("r", "regeneratorRuntime = r")(runtime);
924
893
  }
925
- }
926
894
  });
927
895
 
928
896
  var ProductContext = /*#__PURE__*/React.createContext(undefined);
@@ -1349,7 +1317,8 @@ var productCollectionMeta = {
1349
1317
  };
1350
1318
  })) != null ? _ctx$brands$map : [];
1351
1319
  }
1352
- }
1320
+ },
1321
+ noLayout: "boolean"
1353
1322
  },
1354
1323
  defaultStyles: {
1355
1324
  display: "grid",
@@ -1369,6 +1338,7 @@ function ProductCollection(props) {
1369
1338
  count = props.count,
1370
1339
  category = props.category,
1371
1340
  brand = props.brand,
1341
+ noLayout = props.noLayout,
1372
1342
  setControlContextData = props.setControlContextData;
1373
1343
 
1374
1344
  var _useSearch = useSearch({
@@ -1391,14 +1361,15 @@ function ProductCollection(props) {
1391
1361
  });
1392
1362
  }
1393
1363
 
1394
- return React.createElement("div", {
1395
- className: className
1396
- }, data == null ? void 0 : data.products.map(function (product, i) {
1364
+ var renderedData = data == null ? void 0 : data.products.map(function (product, i) {
1397
1365
  return React.createElement(ProductProvider, {
1398
1366
  product: product,
1399
1367
  key: product.id
1400
1368
  }, repeatedElement(i === 0, children));
1401
- }));
1369
+ });
1370
+ return noLayout ? React.createElement(React.Fragment, null, renderedData) : React.createElement("div", {
1371
+ className: className
1372
+ }, renderedData);
1402
1373
  }
1403
1374
 
1404
1375
  function registerProductCollection(loader, customProductCollectionMeta) {