parse 3.5.0 → 3.5.1-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 (50) hide show
  1. package/README.md +2 -1
  2. package/dist/parse.js +422 -347
  3. package/dist/parse.min.js +2 -2
  4. package/dist/parse.weapp.js +422 -347
  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 +6 -2
  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 +27 -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/browser/StorageController.react-native.js +7 -12
  21. package/lib/node/CoreManager.js +1 -1
  22. package/lib/node/ParseFile.js +1 -0
  23. package/lib/node/ParseQuery.js +3 -1
  24. package/lib/node/StorageController.react-native.js +7 -13
  25. package/lib/react-native/CoreManager.js +1 -1
  26. package/lib/react-native/LiveQueryClient.js +6 -2
  27. package/lib/react-native/LocalDatastore.js +3 -2
  28. package/lib/react-native/ParseCLP.js +32 -32
  29. package/lib/react-native/ParseFile.js +10 -3
  30. package/lib/react-native/ParseObject.js +14 -9
  31. package/lib/react-native/ParseOp.js +3 -1
  32. package/lib/react-native/ParseQuery.js +21 -7
  33. package/lib/react-native/RESTController.js +6 -7
  34. package/lib/react-native/StorageController.react-native.js +7 -10
  35. package/lib/weapp/CoreManager.js +1 -1
  36. package/lib/weapp/EventuallyQueue.js +31 -27
  37. package/lib/weapp/LiveQueryClient.js +6 -2
  38. package/lib/weapp/LocalDatastore.js +20 -20
  39. package/lib/weapp/LocalDatastoreController.js +16 -14
  40. package/lib/weapp/LocalDatastoreController.react-native.js +10 -10
  41. package/lib/weapp/ParseCLP.js +32 -32
  42. package/lib/weapp/ParseFile.js +27 -15
  43. package/lib/weapp/ParseLiveQuery.js +6 -6
  44. package/lib/weapp/ParseObject.js +84 -69
  45. package/lib/weapp/ParseOp.js +3 -1
  46. package/lib/weapp/ParseQuery.js +115 -88
  47. package/lib/weapp/ParseUser.js +74 -64
  48. package/lib/weapp/RESTController.js +6 -7
  49. package/lib/weapp/StorageController.react-native.js +7 -12
  50. package/package.json +3 -2
package/dist/parse.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v3.5.0
2
+ * Parse JavaScript SDK v3.5.1-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.0",
702
+ VERSION: 'js' + "3.5.1-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:
@@ -2852,6 +2856,8 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2852
2856
  )
2853
2857
  /*: LiveQuerySubscription*/
2854
2858
  {
2859
+ var _this2 = this;
2860
+
2855
2861
  if (!query) {
2856
2862
  return;
2857
2863
  }
@@ -2878,7 +2884,7 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2878
2884
  this.subscriptions.set(this.requestId, subscription);
2879
2885
  this.requestId += 1;
2880
2886
  this.connectPromise.then(function () {
2881
- this.socket.send((0, _stringify.default)(subscribeRequest));
2887
+ _this2.socket.send((0, _stringify.default)(subscribeRequest));
2882
2888
  });
2883
2889
  return subscription;
2884
2890
  }
@@ -2893,6 +2899,8 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2893
2899
  value: function (subscription
2894
2900
  /*: Object*/
2895
2901
  ) {
2902
+ var _this3 = this;
2903
+
2896
2904
  if (!subscription) {
2897
2905
  return;
2898
2906
  }
@@ -2903,7 +2911,7 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2903
2911
  requestId: subscription.id
2904
2912
  };
2905
2913
  this.connectPromise.then(function () {
2906
- this.socket.send((0, _stringify.default)(unsubscribeRequest));
2914
+ _this3.socket.send((0, _stringify.default)(unsubscribeRequest));
2907
2915
  });
2908
2916
  }
2909
2917
  /**
@@ -4042,7 +4050,7 @@ var LocalDatastore = {
4042
4050
 
4043
4051
  var pinName, toPinPromises, objectKeys, _iterator, _step, parent, children, parentKey, json, objectKey, fromPinPromise, _yield$Promise$all, _yield$Promise$all2, pinned, toPin;
4044
4052
 
4045
- return _regeneratorRuntime().wrap(function (_context2) {
4053
+ return _regeneratorRuntime().wrap(function _callee$(_context2) {
4046
4054
  while (1) {
4047
4055
  switch (_context2.prev = _context2.next) {
4048
4056
  case 0:
@@ -4096,7 +4104,7 @@ var LocalDatastore = {
4096
4104
  },
4097
4105
  // Removes object and children keys from pin name
4098
4106
  // Keeps the object and children pinned
4099
- _handleUnPinAllWithName: function (name
4107
+ _handleUnPinAllWithName: function _handleUnPinAllWithName(name
4100
4108
  /*: string*/
4101
4109
  , objects
4102
4110
  /*: Array<ParseObject>*/
@@ -4106,7 +4114,7 @@ var LocalDatastore = {
4106
4114
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
4107
4115
  var localDatastore, pinName, promises, objectKeys, _iterator2, _step2, _objectKeys, _context3, parent, children, parentKey, pinned, _iterator3, _step3, objectKey, hasReference, key, pinnedObjects;
4108
4116
 
4109
- return _regeneratorRuntime().wrap(function (_context4) {
4117
+ return _regeneratorRuntime().wrap(function _callee2$(_context4) {
4110
4118
  while (1) {
4111
4119
  switch (_context4.prev = _context4.next) {
4112
4120
  case 0:
@@ -4228,7 +4236,7 @@ var LocalDatastore = {
4228
4236
  }))();
4229
4237
  },
4230
4238
  // Retrieve all pointer fields from object recursively
4231
- _getChildren: function (object
4239
+ _getChildren: function _getChildren(object
4232
4240
  /*: ParseObject*/
4233
4241
  ) {
4234
4242
  var encountered = {};
@@ -4243,7 +4251,7 @@ var LocalDatastore = {
4243
4251
 
4244
4252
  return encountered;
4245
4253
  },
4246
- _traverse: function (object
4254
+ _traverse: function _traverse(object
4247
4255
  /*: any*/
4248
4256
  , encountered
4249
4257
  /*: any*/
@@ -4273,7 +4281,7 @@ var LocalDatastore = {
4273
4281
  }
4274
4282
  },
4275
4283
  // Transform keys in pin name to objects
4276
- _serializeObjectsFromPinName: function (name
4284
+ _serializeObjectsFromPinName: function _serializeObjectsFromPinName(name
4277
4285
  /*: string*/
4278
4286
  ) {
4279
4287
  var _this3 = this;
@@ -4282,7 +4290,7 @@ var LocalDatastore = {
4282
4290
  var _context5, _concatInstanceProper, _context6;
4283
4291
 
4284
4292
  var localDatastore, allObjects, key, pinName, pinned, promises, objects;
4285
- return _regeneratorRuntime().wrap(function (_context7) {
4293
+ return _regeneratorRuntime().wrap(function _callee3$(_context7) {
4286
4294
  while (1) {
4287
4295
  switch (_context7.prev = _context7.next) {
4288
4296
  case 0:
@@ -4342,7 +4350,7 @@ var LocalDatastore = {
4342
4350
  // Replaces object pointers with pinned pointers
4343
4351
  // The object pointers may contain old data
4344
4352
  // Uses Breadth First Search Algorithm
4345
- _serializeObject: function (objectKey
4353
+ _serializeObject: function _serializeObject(objectKey
4346
4354
  /*: string*/
4347
4355
  , localDatastore
4348
4356
  /*: any*/
@@ -4351,7 +4359,7 @@ var LocalDatastore = {
4351
4359
 
4352
4360
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
4353
4361
  var LDS, root, queue, meta, uniqueId, nodeId, subTreeRoot, field, value, key, pointer;
4354
- return _regeneratorRuntime().wrap(function (_context8) {
4362
+ return _regeneratorRuntime().wrap(function _callee4$(_context8) {
4355
4363
  while (1) {
4356
4364
  switch (_context8.prev = _context8.next) {
4357
4365
  case 0:
@@ -4417,7 +4425,7 @@ var LocalDatastore = {
4417
4425
  },
4418
4426
  // Called when an object is save / fetched
4419
4427
  // Update object pin value
4420
- _updateObjectIfPinned: function (object
4428
+ _updateObjectIfPinned: function _updateObjectIfPinned(object
4421
4429
  /*: ParseObject*/
4422
4430
  )
4423
4431
  /*: Promise<void>*/
@@ -4426,7 +4434,7 @@ var LocalDatastore = {
4426
4434
 
4427
4435
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
4428
4436
  var objectKey, pinned;
4429
- return _regeneratorRuntime().wrap(function (_context9) {
4437
+ return _regeneratorRuntime().wrap(function _callee5$(_context9) {
4430
4438
  while (1) {
4431
4439
  switch (_context9.prev = _context9.next) {
4432
4440
  case 0:
@@ -4466,14 +4474,14 @@ var LocalDatastore = {
4466
4474
  // Called when object is destroyed
4467
4475
  // Unpin object and remove all references from pin names
4468
4476
  // TODO: Destroy children?
4469
- _destroyObjectIfPinned: function (object
4477
+ _destroyObjectIfPinned: function _destroyObjectIfPinned(object
4470
4478
  /*: ParseObject*/
4471
4479
  ) {
4472
4480
  var _this6 = this;
4473
4481
 
4474
4482
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
4475
4483
  var localDatastore, objectKey, pin, promises, key, pinned;
4476
- return _regeneratorRuntime().wrap(function (_context10) {
4484
+ return _regeneratorRuntime().wrap(function _callee6$(_context10) {
4477
4485
  while (1) {
4478
4486
  switch (_context10.prev = _context10.next) {
4479
4487
  case 0:
@@ -4535,7 +4543,7 @@ var LocalDatastore = {
4535
4543
  }))();
4536
4544
  },
4537
4545
  // Update pin and references of the unsaved object
4538
- _updateLocalIdForObject: function (localId
4546
+ _updateLocalIdForObject: function _updateLocalIdForObject(localId
4539
4547
  /*: string*/
4540
4548
  , object
4541
4549
  /*: ParseObject*/
@@ -4546,7 +4554,7 @@ var LocalDatastore = {
4546
4554
  var _context11, _context12;
4547
4555
 
4548
4556
  var localKey, objectKey, unsaved, promises, localDatastore, key, pinned;
4549
- return _regeneratorRuntime().wrap(function (_context13) {
4557
+ return _regeneratorRuntime().wrap(function _callee7$(_context13) {
4550
4558
  while (1) {
4551
4559
  switch (_context13.prev = _context13.next) {
4552
4560
  case 0:
@@ -4618,7 +4626,7 @@ var LocalDatastore = {
4618
4626
  * @name Parse.LocalDatastore.updateFromServer
4619
4627
  * @static
4620
4628
  */
4621
- updateFromServer: function () {
4629
+ updateFromServer: function updateFromServer() {
4622
4630
  var _this8 = this;
4623
4631
 
4624
4632
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
@@ -4626,7 +4634,7 @@ var LocalDatastore = {
4626
4634
 
4627
4635
  var localDatastore, keys, key, pointersHash, _i, _keys, _key, _key$split, _key$split2, className, objectId, queryPromises, responses, objects, pinPromises;
4628
4636
 
4629
- return _regeneratorRuntime().wrap(function (_context15) {
4637
+ return _regeneratorRuntime().wrap(function _callee8$(_context15) {
4630
4638
  while (1) {
4631
4639
  switch (_context15.prev = _context15.next) {
4632
4640
  case 0:
@@ -4745,7 +4753,7 @@ var LocalDatastore = {
4745
4753
  }, _callee8, null, [[24, 35]]);
4746
4754
  }))();
4747
4755
  },
4748
- getKeyForObject: function (object
4756
+ getKeyForObject: function getKeyForObject(object
4749
4757
  /*: any*/
4750
4758
  ) {
4751
4759
  var _context16, _context17;
@@ -4754,7 +4762,7 @@ var LocalDatastore = {
4754
4762
 
4755
4763
  return (0, _concat.default)(_context16 = (0, _concat.default)(_context17 = "".concat(_LocalDatastoreUtils.OBJECT_PREFIX)).call(_context17, object.className, "_")).call(_context16, objectId);
4756
4764
  },
4757
- getPinName: function (pinName
4765
+ getPinName: function getPinName(pinName
4758
4766
  /*: ?string*/
4759
4767
  ) {
4760
4768
  if (!pinName || pinName === _LocalDatastoreUtils.DEFAULT_PIN) {
@@ -4763,7 +4771,7 @@ var LocalDatastore = {
4763
4771
 
4764
4772
  return _LocalDatastoreUtils.PIN_PREFIX + pinName;
4765
4773
  },
4766
- checkIfEnabled: function () {
4774
+ checkIfEnabled: function checkIfEnabled() {
4767
4775
  if (!this.isEnabled) {
4768
4776
  console.error('Parse.enableLocalDatastore() must be called first');
4769
4777
  }
@@ -5267,7 +5275,7 @@ var LocalDatastoreController = {
5267
5275
  {
5268
5276
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5269
5277
  var values, objects;
5270
- return _regeneratorRuntime().wrap(function (_context) {
5278
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
5271
5279
  while (1) {
5272
5280
  switch (_context.prev = _context.next) {
5273
5281
  case 0:
@@ -5296,7 +5304,7 @@ var LocalDatastoreController = {
5296
5304
  }, _callee);
5297
5305
  }))();
5298
5306
  },
5299
- pinWithName: function (name
5307
+ pinWithName: function pinWithName(name
5300
5308
  /*: string*/
5301
5309
  , value
5302
5310
  /*: any*/
@@ -5304,17 +5312,17 @@ var LocalDatastoreController = {
5304
5312
  var values = (0, _stringify.default)(value);
5305
5313
  return _Storage.default.setItemAsync(name, values);
5306
5314
  },
5307
- unPinWithName: function (name
5315
+ unPinWithName: function unPinWithName(name
5308
5316
  /*: string*/
5309
5317
  ) {
5310
5318
  return _Storage.default.removeItemAsync(name);
5311
5319
  },
5312
- getAllContents: function ()
5320
+ getAllContents: function getAllContents()
5313
5321
  /*: Object*/
5314
5322
  {
5315
5323
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
5316
5324
  var keys;
5317
- return _regeneratorRuntime().wrap(function (_context3) {
5325
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
5318
5326
  while (1) {
5319
5327
  switch (_context3.prev = _context3.next) {
5320
5328
  case 0:
@@ -5326,7 +5334,7 @@ var LocalDatastoreController = {
5326
5334
  return _context3.abrupt("return", (0, _reduce.default)(keys).call(keys, /*#__PURE__*/function () {
5327
5335
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(previousPromise, key) {
5328
5336
  var LDS, value;
5329
- return _regeneratorRuntime().wrap(function (_context2) {
5337
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
5330
5338
  while (1) {
5331
5339
  switch (_context2.prev = _context2.next) {
5332
5340
  case 0:
@@ -5364,7 +5372,7 @@ var LocalDatastoreController = {
5364
5372
  }, _callee2);
5365
5373
  }));
5366
5374
 
5367
- return function () {
5375
+ return function (_x, _x2) {
5368
5376
  return _ref.apply(this, arguments);
5369
5377
  };
5370
5378
  }(), _promise.default.resolve({})));
@@ -5378,12 +5386,12 @@ var LocalDatastoreController = {
5378
5386
  }))();
5379
5387
  },
5380
5388
  // Used for testing
5381
- getRawStorage: function ()
5389
+ getRawStorage: function getRawStorage()
5382
5390
  /*: Object*/
5383
5391
  {
5384
5392
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
5385
5393
  var keys;
5386
- return _regeneratorRuntime().wrap(function (_context5) {
5394
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
5387
5395
  while (1) {
5388
5396
  switch (_context5.prev = _context5.next) {
5389
5397
  case 0:
@@ -5395,7 +5403,7 @@ var LocalDatastoreController = {
5395
5403
  return _context5.abrupt("return", (0, _reduce.default)(keys).call(keys, /*#__PURE__*/function () {
5396
5404
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(previousPromise, key) {
5397
5405
  var LDS, value;
5398
- return _regeneratorRuntime().wrap(function (_context4) {
5406
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
5399
5407
  while (1) {
5400
5408
  switch (_context4.prev = _context4.next) {
5401
5409
  case 0:
@@ -5420,7 +5428,7 @@ var LocalDatastoreController = {
5420
5428
  }, _callee4);
5421
5429
  }));
5422
5430
 
5423
- return function () {
5431
+ return function (_x3, _x4) {
5424
5432
  return _ref2.apply(this, arguments);
5425
5433
  };
5426
5434
  }(), _promise.default.resolve({})));
@@ -5433,13 +5441,15 @@ var LocalDatastoreController = {
5433
5441
  }, _callee5);
5434
5442
  }))();
5435
5443
  },
5436
- clear: function ()
5444
+ clear: function clear()
5437
5445
  /*: Promise*/
5438
5446
  {
5447
+ var _this = this;
5448
+
5439
5449
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
5440
5450
  var keys, toRemove, _iterator, _step, key, promises;
5441
5451
 
5442
- return _regeneratorRuntime().wrap(function (_context6) {
5452
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
5443
5453
  while (1) {
5444
5454
  switch (_context6.prev = _context6.next) {
5445
5455
  case 0:
@@ -5465,7 +5475,7 @@ var LocalDatastoreController = {
5465
5475
  _iterator.f();
5466
5476
  }
5467
5477
 
5468
- promises = (0, _map.default)(toRemove).call(toRemove, this.unPinWithName);
5478
+ promises = (0, _map.default)(toRemove).call(toRemove, _this.unPinWithName);
5469
5479
  return _context6.abrupt("return", _promise.default.all(promises));
5470
5480
 
5471
5481
  case 8:
@@ -7860,7 +7870,7 @@ var ParseCLP = /*#__PURE__*/function () {
7860
7870
  _step;
7861
7871
 
7862
7872
  try {
7863
- var _loop = function () {
7873
+ var _loop = function _loop() {
7864
7874
  var _step$value = (0, _slicedToArray2.default)(_step.value, 2),
7865
7875
  operation = _step$value[0],
7866
7876
  group = _step$value[1];
@@ -7991,7 +8001,7 @@ var ParseCLP = /*#__PURE__*/function () {
7991
8001
 
7992
8002
  (0, _createClass2.default)(ParseCLP, [{
7993
8003
  key: "toJSON",
7994
- value: function ()
8004
+ value: function toJSON()
7995
8005
  /*: PermissionsMap*/
7996
8006
  {
7997
8007
  return _objectSpread({}, this.permissionsMap);
@@ -8005,7 +8015,7 @@ var ParseCLP = /*#__PURE__*/function () {
8005
8015
 
8006
8016
  }, {
8007
8017
  key: "equals",
8008
- value: function (other
8018
+ value: function equals(other
8009
8019
  /*: ParseCLP*/
8010
8020
  )
8011
8021
  /*: boolean*/
@@ -8048,7 +8058,7 @@ var ParseCLP = /*#__PURE__*/function () {
8048
8058
  }
8049
8059
  }, {
8050
8060
  key: "_getRoleName",
8051
- value: function (role
8061
+ value: function _getRoleName(role
8052
8062
  /*: ParseRole | string*/
8053
8063
  )
8054
8064
  /*: string*/
@@ -8068,7 +8078,7 @@ var ParseCLP = /*#__PURE__*/function () {
8068
8078
  }
8069
8079
  }, {
8070
8080
  key: "_parseEntity",
8071
- value: function (entity
8081
+ value: function _parseEntity(entity
8072
8082
  /*: Entity*/
8073
8083
  ) {
8074
8084
  var userId = entity;
@@ -8091,7 +8101,7 @@ var ParseCLP = /*#__PURE__*/function () {
8091
8101
  }
8092
8102
  }, {
8093
8103
  key: "_setAccess",
8094
- value: function (permission
8104
+ value: function _setAccess(permission
8095
8105
  /*: string*/
8096
8106
  , userId
8097
8107
  /*: Entity*/
@@ -8123,7 +8133,7 @@ var ParseCLP = /*#__PURE__*/function () {
8123
8133
  }
8124
8134
  }, {
8125
8135
  key: "_getAccess",
8126
- value: function (permission
8136
+ value: function _getAccess(permission
8127
8137
  /*: string*/
8128
8138
  , userId
8129
8139
  /*: Entity*/
@@ -8146,7 +8156,7 @@ var ParseCLP = /*#__PURE__*/function () {
8146
8156
  }
8147
8157
  }, {
8148
8158
  key: "_setArrayAccess",
8149
- value: function (permission
8159
+ value: function _setArrayAccess(permission
8150
8160
  /*: string*/
8151
8161
  , userId
8152
8162
  /*: Entity*/
@@ -8172,7 +8182,7 @@ var ParseCLP = /*#__PURE__*/function () {
8172
8182
  }
8173
8183
  }, {
8174
8184
  key: "_setGroupPointerPermission",
8175
- value: function (operation
8185
+ value: function _setGroupPointerPermission(operation
8176
8186
  /*: string*/
8177
8187
  , pointerFields
8178
8188
  /*: string[]*/
@@ -8195,7 +8205,7 @@ var ParseCLP = /*#__PURE__*/function () {
8195
8205
  }
8196
8206
  }, {
8197
8207
  key: "_getGroupPointerPermissions",
8198
- value: function (operation
8208
+ value: function _getGroupPointerPermissions(operation
8199
8209
  /*: string*/
8200
8210
  )
8201
8211
  /*: string[]*/
@@ -8210,7 +8220,7 @@ var ParseCLP = /*#__PURE__*/function () {
8210
8220
 
8211
8221
  }, {
8212
8222
  key: "setReadUserFields",
8213
- value: function (pointerFields
8223
+ value: function setReadUserFields(pointerFields
8214
8224
  /*: string[]*/
8215
8225
  ) {
8216
8226
  this._setGroupPointerPermission('readUserFields', pointerFields);
@@ -8221,7 +8231,7 @@ var ParseCLP = /*#__PURE__*/function () {
8221
8231
 
8222
8232
  }, {
8223
8233
  key: "getReadUserFields",
8224
- value: function ()
8234
+ value: function getReadUserFields()
8225
8235
  /*: string[]*/
8226
8236
  {
8227
8237
  return this._getGroupPointerPermissions('readUserFields');
@@ -8234,7 +8244,7 @@ var ParseCLP = /*#__PURE__*/function () {
8234
8244
 
8235
8245
  }, {
8236
8246
  key: "setWriteUserFields",
8237
- value: function (pointerFields
8247
+ value: function setWriteUserFields(pointerFields
8238
8248
  /*: string[]*/
8239
8249
  ) {
8240
8250
  this._setGroupPointerPermission('writeUserFields', pointerFields);
@@ -8245,7 +8255,7 @@ var ParseCLP = /*#__PURE__*/function () {
8245
8255
 
8246
8256
  }, {
8247
8257
  key: "getWriteUserFields",
8248
- value: function ()
8258
+ value: function getWriteUserFields()
8249
8259
  /*: string[]*/
8250
8260
  {
8251
8261
  return this._getGroupPointerPermissions('writeUserFields');
@@ -8259,7 +8269,7 @@ var ParseCLP = /*#__PURE__*/function () {
8259
8269
 
8260
8270
  }, {
8261
8271
  key: "setProtectedFields",
8262
- value: function (userId
8272
+ value: function setProtectedFields(userId
8263
8273
  /*: Entity*/
8264
8274
  , fields
8265
8275
  /*: string[]*/
@@ -8275,7 +8285,7 @@ var ParseCLP = /*#__PURE__*/function () {
8275
8285
 
8276
8286
  }, {
8277
8287
  key: "getProtectedFields",
8278
- value: function (userId
8288
+ value: function getProtectedFields(userId
8279
8289
  /*: Entity*/
8280
8290
  )
8281
8291
  /*: string[]*/
@@ -8291,7 +8301,7 @@ var ParseCLP = /*#__PURE__*/function () {
8291
8301
 
8292
8302
  }, {
8293
8303
  key: "setReadAccess",
8294
- value: function (userId
8304
+ value: function setReadAccess(userId
8295
8305
  /*: Entity*/
8296
8306
  , allowed
8297
8307
  /*: boolean*/
@@ -8314,7 +8324,7 @@ var ParseCLP = /*#__PURE__*/function () {
8314
8324
 
8315
8325
  }, {
8316
8326
  key: "getReadAccess",
8317
- value: function (userId
8327
+ value: function getReadAccess(userId
8318
8328
  /*: Entity*/
8319
8329
  )
8320
8330
  /*: boolean*/
@@ -8330,7 +8340,7 @@ var ParseCLP = /*#__PURE__*/function () {
8330
8340
 
8331
8341
  }, {
8332
8342
  key: "setWriteAccess",
8333
- value: function (userId
8343
+ value: function setWriteAccess(userId
8334
8344
  /*: Entity*/
8335
8345
  , allowed
8336
8346
  /*: boolean*/
@@ -8355,7 +8365,7 @@ var ParseCLP = /*#__PURE__*/function () {
8355
8365
 
8356
8366
  }, {
8357
8367
  key: "getWriteAccess",
8358
- value: function (userId
8368
+ value: function getWriteAccess(userId
8359
8369
  /*: Entity*/
8360
8370
  )
8361
8371
  /*: boolean*/
@@ -8370,7 +8380,7 @@ var ParseCLP = /*#__PURE__*/function () {
8370
8380
 
8371
8381
  }, {
8372
8382
  key: "setPublicReadAccess",
8373
- value: function (allowed
8383
+ value: function setPublicReadAccess(allowed
8374
8384
  /*: boolean*/
8375
8385
  ) {
8376
8386
  this.setReadAccess(PUBLIC_KEY, allowed);
@@ -8383,7 +8393,7 @@ var ParseCLP = /*#__PURE__*/function () {
8383
8393
 
8384
8394
  }, {
8385
8395
  key: "getPublicReadAccess",
8386
- value: function ()
8396
+ value: function getPublicReadAccess()
8387
8397
  /*: boolean*/
8388
8398
  {
8389
8399
  return this.getReadAccess(PUBLIC_KEY);
@@ -8396,7 +8406,7 @@ var ParseCLP = /*#__PURE__*/function () {
8396
8406
 
8397
8407
  }, {
8398
8408
  key: "setPublicWriteAccess",
8399
- value: function (allowed
8409
+ value: function setPublicWriteAccess(allowed
8400
8410
  /*: boolean*/
8401
8411
  ) {
8402
8412
  this.setWriteAccess(PUBLIC_KEY, allowed);
@@ -8409,7 +8419,7 @@ var ParseCLP = /*#__PURE__*/function () {
8409
8419
 
8410
8420
  }, {
8411
8421
  key: "getPublicWriteAccess",
8412
- value: function ()
8422
+ value: function getPublicWriteAccess()
8413
8423
  /*: boolean*/
8414
8424
  {
8415
8425
  return this.getWriteAccess(PUBLIC_KEY);
@@ -8422,7 +8432,7 @@ var ParseCLP = /*#__PURE__*/function () {
8422
8432
 
8423
8433
  }, {
8424
8434
  key: "setPublicProtectedFields",
8425
- value: function (fields
8435
+ value: function setPublicProtectedFields(fields
8426
8436
  /*: string[]*/
8427
8437
  ) {
8428
8438
  this.setProtectedFields(PUBLIC_KEY, fields);
@@ -8435,7 +8445,7 @@ var ParseCLP = /*#__PURE__*/function () {
8435
8445
 
8436
8446
  }, {
8437
8447
  key: "getPublicProtectedFields",
8438
- value: function ()
8448
+ value: function getPublicProtectedFields()
8439
8449
  /*: string[]*/
8440
8450
  {
8441
8451
  return this.getProtectedFields(PUBLIC_KEY);
@@ -8452,7 +8462,7 @@ var ParseCLP = /*#__PURE__*/function () {
8452
8462
 
8453
8463
  }, {
8454
8464
  key: "getRoleReadAccess",
8455
- value: function (role
8465
+ value: function getRoleReadAccess(role
8456
8466
  /*: ParseRole | string*/
8457
8467
  )
8458
8468
  /*: boolean*/
@@ -8471,7 +8481,7 @@ var ParseCLP = /*#__PURE__*/function () {
8471
8481
 
8472
8482
  }, {
8473
8483
  key: "getRoleWriteAccess",
8474
- value: function (role
8484
+ value: function getRoleWriteAccess(role
8475
8485
  /*: ParseRole | string*/
8476
8486
  )
8477
8487
  /*: boolean*/
@@ -8489,7 +8499,7 @@ var ParseCLP = /*#__PURE__*/function () {
8489
8499
 
8490
8500
  }, {
8491
8501
  key: "setRoleReadAccess",
8492
- value: function (role
8502
+ value: function setRoleReadAccess(role
8493
8503
  /*: ParseRole | string*/
8494
8504
  , allowed
8495
8505
  /*: boolean*/
@@ -8507,7 +8517,7 @@ var ParseCLP = /*#__PURE__*/function () {
8507
8517
 
8508
8518
  }, {
8509
8519
  key: "setRoleWriteAccess",
8510
- value: function (role
8520
+ value: function setRoleWriteAccess(role
8511
8521
  /*: ParseRole | string*/
8512
8522
  , allowed
8513
8523
  /*: boolean*/
@@ -8526,7 +8536,7 @@ var ParseCLP = /*#__PURE__*/function () {
8526
8536
 
8527
8537
  }, {
8528
8538
  key: "getRoleProtectedFields",
8529
- value: function (role
8539
+ value: function getRoleProtectedFields(role
8530
8540
  /*: ParseRole | string*/
8531
8541
  )
8532
8542
  /*: string[]*/
@@ -8544,7 +8554,7 @@ var ParseCLP = /*#__PURE__*/function () {
8544
8554
 
8545
8555
  }, {
8546
8556
  key: "setRoleProtectedFields",
8547
- value: function (role
8557
+ value: function setRoleProtectedFields(role
8548
8558
  /*: ParseRole | string*/
8549
8559
  , fields
8550
8560
  /*: string[]*/
@@ -10096,6 +10106,7 @@ var ParseFile = /*#__PURE__*/function () {
10096
10106
 
10097
10107
  var base64 = (0, _slice.default)(_context = data.base64.split(',')).call(_context, -1)[0];
10098
10108
  var dataType = specifiedType || (0, _slice.default)(_context2 = (0, _slice.default)(_context3 = data.base64.split(';')).call(_context3, 0, 1)[0].split(':')).call(_context2, 1, 2)[0] || 'text/plain';
10109
+ this._data = base64;
10099
10110
  this._source = {
10100
10111
  format: 'base64',
10101
10112
  base64: base64,
@@ -10119,6 +10130,8 @@ var ParseFile = /*#__PURE__*/function () {
10119
10130
  key: "getData",
10120
10131
  value: function () {
10121
10132
  var _getData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10133
+ var _this = this;
10134
+
10122
10135
  var options, controller, result;
10123
10136
  return _regeneratorRuntime().wrap(function (_context4) {
10124
10137
  while (1) {
@@ -10142,7 +10155,7 @@ var ParseFile = /*#__PURE__*/function () {
10142
10155
  case 4:
10143
10156
  options = {
10144
10157
  requestTask: function (task) {
10145
- return this._requestTask = task;
10158
+ return _this._requestTask = task;
10146
10159
  }
10147
10160
  };
10148
10161
  controller = _CoreManager.default.getFileController();
@@ -10162,9 +10175,11 @@ var ParseFile = /*#__PURE__*/function () {
10162
10175
  }, _callee, this);
10163
10176
  }));
10164
10177
 
10165
- return function () {
10178
+ function getData() {
10166
10179
  return _getData.apply(this, arguments);
10167
- };
10180
+ }
10181
+
10182
+ return getData;
10168
10183
  }()
10169
10184
  /**
10170
10185
  * Gets the name of the file. Before save is called, this is the filename
@@ -10409,11 +10424,13 @@ var ParseFile = /*#__PURE__*/function () {
10409
10424
  value: function (metadata
10410
10425
  /*: any*/
10411
10426
  ) {
10427
+ var _this4 = this;
10428
+
10412
10429
  if (metadata && (0, _typeof2.default)(metadata) === 'object') {
10413
10430
  var _context5;
10414
10431
 
10415
10432
  (0, _forEach.default)(_context5 = (0, _keys.default)(metadata)).call(_context5, function (key) {
10416
- this.addMetadata(key, metadata[key]);
10433
+ _this4.addMetadata(key, metadata[key]);
10417
10434
  });
10418
10435
  }
10419
10436
  }
@@ -10446,11 +10463,13 @@ var ParseFile = /*#__PURE__*/function () {
10446
10463
  value: function (tags
10447
10464
  /*: any*/
10448
10465
  ) {
10466
+ var _this5 = this;
10467
+
10449
10468
  if (tags && (0, _typeof2.default)(tags) === 'object') {
10450
10469
  var _context6;
10451
10470
 
10452
10471
  (0, _forEach.default)(_context6 = (0, _keys.default)(tags)).call(_context6, function (key) {
10453
- this.addTag(key, tags[key]);
10472
+ _this5.addTag(key, tags[key]);
10454
10473
  });
10455
10474
  }
10456
10475
  }
@@ -10521,7 +10540,7 @@ var DefaultController = {
10521
10540
  ) {
10522
10541
  var base64Data, _base64Data$split, _base64Data$split2, first, second, data, newSource;
10523
10542
 
10524
- return _regeneratorRuntime().wrap(function (_context7) {
10543
+ return _regeneratorRuntime().wrap(function _callee2$(_context7) {
10525
10544
  while (1) {
10526
10545
  switch (_context7.prev = _context7.next) {
10527
10546
  case 0:
@@ -10576,11 +10595,13 @@ var DefaultController = {
10576
10595
  }, _callee2);
10577
10596
  }));
10578
10597
 
10579
- return function () {
10598
+ function saveFile(_x, _x2, _x3) {
10580
10599
  return _saveFile.apply(this, arguments);
10581
- };
10600
+ }
10601
+
10602
+ return saveFile;
10582
10603
  }(),
10583
- saveBase64: function (name
10604
+ saveBase64: function saveBase64(name
10584
10605
  /*: string*/
10585
10606
  , source
10586
10607
  /*: FileSource*/
@@ -10607,16 +10628,17 @@ var DefaultController = {
10607
10628
  data._ContentType = source.type;
10608
10629
  }
10609
10630
 
10610
- return _CoreManager.default.getRESTController().request('POST', 'files/' + name, data, options);
10631
+ var path = 'files/' + name;
10632
+ return _CoreManager.default.getRESTController().request('POST', path, data, options);
10611
10633
  },
10612
- download: function (uri, options) {
10634
+ download: function download(uri, options) {
10613
10635
  if (XHR) {
10614
10636
  return this.downloadAjax(uri, options);
10615
10637
  } else {
10616
10638
  return _promise.default.reject('Cannot make a request: No definition of XMLHttpRequest was found.');
10617
10639
  }
10618
10640
  },
10619
- downloadAjax: function (uri, options) {
10641
+ downloadAjax: function downloadAjax(uri, options) {
10620
10642
  return new _promise.default(function (resolve, reject) {
10621
10643
  var xhr = new XHR();
10622
10644
  xhr.open('GET', uri, true);
@@ -10646,7 +10668,7 @@ var DefaultController = {
10646
10668
  xhr.send();
10647
10669
  });
10648
10670
  },
10649
- deleteFile: function (name
10671
+ deleteFile: function deleteFile(name
10650
10672
  /*: string*/
10651
10673
  , options
10652
10674
  /*:: ?: FullOptions*/
@@ -10675,12 +10697,12 @@ var DefaultController = {
10675
10697
  }
10676
10698
  });
10677
10699
  },
10678
- _setXHR: function (xhr
10700
+ _setXHR: function _setXHR(xhr
10679
10701
  /*: any*/
10680
10702
  ) {
10681
10703
  XHR = xhr;
10682
10704
  },
10683
- _getXHR: function () {
10705
+ _getXHR: function _getXHR() {
10684
10706
  return XHR;
10685
10707
  }
10686
10708
  };
@@ -11499,7 +11521,7 @@ var LiveQuery = new _EventEmitter.default();
11499
11521
 
11500
11522
  LiveQuery.open = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
11501
11523
  var liveQueryClient;
11502
- return _regeneratorRuntime().wrap(function (_context) {
11524
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
11503
11525
  while (1) {
11504
11526
  switch (_context.prev = _context.next) {
11505
11527
  case 0:
@@ -11527,7 +11549,7 @@ LiveQuery.open = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_reg
11527
11549
 
11528
11550
  LiveQuery.close = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
11529
11551
  var liveQueryClient;
11530
- return _regeneratorRuntime().wrap(function (_context2) {
11552
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11531
11553
  while (1) {
11532
11554
  switch (_context2.prev = _context2.next) {
11533
11555
  case 0:
@@ -11551,18 +11573,18 @@ var _default = LiveQuery;
11551
11573
  exports.default = _default;
11552
11574
  var defaultLiveQueryClient;
11553
11575
  var DefaultLiveQueryController = {
11554
- setDefaultLiveQueryClient: function (liveQueryClient
11576
+ setDefaultLiveQueryClient: function setDefaultLiveQueryClient(liveQueryClient
11555
11577
  /*: LiveQueryClient*/
11556
11578
  ) {
11557
11579
  defaultLiveQueryClient = liveQueryClient;
11558
11580
  },
11559
- getDefaultLiveQueryClient: function ()
11581
+ getDefaultLiveQueryClient: function getDefaultLiveQueryClient()
11560
11582
  /*: Promise<LiveQueryClient>*/
11561
11583
  {
11562
11584
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
11563
11585
  var _yield$Promise$all, _yield$Promise$all2, currentUser, installationId, sessionToken, liveQueryServerURL, serverURL, protocol, host, applicationId, javascriptKey, masterKey;
11564
11586
 
11565
- return _regeneratorRuntime().wrap(function (_context3) {
11587
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
11566
11588
  while (1) {
11567
11589
  switch (_context3.prev = _context3.next) {
11568
11590
  case 0:
@@ -11633,7 +11655,7 @@ var DefaultLiveQueryController = {
11633
11655
  }, _callee3);
11634
11656
  }))();
11635
11657
  },
11636
- _clearCachedDefaultClient: function () {
11658
+ _clearCachedDefaultClient: function _clearCachedDefaultClient() {
11637
11659
  defaultLiveQueryClient = null;
11638
11660
  }
11639
11661
  };
@@ -13582,7 +13604,7 @@ var ParseObject = /*#__PURE__*/function () {
13582
13604
  /*:: ?: RequestOptions*/
13583
13605
  ) {
13584
13606
  var query;
13585
- return _regeneratorRuntime().wrap(function (_context) {
13607
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13586
13608
  while (1) {
13587
13609
  switch (_context.prev = _context.next) {
13588
13610
  case 0:
@@ -13624,9 +13646,11 @@ var ParseObject = /*#__PURE__*/function () {
13624
13646
  }, _callee, this, [[2, 9]]);
13625
13647
  }));
13626
13648
 
13627
- return function () {
13649
+ function exists(_x) {
13628
13650
  return _exists.apply(this, arguments);
13629
- };
13651
+ }
13652
+
13653
+ return exists;
13630
13654
  }()
13631
13655
  /**
13632
13656
  * Checks if the model is currently in a valid state.
@@ -13636,7 +13660,7 @@ var ParseObject = /*#__PURE__*/function () {
13636
13660
 
13637
13661
  }, {
13638
13662
  key: "isValid",
13639
- value: function ()
13663
+ value: function isValid()
13640
13664
  /*: boolean*/
13641
13665
  {
13642
13666
  return !this.validate(this.attributes);
@@ -13654,7 +13678,7 @@ var ParseObject = /*#__PURE__*/function () {
13654
13678
 
13655
13679
  }, {
13656
13680
  key: "validate",
13657
- value: function (attrs
13681
+ value: function validate(attrs
13658
13682
  /*: AttributeMap*/
13659
13683
  )
13660
13684
  /*: ParseError | boolean*/
@@ -13680,7 +13704,7 @@ var ParseObject = /*#__PURE__*/function () {
13680
13704
 
13681
13705
  }, {
13682
13706
  key: "getACL",
13683
- value: function ()
13707
+ value: function getACL()
13684
13708
  /*: ?ParseACL*/
13685
13709
  {
13686
13710
  var acl = this.get('ACL');
@@ -13702,7 +13726,7 @@ var ParseObject = /*#__PURE__*/function () {
13702
13726
 
13703
13727
  }, {
13704
13728
  key: "setACL",
13705
- value: function (acl
13729
+ value: function setACL(acl
13706
13730
  /*: ParseACL*/
13707
13731
  , options
13708
13732
  /*:: ?: mixed*/
@@ -13719,7 +13743,7 @@ var ParseObject = /*#__PURE__*/function () {
13719
13743
 
13720
13744
  }, {
13721
13745
  key: "revert",
13722
- value: function ()
13746
+ value: function revert()
13723
13747
  /*: void*/
13724
13748
  {
13725
13749
  var keysToRevert;
@@ -13761,7 +13785,7 @@ var ParseObject = /*#__PURE__*/function () {
13761
13785
 
13762
13786
  }, {
13763
13787
  key: "clear",
13764
- value: function ()
13788
+ value: function clear()
13765
13789
  /*: ParseObject | boolean*/
13766
13790
  {
13767
13791
  var attributes = this.attributes;
@@ -13802,7 +13826,7 @@ var ParseObject = /*#__PURE__*/function () {
13802
13826
 
13803
13827
  }, {
13804
13828
  key: "fetch",
13805
- value: function (options
13829
+ value: function fetch(options
13806
13830
  /*: RequestOptions*/
13807
13831
  )
13808
13832
  /*: Promise*/
@@ -13867,7 +13891,7 @@ var ParseObject = /*#__PURE__*/function () {
13867
13891
 
13868
13892
  }, {
13869
13893
  key: "fetchWithInclude",
13870
- value: function (keys
13894
+ value: function fetchWithInclude(keys
13871
13895
  /*: String | Array<string | Array<string>>*/
13872
13896
  , options
13873
13897
  /*: RequestOptions*/
@@ -13909,7 +13933,7 @@ var ParseObject = /*#__PURE__*/function () {
13909
13933
  var _saveEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(options
13910
13934
  /*: SaveOptions*/
13911
13935
  ) {
13912
- return _regeneratorRuntime().wrap(function (_context4) {
13936
+ return _regeneratorRuntime().wrap(function _callee2$(_context4) {
13913
13937
  while (1) {
13914
13938
  switch (_context4.prev = _context4.next) {
13915
13939
  case 0:
@@ -13947,9 +13971,11 @@ var ParseObject = /*#__PURE__*/function () {
13947
13971
  }, _callee2, this, [[0, 5]]);
13948
13972
  }));
13949
13973
 
13950
- return function () {
13974
+ function saveEventually(_x2) {
13951
13975
  return _saveEventually.apply(this, arguments);
13952
- };
13976
+ }
13977
+
13978
+ return saveEventually;
13953
13979
  }()
13954
13980
  /**
13955
13981
  * Set a hash of model attributes, and save the model to the server.
@@ -14017,7 +14043,7 @@ var ParseObject = /*#__PURE__*/function () {
14017
14043
 
14018
14044
  }, {
14019
14045
  key: "save",
14020
- value: function (arg1
14046
+ value: function save(arg1
14021
14047
  /*: ?string | { [attr: string]: mixed }*/
14022
14048
  , arg2
14023
14049
  /*: SaveOptions | mixed*/
@@ -14026,6 +14052,8 @@ var ParseObject = /*#__PURE__*/function () {
14026
14052
  )
14027
14053
  /*: Promise*/
14028
14054
  {
14055
+ var _this = this;
14056
+
14029
14057
  var attrs;
14030
14058
  var options;
14031
14059
 
@@ -14074,7 +14102,7 @@ var ParseObject = /*#__PURE__*/function () {
14074
14102
 
14075
14103
  var unsaved = options.cascadeSave !== false ? (0, _unsavedChildren.default)(this) : null;
14076
14104
  return controller.save(unsaved, saveOptions).then(function () {
14077
- return controller.save(this, saveOptions);
14105
+ return controller.save(_this, saveOptions);
14078
14106
  });
14079
14107
  }
14080
14108
  /**
@@ -14106,7 +14134,7 @@ var ParseObject = /*#__PURE__*/function () {
14106
14134
  var _destroyEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(options
14107
14135
  /*: RequestOptions*/
14108
14136
  ) {
14109
- return _regeneratorRuntime().wrap(function (_context5) {
14137
+ return _regeneratorRuntime().wrap(function _callee3$(_context5) {
14110
14138
  while (1) {
14111
14139
  switch (_context5.prev = _context5.next) {
14112
14140
  case 0:
@@ -14144,9 +14172,11 @@ var ParseObject = /*#__PURE__*/function () {
14144
14172
  }, _callee3, this, [[0, 5]]);
14145
14173
  }));
14146
14174
 
14147
- return function () {
14175
+ function destroyEventually(_x3) {
14148
14176
  return _destroyEventually.apply(this, arguments);
14149
- };
14177
+ }
14178
+
14179
+ return destroyEventually;
14150
14180
  }()
14151
14181
  /**
14152
14182
  * Destroy this model on the server if it was already persisted.
@@ -14165,7 +14195,7 @@ var ParseObject = /*#__PURE__*/function () {
14165
14195
 
14166
14196
  }, {
14167
14197
  key: "destroy",
14168
- value: function (options
14198
+ value: function destroy(options
14169
14199
  /*: RequestOptions*/
14170
14200
  )
14171
14201
  /*: Promise*/
@@ -14210,7 +14240,7 @@ var ParseObject = /*#__PURE__*/function () {
14210
14240
 
14211
14241
  }, {
14212
14242
  key: "pin",
14213
- value: function ()
14243
+ value: function pin()
14214
14244
  /*: Promise<void>*/
14215
14245
  {
14216
14246
  return ParseObject.pinAllWithName(_LocalDatastoreUtils.DEFAULT_PIN, [this]);
@@ -14228,7 +14258,7 @@ var ParseObject = /*#__PURE__*/function () {
14228
14258
 
14229
14259
  }, {
14230
14260
  key: "unPin",
14231
- value: function ()
14261
+ value: function unPin()
14232
14262
  /*: Promise<void>*/
14233
14263
  {
14234
14264
  return ParseObject.unPinAllWithName(_LocalDatastoreUtils.DEFAULT_PIN, [this]);
@@ -14248,7 +14278,7 @@ var ParseObject = /*#__PURE__*/function () {
14248
14278
  value: function () {
14249
14279
  var _isPinned = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
14250
14280
  var localDatastore, objectKey, pin;
14251
- return _regeneratorRuntime().wrap(function (_context6) {
14281
+ return _regeneratorRuntime().wrap(function _callee4$(_context6) {
14252
14282
  while (1) {
14253
14283
  switch (_context6.prev = _context6.next) {
14254
14284
  case 0:
@@ -14278,9 +14308,11 @@ var ParseObject = /*#__PURE__*/function () {
14278
14308
  }, _callee4, this);
14279
14309
  }));
14280
14310
 
14281
- return function () {
14311
+ function isPinned() {
14282
14312
  return _isPinned.apply(this, arguments);
14283
- };
14313
+ }
14314
+
14315
+ return isPinned;
14284
14316
  }()
14285
14317
  /**
14286
14318
  * Asynchronously stores the objects and every object they point to in the local datastore, recursively.
@@ -14301,7 +14333,7 @@ var ParseObject = /*#__PURE__*/function () {
14301
14333
 
14302
14334
  }, {
14303
14335
  key: "pinWithName",
14304
- value: function (name
14336
+ value: function pinWithName(name
14305
14337
  /*: string*/
14306
14338
  )
14307
14339
  /*: Promise<void>*/
@@ -14321,7 +14353,7 @@ var ParseObject = /*#__PURE__*/function () {
14321
14353
 
14322
14354
  }, {
14323
14355
  key: "unPinWithName",
14324
- value: function (name
14356
+ value: function unPinWithName(name
14325
14357
  /*: string*/
14326
14358
  )
14327
14359
  /*: Promise<void>*/
@@ -14346,7 +14378,7 @@ var ParseObject = /*#__PURE__*/function () {
14346
14378
  value: function () {
14347
14379
  var _fetchFromLocalDatastore = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
14348
14380
  var localDatastore, objectKey, pinned, result;
14349
- return _regeneratorRuntime().wrap(function (_context7) {
14381
+ return _regeneratorRuntime().wrap(function _callee5$(_context7) {
14350
14382
  while (1) {
14351
14383
  switch (_context7.prev = _context7.next) {
14352
14384
  case 0:
@@ -14389,20 +14421,22 @@ var ParseObject = /*#__PURE__*/function () {
14389
14421
  }, _callee5, this);
14390
14422
  }));
14391
14423
 
14392
- return function () {
14424
+ function fetchFromLocalDatastore() {
14393
14425
  return _fetchFromLocalDatastore.apply(this, arguments);
14394
- };
14426
+ }
14427
+
14428
+ return fetchFromLocalDatastore;
14395
14429
  }()
14396
14430
  /** Static methods **/
14397
14431
 
14398
14432
  }], [{
14399
14433
  key: "_getClassMap",
14400
- value: function () {
14434
+ value: function _getClassMap() {
14401
14435
  return classMap;
14402
14436
  }
14403
14437
  }, {
14404
14438
  key: "_clearAllState",
14405
- value: function () {
14439
+ value: function _clearAllState() {
14406
14440
  var stateController = _CoreManager.default.getObjectStateController();
14407
14441
 
14408
14442
  stateController.clearAllState();
@@ -14436,7 +14470,7 @@ var ParseObject = /*#__PURE__*/function () {
14436
14470
 
14437
14471
  }, {
14438
14472
  key: "fetchAll",
14439
- value: function (list
14473
+ value: function fetchAll(list
14440
14474
  /*: Array<ParseObject>*/
14441
14475
  ) {
14442
14476
  var options
@@ -14490,7 +14524,7 @@ var ParseObject = /*#__PURE__*/function () {
14490
14524
 
14491
14525
  }, {
14492
14526
  key: "fetchAllWithInclude",
14493
- value: function (list
14527
+ value: function fetchAllWithInclude(list
14494
14528
  /*: Array<ParseObject>*/
14495
14529
  , keys
14496
14530
  /*: String | Array<string | Array<string>>*/
@@ -14534,7 +14568,7 @@ var ParseObject = /*#__PURE__*/function () {
14534
14568
 
14535
14569
  }, {
14536
14570
  key: "fetchAllIfNeededWithInclude",
14537
- value: function (list
14571
+ value: function fetchAllIfNeededWithInclude(list
14538
14572
  /*: Array<ParseObject>*/
14539
14573
  , keys
14540
14574
  /*: String | Array<string | Array<string>>*/
@@ -14566,7 +14600,7 @@ var ParseObject = /*#__PURE__*/function () {
14566
14600
 
14567
14601
  }, {
14568
14602
  key: "fetchAllIfNeeded",
14569
- value: function (list
14603
+ value: function fetchAllIfNeeded(list
14570
14604
  /*: Array<ParseObject>*/
14571
14605
  , options) {
14572
14606
  options = options || {};
@@ -14588,7 +14622,7 @@ var ParseObject = /*#__PURE__*/function () {
14588
14622
  }
14589
14623
  }, {
14590
14624
  key: "handleIncludeOptions",
14591
- value: function (options) {
14625
+ value: function handleIncludeOptions(options) {
14592
14626
  var include = [];
14593
14627
 
14594
14628
  if ((0, _isArray.default)(options.include)) {
@@ -14656,7 +14690,7 @@ var ParseObject = /*#__PURE__*/function () {
14656
14690
 
14657
14691
  }, {
14658
14692
  key: "destroyAll",
14659
- value: function (list
14693
+ value: function destroyAll(list
14660
14694
  /*: Array<ParseObject>*/
14661
14695
  ) {
14662
14696
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -14701,7 +14735,7 @@ var ParseObject = /*#__PURE__*/function () {
14701
14735
 
14702
14736
  }, {
14703
14737
  key: "saveAll",
14704
- value: function (list
14738
+ value: function saveAll(list
14705
14739
  /*: Array<ParseObject>*/
14706
14740
  ) {
14707
14741
  var options
@@ -14744,7 +14778,7 @@ var ParseObject = /*#__PURE__*/function () {
14744
14778
 
14745
14779
  }, {
14746
14780
  key: "createWithoutData",
14747
- value: function (id
14781
+ value: function createWithoutData(id
14748
14782
  /*: string*/
14749
14783
  ) {
14750
14784
  var obj = new this();
@@ -14764,7 +14798,7 @@ var ParseObject = /*#__PURE__*/function () {
14764
14798
 
14765
14799
  }, {
14766
14800
  key: "fromJSON",
14767
- value: function (json
14801
+ value: function fromJSON(json
14768
14802
  /*: any*/
14769
14803
  , override
14770
14804
  /*:: ?: boolean*/
@@ -14828,7 +14862,7 @@ var ParseObject = /*#__PURE__*/function () {
14828
14862
 
14829
14863
  }, {
14830
14864
  key: "registerSubclass",
14831
- value: function (className
14865
+ value: function registerSubclass(className
14832
14866
  /*: string*/
14833
14867
  , constructor
14834
14868
  /*: any*/
@@ -14859,7 +14893,7 @@ var ParseObject = /*#__PURE__*/function () {
14859
14893
 
14860
14894
  }, {
14861
14895
  key: "unregisterSubclass",
14862
- value: function (className
14896
+ value: function unregisterSubclass(className
14863
14897
  /*: string*/
14864
14898
  ) {
14865
14899
  if (typeof className !== 'string') {
@@ -14908,7 +14942,7 @@ var ParseObject = /*#__PURE__*/function () {
14908
14942
 
14909
14943
  }, {
14910
14944
  key: "extend",
14911
- value: function (className
14945
+ value: function extend(className
14912
14946
  /*: any*/
14913
14947
  , protoProps
14914
14948
  /*: any*/
@@ -14937,7 +14971,7 @@ var ParseObject = /*#__PURE__*/function () {
14937
14971
  parentProto = classMap[adjustedClassName].prototype;
14938
14972
  }
14939
14973
 
14940
- var ParseObjectSubclass = function (attributes, options) {
14974
+ var ParseObjectSubclass = function ParseObjectSubclass(attributes, options) {
14941
14975
  this.className = adjustedClassName;
14942
14976
  this._objCount = objectCount++; // Enable legacy initializers
14943
14977
 
@@ -15012,7 +15046,7 @@ var ParseObject = /*#__PURE__*/function () {
15012
15046
 
15013
15047
  }, {
15014
15048
  key: "enableSingleInstance",
15015
- value: function () {
15049
+ value: function enableSingleInstance() {
15016
15050
  singleInstance = true;
15017
15051
 
15018
15052
  _CoreManager.default.setObjectStateController(SingleInstanceStateController);
@@ -15028,7 +15062,7 @@ var ParseObject = /*#__PURE__*/function () {
15028
15062
 
15029
15063
  }, {
15030
15064
  key: "disableSingleInstance",
15031
- value: function () {
15065
+ value: function disableSingleInstance() {
15032
15066
  singleInstance = false;
15033
15067
 
15034
15068
  _CoreManager.default.setObjectStateController(UniqueInstanceStateController);
@@ -15054,7 +15088,7 @@ var ParseObject = /*#__PURE__*/function () {
15054
15088
 
15055
15089
  }, {
15056
15090
  key: "pinAll",
15057
- value: function (objects
15091
+ value: function pinAll(objects
15058
15092
  /*: Array<ParseObject>*/
15059
15093
  )
15060
15094
  /*: Promise<void>*/
@@ -15088,7 +15122,7 @@ var ParseObject = /*#__PURE__*/function () {
15088
15122
 
15089
15123
  }, {
15090
15124
  key: "pinAllWithName",
15091
- value: function (name
15125
+ value: function pinAllWithName(name
15092
15126
  /*: string*/
15093
15127
  , objects
15094
15128
  /*: Array<ParseObject>*/
@@ -15118,7 +15152,7 @@ var ParseObject = /*#__PURE__*/function () {
15118
15152
 
15119
15153
  }, {
15120
15154
  key: "unPinAll",
15121
- value: function (objects
15155
+ value: function unPinAll(objects
15122
15156
  /*: Array<ParseObject>*/
15123
15157
  )
15124
15158
  /*: Promise<void>*/
@@ -15146,7 +15180,7 @@ var ParseObject = /*#__PURE__*/function () {
15146
15180
 
15147
15181
  }, {
15148
15182
  key: "unPinAllWithName",
15149
- value: function (name
15183
+ value: function unPinAllWithName(name
15150
15184
  /*: string*/
15151
15185
  , objects
15152
15186
  /*: Array<ParseObject>*/
@@ -15174,7 +15208,7 @@ var ParseObject = /*#__PURE__*/function () {
15174
15208
 
15175
15209
  }, {
15176
15210
  key: "unPinAllObjects",
15177
- value: function ()
15211
+ value: function unPinAllObjects()
15178
15212
  /*: Promise<void>*/
15179
15213
  {
15180
15214
  var localDatastore = _CoreManager.default.getLocalDatastore();
@@ -15200,7 +15234,7 @@ var ParseObject = /*#__PURE__*/function () {
15200
15234
 
15201
15235
  }, {
15202
15236
  key: "unPinAllObjectsWithName",
15203
- value: function (name
15237
+ value: function unPinAllObjectsWithName(name
15204
15238
  /*: string*/
15205
15239
  )
15206
15240
  /*: Promise<void>*/
@@ -15218,7 +15252,7 @@ var ParseObject = /*#__PURE__*/function () {
15218
15252
  }();
15219
15253
 
15220
15254
  var DefaultController = {
15221
- fetch: function (target
15255
+ fetch: function fetch(target
15222
15256
  /*: ParseObject | Array<ParseObject>*/
15223
15257
  , forceFetch
15224
15258
  /*: boolean*/
@@ -15280,7 +15314,7 @@ var DefaultController = {
15280
15314
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(objects) {
15281
15315
  var idMap, i, obj, _i, _obj, id, _iterator2, _step2, object;
15282
15316
 
15283
- return _regeneratorRuntime().wrap(function (_context9) {
15317
+ return _regeneratorRuntime().wrap(function _callee6$(_context9) {
15284
15318
  while (1) {
15285
15319
  switch (_context9.prev = _context9.next) {
15286
15320
  case 0:
@@ -15378,7 +15412,7 @@ var DefaultController = {
15378
15412
  }, _callee6, null, [[13, 23, 26, 29]]);
15379
15413
  }));
15380
15414
 
15381
- return function () {
15415
+ return function (_x4) {
15382
15416
  return _ref.apply(this, arguments);
15383
15417
  };
15384
15418
  }());
@@ -15397,7 +15431,7 @@ var DefaultController = {
15397
15431
 
15398
15432
  return RESTController.request('GET', 'classes/' + target.className + '/' + target._getId(), params, options).then( /*#__PURE__*/function () {
15399
15433
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(response) {
15400
- return _regeneratorRuntime().wrap(function (_context10) {
15434
+ return _regeneratorRuntime().wrap(function _callee7$(_context10) {
15401
15435
  while (1) {
15402
15436
  switch (_context10.prev = _context10.next) {
15403
15437
  case 0:
@@ -15421,7 +15455,7 @@ var DefaultController = {
15421
15455
  }, _callee7);
15422
15456
  }));
15423
15457
 
15424
- return function () {
15458
+ return function (_x5) {
15425
15459
  return _ref2.apply(this, arguments);
15426
15460
  };
15427
15461
  }());
@@ -15429,7 +15463,7 @@ var DefaultController = {
15429
15463
 
15430
15464
  return _promise.default.resolve();
15431
15465
  },
15432
- destroy: function (target
15466
+ destroy: function destroy(target
15433
15467
  /*: ParseObject | Array<ParseObject>*/
15434
15468
  , options
15435
15469
  /*: RequestOptions*/
@@ -15438,7 +15472,7 @@ var DefaultController = {
15438
15472
  {
15439
15473
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
15440
15474
  var batchSize, localDatastore, RESTController, batches, deleteCompleted, errors;
15441
- return _regeneratorRuntime().wrap(function (_context13) {
15475
+ return _regeneratorRuntime().wrap(function _callee10$(_context13) {
15442
15476
  while (1) {
15443
15477
  switch (_context13.prev = _context13.next) {
15444
15478
  case 0:
@@ -15503,7 +15537,7 @@ var DefaultController = {
15503
15537
  return _context13.abrupt("return", deleteCompleted.then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
15504
15538
  var aggregate, _iterator3, _step3, object;
15505
15539
 
15506
- return _regeneratorRuntime().wrap(function (_context11) {
15540
+ return _regeneratorRuntime().wrap(function _callee8$(_context11) {
15507
15541
  while (1) {
15508
15542
  switch (_context11.prev = _context11.next) {
15509
15543
  case 0:
@@ -15571,7 +15605,7 @@ var DefaultController = {
15571
15605
  }
15572
15606
 
15573
15607
  return _context13.abrupt("return", RESTController.request('DELETE', 'classes/' + target.className + '/' + target._getId(), {}, options).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
15574
- return _regeneratorRuntime().wrap(function (_context12) {
15608
+ return _regeneratorRuntime().wrap(function _callee9$(_context12) {
15575
15609
  while (1) {
15576
15610
  switch (_context12.prev = _context12.next) {
15577
15611
  case 0:
@@ -15600,7 +15634,7 @@ var DefaultController = {
15600
15634
  }, _callee10);
15601
15635
  }))();
15602
15636
  },
15603
- save: function (target
15637
+ save: function save(target
15604
15638
  /*: ParseObject | Array<ParseObject | ParseFile>*/
15605
15639
  , options
15606
15640
  /*: RequestOptions*/
@@ -15679,8 +15713,8 @@ var DefaultController = {
15679
15713
  (0, _forEach.default)(batch).call(batch, function (obj, index) {
15680
15714
  var ready = new _promiseUtils.resolvingPromise();
15681
15715
  batchReady.push(ready);
15682
- stateController.pushPendingState(obj._getStateIdentifier());
15683
- batchTasks.push(stateController.enqueueTask(obj._getStateIdentifier(), function () {
15716
+
15717
+ var task = function task() {
15684
15718
  ready.resolve();
15685
15719
  return batchReturned.then(function (responses) {
15686
15720
  if (responses[index].hasOwnProperty('success')) {
@@ -15701,7 +15735,10 @@ var DefaultController = {
15701
15735
  obj._handleSaveError();
15702
15736
  }
15703
15737
  });
15704
- }));
15738
+ };
15739
+
15740
+ stateController.pushPendingState(obj._getStateIdentifier());
15741
+ batchTasks.push(stateController.enqueueTask(obj._getStateIdentifier(), task));
15705
15742
  });
15706
15743
  (0, _promiseUtils.when)(batchReady).then(function () {
15707
15744
  // Kick off the batch request
@@ -15720,7 +15757,7 @@ var DefaultController = {
15720
15757
  }).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
15721
15758
  var _iterator4, _step4, object;
15722
15759
 
15723
- return _regeneratorRuntime().wrap(function (_context14) {
15760
+ return _regeneratorRuntime().wrap(function _callee11$(_context14) {
15724
15761
  while (1) {
15725
15762
  switch (_context14.prev = _context14.next) {
15726
15763
  case 0:
@@ -15795,7 +15832,7 @@ var DefaultController = {
15795
15832
 
15796
15833
  var targetCopy = target;
15797
15834
 
15798
- var task = function () {
15835
+ var task = function task() {
15799
15836
  var params = targetCopy._getSaveParams();
15800
15837
 
15801
15838
  return RESTController.request(params.method, params.path, params.body, options).then(function (response) {
@@ -15812,7 +15849,7 @@ var DefaultController = {
15812
15849
 
15813
15850
  stateController.pushPendingState(target._getStateIdentifier());
15814
15851
  return stateController.enqueueTask(target._getStateIdentifier(), task).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
15815
- return _regeneratorRuntime().wrap(function (_context15) {
15852
+ return _regeneratorRuntime().wrap(function _callee12$(_context15) {
15816
15853
  while (1) {
15817
15854
  switch (_context15.prev = _context15.next) {
15818
15855
  case 0:
@@ -16629,10 +16666,12 @@ var RelationOp = /*#__PURE__*/function (_Op7) {
16629
16666
  value: function ()
16630
16667
  /*: { __op?: string, objects?: mixed, ops?: mixed }*/
16631
16668
  {
16669
+ var _this7 = this;
16670
+
16632
16671
  var idToPointer = function (id) {
16633
16672
  return {
16634
16673
  __type: 'Pointer',
16635
- className: this._targetClassName,
16674
+ className: _this7._targetClassName,
16636
16675
  objectId: id
16637
16676
  };
16638
16677
  };
@@ -17838,9 +17877,11 @@ var ParseQuery = /*#__PURE__*/function () {
17838
17877
  }, _callee, this);
17839
17878
  }));
17840
17879
 
17841
- return function () {
17880
+ function _handleOfflineQuery() {
17842
17881
  return _handleOfflineQuery2.apply(this, arguments);
17843
- };
17882
+ }
17883
+
17884
+ return _handleOfflineQuery;
17844
17885
  }()
17845
17886
  /**
17846
17887
  * Returns a JSON representation of this query.
@@ -18186,7 +18227,7 @@ var ParseQuery = /*#__PURE__*/function () {
18186
18227
  /*:: ?: BatchOptions*/
18187
18228
  ) {
18188
18229
  var result;
18189
- return _regeneratorRuntime().wrap(function (_context7) {
18230
+ return _regeneratorRuntime().wrap(function _callee2$(_context7) {
18190
18231
  while (1) {
18191
18232
  switch (_context7.prev = _context7.next) {
18192
18233
  case 0:
@@ -18213,9 +18254,11 @@ var ParseQuery = /*#__PURE__*/function () {
18213
18254
  }, _callee2, this);
18214
18255
  }));
18215
18256
 
18216
- return function () {
18257
+ function findAll(_x2) {
18217
18258
  return _findAll.apply(this, arguments);
18218
- };
18259
+ }
18260
+
18261
+ return findAll;
18219
18262
  }()
18220
18263
  /**
18221
18264
  * Counts the number of objects that match this query.
@@ -18234,7 +18277,7 @@ var ParseQuery = /*#__PURE__*/function () {
18234
18277
 
18235
18278
  }, {
18236
18279
  key: "count",
18237
- value: function (options
18280
+ value: function count(options
18238
18281
  /*:: ?: FullOptions*/
18239
18282
  )
18240
18283
  /*: Promise<number>*/
@@ -18276,7 +18319,7 @@ var ParseQuery = /*#__PURE__*/function () {
18276
18319
 
18277
18320
  }, {
18278
18321
  key: "distinct",
18279
- value: function (key
18322
+ value: function distinct(key
18280
18323
  /*: string*/
18281
18324
  , options
18282
18325
  /*:: ?: FullOptions*/
@@ -18318,7 +18361,7 @@ var ParseQuery = /*#__PURE__*/function () {
18318
18361
 
18319
18362
  }, {
18320
18363
  key: "aggregate",
18321
- value: function (pipeline
18364
+ value: function aggregate(pipeline
18322
18365
  /*: mixed*/
18323
18366
  , options
18324
18367
  /*:: ?: FullOptions*/
@@ -18381,11 +18424,13 @@ var ParseQuery = /*#__PURE__*/function () {
18381
18424
 
18382
18425
  }, {
18383
18426
  key: "first",
18384
- value: function (options
18427
+ value: function first(options
18385
18428
  /*:: ?: FullOptions*/
18386
18429
  )
18387
18430
  /*: Promise<ParseObject | void>*/
18388
18431
  {
18432
+ var _this4 = this;
18433
+
18389
18434
  options = options || {};
18390
18435
  var findOptions = {};
18391
18436
 
@@ -18427,7 +18472,7 @@ var ParseQuery = /*#__PURE__*/function () {
18427
18472
  }
18428
18473
 
18429
18474
  if (!objects[0].className) {
18430
- objects[0].className = this.className;
18475
+ objects[0].className = _this4.className;
18431
18476
  } // Make sure the data object contains keys for all objects that
18432
18477
  // have been requested with a select, so that our cached state
18433
18478
  // updates correctly.
@@ -18468,7 +18513,7 @@ var ParseQuery = /*#__PURE__*/function () {
18468
18513
 
18469
18514
  }, {
18470
18515
  key: "eachBatch",
18471
- value: function (callback
18516
+ value: function eachBatch(callback
18472
18517
  /*: (objs: Array<ParseObject>) => Promise<*>*/
18473
18518
  , options
18474
18519
  /*:: ?: BatchOptions*/
@@ -18480,7 +18525,8 @@ var ParseQuery = /*#__PURE__*/function () {
18480
18525
  options = options || {};
18481
18526
 
18482
18527
  if (this._order || this._skip || this._limit >= 0) {
18483
- return _promise.default.reject('Cannot iterate on a query with sort, skip, or limit.');
18528
+ var error = 'Cannot iterate on a query with sort, skip, or limit.';
18529
+ return _promise.default.reject(error);
18484
18530
  }
18485
18531
 
18486
18532
  var query = new ParseQuery(this.className);
@@ -18545,7 +18591,7 @@ var ParseQuery = /*#__PURE__*/function () {
18545
18591
  }, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
18546
18592
  var _yield$Promise$all, _yield$Promise$all2, results;
18547
18593
 
18548
- return _regeneratorRuntime().wrap(function (_context10) {
18594
+ return _regeneratorRuntime().wrap(function _callee3$(_context10) {
18549
18595
  while (1) {
18550
18596
  switch (_context10.prev = _context10.next) {
18551
18597
  case 0:
@@ -18615,7 +18661,7 @@ var ParseQuery = /*#__PURE__*/function () {
18615
18661
 
18616
18662
  }, {
18617
18663
  key: "each",
18618
- value: function (callback
18664
+ value: function each(callback
18619
18665
  /*: (obj: ParseObject) => any*/
18620
18666
  , options
18621
18667
  /*:: ?: BatchOptions*/
@@ -18642,7 +18688,7 @@ var ParseQuery = /*#__PURE__*/function () {
18642
18688
 
18643
18689
  }, {
18644
18690
  key: "hint",
18645
- value: function (value
18691
+ value: function hint(value
18646
18692
  /*: mixed*/
18647
18693
  )
18648
18694
  /*: ParseQuery*/
@@ -18663,7 +18709,7 @@ var ParseQuery = /*#__PURE__*/function () {
18663
18709
 
18664
18710
  }, {
18665
18711
  key: "explain",
18666
- value: function ()
18712
+ value: function explain()
18667
18713
  /*: ParseQuery*/
18668
18714
  {
18669
18715
  var _explain
@@ -18709,8 +18755,10 @@ var ParseQuery = /*#__PURE__*/function () {
18709
18755
  , options
18710
18756
  /*:: ?: BatchOptions*/
18711
18757
  ) {
18758
+ var _this5 = this;
18759
+
18712
18760
  var array, index;
18713
- return _regeneratorRuntime().wrap(function (_context11) {
18761
+ return _regeneratorRuntime().wrap(function _callee4$(_context11) {
18714
18762
  while (1) {
18715
18763
  switch (_context11.prev = _context11.next) {
18716
18764
  case 0:
@@ -18718,7 +18766,7 @@ var ParseQuery = /*#__PURE__*/function () {
18718
18766
  index = 0;
18719
18767
  _context11.next = 4;
18720
18768
  return this.each(function (object) {
18721
- return _promise.default.resolve(callback(object, index, this)).then(function (result) {
18769
+ return _promise.default.resolve(callback(object, index, _this5)).then(function (result) {
18722
18770
  array.push(result);
18723
18771
  index += 1;
18724
18772
  });
@@ -18735,9 +18783,11 @@ var ParseQuery = /*#__PURE__*/function () {
18735
18783
  }, _callee4, this);
18736
18784
  }));
18737
18785
 
18738
- return function () {
18786
+ function map(_x3, _x4) {
18739
18787
  return _map.apply(this, arguments);
18740
- };
18788
+ }
18789
+
18790
+ return map;
18741
18791
  }()
18742
18792
  /**
18743
18793
  * Iterates over each result of a query, calling a callback for each one. If
@@ -18774,7 +18824,7 @@ var ParseQuery = /*#__PURE__*/function () {
18774
18824
  /*:: ?: BatchOptions*/
18775
18825
  ) {
18776
18826
  var accumulator, index;
18777
- return _regeneratorRuntime().wrap(function (_context12) {
18827
+ return _regeneratorRuntime().wrap(function _callee5$(_context12) {
18778
18828
  while (1) {
18779
18829
  switch (_context12.prev = _context12.next) {
18780
18830
  case 0:
@@ -18815,9 +18865,11 @@ var ParseQuery = /*#__PURE__*/function () {
18815
18865
  }, _callee5, this);
18816
18866
  }));
18817
18867
 
18818
- return function () {
18868
+ function reduce(_x5, _x6, _x7) {
18819
18869
  return _reduce.apply(this, arguments);
18820
- };
18870
+ }
18871
+
18872
+ return reduce;
18821
18873
  }()
18822
18874
  /**
18823
18875
  * Iterates over each result of a query, calling a callback for each one. If
@@ -18851,8 +18903,10 @@ var ParseQuery = /*#__PURE__*/function () {
18851
18903
  , options
18852
18904
  /*:: ?: BatchOptions*/
18853
18905
  ) {
18906
+ var _this6 = this;
18907
+
18854
18908
  var array, index;
18855
- return _regeneratorRuntime().wrap(function (_context13) {
18909
+ return _regeneratorRuntime().wrap(function _callee6$(_context13) {
18856
18910
  while (1) {
18857
18911
  switch (_context13.prev = _context13.next) {
18858
18912
  case 0:
@@ -18860,7 +18914,7 @@ var ParseQuery = /*#__PURE__*/function () {
18860
18914
  index = 0;
18861
18915
  _context13.next = 4;
18862
18916
  return this.each(function (object) {
18863
- return _promise.default.resolve(callback(object, index, this)).then(function (flag) {
18917
+ return _promise.default.resolve(callback(object, index, _this6)).then(function (flag) {
18864
18918
  if (flag) {
18865
18919
  array.push(object);
18866
18920
  }
@@ -18880,9 +18934,11 @@ var ParseQuery = /*#__PURE__*/function () {
18880
18934
  }, _callee6, this);
18881
18935
  }));
18882
18936
 
18883
- return function () {
18937
+ function filter(_x8, _x9) {
18884
18938
  return _filter.apply(this, arguments);
18885
- };
18939
+ }
18940
+
18941
+ return filter;
18886
18942
  }()
18887
18943
  /** Query Conditions **/
18888
18944
 
@@ -18897,13 +18953,15 @@ var ParseQuery = /*#__PURE__*/function () {
18897
18953
 
18898
18954
  }, {
18899
18955
  key: "equalTo",
18900
- value: function (key
18956
+ value: function equalTo(key
18901
18957
  /*: string | { [key: string]: any }*/
18902
18958
  , value
18903
18959
  /*: ?mixed*/
18904
18960
  )
18905
18961
  /*: ParseQuery*/
18906
18962
  {
18963
+ var _this7 = this;
18964
+
18907
18965
  if (key && (0, _typeof2.default)(key) === 'object') {
18908
18966
  var _context14;
18909
18967
 
@@ -18912,7 +18970,7 @@ var ParseQuery = /*#__PURE__*/function () {
18912
18970
  k = _ref3[0],
18913
18971
  val = _ref3[1];
18914
18972
 
18915
- return this.equalTo(k, val);
18973
+ return _this7.equalTo(k, val);
18916
18974
  });
18917
18975
  return this;
18918
18976
  }
@@ -18935,13 +18993,15 @@ var ParseQuery = /*#__PURE__*/function () {
18935
18993
 
18936
18994
  }, {
18937
18995
  key: "notEqualTo",
18938
- value: function (key
18996
+ value: function notEqualTo(key
18939
18997
  /*: string | { [key: string]: any }*/
18940
18998
  , value
18941
18999
  /*: ?mixed*/
18942
19000
  )
18943
19001
  /*: ParseQuery*/
18944
19002
  {
19003
+ var _this8 = this;
19004
+
18945
19005
  if (key && (0, _typeof2.default)(key) === 'object') {
18946
19006
  var _context15;
18947
19007
 
@@ -18950,7 +19010,7 @@ var ParseQuery = /*#__PURE__*/function () {
18950
19010
  k = _ref5[0],
18951
19011
  val = _ref5[1];
18952
19012
 
18953
- return this.notEqualTo(k, val);
19013
+ return _this8.notEqualTo(k, val);
18954
19014
  });
18955
19015
  return this;
18956
19016
  }
@@ -18968,7 +19028,7 @@ var ParseQuery = /*#__PURE__*/function () {
18968
19028
 
18969
19029
  }, {
18970
19030
  key: "lessThan",
18971
- value: function (key
19031
+ value: function lessThan(key
18972
19032
  /*: string*/
18973
19033
  , value
18974
19034
  /*: mixed*/
@@ -18988,7 +19048,7 @@ var ParseQuery = /*#__PURE__*/function () {
18988
19048
 
18989
19049
  }, {
18990
19050
  key: "greaterThan",
18991
- value: function (key
19051
+ value: function greaterThan(key
18992
19052
  /*: string*/
18993
19053
  , value
18994
19054
  /*: mixed*/
@@ -19008,7 +19068,7 @@ var ParseQuery = /*#__PURE__*/function () {
19008
19068
 
19009
19069
  }, {
19010
19070
  key: "lessThanOrEqualTo",
19011
- value: function (key
19071
+ value: function lessThanOrEqualTo(key
19012
19072
  /*: string*/
19013
19073
  , value
19014
19074
  /*: mixed*/
@@ -19028,7 +19088,7 @@ var ParseQuery = /*#__PURE__*/function () {
19028
19088
 
19029
19089
  }, {
19030
19090
  key: "greaterThanOrEqualTo",
19031
- value: function (key
19091
+ value: function greaterThanOrEqualTo(key
19032
19092
  /*: string*/
19033
19093
  , value
19034
19094
  /*: mixed*/
@@ -19048,7 +19108,7 @@ var ParseQuery = /*#__PURE__*/function () {
19048
19108
 
19049
19109
  }, {
19050
19110
  key: "containedIn",
19051
- value: function (key
19111
+ value: function containedIn(key
19052
19112
  /*: string*/
19053
19113
  , value
19054
19114
  /*: mixed*/
@@ -19068,7 +19128,7 @@ var ParseQuery = /*#__PURE__*/function () {
19068
19128
 
19069
19129
  }, {
19070
19130
  key: "notContainedIn",
19071
- value: function (key
19131
+ value: function notContainedIn(key
19072
19132
  /*: string*/
19073
19133
  , value
19074
19134
  /*: mixed*/
@@ -19088,7 +19148,7 @@ var ParseQuery = /*#__PURE__*/function () {
19088
19148
 
19089
19149
  }, {
19090
19150
  key: "containedBy",
19091
- value: function (key
19151
+ value: function containedBy(key
19092
19152
  /*: string*/
19093
19153
  , values
19094
19154
  /*: Array<mixed>*/
@@ -19108,7 +19168,7 @@ var ParseQuery = /*#__PURE__*/function () {
19108
19168
 
19109
19169
  }, {
19110
19170
  key: "containsAll",
19111
- value: function (key
19171
+ value: function containsAll(key
19112
19172
  /*: string*/
19113
19173
  , values
19114
19174
  /*: Array<mixed>*/
@@ -19128,20 +19188,22 @@ var ParseQuery = /*#__PURE__*/function () {
19128
19188
 
19129
19189
  }, {
19130
19190
  key: "containsAllStartingWith",
19131
- value: function (key
19191
+ value: function containsAllStartingWith(key
19132
19192
  /*: string*/
19133
19193
  , values
19134
19194
  /*: Array<string>*/
19135
19195
  )
19136
19196
  /*: ParseQuery*/
19137
19197
  {
19198
+ var _this = this;
19199
+
19138
19200
  if (!(0, _isArray.default)(values)) {
19139
19201
  values = [values];
19140
19202
  }
19141
19203
 
19142
19204
  var regexObject = (0, _map2.default)(values).call(values, function (value) {
19143
19205
  return {
19144
- $regex: this._regexStartWith(value)
19206
+ $regex: _this._regexStartWith(value)
19145
19207
  };
19146
19208
  });
19147
19209
  return this.containsAll(key, regexObject);
@@ -19155,7 +19217,7 @@ var ParseQuery = /*#__PURE__*/function () {
19155
19217
 
19156
19218
  }, {
19157
19219
  key: "exists",
19158
- value: function (key
19220
+ value: function exists(key
19159
19221
  /*: string*/
19160
19222
  )
19161
19223
  /*: ParseQuery*/
@@ -19171,7 +19233,7 @@ var ParseQuery = /*#__PURE__*/function () {
19171
19233
 
19172
19234
  }, {
19173
19235
  key: "doesNotExist",
19174
- value: function (key
19236
+ value: function doesNotExist(key
19175
19237
  /*: string*/
19176
19238
  )
19177
19239
  /*: ParseQuery*/
@@ -19191,7 +19253,7 @@ var ParseQuery = /*#__PURE__*/function () {
19191
19253
 
19192
19254
  }, {
19193
19255
  key: "matches",
19194
- value: function (key
19256
+ value: function matches(key
19195
19257
  /*: string*/
19196
19258
  , regex
19197
19259
  /*: RegExp*/
@@ -19232,7 +19294,7 @@ var ParseQuery = /*#__PURE__*/function () {
19232
19294
 
19233
19295
  }, {
19234
19296
  key: "matchesQuery",
19235
- value: function (key
19297
+ value: function matchesQuery(key
19236
19298
  /*: string*/
19237
19299
  , query
19238
19300
  /*: ParseQuery*/
@@ -19255,7 +19317,7 @@ var ParseQuery = /*#__PURE__*/function () {
19255
19317
 
19256
19318
  }, {
19257
19319
  key: "doesNotMatchQuery",
19258
- value: function (key
19320
+ value: function doesNotMatchQuery(key
19259
19321
  /*: string*/
19260
19322
  , query
19261
19323
  /*: ParseQuery*/
@@ -19280,7 +19342,7 @@ var ParseQuery = /*#__PURE__*/function () {
19280
19342
 
19281
19343
  }, {
19282
19344
  key: "matchesKeyInQuery",
19283
- value: function (key
19345
+ value: function matchesKeyInQuery(key
19284
19346
  /*: string*/
19285
19347
  , queryKey
19286
19348
  /*: string*/
@@ -19310,7 +19372,7 @@ var ParseQuery = /*#__PURE__*/function () {
19310
19372
 
19311
19373
  }, {
19312
19374
  key: "doesNotMatchKeyInQuery",
19313
- value: function (key
19375
+ value: function doesNotMatchKeyInQuery(key
19314
19376
  /*: string*/
19315
19377
  , queryKey
19316
19378
  /*: string*/
@@ -19337,7 +19399,7 @@ var ParseQuery = /*#__PURE__*/function () {
19337
19399
 
19338
19400
  }, {
19339
19401
  key: "contains",
19340
- value: function (key
19402
+ value: function contains(key
19341
19403
  /*: string*/
19342
19404
  , substring
19343
19405
  /*: string*/
@@ -19382,7 +19444,7 @@ var ParseQuery = /*#__PURE__*/function () {
19382
19444
 
19383
19445
  }, {
19384
19446
  key: "fullText",
19385
- value: function (key
19447
+ value: function fullText(key
19386
19448
  /*: string*/
19387
19449
  , value
19388
19450
  /*: string*/
@@ -19439,7 +19501,7 @@ var ParseQuery = /*#__PURE__*/function () {
19439
19501
 
19440
19502
  }, {
19441
19503
  key: "sortByTextScore",
19442
- value: function () {
19504
+ value: function sortByTextScore() {
19443
19505
  this.ascending('$score');
19444
19506
  this.select(['$score']);
19445
19507
  return this;
@@ -19457,7 +19519,7 @@ var ParseQuery = /*#__PURE__*/function () {
19457
19519
 
19458
19520
  }, {
19459
19521
  key: "startsWith",
19460
- value: function (key
19522
+ value: function startsWith(key
19461
19523
  /*: string*/
19462
19524
  , prefix
19463
19525
  /*: string*/
@@ -19484,7 +19546,7 @@ var ParseQuery = /*#__PURE__*/function () {
19484
19546
 
19485
19547
  }, {
19486
19548
  key: "endsWith",
19487
- value: function (key
19549
+ value: function endsWith(key
19488
19550
  /*: string*/
19489
19551
  , suffix
19490
19552
  /*: string*/
@@ -19510,7 +19572,7 @@ var ParseQuery = /*#__PURE__*/function () {
19510
19572
 
19511
19573
  }, {
19512
19574
  key: "near",
19513
- value: function (key
19575
+ value: function near(key
19514
19576
  /*: string*/
19515
19577
  , point
19516
19578
  /*: ParseGeoPoint*/
@@ -19539,7 +19601,7 @@ var ParseQuery = /*#__PURE__*/function () {
19539
19601
 
19540
19602
  }, {
19541
19603
  key: "withinRadians",
19542
- value: function (key
19604
+ value: function withinRadians(key
19543
19605
  /*: string*/
19544
19606
  , point
19545
19607
  /*: ParseGeoPoint*/
@@ -19575,7 +19637,7 @@ var ParseQuery = /*#__PURE__*/function () {
19575
19637
 
19576
19638
  }, {
19577
19639
  key: "withinMiles",
19578
- value: function (key
19640
+ value: function withinMiles(key
19579
19641
  /*: string*/
19580
19642
  , point
19581
19643
  /*: ParseGeoPoint*/
@@ -19604,7 +19666,7 @@ var ParseQuery = /*#__PURE__*/function () {
19604
19666
 
19605
19667
  }, {
19606
19668
  key: "withinKilometers",
19607
- value: function (key
19669
+ value: function withinKilometers(key
19608
19670
  /*: string*/
19609
19671
  , point
19610
19672
  /*: ParseGeoPoint*/
@@ -19632,7 +19694,7 @@ var ParseQuery = /*#__PURE__*/function () {
19632
19694
 
19633
19695
  }, {
19634
19696
  key: "withinGeoBox",
19635
- value: function (key
19697
+ value: function withinGeoBox(key
19636
19698
  /*: string*/
19637
19699
  , southwest
19638
19700
  /*: ParseGeoPoint*/
@@ -19669,7 +19731,7 @@ var ParseQuery = /*#__PURE__*/function () {
19669
19731
 
19670
19732
  }, {
19671
19733
  key: "withinPolygon",
19672
- value: function (key
19734
+ value: function withinPolygon(key
19673
19735
  /*: string*/
19674
19736
  , points
19675
19737
  /*: Array<Array<number>>*/
@@ -19691,7 +19753,7 @@ var ParseQuery = /*#__PURE__*/function () {
19691
19753
 
19692
19754
  }, {
19693
19755
  key: "polygonContains",
19694
- value: function (key
19756
+ value: function polygonContains(key
19695
19757
  /*: string*/
19696
19758
  , point
19697
19759
  /*: ParseGeoPoint*/
@@ -19714,7 +19776,7 @@ var ParseQuery = /*#__PURE__*/function () {
19714
19776
 
19715
19777
  }, {
19716
19778
  key: "ascending",
19717
- value: function ()
19779
+ value: function ascending()
19718
19780
  /*: ParseQuery*/
19719
19781
  {
19720
19782
  this._order = [];
@@ -19736,7 +19798,7 @@ var ParseQuery = /*#__PURE__*/function () {
19736
19798
 
19737
19799
  }, {
19738
19800
  key: "addAscending",
19739
- value: function ()
19801
+ value: function addAscending()
19740
19802
  /*: ParseQuery*/
19741
19803
  {
19742
19804
  var _this9 = this;
@@ -19770,7 +19832,7 @@ var ParseQuery = /*#__PURE__*/function () {
19770
19832
 
19771
19833
  }, {
19772
19834
  key: "descending",
19773
- value: function ()
19835
+ value: function descending()
19774
19836
  /*: ParseQuery*/
19775
19837
  {
19776
19838
  this._order = [];
@@ -19792,7 +19854,7 @@ var ParseQuery = /*#__PURE__*/function () {
19792
19854
 
19793
19855
  }, {
19794
19856
  key: "addDescending",
19795
- value: function ()
19857
+ value: function addDescending()
19796
19858
  /*: ParseQuery*/
19797
19859
  {
19798
19860
  var _this10 = this;
@@ -19831,7 +19893,7 @@ var ParseQuery = /*#__PURE__*/function () {
19831
19893
 
19832
19894
  }, {
19833
19895
  key: "skip",
19834
- value: function (n
19896
+ value: function skip(n
19835
19897
  /*: number*/
19836
19898
  )
19837
19899
  /*: ParseQuery*/
@@ -19852,7 +19914,7 @@ var ParseQuery = /*#__PURE__*/function () {
19852
19914
 
19853
19915
  }, {
19854
19916
  key: "limit",
19855
- value: function (n
19917
+ value: function limit(n
19856
19918
  /*: number*/
19857
19919
  )
19858
19920
  /*: ParseQuery*/
@@ -19876,7 +19938,7 @@ var ParseQuery = /*#__PURE__*/function () {
19876
19938
 
19877
19939
  }, {
19878
19940
  key: "withCount",
19879
- value: function ()
19941
+ value: function withCount()
19880
19942
  /*: ParseQuery*/
19881
19943
  {
19882
19944
  var includeCount
@@ -19904,7 +19966,7 @@ var ParseQuery = /*#__PURE__*/function () {
19904
19966
 
19905
19967
  }, {
19906
19968
  key: "include",
19907
- value: function ()
19969
+ value: function include()
19908
19970
  /*: ParseQuery*/
19909
19971
  {
19910
19972
  var _this11 = this;
@@ -19934,7 +19996,7 @@ var ParseQuery = /*#__PURE__*/function () {
19934
19996
 
19935
19997
  }, {
19936
19998
  key: "includeAll",
19937
- value: function ()
19999
+ value: function includeAll()
19938
20000
  /*: ParseQuery*/
19939
20001
  {
19940
20002
  return this.include('*');
@@ -19950,7 +20012,7 @@ var ParseQuery = /*#__PURE__*/function () {
19950
20012
 
19951
20013
  }, {
19952
20014
  key: "select",
19953
- value: function ()
20015
+ value: function select()
19954
20016
  /*: ParseQuery*/
19955
20017
  {
19956
20018
  var _this12 = this;
@@ -19986,7 +20048,7 @@ var ParseQuery = /*#__PURE__*/function () {
19986
20048
 
19987
20049
  }, {
19988
20050
  key: "exclude",
19989
- value: function ()
20051
+ value: function exclude()
19990
20052
  /*: ParseQuery*/
19991
20053
  {
19992
20054
  var _this13 = this;
@@ -20017,7 +20079,7 @@ var ParseQuery = /*#__PURE__*/function () {
20017
20079
 
20018
20080
  }, {
20019
20081
  key: "readPreference",
20020
- value: function (_readPreference
20082
+ value: function readPreference(_readPreference
20021
20083
  /*: string*/
20022
20084
  , includeReadPreference
20023
20085
  /*:: ?: string*/
@@ -20046,7 +20108,7 @@ var ParseQuery = /*#__PURE__*/function () {
20046
20108
  /*:: ?: string*/
20047
20109
  ) {
20048
20110
  var currentUser, liveQueryClient, subscription;
20049
- return _regeneratorRuntime().wrap(function (_context22) {
20111
+ return _regeneratorRuntime().wrap(function _callee7$(_context22) {
20050
20112
  while (1) {
20051
20113
  switch (_context22.prev = _context22.next) {
20052
20114
  case 0:
@@ -20083,9 +20145,11 @@ var ParseQuery = /*#__PURE__*/function () {
20083
20145
  }, _callee7, this);
20084
20146
  }));
20085
20147
 
20086
- return function () {
20148
+ function subscribe(_x10) {
20087
20149
  return _subscribe.apply(this, arguments);
20088
- };
20150
+ }
20151
+
20152
+ return subscribe;
20089
20153
  }()
20090
20154
  /**
20091
20155
  * Constructs a Parse.Query that is the OR of the passed in queries. For
@@ -20108,7 +20172,7 @@ var ParseQuery = /*#__PURE__*/function () {
20108
20172
  *
20109
20173
  * @returns {Parse.Query} Returns the query, so you can chain this call.
20110
20174
  */
20111
- function ()
20175
+ function fromNetwork()
20112
20176
  /*: ParseQuery*/
20113
20177
  {
20114
20178
  this._queriesLocalDatastore = false;
@@ -20123,7 +20187,7 @@ var ParseQuery = /*#__PURE__*/function () {
20123
20187
 
20124
20188
  }, {
20125
20189
  key: "fromLocalDatastore",
20126
- value: function ()
20190
+ value: function fromLocalDatastore()
20127
20191
  /*: ParseQuery*/
20128
20192
  {
20129
20193
  return this.fromPinWithName(null);
@@ -20136,7 +20200,7 @@ var ParseQuery = /*#__PURE__*/function () {
20136
20200
 
20137
20201
  }, {
20138
20202
  key: "fromPin",
20139
- value: function ()
20203
+ value: function fromPin()
20140
20204
  /*: ParseQuery*/
20141
20205
  {
20142
20206
  return this.fromPinWithName(_LocalDatastoreUtils.DEFAULT_PIN);
@@ -20150,7 +20214,7 @@ var ParseQuery = /*#__PURE__*/function () {
20150
20214
 
20151
20215
  }, {
20152
20216
  key: "fromPinWithName",
20153
- value: function (name
20217
+ value: function fromPinWithName(name
20154
20218
  /*:: ?: string*/
20155
20219
  )
20156
20220
  /*: ParseQuery*/
@@ -20172,9 +20236,11 @@ var ParseQuery = /*#__PURE__*/function () {
20172
20236
 
20173
20237
  }, {
20174
20238
  key: "cancel",
20175
- value: function ()
20239
+ value: function cancel()
20176
20240
  /*: ParseQuery*/
20177
20241
  {
20242
+ var _this14 = this;
20243
+
20178
20244
  if (this._xhrRequest.task && typeof this._xhrRequest.task.abort === 'function') {
20179
20245
  this._xhrRequest.task._aborted = true;
20180
20246
 
@@ -20188,12 +20254,12 @@ var ParseQuery = /*#__PURE__*/function () {
20188
20254
  }
20189
20255
 
20190
20256
  return this._xhrRequest.onchange = function () {
20191
- return this.cancel();
20257
+ return _this14.cancel();
20192
20258
  };
20193
20259
  }
20194
20260
  }, {
20195
20261
  key: "_setRequestTask",
20196
- value: function (options) {
20262
+ value: function _setRequestTask(options) {
20197
20263
  var _this15 = this;
20198
20264
 
20199
20265
  options.requestTask = function (task) {
@@ -20204,7 +20270,7 @@ var ParseQuery = /*#__PURE__*/function () {
20204
20270
  }
20205
20271
  }], [{
20206
20272
  key: "fromJSON",
20207
- value: function (className
20273
+ value: function fromJSON(className
20208
20274
  /*: string*/
20209
20275
  , json
20210
20276
  /*: QueryJSON*/
@@ -20216,7 +20282,7 @@ var ParseQuery = /*#__PURE__*/function () {
20216
20282
  }
20217
20283
  }, {
20218
20284
  key: "or",
20219
- value: function ()
20285
+ value: function or()
20220
20286
  /*: ParseQuery*/
20221
20287
  {
20222
20288
  for (var _len8 = arguments.length, queries = new Array(_len8), _key12 = 0; _key12 < _len8; _key12++) {
@@ -20246,7 +20312,7 @@ var ParseQuery = /*#__PURE__*/function () {
20246
20312
 
20247
20313
  }, {
20248
20314
  key: "and",
20249
- value: function ()
20315
+ value: function and()
20250
20316
  /*: ParseQuery*/
20251
20317
  {
20252
20318
  for (var _len9 = arguments.length, queries = new Array(_len9), _key13 = 0; _key13 < _len9; _key13++) {
@@ -20276,7 +20342,7 @@ var ParseQuery = /*#__PURE__*/function () {
20276
20342
 
20277
20343
  }, {
20278
20344
  key: "nor",
20279
- value: function ()
20345
+ value: function nor()
20280
20346
  /*: ParseQuery*/
20281
20347
  {
20282
20348
  for (var _len10 = arguments.length, queries = new Array(_len10), _key14 = 0; _key14 < _len10; _key14++) {
@@ -20296,7 +20362,7 @@ var ParseQuery = /*#__PURE__*/function () {
20296
20362
  }();
20297
20363
 
20298
20364
  var DefaultController = {
20299
- find: function (className
20365
+ find: function find(className
20300
20366
  /*: string*/
20301
20367
  , params
20302
20368
  /*: QueryJSON*/
@@ -20309,7 +20375,7 @@ var DefaultController = {
20309
20375
 
20310
20376
  return RESTController.request('GET', 'classes/' + className, params, options);
20311
20377
  },
20312
- aggregate: function (className
20378
+ aggregate: function aggregate(className
20313
20379
  /*: string*/
20314
20380
  , params
20315
20381
  /*: any*/
@@ -22538,7 +22604,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22538
22604
  value: function () {
22539
22605
  var _isCurrentAsync = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
22540
22606
  var current;
22541
- return _regeneratorRuntime().wrap(function (_context) {
22607
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
22542
22608
  while (1) {
22543
22609
  switch (_context.prev = _context.next) {
22544
22610
  case 0:
@@ -22557,9 +22623,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22557
22623
  }, _callee, this);
22558
22624
  }));
22559
22625
 
22560
- return function () {
22626
+ function isCurrentAsync() {
22561
22627
  return _isCurrentAsync.apply(this, arguments);
22562
- };
22628
+ }
22629
+
22630
+ return isCurrentAsync;
22563
22631
  }()
22564
22632
  /**
22565
22633
  * Returns get("username").
@@ -22569,7 +22637,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22569
22637
 
22570
22638
  }, {
22571
22639
  key: "getUsername",
22572
- value: function ()
22640
+ value: function getUsername()
22573
22641
  /*: ?string*/
22574
22642
  {
22575
22643
  var username = this.get('username');
@@ -22588,7 +22656,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22588
22656
 
22589
22657
  }, {
22590
22658
  key: "setUsername",
22591
- value: function (username
22659
+ value: function setUsername(username
22592
22660
  /*: string*/
22593
22661
  ) {
22594
22662
  // Strip anonymity
@@ -22609,7 +22677,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22609
22677
 
22610
22678
  }, {
22611
22679
  key: "setPassword",
22612
- value: function (password
22680
+ value: function setPassword(password
22613
22681
  /*: string*/
22614
22682
  ) {
22615
22683
  this.set('password', password);
@@ -22622,7 +22690,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22622
22690
 
22623
22691
  }, {
22624
22692
  key: "getEmail",
22625
- value: function ()
22693
+ value: function getEmail()
22626
22694
  /*: ?string*/
22627
22695
  {
22628
22696
  var email = this.get('email');
@@ -22642,7 +22710,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22642
22710
 
22643
22711
  }, {
22644
22712
  key: "setEmail",
22645
- value: function (email
22713
+ value: function setEmail(email
22646
22714
  /*: string*/
22647
22715
  ) {
22648
22716
  return this.set('email', email);
@@ -22657,7 +22725,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22657
22725
 
22658
22726
  }, {
22659
22727
  key: "getSessionToken",
22660
- value: function ()
22728
+ value: function getSessionToken()
22661
22729
  /*: ?string*/
22662
22730
  {
22663
22731
  var token = this.get('sessionToken');
@@ -22676,7 +22744,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22676
22744
 
22677
22745
  }, {
22678
22746
  key: "authenticated",
22679
- value: function ()
22747
+ value: function authenticated()
22680
22748
  /*: boolean*/
22681
22749
  {
22682
22750
  var current = ParseUser.current();
@@ -22698,7 +22766,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22698
22766
 
22699
22767
  }, {
22700
22768
  key: "signUp",
22701
- value: function (attrs
22769
+ value: function signUp(attrs
22702
22770
  /*: AttributeMap*/
22703
22771
  , options
22704
22772
  /*:: ?: FullOptions*/
@@ -22738,7 +22806,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22738
22806
 
22739
22807
  }, {
22740
22808
  key: "logIn",
22741
- value: function (options
22809
+ value: function logIn(options
22742
22810
  /*:: ?: FullOptions*/
22743
22811
  )
22744
22812
  /*: Promise<ParseUser>*/
@@ -22782,7 +22850,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22782
22850
  current,
22783
22851
  _args2 = arguments;
22784
22852
 
22785
- return _regeneratorRuntime().wrap(function (_context2) {
22853
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
22786
22854
  while (1) {
22787
22855
  switch (_context2.prev = _context2.next) {
22788
22856
  case 0:
@@ -22818,9 +22886,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22818
22886
  }, _callee2, this);
22819
22887
  }));
22820
22888
 
22821
- return function () {
22889
+ function save() {
22822
22890
  return _save.apply(this, arguments);
22823
- };
22891
+ }
22892
+
22893
+ return save;
22824
22894
  }()
22825
22895
  /**
22826
22896
  * Wrap the default destroy behavior with functionality that logs out
@@ -22840,7 +22910,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22840
22910
  current,
22841
22911
  _args3 = arguments;
22842
22912
 
22843
- return _regeneratorRuntime().wrap(function (_context3) {
22913
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
22844
22914
  while (1) {
22845
22915
  switch (_context3.prev = _context3.next) {
22846
22916
  case 0:
@@ -22876,9 +22946,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22876
22946
  }, _callee3, this);
22877
22947
  }));
22878
22948
 
22879
- return function () {
22949
+ function destroy() {
22880
22950
  return _destroy.apply(this, arguments);
22881
- };
22951
+ }
22952
+
22953
+ return destroy;
22882
22954
  }()
22883
22955
  /**
22884
22956
  * Wrap the default fetch behavior with functionality to save to local
@@ -22898,7 +22970,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22898
22970
  current,
22899
22971
  _args4 = arguments;
22900
22972
 
22901
- return _regeneratorRuntime().wrap(function (_context4) {
22973
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
22902
22974
  while (1) {
22903
22975
  switch (_context4.prev = _context4.next) {
22904
22976
  case 0:
@@ -22934,9 +23006,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22934
23006
  }, _callee4, this);
22935
23007
  }));
22936
23008
 
22937
- return function () {
23009
+ function fetch() {
22938
23010
  return _fetch.apply(this, arguments);
22939
- };
23011
+ }
23012
+
23013
+ return fetch;
22940
23014
  }()
22941
23015
  /**
22942
23016
  * Wrap the default fetchWithInclude behavior with functionality to save to local
@@ -22956,7 +23030,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22956
23030
  current,
22957
23031
  _args5 = arguments;
22958
23032
 
22959
- return _regeneratorRuntime().wrap(function (_context5) {
23033
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
22960
23034
  while (1) {
22961
23035
  switch (_context5.prev = _context5.next) {
22962
23036
  case 0:
@@ -22992,9 +23066,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22992
23066
  }, _callee5, this);
22993
23067
  }));
22994
23068
 
22995
- return function () {
23069
+ function fetchWithInclude() {
22996
23070
  return _fetchWithInclude.apply(this, arguments);
22997
- };
23071
+ }
23072
+
23073
+ return fetchWithInclude;
22998
23074
  }()
22999
23075
  /**
23000
23076
  * Verify whether a given password is the password of the current user.
@@ -23007,7 +23083,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23007
23083
 
23008
23084
  }, {
23009
23085
  key: "verifyPassword",
23010
- value: function (password
23086
+ value: function verifyPassword(password
23011
23087
  /*: string*/
23012
23088
  , options
23013
23089
  /*:: ?: RequestOptions*/
@@ -23019,7 +23095,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23019
23095
  }
23020
23096
  }], [{
23021
23097
  key: "readOnlyAttributes",
23022
- value: function () {
23098
+ value: function readOnlyAttributes() {
23023
23099
  return ['sessionToken'];
23024
23100
  }
23025
23101
  /**
@@ -23033,7 +23109,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23033
23109
 
23034
23110
  }, {
23035
23111
  key: "extend",
23036
- value: function (protoProps
23112
+ value: function extend(protoProps
23037
23113
  /*: { [prop: string]: any }*/
23038
23114
  , classProps
23039
23115
  /*: { [prop: string]: any }*/
@@ -23076,7 +23152,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23076
23152
 
23077
23153
  }, {
23078
23154
  key: "current",
23079
- value: function ()
23155
+ value: function current()
23080
23156
  /*: ?ParseUser*/
23081
23157
  {
23082
23158
  if (!canUseCurrentUser) {
@@ -23097,7 +23173,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23097
23173
 
23098
23174
  }, {
23099
23175
  key: "currentAsync",
23100
- value: function ()
23176
+ value: function currentAsync()
23101
23177
  /*: Promise<?ParseUser>*/
23102
23178
  {
23103
23179
  if (!canUseCurrentUser) {
@@ -23125,7 +23201,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23125
23201
 
23126
23202
  }, {
23127
23203
  key: "signUp",
23128
- value: function (username
23204
+ value: function signUp(username
23129
23205
  /*: string*/
23130
23206
  , password
23131
23207
  /*: string*/
@@ -23155,7 +23231,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23155
23231
 
23156
23232
  }, {
23157
23233
  key: "logIn",
23158
- value: function (username
23234
+ value: function logIn(username
23159
23235
  /*: string*/
23160
23236
  , password
23161
23237
  /*: string*/
@@ -23191,7 +23267,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23191
23267
 
23192
23268
  }, {
23193
23269
  key: "become",
23194
- value: function (sessionToken
23270
+ value: function become(sessionToken
23195
23271
  /*: string*/
23196
23272
  , options
23197
23273
  /*:: ?: RequestOptions*/
@@ -23227,7 +23303,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23227
23303
 
23228
23304
  }, {
23229
23305
  key: "me",
23230
- value: function (sessionToken
23306
+ value: function me(sessionToken
23231
23307
  /*: string*/
23232
23308
  ) {
23233
23309
  var options
@@ -23262,7 +23338,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23262
23338
 
23263
23339
  }, {
23264
23340
  key: "hydrate",
23265
- value: function (userJSON
23341
+ value: function hydrate(userJSON
23266
23342
  /*: AttributeMap*/
23267
23343
  ) {
23268
23344
  var controller = _CoreManager.default.getUserController();
@@ -23282,7 +23358,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23282
23358
 
23283
23359
  }, {
23284
23360
  key: "logInWith",
23285
- value: function (provider
23361
+ value: function logInWith(provider
23286
23362
  /*: any*/
23287
23363
  , options
23288
23364
  /*: { authData?: AuthData }*/
@@ -23307,7 +23383,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23307
23383
 
23308
23384
  }, {
23309
23385
  key: "logOut",
23310
- value: function () {
23386
+ value: function logOut() {
23311
23387
  var options
23312
23388
  /*: RequestOptions*/
23313
23389
  = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -23330,7 +23406,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23330
23406
 
23331
23407
  }, {
23332
23408
  key: "requestPasswordReset",
23333
- value: function (email
23409
+ value: function requestPasswordReset(email
23334
23410
  /*: string*/
23335
23411
  , options
23336
23412
  /*:: ?: RequestOptions*/
@@ -23358,7 +23434,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23358
23434
 
23359
23435
  }, {
23360
23436
  key: "requestEmailVerification",
23361
- value: function (email
23437
+ value: function requestEmailVerification(email
23362
23438
  /*: string*/
23363
23439
  , options
23364
23440
  /*:: ?: RequestOptions*/
@@ -23387,7 +23463,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23387
23463
 
23388
23464
  }, {
23389
23465
  key: "verifyPassword",
23390
- value: function (username
23466
+ value: function verifyPassword(username
23391
23467
  /*: string*/
23392
23468
  , password
23393
23469
  /*: string*/
@@ -23425,7 +23501,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23425
23501
 
23426
23502
  }, {
23427
23503
  key: "allowCustomUserClass",
23428
- value: function (isAllowed
23504
+ value: function allowCustomUserClass(isAllowed
23429
23505
  /*: boolean*/
23430
23506
  ) {
23431
23507
  _CoreManager.default.set('PERFORM_USER_REWRITE', !isAllowed);
@@ -23447,7 +23523,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23447
23523
 
23448
23524
  }, {
23449
23525
  key: "enableRevocableSession",
23450
- value: function (options
23526
+ value: function enableRevocableSession(options
23451
23527
  /*:: ?: RequestOptions*/
23452
23528
  ) {
23453
23529
  options = options || {};
@@ -23474,7 +23550,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23474
23550
 
23475
23551
  }, {
23476
23552
  key: "enableUnsafeCurrentUser",
23477
- value: function () {
23553
+ value: function enableUnsafeCurrentUser() {
23478
23554
  canUseCurrentUser = true;
23479
23555
  }
23480
23556
  /**
@@ -23487,7 +23563,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23487
23563
 
23488
23564
  }, {
23489
23565
  key: "disableUnsafeCurrentUser",
23490
- value: function () {
23566
+ value: function disableUnsafeCurrentUser() {
23491
23567
  canUseCurrentUser = false;
23492
23568
  }
23493
23569
  /**
@@ -23505,7 +23581,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23505
23581
 
23506
23582
  }, {
23507
23583
  key: "_registerAuthenticationProvider",
23508
- value: function (provider
23584
+ value: function _registerAuthenticationProvider(provider
23509
23585
  /*: any*/
23510
23586
  ) {
23511
23587
  authProviders[provider.getAuthType()] = provider; // Synchronize the current user with the auth provider.
@@ -23527,7 +23603,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23527
23603
 
23528
23604
  }, {
23529
23605
  key: "_logInWith",
23530
- value: function (provider
23606
+ value: function _logInWith(provider
23531
23607
  /*: any*/
23532
23608
  , options
23533
23609
  /*: { authData?: AuthData }*/
@@ -23539,13 +23615,13 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23539
23615
  }
23540
23616
  }, {
23541
23617
  key: "_clearCache",
23542
- value: function () {
23618
+ value: function _clearCache() {
23543
23619
  currentUserCache = null;
23544
23620
  currentUserCacheMatchesDisk = false;
23545
23621
  }
23546
23622
  }, {
23547
23623
  key: "_setCurrentUserCache",
23548
- value: function (user
23624
+ value: function _setCurrentUserCache(user
23549
23625
  /*: ParseUser*/
23550
23626
  ) {
23551
23627
  currentUserCache = user;
@@ -23557,7 +23633,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23557
23633
  _ParseObject2.default.registerSubclass('_User', ParseUser);
23558
23634
 
23559
23635
  var DefaultController = {
23560
- updateUserOnDisk: function (user) {
23636
+ updateUserOnDisk: function updateUserOnDisk(user) {
23561
23637
  var path = _Storage.default.generatePath(CURRENT_USER_KEY);
23562
23638
 
23563
23639
  var json = user.toJSON();
@@ -23575,14 +23651,14 @@ var DefaultController = {
23575
23651
  return user;
23576
23652
  });
23577
23653
  },
23578
- removeUserFromDisk: function () {
23654
+ removeUserFromDisk: function removeUserFromDisk() {
23579
23655
  var path = _Storage.default.generatePath(CURRENT_USER_KEY);
23580
23656
 
23581
23657
  currentUserCacheMatchesDisk = true;
23582
23658
  currentUserCache = null;
23583
23659
  return _Storage.default.removeItemAsync(path);
23584
23660
  },
23585
- setCurrentUser: function (user) {
23661
+ setCurrentUser: function setCurrentUser(user) {
23586
23662
  currentUserCache = user;
23587
23663
 
23588
23664
  user._cleanupAuthData();
@@ -23591,7 +23667,7 @@ var DefaultController = {
23591
23667
 
23592
23668
  return DefaultController.updateUserOnDisk(user);
23593
23669
  },
23594
- currentUser: function ()
23670
+ currentUser: function currentUser()
23595
23671
  /*: ?ParseUser*/
23596
23672
  {
23597
23673
  if (currentUserCache) {
@@ -23650,7 +23726,7 @@ var DefaultController = {
23650
23726
 
23651
23727
  return current;
23652
23728
  },
23653
- currentUserAsync: function ()
23729
+ currentUserAsync: function currentUserAsync()
23654
23730
  /*: Promise<?ParseUser>*/
23655
23731
  {
23656
23732
  if (currentUserCache) {
@@ -23705,7 +23781,7 @@ var DefaultController = {
23705
23781
  return _promise.default.resolve(current);
23706
23782
  });
23707
23783
  },
23708
- signUp: function (user
23784
+ signUp: function signUp(user
23709
23785
  /*: ParseUser*/
23710
23786
  , attrs
23711
23787
  /*: AttributeMap*/
@@ -23738,7 +23814,7 @@ var DefaultController = {
23738
23814
  return user;
23739
23815
  });
23740
23816
  },
23741
- logIn: function (user
23817
+ logIn: function logIn(user
23742
23818
  /*: ParseUser*/
23743
23819
  , options
23744
23820
  /*: RequestOptions*/
@@ -23772,7 +23848,7 @@ var DefaultController = {
23772
23848
  return DefaultController.setCurrentUser(user);
23773
23849
  });
23774
23850
  },
23775
- become: function (user
23851
+ become: function become(user
23776
23852
  /*: ParseUser*/
23777
23853
  , options
23778
23854
  /*: RequestOptions*/
@@ -23789,7 +23865,7 @@ var DefaultController = {
23789
23865
  return DefaultController.setCurrentUser(user);
23790
23866
  });
23791
23867
  },
23792
- hydrate: function (user
23868
+ hydrate: function hydrate(user
23793
23869
  /*: ParseUser*/
23794
23870
  , userJSON
23795
23871
  /*: AttributeMap*/
@@ -23806,7 +23882,7 @@ var DefaultController = {
23806
23882
  return _promise.default.resolve(user);
23807
23883
  }
23808
23884
  },
23809
- me: function (user
23885
+ me: function me(user
23810
23886
  /*: ParseUser*/
23811
23887
  , options
23812
23888
  /*: RequestOptions*/
@@ -23823,7 +23899,7 @@ var DefaultController = {
23823
23899
  return user;
23824
23900
  });
23825
23901
  },
23826
- logOut: function (options
23902
+ logOut: function logOut(options
23827
23903
  /*: RequestOptions*/
23828
23904
  )
23829
23905
  /*: Promise<ParseUser>*/
@@ -23862,7 +23938,7 @@ var DefaultController = {
23862
23938
  return promise;
23863
23939
  });
23864
23940
  },
23865
- requestPasswordReset: function (email
23941
+ requestPasswordReset: function requestPasswordReset(email
23866
23942
  /*: string*/
23867
23943
  , options
23868
23944
  /*: RequestOptions*/
@@ -23873,14 +23949,14 @@ var DefaultController = {
23873
23949
  email: email
23874
23950
  }, options);
23875
23951
  },
23876
- upgradeToRevocableSession: function (user
23952
+ upgradeToRevocableSession: function upgradeToRevocableSession(user
23877
23953
  /*: ParseUser*/
23878
23954
  , options
23879
23955
  /*: RequestOptions*/
23880
23956
  ) {
23881
23957
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
23882
23958
  var token, RESTController, result, session, current;
23883
- return _regeneratorRuntime().wrap(function (_context6) {
23959
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
23884
23960
  while (1) {
23885
23961
  switch (_context6.prev = _context6.next) {
23886
23962
  case 0:
@@ -23933,7 +24009,7 @@ var DefaultController = {
23933
24009
  }, _callee6);
23934
24010
  }))();
23935
24011
  },
23936
- linkWith: function (user
24012
+ linkWith: function linkWith(user
23937
24013
  /*: ParseUser*/
23938
24014
  , authData
23939
24015
  /*: AuthData*/
@@ -23950,7 +24026,7 @@ var DefaultController = {
23950
24026
  return user;
23951
24027
  });
23952
24028
  },
23953
- verifyPassword: function (username
24029
+ verifyPassword: function verifyPassword(username
23954
24030
  /*: string*/
23955
24031
  , password
23956
24032
  /*: string*/
@@ -23964,7 +24040,7 @@ var DefaultController = {
23964
24040
  password: password
23965
24041
  }, options);
23966
24042
  },
23967
- requestEmailVerification: function (email
24043
+ requestEmailVerification: function requestEmailVerification(email
23968
24044
  /*: string*/
23969
24045
  , options
23970
24046
  /*: RequestOptions*/
@@ -24305,7 +24381,7 @@ var RESTController = {
24305
24381
  var requestId = isIdempotent ? uuidv4() : '';
24306
24382
  var attempts = 0;
24307
24383
 
24308
- var dispatch = function dispatch() {
24384
+ (function dispatch() {
24309
24385
  if (XHR == null) {
24310
24386
  throw new Error('Cannot make a request: No definition of XMLHttpRequest was found.');
24311
24387
  }
@@ -24434,12 +24510,11 @@ var RESTController = {
24434
24510
  if (options && typeof options.requestTask === 'function') {
24435
24511
  options.requestTask(xhr);
24436
24512
  }
24437
- };
24513
+ })();
24438
24514
 
24439
- dispatch();
24440
24515
  return promise;
24441
24516
  },
24442
- request: function (method
24517
+ request: function request(method
24443
24518
  /*: string*/
24444
24519
  , path
24445
24520
  /*: string*/
@@ -24554,7 +24629,7 @@ var RESTController = {
24554
24629
  });
24555
24630
  }).catch(RESTController.handleError);
24556
24631
  },
24557
- handleError: function (response) {
24632
+ handleError: function handleError(response) {
24558
24633
  // Transform the error into an instance of ParseError by trying to parse
24559
24634
  // the error string as JSON
24560
24635
  var error;
@@ -24574,12 +24649,12 @@ var RESTController = {
24574
24649
 
24575
24650
  return _promise.default.reject(error);
24576
24651
  },
24577
- _setXHR: function (xhr
24652
+ _setXHR: function _setXHR(xhr
24578
24653
  /*: any*/
24579
24654
  ) {
24580
24655
  XHR = xhr;
24581
24656
  },
24582
- _getXHR: function () {
24657
+ _getXHR: function _getXHR() {
24583
24658
  return XHR;
24584
24659
  }
24585
24660
  };