parse 3.5.1-beta.1 → 4.0.0-alpha.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.
Files changed (51) hide show
  1. package/README.md +17 -4
  2. package/dist/parse.js +451 -364
  3. package/dist/parse.min.js +2 -2
  4. package/dist/parse.weapp.js +451 -364
  5. package/dist/parse.weapp.min.js +2 -2
  6. package/lib/browser/CoreManager.js +1 -1
  7. package/lib/browser/EventuallyQueue.js +31 -27
  8. package/lib/browser/LiveQueryClient.js +35 -18
  9. package/lib/browser/LocalDatastore.js +20 -20
  10. package/lib/browser/LocalDatastoreController.js +16 -14
  11. package/lib/browser/LocalDatastoreController.react-native.js +10 -10
  12. package/lib/browser/ParseCLP.js +32 -32
  13. package/lib/browser/ParseFile.js +26 -15
  14. package/lib/browser/ParseLiveQuery.js +6 -6
  15. package/lib/browser/ParseObject.js +84 -69
  16. package/lib/browser/ParseOp.js +3 -1
  17. package/lib/browser/ParseQuery.js +115 -88
  18. package/lib/browser/ParseUser.js +74 -64
  19. package/lib/browser/RESTController.js +6 -7
  20. package/lib/node/CoreManager.js +1 -1
  21. package/lib/node/LiveQueryClient.js +27 -14
  22. package/lib/node/ObjectStateMutations.js +14 -43
  23. package/lib/node/ParseCLP.js +12 -41
  24. package/lib/node/ParseFile.js +15 -41
  25. package/lib/node/ParseObject.js +13 -41
  26. package/lib/node/ParseQuery.js +3 -1
  27. package/lib/node/RESTController.js +2 -43
  28. package/lib/react-native/CoreManager.js +1 -1
  29. package/lib/react-native/LiveQueryClient.js +35 -18
  30. package/lib/react-native/LocalDatastore.js +3 -2
  31. package/lib/react-native/ParseCLP.js +32 -32
  32. package/lib/react-native/ParseFile.js +9 -3
  33. package/lib/react-native/ParseObject.js +14 -9
  34. package/lib/react-native/ParseOp.js +3 -1
  35. package/lib/react-native/ParseQuery.js +21 -7
  36. package/lib/react-native/RESTController.js +6 -7
  37. package/lib/weapp/CoreManager.js +1 -1
  38. package/lib/weapp/EventuallyQueue.js +31 -27
  39. package/lib/weapp/LiveQueryClient.js +35 -18
  40. package/lib/weapp/LocalDatastore.js +20 -20
  41. package/lib/weapp/LocalDatastoreController.js +16 -14
  42. package/lib/weapp/LocalDatastoreController.react-native.js +10 -10
  43. package/lib/weapp/ParseCLP.js +32 -32
  44. package/lib/weapp/ParseFile.js +26 -15
  45. package/lib/weapp/ParseLiveQuery.js +6 -6
  46. package/lib/weapp/ParseObject.js +84 -69
  47. package/lib/weapp/ParseOp.js +3 -1
  48. package/lib/weapp/ParseQuery.js +115 -88
  49. package/lib/weapp/ParseUser.js +74 -64
  50. package/lib/weapp/RESTController.js +6 -7
  51. package/package.json +6 -2
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v3.5.1-beta.1
2
+ * Parse JavaScript SDK v4.0.0-alpha.2
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -699,7 +699,7 @@ var config
699
699
  SERVER_AUTH_TOKEN: null,
700
700
  LIVEQUERY_SERVER_URL: null,
701
701
  ENCRYPTED_KEY: null,
702
- VERSION: 'js' + "3.5.1-beta.1",
702
+ VERSION: 'js' + "4.0.0-alpha.2",
703
703
  APPLICATION_ID: null,
704
704
  JAVASCRIPT_KEY: null,
705
705
  MASTER_KEY: null,
@@ -1543,7 +1543,7 @@ var EventuallyQueue = {
1543
1543
 
1544
1544
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1545
1545
  var queueData, queueId, index, prop;
1546
- return _regeneratorRuntime().wrap(function (_context) {
1546
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1547
1547
  while (1) {
1548
1548
  switch (_context.prev = _context.next) {
1549
1549
  case 0:
@@ -1586,10 +1586,10 @@ var EventuallyQueue = {
1586
1586
  }, _callee);
1587
1587
  }))();
1588
1588
  },
1589
- store: function (data) {
1589
+ store: function store(data) {
1590
1590
  return _Storage.default.setItemAsync(QUEUE_KEY, (0, _stringify.default)(data));
1591
1591
  },
1592
- load: function () {
1592
+ load: function load() {
1593
1593
  return _Storage.default.getItemAsync(QUEUE_KEY);
1594
1594
  },
1595
1595
 
@@ -1601,11 +1601,13 @@ var EventuallyQueue = {
1601
1601
  * @returns {Promise<Array>}
1602
1602
  * @static
1603
1603
  */
1604
- getQueue: function ()
1604
+ getQueue: function getQueue()
1605
1605
  /*: Promise<Array>*/
1606
1606
  {
1607
+ var _this2 = this;
1608
+
1607
1609
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
1608
- return _regeneratorRuntime().wrap(function (_context2) {
1610
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1609
1611
  while (1) {
1610
1612
  switch (_context2.prev = _context2.next) {
1611
1613
  case 0:
@@ -1616,7 +1618,7 @@ var EventuallyQueue = {
1616
1618
 
1617
1619
  _context2.t0 = JSON;
1618
1620
  _context2.next = 4;
1619
- return this.load();
1621
+ return _this2.load();
1620
1622
 
1621
1623
  case 4:
1622
1624
  _context2.t1 = _context2.sent;
@@ -1653,7 +1655,7 @@ var EventuallyQueue = {
1653
1655
  * @static
1654
1656
  * @ignore
1655
1657
  */
1656
- setQueue: function (queue
1658
+ setQueue: function setQueue(queue
1657
1659
  /*: Queue*/
1658
1660
  )
1659
1661
  /*: Promise<void>*/
@@ -1670,7 +1672,7 @@ var EventuallyQueue = {
1670
1672
  * @static
1671
1673
  * @ignore
1672
1674
  */
1673
- remove: function (queueId
1675
+ remove: function remove(queueId
1674
1676
  /*: string*/
1675
1677
  )
1676
1678
  /*: Promise<void>*/
@@ -1679,7 +1681,7 @@ var EventuallyQueue = {
1679
1681
 
1680
1682
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1681
1683
  var queueData, index;
1682
- return _regeneratorRuntime().wrap(function (_context3) {
1684
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1683
1685
  while (1) {
1684
1686
  switch (_context3.prev = _context3.next) {
1685
1687
  case 0:
@@ -1716,7 +1718,7 @@ var EventuallyQueue = {
1716
1718
  * @returns {Promise} A promise that is fulfilled when queue is cleared.
1717
1719
  * @static
1718
1720
  */
1719
- clear: function ()
1721
+ clear: function clear()
1720
1722
  /*: Promise*/
1721
1723
  {
1722
1724
  queueCache = [];
@@ -1732,7 +1734,7 @@ var EventuallyQueue = {
1732
1734
  * @static
1733
1735
  * @ignore
1734
1736
  */
1735
- queueItemExists: function (queue
1737
+ queueItemExists: function queueItemExists(queue
1736
1738
  /*: Queue*/
1737
1739
  , queueId
1738
1740
  /*: string*/
@@ -1752,17 +1754,19 @@ var EventuallyQueue = {
1752
1754
  * @returns {number}
1753
1755
  * @static
1754
1756
  */
1755
- length: function ()
1757
+ length: function length()
1756
1758
  /*: number*/
1757
1759
  {
1760
+ var _this4 = this;
1761
+
1758
1762
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
1759
1763
  var queueData;
1760
- return _regeneratorRuntime().wrap(function (_context4) {
1764
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1761
1765
  while (1) {
1762
1766
  switch (_context4.prev = _context4.next) {
1763
1767
  case 0:
1764
1768
  _context4.next = 2;
1765
- return this.getQueue();
1769
+ return _this4.getQueue();
1766
1770
 
1767
1771
  case 2:
1768
1772
  queueData = _context4.sent;
@@ -1785,14 +1789,14 @@ var EventuallyQueue = {
1785
1789
  * @returns {Promise<boolean>} Returns true if queue was sent successfully.
1786
1790
  * @static
1787
1791
  */
1788
- sendQueue: function ()
1792
+ sendQueue: function sendQueue()
1789
1793
  /*: Promise<boolean>*/
1790
1794
  {
1791
1795
  var _this5 = this;
1792
1796
 
1793
1797
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
1794
1798
  var queue, queueData, i, queueObject, id, hash, className, ObjectType;
1795
- return _regeneratorRuntime().wrap(function (_context5) {
1799
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
1796
1800
  while (1) {
1797
1801
  switch (_context5.prev = _context5.next) {
1798
1802
  case 0:
@@ -1878,7 +1882,7 @@ var EventuallyQueue = {
1878
1882
  * @static
1879
1883
  * @ignore
1880
1884
  */
1881
- sendQueueCallback: function (object
1885
+ sendQueueCallback: function sendQueueCallback(object
1882
1886
  /*: ParseObject*/
1883
1887
  , queueObject
1884
1888
  /*: QueueObject*/
@@ -1888,7 +1892,7 @@ var EventuallyQueue = {
1888
1892
  var _this6 = this;
1889
1893
 
1890
1894
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
1891
- return _regeneratorRuntime().wrap(function (_context6) {
1895
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
1892
1896
  while (1) {
1893
1897
  switch (_context6.prev = _context6.next) {
1894
1898
  case 0:
@@ -1986,7 +1990,7 @@ var EventuallyQueue = {
1986
1990
  * @param [ms] Milliseconds to ping the server. Default 2000ms
1987
1991
  * @static
1988
1992
  */
1989
- poll: function () {
1993
+ poll: function poll() {
1990
1994
  var _this7 = this;
1991
1995
 
1992
1996
  var ms
@@ -2021,7 +2025,7 @@ var EventuallyQueue = {
2021
2025
  * @name Parse.EventuallyQueue.stopPoll
2022
2026
  * @static
2023
2027
  */
2024
- stopPoll: function () {
2028
+ stopPoll: function stopPoll() {
2025
2029
  clearInterval(polling);
2026
2030
  polling = undefined;
2027
2031
  },
@@ -2034,25 +2038,25 @@ var EventuallyQueue = {
2034
2038
  * @returns {boolean}
2035
2039
  * @static
2036
2040
  */
2037
- isPolling: function ()
2041
+ isPolling: function isPolling()
2038
2042
  /*: boolean*/
2039
2043
  {
2040
2044
  return !!polling;
2041
2045
  },
2042
- _setPolling: function (flag
2046
+ _setPolling: function _setPolling(flag
2043
2047
  /*: boolean*/
2044
2048
  ) {
2045
2049
  polling = flag;
2046
2050
  },
2047
2051
  process: {
2048
- create: function (ObjectType, queueObject) {
2052
+ create: function create(ObjectType, queueObject) {
2049
2053
  var object = new ObjectType();
2050
2054
  return EventuallyQueue.sendQueueCallback(object, queueObject);
2051
2055
  },
2052
- byId: function (ObjectType, queueObject) {
2056
+ byId: function byId(ObjectType, queueObject) {
2053
2057
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
2054
2058
  var sessionToken, query, results;
2055
- return _regeneratorRuntime().wrap(function (_context7) {
2059
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
2056
2060
  while (1) {
2057
2061
  switch (_context7.prev = _context7.next) {
2058
2062
  case 0:
@@ -2076,10 +2080,10 @@ var EventuallyQueue = {
2076
2080
  }, _callee7);
2077
2081
  }))();
2078
2082
  },
2079
- byHash: function (ObjectType, queueObject) {
2083
+ byHash: function byHash(ObjectType, queueObject) {
2080
2084
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
2081
2085
  var sessionToken, query, results;
2082
- return _regeneratorRuntime().wrap(function (_context8) {
2086
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
2083
2087
  while (1) {
2084
2088
  switch (_context8.prev = _context8.next) {
2085
2089
  case 0:
@@ -2503,6 +2507,8 @@ var _LiveQuerySubscription = _interopRequireDefault(_dereq_("./LiveQuerySubscrip
2503
2507
 
2504
2508
  var _promiseUtils = _dereq_("./promiseUtils");
2505
2509
 
2510
+ var _ParseError = _interopRequireDefault(_dereq_("./ParseError"));
2511
+
2506
2512
  function _createForOfIteratorHelper(o, allowArrayLike) {
2507
2513
  var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"];
2508
2514
 
@@ -2806,6 +2812,8 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2806
2812
  )
2807
2813
  /*: LiveQuerySubscription*/
2808
2814
  {
2815
+ var _this2 = this;
2816
+
2809
2817
  if (!query) {
2810
2818
  return;
2811
2819
  }
@@ -2832,7 +2840,9 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2832
2840
  this.subscriptions.set(this.requestId, subscription);
2833
2841
  this.requestId += 1;
2834
2842
  this.connectPromise.then(function () {
2835
- this.socket.send((0, _stringify.default)(subscribeRequest));
2843
+ _this2.socket.send((0, _stringify.default)(subscribeRequest));
2844
+ }).catch(function (error) {
2845
+ subscription.subscribePromise.reject(error);
2836
2846
  });
2837
2847
  return subscription;
2838
2848
  }
@@ -2847,6 +2857,8 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2847
2857
  value: function (subscription
2848
2858
  /*: Object*/
2849
2859
  ) {
2860
+ var _this3 = this;
2861
+
2850
2862
  if (!subscription) {
2851
2863
  return;
2852
2864
  }
@@ -2857,7 +2869,7 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2857
2869
  requestId: subscription.id
2858
2870
  };
2859
2871
  this.connectPromise.then(function () {
2860
- this.socket.send((0, _stringify.default)(unsubscribeRequest));
2872
+ _this3.socket.send((0, _stringify.default)(unsubscribeRequest));
2861
2873
  });
2862
2874
  }
2863
2875
  /**
@@ -3043,26 +3055,35 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
3043
3055
  break;
3044
3056
 
3045
3057
  case OP_EVENTS.ERROR:
3046
- if (data.requestId) {
3047
- if (subscription) {
3048
- subscription.subscribePromise.resolve();
3049
- (0, _setTimeout2.default)(function () {
3050
- return subscription.emit(SUBSCRIPTION_EMMITER_TYPES.ERROR, data.error);
3051
- }, 200);
3058
+ {
3059
+ var parseError = new _ParseError.default(data.code, data.error);
3060
+
3061
+ if (!this.id) {
3062
+ this.connectPromise.reject(parseError);
3063
+ this.state = CLIENT_STATE.DISCONNECTED;
3052
3064
  }
3053
- } else {
3054
- this.emit(CLIENT_EMMITER_TYPES.ERROR, data.error);
3055
- }
3056
3065
 
3057
- if (data.error === 'Additional properties not allowed') {
3058
- this.additionalProperties = false;
3059
- }
3066
+ if (data.requestId) {
3067
+ if (subscription) {
3068
+ subscription.subscribePromise.reject(parseError);
3069
+ (0, _setTimeout2.default)(function () {
3070
+ return subscription.emit(SUBSCRIPTION_EMMITER_TYPES.ERROR, data.error);
3071
+ }, 200);
3072
+ }
3073
+ } else {
3074
+ this.emit(CLIENT_EMMITER_TYPES.ERROR, data.error);
3075
+ }
3060
3076
 
3061
- if (data.reconnect) {
3062
- this._handleReconnect();
3063
- }
3077
+ if (data.error === 'Additional properties not allowed') {
3078
+ this.additionalProperties = false;
3079
+ }
3064
3080
 
3065
- break;
3081
+ if (data.reconnect) {
3082
+ this._handleReconnect();
3083
+ }
3084
+
3085
+ break;
3086
+ }
3066
3087
 
3067
3088
  case OP_EVENTS.UNSUBSCRIBED:
3068
3089
  // We have already deleted subscription in unsubscribe(), do nothing here
@@ -3197,7 +3218,7 @@ _CoreManager.default.setWebSocketController(_dereq_('./Socket.weapp'));
3197
3218
 
3198
3219
  var _default = LiveQueryClient;
3199
3220
  exports.default = _default;
3200
- },{"./CoreManager":4,"./EventEmitter":6,"./LiveQuerySubscription":11,"./ParseObject":26,"./Socket.weapp":38,"./promiseUtils":52,"@babel/runtime-corejs3/core-js-stable/array/from":56,"@babel/runtime-corejs3/core-js-stable/array/is-array":57,"@babel/runtime-corejs3/core-js-stable/instance/bind":58,"@babel/runtime-corejs3/core-js-stable/instance/for-each":65,"@babel/runtime-corejs3/core-js-stable/instance/index-of":67,"@babel/runtime-corejs3/core-js-stable/instance/keys":68,"@babel/runtime-corejs3/core-js-stable/instance/slice":72,"@babel/runtime-corejs3/core-js-stable/instance/values":76,"@babel/runtime-corejs3/core-js-stable/json/stringify":77,"@babel/runtime-corejs3/core-js-stable/map":78,"@babel/runtime-corejs3/core-js-stable/object/define-property":83,"@babel/runtime-corejs3/core-js-stable/reflect/construct":94,"@babel/runtime-corejs3/core-js-stable/set-timeout":96,"@babel/runtime-corejs3/core-js-stable/symbol":98,"@babel/runtime-corejs3/core-js/get-iterator-method":102,"@babel/runtime-corejs3/helpers/assertThisInitialized":120,"@babel/runtime-corejs3/helpers/classCallCheck":122,"@babel/runtime-corejs3/helpers/createClass":124,"@babel/runtime-corejs3/helpers/defineProperty":125,"@babel/runtime-corejs3/helpers/getPrototypeOf":127,"@babel/runtime-corejs3/helpers/inherits":128,"@babel/runtime-corejs3/helpers/interopRequireDefault":129,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":136,"@babel/runtime-corejs3/helpers/typeof":141}],11:[function(_dereq_,module,exports){
3221
+ },{"./CoreManager":4,"./EventEmitter":6,"./LiveQuerySubscription":11,"./ParseError":21,"./ParseObject":26,"./Socket.weapp":38,"./promiseUtils":52,"@babel/runtime-corejs3/core-js-stable/array/from":56,"@babel/runtime-corejs3/core-js-stable/array/is-array":57,"@babel/runtime-corejs3/core-js-stable/instance/bind":58,"@babel/runtime-corejs3/core-js-stable/instance/for-each":65,"@babel/runtime-corejs3/core-js-stable/instance/index-of":67,"@babel/runtime-corejs3/core-js-stable/instance/keys":68,"@babel/runtime-corejs3/core-js-stable/instance/slice":72,"@babel/runtime-corejs3/core-js-stable/instance/values":76,"@babel/runtime-corejs3/core-js-stable/json/stringify":77,"@babel/runtime-corejs3/core-js-stable/map":78,"@babel/runtime-corejs3/core-js-stable/object/define-property":83,"@babel/runtime-corejs3/core-js-stable/reflect/construct":94,"@babel/runtime-corejs3/core-js-stable/set-timeout":96,"@babel/runtime-corejs3/core-js-stable/symbol":98,"@babel/runtime-corejs3/core-js/get-iterator-method":102,"@babel/runtime-corejs3/helpers/assertThisInitialized":120,"@babel/runtime-corejs3/helpers/classCallCheck":122,"@babel/runtime-corejs3/helpers/createClass":124,"@babel/runtime-corejs3/helpers/defineProperty":125,"@babel/runtime-corejs3/helpers/getPrototypeOf":127,"@babel/runtime-corejs3/helpers/inherits":128,"@babel/runtime-corejs3/helpers/interopRequireDefault":129,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":136,"@babel/runtime-corejs3/helpers/typeof":141}],11:[function(_dereq_,module,exports){
3201
3222
  "use strict";
3202
3223
 
3203
3224
  var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
@@ -3996,7 +4017,7 @@ var LocalDatastore = {
3996
4017
 
3997
4018
  var pinName, toPinPromises, objectKeys, _iterator, _step, parent, children, parentKey, json, objectKey, fromPinPromise, _yield$Promise$all, _yield$Promise$all2, pinned, toPin;
3998
4019
 
3999
- return _regeneratorRuntime().wrap(function (_context2) {
4020
+ return _regeneratorRuntime().wrap(function _callee$(_context2) {
4000
4021
  while (1) {
4001
4022
  switch (_context2.prev = _context2.next) {
4002
4023
  case 0:
@@ -4050,7 +4071,7 @@ var LocalDatastore = {
4050
4071
  },
4051
4072
  // Removes object and children keys from pin name
4052
4073
  // Keeps the object and children pinned
4053
- _handleUnPinAllWithName: function (name
4074
+ _handleUnPinAllWithName: function _handleUnPinAllWithName(name
4054
4075
  /*: string*/
4055
4076
  , objects
4056
4077
  /*: Array<ParseObject>*/
@@ -4060,7 +4081,7 @@ var LocalDatastore = {
4060
4081
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
4061
4082
  var localDatastore, pinName, promises, objectKeys, _iterator2, _step2, _objectKeys, _context3, parent, children, parentKey, pinned, _iterator3, _step3, objectKey, hasReference, key, pinnedObjects;
4062
4083
 
4063
- return _regeneratorRuntime().wrap(function (_context4) {
4084
+ return _regeneratorRuntime().wrap(function _callee2$(_context4) {
4064
4085
  while (1) {
4065
4086
  switch (_context4.prev = _context4.next) {
4066
4087
  case 0:
@@ -4182,7 +4203,7 @@ var LocalDatastore = {
4182
4203
  }))();
4183
4204
  },
4184
4205
  // Retrieve all pointer fields from object recursively
4185
- _getChildren: function (object
4206
+ _getChildren: function _getChildren(object
4186
4207
  /*: ParseObject*/
4187
4208
  ) {
4188
4209
  var encountered = {};
@@ -4197,7 +4218,7 @@ var LocalDatastore = {
4197
4218
 
4198
4219
  return encountered;
4199
4220
  },
4200
- _traverse: function (object
4221
+ _traverse: function _traverse(object
4201
4222
  /*: any*/
4202
4223
  , encountered
4203
4224
  /*: any*/
@@ -4227,7 +4248,7 @@ var LocalDatastore = {
4227
4248
  }
4228
4249
  },
4229
4250
  // Transform keys in pin name to objects
4230
- _serializeObjectsFromPinName: function (name
4251
+ _serializeObjectsFromPinName: function _serializeObjectsFromPinName(name
4231
4252
  /*: string*/
4232
4253
  ) {
4233
4254
  var _this3 = this;
@@ -4236,7 +4257,7 @@ var LocalDatastore = {
4236
4257
  var _context5, _concatInstanceProper, _context6;
4237
4258
 
4238
4259
  var localDatastore, allObjects, key, pinName, pinned, promises, objects;
4239
- return _regeneratorRuntime().wrap(function (_context7) {
4260
+ return _regeneratorRuntime().wrap(function _callee3$(_context7) {
4240
4261
  while (1) {
4241
4262
  switch (_context7.prev = _context7.next) {
4242
4263
  case 0:
@@ -4296,7 +4317,7 @@ var LocalDatastore = {
4296
4317
  // Replaces object pointers with pinned pointers
4297
4318
  // The object pointers may contain old data
4298
4319
  // Uses Breadth First Search Algorithm
4299
- _serializeObject: function (objectKey
4320
+ _serializeObject: function _serializeObject(objectKey
4300
4321
  /*: string*/
4301
4322
  , localDatastore
4302
4323
  /*: any*/
@@ -4305,7 +4326,7 @@ var LocalDatastore = {
4305
4326
 
4306
4327
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
4307
4328
  var LDS, root, queue, meta, uniqueId, nodeId, subTreeRoot, field, value, key, pointer;
4308
- return _regeneratorRuntime().wrap(function (_context8) {
4329
+ return _regeneratorRuntime().wrap(function _callee4$(_context8) {
4309
4330
  while (1) {
4310
4331
  switch (_context8.prev = _context8.next) {
4311
4332
  case 0:
@@ -4371,7 +4392,7 @@ var LocalDatastore = {
4371
4392
  },
4372
4393
  // Called when an object is save / fetched
4373
4394
  // Update object pin value
4374
- _updateObjectIfPinned: function (object
4395
+ _updateObjectIfPinned: function _updateObjectIfPinned(object
4375
4396
  /*: ParseObject*/
4376
4397
  )
4377
4398
  /*: Promise<void>*/
@@ -4380,7 +4401,7 @@ var LocalDatastore = {
4380
4401
 
4381
4402
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
4382
4403
  var objectKey, pinned;
4383
- return _regeneratorRuntime().wrap(function (_context9) {
4404
+ return _regeneratorRuntime().wrap(function _callee5$(_context9) {
4384
4405
  while (1) {
4385
4406
  switch (_context9.prev = _context9.next) {
4386
4407
  case 0:
@@ -4420,14 +4441,14 @@ var LocalDatastore = {
4420
4441
  // Called when object is destroyed
4421
4442
  // Unpin object and remove all references from pin names
4422
4443
  // TODO: Destroy children?
4423
- _destroyObjectIfPinned: function (object
4444
+ _destroyObjectIfPinned: function _destroyObjectIfPinned(object
4424
4445
  /*: ParseObject*/
4425
4446
  ) {
4426
4447
  var _this6 = this;
4427
4448
 
4428
4449
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
4429
4450
  var localDatastore, objectKey, pin, promises, key, pinned;
4430
- return _regeneratorRuntime().wrap(function (_context10) {
4451
+ return _regeneratorRuntime().wrap(function _callee6$(_context10) {
4431
4452
  while (1) {
4432
4453
  switch (_context10.prev = _context10.next) {
4433
4454
  case 0:
@@ -4489,7 +4510,7 @@ var LocalDatastore = {
4489
4510
  }))();
4490
4511
  },
4491
4512
  // Update pin and references of the unsaved object
4492
- _updateLocalIdForObject: function (localId
4513
+ _updateLocalIdForObject: function _updateLocalIdForObject(localId
4493
4514
  /*: string*/
4494
4515
  , object
4495
4516
  /*: ParseObject*/
@@ -4500,7 +4521,7 @@ var LocalDatastore = {
4500
4521
  var _context11, _context12;
4501
4522
 
4502
4523
  var localKey, objectKey, unsaved, promises, localDatastore, key, pinned;
4503
- return _regeneratorRuntime().wrap(function (_context13) {
4524
+ return _regeneratorRuntime().wrap(function _callee7$(_context13) {
4504
4525
  while (1) {
4505
4526
  switch (_context13.prev = _context13.next) {
4506
4527
  case 0:
@@ -4572,7 +4593,7 @@ var LocalDatastore = {
4572
4593
  * @name Parse.LocalDatastore.updateFromServer
4573
4594
  * @static
4574
4595
  */
4575
- updateFromServer: function () {
4596
+ updateFromServer: function updateFromServer() {
4576
4597
  var _this8 = this;
4577
4598
 
4578
4599
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
@@ -4580,7 +4601,7 @@ var LocalDatastore = {
4580
4601
 
4581
4602
  var localDatastore, keys, key, pointersHash, _i, _keys, _key, _key$split, _key$split2, className, objectId, queryPromises, responses, objects, pinPromises;
4582
4603
 
4583
- return _regeneratorRuntime().wrap(function (_context15) {
4604
+ return _regeneratorRuntime().wrap(function _callee8$(_context15) {
4584
4605
  while (1) {
4585
4606
  switch (_context15.prev = _context15.next) {
4586
4607
  case 0:
@@ -4699,7 +4720,7 @@ var LocalDatastore = {
4699
4720
  }, _callee8, null, [[24, 35]]);
4700
4721
  }))();
4701
4722
  },
4702
- getKeyForObject: function (object
4723
+ getKeyForObject: function getKeyForObject(object
4703
4724
  /*: any*/
4704
4725
  ) {
4705
4726
  var _context16, _context17;
@@ -4708,7 +4729,7 @@ var LocalDatastore = {
4708
4729
 
4709
4730
  return (0, _concat.default)(_context16 = (0, _concat.default)(_context17 = "".concat(_LocalDatastoreUtils.OBJECT_PREFIX)).call(_context17, object.className, "_")).call(_context16, objectId);
4710
4731
  },
4711
- getPinName: function (pinName
4732
+ getPinName: function getPinName(pinName
4712
4733
  /*: ?string*/
4713
4734
  ) {
4714
4735
  if (!pinName || pinName === _LocalDatastoreUtils.DEFAULT_PIN) {
@@ -4717,7 +4738,7 @@ var LocalDatastore = {
4717
4738
 
4718
4739
  return _LocalDatastoreUtils.PIN_PREFIX + pinName;
4719
4740
  },
4720
- checkIfEnabled: function () {
4741
+ checkIfEnabled: function checkIfEnabled() {
4721
4742
  if (!this.isEnabled) {
4722
4743
  console.error('Parse.enableLocalDatastore() must be called first');
4723
4744
  }
@@ -5221,7 +5242,7 @@ var LocalDatastoreController = {
5221
5242
  {
5222
5243
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5223
5244
  var values, objects;
5224
- return _regeneratorRuntime().wrap(function (_context) {
5245
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
5225
5246
  while (1) {
5226
5247
  switch (_context.prev = _context.next) {
5227
5248
  case 0:
@@ -5250,7 +5271,7 @@ var LocalDatastoreController = {
5250
5271
  }, _callee);
5251
5272
  }))();
5252
5273
  },
5253
- pinWithName: function (name
5274
+ pinWithName: function pinWithName(name
5254
5275
  /*: string*/
5255
5276
  , value
5256
5277
  /*: any*/
@@ -5258,17 +5279,17 @@ var LocalDatastoreController = {
5258
5279
  var values = (0, _stringify.default)(value);
5259
5280
  return _Storage.default.setItemAsync(name, values);
5260
5281
  },
5261
- unPinWithName: function (name
5282
+ unPinWithName: function unPinWithName(name
5262
5283
  /*: string*/
5263
5284
  ) {
5264
5285
  return _Storage.default.removeItemAsync(name);
5265
5286
  },
5266
- getAllContents: function ()
5287
+ getAllContents: function getAllContents()
5267
5288
  /*: Object*/
5268
5289
  {
5269
5290
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
5270
5291
  var keys;
5271
- return _regeneratorRuntime().wrap(function (_context3) {
5292
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
5272
5293
  while (1) {
5273
5294
  switch (_context3.prev = _context3.next) {
5274
5295
  case 0:
@@ -5280,7 +5301,7 @@ var LocalDatastoreController = {
5280
5301
  return _context3.abrupt("return", (0, _reduce.default)(keys).call(keys, /*#__PURE__*/function () {
5281
5302
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(previousPromise, key) {
5282
5303
  var LDS, value;
5283
- return _regeneratorRuntime().wrap(function (_context2) {
5304
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
5284
5305
  while (1) {
5285
5306
  switch (_context2.prev = _context2.next) {
5286
5307
  case 0:
@@ -5318,7 +5339,7 @@ var LocalDatastoreController = {
5318
5339
  }, _callee2);
5319
5340
  }));
5320
5341
 
5321
- return function () {
5342
+ return function (_x, _x2) {
5322
5343
  return _ref.apply(this, arguments);
5323
5344
  };
5324
5345
  }(), _promise.default.resolve({})));
@@ -5332,12 +5353,12 @@ var LocalDatastoreController = {
5332
5353
  }))();
5333
5354
  },
5334
5355
  // Used for testing
5335
- getRawStorage: function ()
5356
+ getRawStorage: function getRawStorage()
5336
5357
  /*: Object*/
5337
5358
  {
5338
5359
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
5339
5360
  var keys;
5340
- return _regeneratorRuntime().wrap(function (_context5) {
5361
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
5341
5362
  while (1) {
5342
5363
  switch (_context5.prev = _context5.next) {
5343
5364
  case 0:
@@ -5349,7 +5370,7 @@ var LocalDatastoreController = {
5349
5370
  return _context5.abrupt("return", (0, _reduce.default)(keys).call(keys, /*#__PURE__*/function () {
5350
5371
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(previousPromise, key) {
5351
5372
  var LDS, value;
5352
- return _regeneratorRuntime().wrap(function (_context4) {
5373
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
5353
5374
  while (1) {
5354
5375
  switch (_context4.prev = _context4.next) {
5355
5376
  case 0:
@@ -5374,7 +5395,7 @@ var LocalDatastoreController = {
5374
5395
  }, _callee4);
5375
5396
  }));
5376
5397
 
5377
- return function () {
5398
+ return function (_x3, _x4) {
5378
5399
  return _ref2.apply(this, arguments);
5379
5400
  };
5380
5401
  }(), _promise.default.resolve({})));
@@ -5387,13 +5408,15 @@ var LocalDatastoreController = {
5387
5408
  }, _callee5);
5388
5409
  }))();
5389
5410
  },
5390
- clear: function ()
5411
+ clear: function clear()
5391
5412
  /*: Promise*/
5392
5413
  {
5414
+ var _this = this;
5415
+
5393
5416
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
5394
5417
  var keys, toRemove, _iterator, _step, key, promises;
5395
5418
 
5396
- return _regeneratorRuntime().wrap(function (_context6) {
5419
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
5397
5420
  while (1) {
5398
5421
  switch (_context6.prev = _context6.next) {
5399
5422
  case 0:
@@ -5419,7 +5442,7 @@ var LocalDatastoreController = {
5419
5442
  _iterator.f();
5420
5443
  }
5421
5444
 
5422
- promises = (0, _map.default)(toRemove).call(toRemove, this.unPinWithName);
5445
+ promises = (0, _map.default)(toRemove).call(toRemove, _this.unPinWithName);
5423
5446
  return _context6.abrupt("return", _promise.default.all(promises));
5424
5447
 
5425
5448
  case 8:
@@ -7805,7 +7828,7 @@ var ParseCLP = /*#__PURE__*/function () {
7805
7828
  _step;
7806
7829
 
7807
7830
  try {
7808
- var _loop = function () {
7831
+ var _loop = function _loop() {
7809
7832
  var _step$value = (0, _slicedToArray2.default)(_step.value, 2),
7810
7833
  operation = _step$value[0],
7811
7834
  group = _step$value[1];
@@ -7936,7 +7959,7 @@ var ParseCLP = /*#__PURE__*/function () {
7936
7959
 
7937
7960
  (0, _createClass2.default)(ParseCLP, [{
7938
7961
  key: "toJSON",
7939
- value: function ()
7962
+ value: function toJSON()
7940
7963
  /*: PermissionsMap*/
7941
7964
  {
7942
7965
  return _objectSpread({}, this.permissionsMap);
@@ -7950,7 +7973,7 @@ var ParseCLP = /*#__PURE__*/function () {
7950
7973
 
7951
7974
  }, {
7952
7975
  key: "equals",
7953
- value: function (other
7976
+ value: function equals(other
7954
7977
  /*: ParseCLP*/
7955
7978
  )
7956
7979
  /*: boolean*/
@@ -7993,7 +8016,7 @@ var ParseCLP = /*#__PURE__*/function () {
7993
8016
  }
7994
8017
  }, {
7995
8018
  key: "_getRoleName",
7996
- value: function (role
8019
+ value: function _getRoleName(role
7997
8020
  /*: ParseRole | string*/
7998
8021
  )
7999
8022
  /*: string*/
@@ -8013,7 +8036,7 @@ var ParseCLP = /*#__PURE__*/function () {
8013
8036
  }
8014
8037
  }, {
8015
8038
  key: "_parseEntity",
8016
- value: function (entity
8039
+ value: function _parseEntity(entity
8017
8040
  /*: Entity*/
8018
8041
  ) {
8019
8042
  var userId = entity;
@@ -8036,7 +8059,7 @@ var ParseCLP = /*#__PURE__*/function () {
8036
8059
  }
8037
8060
  }, {
8038
8061
  key: "_setAccess",
8039
- value: function (permission
8062
+ value: function _setAccess(permission
8040
8063
  /*: string*/
8041
8064
  , userId
8042
8065
  /*: Entity*/
@@ -8068,7 +8091,7 @@ var ParseCLP = /*#__PURE__*/function () {
8068
8091
  }
8069
8092
  }, {
8070
8093
  key: "_getAccess",
8071
- value: function (permission
8094
+ value: function _getAccess(permission
8072
8095
  /*: string*/
8073
8096
  , userId
8074
8097
  /*: Entity*/
@@ -8091,7 +8114,7 @@ var ParseCLP = /*#__PURE__*/function () {
8091
8114
  }
8092
8115
  }, {
8093
8116
  key: "_setArrayAccess",
8094
- value: function (permission
8117
+ value: function _setArrayAccess(permission
8095
8118
  /*: string*/
8096
8119
  , userId
8097
8120
  /*: Entity*/
@@ -8117,7 +8140,7 @@ var ParseCLP = /*#__PURE__*/function () {
8117
8140
  }
8118
8141
  }, {
8119
8142
  key: "_setGroupPointerPermission",
8120
- value: function (operation
8143
+ value: function _setGroupPointerPermission(operation
8121
8144
  /*: string*/
8122
8145
  , pointerFields
8123
8146
  /*: string[]*/
@@ -8140,7 +8163,7 @@ var ParseCLP = /*#__PURE__*/function () {
8140
8163
  }
8141
8164
  }, {
8142
8165
  key: "_getGroupPointerPermissions",
8143
- value: function (operation
8166
+ value: function _getGroupPointerPermissions(operation
8144
8167
  /*: string*/
8145
8168
  )
8146
8169
  /*: string[]*/
@@ -8155,7 +8178,7 @@ var ParseCLP = /*#__PURE__*/function () {
8155
8178
 
8156
8179
  }, {
8157
8180
  key: "setReadUserFields",
8158
- value: function (pointerFields
8181
+ value: function setReadUserFields(pointerFields
8159
8182
  /*: string[]*/
8160
8183
  ) {
8161
8184
  this._setGroupPointerPermission('readUserFields', pointerFields);
@@ -8166,7 +8189,7 @@ var ParseCLP = /*#__PURE__*/function () {
8166
8189
 
8167
8190
  }, {
8168
8191
  key: "getReadUserFields",
8169
- value: function ()
8192
+ value: function getReadUserFields()
8170
8193
  /*: string[]*/
8171
8194
  {
8172
8195
  return this._getGroupPointerPermissions('readUserFields');
@@ -8179,7 +8202,7 @@ var ParseCLP = /*#__PURE__*/function () {
8179
8202
 
8180
8203
  }, {
8181
8204
  key: "setWriteUserFields",
8182
- value: function (pointerFields
8205
+ value: function setWriteUserFields(pointerFields
8183
8206
  /*: string[]*/
8184
8207
  ) {
8185
8208
  this._setGroupPointerPermission('writeUserFields', pointerFields);
@@ -8190,7 +8213,7 @@ var ParseCLP = /*#__PURE__*/function () {
8190
8213
 
8191
8214
  }, {
8192
8215
  key: "getWriteUserFields",
8193
- value: function ()
8216
+ value: function getWriteUserFields()
8194
8217
  /*: string[]*/
8195
8218
  {
8196
8219
  return this._getGroupPointerPermissions('writeUserFields');
@@ -8204,7 +8227,7 @@ var ParseCLP = /*#__PURE__*/function () {
8204
8227
 
8205
8228
  }, {
8206
8229
  key: "setProtectedFields",
8207
- value: function (userId
8230
+ value: function setProtectedFields(userId
8208
8231
  /*: Entity*/
8209
8232
  , fields
8210
8233
  /*: string[]*/
@@ -8220,7 +8243,7 @@ var ParseCLP = /*#__PURE__*/function () {
8220
8243
 
8221
8244
  }, {
8222
8245
  key: "getProtectedFields",
8223
- value: function (userId
8246
+ value: function getProtectedFields(userId
8224
8247
  /*: Entity*/
8225
8248
  )
8226
8249
  /*: string[]*/
@@ -8236,7 +8259,7 @@ var ParseCLP = /*#__PURE__*/function () {
8236
8259
 
8237
8260
  }, {
8238
8261
  key: "setReadAccess",
8239
- value: function (userId
8262
+ value: function setReadAccess(userId
8240
8263
  /*: Entity*/
8241
8264
  , allowed
8242
8265
  /*: boolean*/
@@ -8259,7 +8282,7 @@ var ParseCLP = /*#__PURE__*/function () {
8259
8282
 
8260
8283
  }, {
8261
8284
  key: "getReadAccess",
8262
- value: function (userId
8285
+ value: function getReadAccess(userId
8263
8286
  /*: Entity*/
8264
8287
  )
8265
8288
  /*: boolean*/
@@ -8275,7 +8298,7 @@ var ParseCLP = /*#__PURE__*/function () {
8275
8298
 
8276
8299
  }, {
8277
8300
  key: "setWriteAccess",
8278
- value: function (userId
8301
+ value: function setWriteAccess(userId
8279
8302
  /*: Entity*/
8280
8303
  , allowed
8281
8304
  /*: boolean*/
@@ -8300,7 +8323,7 @@ var ParseCLP = /*#__PURE__*/function () {
8300
8323
 
8301
8324
  }, {
8302
8325
  key: "getWriteAccess",
8303
- value: function (userId
8326
+ value: function getWriteAccess(userId
8304
8327
  /*: Entity*/
8305
8328
  )
8306
8329
  /*: boolean*/
@@ -8315,7 +8338,7 @@ var ParseCLP = /*#__PURE__*/function () {
8315
8338
 
8316
8339
  }, {
8317
8340
  key: "setPublicReadAccess",
8318
- value: function (allowed
8341
+ value: function setPublicReadAccess(allowed
8319
8342
  /*: boolean*/
8320
8343
  ) {
8321
8344
  this.setReadAccess(PUBLIC_KEY, allowed);
@@ -8328,7 +8351,7 @@ var ParseCLP = /*#__PURE__*/function () {
8328
8351
 
8329
8352
  }, {
8330
8353
  key: "getPublicReadAccess",
8331
- value: function ()
8354
+ value: function getPublicReadAccess()
8332
8355
  /*: boolean*/
8333
8356
  {
8334
8357
  return this.getReadAccess(PUBLIC_KEY);
@@ -8341,7 +8364,7 @@ var ParseCLP = /*#__PURE__*/function () {
8341
8364
 
8342
8365
  }, {
8343
8366
  key: "setPublicWriteAccess",
8344
- value: function (allowed
8367
+ value: function setPublicWriteAccess(allowed
8345
8368
  /*: boolean*/
8346
8369
  ) {
8347
8370
  this.setWriteAccess(PUBLIC_KEY, allowed);
@@ -8354,7 +8377,7 @@ var ParseCLP = /*#__PURE__*/function () {
8354
8377
 
8355
8378
  }, {
8356
8379
  key: "getPublicWriteAccess",
8357
- value: function ()
8380
+ value: function getPublicWriteAccess()
8358
8381
  /*: boolean*/
8359
8382
  {
8360
8383
  return this.getWriteAccess(PUBLIC_KEY);
@@ -8367,7 +8390,7 @@ var ParseCLP = /*#__PURE__*/function () {
8367
8390
 
8368
8391
  }, {
8369
8392
  key: "setPublicProtectedFields",
8370
- value: function (fields
8393
+ value: function setPublicProtectedFields(fields
8371
8394
  /*: string[]*/
8372
8395
  ) {
8373
8396
  this.setProtectedFields(PUBLIC_KEY, fields);
@@ -8380,7 +8403,7 @@ var ParseCLP = /*#__PURE__*/function () {
8380
8403
 
8381
8404
  }, {
8382
8405
  key: "getPublicProtectedFields",
8383
- value: function ()
8406
+ value: function getPublicProtectedFields()
8384
8407
  /*: string[]*/
8385
8408
  {
8386
8409
  return this.getProtectedFields(PUBLIC_KEY);
@@ -8397,7 +8420,7 @@ var ParseCLP = /*#__PURE__*/function () {
8397
8420
 
8398
8421
  }, {
8399
8422
  key: "getRoleReadAccess",
8400
- value: function (role
8423
+ value: function getRoleReadAccess(role
8401
8424
  /*: ParseRole | string*/
8402
8425
  )
8403
8426
  /*: boolean*/
@@ -8416,7 +8439,7 @@ var ParseCLP = /*#__PURE__*/function () {
8416
8439
 
8417
8440
  }, {
8418
8441
  key: "getRoleWriteAccess",
8419
- value: function (role
8442
+ value: function getRoleWriteAccess(role
8420
8443
  /*: ParseRole | string*/
8421
8444
  )
8422
8445
  /*: boolean*/
@@ -8434,7 +8457,7 @@ var ParseCLP = /*#__PURE__*/function () {
8434
8457
 
8435
8458
  }, {
8436
8459
  key: "setRoleReadAccess",
8437
- value: function (role
8460
+ value: function setRoleReadAccess(role
8438
8461
  /*: ParseRole | string*/
8439
8462
  , allowed
8440
8463
  /*: boolean*/
@@ -8452,7 +8475,7 @@ var ParseCLP = /*#__PURE__*/function () {
8452
8475
 
8453
8476
  }, {
8454
8477
  key: "setRoleWriteAccess",
8455
- value: function (role
8478
+ value: function setRoleWriteAccess(role
8456
8479
  /*: ParseRole | string*/
8457
8480
  , allowed
8458
8481
  /*: boolean*/
@@ -8471,7 +8494,7 @@ var ParseCLP = /*#__PURE__*/function () {
8471
8494
 
8472
8495
  }, {
8473
8496
  key: "getRoleProtectedFields",
8474
- value: function (role
8497
+ value: function getRoleProtectedFields(role
8475
8498
  /*: ParseRole | string*/
8476
8499
  )
8477
8500
  /*: string[]*/
@@ -8489,7 +8512,7 @@ var ParseCLP = /*#__PURE__*/function () {
8489
8512
 
8490
8513
  }, {
8491
8514
  key: "setRoleProtectedFields",
8492
- value: function (role
8515
+ value: function setRoleProtectedFields(role
8493
8516
  /*: ParseRole | string*/
8494
8517
  , fields
8495
8518
  /*: string[]*/
@@ -10067,6 +10090,8 @@ var ParseFile = /*#__PURE__*/function () {
10067
10090
  key: "getData",
10068
10091
  value: function () {
10069
10092
  var _getData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10093
+ var _this = this;
10094
+
10070
10095
  var options, controller, result;
10071
10096
  return _regeneratorRuntime().wrap(function (_context4) {
10072
10097
  while (1) {
@@ -10090,7 +10115,7 @@ var ParseFile = /*#__PURE__*/function () {
10090
10115
  case 4:
10091
10116
  options = {
10092
10117
  requestTask: function (task) {
10093
- return this._requestTask = task;
10118
+ return _this._requestTask = task;
10094
10119
  }
10095
10120
  };
10096
10121
  controller = _CoreManager.default.getFileController();
@@ -10110,9 +10135,11 @@ var ParseFile = /*#__PURE__*/function () {
10110
10135
  }, _callee, this);
10111
10136
  }));
10112
10137
 
10113
- return function () {
10138
+ function getData() {
10114
10139
  return _getData.apply(this, arguments);
10115
- };
10140
+ }
10141
+
10142
+ return getData;
10116
10143
  }()
10117
10144
  /**
10118
10145
  * Gets the name of the file. Before save is called, this is the filename
@@ -10357,11 +10384,13 @@ var ParseFile = /*#__PURE__*/function () {
10357
10384
  value: function (metadata
10358
10385
  /*: any*/
10359
10386
  ) {
10387
+ var _this4 = this;
10388
+
10360
10389
  if (metadata && (0, _typeof2.default)(metadata) === 'object') {
10361
10390
  var _context5;
10362
10391
 
10363
10392
  (0, _forEach.default)(_context5 = (0, _keys.default)(metadata)).call(_context5, function (key) {
10364
- this.addMetadata(key, metadata[key]);
10393
+ _this4.addMetadata(key, metadata[key]);
10365
10394
  });
10366
10395
  }
10367
10396
  }
@@ -10394,11 +10423,13 @@ var ParseFile = /*#__PURE__*/function () {
10394
10423
  value: function (tags
10395
10424
  /*: any*/
10396
10425
  ) {
10426
+ var _this5 = this;
10427
+
10397
10428
  if (tags && (0, _typeof2.default)(tags) === 'object') {
10398
10429
  var _context6;
10399
10430
 
10400
10431
  (0, _forEach.default)(_context6 = (0, _keys.default)(tags)).call(_context6, function (key) {
10401
- this.addTag(key, tags[key]);
10432
+ _this5.addTag(key, tags[key]);
10402
10433
  });
10403
10434
  }
10404
10435
  }
@@ -10469,7 +10500,7 @@ var DefaultController = {
10469
10500
  ) {
10470
10501
  var base64Data, _base64Data$split, _base64Data$split2, first, second, data, newSource;
10471
10502
 
10472
- return _regeneratorRuntime().wrap(function (_context7) {
10503
+ return _regeneratorRuntime().wrap(function _callee2$(_context7) {
10473
10504
  while (1) {
10474
10505
  switch (_context7.prev = _context7.next) {
10475
10506
  case 0:
@@ -10524,11 +10555,13 @@ var DefaultController = {
10524
10555
  }, _callee2);
10525
10556
  }));
10526
10557
 
10527
- return function () {
10558
+ function saveFile(_x, _x2, _x3) {
10528
10559
  return _saveFile.apply(this, arguments);
10529
- };
10560
+ }
10561
+
10562
+ return saveFile;
10530
10563
  }(),
10531
- saveBase64: function (name
10564
+ saveBase64: function saveBase64(name
10532
10565
  /*: string*/
10533
10566
  , source
10534
10567
  /*: FileSource*/
@@ -10555,16 +10588,17 @@ var DefaultController = {
10555
10588
  data._ContentType = source.type;
10556
10589
  }
10557
10590
 
10558
- return _CoreManager.default.getRESTController().request('POST', 'files/' + name, data, options);
10591
+ var path = 'files/' + name;
10592
+ return _CoreManager.default.getRESTController().request('POST', path, data, options);
10559
10593
  },
10560
- download: function (uri, options) {
10594
+ download: function download(uri, options) {
10561
10595
  if (XHR) {
10562
10596
  return this.downloadAjax(uri, options);
10563
10597
  } else {
10564
10598
  return _promise.default.reject('Cannot make a request: No definition of XMLHttpRequest was found.');
10565
10599
  }
10566
10600
  },
10567
- downloadAjax: function (uri, options) {
10601
+ downloadAjax: function downloadAjax(uri, options) {
10568
10602
  return new _promise.default(function (resolve, reject) {
10569
10603
  var xhr = new XHR();
10570
10604
  xhr.open('GET', uri, true);
@@ -10594,7 +10628,7 @@ var DefaultController = {
10594
10628
  xhr.send();
10595
10629
  });
10596
10630
  },
10597
- deleteFile: function (name
10631
+ deleteFile: function deleteFile(name
10598
10632
  /*: string*/
10599
10633
  , options
10600
10634
  /*:: ?: FullOptions*/
@@ -10623,12 +10657,12 @@ var DefaultController = {
10623
10657
  }
10624
10658
  });
10625
10659
  },
10626
- _setXHR: function (xhr
10660
+ _setXHR: function _setXHR(xhr
10627
10661
  /*: any*/
10628
10662
  ) {
10629
10663
  XHR = xhr;
10630
10664
  },
10631
- _getXHR: function () {
10665
+ _getXHR: function _getXHR() {
10632
10666
  return XHR;
10633
10667
  }
10634
10668
  };
@@ -11447,7 +11481,7 @@ var LiveQuery = new _EventEmitter.default();
11447
11481
 
11448
11482
  LiveQuery.open = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
11449
11483
  var liveQueryClient;
11450
- return _regeneratorRuntime().wrap(function (_context) {
11484
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
11451
11485
  while (1) {
11452
11486
  switch (_context.prev = _context.next) {
11453
11487
  case 0:
@@ -11475,7 +11509,7 @@ LiveQuery.open = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_reg
11475
11509
 
11476
11510
  LiveQuery.close = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
11477
11511
  var liveQueryClient;
11478
- return _regeneratorRuntime().wrap(function (_context2) {
11512
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11479
11513
  while (1) {
11480
11514
  switch (_context2.prev = _context2.next) {
11481
11515
  case 0:
@@ -11499,18 +11533,18 @@ var _default = LiveQuery;
11499
11533
  exports.default = _default;
11500
11534
  var defaultLiveQueryClient;
11501
11535
  var DefaultLiveQueryController = {
11502
- setDefaultLiveQueryClient: function (liveQueryClient
11536
+ setDefaultLiveQueryClient: function setDefaultLiveQueryClient(liveQueryClient
11503
11537
  /*: LiveQueryClient*/
11504
11538
  ) {
11505
11539
  defaultLiveQueryClient = liveQueryClient;
11506
11540
  },
11507
- getDefaultLiveQueryClient: function ()
11541
+ getDefaultLiveQueryClient: function getDefaultLiveQueryClient()
11508
11542
  /*: Promise<LiveQueryClient>*/
11509
11543
  {
11510
11544
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
11511
11545
  var _yield$Promise$all, _yield$Promise$all2, currentUser, installationId, sessionToken, liveQueryServerURL, serverURL, protocol, host, applicationId, javascriptKey, masterKey;
11512
11546
 
11513
- return _regeneratorRuntime().wrap(function (_context3) {
11547
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
11514
11548
  while (1) {
11515
11549
  switch (_context3.prev = _context3.next) {
11516
11550
  case 0:
@@ -11581,7 +11615,7 @@ var DefaultLiveQueryController = {
11581
11615
  }, _callee3);
11582
11616
  }))();
11583
11617
  },
11584
- _clearCachedDefaultClient: function () {
11618
+ _clearCachedDefaultClient: function _clearCachedDefaultClient() {
11585
11619
  defaultLiveQueryClient = null;
11586
11620
  }
11587
11621
  };
@@ -13530,7 +13564,7 @@ var ParseObject = /*#__PURE__*/function () {
13530
13564
  /*:: ?: RequestOptions*/
13531
13565
  ) {
13532
13566
  var query;
13533
- return _regeneratorRuntime().wrap(function (_context) {
13567
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13534
13568
  while (1) {
13535
13569
  switch (_context.prev = _context.next) {
13536
13570
  case 0:
@@ -13572,9 +13606,11 @@ var ParseObject = /*#__PURE__*/function () {
13572
13606
  }, _callee, this, [[2, 9]]);
13573
13607
  }));
13574
13608
 
13575
- return function () {
13609
+ function exists(_x) {
13576
13610
  return _exists.apply(this, arguments);
13577
- };
13611
+ }
13612
+
13613
+ return exists;
13578
13614
  }()
13579
13615
  /**
13580
13616
  * Checks if the model is currently in a valid state.
@@ -13584,7 +13620,7 @@ var ParseObject = /*#__PURE__*/function () {
13584
13620
 
13585
13621
  }, {
13586
13622
  key: "isValid",
13587
- value: function ()
13623
+ value: function isValid()
13588
13624
  /*: boolean*/
13589
13625
  {
13590
13626
  return !this.validate(this.attributes);
@@ -13602,7 +13638,7 @@ var ParseObject = /*#__PURE__*/function () {
13602
13638
 
13603
13639
  }, {
13604
13640
  key: "validate",
13605
- value: function (attrs
13641
+ value: function validate(attrs
13606
13642
  /*: AttributeMap*/
13607
13643
  )
13608
13644
  /*: ParseError | boolean*/
@@ -13628,7 +13664,7 @@ var ParseObject = /*#__PURE__*/function () {
13628
13664
 
13629
13665
  }, {
13630
13666
  key: "getACL",
13631
- value: function ()
13667
+ value: function getACL()
13632
13668
  /*: ?ParseACL*/
13633
13669
  {
13634
13670
  var acl = this.get('ACL');
@@ -13650,7 +13686,7 @@ var ParseObject = /*#__PURE__*/function () {
13650
13686
 
13651
13687
  }, {
13652
13688
  key: "setACL",
13653
- value: function (acl
13689
+ value: function setACL(acl
13654
13690
  /*: ParseACL*/
13655
13691
  , options
13656
13692
  /*:: ?: mixed*/
@@ -13667,7 +13703,7 @@ var ParseObject = /*#__PURE__*/function () {
13667
13703
 
13668
13704
  }, {
13669
13705
  key: "revert",
13670
- value: function ()
13706
+ value: function revert()
13671
13707
  /*: void*/
13672
13708
  {
13673
13709
  var keysToRevert;
@@ -13709,7 +13745,7 @@ var ParseObject = /*#__PURE__*/function () {
13709
13745
 
13710
13746
  }, {
13711
13747
  key: "clear",
13712
- value: function ()
13748
+ value: function clear()
13713
13749
  /*: ParseObject | boolean*/
13714
13750
  {
13715
13751
  var attributes = this.attributes;
@@ -13750,7 +13786,7 @@ var ParseObject = /*#__PURE__*/function () {
13750
13786
 
13751
13787
  }, {
13752
13788
  key: "fetch",
13753
- value: function (options
13789
+ value: function fetch(options
13754
13790
  /*: RequestOptions*/
13755
13791
  )
13756
13792
  /*: Promise*/
@@ -13815,7 +13851,7 @@ var ParseObject = /*#__PURE__*/function () {
13815
13851
 
13816
13852
  }, {
13817
13853
  key: "fetchWithInclude",
13818
- value: function (keys
13854
+ value: function fetchWithInclude(keys
13819
13855
  /*: String | Array<string | Array<string>>*/
13820
13856
  , options
13821
13857
  /*: RequestOptions*/
@@ -13857,7 +13893,7 @@ var ParseObject = /*#__PURE__*/function () {
13857
13893
  var _saveEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(options
13858
13894
  /*: SaveOptions*/
13859
13895
  ) {
13860
- return _regeneratorRuntime().wrap(function (_context4) {
13896
+ return _regeneratorRuntime().wrap(function _callee2$(_context4) {
13861
13897
  while (1) {
13862
13898
  switch (_context4.prev = _context4.next) {
13863
13899
  case 0:
@@ -13895,9 +13931,11 @@ var ParseObject = /*#__PURE__*/function () {
13895
13931
  }, _callee2, this, [[0, 5]]);
13896
13932
  }));
13897
13933
 
13898
- return function () {
13934
+ function saveEventually(_x2) {
13899
13935
  return _saveEventually.apply(this, arguments);
13900
- };
13936
+ }
13937
+
13938
+ return saveEventually;
13901
13939
  }()
13902
13940
  /**
13903
13941
  * Set a hash of model attributes, and save the model to the server.
@@ -13965,7 +14003,7 @@ var ParseObject = /*#__PURE__*/function () {
13965
14003
 
13966
14004
  }, {
13967
14005
  key: "save",
13968
- value: function (arg1
14006
+ value: function save(arg1
13969
14007
  /*: ?string | { [attr: string]: mixed }*/
13970
14008
  , arg2
13971
14009
  /*: SaveOptions | mixed*/
@@ -13974,6 +14012,8 @@ var ParseObject = /*#__PURE__*/function () {
13974
14012
  )
13975
14013
  /*: Promise*/
13976
14014
  {
14015
+ var _this = this;
14016
+
13977
14017
  var attrs;
13978
14018
  var options;
13979
14019
 
@@ -14022,7 +14062,7 @@ var ParseObject = /*#__PURE__*/function () {
14022
14062
 
14023
14063
  var unsaved = options.cascadeSave !== false ? (0, _unsavedChildren.default)(this) : null;
14024
14064
  return controller.save(unsaved, saveOptions).then(function () {
14025
- return controller.save(this, saveOptions);
14065
+ return controller.save(_this, saveOptions);
14026
14066
  });
14027
14067
  }
14028
14068
  /**
@@ -14054,7 +14094,7 @@ var ParseObject = /*#__PURE__*/function () {
14054
14094
  var _destroyEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(options
14055
14095
  /*: RequestOptions*/
14056
14096
  ) {
14057
- return _regeneratorRuntime().wrap(function (_context5) {
14097
+ return _regeneratorRuntime().wrap(function _callee3$(_context5) {
14058
14098
  while (1) {
14059
14099
  switch (_context5.prev = _context5.next) {
14060
14100
  case 0:
@@ -14092,9 +14132,11 @@ var ParseObject = /*#__PURE__*/function () {
14092
14132
  }, _callee3, this, [[0, 5]]);
14093
14133
  }));
14094
14134
 
14095
- return function () {
14135
+ function destroyEventually(_x3) {
14096
14136
  return _destroyEventually.apply(this, arguments);
14097
- };
14137
+ }
14138
+
14139
+ return destroyEventually;
14098
14140
  }()
14099
14141
  /**
14100
14142
  * Destroy this model on the server if it was already persisted.
@@ -14113,7 +14155,7 @@ var ParseObject = /*#__PURE__*/function () {
14113
14155
 
14114
14156
  }, {
14115
14157
  key: "destroy",
14116
- value: function (options
14158
+ value: function destroy(options
14117
14159
  /*: RequestOptions*/
14118
14160
  )
14119
14161
  /*: Promise*/
@@ -14158,7 +14200,7 @@ var ParseObject = /*#__PURE__*/function () {
14158
14200
 
14159
14201
  }, {
14160
14202
  key: "pin",
14161
- value: function ()
14203
+ value: function pin()
14162
14204
  /*: Promise<void>*/
14163
14205
  {
14164
14206
  return ParseObject.pinAllWithName(_LocalDatastoreUtils.DEFAULT_PIN, [this]);
@@ -14176,7 +14218,7 @@ var ParseObject = /*#__PURE__*/function () {
14176
14218
 
14177
14219
  }, {
14178
14220
  key: "unPin",
14179
- value: function ()
14221
+ value: function unPin()
14180
14222
  /*: Promise<void>*/
14181
14223
  {
14182
14224
  return ParseObject.unPinAllWithName(_LocalDatastoreUtils.DEFAULT_PIN, [this]);
@@ -14196,7 +14238,7 @@ var ParseObject = /*#__PURE__*/function () {
14196
14238
  value: function () {
14197
14239
  var _isPinned = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
14198
14240
  var localDatastore, objectKey, pin;
14199
- return _regeneratorRuntime().wrap(function (_context6) {
14241
+ return _regeneratorRuntime().wrap(function _callee4$(_context6) {
14200
14242
  while (1) {
14201
14243
  switch (_context6.prev = _context6.next) {
14202
14244
  case 0:
@@ -14226,9 +14268,11 @@ var ParseObject = /*#__PURE__*/function () {
14226
14268
  }, _callee4, this);
14227
14269
  }));
14228
14270
 
14229
- return function () {
14271
+ function isPinned() {
14230
14272
  return _isPinned.apply(this, arguments);
14231
- };
14273
+ }
14274
+
14275
+ return isPinned;
14232
14276
  }()
14233
14277
  /**
14234
14278
  * Asynchronously stores the objects and every object they point to in the local datastore, recursively.
@@ -14249,7 +14293,7 @@ var ParseObject = /*#__PURE__*/function () {
14249
14293
 
14250
14294
  }, {
14251
14295
  key: "pinWithName",
14252
- value: function (name
14296
+ value: function pinWithName(name
14253
14297
  /*: string*/
14254
14298
  )
14255
14299
  /*: Promise<void>*/
@@ -14269,7 +14313,7 @@ var ParseObject = /*#__PURE__*/function () {
14269
14313
 
14270
14314
  }, {
14271
14315
  key: "unPinWithName",
14272
- value: function (name
14316
+ value: function unPinWithName(name
14273
14317
  /*: string*/
14274
14318
  )
14275
14319
  /*: Promise<void>*/
@@ -14294,7 +14338,7 @@ var ParseObject = /*#__PURE__*/function () {
14294
14338
  value: function () {
14295
14339
  var _fetchFromLocalDatastore = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
14296
14340
  var localDatastore, objectKey, pinned, result;
14297
- return _regeneratorRuntime().wrap(function (_context7) {
14341
+ return _regeneratorRuntime().wrap(function _callee5$(_context7) {
14298
14342
  while (1) {
14299
14343
  switch (_context7.prev = _context7.next) {
14300
14344
  case 0:
@@ -14337,20 +14381,22 @@ var ParseObject = /*#__PURE__*/function () {
14337
14381
  }, _callee5, this);
14338
14382
  }));
14339
14383
 
14340
- return function () {
14384
+ function fetchFromLocalDatastore() {
14341
14385
  return _fetchFromLocalDatastore.apply(this, arguments);
14342
- };
14386
+ }
14387
+
14388
+ return fetchFromLocalDatastore;
14343
14389
  }()
14344
14390
  /** Static methods **/
14345
14391
 
14346
14392
  }], [{
14347
14393
  key: "_getClassMap",
14348
- value: function () {
14394
+ value: function _getClassMap() {
14349
14395
  return classMap;
14350
14396
  }
14351
14397
  }, {
14352
14398
  key: "_clearAllState",
14353
- value: function () {
14399
+ value: function _clearAllState() {
14354
14400
  var stateController = _CoreManager.default.getObjectStateController();
14355
14401
 
14356
14402
  stateController.clearAllState();
@@ -14384,7 +14430,7 @@ var ParseObject = /*#__PURE__*/function () {
14384
14430
 
14385
14431
  }, {
14386
14432
  key: "fetchAll",
14387
- value: function (list
14433
+ value: function fetchAll(list
14388
14434
  /*: Array<ParseObject>*/
14389
14435
  ) {
14390
14436
  var options
@@ -14438,7 +14484,7 @@ var ParseObject = /*#__PURE__*/function () {
14438
14484
 
14439
14485
  }, {
14440
14486
  key: "fetchAllWithInclude",
14441
- value: function (list
14487
+ value: function fetchAllWithInclude(list
14442
14488
  /*: Array<ParseObject>*/
14443
14489
  , keys
14444
14490
  /*: String | Array<string | Array<string>>*/
@@ -14482,7 +14528,7 @@ var ParseObject = /*#__PURE__*/function () {
14482
14528
 
14483
14529
  }, {
14484
14530
  key: "fetchAllIfNeededWithInclude",
14485
- value: function (list
14531
+ value: function fetchAllIfNeededWithInclude(list
14486
14532
  /*: Array<ParseObject>*/
14487
14533
  , keys
14488
14534
  /*: String | Array<string | Array<string>>*/
@@ -14514,7 +14560,7 @@ var ParseObject = /*#__PURE__*/function () {
14514
14560
 
14515
14561
  }, {
14516
14562
  key: "fetchAllIfNeeded",
14517
- value: function (list
14563
+ value: function fetchAllIfNeeded(list
14518
14564
  /*: Array<ParseObject>*/
14519
14565
  , options) {
14520
14566
  options = options || {};
@@ -14536,7 +14582,7 @@ var ParseObject = /*#__PURE__*/function () {
14536
14582
  }
14537
14583
  }, {
14538
14584
  key: "handleIncludeOptions",
14539
- value: function (options) {
14585
+ value: function handleIncludeOptions(options) {
14540
14586
  var include = [];
14541
14587
 
14542
14588
  if ((0, _isArray.default)(options.include)) {
@@ -14604,7 +14650,7 @@ var ParseObject = /*#__PURE__*/function () {
14604
14650
 
14605
14651
  }, {
14606
14652
  key: "destroyAll",
14607
- value: function (list
14653
+ value: function destroyAll(list
14608
14654
  /*: Array<ParseObject>*/
14609
14655
  ) {
14610
14656
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -14649,7 +14695,7 @@ var ParseObject = /*#__PURE__*/function () {
14649
14695
 
14650
14696
  }, {
14651
14697
  key: "saveAll",
14652
- value: function (list
14698
+ value: function saveAll(list
14653
14699
  /*: Array<ParseObject>*/
14654
14700
  ) {
14655
14701
  var options
@@ -14692,7 +14738,7 @@ var ParseObject = /*#__PURE__*/function () {
14692
14738
 
14693
14739
  }, {
14694
14740
  key: "createWithoutData",
14695
- value: function (id
14741
+ value: function createWithoutData(id
14696
14742
  /*: string*/
14697
14743
  ) {
14698
14744
  var obj = new this();
@@ -14712,7 +14758,7 @@ var ParseObject = /*#__PURE__*/function () {
14712
14758
 
14713
14759
  }, {
14714
14760
  key: "fromJSON",
14715
- value: function (json
14761
+ value: function fromJSON(json
14716
14762
  /*: any*/
14717
14763
  , override
14718
14764
  /*:: ?: boolean*/
@@ -14776,7 +14822,7 @@ var ParseObject = /*#__PURE__*/function () {
14776
14822
 
14777
14823
  }, {
14778
14824
  key: "registerSubclass",
14779
- value: function (className
14825
+ value: function registerSubclass(className
14780
14826
  /*: string*/
14781
14827
  , constructor
14782
14828
  /*: any*/
@@ -14807,7 +14853,7 @@ var ParseObject = /*#__PURE__*/function () {
14807
14853
 
14808
14854
  }, {
14809
14855
  key: "unregisterSubclass",
14810
- value: function (className
14856
+ value: function unregisterSubclass(className
14811
14857
  /*: string*/
14812
14858
  ) {
14813
14859
  if (typeof className !== 'string') {
@@ -14856,7 +14902,7 @@ var ParseObject = /*#__PURE__*/function () {
14856
14902
 
14857
14903
  }, {
14858
14904
  key: "extend",
14859
- value: function (className
14905
+ value: function extend(className
14860
14906
  /*: any*/
14861
14907
  , protoProps
14862
14908
  /*: any*/
@@ -14885,7 +14931,7 @@ var ParseObject = /*#__PURE__*/function () {
14885
14931
  parentProto = classMap[adjustedClassName].prototype;
14886
14932
  }
14887
14933
 
14888
- var ParseObjectSubclass = function (attributes, options) {
14934
+ var ParseObjectSubclass = function ParseObjectSubclass(attributes, options) {
14889
14935
  this.className = adjustedClassName;
14890
14936
  this._objCount = objectCount++; // Enable legacy initializers
14891
14937
 
@@ -14960,7 +15006,7 @@ var ParseObject = /*#__PURE__*/function () {
14960
15006
 
14961
15007
  }, {
14962
15008
  key: "enableSingleInstance",
14963
- value: function () {
15009
+ value: function enableSingleInstance() {
14964
15010
  singleInstance = true;
14965
15011
 
14966
15012
  _CoreManager.default.setObjectStateController(SingleInstanceStateController);
@@ -14976,7 +15022,7 @@ var ParseObject = /*#__PURE__*/function () {
14976
15022
 
14977
15023
  }, {
14978
15024
  key: "disableSingleInstance",
14979
- value: function () {
15025
+ value: function disableSingleInstance() {
14980
15026
  singleInstance = false;
14981
15027
 
14982
15028
  _CoreManager.default.setObjectStateController(UniqueInstanceStateController);
@@ -15002,7 +15048,7 @@ var ParseObject = /*#__PURE__*/function () {
15002
15048
 
15003
15049
  }, {
15004
15050
  key: "pinAll",
15005
- value: function (objects
15051
+ value: function pinAll(objects
15006
15052
  /*: Array<ParseObject>*/
15007
15053
  )
15008
15054
  /*: Promise<void>*/
@@ -15036,7 +15082,7 @@ var ParseObject = /*#__PURE__*/function () {
15036
15082
 
15037
15083
  }, {
15038
15084
  key: "pinAllWithName",
15039
- value: function (name
15085
+ value: function pinAllWithName(name
15040
15086
  /*: string*/
15041
15087
  , objects
15042
15088
  /*: Array<ParseObject>*/
@@ -15066,7 +15112,7 @@ var ParseObject = /*#__PURE__*/function () {
15066
15112
 
15067
15113
  }, {
15068
15114
  key: "unPinAll",
15069
- value: function (objects
15115
+ value: function unPinAll(objects
15070
15116
  /*: Array<ParseObject>*/
15071
15117
  )
15072
15118
  /*: Promise<void>*/
@@ -15094,7 +15140,7 @@ var ParseObject = /*#__PURE__*/function () {
15094
15140
 
15095
15141
  }, {
15096
15142
  key: "unPinAllWithName",
15097
- value: function (name
15143
+ value: function unPinAllWithName(name
15098
15144
  /*: string*/
15099
15145
  , objects
15100
15146
  /*: Array<ParseObject>*/
@@ -15122,7 +15168,7 @@ var ParseObject = /*#__PURE__*/function () {
15122
15168
 
15123
15169
  }, {
15124
15170
  key: "unPinAllObjects",
15125
- value: function ()
15171
+ value: function unPinAllObjects()
15126
15172
  /*: Promise<void>*/
15127
15173
  {
15128
15174
  var localDatastore = _CoreManager.default.getLocalDatastore();
@@ -15148,7 +15194,7 @@ var ParseObject = /*#__PURE__*/function () {
15148
15194
 
15149
15195
  }, {
15150
15196
  key: "unPinAllObjectsWithName",
15151
- value: function (name
15197
+ value: function unPinAllObjectsWithName(name
15152
15198
  /*: string*/
15153
15199
  )
15154
15200
  /*: Promise<void>*/
@@ -15166,7 +15212,7 @@ var ParseObject = /*#__PURE__*/function () {
15166
15212
  }();
15167
15213
 
15168
15214
  var DefaultController = {
15169
- fetch: function (target
15215
+ fetch: function fetch(target
15170
15216
  /*: ParseObject | Array<ParseObject>*/
15171
15217
  , forceFetch
15172
15218
  /*: boolean*/
@@ -15228,7 +15274,7 @@ var DefaultController = {
15228
15274
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(objects) {
15229
15275
  var idMap, i, obj, _i, _obj, id, _iterator2, _step2, object;
15230
15276
 
15231
- return _regeneratorRuntime().wrap(function (_context9) {
15277
+ return _regeneratorRuntime().wrap(function _callee6$(_context9) {
15232
15278
  while (1) {
15233
15279
  switch (_context9.prev = _context9.next) {
15234
15280
  case 0:
@@ -15326,7 +15372,7 @@ var DefaultController = {
15326
15372
  }, _callee6, null, [[13, 23, 26, 29]]);
15327
15373
  }));
15328
15374
 
15329
- return function () {
15375
+ return function (_x4) {
15330
15376
  return _ref.apply(this, arguments);
15331
15377
  };
15332
15378
  }());
@@ -15345,7 +15391,7 @@ var DefaultController = {
15345
15391
 
15346
15392
  return RESTController.request('GET', 'classes/' + target.className + '/' + target._getId(), params, options).then( /*#__PURE__*/function () {
15347
15393
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(response) {
15348
- return _regeneratorRuntime().wrap(function (_context10) {
15394
+ return _regeneratorRuntime().wrap(function _callee7$(_context10) {
15349
15395
  while (1) {
15350
15396
  switch (_context10.prev = _context10.next) {
15351
15397
  case 0:
@@ -15369,7 +15415,7 @@ var DefaultController = {
15369
15415
  }, _callee7);
15370
15416
  }));
15371
15417
 
15372
- return function () {
15418
+ return function (_x5) {
15373
15419
  return _ref2.apply(this, arguments);
15374
15420
  };
15375
15421
  }());
@@ -15377,7 +15423,7 @@ var DefaultController = {
15377
15423
 
15378
15424
  return _promise.default.resolve();
15379
15425
  },
15380
- destroy: function (target
15426
+ destroy: function destroy(target
15381
15427
  /*: ParseObject | Array<ParseObject>*/
15382
15428
  , options
15383
15429
  /*: RequestOptions*/
@@ -15386,7 +15432,7 @@ var DefaultController = {
15386
15432
  {
15387
15433
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
15388
15434
  var batchSize, localDatastore, RESTController, batches, deleteCompleted, errors;
15389
- return _regeneratorRuntime().wrap(function (_context13) {
15435
+ return _regeneratorRuntime().wrap(function _callee10$(_context13) {
15390
15436
  while (1) {
15391
15437
  switch (_context13.prev = _context13.next) {
15392
15438
  case 0:
@@ -15451,7 +15497,7 @@ var DefaultController = {
15451
15497
  return _context13.abrupt("return", deleteCompleted.then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
15452
15498
  var aggregate, _iterator3, _step3, object;
15453
15499
 
15454
- return _regeneratorRuntime().wrap(function (_context11) {
15500
+ return _regeneratorRuntime().wrap(function _callee8$(_context11) {
15455
15501
  while (1) {
15456
15502
  switch (_context11.prev = _context11.next) {
15457
15503
  case 0:
@@ -15519,7 +15565,7 @@ var DefaultController = {
15519
15565
  }
15520
15566
 
15521
15567
  return _context13.abrupt("return", RESTController.request('DELETE', 'classes/' + target.className + '/' + target._getId(), {}, options).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
15522
- return _regeneratorRuntime().wrap(function (_context12) {
15568
+ return _regeneratorRuntime().wrap(function _callee9$(_context12) {
15523
15569
  while (1) {
15524
15570
  switch (_context12.prev = _context12.next) {
15525
15571
  case 0:
@@ -15548,7 +15594,7 @@ var DefaultController = {
15548
15594
  }, _callee10);
15549
15595
  }))();
15550
15596
  },
15551
- save: function (target
15597
+ save: function save(target
15552
15598
  /*: ParseObject | Array<ParseObject | ParseFile>*/
15553
15599
  , options
15554
15600
  /*: RequestOptions*/
@@ -15627,8 +15673,8 @@ var DefaultController = {
15627
15673
  (0, _forEach.default)(batch).call(batch, function (obj, index) {
15628
15674
  var ready = new _promiseUtils.resolvingPromise();
15629
15675
  batchReady.push(ready);
15630
- stateController.pushPendingState(obj._getStateIdentifier());
15631
- batchTasks.push(stateController.enqueueTask(obj._getStateIdentifier(), function () {
15676
+
15677
+ var task = function task() {
15632
15678
  ready.resolve();
15633
15679
  return batchReturned.then(function (responses) {
15634
15680
  if (responses[index].hasOwnProperty('success')) {
@@ -15649,7 +15695,10 @@ var DefaultController = {
15649
15695
  obj._handleSaveError();
15650
15696
  }
15651
15697
  });
15652
- }));
15698
+ };
15699
+
15700
+ stateController.pushPendingState(obj._getStateIdentifier());
15701
+ batchTasks.push(stateController.enqueueTask(obj._getStateIdentifier(), task));
15653
15702
  });
15654
15703
  (0, _promiseUtils.when)(batchReady).then(function () {
15655
15704
  // Kick off the batch request
@@ -15668,7 +15717,7 @@ var DefaultController = {
15668
15717
  }).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
15669
15718
  var _iterator4, _step4, object;
15670
15719
 
15671
- return _regeneratorRuntime().wrap(function (_context14) {
15720
+ return _regeneratorRuntime().wrap(function _callee11$(_context14) {
15672
15721
  while (1) {
15673
15722
  switch (_context14.prev = _context14.next) {
15674
15723
  case 0:
@@ -15743,7 +15792,7 @@ var DefaultController = {
15743
15792
 
15744
15793
  var targetCopy = target;
15745
15794
 
15746
- var task = function () {
15795
+ var task = function task() {
15747
15796
  var params = targetCopy._getSaveParams();
15748
15797
 
15749
15798
  return RESTController.request(params.method, params.path, params.body, options).then(function (response) {
@@ -15760,7 +15809,7 @@ var DefaultController = {
15760
15809
 
15761
15810
  stateController.pushPendingState(target._getStateIdentifier());
15762
15811
  return stateController.enqueueTask(target._getStateIdentifier(), task).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
15763
- return _regeneratorRuntime().wrap(function (_context15) {
15812
+ return _regeneratorRuntime().wrap(function _callee12$(_context15) {
15764
15813
  while (1) {
15765
15814
  switch (_context15.prev = _context15.next) {
15766
15815
  case 0:
@@ -16577,10 +16626,12 @@ var RelationOp = /*#__PURE__*/function (_Op7) {
16577
16626
  value: function ()
16578
16627
  /*: { __op?: string, objects?: mixed, ops?: mixed }*/
16579
16628
  {
16629
+ var _this7 = this;
16630
+
16580
16631
  var idToPointer = function (id) {
16581
16632
  return {
16582
16633
  __type: 'Pointer',
16583
- className: this._targetClassName,
16634
+ className: _this7._targetClassName,
16584
16635
  objectId: id
16585
16636
  };
16586
16637
  };
@@ -17786,9 +17837,11 @@ var ParseQuery = /*#__PURE__*/function () {
17786
17837
  }, _callee, this);
17787
17838
  }));
17788
17839
 
17789
- return function () {
17840
+ function _handleOfflineQuery() {
17790
17841
  return _handleOfflineQuery2.apply(this, arguments);
17791
- };
17842
+ }
17843
+
17844
+ return _handleOfflineQuery;
17792
17845
  }()
17793
17846
  /**
17794
17847
  * Returns a JSON representation of this query.
@@ -18134,7 +18187,7 @@ var ParseQuery = /*#__PURE__*/function () {
18134
18187
  /*:: ?: BatchOptions*/
18135
18188
  ) {
18136
18189
  var result;
18137
- return _regeneratorRuntime().wrap(function (_context7) {
18190
+ return _regeneratorRuntime().wrap(function _callee2$(_context7) {
18138
18191
  while (1) {
18139
18192
  switch (_context7.prev = _context7.next) {
18140
18193
  case 0:
@@ -18161,9 +18214,11 @@ var ParseQuery = /*#__PURE__*/function () {
18161
18214
  }, _callee2, this);
18162
18215
  }));
18163
18216
 
18164
- return function () {
18217
+ function findAll(_x2) {
18165
18218
  return _findAll.apply(this, arguments);
18166
- };
18219
+ }
18220
+
18221
+ return findAll;
18167
18222
  }()
18168
18223
  /**
18169
18224
  * Counts the number of objects that match this query.
@@ -18182,7 +18237,7 @@ var ParseQuery = /*#__PURE__*/function () {
18182
18237
 
18183
18238
  }, {
18184
18239
  key: "count",
18185
- value: function (options
18240
+ value: function count(options
18186
18241
  /*:: ?: FullOptions*/
18187
18242
  )
18188
18243
  /*: Promise<number>*/
@@ -18224,7 +18279,7 @@ var ParseQuery = /*#__PURE__*/function () {
18224
18279
 
18225
18280
  }, {
18226
18281
  key: "distinct",
18227
- value: function (key
18282
+ value: function distinct(key
18228
18283
  /*: string*/
18229
18284
  , options
18230
18285
  /*:: ?: FullOptions*/
@@ -18266,7 +18321,7 @@ var ParseQuery = /*#__PURE__*/function () {
18266
18321
 
18267
18322
  }, {
18268
18323
  key: "aggregate",
18269
- value: function (pipeline
18324
+ value: function aggregate(pipeline
18270
18325
  /*: mixed*/
18271
18326
  , options
18272
18327
  /*:: ?: FullOptions*/
@@ -18329,11 +18384,13 @@ var ParseQuery = /*#__PURE__*/function () {
18329
18384
 
18330
18385
  }, {
18331
18386
  key: "first",
18332
- value: function (options
18387
+ value: function first(options
18333
18388
  /*:: ?: FullOptions*/
18334
18389
  )
18335
18390
  /*: Promise<ParseObject | void>*/
18336
18391
  {
18392
+ var _this4 = this;
18393
+
18337
18394
  options = options || {};
18338
18395
  var findOptions = {};
18339
18396
 
@@ -18375,7 +18432,7 @@ var ParseQuery = /*#__PURE__*/function () {
18375
18432
  }
18376
18433
 
18377
18434
  if (!objects[0].className) {
18378
- objects[0].className = this.className;
18435
+ objects[0].className = _this4.className;
18379
18436
  } // Make sure the data object contains keys for all objects that
18380
18437
  // have been requested with a select, so that our cached state
18381
18438
  // updates correctly.
@@ -18416,7 +18473,7 @@ var ParseQuery = /*#__PURE__*/function () {
18416
18473
 
18417
18474
  }, {
18418
18475
  key: "eachBatch",
18419
- value: function (callback
18476
+ value: function eachBatch(callback
18420
18477
  /*: (objs: Array<ParseObject>) => Promise<*>*/
18421
18478
  , options
18422
18479
  /*:: ?: BatchOptions*/
@@ -18428,7 +18485,8 @@ var ParseQuery = /*#__PURE__*/function () {
18428
18485
  options = options || {};
18429
18486
 
18430
18487
  if (this._order || this._skip || this._limit >= 0) {
18431
- return _promise.default.reject('Cannot iterate on a query with sort, skip, or limit.');
18488
+ var error = 'Cannot iterate on a query with sort, skip, or limit.';
18489
+ return _promise.default.reject(error);
18432
18490
  }
18433
18491
 
18434
18492
  var query = new ParseQuery(this.className);
@@ -18493,7 +18551,7 @@ var ParseQuery = /*#__PURE__*/function () {
18493
18551
  }, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
18494
18552
  var _yield$Promise$all, _yield$Promise$all2, results;
18495
18553
 
18496
- return _regeneratorRuntime().wrap(function (_context10) {
18554
+ return _regeneratorRuntime().wrap(function _callee3$(_context10) {
18497
18555
  while (1) {
18498
18556
  switch (_context10.prev = _context10.next) {
18499
18557
  case 0:
@@ -18563,7 +18621,7 @@ var ParseQuery = /*#__PURE__*/function () {
18563
18621
 
18564
18622
  }, {
18565
18623
  key: "each",
18566
- value: function (callback
18624
+ value: function each(callback
18567
18625
  /*: (obj: ParseObject) => any*/
18568
18626
  , options
18569
18627
  /*:: ?: BatchOptions*/
@@ -18590,7 +18648,7 @@ var ParseQuery = /*#__PURE__*/function () {
18590
18648
 
18591
18649
  }, {
18592
18650
  key: "hint",
18593
- value: function (value
18651
+ value: function hint(value
18594
18652
  /*: mixed*/
18595
18653
  )
18596
18654
  /*: ParseQuery*/
@@ -18611,7 +18669,7 @@ var ParseQuery = /*#__PURE__*/function () {
18611
18669
 
18612
18670
  }, {
18613
18671
  key: "explain",
18614
- value: function ()
18672
+ value: function explain()
18615
18673
  /*: ParseQuery*/
18616
18674
  {
18617
18675
  var _explain
@@ -18657,8 +18715,10 @@ var ParseQuery = /*#__PURE__*/function () {
18657
18715
  , options
18658
18716
  /*:: ?: BatchOptions*/
18659
18717
  ) {
18718
+ var _this5 = this;
18719
+
18660
18720
  var array, index;
18661
- return _regeneratorRuntime().wrap(function (_context11) {
18721
+ return _regeneratorRuntime().wrap(function _callee4$(_context11) {
18662
18722
  while (1) {
18663
18723
  switch (_context11.prev = _context11.next) {
18664
18724
  case 0:
@@ -18666,7 +18726,7 @@ var ParseQuery = /*#__PURE__*/function () {
18666
18726
  index = 0;
18667
18727
  _context11.next = 4;
18668
18728
  return this.each(function (object) {
18669
- return _promise.default.resolve(callback(object, index, this)).then(function (result) {
18729
+ return _promise.default.resolve(callback(object, index, _this5)).then(function (result) {
18670
18730
  array.push(result);
18671
18731
  index += 1;
18672
18732
  });
@@ -18683,9 +18743,11 @@ var ParseQuery = /*#__PURE__*/function () {
18683
18743
  }, _callee4, this);
18684
18744
  }));
18685
18745
 
18686
- return function () {
18746
+ function map(_x3, _x4) {
18687
18747
  return _map.apply(this, arguments);
18688
- };
18748
+ }
18749
+
18750
+ return map;
18689
18751
  }()
18690
18752
  /**
18691
18753
  * Iterates over each result of a query, calling a callback for each one. If
@@ -18722,7 +18784,7 @@ var ParseQuery = /*#__PURE__*/function () {
18722
18784
  /*:: ?: BatchOptions*/
18723
18785
  ) {
18724
18786
  var accumulator, index;
18725
- return _regeneratorRuntime().wrap(function (_context12) {
18787
+ return _regeneratorRuntime().wrap(function _callee5$(_context12) {
18726
18788
  while (1) {
18727
18789
  switch (_context12.prev = _context12.next) {
18728
18790
  case 0:
@@ -18763,9 +18825,11 @@ var ParseQuery = /*#__PURE__*/function () {
18763
18825
  }, _callee5, this);
18764
18826
  }));
18765
18827
 
18766
- return function () {
18828
+ function reduce(_x5, _x6, _x7) {
18767
18829
  return _reduce.apply(this, arguments);
18768
- };
18830
+ }
18831
+
18832
+ return reduce;
18769
18833
  }()
18770
18834
  /**
18771
18835
  * Iterates over each result of a query, calling a callback for each one. If
@@ -18799,8 +18863,10 @@ var ParseQuery = /*#__PURE__*/function () {
18799
18863
  , options
18800
18864
  /*:: ?: BatchOptions*/
18801
18865
  ) {
18866
+ var _this6 = this;
18867
+
18802
18868
  var array, index;
18803
- return _regeneratorRuntime().wrap(function (_context13) {
18869
+ return _regeneratorRuntime().wrap(function _callee6$(_context13) {
18804
18870
  while (1) {
18805
18871
  switch (_context13.prev = _context13.next) {
18806
18872
  case 0:
@@ -18808,7 +18874,7 @@ var ParseQuery = /*#__PURE__*/function () {
18808
18874
  index = 0;
18809
18875
  _context13.next = 4;
18810
18876
  return this.each(function (object) {
18811
- return _promise.default.resolve(callback(object, index, this)).then(function (flag) {
18877
+ return _promise.default.resolve(callback(object, index, _this6)).then(function (flag) {
18812
18878
  if (flag) {
18813
18879
  array.push(object);
18814
18880
  }
@@ -18828,9 +18894,11 @@ var ParseQuery = /*#__PURE__*/function () {
18828
18894
  }, _callee6, this);
18829
18895
  }));
18830
18896
 
18831
- return function () {
18897
+ function filter(_x8, _x9) {
18832
18898
  return _filter.apply(this, arguments);
18833
- };
18899
+ }
18900
+
18901
+ return filter;
18834
18902
  }()
18835
18903
  /** Query Conditions **/
18836
18904
 
@@ -18845,13 +18913,15 @@ var ParseQuery = /*#__PURE__*/function () {
18845
18913
 
18846
18914
  }, {
18847
18915
  key: "equalTo",
18848
- value: function (key
18916
+ value: function equalTo(key
18849
18917
  /*: string | { [key: string]: any }*/
18850
18918
  , value
18851
18919
  /*: ?mixed*/
18852
18920
  )
18853
18921
  /*: ParseQuery*/
18854
18922
  {
18923
+ var _this7 = this;
18924
+
18855
18925
  if (key && (0, _typeof2.default)(key) === 'object') {
18856
18926
  var _context14;
18857
18927
 
@@ -18860,7 +18930,7 @@ var ParseQuery = /*#__PURE__*/function () {
18860
18930
  k = _ref3[0],
18861
18931
  val = _ref3[1];
18862
18932
 
18863
- return this.equalTo(k, val);
18933
+ return _this7.equalTo(k, val);
18864
18934
  });
18865
18935
  return this;
18866
18936
  }
@@ -18883,13 +18953,15 @@ var ParseQuery = /*#__PURE__*/function () {
18883
18953
 
18884
18954
  }, {
18885
18955
  key: "notEqualTo",
18886
- value: function (key
18956
+ value: function notEqualTo(key
18887
18957
  /*: string | { [key: string]: any }*/
18888
18958
  , value
18889
18959
  /*: ?mixed*/
18890
18960
  )
18891
18961
  /*: ParseQuery*/
18892
18962
  {
18963
+ var _this8 = this;
18964
+
18893
18965
  if (key && (0, _typeof2.default)(key) === 'object') {
18894
18966
  var _context15;
18895
18967
 
@@ -18898,7 +18970,7 @@ var ParseQuery = /*#__PURE__*/function () {
18898
18970
  k = _ref5[0],
18899
18971
  val = _ref5[1];
18900
18972
 
18901
- return this.notEqualTo(k, val);
18973
+ return _this8.notEqualTo(k, val);
18902
18974
  });
18903
18975
  return this;
18904
18976
  }
@@ -18916,7 +18988,7 @@ var ParseQuery = /*#__PURE__*/function () {
18916
18988
 
18917
18989
  }, {
18918
18990
  key: "lessThan",
18919
- value: function (key
18991
+ value: function lessThan(key
18920
18992
  /*: string*/
18921
18993
  , value
18922
18994
  /*: mixed*/
@@ -18936,7 +19008,7 @@ var ParseQuery = /*#__PURE__*/function () {
18936
19008
 
18937
19009
  }, {
18938
19010
  key: "greaterThan",
18939
- value: function (key
19011
+ value: function greaterThan(key
18940
19012
  /*: string*/
18941
19013
  , value
18942
19014
  /*: mixed*/
@@ -18956,7 +19028,7 @@ var ParseQuery = /*#__PURE__*/function () {
18956
19028
 
18957
19029
  }, {
18958
19030
  key: "lessThanOrEqualTo",
18959
- value: function (key
19031
+ value: function lessThanOrEqualTo(key
18960
19032
  /*: string*/
18961
19033
  , value
18962
19034
  /*: mixed*/
@@ -18976,7 +19048,7 @@ var ParseQuery = /*#__PURE__*/function () {
18976
19048
 
18977
19049
  }, {
18978
19050
  key: "greaterThanOrEqualTo",
18979
- value: function (key
19051
+ value: function greaterThanOrEqualTo(key
18980
19052
  /*: string*/
18981
19053
  , value
18982
19054
  /*: mixed*/
@@ -18996,7 +19068,7 @@ var ParseQuery = /*#__PURE__*/function () {
18996
19068
 
18997
19069
  }, {
18998
19070
  key: "containedIn",
18999
- value: function (key
19071
+ value: function containedIn(key
19000
19072
  /*: string*/
19001
19073
  , value
19002
19074
  /*: mixed*/
@@ -19016,7 +19088,7 @@ var ParseQuery = /*#__PURE__*/function () {
19016
19088
 
19017
19089
  }, {
19018
19090
  key: "notContainedIn",
19019
- value: function (key
19091
+ value: function notContainedIn(key
19020
19092
  /*: string*/
19021
19093
  , value
19022
19094
  /*: mixed*/
@@ -19036,7 +19108,7 @@ var ParseQuery = /*#__PURE__*/function () {
19036
19108
 
19037
19109
  }, {
19038
19110
  key: "containedBy",
19039
- value: function (key
19111
+ value: function containedBy(key
19040
19112
  /*: string*/
19041
19113
  , values
19042
19114
  /*: Array<mixed>*/
@@ -19056,7 +19128,7 @@ var ParseQuery = /*#__PURE__*/function () {
19056
19128
 
19057
19129
  }, {
19058
19130
  key: "containsAll",
19059
- value: function (key
19131
+ value: function containsAll(key
19060
19132
  /*: string*/
19061
19133
  , values
19062
19134
  /*: Array<mixed>*/
@@ -19076,20 +19148,22 @@ var ParseQuery = /*#__PURE__*/function () {
19076
19148
 
19077
19149
  }, {
19078
19150
  key: "containsAllStartingWith",
19079
- value: function (key
19151
+ value: function containsAllStartingWith(key
19080
19152
  /*: string*/
19081
19153
  , values
19082
19154
  /*: Array<string>*/
19083
19155
  )
19084
19156
  /*: ParseQuery*/
19085
19157
  {
19158
+ var _this = this;
19159
+
19086
19160
  if (!(0, _isArray.default)(values)) {
19087
19161
  values = [values];
19088
19162
  }
19089
19163
 
19090
19164
  var regexObject = (0, _map2.default)(values).call(values, function (value) {
19091
19165
  return {
19092
- $regex: this._regexStartWith(value)
19166
+ $regex: _this._regexStartWith(value)
19093
19167
  };
19094
19168
  });
19095
19169
  return this.containsAll(key, regexObject);
@@ -19103,7 +19177,7 @@ var ParseQuery = /*#__PURE__*/function () {
19103
19177
 
19104
19178
  }, {
19105
19179
  key: "exists",
19106
- value: function (key
19180
+ value: function exists(key
19107
19181
  /*: string*/
19108
19182
  )
19109
19183
  /*: ParseQuery*/
@@ -19119,7 +19193,7 @@ var ParseQuery = /*#__PURE__*/function () {
19119
19193
 
19120
19194
  }, {
19121
19195
  key: "doesNotExist",
19122
- value: function (key
19196
+ value: function doesNotExist(key
19123
19197
  /*: string*/
19124
19198
  )
19125
19199
  /*: ParseQuery*/
@@ -19139,7 +19213,7 @@ var ParseQuery = /*#__PURE__*/function () {
19139
19213
 
19140
19214
  }, {
19141
19215
  key: "matches",
19142
- value: function (key
19216
+ value: function matches(key
19143
19217
  /*: string*/
19144
19218
  , regex
19145
19219
  /*: RegExp*/
@@ -19180,7 +19254,7 @@ var ParseQuery = /*#__PURE__*/function () {
19180
19254
 
19181
19255
  }, {
19182
19256
  key: "matchesQuery",
19183
- value: function (key
19257
+ value: function matchesQuery(key
19184
19258
  /*: string*/
19185
19259
  , query
19186
19260
  /*: ParseQuery*/
@@ -19203,7 +19277,7 @@ var ParseQuery = /*#__PURE__*/function () {
19203
19277
 
19204
19278
  }, {
19205
19279
  key: "doesNotMatchQuery",
19206
- value: function (key
19280
+ value: function doesNotMatchQuery(key
19207
19281
  /*: string*/
19208
19282
  , query
19209
19283
  /*: ParseQuery*/
@@ -19228,7 +19302,7 @@ var ParseQuery = /*#__PURE__*/function () {
19228
19302
 
19229
19303
  }, {
19230
19304
  key: "matchesKeyInQuery",
19231
- value: function (key
19305
+ value: function matchesKeyInQuery(key
19232
19306
  /*: string*/
19233
19307
  , queryKey
19234
19308
  /*: string*/
@@ -19258,7 +19332,7 @@ var ParseQuery = /*#__PURE__*/function () {
19258
19332
 
19259
19333
  }, {
19260
19334
  key: "doesNotMatchKeyInQuery",
19261
- value: function (key
19335
+ value: function doesNotMatchKeyInQuery(key
19262
19336
  /*: string*/
19263
19337
  , queryKey
19264
19338
  /*: string*/
@@ -19285,7 +19359,7 @@ var ParseQuery = /*#__PURE__*/function () {
19285
19359
 
19286
19360
  }, {
19287
19361
  key: "contains",
19288
- value: function (key
19362
+ value: function contains(key
19289
19363
  /*: string*/
19290
19364
  , substring
19291
19365
  /*: string*/
@@ -19330,7 +19404,7 @@ var ParseQuery = /*#__PURE__*/function () {
19330
19404
 
19331
19405
  }, {
19332
19406
  key: "fullText",
19333
- value: function (key
19407
+ value: function fullText(key
19334
19408
  /*: string*/
19335
19409
  , value
19336
19410
  /*: string*/
@@ -19387,7 +19461,7 @@ var ParseQuery = /*#__PURE__*/function () {
19387
19461
 
19388
19462
  }, {
19389
19463
  key: "sortByTextScore",
19390
- value: function () {
19464
+ value: function sortByTextScore() {
19391
19465
  this.ascending('$score');
19392
19466
  this.select(['$score']);
19393
19467
  return this;
@@ -19405,7 +19479,7 @@ var ParseQuery = /*#__PURE__*/function () {
19405
19479
 
19406
19480
  }, {
19407
19481
  key: "startsWith",
19408
- value: function (key
19482
+ value: function startsWith(key
19409
19483
  /*: string*/
19410
19484
  , prefix
19411
19485
  /*: string*/
@@ -19432,7 +19506,7 @@ var ParseQuery = /*#__PURE__*/function () {
19432
19506
 
19433
19507
  }, {
19434
19508
  key: "endsWith",
19435
- value: function (key
19509
+ value: function endsWith(key
19436
19510
  /*: string*/
19437
19511
  , suffix
19438
19512
  /*: string*/
@@ -19458,7 +19532,7 @@ var ParseQuery = /*#__PURE__*/function () {
19458
19532
 
19459
19533
  }, {
19460
19534
  key: "near",
19461
- value: function (key
19535
+ value: function near(key
19462
19536
  /*: string*/
19463
19537
  , point
19464
19538
  /*: ParseGeoPoint*/
@@ -19487,7 +19561,7 @@ var ParseQuery = /*#__PURE__*/function () {
19487
19561
 
19488
19562
  }, {
19489
19563
  key: "withinRadians",
19490
- value: function (key
19564
+ value: function withinRadians(key
19491
19565
  /*: string*/
19492
19566
  , point
19493
19567
  /*: ParseGeoPoint*/
@@ -19523,7 +19597,7 @@ var ParseQuery = /*#__PURE__*/function () {
19523
19597
 
19524
19598
  }, {
19525
19599
  key: "withinMiles",
19526
- value: function (key
19600
+ value: function withinMiles(key
19527
19601
  /*: string*/
19528
19602
  , point
19529
19603
  /*: ParseGeoPoint*/
@@ -19552,7 +19626,7 @@ var ParseQuery = /*#__PURE__*/function () {
19552
19626
 
19553
19627
  }, {
19554
19628
  key: "withinKilometers",
19555
- value: function (key
19629
+ value: function withinKilometers(key
19556
19630
  /*: string*/
19557
19631
  , point
19558
19632
  /*: ParseGeoPoint*/
@@ -19580,7 +19654,7 @@ var ParseQuery = /*#__PURE__*/function () {
19580
19654
 
19581
19655
  }, {
19582
19656
  key: "withinGeoBox",
19583
- value: function (key
19657
+ value: function withinGeoBox(key
19584
19658
  /*: string*/
19585
19659
  , southwest
19586
19660
  /*: ParseGeoPoint*/
@@ -19617,7 +19691,7 @@ var ParseQuery = /*#__PURE__*/function () {
19617
19691
 
19618
19692
  }, {
19619
19693
  key: "withinPolygon",
19620
- value: function (key
19694
+ value: function withinPolygon(key
19621
19695
  /*: string*/
19622
19696
  , points
19623
19697
  /*: Array<Array<number>>*/
@@ -19639,7 +19713,7 @@ var ParseQuery = /*#__PURE__*/function () {
19639
19713
 
19640
19714
  }, {
19641
19715
  key: "polygonContains",
19642
- value: function (key
19716
+ value: function polygonContains(key
19643
19717
  /*: string*/
19644
19718
  , point
19645
19719
  /*: ParseGeoPoint*/
@@ -19662,7 +19736,7 @@ var ParseQuery = /*#__PURE__*/function () {
19662
19736
 
19663
19737
  }, {
19664
19738
  key: "ascending",
19665
- value: function ()
19739
+ value: function ascending()
19666
19740
  /*: ParseQuery*/
19667
19741
  {
19668
19742
  this._order = [];
@@ -19684,7 +19758,7 @@ var ParseQuery = /*#__PURE__*/function () {
19684
19758
 
19685
19759
  }, {
19686
19760
  key: "addAscending",
19687
- value: function ()
19761
+ value: function addAscending()
19688
19762
  /*: ParseQuery*/
19689
19763
  {
19690
19764
  var _this9 = this;
@@ -19718,7 +19792,7 @@ var ParseQuery = /*#__PURE__*/function () {
19718
19792
 
19719
19793
  }, {
19720
19794
  key: "descending",
19721
- value: function ()
19795
+ value: function descending()
19722
19796
  /*: ParseQuery*/
19723
19797
  {
19724
19798
  this._order = [];
@@ -19740,7 +19814,7 @@ var ParseQuery = /*#__PURE__*/function () {
19740
19814
 
19741
19815
  }, {
19742
19816
  key: "addDescending",
19743
- value: function ()
19817
+ value: function addDescending()
19744
19818
  /*: ParseQuery*/
19745
19819
  {
19746
19820
  var _this10 = this;
@@ -19779,7 +19853,7 @@ var ParseQuery = /*#__PURE__*/function () {
19779
19853
 
19780
19854
  }, {
19781
19855
  key: "skip",
19782
- value: function (n
19856
+ value: function skip(n
19783
19857
  /*: number*/
19784
19858
  )
19785
19859
  /*: ParseQuery*/
@@ -19800,7 +19874,7 @@ var ParseQuery = /*#__PURE__*/function () {
19800
19874
 
19801
19875
  }, {
19802
19876
  key: "limit",
19803
- value: function (n
19877
+ value: function limit(n
19804
19878
  /*: number*/
19805
19879
  )
19806
19880
  /*: ParseQuery*/
@@ -19824,7 +19898,7 @@ var ParseQuery = /*#__PURE__*/function () {
19824
19898
 
19825
19899
  }, {
19826
19900
  key: "withCount",
19827
- value: function ()
19901
+ value: function withCount()
19828
19902
  /*: ParseQuery*/
19829
19903
  {
19830
19904
  var includeCount
@@ -19852,7 +19926,7 @@ var ParseQuery = /*#__PURE__*/function () {
19852
19926
 
19853
19927
  }, {
19854
19928
  key: "include",
19855
- value: function ()
19929
+ value: function include()
19856
19930
  /*: ParseQuery*/
19857
19931
  {
19858
19932
  var _this11 = this;
@@ -19882,7 +19956,7 @@ var ParseQuery = /*#__PURE__*/function () {
19882
19956
 
19883
19957
  }, {
19884
19958
  key: "includeAll",
19885
- value: function ()
19959
+ value: function includeAll()
19886
19960
  /*: ParseQuery*/
19887
19961
  {
19888
19962
  return this.include('*');
@@ -19898,7 +19972,7 @@ var ParseQuery = /*#__PURE__*/function () {
19898
19972
 
19899
19973
  }, {
19900
19974
  key: "select",
19901
- value: function ()
19975
+ value: function select()
19902
19976
  /*: ParseQuery*/
19903
19977
  {
19904
19978
  var _this12 = this;
@@ -19934,7 +20008,7 @@ var ParseQuery = /*#__PURE__*/function () {
19934
20008
 
19935
20009
  }, {
19936
20010
  key: "exclude",
19937
- value: function ()
20011
+ value: function exclude()
19938
20012
  /*: ParseQuery*/
19939
20013
  {
19940
20014
  var _this13 = this;
@@ -19965,7 +20039,7 @@ var ParseQuery = /*#__PURE__*/function () {
19965
20039
 
19966
20040
  }, {
19967
20041
  key: "readPreference",
19968
- value: function (_readPreference
20042
+ value: function readPreference(_readPreference
19969
20043
  /*: string*/
19970
20044
  , includeReadPreference
19971
20045
  /*:: ?: string*/
@@ -19994,7 +20068,7 @@ var ParseQuery = /*#__PURE__*/function () {
19994
20068
  /*:: ?: string*/
19995
20069
  ) {
19996
20070
  var currentUser, liveQueryClient, subscription;
19997
- return _regeneratorRuntime().wrap(function (_context22) {
20071
+ return _regeneratorRuntime().wrap(function _callee7$(_context22) {
19998
20072
  while (1) {
19999
20073
  switch (_context22.prev = _context22.next) {
20000
20074
  case 0:
@@ -20031,9 +20105,11 @@ var ParseQuery = /*#__PURE__*/function () {
20031
20105
  }, _callee7, this);
20032
20106
  }));
20033
20107
 
20034
- return function () {
20108
+ function subscribe(_x10) {
20035
20109
  return _subscribe.apply(this, arguments);
20036
- };
20110
+ }
20111
+
20112
+ return subscribe;
20037
20113
  }()
20038
20114
  /**
20039
20115
  * Constructs a Parse.Query that is the OR of the passed in queries. For
@@ -20056,7 +20132,7 @@ var ParseQuery = /*#__PURE__*/function () {
20056
20132
  *
20057
20133
  * @returns {Parse.Query} Returns the query, so you can chain this call.
20058
20134
  */
20059
- function ()
20135
+ function fromNetwork()
20060
20136
  /*: ParseQuery*/
20061
20137
  {
20062
20138
  this._queriesLocalDatastore = false;
@@ -20071,7 +20147,7 @@ var ParseQuery = /*#__PURE__*/function () {
20071
20147
 
20072
20148
  }, {
20073
20149
  key: "fromLocalDatastore",
20074
- value: function ()
20150
+ value: function fromLocalDatastore()
20075
20151
  /*: ParseQuery*/
20076
20152
  {
20077
20153
  return this.fromPinWithName(null);
@@ -20084,7 +20160,7 @@ var ParseQuery = /*#__PURE__*/function () {
20084
20160
 
20085
20161
  }, {
20086
20162
  key: "fromPin",
20087
- value: function ()
20163
+ value: function fromPin()
20088
20164
  /*: ParseQuery*/
20089
20165
  {
20090
20166
  return this.fromPinWithName(_LocalDatastoreUtils.DEFAULT_PIN);
@@ -20098,7 +20174,7 @@ var ParseQuery = /*#__PURE__*/function () {
20098
20174
 
20099
20175
  }, {
20100
20176
  key: "fromPinWithName",
20101
- value: function (name
20177
+ value: function fromPinWithName(name
20102
20178
  /*:: ?: string*/
20103
20179
  )
20104
20180
  /*: ParseQuery*/
@@ -20120,9 +20196,11 @@ var ParseQuery = /*#__PURE__*/function () {
20120
20196
 
20121
20197
  }, {
20122
20198
  key: "cancel",
20123
- value: function ()
20199
+ value: function cancel()
20124
20200
  /*: ParseQuery*/
20125
20201
  {
20202
+ var _this14 = this;
20203
+
20126
20204
  if (this._xhrRequest.task && typeof this._xhrRequest.task.abort === 'function') {
20127
20205
  this._xhrRequest.task._aborted = true;
20128
20206
 
@@ -20136,12 +20214,12 @@ var ParseQuery = /*#__PURE__*/function () {
20136
20214
  }
20137
20215
 
20138
20216
  return this._xhrRequest.onchange = function () {
20139
- return this.cancel();
20217
+ return _this14.cancel();
20140
20218
  };
20141
20219
  }
20142
20220
  }, {
20143
20221
  key: "_setRequestTask",
20144
- value: function (options) {
20222
+ value: function _setRequestTask(options) {
20145
20223
  var _this15 = this;
20146
20224
 
20147
20225
  options.requestTask = function (task) {
@@ -20152,7 +20230,7 @@ var ParseQuery = /*#__PURE__*/function () {
20152
20230
  }
20153
20231
  }], [{
20154
20232
  key: "fromJSON",
20155
- value: function (className
20233
+ value: function fromJSON(className
20156
20234
  /*: string*/
20157
20235
  , json
20158
20236
  /*: QueryJSON*/
@@ -20164,7 +20242,7 @@ var ParseQuery = /*#__PURE__*/function () {
20164
20242
  }
20165
20243
  }, {
20166
20244
  key: "or",
20167
- value: function ()
20245
+ value: function or()
20168
20246
  /*: ParseQuery*/
20169
20247
  {
20170
20248
  for (var _len8 = arguments.length, queries = new Array(_len8), _key12 = 0; _key12 < _len8; _key12++) {
@@ -20194,7 +20272,7 @@ var ParseQuery = /*#__PURE__*/function () {
20194
20272
 
20195
20273
  }, {
20196
20274
  key: "and",
20197
- value: function ()
20275
+ value: function and()
20198
20276
  /*: ParseQuery*/
20199
20277
  {
20200
20278
  for (var _len9 = arguments.length, queries = new Array(_len9), _key13 = 0; _key13 < _len9; _key13++) {
@@ -20224,7 +20302,7 @@ var ParseQuery = /*#__PURE__*/function () {
20224
20302
 
20225
20303
  }, {
20226
20304
  key: "nor",
20227
- value: function ()
20305
+ value: function nor()
20228
20306
  /*: ParseQuery*/
20229
20307
  {
20230
20308
  for (var _len10 = arguments.length, queries = new Array(_len10), _key14 = 0; _key14 < _len10; _key14++) {
@@ -20244,7 +20322,7 @@ var ParseQuery = /*#__PURE__*/function () {
20244
20322
  }();
20245
20323
 
20246
20324
  var DefaultController = {
20247
- find: function (className
20325
+ find: function find(className
20248
20326
  /*: string*/
20249
20327
  , params
20250
20328
  /*: QueryJSON*/
@@ -20257,7 +20335,7 @@ var DefaultController = {
20257
20335
 
20258
20336
  return RESTController.request('GET', 'classes/' + className, params, options);
20259
20337
  },
20260
- aggregate: function (className
20338
+ aggregate: function aggregate(className
20261
20339
  /*: string*/
20262
20340
  , params
20263
20341
  /*: any*/
@@ -22486,7 +22564,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22486
22564
  value: function () {
22487
22565
  var _isCurrentAsync = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
22488
22566
  var current;
22489
- return _regeneratorRuntime().wrap(function (_context) {
22567
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
22490
22568
  while (1) {
22491
22569
  switch (_context.prev = _context.next) {
22492
22570
  case 0:
@@ -22505,9 +22583,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22505
22583
  }, _callee, this);
22506
22584
  }));
22507
22585
 
22508
- return function () {
22586
+ function isCurrentAsync() {
22509
22587
  return _isCurrentAsync.apply(this, arguments);
22510
- };
22588
+ }
22589
+
22590
+ return isCurrentAsync;
22511
22591
  }()
22512
22592
  /**
22513
22593
  * Returns get("username").
@@ -22517,7 +22597,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22517
22597
 
22518
22598
  }, {
22519
22599
  key: "getUsername",
22520
- value: function ()
22600
+ value: function getUsername()
22521
22601
  /*: ?string*/
22522
22602
  {
22523
22603
  var username = this.get('username');
@@ -22536,7 +22616,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22536
22616
 
22537
22617
  }, {
22538
22618
  key: "setUsername",
22539
- value: function (username
22619
+ value: function setUsername(username
22540
22620
  /*: string*/
22541
22621
  ) {
22542
22622
  // Strip anonymity
@@ -22557,7 +22637,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22557
22637
 
22558
22638
  }, {
22559
22639
  key: "setPassword",
22560
- value: function (password
22640
+ value: function setPassword(password
22561
22641
  /*: string*/
22562
22642
  ) {
22563
22643
  this.set('password', password);
@@ -22570,7 +22650,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22570
22650
 
22571
22651
  }, {
22572
22652
  key: "getEmail",
22573
- value: function ()
22653
+ value: function getEmail()
22574
22654
  /*: ?string*/
22575
22655
  {
22576
22656
  var email = this.get('email');
@@ -22590,7 +22670,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22590
22670
 
22591
22671
  }, {
22592
22672
  key: "setEmail",
22593
- value: function (email
22673
+ value: function setEmail(email
22594
22674
  /*: string*/
22595
22675
  ) {
22596
22676
  return this.set('email', email);
@@ -22605,7 +22685,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22605
22685
 
22606
22686
  }, {
22607
22687
  key: "getSessionToken",
22608
- value: function ()
22688
+ value: function getSessionToken()
22609
22689
  /*: ?string*/
22610
22690
  {
22611
22691
  var token = this.get('sessionToken');
@@ -22624,7 +22704,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22624
22704
 
22625
22705
  }, {
22626
22706
  key: "authenticated",
22627
- value: function ()
22707
+ value: function authenticated()
22628
22708
  /*: boolean*/
22629
22709
  {
22630
22710
  var current = ParseUser.current();
@@ -22646,7 +22726,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22646
22726
 
22647
22727
  }, {
22648
22728
  key: "signUp",
22649
- value: function (attrs
22729
+ value: function signUp(attrs
22650
22730
  /*: AttributeMap*/
22651
22731
  , options
22652
22732
  /*:: ?: FullOptions*/
@@ -22686,7 +22766,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22686
22766
 
22687
22767
  }, {
22688
22768
  key: "logIn",
22689
- value: function (options
22769
+ value: function logIn(options
22690
22770
  /*:: ?: FullOptions*/
22691
22771
  )
22692
22772
  /*: Promise<ParseUser>*/
@@ -22730,7 +22810,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22730
22810
  current,
22731
22811
  _args2 = arguments;
22732
22812
 
22733
- return _regeneratorRuntime().wrap(function (_context2) {
22813
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
22734
22814
  while (1) {
22735
22815
  switch (_context2.prev = _context2.next) {
22736
22816
  case 0:
@@ -22766,9 +22846,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22766
22846
  }, _callee2, this);
22767
22847
  }));
22768
22848
 
22769
- return function () {
22849
+ function save() {
22770
22850
  return _save.apply(this, arguments);
22771
- };
22851
+ }
22852
+
22853
+ return save;
22772
22854
  }()
22773
22855
  /**
22774
22856
  * Wrap the default destroy behavior with functionality that logs out
@@ -22788,7 +22870,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22788
22870
  current,
22789
22871
  _args3 = arguments;
22790
22872
 
22791
- return _regeneratorRuntime().wrap(function (_context3) {
22873
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
22792
22874
  while (1) {
22793
22875
  switch (_context3.prev = _context3.next) {
22794
22876
  case 0:
@@ -22824,9 +22906,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22824
22906
  }, _callee3, this);
22825
22907
  }));
22826
22908
 
22827
- return function () {
22909
+ function destroy() {
22828
22910
  return _destroy.apply(this, arguments);
22829
- };
22911
+ }
22912
+
22913
+ return destroy;
22830
22914
  }()
22831
22915
  /**
22832
22916
  * Wrap the default fetch behavior with functionality to save to local
@@ -22846,7 +22930,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22846
22930
  current,
22847
22931
  _args4 = arguments;
22848
22932
 
22849
- return _regeneratorRuntime().wrap(function (_context4) {
22933
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
22850
22934
  while (1) {
22851
22935
  switch (_context4.prev = _context4.next) {
22852
22936
  case 0:
@@ -22882,9 +22966,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22882
22966
  }, _callee4, this);
22883
22967
  }));
22884
22968
 
22885
- return function () {
22969
+ function fetch() {
22886
22970
  return _fetch.apply(this, arguments);
22887
- };
22971
+ }
22972
+
22973
+ return fetch;
22888
22974
  }()
22889
22975
  /**
22890
22976
  * Wrap the default fetchWithInclude behavior with functionality to save to local
@@ -22904,7 +22990,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22904
22990
  current,
22905
22991
  _args5 = arguments;
22906
22992
 
22907
- return _regeneratorRuntime().wrap(function (_context5) {
22993
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
22908
22994
  while (1) {
22909
22995
  switch (_context5.prev = _context5.next) {
22910
22996
  case 0:
@@ -22940,9 +23026,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22940
23026
  }, _callee5, this);
22941
23027
  }));
22942
23028
 
22943
- return function () {
23029
+ function fetchWithInclude() {
22944
23030
  return _fetchWithInclude.apply(this, arguments);
22945
- };
23031
+ }
23032
+
23033
+ return fetchWithInclude;
22946
23034
  }()
22947
23035
  /**
22948
23036
  * Verify whether a given password is the password of the current user.
@@ -22955,7 +23043,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22955
23043
 
22956
23044
  }, {
22957
23045
  key: "verifyPassword",
22958
- value: function (password
23046
+ value: function verifyPassword(password
22959
23047
  /*: string*/
22960
23048
  , options
22961
23049
  /*:: ?: RequestOptions*/
@@ -22967,7 +23055,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22967
23055
  }
22968
23056
  }], [{
22969
23057
  key: "readOnlyAttributes",
22970
- value: function () {
23058
+ value: function readOnlyAttributes() {
22971
23059
  return ['sessionToken'];
22972
23060
  }
22973
23061
  /**
@@ -22981,7 +23069,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22981
23069
 
22982
23070
  }, {
22983
23071
  key: "extend",
22984
- value: function (protoProps
23072
+ value: function extend(protoProps
22985
23073
  /*: { [prop: string]: any }*/
22986
23074
  , classProps
22987
23075
  /*: { [prop: string]: any }*/
@@ -23024,7 +23112,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23024
23112
 
23025
23113
  }, {
23026
23114
  key: "current",
23027
- value: function ()
23115
+ value: function current()
23028
23116
  /*: ?ParseUser*/
23029
23117
  {
23030
23118
  if (!canUseCurrentUser) {
@@ -23045,7 +23133,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23045
23133
 
23046
23134
  }, {
23047
23135
  key: "currentAsync",
23048
- value: function ()
23136
+ value: function currentAsync()
23049
23137
  /*: Promise<?ParseUser>*/
23050
23138
  {
23051
23139
  if (!canUseCurrentUser) {
@@ -23073,7 +23161,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23073
23161
 
23074
23162
  }, {
23075
23163
  key: "signUp",
23076
- value: function (username
23164
+ value: function signUp(username
23077
23165
  /*: string*/
23078
23166
  , password
23079
23167
  /*: string*/
@@ -23103,7 +23191,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23103
23191
 
23104
23192
  }, {
23105
23193
  key: "logIn",
23106
- value: function (username
23194
+ value: function logIn(username
23107
23195
  /*: string*/
23108
23196
  , password
23109
23197
  /*: string*/
@@ -23139,7 +23227,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23139
23227
 
23140
23228
  }, {
23141
23229
  key: "become",
23142
- value: function (sessionToken
23230
+ value: function become(sessionToken
23143
23231
  /*: string*/
23144
23232
  , options
23145
23233
  /*:: ?: RequestOptions*/
@@ -23175,7 +23263,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23175
23263
 
23176
23264
  }, {
23177
23265
  key: "me",
23178
- value: function (sessionToken
23266
+ value: function me(sessionToken
23179
23267
  /*: string*/
23180
23268
  ) {
23181
23269
  var options
@@ -23210,7 +23298,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23210
23298
 
23211
23299
  }, {
23212
23300
  key: "hydrate",
23213
- value: function (userJSON
23301
+ value: function hydrate(userJSON
23214
23302
  /*: AttributeMap*/
23215
23303
  ) {
23216
23304
  var controller = _CoreManager.default.getUserController();
@@ -23230,7 +23318,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23230
23318
 
23231
23319
  }, {
23232
23320
  key: "logInWith",
23233
- value: function (provider
23321
+ value: function logInWith(provider
23234
23322
  /*: any*/
23235
23323
  , options
23236
23324
  /*: { authData?: AuthData }*/
@@ -23255,7 +23343,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23255
23343
 
23256
23344
  }, {
23257
23345
  key: "logOut",
23258
- value: function () {
23346
+ value: function logOut() {
23259
23347
  var options
23260
23348
  /*: RequestOptions*/
23261
23349
  = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -23278,7 +23366,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23278
23366
 
23279
23367
  }, {
23280
23368
  key: "requestPasswordReset",
23281
- value: function (email
23369
+ value: function requestPasswordReset(email
23282
23370
  /*: string*/
23283
23371
  , options
23284
23372
  /*:: ?: RequestOptions*/
@@ -23306,7 +23394,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23306
23394
 
23307
23395
  }, {
23308
23396
  key: "requestEmailVerification",
23309
- value: function (email
23397
+ value: function requestEmailVerification(email
23310
23398
  /*: string*/
23311
23399
  , options
23312
23400
  /*:: ?: RequestOptions*/
@@ -23335,7 +23423,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23335
23423
 
23336
23424
  }, {
23337
23425
  key: "verifyPassword",
23338
- value: function (username
23426
+ value: function verifyPassword(username
23339
23427
  /*: string*/
23340
23428
  , password
23341
23429
  /*: string*/
@@ -23373,7 +23461,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23373
23461
 
23374
23462
  }, {
23375
23463
  key: "allowCustomUserClass",
23376
- value: function (isAllowed
23464
+ value: function allowCustomUserClass(isAllowed
23377
23465
  /*: boolean*/
23378
23466
  ) {
23379
23467
  _CoreManager.default.set('PERFORM_USER_REWRITE', !isAllowed);
@@ -23395,7 +23483,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23395
23483
 
23396
23484
  }, {
23397
23485
  key: "enableRevocableSession",
23398
- value: function (options
23486
+ value: function enableRevocableSession(options
23399
23487
  /*:: ?: RequestOptions*/
23400
23488
  ) {
23401
23489
  options = options || {};
@@ -23422,7 +23510,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23422
23510
 
23423
23511
  }, {
23424
23512
  key: "enableUnsafeCurrentUser",
23425
- value: function () {
23513
+ value: function enableUnsafeCurrentUser() {
23426
23514
  canUseCurrentUser = true;
23427
23515
  }
23428
23516
  /**
@@ -23435,7 +23523,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23435
23523
 
23436
23524
  }, {
23437
23525
  key: "disableUnsafeCurrentUser",
23438
- value: function () {
23526
+ value: function disableUnsafeCurrentUser() {
23439
23527
  canUseCurrentUser = false;
23440
23528
  }
23441
23529
  /**
@@ -23453,7 +23541,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23453
23541
 
23454
23542
  }, {
23455
23543
  key: "_registerAuthenticationProvider",
23456
- value: function (provider
23544
+ value: function _registerAuthenticationProvider(provider
23457
23545
  /*: any*/
23458
23546
  ) {
23459
23547
  authProviders[provider.getAuthType()] = provider; // Synchronize the current user with the auth provider.
@@ -23475,7 +23563,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23475
23563
 
23476
23564
  }, {
23477
23565
  key: "_logInWith",
23478
- value: function (provider
23566
+ value: function _logInWith(provider
23479
23567
  /*: any*/
23480
23568
  , options
23481
23569
  /*: { authData?: AuthData }*/
@@ -23487,13 +23575,13 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23487
23575
  }
23488
23576
  }, {
23489
23577
  key: "_clearCache",
23490
- value: function () {
23578
+ value: function _clearCache() {
23491
23579
  currentUserCache = null;
23492
23580
  currentUserCacheMatchesDisk = false;
23493
23581
  }
23494
23582
  }, {
23495
23583
  key: "_setCurrentUserCache",
23496
- value: function (user
23584
+ value: function _setCurrentUserCache(user
23497
23585
  /*: ParseUser*/
23498
23586
  ) {
23499
23587
  currentUserCache = user;
@@ -23505,7 +23593,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23505
23593
  _ParseObject2.default.registerSubclass('_User', ParseUser);
23506
23594
 
23507
23595
  var DefaultController = {
23508
- updateUserOnDisk: function (user) {
23596
+ updateUserOnDisk: function updateUserOnDisk(user) {
23509
23597
  var path = _Storage.default.generatePath(CURRENT_USER_KEY);
23510
23598
 
23511
23599
  var json = user.toJSON();
@@ -23523,14 +23611,14 @@ var DefaultController = {
23523
23611
  return user;
23524
23612
  });
23525
23613
  },
23526
- removeUserFromDisk: function () {
23614
+ removeUserFromDisk: function removeUserFromDisk() {
23527
23615
  var path = _Storage.default.generatePath(CURRENT_USER_KEY);
23528
23616
 
23529
23617
  currentUserCacheMatchesDisk = true;
23530
23618
  currentUserCache = null;
23531
23619
  return _Storage.default.removeItemAsync(path);
23532
23620
  },
23533
- setCurrentUser: function (user) {
23621
+ setCurrentUser: function setCurrentUser(user) {
23534
23622
  currentUserCache = user;
23535
23623
 
23536
23624
  user._cleanupAuthData();
@@ -23539,7 +23627,7 @@ var DefaultController = {
23539
23627
 
23540
23628
  return DefaultController.updateUserOnDisk(user);
23541
23629
  },
23542
- currentUser: function ()
23630
+ currentUser: function currentUser()
23543
23631
  /*: ?ParseUser*/
23544
23632
  {
23545
23633
  if (currentUserCache) {
@@ -23598,7 +23686,7 @@ var DefaultController = {
23598
23686
 
23599
23687
  return current;
23600
23688
  },
23601
- currentUserAsync: function ()
23689
+ currentUserAsync: function currentUserAsync()
23602
23690
  /*: Promise<?ParseUser>*/
23603
23691
  {
23604
23692
  if (currentUserCache) {
@@ -23653,7 +23741,7 @@ var DefaultController = {
23653
23741
  return _promise.default.resolve(current);
23654
23742
  });
23655
23743
  },
23656
- signUp: function (user
23744
+ signUp: function signUp(user
23657
23745
  /*: ParseUser*/
23658
23746
  , attrs
23659
23747
  /*: AttributeMap*/
@@ -23686,7 +23774,7 @@ var DefaultController = {
23686
23774
  return user;
23687
23775
  });
23688
23776
  },
23689
- logIn: function (user
23777
+ logIn: function logIn(user
23690
23778
  /*: ParseUser*/
23691
23779
  , options
23692
23780
  /*: RequestOptions*/
@@ -23720,7 +23808,7 @@ var DefaultController = {
23720
23808
  return DefaultController.setCurrentUser(user);
23721
23809
  });
23722
23810
  },
23723
- become: function (user
23811
+ become: function become(user
23724
23812
  /*: ParseUser*/
23725
23813
  , options
23726
23814
  /*: RequestOptions*/
@@ -23737,7 +23825,7 @@ var DefaultController = {
23737
23825
  return DefaultController.setCurrentUser(user);
23738
23826
  });
23739
23827
  },
23740
- hydrate: function (user
23828
+ hydrate: function hydrate(user
23741
23829
  /*: ParseUser*/
23742
23830
  , userJSON
23743
23831
  /*: AttributeMap*/
@@ -23754,7 +23842,7 @@ var DefaultController = {
23754
23842
  return _promise.default.resolve(user);
23755
23843
  }
23756
23844
  },
23757
- me: function (user
23845
+ me: function me(user
23758
23846
  /*: ParseUser*/
23759
23847
  , options
23760
23848
  /*: RequestOptions*/
@@ -23771,7 +23859,7 @@ var DefaultController = {
23771
23859
  return user;
23772
23860
  });
23773
23861
  },
23774
- logOut: function (options
23862
+ logOut: function logOut(options
23775
23863
  /*: RequestOptions*/
23776
23864
  )
23777
23865
  /*: Promise<ParseUser>*/
@@ -23810,7 +23898,7 @@ var DefaultController = {
23810
23898
  return promise;
23811
23899
  });
23812
23900
  },
23813
- requestPasswordReset: function (email
23901
+ requestPasswordReset: function requestPasswordReset(email
23814
23902
  /*: string*/
23815
23903
  , options
23816
23904
  /*: RequestOptions*/
@@ -23821,14 +23909,14 @@ var DefaultController = {
23821
23909
  email: email
23822
23910
  }, options);
23823
23911
  },
23824
- upgradeToRevocableSession: function (user
23912
+ upgradeToRevocableSession: function upgradeToRevocableSession(user
23825
23913
  /*: ParseUser*/
23826
23914
  , options
23827
23915
  /*: RequestOptions*/
23828
23916
  ) {
23829
23917
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
23830
23918
  var token, RESTController, result, session, current;
23831
- return _regeneratorRuntime().wrap(function (_context6) {
23919
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
23832
23920
  while (1) {
23833
23921
  switch (_context6.prev = _context6.next) {
23834
23922
  case 0:
@@ -23881,7 +23969,7 @@ var DefaultController = {
23881
23969
  }, _callee6);
23882
23970
  }))();
23883
23971
  },
23884
- linkWith: function (user
23972
+ linkWith: function linkWith(user
23885
23973
  /*: ParseUser*/
23886
23974
  , authData
23887
23975
  /*: AuthData*/
@@ -23898,7 +23986,7 @@ var DefaultController = {
23898
23986
  return user;
23899
23987
  });
23900
23988
  },
23901
- verifyPassword: function (username
23989
+ verifyPassword: function verifyPassword(username
23902
23990
  /*: string*/
23903
23991
  , password
23904
23992
  /*: string*/
@@ -23912,7 +24000,7 @@ var DefaultController = {
23912
24000
  password: password
23913
24001
  }, options);
23914
24002
  },
23915
- requestEmailVerification: function (email
24003
+ requestEmailVerification: function requestEmailVerification(email
23916
24004
  /*: string*/
23917
24005
  , options
23918
24006
  /*: RequestOptions*/
@@ -24254,7 +24342,7 @@ var RESTController = {
24254
24342
  var requestId = isIdempotent ? uuidv4() : '';
24255
24343
  var attempts = 0;
24256
24344
 
24257
- var dispatch = function dispatch() {
24345
+ (function dispatch() {
24258
24346
  if (XHR == null) {
24259
24347
  throw new Error('Cannot make a request: No definition of XMLHttpRequest was found.');
24260
24348
  }
@@ -24383,12 +24471,11 @@ var RESTController = {
24383
24471
  if (options && typeof options.requestTask === 'function') {
24384
24472
  options.requestTask(xhr);
24385
24473
  }
24386
- };
24474
+ })();
24387
24475
 
24388
- dispatch();
24389
24476
  return promise;
24390
24477
  },
24391
- request: function (method
24478
+ request: function request(method
24392
24479
  /*: string*/
24393
24480
  , path
24394
24481
  /*: string*/
@@ -24503,7 +24590,7 @@ var RESTController = {
24503
24590
  });
24504
24591
  }).catch(RESTController.handleError);
24505
24592
  },
24506
- handleError: function (response) {
24593
+ handleError: function handleError(response) {
24507
24594
  // Transform the error into an instance of ParseError by trying to parse
24508
24595
  // the error string as JSON
24509
24596
  var error;
@@ -24523,12 +24610,12 @@ var RESTController = {
24523
24610
 
24524
24611
  return _promise.default.reject(error);
24525
24612
  },
24526
- _setXHR: function (xhr
24613
+ _setXHR: function _setXHR(xhr
24527
24614
  /*: any*/
24528
24615
  ) {
24529
24616
  XHR = xhr;
24530
24617
  },
24531
- _getXHR: function () {
24618
+ _getXHR: function _getXHR() {
24532
24619
  return XHR;
24533
24620
  }
24534
24621
  };