@plasmicpkgs/commerce 0.0.209 → 0.0.211

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.
@@ -6,6 +6,101 @@ import { GlobalActionsProvider, useSelector, DataProvider, PlasmicCanvasContext,
6
6
  import Cookies from 'js-cookie';
7
7
  import debounce from 'debounce';
8
8
 
9
+ function _arrayLikeToArray(r, a) {
10
+ (null == a || a > r.length) && (a = r.length);
11
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
12
+ return n;
13
+ }
14
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
15
+ try {
16
+ var i = n[a](c),
17
+ u = i.value;
18
+ } catch (n) {
19
+ return void e(n);
20
+ }
21
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
22
+ }
23
+ function _asyncToGenerator(n) {
24
+ return function () {
25
+ var t = this,
26
+ e = arguments;
27
+ return new Promise(function (r, o) {
28
+ var a = n.apply(t, e);
29
+ function _next(n) {
30
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
31
+ }
32
+ function _throw(n) {
33
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
34
+ }
35
+ _next(void 0);
36
+ });
37
+ };
38
+ }
39
+ function _construct(t, e, r) {
40
+ if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
41
+ var o = [null];
42
+ o.push.apply(o, e);
43
+ var p = new (t.bind.apply(t, o))();
44
+ return r && _setPrototypeOf(p, r.prototype), p;
45
+ }
46
+ function _createForOfIteratorHelperLoose(r, e) {
47
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
48
+ if (t) return (t = t.call(r)).next.bind(t);
49
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
50
+ t && (r = t);
51
+ var o = 0;
52
+ return function () {
53
+ return o >= r.length ? {
54
+ done: !0
55
+ } : {
56
+ done: !1,
57
+ value: r[o++]
58
+ };
59
+ };
60
+ }
61
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
62
+ }
63
+ function _extends() {
64
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
65
+ for (var e = 1; e < arguments.length; e++) {
66
+ var t = arguments[e];
67
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
68
+ }
69
+ return n;
70
+ }, _extends.apply(null, arguments);
71
+ }
72
+ function _getPrototypeOf(t) {
73
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
74
+ return t.__proto__ || Object.getPrototypeOf(t);
75
+ }, _getPrototypeOf(t);
76
+ }
77
+ function _inheritsLoose(t, o) {
78
+ t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
79
+ }
80
+ function _isNativeFunction(t) {
81
+ try {
82
+ return -1 !== Function.toString.call(t).indexOf("[native code]");
83
+ } catch (n) {
84
+ return "function" == typeof t;
85
+ }
86
+ }
87
+ function _isNativeReflectConstruct() {
88
+ try {
89
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
90
+ } catch (t) {}
91
+ return (_isNativeReflectConstruct = function () {
92
+ return !!t;
93
+ })();
94
+ }
95
+ function _objectWithoutPropertiesLoose(r, e) {
96
+ if (null == r) return {};
97
+ var t = {};
98
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
99
+ if (-1 !== e.indexOf(n)) continue;
100
+ t[n] = r[n];
101
+ }
102
+ return t;
103
+ }
9
104
  function _regeneratorRuntime() {
10
105
  _regeneratorRuntime = function () {
11
106
  return e;
@@ -114,7 +209,7 @@ function _regeneratorRuntime() {
114
209
  function makeInvokeMethod(e, r, n) {
115
210
  var o = h;
116
211
  return function (i, a) {
117
- if (o === f) throw new Error("Generator is already running");
212
+ if (o === f) throw Error("Generator is already running");
118
213
  if (o === s) {
119
214
  if ("throw" === i) throw a;
120
215
  return {
@@ -256,7 +351,7 @@ function _regeneratorRuntime() {
256
351
  } else if (c) {
257
352
  if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
258
353
  } else {
259
- if (!u) throw new Error("try statement without catch or finally");
354
+ if (!u) throw Error("try statement without catch or finally");
260
355
  if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
261
356
  }
262
357
  }
@@ -296,7 +391,7 @@ function _regeneratorRuntime() {
296
391
  return o;
297
392
  }
298
393
  }
299
- throw new Error("illegal catch attempt");
394
+ throw Error("illegal catch attempt");
300
395
  },
301
396
  delegateYield: function (e, r, n) {
302
397
  return this.delegate = {
@@ -307,165 +402,39 @@ function _regeneratorRuntime() {
307
402
  }
308
403
  }, e;
309
404
  }
310
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
311
- try {
312
- var info = gen[key](arg);
313
- var value = info.value;
314
- } catch (error) {
315
- reject(error);
316
- return;
317
- }
318
- if (info.done) {
319
- resolve(value);
320
- } else {
321
- Promise.resolve(value).then(_next, _throw);
322
- }
405
+ function _setPrototypeOf(t, e) {
406
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
407
+ return t.__proto__ = e, t;
408
+ }, _setPrototypeOf(t, e);
323
409
  }
324
- function _asyncToGenerator(fn) {
325
- return function () {
326
- var self = this,
327
- args = arguments;
328
- return new Promise(function (resolve, reject) {
329
- var gen = fn.apply(self, args);
330
- function _next(value) {
331
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
332
- }
333
- function _throw(err) {
334
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
335
- }
336
- _next(undefined);
337
- });
338
- };
339
- }
340
- function _extends() {
341
- _extends = Object.assign ? Object.assign.bind() : function (target) {
342
- for (var i = 1; i < arguments.length; i++) {
343
- var source = arguments[i];
344
- for (var key in source) {
345
- if (Object.prototype.hasOwnProperty.call(source, key)) {
346
- target[key] = source[key];
347
- }
348
- }
349
- }
350
- return target;
351
- };
352
- return _extends.apply(this, arguments);
353
- }
354
- function _inheritsLoose(subClass, superClass) {
355
- subClass.prototype = Object.create(superClass.prototype);
356
- subClass.prototype.constructor = subClass;
357
- _setPrototypeOf(subClass, superClass);
358
- }
359
- function _getPrototypeOf(o) {
360
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
361
- return o.__proto__ || Object.getPrototypeOf(o);
362
- };
363
- return _getPrototypeOf(o);
364
- }
365
- function _setPrototypeOf(o, p) {
366
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
367
- o.__proto__ = p;
368
- return o;
369
- };
370
- return _setPrototypeOf(o, p);
371
- }
372
- function _isNativeReflectConstruct() {
373
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
374
- if (Reflect.construct.sham) return false;
375
- if (typeof Proxy === "function") return true;
376
- try {
377
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
378
- return true;
379
- } catch (e) {
380
- return false;
410
+ function _unsupportedIterableToArray(r, a) {
411
+ if (r) {
412
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
413
+ var t = {}.toString.call(r).slice(8, -1);
414
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
381
415
  }
382
416
  }
383
- function _construct(Parent, args, Class) {
384
- if (_isNativeReflectConstruct()) {
385
- _construct = Reflect.construct.bind();
386
- } else {
387
- _construct = function _construct(Parent, args, Class) {
388
- var a = [null];
389
- a.push.apply(a, args);
390
- var Constructor = Function.bind.apply(Parent, a);
391
- var instance = new Constructor();
392
- if (Class) _setPrototypeOf(instance, Class.prototype);
393
- return instance;
394
- };
395
- }
396
- return _construct.apply(null, arguments);
397
- }
398
- function _isNativeFunction(fn) {
399
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
400
- }
401
- function _wrapNativeSuper(Class) {
402
- var _cache = typeof Map === "function" ? new Map() : undefined;
403
- _wrapNativeSuper = function _wrapNativeSuper(Class) {
404
- if (Class === null || !_isNativeFunction(Class)) return Class;
405
- if (typeof Class !== "function") {
406
- throw new TypeError("Super expression must either be null or a function");
407
- }
408
- if (typeof _cache !== "undefined") {
409
- if (_cache.has(Class)) return _cache.get(Class);
410
- _cache.set(Class, Wrapper);
417
+ function _wrapNativeSuper(t) {
418
+ var r = "function" == typeof Map ? new Map() : void 0;
419
+ return _wrapNativeSuper = function (t) {
420
+ if (null === t || !_isNativeFunction(t)) return t;
421
+ if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
422
+ if (void 0 !== r) {
423
+ if (r.has(t)) return r.get(t);
424
+ r.set(t, Wrapper);
411
425
  }
412
426
  function Wrapper() {
413
- return _construct(Class, arguments, _getPrototypeOf(this).constructor);
427
+ return _construct(t, arguments, _getPrototypeOf(this).constructor);
414
428
  }
415
- Wrapper.prototype = Object.create(Class.prototype, {
429
+ return Wrapper.prototype = Object.create(t.prototype, {
416
430
  constructor: {
417
431
  value: Wrapper,
418
- enumerable: false,
419
- writable: true,
420
- configurable: true
432
+ enumerable: !1,
433
+ writable: !0,
434
+ configurable: !0
421
435
  }
422
- });
423
- return _setPrototypeOf(Wrapper, Class);
424
- };
425
- return _wrapNativeSuper(Class);
426
- }
427
- function _objectWithoutPropertiesLoose(source, excluded) {
428
- if (source == null) return {};
429
- var target = {};
430
- var sourceKeys = Object.keys(source);
431
- var key, i;
432
- for (i = 0; i < sourceKeys.length; i++) {
433
- key = sourceKeys[i];
434
- if (excluded.indexOf(key) >= 0) continue;
435
- target[key] = source[key];
436
- }
437
- return target;
438
- }
439
- function _unsupportedIterableToArray(o, minLen) {
440
- if (!o) return;
441
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
442
- var n = Object.prototype.toString.call(o).slice(8, -1);
443
- if (n === "Object" && o.constructor) n = o.constructor.name;
444
- if (n === "Map" || n === "Set") return Array.from(o);
445
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
446
- }
447
- function _arrayLikeToArray(arr, len) {
448
- if (len == null || len > arr.length) len = arr.length;
449
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
450
- return arr2;
451
- }
452
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
453
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
454
- if (it) return (it = it.call(o)).next.bind(it);
455
- if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
456
- if (it) o = it;
457
- var i = 0;
458
- return function () {
459
- if (i >= o.length) return {
460
- done: true
461
- };
462
- return {
463
- done: false,
464
- value: o[i++]
465
- };
466
- };
467
- }
468
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
436
+ }), _setPrototypeOf(Wrapper, t);
437
+ }, _wrapNativeSuper(t);
469
438
  }
470
439
 
471
440
  var _excluded = ["children"];