@tarojs/taro 2.2.21 → 2.2.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ function _callSuper(t, o, e) {
6
+ return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
7
+ }
8
+ function _construct(t, e, r) {
9
+ if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
10
+ var o = [null];
11
+ o.push.apply(o, e);
12
+ var p = new (t.bind.apply(t, o))();
13
+ return r && _setPrototypeOf(p, r.prototype), p;
14
+ }
15
+ function _isNativeReflectConstruct() {
16
+ try {
17
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
18
+ } catch (t) {}
19
+ return (_isNativeReflectConstruct = function () {
20
+ return !!t;
21
+ })();
22
+ }
5
23
  function ownKeys(e, r) {
6
24
  var t = Object.keys(e);
7
25
  if (Object.getOwnPropertySymbols) {
@@ -23,6 +41,20 @@ function _objectSpread2(e) {
23
41
  }
24
42
  return e;
25
43
  }
44
+ function _toPrimitive(t, r) {
45
+ if ("object" != typeof t || !t) return t;
46
+ var e = t[Symbol.toPrimitive];
47
+ if (void 0 !== e) {
48
+ var i = e.call(t, r || "default");
49
+ if ("object" != typeof i) return i;
50
+ throw new TypeError("@@toPrimitive must return a primitive value.");
51
+ }
52
+ return ("string" === r ? String : Number)(t);
53
+ }
54
+ function _toPropertyKey(t) {
55
+ var i = _toPrimitive(t, "string");
56
+ return "symbol" == typeof i ? i : String(i);
57
+ }
26
58
  function _typeof(o) {
27
59
  "@babel/helpers - typeof";
28
60
 
@@ -97,32 +129,6 @@ function _setPrototypeOf(o, p) {
97
129
  };
98
130
  return _setPrototypeOf(o, p);
99
131
  }
100
- function _isNativeReflectConstruct() {
101
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
102
- if (Reflect.construct.sham) return false;
103
- if (typeof Proxy === "function") return true;
104
- try {
105
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
106
- return true;
107
- } catch (e) {
108
- return false;
109
- }
110
- }
111
- function _construct(Parent, args, Class) {
112
- if (_isNativeReflectConstruct()) {
113
- _construct = Reflect.construct.bind();
114
- } else {
115
- _construct = function _construct(Parent, args, Class) {
116
- var a = [null];
117
- a.push.apply(a, args);
118
- var Constructor = Function.bind.apply(Parent, a);
119
- var instance = new Constructor();
120
- if (Class) _setPrototypeOf(instance, Class.prototype);
121
- return instance;
122
- };
123
- }
124
- return _construct.apply(null, arguments);
125
- }
126
132
  function _isNativeFunction(fn) {
127
133
  try {
128
134
  return Function.toString.call(fn).indexOf("[native code]") !== -1;
@@ -170,20 +176,6 @@ function _possibleConstructorReturn(self, call) {
170
176
  }
171
177
  return _assertThisInitialized(self);
172
178
  }
173
- function _createSuper(Derived) {
174
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
175
- return function _createSuperInternal() {
176
- var Super = _getPrototypeOf(Derived),
177
- result;
178
- if (hasNativeReflectConstruct) {
179
- var NewTarget = _getPrototypeOf(this).constructor;
180
- result = Reflect.construct(Super, arguments, NewTarget);
181
- } else {
182
- result = Super.apply(this, arguments);
183
- }
184
- return _possibleConstructorReturn(this, result);
185
- };
186
- }
187
179
  function _toConsumableArray(arr) {
188
180
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
189
181
  }
@@ -209,20 +201,6 @@ function _arrayLikeToArray(arr, len) {
209
201
  function _nonIterableSpread() {
210
202
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
211
203
  }
212
- function _toPrimitive(input, hint) {
213
- if (typeof input !== "object" || input === null) return input;
214
- var prim = input[Symbol.toPrimitive];
215
- if (prim !== undefined) {
216
- var res = prim.call(input, hint || "default");
217
- if (typeof res !== "object") return res;
218
- throw new TypeError("@@toPrimitive must return a primitive value.");
219
- }
220
- return (hint === "string" ? String : Number)(input);
221
- }
222
- function _toPropertyKey(arg) {
223
- var key = _toPrimitive(arg, "string");
224
- return typeof key === "symbol" ? key : String(key);
225
- }
226
204
 
227
205
  if (typeof Object.assign !== 'function') {
228
206
  // Must be writable: true, enumerable: false, configurable: true
@@ -1581,7 +1559,6 @@ function detachAllRef(component) {
1581
1559
  }
1582
1560
  var RefsArray = /*#__PURE__*/function (_Array) {
1583
1561
  _inherits(RefsArray, _Array);
1584
- var _super = _createSuper(RefsArray);
1585
1562
  /**
1586
1563
  * @param {Array} initList
1587
1564
  */
@@ -1589,7 +1566,7 @@ var RefsArray = /*#__PURE__*/function (_Array) {
1589
1566
  var _this;
1590
1567
  var initList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1591
1568
  _classCallCheck(this, RefsArray);
1592
- _this = _super.call.apply(_super, [this].concat(_toConsumableArray(initList)));
1569
+ _this = _callSuper(this, RefsArray, _toConsumableArray(initList));
1593
1570
  _this.inited = false;
1594
1571
  return _this;
1595
1572
  }