mobx 6.15.0 → 6.15.2

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/mobx.esm.js CHANGED
@@ -289,6 +289,13 @@ function _arrayLikeToArray(r, a) {
289
289
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
290
290
  return n;
291
291
  }
292
+ function _construct(t, e, r) {
293
+ if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
294
+ var o = [null];
295
+ o.push.apply(o, e);
296
+ var p = new (t.bind.apply(t, o))();
297
+ return r && _setPrototypeOf(p, r.prototype), p;
298
+ }
292
299
  function _defineProperties(e, r) {
293
300
  for (var t = 0; t < r.length; t++) {
294
301
  var o = r[t];
@@ -326,9 +333,29 @@ function _extends() {
326
333
  return n;
327
334
  }, _extends.apply(null, arguments);
328
335
  }
336
+ function _getPrototypeOf(t) {
337
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
338
+ return t.__proto__ || Object.getPrototypeOf(t);
339
+ }, _getPrototypeOf(t);
340
+ }
329
341
  function _inheritsLoose(t, o) {
330
342
  t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
331
343
  }
344
+ function _isNativeFunction(t) {
345
+ try {
346
+ return -1 !== Function.toString.call(t).indexOf("[native code]");
347
+ } catch (n) {
348
+ return "function" == typeof t;
349
+ }
350
+ }
351
+ function _isNativeReflectConstruct() {
352
+ try {
353
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
354
+ } catch (t) {}
355
+ return (_isNativeReflectConstruct = function () {
356
+ return !!t;
357
+ })();
358
+ }
332
359
  function _setPrototypeOf(t, e) {
333
360
  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
334
361
  return t.__proto__ = e, t;
@@ -355,6 +382,28 @@ function _unsupportedIterableToArray(r, a) {
355
382
  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;
356
383
  }
357
384
  }
385
+ function _wrapNativeSuper(t) {
386
+ var r = "function" == typeof Map ? new Map() : void 0;
387
+ return _wrapNativeSuper = function (t) {
388
+ if (null === t || !_isNativeFunction(t)) return t;
389
+ if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
390
+ if (void 0 !== r) {
391
+ if (r.has(t)) return r.get(t);
392
+ r.set(t, Wrapper);
393
+ }
394
+ function Wrapper() {
395
+ return _construct(t, arguments, _getPrototypeOf(this).constructor);
396
+ }
397
+ return Wrapper.prototype = Object.create(t.prototype, {
398
+ constructor: {
399
+ value: Wrapper,
400
+ enumerable: !1,
401
+ writable: !0,
402
+ configurable: !0
403
+ }
404
+ }), _setPrototypeOf(Wrapper, t);
405
+ }, _wrapNativeSuper(t);
406
+ }
358
407
 
359
408
  var storedAnnotationsSymbol = /*#__PURE__*/Symbol("mobx-stored-annotations");
360
409
  /**
@@ -1573,7 +1622,7 @@ var ComputedValue = /*#__PURE__*/function () {
1573
1622
  }
1574
1623
  }
1575
1624
  // to check for cycles
1576
- ;
1625
+ ;
1577
1626
  /**
1578
1627
  * Returns the current value of this computed value.
1579
1628
  * Will evaluate its computation first if needed.
@@ -3034,10 +3083,21 @@ function unique(list) {
3034
3083
  }
3035
3084
 
3036
3085
  var generatorId = 0;
3037
- function FlowCancellationError() {
3038
- this.message = "FLOW_CANCELLED";
3039
- }
3040
- FlowCancellationError.prototype = /*#__PURE__*/Object.create(Error.prototype);
3086
+ var FlowCancellationError = /*#__PURE__*/function (_Error) {
3087
+ function FlowCancellationError() {
3088
+ var _this;
3089
+ _this = _Error.call(this, "FLOW_CANCELLED") || this;
3090
+ Object.setPrototypeOf(_this, (this instanceof FlowCancellationError ? this.constructor : void 0).prototype);
3091
+ _this.name = "FlowCancellationError";
3092
+ return _this;
3093
+ }
3094
+ _inheritsLoose(FlowCancellationError, _Error);
3095
+ var _proto = FlowCancellationError.prototype;
3096
+ _proto.toString = function toString() {
3097
+ return "Error: " + this.message;
3098
+ };
3099
+ return FlowCancellationError;
3100
+ }(/*#__PURE__*/_wrapNativeSuper(Error));
3041
3101
  function isFlowCancellationError(error) {
3042
3102
  return error instanceof FlowCancellationError;
3043
3103
  }
@@ -5052,7 +5112,7 @@ var ObservableObjectAdministration = /*#__PURE__*/function () {
5052
5112
  }
5053
5113
  }
5054
5114
  // Trap for "in"
5055
- ;
5115
+ ;
5056
5116
  _proto.has_ = function has_(key) {
5057
5117
  if (!globalState.trackingDerivation) {
5058
5118
  // Skip key subscription outside derivation
@@ -5184,7 +5244,7 @@ var ObservableObjectAdministration = /*#__PURE__*/function () {
5184
5244
  return true;
5185
5245
  }
5186
5246
  // If original descriptor becomes relevant, move this to annotation directly
5187
- ;
5247
+ ;
5188
5248
  _proto.defineObservableProperty_ = function defineObservableProperty_(key, value, enhancer, proxyTrap) {
5189
5249
  if (proxyTrap === void 0) {
5190
5250
  proxyTrap = false;
@@ -5236,7 +5296,7 @@ var ObservableObjectAdministration = /*#__PURE__*/function () {
5236
5296
  return true;
5237
5297
  }
5238
5298
  // If original descriptor becomes relevant, move this to annotation directly
5239
- ;
5299
+ ;
5240
5300
  _proto.defineComputedProperty_ = function defineComputedProperty_(key, options, proxyTrap) {
5241
5301
  if (proxyTrap === void 0) {
5242
5302
  proxyTrap = false;