parse 5.1.0-alpha.8 → 5.1.0-beta.1

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 (106) hide show
  1. package/README.md +1 -1
  2. package/dist/parse.js +675 -374
  3. package/dist/parse.min.js +2 -2
  4. package/dist/parse.weapp.js +1603 -438
  5. package/dist/parse.weapp.min.js +2 -2
  6. package/lib/browser/CoreManager.js +48 -183
  7. package/lib/browser/EventuallyQueue.js +1 -1
  8. package/lib/browser/InstallationController.js +134 -23
  9. package/lib/browser/ObjectStateMutations.js +3 -2
  10. package/lib/browser/Parse.js +2 -2
  11. package/lib/browser/ParseACL.js +21 -11
  12. package/lib/browser/ParseFile.js +4 -0
  13. package/lib/browser/ParseGeoPoint.js +12 -8
  14. package/lib/browser/ParseHooks.js +2 -0
  15. package/lib/browser/ParseInstallation.js +274 -13
  16. package/lib/browser/ParseObject.js +74 -68
  17. package/lib/browser/ParseOp.js +21 -7
  18. package/lib/browser/ParseQuery.js +1 -0
  19. package/lib/browser/ParseRelation.js +12 -7
  20. package/lib/browser/ParseRole.js +2 -0
  21. package/lib/browser/ParseSession.js +1 -1
  22. package/lib/browser/ParseUser.js +1 -0
  23. package/lib/browser/SingleInstanceStateController.js +2 -4
  24. package/lib/browser/arrayContainsObject.js +4 -3
  25. package/lib/browser/canBeSerialized.js +6 -4
  26. package/lib/browser/decode.js +8 -5
  27. package/lib/browser/encode.js +6 -4
  28. package/lib/browser/equals.js +4 -3
  29. package/lib/browser/unique.js +3 -2
  30. package/lib/browser/unsavedChildren.js +4 -2
  31. package/lib/browser/uuid.js +11 -5
  32. package/lib/node/CoreManager.js +48 -183
  33. package/lib/node/EventuallyQueue.js +1 -1
  34. package/lib/node/InstallationController.js +65 -21
  35. package/lib/node/ObjectStateMutations.js +3 -2
  36. package/lib/node/Parse.js +2 -2
  37. package/lib/node/ParseACL.js +21 -11
  38. package/lib/node/ParseFile.js +4 -0
  39. package/lib/node/ParseGeoPoint.js +11 -11
  40. package/lib/node/ParseHooks.js +2 -0
  41. package/lib/node/ParseInstallation.js +207 -7
  42. package/lib/node/ParseObject.js +68 -66
  43. package/lib/node/ParseOp.js +21 -7
  44. package/lib/node/ParseQuery.js +1 -0
  45. package/lib/node/ParseRelation.js +14 -8
  46. package/lib/node/ParseRole.js +2 -0
  47. package/lib/node/ParseSession.js +1 -1
  48. package/lib/node/ParseUser.js +1 -0
  49. package/lib/node/SingleInstanceStateController.js +2 -8
  50. package/lib/node/arrayContainsObject.js +4 -3
  51. package/lib/node/canBeSerialized.js +6 -4
  52. package/lib/node/decode.js +9 -5
  53. package/lib/node/encode.js +7 -4
  54. package/lib/node/equals.js +4 -3
  55. package/lib/node/unique.js +3 -2
  56. package/lib/node/unsavedChildren.js +4 -2
  57. package/lib/node/uuid.js +10 -8
  58. package/lib/react-native/CoreManager.js +39 -9
  59. package/lib/react-native/InstallationController.js +77 -9
  60. package/lib/react-native/ObjectStateMutations.js +3 -2
  61. package/lib/react-native/Parse.js +2 -2
  62. package/lib/react-native/ParseACL.js +19 -11
  63. package/lib/react-native/ParseGeoPoint.js +5 -3
  64. package/lib/react-native/ParseInstallation.js +115 -10
  65. package/lib/react-native/ParseObject.js +8 -6
  66. package/lib/react-native/ParseOp.js +20 -6
  67. package/lib/react-native/ParseQuery.js +1 -0
  68. package/lib/react-native/ParseRelation.js +10 -7
  69. package/lib/react-native/ParseRole.js +2 -0
  70. package/lib/react-native/ParseUser.js +1 -0
  71. package/lib/react-native/SingleInstanceStateController.js +0 -2
  72. package/lib/react-native/arrayContainsObject.js +3 -2
  73. package/lib/react-native/canBeSerialized.js +5 -3
  74. package/lib/react-native/decode.js +7 -5
  75. package/lib/react-native/encode.js +6 -4
  76. package/lib/react-native/equals.js +4 -3
  77. package/lib/react-native/unique.js +3 -2
  78. package/lib/react-native/unsavedChildren.js +3 -2
  79. package/lib/react-native/uuid.js +9 -4
  80. package/lib/weapp/CoreManager.js +48 -183
  81. package/lib/weapp/EventuallyQueue.js +1 -1
  82. package/lib/weapp/InstallationController.js +134 -23
  83. package/lib/weapp/ObjectStateMutations.js +3 -2
  84. package/lib/weapp/Parse.js +2 -2
  85. package/lib/weapp/ParseACL.js +21 -11
  86. package/lib/weapp/ParseFile.js +4 -0
  87. package/lib/weapp/ParseGeoPoint.js +12 -8
  88. package/lib/weapp/ParseHooks.js +2 -0
  89. package/lib/weapp/ParseInstallation.js +274 -13
  90. package/lib/weapp/ParseObject.js +74 -68
  91. package/lib/weapp/ParseOp.js +21 -7
  92. package/lib/weapp/ParseQuery.js +1 -0
  93. package/lib/weapp/ParseRelation.js +12 -7
  94. package/lib/weapp/ParseRole.js +2 -0
  95. package/lib/weapp/ParseSession.js +1 -1
  96. package/lib/weapp/ParseUser.js +1 -0
  97. package/lib/weapp/SingleInstanceStateController.js +2 -4
  98. package/lib/weapp/arrayContainsObject.js +4 -3
  99. package/lib/weapp/canBeSerialized.js +6 -4
  100. package/lib/weapp/decode.js +8 -5
  101. package/lib/weapp/encode.js +6 -4
  102. package/lib/weapp/equals.js +4 -3
  103. package/lib/weapp/unique.js +3 -2
  104. package/lib/weapp/unsavedChildren.js +4 -2
  105. package/lib/weapp/uuid.js +12 -5
  106. package/package.json +4 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v5.1.0-alpha.8
2
+ * Parse JavaScript SDK v5.1.0-beta.1
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -378,181 +378,16 @@ _Object$defineProperty(exports, "__esModule", {
378
378
  exports.default = void 0;
379
379
  var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
380
380
  var _concat = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/concat"));
381
- /*
382
- * @flow
383
- */
384
- /*:: import type { AttributeMap, ObjectCache, OpsMap, State } from './ObjectStateMutations';*/
385
- /*:: import type ParseFile from './ParseFile';*/
386
- /*:: import type { FileSource } from './ParseFile';*/
387
- /*:: import type { Op } from './ParseOp';*/
388
- /*:: import type ParseObject, {SaveOptions} from './ParseObject';*/
389
- /*:: import type { QueryJSON } from './ParseQuery';*/
390
- /*:: import type ParseUser from './ParseUser';*/
391
- /*:: import type { AuthData } from './ParseUser';*/
392
- /*:: import type { PushData } from './Push';*/
393
- /*:: import type { RequestOptions, FullOptions } from './RESTController';*/
394
- /*:: type AnalyticsController = {
395
- track: (name: string, dimensions: { [key: string]: string }) => Promise,
396
- };*/
397
- /*:: type CloudController = {
398
- run: (name: string, data: mixed, options: RequestOptions) => Promise,
399
- getJobsData: (options: RequestOptions) => Promise,
400
- startJob: (name: string, data: mixed, options: RequestOptions) => Promise,
401
- };*/
402
- /*:: type ConfigController = {
403
- current: () => Promise,
404
- get: () => Promise,
405
- save: (attrs: { [key: string]: any }) => Promise,
406
- };*/
407
- /*:: type CryptoController = {
408
- encrypt: (obj: any, secretKey: string) => string,
409
- decrypt: (encryptedText: string, secretKey: any) => string,
410
- };*/
411
- /*:: type FileController = {
412
- saveFile: (name: string, source: FileSource, options: FullOptions) => Promise,
413
- saveBase64: (name: string, source: FileSource, options: FullOptions) => Promise,
414
- download: (uri: string) => Promise,
415
- };*/
416
- /*:: type InstallationController = {
417
- currentInstallationId: () => Promise,
418
- };*/
419
- /*:: type ObjectController = {
420
- fetch: (
421
- object: ParseObject | Array<ParseObject>,
422
- forceFetch: boolean,
423
- options: RequestOptions
424
- ) => Promise,
425
- save: (object: ParseObject | Array<ParseObject | ParseFile>, options: RequestOptions) => Promise,
426
- destroy: (object: ParseObject | Array<ParseObject>, options: RequestOptions) => Promise,
427
- };*/
428
- /*:: type ObjectStateController = {
429
- getState: (obj: any) => ?State,
430
- initializeState: (obj: any, initial?: State) => State,
431
- removeState: (obj: any) => ?State,
432
- getServerData: (obj: any) => AttributeMap,
433
- setServerData: (obj: any, attributes: AttributeMap) => void,
434
- getPendingOps: (obj: any) => Array<OpsMap>,
435
- setPendingOp: (obj: any, attr: string, op: ?Op) => void,
436
- pushPendingState: (obj: any) => void,
437
- popPendingState: (obj: any) => OpsMap,
438
- mergeFirstPendingState: (obj: any) => void,
439
- getObjectCache: (obj: any) => ObjectCache,
440
- estimateAttribute: (obj: any, attr: string) => mixed,
441
- estimateAttributes: (obj: any) => AttributeMap,
442
- commitServerChanges: (obj: any, changes: AttributeMap) => void,
443
- enqueueTask: (obj: any, task: () => Promise) => Promise,
444
- clearAllState: () => void,
445
- duplicateState: (source: any, dest: any) => void,
446
- };*/
447
- /*:: type PushController = {
448
- send: (data: PushData) => Promise,
449
- };*/
450
- /*:: type QueryController = {
451
- find: (className: string, params: QueryJSON, options: RequestOptions) => Promise,
452
- aggregate: (className: string, params: any, options: RequestOptions) => Promise,
453
- };*/
454
- /*:: type EventuallyQueue = {
455
- save: (object: ParseObject, serverOptions: SaveOptions) => Promise,
456
- destroy: (object: ParseObject, serverOptions: RequestOptions) => Promise,
457
- poll: (ms: number) => void
458
- };*/
459
- /*:: type RESTController = {
460
- request: (method: string, path: string, data: mixed, options: RequestOptions) => Promise,
461
- ajax: (method: string, url: string, data: any, headers?: any, options: FullOptions) => Promise,
462
- };*/
463
- /*:: type SchemaController = {
464
- purge: (className: string) => Promise,
465
- get: (className: string, options: RequestOptions) => Promise,
466
- delete: (className: string, options: RequestOptions) => Promise,
467
- create: (className: string, params: any, options: RequestOptions) => Promise,
468
- update: (className: string, params: any, options: RequestOptions) => Promise,
469
- send(className: string, method: string, params: any, options: RequestOptions): Promise,
470
- };*/
471
- /*:: type SessionController = {
472
- getSession: (token: RequestOptions) => Promise,
473
- };*/
474
- /*:: type StorageController =
475
- | {
476
- async: 0,
477
- getItem: (path: string) => ?string,
478
- setItem: (path: string, value: string) => void,
479
- removeItem: (path: string) => void,
480
- getItemAsync?: (path: string) => Promise,
481
- setItemAsync?: (path: string, value: string) => Promise,
482
- removeItemAsync?: (path: string) => Promise,
483
- clear: () => void,
484
- }
485
- | {
486
- async: 1,
487
- getItem?: (path: string) => ?string,
488
- setItem?: (path: string, value: string) => void,
489
- removeItem?: (path: string) => void,
490
- getItemAsync: (path: string) => Promise,
491
- setItemAsync: (path: string, value: string) => Promise,
492
- removeItemAsync: (path: string) => Promise,
493
- clear: () => void,
494
- };*/
495
- /*:: type LocalDatastoreController = {
496
- fromPinWithName: (name: string) => ?any,
497
- pinWithName: (name: string, objects: any) => void,
498
- unPinWithName: (name: string) => void,
499
- getAllContents: () => ?any,
500
- clear: () => void,
501
- };*/
502
- /*:: type UserController = {
503
- setCurrentUser: (user: ParseUser) => Promise,
504
- currentUser: () => ?ParseUser,
505
- currentUserAsync: () => Promise,
506
- signUp: (user: ParseUser, attrs: AttributeMap, options: RequestOptions) => Promise,
507
- logIn: (user: ParseUser, options: RequestOptions) => Promise,
508
- become: (options: RequestOptions) => Promise,
509
- hydrate: (userJSON: AttributeMap) => Promise,
510
- logOut: (options: RequestOptions) => Promise,
511
- me: (options: RequestOptions) => Promise,
512
- requestPasswordReset: (email: string, options: RequestOptions) => Promise,
513
- updateUserOnDisk: (user: ParseUser) => Promise,
514
- upgradeToRevocableSession: (user: ParseUser, options: RequestOptions) => Promise,
515
- linkWith: (user: ParseUser, authData: AuthData) => Promise,
516
- removeUserFromDisk: () => Promise,
517
- verifyPassword: (username: string, password: string, options: RequestOptions) => Promise,
518
- requestEmailVerification: (email: string, options: RequestOptions) => Promise,
519
- };*/
520
- /*:: type HooksController = {
521
- get: (type: string, functionName?: string, triggerName?: string) => Promise,
522
- create: (hook: mixed) => Promise,
523
- delete: (hook: mixed) => Promise,
524
- update: (hook: mixed) => Promise,
525
- send: (method: string, path: string, body?: mixed) => Promise,
526
- };*/
527
- /*:: type WebSocketController = {
381
+ /** Based on https://github.com/react-native-async-storage/async-storage/blob/main/packages/default-storage-backend/src/types.ts */
382
+ /*:: export type WebSocketController = {
528
383
  onopen: () => void,
529
384
  onmessage: (message: any) => void,
530
- onclose: () => void,
385
+ onclose: (arg?: any) => void,
531
386
  onerror: (error: any) => void,
532
387
  send: (data: any) => void,
533
388
  close: () => void,
534
389
  };*/
535
- /*:: type Config = {
536
- AnalyticsController?: AnalyticsController,
537
- CloudController?: CloudController,
538
- ConfigController?: ConfigController,
539
- FileController?: FileController,
540
- InstallationController?: InstallationController,
541
- ObjectController?: ObjectController,
542
- ObjectStateController?: ObjectStateController,
543
- PushController?: PushController,
544
- QueryController?: QueryController,
545
- RESTController?: RESTController,
546
- SchemaController?: SchemaController,
547
- SessionController?: SessionController,
548
- StorageController?: StorageController,
549
- LocalDatastoreController?: LocalDatastoreController,
550
- UserController?: UserController,
551
- HooksController?: HooksController,
552
- WebSocketController?: WebSocketController,
553
- };*/
554
- var config /*: Config & { [key: string]: mixed }*/ = {
555
- // Defaults
390
+ var config /*: Config & { [key: string]: any }*/ = {
556
391
  IS_NODE: typeof process !== 'undefined' && !!process.versions && !!process.versions.node && !process.versions.electron,
557
392
  REQUEST_ATTEMPT_LIMIT: 5,
558
393
  REQUEST_BATCH_SIZE: 20,
@@ -562,7 +397,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
562
397
  SERVER_AUTH_TOKEN: null,
563
398
  LIVEQUERY_SERVER_URL: null,
564
399
  ENCRYPTED_KEY: null,
565
- VERSION: 'js' + "5.1.0-alpha.8",
400
+ VERSION: 'js' + "5.1.0-beta.1",
566
401
  APPLICATION_ID: null,
567
402
  JAVASCRIPT_KEY: null,
568
403
  MASTER_KEY: null,
@@ -636,11 +471,18 @@ var CoreManager = {
636
471
  requireMethods('FileController', ['saveFile', 'saveBase64'], controller);
637
472
  config['FileController'] = controller;
638
473
  },
474
+ setEventuallyQueue: function (controller /*: EventuallyQueue*/) {
475
+ requireMethods('EventuallyQueue', ['poll', 'save', 'destroy'], controller);
476
+ config['EventuallyQueue'] = controller;
477
+ },
478
+ getEventuallyQueue: function () /*: EventuallyQueue*/{
479
+ return config['EventuallyQueue'];
480
+ },
639
481
  getFileController: function () /*: FileController*/{
640
482
  return config['FileController'];
641
483
  },
642
484
  setInstallationController: function (controller /*: InstallationController*/) {
643
- requireMethods('InstallationController', ['currentInstallationId'], controller);
485
+ requireMethods('InstallationController', ['currentInstallationId', 'currentInstallation', 'updateInstallationOnDisk'], controller);
644
486
  config['InstallationController'] = controller;
645
487
  },
646
488
  getInstallationController: function () /*: InstallationController*/{
@@ -687,13 +529,6 @@ var CoreManager = {
687
529
  getRESTController: function () /*: RESTController*/{
688
530
  return config['RESTController'];
689
531
  },
690
- setEventuallyQueue: function (controller /*: EventuallyQueue*/) {
691
- requireMethods('EventuallyQueue', ['poll', 'save', 'destroy'], controller);
692
- config['EventuallyQueue'] = controller;
693
- },
694
- getEventuallyQueue: function () /*: EventuallyQueue*/{
695
- return config['EventuallyQueue'];
696
- },
697
532
  setSchemaController: function (controller /*: SchemaController*/) {
698
533
  requireMethods('SchemaController', ['get', 'create', 'update', 'delete', 'send', 'purge'], controller);
699
534
  config['SchemaController'] = controller;
@@ -732,16 +567,16 @@ var CoreManager = {
732
567
  getStorageController: function () /*: StorageController*/{
733
568
  return config['StorageController'];
734
569
  },
735
- setAsyncStorage: function (storage /*: any*/) {
570
+ setAsyncStorage: function (storage /*: AsyncStorageType*/) {
736
571
  config['AsyncStorage'] = storage;
737
572
  },
738
573
  getAsyncStorage: function () {
739
574
  return config['AsyncStorage'];
740
575
  },
741
- setWebSocketController: function (controller /*: WebSocketController*/) {
576
+ setWebSocketController: function (controller /*: new (url: string | URL, protocols?: string | string[] | undefined) => WebSocketController*/) {
742
577
  config['WebSocketController'] = controller;
743
578
  },
744
- getWebSocketController: function () /*: WebSocketController*/{
579
+ getWebSocketController: function () /*: new (url: string | URL, protocols?: string | string[] | undefined) => WebSocketController*/{
745
580
  return config['WebSocketController'];
746
581
  },
747
582
  setUserController: function (controller /*: UserController*/) {
@@ -751,11 +586,11 @@ var CoreManager = {
751
586
  getUserController: function () /*: UserController*/{
752
587
  return config['UserController'];
753
588
  },
754
- setLiveQueryController: function (controller /*: any*/) {
589
+ setLiveQueryController: function (controller /*: LiveQueryControllerType*/) {
755
590
  requireMethods('LiveQueryController', ['setDefaultLiveQueryClient', 'getDefaultLiveQueryClient', '_clearCachedDefaultClient'], controller);
756
591
  config['LiveQueryController'] = controller;
757
592
  },
758
- getLiveQueryController: function () /*: any*/{
593
+ getLiveQueryController: function () /*: LiveQueryControllerType*/{
759
594
  return config['LiveQueryController'];
760
595
  },
761
596
  setHooksController: function (controller /*: HooksController*/) {
@@ -764,6 +599,36 @@ var CoreManager = {
764
599
  },
765
600
  getHooksController: function () /*: HooksController*/{
766
601
  return config['HooksController'];
602
+ },
603
+ setParseOp: function (op /*: typeof ParseOp*/) {
604
+ config['ParseOp'] = op;
605
+ },
606
+ getParseOp: function () {
607
+ return config['ParseOp'];
608
+ },
609
+ setParseObject: function (object /*: typeof ParseObject*/) {
610
+ config['ParseObject'] = object;
611
+ },
612
+ getParseObject: function () /*: ParseObject*/{
613
+ return config['ParseObject'];
614
+ },
615
+ setParseQuery: function (query /*: typeof ParseQuery*/) {
616
+ config['ParseQuery'] = query;
617
+ },
618
+ getParseQuery: function () /*: ParseQuery*/{
619
+ return config['ParseQuery'];
620
+ },
621
+ setParseRole: function (role /*: typeof ParseRole*/) {
622
+ config['ParseRole'] = role;
623
+ },
624
+ getParseRole: function () /*: ParseRole*/{
625
+ return config['ParseRole'];
626
+ },
627
+ setParseUser: function (user /*: typeof ParseUser*/) {
628
+ config['ParseUser'] = user;
629
+ },
630
+ getParseUser: function () /*: ParseUser*/{
631
+ return config['ParseUser'];
767
632
  }
768
633
  };
769
634
  module.exports = CoreManager;
@@ -1261,7 +1126,7 @@ var EventuallyQueue = {
1261
1126
  */
1262
1127
  poll: function () {
1263
1128
  var _this7 = this;
1264
- var ms /*: number*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2000;
1129
+ var ms /*:: ?: number*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2000;
1265
1130
  if (polling) {
1266
1131
  return;
1267
1132
  }
@@ -1637,42 +1502,153 @@ if (typeof window !== 'undefined' && window.indexedDB) {
1637
1502
  },{"@babel/runtime-corejs3/core-js-stable/instance/keys":72,"idb-keyval":625}],10:[function(_dereq_,module,exports){
1638
1503
  "use strict";
1639
1504
 
1505
+ var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
1640
1506
  var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
1641
- var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
1507
+ _Object$defineProperty(exports, "__esModule", {
1508
+ value: true
1509
+ });
1510
+ exports.default = void 0;
1511
+ var _regenerator = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/regenerator"));
1512
+ var _stringify = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/json/stringify"));
1513
+ var _asyncToGenerator2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/asyncToGenerator"));
1514
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
1642
1515
  var _Storage = _interopRequireDefault(_dereq_("./Storage"));
1643
- /**
1644
- * @flow
1645
- */
1646
-
1647
- var uuidv4 = _dereq_('./uuid');
1648
- var iidCache = null;
1516
+ var _ParseInstallation = _interopRequireDefault(_dereq_("./ParseInstallation"));
1517
+ var _uuid = _interopRequireDefault(_dereq_("./uuid"));
1518
+ var CURRENT_INSTALLATION_KEY = 'currentInstallation';
1519
+ var CURRENT_INSTALLATION_ID_KEY = 'currentInstallationId';
1520
+ var iidCache /*: string | null*/ = null;
1521
+ var currentInstallationCache = null;
1522
+ var currentInstallationCacheMatchesDisk = false;
1649
1523
  var InstallationController = {
1524
+ updateInstallationOnDisk: function (installation /*: ParseInstallation*/) /*: Promise<void>*/{
1525
+ var _this = this;
1526
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
1527
+ var path;
1528
+ return _regenerator.default.wrap(function (_context) {
1529
+ while (1) switch (_context.prev = _context.next) {
1530
+ case 0:
1531
+ path = _Storage.default.generatePath(CURRENT_INSTALLATION_KEY);
1532
+ _context.next = 3;
1533
+ return _Storage.default.setItemAsync(path, (0, _stringify.default)(installation.toJSON()));
1534
+ case 3:
1535
+ _this._setCurrentInstallationCache(installation);
1536
+ case 4:
1537
+ case "end":
1538
+ return _context.stop();
1539
+ }
1540
+ }, _callee);
1541
+ }))();
1542
+ },
1650
1543
  currentInstallationId: function () /*: Promise<string>*/{
1651
- if (typeof iidCache === 'string') {
1652
- return _promise.default.resolve(iidCache);
1653
- }
1654
- var path = _Storage.default.generatePath('installationId');
1655
- return _Storage.default.getItemAsync(path).then(function (iid) {
1656
- if (!iid) {
1657
- iid = uuidv4();
1658
- return _Storage.default.setItemAsync(path, iid).then(function () {
1659
- iidCache = iid;
1660
- return iid;
1661
- });
1662
- }
1663
- iidCache = iid;
1664
- return iid;
1665
- });
1544
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
1545
+ var path, iid;
1546
+ return _regenerator.default.wrap(function (_context2) {
1547
+ while (1) switch (_context2.prev = _context2.next) {
1548
+ case 0:
1549
+ if (!(typeof iidCache === 'string')) {
1550
+ _context2.next = 2;
1551
+ break;
1552
+ }
1553
+ return _context2.abrupt("return", iidCache);
1554
+ case 2:
1555
+ path = _Storage.default.generatePath(CURRENT_INSTALLATION_ID_KEY);
1556
+ _context2.next = 5;
1557
+ return _Storage.default.getItemAsync(path);
1558
+ case 5:
1559
+ iid = _context2.sent;
1560
+ if (iid) {
1561
+ _context2.next = 9;
1562
+ break;
1563
+ }
1564
+ iid = (0, _uuid.default)();
1565
+ return _context2.abrupt("return", _Storage.default.setItemAsync(path, iid).then(function () {
1566
+ iidCache = iid;
1567
+ return iid;
1568
+ }));
1569
+ case 9:
1570
+ iidCache = iid;
1571
+ return _context2.abrupt("return", iid);
1572
+ case 11:
1573
+ case "end":
1574
+ return _context2.stop();
1575
+ }
1576
+ }, _callee2);
1577
+ }))();
1578
+ },
1579
+ currentInstallation: function () /*: Promise<ParseInstallation | null>*/{
1580
+ var _this2 = this;
1581
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
1582
+ var path, installationData, current, installationId, installation;
1583
+ return _regenerator.default.wrap(function (_context3) {
1584
+ while (1) switch (_context3.prev = _context3.next) {
1585
+ case 0:
1586
+ if (!currentInstallationCache) {
1587
+ _context3.next = 2;
1588
+ break;
1589
+ }
1590
+ return _context3.abrupt("return", currentInstallationCache);
1591
+ case 2:
1592
+ if (!currentInstallationCacheMatchesDisk) {
1593
+ _context3.next = 4;
1594
+ break;
1595
+ }
1596
+ return _context3.abrupt("return", null);
1597
+ case 4:
1598
+ path = _Storage.default.generatePath(CURRENT_INSTALLATION_KEY);
1599
+ _context3.next = 7;
1600
+ return _Storage.default.getItemAsync(path);
1601
+ case 7:
1602
+ installationData = _context3.sent;
1603
+ currentInstallationCacheMatchesDisk = true;
1604
+ if (!installationData) {
1605
+ _context3.next = 15;
1606
+ break;
1607
+ }
1608
+ installationData = JSON.parse(installationData);
1609
+ installationData.className = '_Installation';
1610
+ current = _ParseInstallation.default.fromJSON(installationData);
1611
+ currentInstallationCache = current;
1612
+ return _context3.abrupt("return", current);
1613
+ case 15:
1614
+ _context3.next = 17;
1615
+ return _this2.currentInstallationId();
1616
+ case 17:
1617
+ installationId = _context3.sent;
1618
+ installation = new _ParseInstallation.default();
1619
+ installation.set('deviceType', _ParseInstallation.default.DEVICE_TYPES.WEB);
1620
+ installation.set('installationId', installationId);
1621
+ installation.set('parseVersion', _CoreManager.default.get('VERSION'));
1622
+ currentInstallationCache = installation;
1623
+ _context3.next = 25;
1624
+ return _Storage.default.setItemAsync(path, (0, _stringify.default)(installation.toJSON()));
1625
+ case 25:
1626
+ return _context3.abrupt("return", installation);
1627
+ case 26:
1628
+ case "end":
1629
+ return _context3.stop();
1630
+ }
1631
+ }, _callee3);
1632
+ }))();
1666
1633
  },
1667
1634
  _clearCache: function () {
1668
1635
  iidCache = null;
1636
+ currentInstallationCache = null;
1637
+ currentInstallationCacheMatchesDisk = false;
1669
1638
  },
1670
1639
  _setInstallationIdCache: function (iid /*: string*/) {
1671
1640
  iidCache = iid;
1641
+ },
1642
+ _setCurrentInstallationCache: function (installation /*: ParseInstallation*/) {
1643
+ var matchesDisk /*: boolean*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1644
+ currentInstallationCache = installation;
1645
+ currentInstallationCacheMatchesDisk = matchesDisk;
1672
1646
  }
1673
1647
  };
1674
1648
  module.exports = InstallationController;
1675
- },{"./Storage":41,"./uuid":59,"@babel/runtime-corejs3/core-js-stable/promise":95,"@babel/runtime-corejs3/helpers/interopRequireDefault":115}],11:[function(_dereq_,module,exports){
1649
+ var _default = InstallationController;
1650
+ exports.default = _default;
1651
+ },{"./CoreManager":4,"./ParseInstallation":26,"./Storage":41,"./uuid":59,"@babel/runtime-corejs3/core-js-stable/json/stringify":80,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/helpers/asyncToGenerator":107,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/regenerator":133}],11:[function(_dereq_,module,exports){
1676
1652
  "use strict";
1677
1653
 
1678
1654
  var _sliceInstanceProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/instance/slice");
@@ -3476,8 +3452,8 @@ var _defineProperty2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/he
3476
3452
  var _includes = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/includes"));
3477
3453
  var _stringify = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/json/stringify"));
3478
3454
  var _encode = _interopRequireDefault(_dereq_("./encode"));
3455
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
3479
3456
  var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
3480
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
3481
3457
  var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
3482
3458
  var _TaskQueue = _interopRequireDefault(_dereq_("./TaskQueue"));
3483
3459
  var _ParseOp = _dereq_("./ParseOp");
@@ -3631,16 +3607,17 @@ function nestedSet(obj, key, value) {
3631
3607
  }
3632
3608
  }
3633
3609
  function commitServerChanges(serverData /*: AttributeMap*/, objectCache /*: ObjectCache*/, changes /*: AttributeMap*/) {
3610
+ var ParseObject = _CoreManager.default.getParseObject();
3634
3611
  for (var _attr3 in changes) {
3635
3612
  var val = changes[_attr3];
3636
3613
  nestedSet(serverData, _attr3, val);
3637
- if (val && (0, _typeof2.default)(val) === 'object' && !(val instanceof _ParseObject.default) && !(val instanceof _ParseFile.default) && !(val instanceof _ParseRelation.default)) {
3614
+ if (val && (0, _typeof2.default)(val) === 'object' && !(val instanceof ParseObject) && !(val instanceof _ParseFile.default) && !(val instanceof _ParseRelation.default)) {
3638
3615
  var json = (0, _encode.default)(val, false, true);
3639
3616
  objectCache[_attr3] = (0, _stringify.default)(json);
3640
3617
  }
3641
3618
  }
3642
3619
  }
3643
- },{"./ParseFile":24,"./ParseObject":28,"./ParseOp":29,"./ParseRelation":32,"./TaskQueue":44,"./encode":51,"@babel/runtime-corejs3/core-js-stable/instance/filter":66,"@babel/runtime-corejs3/core-js-stable/instance/for-each":69,"@babel/runtime-corejs3/core-js-stable/instance/includes":70,"@babel/runtime-corejs3/core-js-stable/json/stringify":80,"@babel/runtime-corejs3/core-js-stable/object/define-properties":85,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":89,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors":90,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols":91,"@babel/runtime-corejs3/core-js-stable/object/keys":93,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],18:[function(_dereq_,module,exports){
3620
+ },{"./CoreManager":4,"./ParseFile":24,"./ParseOp":29,"./ParseRelation":32,"./TaskQueue":44,"./encode":51,"@babel/runtime-corejs3/core-js-stable/instance/filter":66,"@babel/runtime-corejs3/core-js-stable/instance/for-each":69,"@babel/runtime-corejs3/core-js-stable/instance/includes":70,"@babel/runtime-corejs3/core-js-stable/json/stringify":80,"@babel/runtime-corejs3/core-js-stable/object/define-properties":85,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":89,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors":90,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols":91,"@babel/runtime-corejs3/core-js-stable/object/keys":93,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],18:[function(_dereq_,module,exports){
3644
3621
  "use strict";
3645
3622
 
3646
3623
  var _sliceInstanceProperty2 = _dereq_("@babel/runtime-corejs3/core-js-stable/instance/slice");
@@ -4453,10 +4430,11 @@ var Parse /*: ParseType*/ = {
4453
4430
  _CoreManager.default.setIfNeeded('EventEmitter', _EventEmitter.default);
4454
4431
  _CoreManager.default.setIfNeeded('LiveQuery', new _ParseLiveQuery.default());
4455
4432
  _CoreManager.default.setIfNeeded('CryptoController', _CryptoController.default);
4433
+ _CoreManager.default.setIfNeeded('EventuallyQueue', _EventuallyQueue.default);
4434
+ _CoreManager.default.setIfNeeded('InstallationController', _InstallationController.default);
4456
4435
  _CoreManager.default.setIfNeeded('LocalDatastoreController', _LocalDatastoreController.default);
4457
4436
  _CoreManager.default.setIfNeeded('StorageController', _StorageController.default);
4458
4437
  _CoreManager.default.setIfNeeded('WebSocketController', _WebSocketController.default);
4459
- _CoreManager.default.setIfNeeded('EventuallyQueue', _EventuallyQueue.default);
4460
4438
  },
4461
4439
  /**
4462
4440
  * Call this method to set your AsyncStorage engine
@@ -4698,7 +4676,6 @@ var Parse /*: ParseType*/ = {
4698
4676
  return this.encryptedUser;
4699
4677
  }
4700
4678
  };
4701
- _CoreManager.default.setInstallationController(_InstallationController.default);
4702
4679
  _CoreManager.default.setRESTController(_RESTController.default);
4703
4680
  // For legacy requires, of the form `var Parse = require('parse').Parse`
4704
4681
  Parse.Parse = Parse;
@@ -4719,11 +4696,12 @@ var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/ty
4719
4696
  var _classCallCheck2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/classCallCheck"));
4720
4697
  var _createClass2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/createClass"));
4721
4698
  var _defineProperty2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/defineProperty"));
4722
- var _ParseRole = _interopRequireDefault(_dereq_("./ParseRole"));
4723
- var _ParseUser = _interopRequireDefault(_dereq_("./ParseUser"));
4699
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
4724
4700
  /**
4725
4701
  * @flow
4726
4702
  */
4703
+ /*:: import type ParseRole from './ParseRole';*/
4704
+ /*:: import type ParseUser from './ParseUser';*/
4727
4705
  /*:: type PermissionsMap = { [permission: string]: boolean };*/
4728
4706
  /*:: type ByIdMap = { [userId: string]: PermissionsMap };*/
4729
4707
  var PUBLIC_KEY = '*';
@@ -4751,7 +4729,8 @@ var ParseACL = /*#__PURE__*/function () {
4751
4729
  (0, _defineProperty2.default)(this, "permissionsById", void 0);
4752
4730
  this.permissionsById = {};
4753
4731
  if (arg1 && (0, _typeof2.default)(arg1) === 'object') {
4754
- if (arg1 instanceof _ParseUser.default) {
4732
+ var _ParseUser = _CoreManager.default.getParseUser();
4733
+ if (arg1 instanceof _ParseUser) {
4755
4734
  this.setReadAccess(arg1, true);
4756
4735
  this.setWriteAccess(arg1, true);
4757
4736
  } else {
@@ -4823,9 +4802,11 @@ var ParseACL = /*#__PURE__*/function () {
4823
4802
  }, {
4824
4803
  key: "_setAccess",
4825
4804
  value: function (accessType /*: string*/, userId /*: ParseUser | ParseRole | string*/, allowed /*: boolean*/) {
4826
- if (userId instanceof _ParseUser.default) {
4805
+ var ParseRole = _CoreManager.default.getParseRole();
4806
+ var ParseUser = _CoreManager.default.getParseUser();
4807
+ if (userId instanceof ParseUser) {
4827
4808
  userId = userId.id;
4828
- } else if (userId instanceof _ParseRole.default) {
4809
+ } else if (userId instanceof ParseRole) {
4829
4810
  var name = userId.getName();
4830
4811
  if (!name) {
4831
4812
  throw new TypeError('Role must have a name');
@@ -4860,12 +4841,14 @@ var ParseACL = /*#__PURE__*/function () {
4860
4841
  }, {
4861
4842
  key: "_getAccess",
4862
4843
  value: function (accessType /*: string*/, userId /*: ParseUser | ParseRole | string*/) /*: boolean*/{
4863
- if (userId instanceof _ParseUser.default) {
4844
+ var ParseRole = _CoreManager.default.getParseRole();
4845
+ var ParseUser = _CoreManager.default.getParseUser();
4846
+ if (userId instanceof ParseUser) {
4864
4847
  userId = userId.id;
4865
4848
  if (!userId) {
4866
4849
  throw new Error('Cannot get access for a ParseUser without an ID');
4867
4850
  }
4868
- } else if (userId instanceof _ParseRole.default) {
4851
+ } else if (userId instanceof ParseRole) {
4869
4852
  var name = userId.getName();
4870
4853
  if (!name) {
4871
4854
  throw new TypeError('Role must have a name');
@@ -4989,7 +4972,8 @@ var ParseACL = /*#__PURE__*/function () {
4989
4972
  }, {
4990
4973
  key: "getRoleReadAccess",
4991
4974
  value: function (role /*: ParseRole | string*/) /*: boolean*/{
4992
- if (role instanceof _ParseRole.default) {
4975
+ var ParseRole = _CoreManager.default.getParseRole();
4976
+ if (role instanceof ParseRole) {
4993
4977
  // Normalize to the String name
4994
4978
  role = role.getName();
4995
4979
  }
@@ -5011,7 +4995,8 @@ var ParseACL = /*#__PURE__*/function () {
5011
4995
  }, {
5012
4996
  key: "getRoleWriteAccess",
5013
4997
  value: function (role /*: ParseRole | string*/) /*: boolean*/{
5014
- if (role instanceof _ParseRole.default) {
4998
+ var ParseRole = _CoreManager.default.getParseRole();
4999
+ if (role instanceof ParseRole) {
5015
5000
  // Normalize to the String name
5016
5001
  role = role.getName();
5017
5002
  }
@@ -5032,7 +5017,8 @@ var ParseACL = /*#__PURE__*/function () {
5032
5017
  }, {
5033
5018
  key: "setRoleReadAccess",
5034
5019
  value: function (role /*: ParseRole | string*/, allowed /*: boolean*/) {
5035
- if (role instanceof _ParseRole.default) {
5020
+ var ParseRole = _CoreManager.default.getParseRole();
5021
+ if (role instanceof ParseRole) {
5036
5022
  // Normalize to the String name
5037
5023
  role = role.getName();
5038
5024
  }
@@ -5053,7 +5039,8 @@ var ParseACL = /*#__PURE__*/function () {
5053
5039
  }, {
5054
5040
  key: "setRoleWriteAccess",
5055
5041
  value: function (role /*: ParseRole | string*/, allowed /*: boolean*/) {
5056
- if (role instanceof _ParseRole.default) {
5042
+ var ParseRole = _CoreManager.default.getParseRole();
5043
+ if (role instanceof ParseRole) {
5057
5044
  // Normalize to the String name
5058
5045
  role = role.getName();
5059
5046
  }
@@ -5067,7 +5054,7 @@ var ParseACL = /*#__PURE__*/function () {
5067
5054
  }();
5068
5055
  var _default = ParseACL;
5069
5056
  exports.default = _default;
5070
- },{"./ParseRole":33,"./ParseUser":36,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/keys":93,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],21:[function(_dereq_,module,exports){
5057
+ },{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/keys":93,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],21:[function(_dereq_,module,exports){
5071
5058
  "use strict";
5072
5059
 
5073
5060
  var _sliceInstanceProperty2 = _dereq_("@babel/runtime-corejs3/core-js-stable/instance/slice");
@@ -6753,6 +6740,10 @@ XHR = _dereq_('./Xhr.weapp');
6753
6740
  /*:: type Base64 = { base64: string };*/
6754
6741
  /*:: type Uri = { uri: string };*/
6755
6742
  /*:: type FileData = Array<number> | Base64 | Blob | Uri;*/
6743
+ /*:: export type FileSaveOptions = FullOptions & {
6744
+ metadata?: { [key: string]: any },
6745
+ tags?: { [key: string]: any },
6746
+ };*/
6756
6747
  /*:: export type FileSource =
6757
6748
  | {
6758
6749
  format: 'file',
@@ -7355,13 +7346,11 @@ _Object$defineProperty(exports, "__esModule", {
7355
7346
  });
7356
7347
  exports.default = void 0;
7357
7348
  var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
7349
+ var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
7358
7350
  var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
7359
7351
  var _classCallCheck2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/classCallCheck"));
7360
7352
  var _createClass2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/createClass"));
7361
7353
  var _defineProperty2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/defineProperty"));
7362
- /**
7363
- * @flow
7364
- */
7365
7354
  /**
7366
7355
  * Creates a new GeoPoint with any of the following forms:<br>
7367
7356
  * <pre>
@@ -7464,7 +7453,7 @@ var ParseGeoPoint = /*#__PURE__*/function () {
7464
7453
  }
7465
7454
  }, {
7466
7455
  key: "equals",
7467
- value: function (other /*: mixed*/) /*: boolean*/{
7456
+ value: function (other /*: any*/) /*: boolean*/{
7468
7457
  return other instanceof ParseGeoPoint && this.latitude === other.latitude && this.longitude === other.longitude;
7469
7458
  }
7470
7459
 
@@ -7540,14 +7529,20 @@ var ParseGeoPoint = /*#__PURE__*/function () {
7540
7529
  /**
7541
7530
  * Creates a GeoPoint with the user's current location, if available.
7542
7531
  *
7532
+ * @param {object} options The options.
7533
+ * @param {boolean} [options.enableHighAccuracy=false] A boolean value that indicates the application would like to receive the best possible results. If true and if the device is able to provide a more accurate position, it will do so. Note that this can result in slower response times or increased power consumption (with a GPS chip on a mobile device for example). On the other hand, if false, the device can take the liberty to save resources by responding more quickly and/or using less power. Default: false.
7534
+ * @param {number} [options.timeout=Infinity] A positive long value representing the maximum length of time (in milliseconds) the device is allowed to take in order to return a position. The default value is Infinity, meaning that getCurrentPosition() won't return until the position is available.
7535
+ * @param {number} [options.maximumAge=0] A positive long value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return. If set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position. If set to Infinity the device must return a cached position regardless of its age. Default: 0.
7543
7536
  * @static
7544
- * @returns {Parse.GeoPoint} User's current location
7537
+ * @returns {Promise<Parse.GeoPoint>} User's current location
7545
7538
  */
7546
7539
  }, {
7547
7540
  key: "current",
7548
- value: function () {
7549
- return navigator.geolocation.getCurrentPosition(function (location) {
7550
- return new ParseGeoPoint(location.coords.latitude, location.coords.longitude);
7541
+ value: function (options) /*: Promise<ParseGeoPoint>*/{
7542
+ return new _promise.default(function (resolve, reject) {
7543
+ navigator.geolocation.getCurrentPosition(function (location) {
7544
+ resolve(new ParseGeoPoint(location.coords.latitude, location.coords.longitude));
7545
+ }, reject, options);
7551
7546
  });
7552
7547
  }
7553
7548
  }]);
@@ -7555,7 +7550,7 @@ var ParseGeoPoint = /*#__PURE__*/function () {
7555
7550
  }();
7556
7551
  var _default = ParseGeoPoint;
7557
7552
  exports.default = _default;
7558
- },{"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],26:[function(_dereq_,module,exports){
7553
+ },{"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/promise":95,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],26:[function(_dereq_,module,exports){
7559
7554
  "use strict";
7560
7555
 
7561
7556
  var _Reflect$construct = _dereq_("@babel/runtime-corejs3/core-js-stable/reflect/construct");
@@ -7565,12 +7560,16 @@ _Object$defineProperty(exports, "__esModule", {
7565
7560
  value: true
7566
7561
  });
7567
7562
  exports.default = void 0;
7563
+ var _regenerator = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/regenerator"));
7564
+ var _asyncToGenerator2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/asyncToGenerator"));
7568
7565
  var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
7569
- var _createClass2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/createClass"));
7570
7566
  var _classCallCheck2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/classCallCheck"));
7567
+ var _createClass2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/createClass"));
7568
+ var _get2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/get"));
7571
7569
  var _inherits2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/inherits"));
7572
7570
  var _possibleConstructorReturn2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
7573
7571
  var _getPrototypeOf2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/getPrototypeOf"));
7572
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
7574
7573
  var _ParseObject2 = _interopRequireDefault(_dereq_("./ParseObject"));
7575
7574
  function _createSuper(Derived) {
7576
7575
  var hasNativeReflectConstruct = _isNativeReflectConstruct();
@@ -7596,94 +7595,351 @@ function _isNativeReflectConstruct() {
7596
7595
  } catch (e) {
7597
7596
  return false;
7598
7597
  }
7599
- } /**
7600
- * @flow
7598
+ }
7599
+ var DEVICE_TYPES /*: DeviceInterface*/ = {
7600
+ IOS: 'ios',
7601
+ MACOS: 'macos',
7602
+ TVOS: 'tvos',
7603
+ FCM: 'fcm',
7604
+ ANDROID: 'android',
7605
+ WEB: 'web'
7606
+ };
7607
+
7608
+ /**
7609
+ * Parse.Installation is a local representation of installation data that can be saved and retrieved from the Parse cloud.
7610
+ * This class is a subclass of a Parse.Object, and retains the same functionality of a Parse.Object, but also extends it with installation-specific features.
7611
+ *
7612
+ * <p>A valid Parse.Installation can only be instantiated via <code>Parse.Installation.currentInstallation()</code>
7613
+ *
7614
+ * Parse.Installation objects which have a valid <code>deviceToken</code> and are saved to the Parse cloud can be used to target push notifications.
7615
+ * </p>
7616
+ *
7617
+ * @alias Parse.Installation
7618
+ */
7619
+ var ParseInstallation = /*#__PURE__*/function (_ParseObject) {
7620
+ (0, _inherits2.default)(ParseInstallation, _ParseObject);
7621
+ var _super = _createSuper(ParseInstallation);
7622
+ /**
7623
+ * @param {object} attributes The initial set of data to store in the object.
7601
7624
  */
7602
- /*:: import type { AttributeMap } from './ObjectStateMutations';*/
7603
- var Installation = /*#__PURE__*/function (_ParseObject) {
7604
- (0, _inherits2.default)(Installation, _ParseObject);
7605
- var _super = _createSuper(Installation);
7606
- function Installation(attributes /*: ?AttributeMap*/) {
7625
+ function ParseInstallation(attributes /*:: ?: AttributeMap*/) {
7607
7626
  var _this;
7608
- (0, _classCallCheck2.default)(this, Installation);
7627
+ (0, _classCallCheck2.default)(this, ParseInstallation);
7609
7628
  _this = _super.call(this, '_Installation');
7610
7629
  if (attributes && (0, _typeof2.default)(attributes) === 'object') {
7611
- if (!_this.set(attributes || {})) {
7630
+ if (!_this.set(attributes)) {
7612
7631
  throw new Error("Can't create an invalid Installation");
7613
7632
  }
7614
7633
  }
7615
7634
  return _this;
7616
7635
  }
7617
- return (0, _createClass2.default)(Installation);
7618
- }(_ParseObject2.default);
7619
- exports.default = Installation;
7620
- _ParseObject2.default.registerSubclass('_Installation', Installation);
7621
- },{"./ParseObject":28,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/reflect/construct":96,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/getPrototypeOf":113,"@babel/runtime-corejs3/helpers/inherits":114,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":122,"@babel/runtime-corejs3/helpers/typeof":130}],27:[function(_dereq_,module,exports){
7622
- "use strict";
7623
7636
 
7624
- var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
7625
- var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
7626
- _Object$defineProperty(exports, "__esModule", {
7627
- value: true
7628
- });
7629
- exports.default = void 0;
7630
- var _regenerator = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/regenerator"));
7631
- var _concat = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/concat"));
7632
- var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
7633
- var _indexOf = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
7634
- var _slicedToArray2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/slicedToArray"));
7635
- var _asyncToGenerator2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/asyncToGenerator"));
7636
- var _classCallCheck2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/classCallCheck"));
7637
- var _createClass2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/createClass"));
7638
- var _LiveQueryClient = _interopRequireDefault(_dereq_("./LiveQueryClient"));
7639
- var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
7640
- /**
7641
- * @flow
7642
- */
7637
+ /**
7638
+ * A unique identifier for this installation’s client application. In iOS, this is the Bundle Identifier.
7639
+ *
7640
+ * @property {string} appIdentifier
7641
+ * @static
7642
+ */
7643
+ (0, _createClass2.default)(ParseInstallation, [{
7644
+ key: "appIdentifier",
7645
+ get: function () {
7646
+ return this.get('appIdentifier');
7647
+ }
7643
7648
 
7644
- function getLiveQueryClient() /*: Promise<LiveQueryClient>*/{
7645
- return _CoreManager.default.getLiveQueryController().getDefaultLiveQueryClient();
7646
- }
7649
+ /**
7650
+ * The version string of the client application to which this installation belongs.
7651
+ *
7652
+ * @property {string} appVersion
7653
+ * @static
7654
+ */
7655
+ }, {
7656
+ key: "appVersion",
7657
+ get: function () {
7658
+ return this.get('appVersion');
7659
+ }
7647
7660
 
7648
- /**
7649
- * We expose three events to help you monitor the status of the WebSocket connection:
7650
- *
7651
- * <p>Open - When we establish the WebSocket connection to the LiveQuery server, you'll get this event.
7652
- *
7653
- * <pre>
7654
- * Parse.LiveQuery.on('open', () => {
7655
- *
7656
- * });</pre></p>
7657
- *
7658
- * <p>Close - When we lose the WebSocket connection to the LiveQuery server, you'll get this event.
7659
- *
7660
- * <pre>
7661
- * Parse.LiveQuery.on('close', () => {
7662
- *
7663
- * });</pre></p>
7664
- *
7665
- * <p>Error - When some network error or LiveQuery server error happens, you'll get this event.
7666
- *
7667
- * <pre>
7668
- * Parse.LiveQuery.on('error', (error) => {
7669
- *
7670
- * });</pre></p>
7671
- *
7672
- * @class Parse.LiveQuery
7673
- * @static
7674
- */
7675
- var LiveQuery = /*#__PURE__*/function () {
7676
- function LiveQuery() {
7677
- var _this = this;
7678
- (0, _classCallCheck2.default)(this, LiveQuery);
7679
- var EventEmitter = _CoreManager.default.getEventEmitter();
7680
- this.emitter = new EventEmitter();
7681
- this.on = function (eventName, listener) {
7682
- return _this.emitter.on(eventName, listener);
7683
- };
7684
- this.emit = function (eventName) {
7685
- var _this$emitter, _context;
7686
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
7661
+ /**
7662
+ * The display name of the client application to which this installation belongs.
7663
+ *
7664
+ * @property {string} appName
7665
+ * @static
7666
+ */
7667
+ }, {
7668
+ key: "appName",
7669
+ get: function () {
7670
+ return this.get('appName');
7671
+ }
7672
+
7673
+ /**
7674
+ * The current value of the icon badge for iOS apps.
7675
+ * Changes to this value on the server will be used
7676
+ * for future badge-increment push notifications.
7677
+ *
7678
+ * @property {number} badge
7679
+ * @static
7680
+ */
7681
+ }, {
7682
+ key: "badge",
7683
+ get: function () {
7684
+ return this.get('badge');
7685
+ }
7686
+
7687
+ /**
7688
+ * An array of the channels to which a device is currently subscribed.
7689
+ *
7690
+ * @property {string[]} channels
7691
+ * @static
7692
+ */
7693
+ }, {
7694
+ key: "channels",
7695
+ get: function () {
7696
+ return this.get('channels');
7697
+ }
7698
+
7699
+ /**
7700
+ * Token used to deliver push notifications to the device.
7701
+ *
7702
+ * @property {string} deviceToken
7703
+ * @static
7704
+ */
7705
+ }, {
7706
+ key: "deviceToken",
7707
+ get: function () {
7708
+ return this.get('deviceToken');
7709
+ }
7710
+
7711
+ /**
7712
+ * The type of device, “ios”, “android”, “web”, etc.
7713
+ *
7714
+ * @property {string} deviceType
7715
+ * @static
7716
+ */
7717
+ }, {
7718
+ key: "deviceType",
7719
+ get: function () {
7720
+ return this.get('deviceType');
7721
+ }
7722
+
7723
+ /**
7724
+ * Gets the GCM sender identifier for this installation
7725
+ *
7726
+ * @property {string} GCMSenderId
7727
+ * @static
7728
+ */
7729
+ }, {
7730
+ key: "GCMSenderId",
7731
+ get: function () {
7732
+ return this.get('GCMSenderId');
7733
+ }
7734
+
7735
+ /**
7736
+ * Universally Unique Identifier (UUID) for the device used by Parse. It must be unique across all of an app’s installations.
7737
+ *
7738
+ * @property {string} installationId
7739
+ * @static
7740
+ */
7741
+ }, {
7742
+ key: "installationId",
7743
+ get: function () {
7744
+ return this.get('installationId');
7745
+ }
7746
+
7747
+ /**
7748
+ * Gets the local identifier for this installation
7749
+ *
7750
+ * @property {string} localeIdentifier
7751
+ * @static
7752
+ */
7753
+ }, {
7754
+ key: "localeIdentifier",
7755
+ get: function () {
7756
+ return this.get('localeIdentifier');
7757
+ }
7758
+
7759
+ /**
7760
+ * Gets the parse server version for this installation
7761
+ *
7762
+ * @property {string} parseVersion
7763
+ * @static
7764
+ */
7765
+ }, {
7766
+ key: "parseVersion",
7767
+ get: function () {
7768
+ return this.get('parseVersion');
7769
+ }
7770
+
7771
+ /**
7772
+ * This field is reserved for directing Parse to the push delivery network to be used.
7773
+ *
7774
+ * @property {string} pushType
7775
+ * @static
7776
+ */
7777
+ }, {
7778
+ key: "pushType",
7779
+ get: function () {
7780
+ return this.get('pushType');
7781
+ }
7782
+
7783
+ /**
7784
+ * Gets the time zone for this installation
7785
+ *
7786
+ * @property {string} timeZone
7787
+ * @static
7788
+ */
7789
+ }, {
7790
+ key: "timeZone",
7791
+ get: function () {
7792
+ return this.get('timeZone');
7793
+ }
7794
+
7795
+ /**
7796
+ * Returns the device types for used for Push Notifications.
7797
+ *
7798
+ * <pre>
7799
+ * Parse.Installation.DEVICE_TYPES.IOS
7800
+ * Parse.Installation.DEVICE_TYPES.MACOS
7801
+ * Parse.Installation.DEVICE_TYPES.TVOS
7802
+ * Parse.Installation.DEVICE_TYPES.FCM
7803
+ * Parse.Installation.DEVICE_TYPES.ANDROID
7804
+ * Parse.Installation.DEVICE_TYPES.WEB
7805
+ * </pre
7806
+ *
7807
+ * @property {object} DEVICE_TYPES
7808
+ * @static
7809
+ */
7810
+ }, {
7811
+ key: "save",
7812
+ value:
7813
+ /**
7814
+ * Wrap the default save behavior with functionality to save to local storage.
7815
+ *
7816
+ * @param {...any} args
7817
+ * @returns {Promise}
7818
+ */
7819
+ function () {
7820
+ var _save = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
7821
+ var _len,
7822
+ args,
7823
+ _key,
7824
+ _args = arguments;
7825
+ return _regenerator.default.wrap(function (_context) {
7826
+ while (1) switch (_context.prev = _context.next) {
7827
+ case 0:
7828
+ for (_len = _args.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7829
+ args[_key] = _args[_key];
7830
+ }
7831
+ _context.next = 3;
7832
+ return (0, _get2.default)((0, _getPrototypeOf2.default)(ParseInstallation.prototype), "save", this).apply(this, args);
7833
+ case 3:
7834
+ _context.next = 5;
7835
+ return _CoreManager.default.getInstallationController().updateInstallationOnDisk(this);
7836
+ case 5:
7837
+ return _context.abrupt("return", this);
7838
+ case 6:
7839
+ case "end":
7840
+ return _context.stop();
7841
+ }
7842
+ }, _callee, this);
7843
+ }));
7844
+ function save() {
7845
+ return _save.apply(this, arguments);
7846
+ }
7847
+ return save;
7848
+ }()
7849
+ /**
7850
+ * Get the current Parse.Installation from disk. If doesn't exists, create an new installation.
7851
+ *
7852
+ * <pre>
7853
+ * const installation = await Parse.Installation.currentInstallation();
7854
+ * installation.set('deviceToken', '123');
7855
+ * await installation.save();
7856
+ * </pre>
7857
+ *
7858
+ * @returns {Promise} A promise that resolves to the local installation object.
7859
+ */
7860
+ }], [{
7861
+ key: "DEVICE_TYPES",
7862
+ get: function () /*: DeviceInterface*/{
7863
+ return DEVICE_TYPES;
7864
+ }
7865
+ }, {
7866
+ key: "currentInstallation",
7867
+ value: function () /*: Promise<ParseInstallation>*/{
7868
+ return _CoreManager.default.getInstallationController().currentInstallation();
7869
+ }
7870
+ }]);
7871
+ return ParseInstallation;
7872
+ }(_ParseObject2.default);
7873
+ _ParseObject2.default.registerSubclass('_Installation', ParseInstallation);
7874
+ module.exports = ParseInstallation;
7875
+ var _default = ParseInstallation;
7876
+ exports.default = _default;
7877
+ },{"./CoreManager":4,"./ParseObject":28,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/reflect/construct":96,"@babel/runtime-corejs3/helpers/asyncToGenerator":107,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/get":112,"@babel/runtime-corejs3/helpers/getPrototypeOf":113,"@babel/runtime-corejs3/helpers/inherits":114,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":122,"@babel/runtime-corejs3/helpers/typeof":130,"@babel/runtime-corejs3/regenerator":133}],27:[function(_dereq_,module,exports){
7878
+ "use strict";
7879
+
7880
+ var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
7881
+ var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
7882
+ _Object$defineProperty(exports, "__esModule", {
7883
+ value: true
7884
+ });
7885
+ exports.default = void 0;
7886
+ var _regenerator = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/regenerator"));
7887
+ var _concat = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/concat"));
7888
+ var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
7889
+ var _indexOf = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
7890
+ var _slicedToArray2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/slicedToArray"));
7891
+ var _asyncToGenerator2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/asyncToGenerator"));
7892
+ var _classCallCheck2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/classCallCheck"));
7893
+ var _createClass2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/createClass"));
7894
+ var _LiveQueryClient = _interopRequireDefault(_dereq_("./LiveQueryClient"));
7895
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
7896
+ /**
7897
+ * @flow
7898
+ */
7899
+
7900
+ function getLiveQueryClient() /*: Promise<LiveQueryClient>*/{
7901
+ return _CoreManager.default.getLiveQueryController().getDefaultLiveQueryClient();
7902
+ }
7903
+
7904
+ /**
7905
+ * We expose three events to help you monitor the status of the WebSocket connection:
7906
+ *
7907
+ * <p>Open - When we establish the WebSocket connection to the LiveQuery server, you'll get this event.
7908
+ *
7909
+ * <pre>
7910
+ * Parse.LiveQuery.on('open', () => {
7911
+ *
7912
+ * });</pre></p>
7913
+ *
7914
+ * <p>Close - When we lose the WebSocket connection to the LiveQuery server, you'll get this event.
7915
+ *
7916
+ * <pre>
7917
+ * Parse.LiveQuery.on('close', () => {
7918
+ *
7919
+ * });</pre></p>
7920
+ *
7921
+ * <p>Error - When some network error or LiveQuery server error happens, you'll get this event.
7922
+ *
7923
+ * <pre>
7924
+ * Parse.LiveQuery.on('error', (error) => {
7925
+ *
7926
+ * });</pre></p>
7927
+ *
7928
+ * @class Parse.LiveQuery
7929
+ * @static
7930
+ */
7931
+ var LiveQuery = /*#__PURE__*/function () {
7932
+ function LiveQuery() {
7933
+ var _this = this;
7934
+ (0, _classCallCheck2.default)(this, LiveQuery);
7935
+ var EventEmitter = _CoreManager.default.getEventEmitter();
7936
+ this.emitter = new EventEmitter();
7937
+ this.on = function (eventName, listener) {
7938
+ return _this.emitter.on(eventName, listener);
7939
+ };
7940
+ this.emit = function (eventName) {
7941
+ var _this$emitter, _context;
7942
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
7687
7943
  args[_key - 1] = arguments[_key];
7688
7944
  }
7689
7945
  return (_this$emitter = _this.emitter).emit.apply(_this$emitter, (0, _concat.default)(_context = [eventName]).call(_context, args));
@@ -7886,8 +8142,8 @@ var _ParseError = _interopRequireDefault(_dereq_("./ParseError"));
7886
8142
  var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
7887
8143
  var _promiseUtils = _dereq_("./promiseUtils");
7888
8144
  var _LocalDatastoreUtils = _dereq_("./LocalDatastoreUtils");
8145
+ var _uuid = _interopRequireDefault(_dereq_("./uuid"));
7889
8146
  var _ParseOp = _dereq_("./ParseOp");
7890
- var _ParseQuery = _interopRequireDefault(_dereq_("./ParseQuery"));
7891
8147
  var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
7892
8148
  var SingleInstanceStateController = _interopRequireWildcard(_dereq_("./SingleInstanceStateController"));
7893
8149
  var _unique = _interopRequireDefault(_dereq_("./unique"));
@@ -8017,25 +8273,17 @@ function _objectSpread(target) {
8017
8273
  });
8018
8274
  }
8019
8275
  return target;
8020
- } /**
8021
- * @flow
8022
- */
8023
- /*:: import type { AttributeMap, OpsMap } from './ObjectStateMutations';*/
8024
- /*:: import type { RequestOptions, FullOptions } from './RESTController';*/
8025
- var uuidv4 = _dereq_('./uuid');
8276
+ }
8026
8277
  /*:: export type Pointer = {
8027
8278
  __type: string,
8028
8279
  className: string,
8029
- objectId: string,
8030
- };*/
8031
- /*:: type SaveParams = {
8032
- method: string,
8033
- path: string,
8034
- body: AttributeMap,
8280
+ objectId?: string,
8281
+ _localId?: string,
8035
8282
  };*/
8036
8283
  /*:: export type SaveOptions = FullOptions & {
8037
8284
  cascadeSave?: boolean,
8038
8285
  context?: AttributeMap,
8286
+ batchSize?: number,
8039
8287
  };*/
8040
8288
  // Mapping of class names to constructors, so we can populate objects from the
8041
8289
  // server with appropriate subclasses of ParseObject
@@ -8085,7 +8333,7 @@ var ParseObject = /*#__PURE__*/function () {
8085
8333
  * @param {object} attributes The initial set of data to store in the object.
8086
8334
  * @param {object} options The options for this object instance.
8087
8335
  */
8088
- function ParseObject(className /*: ?string | { className: string, [attr: string]: mixed }*/, attributes /*:: ?: { [attr: string]: mixed }*/, options /*:: ?: { ignoreValidation: boolean }*/) {
8336
+ function ParseObject(className /*:: ?: string | { className: string, [attr: string]: any }*/, attributes /*:: ?: { [attr: string]: any }*/, options /*:: ?: { ignoreValidation: boolean }*/) {
8089
8337
  (0, _classCallCheck2.default)(this, ParseObject);
8090
8338
  /**
8091
8339
  * The ID of this object, unique within its class.
@@ -8140,7 +8388,7 @@ var ParseObject = /*#__PURE__*/function () {
8140
8388
  */
8141
8389
  }, {
8142
8390
  key: "createdAt",
8143
- get: function () /*: ?Date*/{
8391
+ get: function () /*: Date | undefined*/{
8144
8392
  return this._getServerData().createdAt;
8145
8393
  }
8146
8394
 
@@ -8152,7 +8400,7 @@ var ParseObject = /*#__PURE__*/function () {
8152
8400
  */
8153
8401
  }, {
8154
8402
  key: "updatedAt",
8155
- get: function () /*: ?Date*/{
8403
+ get: function () /*: Date | undefined*/{
8156
8404
  return this._getServerData().updatedAt;
8157
8405
  }
8158
8406
 
@@ -8172,7 +8420,7 @@ var ParseObject = /*#__PURE__*/function () {
8172
8420
  if (typeof this._localId === 'string') {
8173
8421
  return this._localId;
8174
8422
  }
8175
- var localId = 'local' + uuidv4();
8423
+ var localId = 'local' + (0, _uuid.default)();
8176
8424
  this._localId = localId;
8177
8425
  return localId;
8178
8426
  }
@@ -8266,7 +8514,7 @@ var ParseObject = /*#__PURE__*/function () {
8266
8514
  }, {
8267
8515
  key: "_toFullJSON",
8268
8516
  value: function (seen /*:: ?: Array<any>*/, offline /*:: ?: boolean*/) /*: AttributeMap*/{
8269
- var json /*: { [key: string]: mixed }*/ = this.toJSON(seen, offline);
8517
+ var json /*: { [key: string]: any }*/ = this.toJSON(seen, offline);
8270
8518
  json.__type = 'Object';
8271
8519
  json.className = this.className;
8272
8520
  return json;
@@ -8333,7 +8581,13 @@ var ParseObject = /*#__PURE__*/function () {
8333
8581
  }
8334
8582
  var stateController = _CoreManager.default.getObjectStateController();
8335
8583
  stateController.initializeState(this._getStateIdentifier());
8336
- var decoded = {};
8584
+ var decoded
8585
+ /*: Partial<{
8586
+ createdAt?: Date,
8587
+ updatedAt?: Date,
8588
+ ACL?: any,
8589
+ [key: string]: any,
8590
+ }>*/ = {};
8337
8591
  for (var _attr4 in serverData) {
8338
8592
  if (_attr4 === 'ACL') {
8339
8593
  decoded[_attr4] = new _ParseACL.default(serverData[_attr4]);
@@ -8385,7 +8639,12 @@ var ParseObject = /*#__PURE__*/function () {
8385
8639
  }, {
8386
8640
  key: "_handleSaveResponse",
8387
8641
  value: function (response /*: AttributeMap*/, status /*: number*/) {
8388
- var changes = {};
8642
+ var changes
8643
+ /*: Partial<{
8644
+ createdAt: string,
8645
+ updatedAt: string,
8646
+ [key: string]: any
8647
+ }>*/ = {};
8389
8648
  var stateController = _CoreManager.default.getObjectStateController();
8390
8649
  var pending = stateController.popPendingState(this._getStateIdentifier());
8391
8650
  for (var attr in pending) {
@@ -8448,7 +8707,7 @@ var ParseObject = /*#__PURE__*/function () {
8448
8707
  value: function (seen /*: Array<any> | void*/, offline /*:: ?: boolean*/) /*: AttributeMap*/{
8449
8708
  var seenEntry = this.id ? this.className + ':' + this.id : this;
8450
8709
  seen = seen || [seenEntry];
8451
- var json = {};
8710
+ var json /*: AttributeMap*/ = {};
8452
8711
  var attrs = this.attributes;
8453
8712
  for (var _attr5 in attrs) {
8454
8713
  if ((_attr5 === 'createdAt' || _attr5 === 'updatedAt') && attrs[_attr5].toJSON) {
@@ -8471,7 +8730,7 @@ var ParseObject = /*#__PURE__*/function () {
8471
8730
  */
8472
8731
  }, {
8473
8732
  key: "equals",
8474
- value: function (other /*: mixed*/) /*: boolean*/{
8733
+ value: function (other /*: any*/) /*: boolean*/{
8475
8734
  if (this === other) {
8476
8735
  return true;
8477
8736
  }
@@ -8592,7 +8851,7 @@ var ParseObject = /*#__PURE__*/function () {
8592
8851
  */
8593
8852
  }, {
8594
8853
  key: "get",
8595
- value: function (attr /*: string*/) /*: mixed*/{
8854
+ value: function (attr /*: string*/) /*: any*/{
8596
8855
  return this.attributes[attr];
8597
8856
  }
8598
8857
 
@@ -8687,7 +8946,7 @@ var ParseObject = /*#__PURE__*/function () {
8687
8946
  */
8688
8947
  }, {
8689
8948
  key: "set",
8690
- value: function (key /*: mixed*/, value /*: mixed*/, options /*:: ?: mixed*/) /*: ParseObject | boolean*/{
8949
+ value: function (key /*: any*/, value /*:: ?: any*/, options /*:: ?: any*/) /*: ParseObject | boolean*/{
8691
8950
  var changes = {};
8692
8951
  var newOps = {};
8693
8952
  if (key && (0, _typeof2.default)(key) === 'object') {
@@ -8776,7 +9035,7 @@ var ParseObject = /*#__PURE__*/function () {
8776
9035
  */
8777
9036
  }, {
8778
9037
  key: "unset",
8779
- value: function (attr /*: string*/, options /*:: ?: { [opt: string]: mixed }*/) /*: ParseObject | boolean*/{
9038
+ value: function (attr /*: string*/, options /*:: ?: { [opt: string]: any }*/) /*: ParseObject | boolean*/{
8780
9039
  options = options || {};
8781
9040
  options.unset = true;
8782
9041
  return this.set(attr, null, options);
@@ -8832,7 +9091,7 @@ var ParseObject = /*#__PURE__*/function () {
8832
9091
  */
8833
9092
  }, {
8834
9093
  key: "add",
8835
- value: function (attr /*: string*/, item /*: mixed*/) /*: ParseObject | boolean*/{
9094
+ value: function (attr /*: string*/, item /*: any*/) /*: ParseObject | boolean*/{
8836
9095
  return this.set(attr, new _ParseOp.AddOp([item]));
8837
9096
  }
8838
9097
 
@@ -8846,7 +9105,7 @@ var ParseObject = /*#__PURE__*/function () {
8846
9105
  */
8847
9106
  }, {
8848
9107
  key: "addAll",
8849
- value: function (attr /*: string*/, items /*: Array<mixed>*/) /*: ParseObject | boolean*/{
9108
+ value: function (attr /*: string*/, items /*: Array<any>*/) /*: ParseObject | boolean*/{
8850
9109
  return this.set(attr, new _ParseOp.AddOp(items));
8851
9110
  }
8852
9111
 
@@ -8861,7 +9120,7 @@ var ParseObject = /*#__PURE__*/function () {
8861
9120
  */
8862
9121
  }, {
8863
9122
  key: "addUnique",
8864
- value: function (attr /*: string*/, item /*: mixed*/) /*: ParseObject | boolean*/{
9123
+ value: function (attr /*: string*/, item /*: any*/) /*: ParseObject | boolean*/{
8865
9124
  return this.set(attr, new _ParseOp.AddUniqueOp([item]));
8866
9125
  }
8867
9126
 
@@ -8876,7 +9135,7 @@ var ParseObject = /*#__PURE__*/function () {
8876
9135
  */
8877
9136
  }, {
8878
9137
  key: "addAllUnique",
8879
- value: function (attr /*: string*/, items /*: Array<mixed>*/) /*: ParseObject | boolean*/{
9138
+ value: function (attr /*: string*/, items /*: Array<any>*/) /*: ParseObject | boolean*/{
8880
9139
  return this.set(attr, new _ParseOp.AddUniqueOp(items));
8881
9140
  }
8882
9141
 
@@ -8890,7 +9149,7 @@ var ParseObject = /*#__PURE__*/function () {
8890
9149
  */
8891
9150
  }, {
8892
9151
  key: "remove",
8893
- value: function (attr /*: string*/, item /*: mixed*/) /*: ParseObject | boolean*/{
9152
+ value: function (attr /*: string*/, item /*: any*/) /*: ParseObject | boolean*/{
8894
9153
  return this.set(attr, new _ParseOp.RemoveOp([item]));
8895
9154
  }
8896
9155
 
@@ -8904,7 +9163,7 @@ var ParseObject = /*#__PURE__*/function () {
8904
9163
  */
8905
9164
  }, {
8906
9165
  key: "removeAll",
8907
- value: function (attr /*: string*/, items /*: Array<mixed>*/) /*: ParseObject | boolean*/{
9166
+ value: function (attr /*: string*/, items /*: Array<any>*/) /*: ParseObject | boolean*/{
8908
9167
  return this.set(attr, new _ParseOp.RemoveOp(items));
8909
9168
  }
8910
9169
 
@@ -8919,7 +9178,7 @@ var ParseObject = /*#__PURE__*/function () {
8919
9178
  */
8920
9179
  }, {
8921
9180
  key: "op",
8922
- value: function (attr /*: string*/) /*: ?Op*/{
9181
+ value: function (attr /*: string*/) /*: Op | undefined*/{
8923
9182
  var pending = this._getPendingOps();
8924
9183
  for (var i = pending.length; i--;) {
8925
9184
  if (pending[i][attr]) {
@@ -9025,7 +9284,7 @@ var ParseObject = /*#__PURE__*/function () {
9025
9284
  key: "exists",
9026
9285
  value: function () {
9027
9286
  var _exists = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(options /*:: ?: RequestOptions*/) {
9028
- var query;
9287
+ var ParseQuery, query;
9029
9288
  return _regenerator.default.wrap(function (_context) {
9030
9289
  while (1) switch (_context.prev = _context.next) {
9031
9290
  case 0:
@@ -9036,26 +9295,27 @@ var ParseObject = /*#__PURE__*/function () {
9036
9295
  return _context.abrupt("return", false);
9037
9296
  case 2:
9038
9297
  _context.prev = 2;
9039
- query = new _ParseQuery.default(this.className);
9040
- _context.next = 6;
9298
+ ParseQuery = _CoreManager.default.getParseQuery();
9299
+ query = new ParseQuery(this.className);
9300
+ _context.next = 7;
9041
9301
  return query.get(this.id, options);
9042
- case 6:
9302
+ case 7:
9043
9303
  return _context.abrupt("return", true);
9044
- case 9:
9045
- _context.prev = 9;
9304
+ case 10:
9305
+ _context.prev = 10;
9046
9306
  _context.t0 = _context["catch"](2);
9047
9307
  if (!(_context.t0.code === _ParseError.default.OBJECT_NOT_FOUND)) {
9048
- _context.next = 13;
9308
+ _context.next = 14;
9049
9309
  break;
9050
9310
  }
9051
9311
  return _context.abrupt("return", false);
9052
- case 13:
9053
- throw _context.t0;
9054
9312
  case 14:
9313
+ throw _context.t0;
9314
+ case 15:
9055
9315
  case "end":
9056
9316
  return _context.stop();
9057
9317
  }
9058
- }, _callee, this, [[2, 9]]);
9318
+ }, _callee, this, [[2, 10]]);
9059
9319
  }));
9060
9320
  function exists() {
9061
9321
  return _exists.apply(this, arguments);
@@ -9105,7 +9365,7 @@ var ParseObject = /*#__PURE__*/function () {
9105
9365
  */
9106
9366
  }, {
9107
9367
  key: "getACL",
9108
- value: function () /*: ?ParseACL*/{
9368
+ value: function () /*: ParseACL | null*/{
9109
9369
  var acl = this.get('ACL');
9110
9370
  if (acl instanceof _ParseACL.default) {
9111
9371
  return acl;
@@ -9123,7 +9383,7 @@ var ParseObject = /*#__PURE__*/function () {
9123
9383
  */
9124
9384
  }, {
9125
9385
  key: "setACL",
9126
- value: function (acl /*: ParseACL*/, options /*:: ?: mixed*/) /*: ParseObject | boolean*/{
9386
+ value: function (acl /*: ParseACL*/, options /*:: ?: any*/) /*: ParseObject | boolean*/{
9127
9387
  return this.set('ACL', acl, options);
9128
9388
  }
9129
9389
 
@@ -9204,9 +9464,9 @@ var ParseObject = /*#__PURE__*/function () {
9204
9464
  */
9205
9465
  }, {
9206
9466
  key: "fetch",
9207
- value: function (options /*: RequestOptions*/) /*: Promise*/{
9467
+ value: function (options /*: FetchOptions*/) /*: Promise<any>*/{
9208
9468
  options = options || {};
9209
- var fetchOptions = {};
9469
+ var fetchOptions /*: FetchOptions*/ = {};
9210
9470
  if (options.hasOwnProperty('useMasterKey')) {
9211
9471
  fetchOptions.useMasterKey = options.useMasterKey;
9212
9472
  }
@@ -9256,7 +9516,7 @@ var ParseObject = /*#__PURE__*/function () {
9256
9516
  */
9257
9517
  }, {
9258
9518
  key: "fetchWithInclude",
9259
- value: function (keys /*: String | Array<string | Array<string>>*/, options /*: RequestOptions*/) /*: Promise*/{
9519
+ value: function (keys /*: String | Array<string | Array<string>>*/, options /*: RequestOptions*/) /*: Promise<any>*/{
9260
9520
  options = options || {};
9261
9521
  options.include = keys;
9262
9522
  return this.fetch(options);
@@ -9388,7 +9648,7 @@ var ParseObject = /*#__PURE__*/function () {
9388
9648
  */
9389
9649
  }, {
9390
9650
  key: "save",
9391
- value: function (arg1 /*: ?string | { [attr: string]: mixed }*/, arg2 /*: SaveOptions | mixed*/, arg3 /*:: ?: SaveOptions*/) /*: Promise*/{
9651
+ value: function (arg1 /*: undefined | string | { [attr: string]: any } | null*/, arg2 /*: SaveOptions | any*/, arg3 /*:: ?: SaveOptions*/) /*: Promise<this>*/{
9392
9652
  var _this = this;
9393
9653
  var attrs;
9394
9654
  var options;
@@ -9413,7 +9673,7 @@ var ParseObject = /*#__PURE__*/function () {
9413
9673
  return _promise.default.reject(validationError);
9414
9674
  }
9415
9675
  }
9416
- var saveOptions = {};
9676
+ var saveOptions /*: SaveOptions*/ = {};
9417
9677
  if (options.hasOwnProperty('useMasterKey')) {
9418
9678
  saveOptions.useMasterKey = !!options.useMasterKey;
9419
9679
  }
@@ -9508,9 +9768,9 @@ var ParseObject = /*#__PURE__*/function () {
9508
9768
  */
9509
9769
  }, {
9510
9770
  key: "destroy",
9511
- value: function (options /*: RequestOptions*/) /*: Promise*/{
9771
+ value: function (options /*: RequestOptions*/) /*: Promise<void | ParseObject>*/{
9512
9772
  options = options || {};
9513
- var destroyOptions = {};
9773
+ var destroyOptions /*: RequestOptions*/ = {};
9514
9774
  if (options.hasOwnProperty('useMasterKey')) {
9515
9775
  destroyOptions.useMasterKey = options.useMasterKey;
9516
9776
  }
@@ -9737,7 +9997,7 @@ var ParseObject = /*#__PURE__*/function () {
9737
9997
  key: "fetchAll",
9738
9998
  value: function (list /*: Array<ParseObject>*/) {
9739
9999
  var options /*: RequestOptions*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9740
- var queryOptions = {};
10000
+ var queryOptions /*: RequestOptions*/ = {};
9741
10001
  if (options.hasOwnProperty('useMasterKey')) {
9742
10002
  queryOptions.useMasterKey = options.useMasterKey;
9743
10003
  }
@@ -9845,9 +10105,9 @@ var ParseObject = /*#__PURE__*/function () {
9845
10105
  */
9846
10106
  }, {
9847
10107
  key: "fetchAllIfNeeded",
9848
- value: function (list /*: Array<ParseObject>*/, options) {
10108
+ value: function (list /*: Array<ParseObject>*/, options /*: FetchOptions*/) {
9849
10109
  options = options || {};
9850
- var queryOptions = {};
10110
+ var queryOptions /*: FetchOptions*/ = {};
9851
10111
  if (options.hasOwnProperty('useMasterKey')) {
9852
10112
  queryOptions.useMasterKey = options.useMasterKey;
9853
10113
  }
@@ -9861,7 +10121,7 @@ var ParseObject = /*#__PURE__*/function () {
9861
10121
  }
9862
10122
  }, {
9863
10123
  key: "handleIncludeOptions",
9864
- value: function (options) {
10124
+ value: function (options /*: { include?: string | string[] }*/) {
9865
10125
  var include = [];
9866
10126
  if ((0, _isArray.default)(options.include)) {
9867
10127
  var _context8;
@@ -9927,8 +10187,8 @@ var ParseObject = /*#__PURE__*/function () {
9927
10187
  }, {
9928
10188
  key: "destroyAll",
9929
10189
  value: function (list /*: Array<ParseObject>*/) {
9930
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9931
- var destroyOptions = {};
10190
+ var options /*: SaveOptions*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10191
+ var destroyOptions /*: SaveOptions*/ = {};
9932
10192
  if (options.hasOwnProperty('useMasterKey')) {
9933
10193
  destroyOptions.useMasterKey = options.useMasterKey;
9934
10194
  }
@@ -9965,8 +10225,8 @@ var ParseObject = /*#__PURE__*/function () {
9965
10225
  }, {
9966
10226
  key: "saveAll",
9967
10227
  value: function (list /*: Array<ParseObject>*/) {
9968
- var options /*: RequestOptions*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9969
- var saveOptions = {};
10228
+ var options /*: SaveOptions*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10229
+ var saveOptions /*: SaveOptions*/ = {};
9970
10230
  if (options.hasOwnProperty('useMasterKey')) {
9971
10231
  saveOptions.useMasterKey = options.useMasterKey;
9972
10232
  }
@@ -9998,7 +10258,7 @@ var ParseObject = /*#__PURE__*/function () {
9998
10258
  */
9999
10259
  }, {
10000
10260
  key: "createWithoutData",
10001
- value: function (id /*: string*/) {
10261
+ value: function (id /*: string*/) /*: ParseObject*/{
10002
10262
  var obj = new this();
10003
10263
  obj.id = id;
10004
10264
  return obj;
@@ -10016,13 +10276,13 @@ var ParseObject = /*#__PURE__*/function () {
10016
10276
  */
10017
10277
  }, {
10018
10278
  key: "fromJSON",
10019
- value: function (json /*: any*/, override /*:: ?: boolean*/, dirty /*:: ?: boolean*/) {
10279
+ value: function (json /*: any*/, override /*:: ?: boolean*/, dirty /*:: ?: boolean*/) /*: ParseObject*/{
10020
10280
  if (!json.className) {
10021
10281
  throw new Error('Cannot create an object without a className');
10022
10282
  }
10023
10283
  var constructor = classMap[json.className];
10024
10284
  var o = constructor ? new constructor(json.className) : new ParseObject(json.className);
10025
- var otherAttributes = {};
10285
+ var otherAttributes /*: AttributeMap*/ = {};
10026
10286
  for (var _attr11 in json) {
10027
10287
  if (_attr11 !== 'className' && _attr11 !== '__type') {
10028
10288
  otherAttributes[_attr11] = json[_attr11];
@@ -10409,7 +10669,7 @@ var ParseObject = /*#__PURE__*/function () {
10409
10669
  return ParseObject;
10410
10670
  }();
10411
10671
  var DefaultController = {
10412
- fetch: function (target /*: ParseObject | Array<ParseObject>*/, forceFetch /*: boolean*/, options /*: RequestOptions*/) /*: Promise<Array<void> | ParseObject>*/{
10672
+ fetch: function (target /*: ParseObject | Array<ParseObject>*/, forceFetch /*: boolean*/, options /*: RequestOptions*/) /*: Promise<Array<ParseObject | undefined> | ParseObject | undefined>*/{
10413
10673
  var localDatastore = _CoreManager.default.getLocalDatastore();
10414
10674
  if ((0, _isArray.default)(target)) {
10415
10675
  if (target.length < 1) {
@@ -10442,7 +10702,8 @@ var DefaultController = {
10442
10702
  if (error) {
10443
10703
  return _promise.default.reject(error);
10444
10704
  }
10445
- var query = new _ParseQuery.default(className);
10705
+ var ParseQuery = _CoreManager.default.getParseQuery();
10706
+ var query = new ParseQuery(className);
10446
10707
  query.containedIn('objectId', ids);
10447
10708
  if (options && options.include) {
10448
10709
  query.include(options.include);
@@ -10520,7 +10781,7 @@ var DefaultController = {
10520
10781
  return _promise.default.reject(new _ParseError.default(_ParseError.default.MISSING_OBJECT_ID, 'Object does not have an ID'));
10521
10782
  }
10522
10783
  var RESTController = _CoreManager.default.getRESTController();
10523
- var params = {};
10784
+ var params /*: RequestOptions*/ = {};
10524
10785
  if (options && options.include) {
10525
10786
  params.include = options.include.join();
10526
10787
  }
@@ -10547,9 +10808,9 @@ var DefaultController = {
10547
10808
  };
10548
10809
  }());
10549
10810
  }
10550
- return _promise.default.resolve();
10811
+ return _promise.default.resolve(undefined);
10551
10812
  },
10552
- destroy: function (target /*: ParseObject | Array<ParseObject>*/, options /*: RequestOptions*/) /*: Promise<Array<void> | ParseObject>*/{
10813
+ destroy: function (target /*: ParseObject | Array<ParseObject>*/, options /*: RequestOptions*/) /*: Promise<ParseObject | Array<ParseObject>>*/{
10553
10814
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
10554
10815
  var batchSize, localDatastore, RESTController, batches, deleteCompleted, errors;
10555
10816
  return _regenerator.default.wrap(function (_context14) {
@@ -10679,7 +10940,7 @@ var DefaultController = {
10679
10940
  }, _callee10);
10680
10941
  }))();
10681
10942
  },
10682
- save: function (target /*: ParseObject | Array<ParseObject | ParseFile>*/, options /*: RequestOptions*/) {
10943
+ save: function (target /*: ParseObject | Array<ParseObject | ParseFile>*/, options /*: RequestOptions*/) /*: Promise<ParseObject | Array<ParseObject> | ParseFile>*/{
10683
10944
  var batchSize = options && options.batchSize ? options.batchSize : _CoreManager.default.get('REQUEST_BATCH_SIZE');
10684
10945
  var localDatastore = _CoreManager.default.getLocalDatastore();
10685
10946
  var mapIdForPin = {};
@@ -10874,10 +11135,11 @@ var DefaultController = {
10874
11135
  return _promise.default.resolve();
10875
11136
  }
10876
11137
  };
11138
+ _CoreManager.default.setParseObject(ParseObject);
10877
11139
  _CoreManager.default.setObjectController(DefaultController);
10878
11140
  var _default = ParseObject;
10879
11141
  exports.default = _default;
10880
- },{"./CoreManager":4,"./LocalDatastoreUtils":16,"./ParseACL":20,"./ParseError":23,"./ParseFile":24,"./ParseOp":29,"./ParseQuery":31,"./ParseRelation":32,"./SingleInstanceStateController":39,"./UniqueInstanceStateController":45,"./canBeSerialized":49,"./decode":50,"./encode":51,"./escape":53,"./parseDate":55,"./promiseUtils":56,"./unique":57,"./unsavedChildren":58,"./uuid":59,"@babel/runtime-corejs3/core-js-stable/array/from":60,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/instance/concat":63,"@babel/runtime-corejs3/core-js-stable/instance/filter":66,"@babel/runtime-corejs3/core-js-stable/instance/find":68,"@babel/runtime-corejs3/core-js-stable/instance/for-each":69,"@babel/runtime-corejs3/core-js-stable/instance/includes":70,"@babel/runtime-corejs3/core-js-stable/instance/index-of":71,"@babel/runtime-corejs3/core-js-stable/instance/map":73,"@babel/runtime-corejs3/core-js-stable/instance/slice":75,"@babel/runtime-corejs3/core-js-stable/json/stringify":80,"@babel/runtime-corejs3/core-js-stable/object/create":84,"@babel/runtime-corejs3/core-js-stable/object/define-properties":85,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/freeze":88,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":89,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors":90,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols":91,"@babel/runtime-corejs3/core-js-stable/object/get-prototype-of":92,"@babel/runtime-corejs3/core-js-stable/object/keys":93,"@babel/runtime-corejs3/core-js-stable/promise":95,"@babel/runtime-corejs3/core-js-stable/symbol":100,"@babel/runtime-corejs3/core-js-stable/weak-map":101,"@babel/runtime-corejs3/core-js/get-iterator-method":102,"@babel/runtime-corejs3/helpers/asyncToGenerator":107,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/toConsumableArray":127,"@babel/runtime-corejs3/helpers/typeof":130,"@babel/runtime-corejs3/regenerator":133}],29:[function(_dereq_,module,exports){
11142
+ },{"./CoreManager":4,"./LocalDatastoreUtils":16,"./ParseACL":20,"./ParseError":23,"./ParseFile":24,"./ParseOp":29,"./ParseRelation":32,"./SingleInstanceStateController":39,"./UniqueInstanceStateController":45,"./canBeSerialized":49,"./decode":50,"./encode":51,"./escape":53,"./parseDate":55,"./promiseUtils":56,"./unique":57,"./unsavedChildren":58,"./uuid":59,"@babel/runtime-corejs3/core-js-stable/array/from":60,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/instance/concat":63,"@babel/runtime-corejs3/core-js-stable/instance/filter":66,"@babel/runtime-corejs3/core-js-stable/instance/find":68,"@babel/runtime-corejs3/core-js-stable/instance/for-each":69,"@babel/runtime-corejs3/core-js-stable/instance/includes":70,"@babel/runtime-corejs3/core-js-stable/instance/index-of":71,"@babel/runtime-corejs3/core-js-stable/instance/map":73,"@babel/runtime-corejs3/core-js-stable/instance/slice":75,"@babel/runtime-corejs3/core-js-stable/json/stringify":80,"@babel/runtime-corejs3/core-js-stable/object/create":84,"@babel/runtime-corejs3/core-js-stable/object/define-properties":85,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/freeze":88,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":89,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors":90,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols":91,"@babel/runtime-corejs3/core-js-stable/object/get-prototype-of":92,"@babel/runtime-corejs3/core-js-stable/object/keys":93,"@babel/runtime-corejs3/core-js-stable/promise":95,"@babel/runtime-corejs3/core-js-stable/symbol":100,"@babel/runtime-corejs3/core-js-stable/weak-map":101,"@babel/runtime-corejs3/core-js/get-iterator-method":102,"@babel/runtime-corejs3/helpers/asyncToGenerator":107,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/toConsumableArray":127,"@babel/runtime-corejs3/helpers/typeof":130,"@babel/runtime-corejs3/regenerator":133}],29:[function(_dereq_,module,exports){
10881
11143
  "use strict";
10882
11144
 
10883
11145
  var _Reflect$construct = _dereq_("@babel/runtime-corejs3/core-js-stable/reflect/construct");
@@ -10904,7 +11166,7 @@ var _map = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable
10904
11166
  var _arrayContainsObject = _interopRequireDefault(_dereq_("./arrayContainsObject"));
10905
11167
  var _decode = _interopRequireDefault(_dereq_("./decode"));
10906
11168
  var _encode = _interopRequireDefault(_dereq_("./encode"));
10907
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
11169
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
10908
11170
  var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
10909
11171
  var _unique = _interopRequireDefault(_dereq_("./unique"));
10910
11172
  function _createSuper(Derived) {
@@ -10933,7 +11195,7 @@ function _isNativeReflectConstruct() {
10933
11195
  }
10934
11196
  } /**
10935
11197
  * @flow
10936
- */
11198
+ */ /*:: import type ParseObject from './ParseObject';*/
10937
11199
  function opFromJSON(json /*: { [key: string]: any }*/) /*: ?Op*/{
10938
11200
  if (!json || !json.__op) {
10939
11201
  return null;
@@ -11182,9 +11444,10 @@ var AddUniqueOp = /*#__PURE__*/function (_Op5) {
11182
11444
  }
11183
11445
  if ((0, _isArray.default)(value)) {
11184
11446
  var _context;
11447
+ var ParseObject = _CoreManager.default.getParseObject();
11185
11448
  var toAdd = [];
11186
11449
  (0, _forEach.default)(_context = this._value).call(_context, function (v) {
11187
- if (v instanceof _ParseObject.default) {
11450
+ if (v instanceof ParseObject) {
11188
11451
  if (!(0, _arrayContainsObject.default)(value, v)) {
11189
11452
  toAdd.push(v);
11190
11453
  }
@@ -11245,6 +11508,7 @@ var RemoveOp = /*#__PURE__*/function (_Op6) {
11245
11508
  return [];
11246
11509
  }
11247
11510
  if ((0, _isArray.default)(value)) {
11511
+ var ParseObject = _CoreManager.default.getParseObject();
11248
11512
  // var i = value.indexOf(this._value);
11249
11513
  var removed = (0, _concat.default)(value).call(value, []);
11250
11514
  for (var i = 0; i < this._value.length; i++) {
@@ -11253,9 +11517,9 @@ var RemoveOp = /*#__PURE__*/function (_Op6) {
11253
11517
  (0, _splice.default)(removed).call(removed, index, 1);
11254
11518
  index = (0, _indexOf.default)(removed).call(removed, this._value[i]);
11255
11519
  }
11256
- if (this._value[i] instanceof _ParseObject.default && this._value[i].id) {
11520
+ if (this._value[i] instanceof ParseObject && this._value[i].id) {
11257
11521
  for (var j = 0; j < removed.length; j++) {
11258
- if (removed[j] instanceof _ParseObject.default && this._value[i].id === removed[j].id) {
11522
+ if (removed[j] instanceof ParseObject && this._value[i].id === removed[j].id) {
11259
11523
  (0, _splice.default)(removed).call(removed, j, 1);
11260
11524
  j--;
11261
11525
  }
@@ -11280,9 +11544,10 @@ var RemoveOp = /*#__PURE__*/function (_Op6) {
11280
11544
  }
11281
11545
  if (previous instanceof RemoveOp) {
11282
11546
  var _context2;
11547
+ var ParseObject = _CoreManager.default.getParseObject();
11283
11548
  var uniques = (0, _concat.default)(_context2 = previous._value).call(_context2, []);
11284
11549
  for (var i = 0; i < this._value.length; i++) {
11285
- if (this._value[i] instanceof _ParseObject.default) {
11550
+ if (this._value[i] instanceof ParseObject) {
11286
11551
  if (!(0, _arrayContainsObject.default)(uniques, this._value[i])) {
11287
11552
  uniques.push(this._value[i]);
11288
11553
  }
@@ -11458,7 +11723,18 @@ var RelationOp = /*#__PURE__*/function (_Op7) {
11458
11723
  return RelationOp;
11459
11724
  }(Op);
11460
11725
  exports.RelationOp = RelationOp;
11461
- },{"./ParseObject":28,"./ParseRelation":32,"./arrayContainsObject":48,"./decode":50,"./encode":51,"./unique":57,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/instance/concat":63,"@babel/runtime-corejs3/core-js-stable/instance/for-each":69,"@babel/runtime-corejs3/core-js-stable/instance/index-of":71,"@babel/runtime-corejs3/core-js-stable/instance/map":73,"@babel/runtime-corejs3/core-js-stable/instance/splice":77,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/reflect/construct":96,"@babel/runtime-corejs3/helpers/assertThisInitialized":106,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/getPrototypeOf":113,"@babel/runtime-corejs3/helpers/inherits":114,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":122}],30:[function(_dereq_,module,exports){
11726
+ _CoreManager.default.setParseOp({
11727
+ Op: Op,
11728
+ opFromJSON: opFromJSON,
11729
+ SetOp: SetOp,
11730
+ UnsetOp: UnsetOp,
11731
+ IncrementOp: IncrementOp,
11732
+ AddOp: AddOp,
11733
+ RelationOp: RelationOp,
11734
+ RemoveOp: RemoveOp,
11735
+ AddUniqueOp: AddUniqueOp
11736
+ });
11737
+ },{"./CoreManager":4,"./ParseRelation":32,"./arrayContainsObject":48,"./decode":50,"./encode":51,"./unique":57,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/instance/concat":63,"@babel/runtime-corejs3/core-js-stable/instance/for-each":69,"@babel/runtime-corejs3/core-js-stable/instance/index-of":71,"@babel/runtime-corejs3/core-js-stable/instance/map":73,"@babel/runtime-corejs3/core-js-stable/instance/splice":77,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/reflect/construct":96,"@babel/runtime-corejs3/helpers/assertThisInitialized":106,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/getPrototypeOf":113,"@babel/runtime-corejs3/helpers/inherits":114,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":122}],30:[function(_dereq_,module,exports){
11462
11738
  "use strict";
11463
11739
 
11464
11740
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -14057,6 +14333,7 @@ var DefaultController = {
14057
14333
  return RESTController.request('GET', 'aggregate/' + className, params, options);
14058
14334
  }
14059
14335
  };
14336
+ _CoreManager.default.setParseQuery(ParseQuery);
14060
14337
  _CoreManager.default.setQueryController(DefaultController);
14061
14338
  var _default = ParseQuery;
14062
14339
  exports.default = _default;
@@ -14073,12 +14350,12 @@ var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-st
14073
14350
  var _classCallCheck2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/classCallCheck"));
14074
14351
  var _createClass2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/createClass"));
14075
14352
  var _defineProperty2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/defineProperty"));
14076
- var _ParseOp = _dereq_("./ParseOp");
14077
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
14078
- var _ParseQuery = _interopRequireDefault(_dereq_("./ParseQuery"));
14353
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
14079
14354
  /**
14080
14355
  * @flow
14081
14356
  */
14357
+ /*:: import type ParseObject from './ParseObject';*/
14358
+ /*:: import type ParseQuery from './ParseQuery';*/
14082
14359
  /**
14083
14360
  * Creates a new Relation for the given parent object and key. This
14084
14361
  * constructor should rarely be used directly, but rather created by
@@ -14145,7 +14422,9 @@ var ParseRelation = /*#__PURE__*/function () {
14145
14422
  if (!(0, _isArray.default)(objects)) {
14146
14423
  objects = [objects];
14147
14424
  }
14148
- var change = new _ParseOp.RelationOp(objects, []);
14425
+ var _CoreManager$getParse = _CoreManager.default.getParseOp(),
14426
+ RelationOp = _CoreManager$getParse.RelationOp;
14427
+ var change = new RelationOp(objects, []);
14149
14428
  var parent = this.parent;
14150
14429
  if (!parent) {
14151
14430
  throw new Error('Cannot add to a Relation without a parent');
@@ -14169,7 +14448,9 @@ var ParseRelation = /*#__PURE__*/function () {
14169
14448
  if (!(0, _isArray.default)(objects)) {
14170
14449
  objects = [objects];
14171
14450
  }
14172
- var change = new _ParseOp.RelationOp([], objects);
14451
+ var _CoreManager$getParse2 = _CoreManager.default.getParseOp(),
14452
+ RelationOp = _CoreManager$getParse2.RelationOp;
14453
+ var change = new RelationOp([], objects);
14173
14454
  if (!this.parent) {
14174
14455
  throw new Error('Cannot remove from a Relation without a parent');
14175
14456
  }
@@ -14208,11 +14489,12 @@ var ParseRelation = /*#__PURE__*/function () {
14208
14489
  if (!parent) {
14209
14490
  throw new Error('Cannot construct a query for a Relation without a parent');
14210
14491
  }
14492
+ var ParseQuery = _CoreManager.default.getParseQuery();
14211
14493
  if (!this.targetClassName) {
14212
- query = new _ParseQuery.default(parent.className);
14494
+ query = new ParseQuery(parent.className);
14213
14495
  query._extraOptions.redirectClassNameForKey = this.key;
14214
14496
  } else {
14215
- query = new _ParseQuery.default(this.targetClassName);
14497
+ query = new ParseQuery(this.targetClassName);
14216
14498
  }
14217
14499
  query._addCondition('$relatedTo', 'object', {
14218
14500
  __type: 'Pointer',
@@ -14227,7 +14509,7 @@ var ParseRelation = /*#__PURE__*/function () {
14227
14509
  }();
14228
14510
  var _default = ParseRelation;
14229
14511
  exports.default = _default;
14230
- },{"./ParseObject":28,"./ParseOp":29,"./ParseQuery":31,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/interopRequireDefault":115}],33:[function(_dereq_,module,exports){
14512
+ },{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/defineProperty":111,"@babel/runtime-corejs3/helpers/interopRequireDefault":115}],33:[function(_dereq_,module,exports){
14231
14513
  "use strict";
14232
14514
 
14233
14515
  var _Reflect$construct = _dereq_("@babel/runtime-corejs3/core-js-stable/reflect/construct");
@@ -14243,6 +14525,7 @@ var _get2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/get")
14243
14525
  var _inherits2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/inherits"));
14244
14526
  var _possibleConstructorReturn2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
14245
14527
  var _getPrototypeOf2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/getPrototypeOf"));
14528
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
14246
14529
  var _ParseACL = _interopRequireDefault(_dereq_("./ParseACL"));
14247
14530
  var _ParseError = _interopRequireDefault(_dereq_("./ParseError"));
14248
14531
  var _ParseObject2 = _interopRequireDefault(_dereq_("./ParseObject"));
@@ -14416,10 +14699,11 @@ var ParseRole = /*#__PURE__*/function (_ParseObject) {
14416
14699
  }]);
14417
14700
  return ParseRole;
14418
14701
  }(_ParseObject2.default);
14702
+ _CoreManager.default.setParseRole(ParseRole);
14419
14703
  _ParseObject2.default.registerSubclass('_Role', ParseRole);
14420
14704
  var _default = ParseRole;
14421
14705
  exports.default = _default;
14422
- },{"./ParseACL":20,"./ParseError":23,"./ParseObject":28,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/reflect/construct":96,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/get":112,"@babel/runtime-corejs3/helpers/getPrototypeOf":113,"@babel/runtime-corejs3/helpers/inherits":114,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":122}],34:[function(_dereq_,module,exports){
14706
+ },{"./CoreManager":4,"./ParseACL":20,"./ParseError":23,"./ParseObject":28,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/reflect/construct":96,"@babel/runtime-corejs3/helpers/classCallCheck":108,"@babel/runtime-corejs3/helpers/createClass":110,"@babel/runtime-corejs3/helpers/get":112,"@babel/runtime-corejs3/helpers/getPrototypeOf":113,"@babel/runtime-corejs3/helpers/inherits":114,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":122}],34:[function(_dereq_,module,exports){
14423
14707
  "use strict";
14424
14708
 
14425
14709
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -15061,7 +15345,7 @@ var ParseSession = /*#__PURE__*/function (_ParseObject) {
15061
15345
  value: function (options /*: FullOptions*/) {
15062
15346
  options = options || {};
15063
15347
  var controller = _CoreManager.default.getSessionController();
15064
- var sessionOptions = {};
15348
+ var sessionOptions /*: FullOptions*/ = {};
15065
15349
  if (options.hasOwnProperty('useMasterKey')) {
15066
15350
  sessionOptions.useMasterKey = options.useMasterKey;
15067
15351
  }
@@ -16685,6 +16969,7 @@ var DefaultController = {
16685
16969
  }, options);
16686
16970
  }
16687
16971
  };
16972
+ _CoreManager.default.setParseUser(ParseUser);
16688
16973
  _CoreManager.default.setUserController(DefaultController);
16689
16974
  var _default = ParseUser;
16690
16975
  exports.default = _default;
@@ -17181,7 +17466,6 @@ var _typeof = _dereq_("@babel/runtime-corejs3/helpers/typeof");
17181
17466
  var _WeakMap = _dereq_("@babel/runtime-corejs3/core-js-stable/weak-map");
17182
17467
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
17183
17468
  var _Object$getOwnPropertyDescriptor = _dereq_("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
17184
- var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
17185
17469
  _Object$defineProperty(exports, "__esModule", {
17186
17470
  value: true
17187
17471
  });
@@ -17203,7 +17487,6 @@ exports.removeState = removeState;
17203
17487
  exports.setPendingOp = setPendingOp;
17204
17488
  exports.setServerData = setServerData;
17205
17489
  var ObjectStateMutations = _interopRequireWildcard(_dereq_("./ObjectStateMutations"));
17206
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
17207
17490
  function _getRequireWildcardCache(nodeInterop) {
17208
17491
  if (typeof _WeakMap !== "function") return null;
17209
17492
  var cacheBabelInterop = new _WeakMap();
@@ -17327,12 +17610,12 @@ function getObjectCache(obj /*: ObjectIdentifier*/) /*: ObjectCache*/{
17327
17610
  }
17328
17611
  return {};
17329
17612
  }
17330
- function estimateAttribute(obj /*: ParseObject*/, attr /*: string*/) /*: mixed*/{
17613
+ function estimateAttribute(obj /*: ObjectIdentifier*/, attr /*: string*/) /*: mixed*/{
17331
17614
  var serverData = getServerData(obj);
17332
17615
  var pendingOps = getPendingOps(obj);
17333
17616
  return ObjectStateMutations.estimateAttribute(serverData, pendingOps, obj, attr);
17334
17617
  }
17335
- function estimateAttributes(obj /*: ParseObject*/) /*: AttributeMap*/{
17618
+ function estimateAttributes(obj /*: ObjectIdentifier*/) /*: AttributeMap*/{
17336
17619
  var serverData = getServerData(obj);
17337
17620
  var pendingOps = getPendingOps(obj);
17338
17621
  return ObjectStateMutations.estimateAttributes(serverData, pendingOps, obj);
@@ -17351,7 +17634,7 @@ function clearAllState() {
17351
17634
  function duplicateState(source /*: { id: string }*/, dest /*: { id: string }*/) {
17352
17635
  dest.id = source.id;
17353
17636
  }
17354
- },{"./ObjectStateMutations":17,"./ParseObject":28,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":89,"@babel/runtime-corejs3/core-js-stable/weak-map":101,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],40:[function(_dereq_,module,exports){
17637
+ },{"./ObjectStateMutations":17,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":89,"@babel/runtime-corejs3/core-js-stable/weak-map":101,"@babel/runtime-corejs3/helpers/typeof":130}],40:[function(_dereq_,module,exports){
17355
17638
  "use strict";
17356
17639
 
17357
17640
  var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
@@ -17903,23 +18186,24 @@ _Object$defineProperty(exports, "__esModule", {
17903
18186
  });
17904
18187
  exports.default = arrayContainsObject;
17905
18188
  var _indexOf = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
17906
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
18189
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
17907
18190
  /**
17908
18191
  * @flow
17909
18192
  */
17910
-
18193
+ /*:: import type ParseObject from './ParseObject';*/
17911
18194
  function arrayContainsObject(array /*: Array<any>*/, object /*: ParseObject*/) /*: boolean*/{
17912
18195
  if ((0, _indexOf.default)(array).call(array, object) > -1) {
17913
18196
  return true;
17914
18197
  }
18198
+ var ParseObject = _CoreManager.default.getParseObject();
17915
18199
  for (var i = 0; i < array.length; i++) {
17916
- if (array[i] instanceof _ParseObject.default && array[i].className === object.className && array[i]._getId() === object._getId()) {
18200
+ if (array[i] instanceof ParseObject && array[i].className === object.className && array[i]._getId() === object._getId()) {
17917
18201
  return true;
17918
18202
  }
17919
18203
  }
17920
18204
  return false;
17921
18205
  }
17922
- },{"./ParseObject":28,"@babel/runtime-corejs3/core-js-stable/instance/index-of":71,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/helpers/interopRequireDefault":115}],49:[function(_dereq_,module,exports){
18206
+ },{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/instance/index-of":71,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/helpers/interopRequireDefault":115}],49:[function(_dereq_,module,exports){
17923
18207
  "use strict";
17924
18208
 
17925
18209
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -17930,15 +18214,16 @@ _Object$defineProperty(exports, "__esModule", {
17930
18214
  exports.default = canBeSerialized;
17931
18215
  var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
17932
18216
  var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
18217
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
17933
18218
  var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
17934
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
17935
18219
  var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
17936
18220
  /**
17937
18221
  * @flow
17938
18222
  */
17939
-
18223
+ /*:: import type ParseObject from './ParseObject';*/
17940
18224
  function canBeSerialized(obj /*: ParseObject*/) /*: boolean*/{
17941
- if (!(obj instanceof _ParseObject.default)) {
18225
+ var ParseObject = _CoreManager.default.getParseObject();
18226
+ if (!(obj instanceof ParseObject)) {
17942
18227
  return true;
17943
18228
  }
17944
18229
  var attributes = obj.attributes;
@@ -17957,7 +18242,8 @@ function canBeSerializedHelper(value /*: any*/) /*: boolean*/{
17957
18242
  if (value instanceof _ParseRelation.default) {
17958
18243
  return true;
17959
18244
  }
17960
- if (value instanceof _ParseObject.default) {
18245
+ var ParseObject = _CoreManager.default.getParseObject();
18246
+ if (value instanceof ParseObject) {
17961
18247
  return !!value.id;
17962
18248
  }
17963
18249
  if (value instanceof _ParseFile.default) {
@@ -17981,7 +18267,7 @@ function canBeSerializedHelper(value /*: any*/) /*: boolean*/{
17981
18267
  }
17982
18268
  return true;
17983
18269
  }
17984
- },{"./ParseFile":24,"./ParseObject":28,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],50:[function(_dereq_,module,exports){
18270
+ },{"./CoreManager":4,"./ParseFile":24,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],50:[function(_dereq_,module,exports){
17985
18271
  "use strict";
17986
18272
 
17987
18273
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -17993,16 +18279,16 @@ exports.default = decode;
17993
18279
  var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
17994
18280
  var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
17995
18281
  var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
18282
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
17996
18283
  var _ParseACL = _interopRequireDefault(_dereq_("./ParseACL"));
17997
18284
  var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
17998
18285
  var _ParseGeoPoint = _interopRequireDefault(_dereq_("./ParseGeoPoint"));
17999
18286
  var _ParsePolygon = _interopRequireDefault(_dereq_("./ParsePolygon"));
18000
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
18001
- var _ParseOp = _dereq_("./ParseOp");
18002
18287
  var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
18003
18288
  /**
18004
18289
  * @flow
18005
18290
  */
18291
+
18006
18292
  // eslint-disable-line no-unused-vars
18007
18293
 
18008
18294
  function decode(value /*: any*/) /*: any*/{
@@ -18017,13 +18303,16 @@ function decode(value /*: any*/) /*: any*/{
18017
18303
  return dup;
18018
18304
  }
18019
18305
  if (typeof value.__op === 'string') {
18020
- return (0, _ParseOp.opFromJSON)(value);
18306
+ var _CoreManager$getParse = _CoreManager.default.getParseOp(),
18307
+ opFromJSON = _CoreManager$getParse.opFromJSON;
18308
+ return opFromJSON(value);
18021
18309
  }
18310
+ var ParseObject = _CoreManager.default.getParseObject();
18022
18311
  if (value.__type === 'Pointer' && value.className) {
18023
- return _ParseObject.default.fromJSON(value);
18312
+ return ParseObject.fromJSON(value);
18024
18313
  }
18025
18314
  if (value.__type === 'Object' && value.className) {
18026
- return _ParseObject.default.fromJSON(value);
18315
+ return ParseObject.fromJSON(value);
18027
18316
  }
18028
18317
  if (value.__type === 'Relation') {
18029
18318
  // The parent and key fields will be populated by the parent
@@ -18052,7 +18341,7 @@ function decode(value /*: any*/) /*: any*/{
18052
18341
  }
18053
18342
  return copy;
18054
18343
  }
18055
- },{"./ParseACL":20,"./ParseFile":24,"./ParseGeoPoint":25,"./ParseObject":28,"./ParseOp":29,"./ParsePolygon":30,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/instance/for-each":69,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],51:[function(_dereq_,module,exports){
18344
+ },{"./CoreManager":4,"./ParseACL":20,"./ParseFile":24,"./ParseGeoPoint":25,"./ParsePolygon":30,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/instance/for-each":69,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],51:[function(_dereq_,module,exports){
18056
18345
  "use strict";
18057
18346
 
18058
18347
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -18068,19 +18357,19 @@ var _startsWith = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js
18068
18357
  var _concat = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/concat"));
18069
18358
  var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
18070
18359
  var _map = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/map"));
18360
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
18071
18361
  var _ParseACL = _interopRequireDefault(_dereq_("./ParseACL"));
18072
18362
  var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
18073
18363
  var _ParseGeoPoint = _interopRequireDefault(_dereq_("./ParseGeoPoint"));
18074
18364
  var _ParsePolygon = _interopRequireDefault(_dereq_("./ParsePolygon"));
18075
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
18076
- var _ParseOp = _dereq_("./ParseOp");
18077
18365
  var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
18078
18366
  /**
18079
18367
  * @flow
18080
18368
  */
18081
18369
 
18082
18370
  function encode(value /*: mixed*/, disallowObjects /*: boolean*/, forcePointers /*: boolean*/, seen /*: Array<mixed>*/, offline /*: boolean*/) /*: any*/{
18083
- if (value instanceof _ParseObject.default) {
18371
+ var ParseObject = _CoreManager.default.getParseObject();
18372
+ if (value instanceof ParseObject) {
18084
18373
  if (disallowObjects) {
18085
18374
  throw new Error('Parse Objects not allowed here');
18086
18375
  }
@@ -18095,7 +18384,9 @@ function encode(value /*: mixed*/, disallowObjects /*: boolean*/, forcePointers
18095
18384
  seen = (0, _concat.default)(seen).call(seen, seenEntry);
18096
18385
  return value._toFullJSON(seen, offline);
18097
18386
  }
18098
- if (value instanceof _ParseOp.Op || value instanceof _ParseACL.default || value instanceof _ParseGeoPoint.default || value instanceof _ParsePolygon.default || value instanceof _ParseRelation.default) {
18387
+ var _CoreManager$getParse = _CoreManager.default.getParseOp(),
18388
+ Op = _CoreManager$getParse.Op;
18389
+ if (value instanceof Op || value instanceof _ParseACL.default || value instanceof _ParseGeoPoint.default || value instanceof _ParsePolygon.default || value instanceof _ParseRelation.default) {
18099
18390
  return value.toJSON();
18100
18391
  }
18101
18392
  if (value instanceof _ParseFile.default) {
@@ -18133,7 +18424,7 @@ function encode(value /*: mixed*/, disallowObjects /*: boolean*/, forcePointers
18133
18424
  function _default(value /*: mixed*/, disallowObjects /*:: ?: boolean*/, forcePointers /*:: ?: boolean*/, seen /*:: ?: Array<mixed>*/, offline /*:: ?: boolean*/) /*: any*/{
18134
18425
  return encode(value, !!disallowObjects, !!forcePointers, seen || [], offline);
18135
18426
  }
18136
- },{"./ParseACL":20,"./ParseFile":24,"./ParseGeoPoint":25,"./ParseObject":28,"./ParseOp":29,"./ParsePolygon":30,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/instance/concat":63,"@babel/runtime-corejs3/core-js-stable/instance/index-of":71,"@babel/runtime-corejs3/core-js-stable/instance/map":73,"@babel/runtime-corejs3/core-js-stable/instance/starts-with":78,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/keys":93,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],52:[function(_dereq_,module,exports){
18427
+ },{"./CoreManager":4,"./ParseACL":20,"./ParseFile":24,"./ParseGeoPoint":25,"./ParsePolygon":30,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/instance/concat":63,"@babel/runtime-corejs3/core-js-stable/instance/index-of":71,"@babel/runtime-corejs3/core-js-stable/instance/map":73,"@babel/runtime-corejs3/core-js-stable/instance/starts-with":78,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/keys":93,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],52:[function(_dereq_,module,exports){
18137
18428
  "use strict";
18138
18429
 
18139
18430
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -18145,10 +18436,10 @@ exports.default = equals;
18145
18436
  var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
18146
18437
  var _keys = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/object/keys"));
18147
18438
  var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
18439
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
18148
18440
  var _ParseACL = _interopRequireDefault(_dereq_("./ParseACL"));
18149
18441
  var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
18150
18442
  var _ParseGeoPoint = _interopRequireDefault(_dereq_("./ParseGeoPoint"));
18151
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
18152
18443
  function equals(a, b) {
18153
18444
  var toString = Object.prototype.toString;
18154
18445
  if (toString.call(a) === '[object Date]' || toString.call(b) === '[object Date]') {
@@ -18177,10 +18468,11 @@ function equals(a, b) {
18177
18468
  }
18178
18469
  return true;
18179
18470
  }
18180
- if (a instanceof _ParseACL.default || a instanceof _ParseFile.default || a instanceof _ParseGeoPoint.default || a instanceof _ParseObject.default) {
18471
+ var ParseObject = _CoreManager.default.getParseObject();
18472
+ if (a instanceof _ParseACL.default || a instanceof _ParseFile.default || a instanceof _ParseGeoPoint.default || a instanceof ParseObject) {
18181
18473
  return a.equals(b);
18182
18474
  }
18183
- if (b instanceof _ParseObject.default) {
18475
+ if (b instanceof ParseObject) {
18184
18476
  if (a.__type === 'Object' || a.__type === 'Pointer') {
18185
18477
  return a.objectId === b.id && a.className === b.className;
18186
18478
  }
@@ -18195,7 +18487,7 @@ function equals(a, b) {
18195
18487
  }
18196
18488
  return true;
18197
18489
  }
18198
- },{"./ParseACL":20,"./ParseFile":24,"./ParseGeoPoint":25,"./ParseObject":28,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/keys":93,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],53:[function(_dereq_,module,exports){
18490
+ },{"./CoreManager":4,"./ParseACL":20,"./ParseFile":24,"./ParseGeoPoint":25,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/core-js-stable/object/keys":93,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],53:[function(_dereq_,module,exports){
18199
18491
  "use strict";
18200
18492
 
18201
18493
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -18360,7 +18652,7 @@ exports.default = unique;
18360
18652
  var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
18361
18653
  var _indexOf = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
18362
18654
  var _arrayContainsObject = _interopRequireDefault(_dereq_("./arrayContainsObject"));
18363
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
18655
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
18364
18656
  /**
18365
18657
  * @flow
18366
18658
  */
@@ -18368,7 +18660,8 @@ var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
18368
18660
  function unique /*:: <T>*/(arr /*: Array<T>*/) /*: Array<T>*/{
18369
18661
  var uniques = [];
18370
18662
  (0, _forEach.default)(arr).call(arr, function (value) {
18371
- if (value instanceof _ParseObject.default) {
18663
+ var ParseObject = _CoreManager.default.getParseObject();
18664
+ if (value instanceof ParseObject) {
18372
18665
  if (!(0, _arrayContainsObject.default)(uniques, value)) {
18373
18666
  uniques.push(value);
18374
18667
  }
@@ -18380,7 +18673,7 @@ function unique /*:: <T>*/(arr /*: Array<T>*/) /*: Array<T>*/{
18380
18673
  });
18381
18674
  return uniques;
18382
18675
  }
18383
- },{"./ParseObject":28,"./arrayContainsObject":48,"@babel/runtime-corejs3/core-js-stable/instance/for-each":69,"@babel/runtime-corejs3/core-js-stable/instance/index-of":71,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/helpers/interopRequireDefault":115}],58:[function(_dereq_,module,exports){
18676
+ },{"./CoreManager":4,"./arrayContainsObject":48,"@babel/runtime-corejs3/core-js-stable/instance/for-each":69,"@babel/runtime-corejs3/core-js-stable/instance/index-of":71,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/helpers/interopRequireDefault":115}],58:[function(_dereq_,module,exports){
18384
18677
  "use strict";
18385
18678
 
18386
18679
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -18394,12 +18687,13 @@ var _indexOf = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-st
18394
18687
  var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
18395
18688
  var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
18396
18689
  var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
18690
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
18397
18691
  var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
18398
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
18399
18692
  var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
18400
18693
  /**
18401
18694
  * @flow
18402
18695
  */
18696
+ /*:: import type ParseObject from './ParseObject';*/
18403
18697
  /*:: type EncounterMap = {
18404
18698
  objects: { [identifier: string]: ParseObject | boolean },
18405
18699
  files: Array<ParseFile>,
@@ -18434,7 +18728,8 @@ function unsavedChildren(obj /*: ParseObject*/, allowDeepUnsaved /*:: ?: boolean
18434
18728
  return (0, _concat.default)(unsaved).call(unsaved, encountered.files);
18435
18729
  }
18436
18730
  function traverse(obj /*: ParseObject*/, encountered /*: EncounterMap*/, shouldThrow /*: boolean*/, allowDeepUnsaved /*: boolean*/) {
18437
- if (obj instanceof _ParseObject.default) {
18731
+ var ParseObject = _CoreManager.default.getParseObject();
18732
+ if (obj instanceof ParseObject) {
18438
18733
  if (!obj.id && shouldThrow) {
18439
18734
  throw new Error('Cannot create a pointer to an unsaved Object.');
18440
18735
  }
@@ -18473,24 +18768,31 @@ function traverse(obj /*: ParseObject*/, encountered /*: EncounterMap*/, shouldT
18473
18768
  }
18474
18769
  }
18475
18770
  }
18476
- },{"./ParseFile":24,"./ParseObject":28,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/instance/concat":63,"@babel/runtime-corejs3/core-js-stable/instance/for-each":69,"@babel/runtime-corejs3/core-js-stable/instance/index-of":71,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],59:[function(_dereq_,module,exports){
18771
+ },{"./CoreManager":4,"./ParseFile":24,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":61,"@babel/runtime-corejs3/core-js-stable/instance/concat":63,"@babel/runtime-corejs3/core-js-stable/instance/for-each":69,"@babel/runtime-corejs3/core-js-stable/instance/index-of":71,"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"@babel/runtime-corejs3/helpers/interopRequireDefault":115,"@babel/runtime-corejs3/helpers/typeof":130}],59:[function(_dereq_,module,exports){
18477
18772
  "use strict";
18478
18773
 
18479
- var uuid = null;
18774
+ var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
18775
+ _Object$defineProperty(exports, "__esModule", {
18776
+ value: true
18777
+ });
18778
+ exports.default = void 0;
18779
+ var _uuid = _dereq_("uuid");
18780
+ var uuid /*: () => string*/ = null;
18480
18781
  uuid = function () {
18481
- var s = [];
18782
+ var s /*: string[]*/ = [];
18482
18783
  var hexDigits = '0123456789abcdef';
18483
18784
  for (var i = 0; i < 36; i++) {
18484
18785
  s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
18485
18786
  }
18486
18787
  s[14] = '4'; // bits 12-15 of the time_hi_and_version field to 0010
18487
- s[19] = hexDigits.substr(s[19] & 0x3 | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
18788
+ s[19] = hexDigits.substr(Number(s[19]) & 0x3 | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
18488
18789
  s[8] = s[13] = s[18] = s[23] = '-';
18489
18790
  return s.join('');
18490
18791
  };
18491
- var _require, v4;
18492
18792
  module.exports = uuid;
18493
- },{}],60:[function(_dereq_,module,exports){
18793
+ var _default = uuid;
18794
+ exports.default = _default;
18795
+ },{"@babel/runtime-corejs3/core-js-stable/object/define-property":86,"uuid":626}],60:[function(_dereq_,module,exports){
18494
18796
  module.exports = _dereq_("core-js-pure/stable/array/from");
18495
18797
  },{"core-js-pure/stable/array/from":562}],61:[function(_dereq_,module,exports){
18496
18798
  module.exports = _dereq_("core-js-pure/stable/array/is-array");
@@ -30894,5 +31196,868 @@ exports.setMany = setMany;
30894
31196
  exports.update = update;
30895
31197
  exports.values = values;
30896
31198
 
30897
- },{}]},{},[19])(19)
31199
+ },{}],626:[function(_dereq_,module,exports){
31200
+ "use strict";
31201
+
31202
+ Object.defineProperty(exports, "__esModule", {
31203
+ value: true
31204
+ });
31205
+ Object.defineProperty(exports, "NIL", {
31206
+ enumerable: true,
31207
+ get: function () {
31208
+ return _nil.default;
31209
+ }
31210
+ });
31211
+ Object.defineProperty(exports, "parse", {
31212
+ enumerable: true,
31213
+ get: function () {
31214
+ return _parse.default;
31215
+ }
31216
+ });
31217
+ Object.defineProperty(exports, "stringify", {
31218
+ enumerable: true,
31219
+ get: function () {
31220
+ return _stringify.default;
31221
+ }
31222
+ });
31223
+ Object.defineProperty(exports, "v1", {
31224
+ enumerable: true,
31225
+ get: function () {
31226
+ return _v.default;
31227
+ }
31228
+ });
31229
+ Object.defineProperty(exports, "v3", {
31230
+ enumerable: true,
31231
+ get: function () {
31232
+ return _v2.default;
31233
+ }
31234
+ });
31235
+ Object.defineProperty(exports, "v4", {
31236
+ enumerable: true,
31237
+ get: function () {
31238
+ return _v3.default;
31239
+ }
31240
+ });
31241
+ Object.defineProperty(exports, "v5", {
31242
+ enumerable: true,
31243
+ get: function () {
31244
+ return _v4.default;
31245
+ }
31246
+ });
31247
+ Object.defineProperty(exports, "validate", {
31248
+ enumerable: true,
31249
+ get: function () {
31250
+ return _validate.default;
31251
+ }
31252
+ });
31253
+ Object.defineProperty(exports, "version", {
31254
+ enumerable: true,
31255
+ get: function () {
31256
+ return _version.default;
31257
+ }
31258
+ });
31259
+
31260
+ var _v = _interopRequireDefault(_dereq_("./v1.js"));
31261
+
31262
+ var _v2 = _interopRequireDefault(_dereq_("./v3.js"));
31263
+
31264
+ var _v3 = _interopRequireDefault(_dereq_("./v4.js"));
31265
+
31266
+ var _v4 = _interopRequireDefault(_dereq_("./v5.js"));
31267
+
31268
+ var _nil = _interopRequireDefault(_dereq_("./nil.js"));
31269
+
31270
+ var _version = _interopRequireDefault(_dereq_("./version.js"));
31271
+
31272
+ var _validate = _interopRequireDefault(_dereq_("./validate.js"));
31273
+
31274
+ var _stringify = _interopRequireDefault(_dereq_("./stringify.js"));
31275
+
31276
+ var _parse = _interopRequireDefault(_dereq_("./parse.js"));
31277
+
31278
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31279
+ },{"./nil.js":629,"./parse.js":630,"./stringify.js":634,"./v1.js":635,"./v3.js":636,"./v4.js":638,"./v5.js":639,"./validate.js":640,"./version.js":641}],627:[function(_dereq_,module,exports){
31280
+ "use strict";
31281
+
31282
+ Object.defineProperty(exports, "__esModule", {
31283
+ value: true
31284
+ });
31285
+ exports.default = void 0;
31286
+
31287
+ /*
31288
+ * Browser-compatible JavaScript MD5
31289
+ *
31290
+ * Modification of JavaScript MD5
31291
+ * https://github.com/blueimp/JavaScript-MD5
31292
+ *
31293
+ * Copyright 2011, Sebastian Tschan
31294
+ * https://blueimp.net
31295
+ *
31296
+ * Licensed under the MIT license:
31297
+ * https://opensource.org/licenses/MIT
31298
+ *
31299
+ * Based on
31300
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
31301
+ * Digest Algorithm, as defined in RFC 1321.
31302
+ * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
31303
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
31304
+ * Distributed under the BSD License
31305
+ * See http://pajhome.org.uk/crypt/md5 for more info.
31306
+ */
31307
+ function md5(bytes) {
31308
+ if (typeof bytes === 'string') {
31309
+ const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
31310
+
31311
+ bytes = new Uint8Array(msg.length);
31312
+
31313
+ for (let i = 0; i < msg.length; ++i) {
31314
+ bytes[i] = msg.charCodeAt(i);
31315
+ }
31316
+ }
31317
+
31318
+ return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
31319
+ }
31320
+ /*
31321
+ * Convert an array of little-endian words to an array of bytes
31322
+ */
31323
+
31324
+
31325
+ function md5ToHexEncodedArray(input) {
31326
+ const output = [];
31327
+ const length32 = input.length * 32;
31328
+ const hexTab = '0123456789abcdef';
31329
+
31330
+ for (let i = 0; i < length32; i += 8) {
31331
+ const x = input[i >> 5] >>> i % 32 & 0xff;
31332
+ const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
31333
+ output.push(hex);
31334
+ }
31335
+
31336
+ return output;
31337
+ }
31338
+ /**
31339
+ * Calculate output length with padding and bit length
31340
+ */
31341
+
31342
+
31343
+ function getOutputLength(inputLength8) {
31344
+ return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
31345
+ }
31346
+ /*
31347
+ * Calculate the MD5 of an array of little-endian words, and a bit length.
31348
+ */
31349
+
31350
+
31351
+ function wordsToMd5(x, len) {
31352
+ /* append padding */
31353
+ x[len >> 5] |= 0x80 << len % 32;
31354
+ x[getOutputLength(len) - 1] = len;
31355
+ let a = 1732584193;
31356
+ let b = -271733879;
31357
+ let c = -1732584194;
31358
+ let d = 271733878;
31359
+
31360
+ for (let i = 0; i < x.length; i += 16) {
31361
+ const olda = a;
31362
+ const oldb = b;
31363
+ const oldc = c;
31364
+ const oldd = d;
31365
+ a = md5ff(a, b, c, d, x[i], 7, -680876936);
31366
+ d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
31367
+ c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
31368
+ b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
31369
+ a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
31370
+ d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
31371
+ c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
31372
+ b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
31373
+ a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
31374
+ d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
31375
+ c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
31376
+ b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
31377
+ a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
31378
+ d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
31379
+ c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
31380
+ b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
31381
+ a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
31382
+ d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
31383
+ c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
31384
+ b = md5gg(b, c, d, a, x[i], 20, -373897302);
31385
+ a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
31386
+ d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
31387
+ c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
31388
+ b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
31389
+ a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
31390
+ d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
31391
+ c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
31392
+ b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
31393
+ a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
31394
+ d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
31395
+ c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
31396
+ b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
31397
+ a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
31398
+ d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
31399
+ c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
31400
+ b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
31401
+ a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
31402
+ d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
31403
+ c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
31404
+ b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
31405
+ a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
31406
+ d = md5hh(d, a, b, c, x[i], 11, -358537222);
31407
+ c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
31408
+ b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
31409
+ a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
31410
+ d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
31411
+ c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
31412
+ b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
31413
+ a = md5ii(a, b, c, d, x[i], 6, -198630844);
31414
+ d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
31415
+ c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
31416
+ b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
31417
+ a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
31418
+ d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
31419
+ c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
31420
+ b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
31421
+ a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
31422
+ d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
31423
+ c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
31424
+ b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
31425
+ a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
31426
+ d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
31427
+ c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
31428
+ b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
31429
+ a = safeAdd(a, olda);
31430
+ b = safeAdd(b, oldb);
31431
+ c = safeAdd(c, oldc);
31432
+ d = safeAdd(d, oldd);
31433
+ }
31434
+
31435
+ return [a, b, c, d];
31436
+ }
31437
+ /*
31438
+ * Convert an array bytes to an array of little-endian words
31439
+ * Characters >255 have their high-byte silently ignored.
31440
+ */
31441
+
31442
+
31443
+ function bytesToWords(input) {
31444
+ if (input.length === 0) {
31445
+ return [];
31446
+ }
31447
+
31448
+ const length8 = input.length * 8;
31449
+ const output = new Uint32Array(getOutputLength(length8));
31450
+
31451
+ for (let i = 0; i < length8; i += 8) {
31452
+ output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;
31453
+ }
31454
+
31455
+ return output;
31456
+ }
31457
+ /*
31458
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
31459
+ * to work around bugs in some JS interpreters.
31460
+ */
31461
+
31462
+
31463
+ function safeAdd(x, y) {
31464
+ const lsw = (x & 0xffff) + (y & 0xffff);
31465
+ const msw = (x >> 16) + (y >> 16) + (lsw >> 16);
31466
+ return msw << 16 | lsw & 0xffff;
31467
+ }
31468
+ /*
31469
+ * Bitwise rotate a 32-bit number to the left.
31470
+ */
31471
+
31472
+
31473
+ function bitRotateLeft(num, cnt) {
31474
+ return num << cnt | num >>> 32 - cnt;
31475
+ }
31476
+ /*
31477
+ * These functions implement the four basic operations the algorithm uses.
31478
+ */
31479
+
31480
+
31481
+ function md5cmn(q, a, b, x, s, t) {
31482
+ return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
31483
+ }
31484
+
31485
+ function md5ff(a, b, c, d, x, s, t) {
31486
+ return md5cmn(b & c | ~b & d, a, b, x, s, t);
31487
+ }
31488
+
31489
+ function md5gg(a, b, c, d, x, s, t) {
31490
+ return md5cmn(b & d | c & ~d, a, b, x, s, t);
31491
+ }
31492
+
31493
+ function md5hh(a, b, c, d, x, s, t) {
31494
+ return md5cmn(b ^ c ^ d, a, b, x, s, t);
31495
+ }
31496
+
31497
+ function md5ii(a, b, c, d, x, s, t) {
31498
+ return md5cmn(c ^ (b | ~d), a, b, x, s, t);
31499
+ }
31500
+
31501
+ var _default = md5;
31502
+ exports.default = _default;
31503
+ },{}],628:[function(_dereq_,module,exports){
31504
+ "use strict";
31505
+
31506
+ Object.defineProperty(exports, "__esModule", {
31507
+ value: true
31508
+ });
31509
+ exports.default = void 0;
31510
+ const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
31511
+ var _default = {
31512
+ randomUUID
31513
+ };
31514
+ exports.default = _default;
31515
+ },{}],629:[function(_dereq_,module,exports){
31516
+ "use strict";
31517
+
31518
+ Object.defineProperty(exports, "__esModule", {
31519
+ value: true
31520
+ });
31521
+ exports.default = void 0;
31522
+ var _default = '00000000-0000-0000-0000-000000000000';
31523
+ exports.default = _default;
31524
+ },{}],630:[function(_dereq_,module,exports){
31525
+ "use strict";
31526
+
31527
+ Object.defineProperty(exports, "__esModule", {
31528
+ value: true
31529
+ });
31530
+ exports.default = void 0;
31531
+
31532
+ var _validate = _interopRequireDefault(_dereq_("./validate.js"));
31533
+
31534
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31535
+
31536
+ function parse(uuid) {
31537
+ if (!(0, _validate.default)(uuid)) {
31538
+ throw TypeError('Invalid UUID');
31539
+ }
31540
+
31541
+ let v;
31542
+ const arr = new Uint8Array(16); // Parse ########-....-....-....-............
31543
+
31544
+ arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
31545
+ arr[1] = v >>> 16 & 0xff;
31546
+ arr[2] = v >>> 8 & 0xff;
31547
+ arr[3] = v & 0xff; // Parse ........-####-....-....-............
31548
+
31549
+ arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
31550
+ arr[5] = v & 0xff; // Parse ........-....-####-....-............
31551
+
31552
+ arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
31553
+ arr[7] = v & 0xff; // Parse ........-....-....-####-............
31554
+
31555
+ arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
31556
+ arr[9] = v & 0xff; // Parse ........-....-....-....-############
31557
+ // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
31558
+
31559
+ arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
31560
+ arr[11] = v / 0x100000000 & 0xff;
31561
+ arr[12] = v >>> 24 & 0xff;
31562
+ arr[13] = v >>> 16 & 0xff;
31563
+ arr[14] = v >>> 8 & 0xff;
31564
+ arr[15] = v & 0xff;
31565
+ return arr;
31566
+ }
31567
+
31568
+ var _default = parse;
31569
+ exports.default = _default;
31570
+ },{"./validate.js":640}],631:[function(_dereq_,module,exports){
31571
+ "use strict";
31572
+
31573
+ Object.defineProperty(exports, "__esModule", {
31574
+ value: true
31575
+ });
31576
+ exports.default = void 0;
31577
+ var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
31578
+ exports.default = _default;
31579
+ },{}],632:[function(_dereq_,module,exports){
31580
+ "use strict";
31581
+
31582
+ Object.defineProperty(exports, "__esModule", {
31583
+ value: true
31584
+ });
31585
+ exports.default = rng;
31586
+ // Unique ID creation requires a high quality random # generator. In the browser we therefore
31587
+ // require the crypto API and do not support built-in fallback to lower quality random number
31588
+ // generators (like Math.random()).
31589
+ let getRandomValues;
31590
+ const rnds8 = new Uint8Array(16);
31591
+
31592
+ function rng() {
31593
+ // lazy load so that environments that need to polyfill have a chance to do so
31594
+ if (!getRandomValues) {
31595
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
31596
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
31597
+
31598
+ if (!getRandomValues) {
31599
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
31600
+ }
31601
+ }
31602
+
31603
+ return getRandomValues(rnds8);
31604
+ }
31605
+ },{}],633:[function(_dereq_,module,exports){
31606
+ "use strict";
31607
+
31608
+ Object.defineProperty(exports, "__esModule", {
31609
+ value: true
31610
+ });
31611
+ exports.default = void 0;
31612
+
31613
+ // Adapted from Chris Veness' SHA1 code at
31614
+ // http://www.movable-type.co.uk/scripts/sha1.html
31615
+ function f(s, x, y, z) {
31616
+ switch (s) {
31617
+ case 0:
31618
+ return x & y ^ ~x & z;
31619
+
31620
+ case 1:
31621
+ return x ^ y ^ z;
31622
+
31623
+ case 2:
31624
+ return x & y ^ x & z ^ y & z;
31625
+
31626
+ case 3:
31627
+ return x ^ y ^ z;
31628
+ }
31629
+ }
31630
+
31631
+ function ROTL(x, n) {
31632
+ return x << n | x >>> 32 - n;
31633
+ }
31634
+
31635
+ function sha1(bytes) {
31636
+ const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
31637
+ const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
31638
+
31639
+ if (typeof bytes === 'string') {
31640
+ const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
31641
+
31642
+ bytes = [];
31643
+
31644
+ for (let i = 0; i < msg.length; ++i) {
31645
+ bytes.push(msg.charCodeAt(i));
31646
+ }
31647
+ } else if (!Array.isArray(bytes)) {
31648
+ // Convert Array-like to Array
31649
+ bytes = Array.prototype.slice.call(bytes);
31650
+ }
31651
+
31652
+ bytes.push(0x80);
31653
+ const l = bytes.length / 4 + 2;
31654
+ const N = Math.ceil(l / 16);
31655
+ const M = new Array(N);
31656
+
31657
+ for (let i = 0; i < N; ++i) {
31658
+ const arr = new Uint32Array(16);
31659
+
31660
+ for (let j = 0; j < 16; ++j) {
31661
+ arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];
31662
+ }
31663
+
31664
+ M[i] = arr;
31665
+ }
31666
+
31667
+ M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
31668
+ M[N - 1][14] = Math.floor(M[N - 1][14]);
31669
+ M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;
31670
+
31671
+ for (let i = 0; i < N; ++i) {
31672
+ const W = new Uint32Array(80);
31673
+
31674
+ for (let t = 0; t < 16; ++t) {
31675
+ W[t] = M[i][t];
31676
+ }
31677
+
31678
+ for (let t = 16; t < 80; ++t) {
31679
+ W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);
31680
+ }
31681
+
31682
+ let a = H[0];
31683
+ let b = H[1];
31684
+ let c = H[2];
31685
+ let d = H[3];
31686
+ let e = H[4];
31687
+
31688
+ for (let t = 0; t < 80; ++t) {
31689
+ const s = Math.floor(t / 20);
31690
+ const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;
31691
+ e = d;
31692
+ d = c;
31693
+ c = ROTL(b, 30) >>> 0;
31694
+ b = a;
31695
+ a = T;
31696
+ }
31697
+
31698
+ H[0] = H[0] + a >>> 0;
31699
+ H[1] = H[1] + b >>> 0;
31700
+ H[2] = H[2] + c >>> 0;
31701
+ H[3] = H[3] + d >>> 0;
31702
+ H[4] = H[4] + e >>> 0;
31703
+ }
31704
+
31705
+ return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];
31706
+ }
31707
+
31708
+ var _default = sha1;
31709
+ exports.default = _default;
31710
+ },{}],634:[function(_dereq_,module,exports){
31711
+ "use strict";
31712
+
31713
+ Object.defineProperty(exports, "__esModule", {
31714
+ value: true
31715
+ });
31716
+ exports.default = void 0;
31717
+ exports.unsafeStringify = unsafeStringify;
31718
+
31719
+ var _validate = _interopRequireDefault(_dereq_("./validate.js"));
31720
+
31721
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31722
+
31723
+ /**
31724
+ * Convert array of 16 byte values to UUID string format of the form:
31725
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
31726
+ */
31727
+ const byteToHex = [];
31728
+
31729
+ for (let i = 0; i < 256; ++i) {
31730
+ byteToHex.push((i + 0x100).toString(16).slice(1));
31731
+ }
31732
+
31733
+ function unsafeStringify(arr, offset = 0) {
31734
+ // Note: Be careful editing this code! It's been tuned for performance
31735
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
31736
+ return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
31737
+ }
31738
+
31739
+ function stringify(arr, offset = 0) {
31740
+ const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
31741
+ // of the following:
31742
+ // - One or more input array values don't map to a hex octet (leading to
31743
+ // "undefined" in the uuid)
31744
+ // - Invalid input values for the RFC `version` or `variant` fields
31745
+
31746
+ if (!(0, _validate.default)(uuid)) {
31747
+ throw TypeError('Stringified UUID is invalid');
31748
+ }
31749
+
31750
+ return uuid;
31751
+ }
31752
+
31753
+ var _default = stringify;
31754
+ exports.default = _default;
31755
+ },{"./validate.js":640}],635:[function(_dereq_,module,exports){
31756
+ "use strict";
31757
+
31758
+ Object.defineProperty(exports, "__esModule", {
31759
+ value: true
31760
+ });
31761
+ exports.default = void 0;
31762
+
31763
+ var _rng = _interopRequireDefault(_dereq_("./rng.js"));
31764
+
31765
+ var _stringify = _dereq_("./stringify.js");
31766
+
31767
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31768
+
31769
+ // **`v1()` - Generate time-based UUID**
31770
+ //
31771
+ // Inspired by https://github.com/LiosK/UUID.js
31772
+ // and http://docs.python.org/library/uuid.html
31773
+ let _nodeId;
31774
+
31775
+ let _clockseq; // Previous uuid creation time
31776
+
31777
+
31778
+ let _lastMSecs = 0;
31779
+ let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
31780
+
31781
+ function v1(options, buf, offset) {
31782
+ let i = buf && offset || 0;
31783
+ const b = buf || new Array(16);
31784
+ options = options || {};
31785
+ let node = options.node || _nodeId;
31786
+ let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
31787
+ // specified. We do this lazily to minimize issues related to insufficient
31788
+ // system entropy. See #189
31789
+
31790
+ if (node == null || clockseq == null) {
31791
+ const seedBytes = options.random || (options.rng || _rng.default)();
31792
+
31793
+ if (node == null) {
31794
+ // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
31795
+ node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
31796
+ }
31797
+
31798
+ if (clockseq == null) {
31799
+ // Per 4.2.2, randomize (14 bit) clockseq
31800
+ clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
31801
+ }
31802
+ } // UUID timestamps are 100 nano-second units since the Gregorian epoch,
31803
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
31804
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
31805
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
31806
+
31807
+
31808
+ let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
31809
+ // cycle to simulate higher resolution clock
31810
+
31811
+ let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
31812
+
31813
+ const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
31814
+
31815
+ if (dt < 0 && options.clockseq === undefined) {
31816
+ clockseq = clockseq + 1 & 0x3fff;
31817
+ } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
31818
+ // time interval
31819
+
31820
+
31821
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
31822
+ nsecs = 0;
31823
+ } // Per 4.2.1.2 Throw error if too many uuids are requested
31824
+
31825
+
31826
+ if (nsecs >= 10000) {
31827
+ throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
31828
+ }
31829
+
31830
+ _lastMSecs = msecs;
31831
+ _lastNSecs = nsecs;
31832
+ _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
31833
+
31834
+ msecs += 12219292800000; // `time_low`
31835
+
31836
+ const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
31837
+ b[i++] = tl >>> 24 & 0xff;
31838
+ b[i++] = tl >>> 16 & 0xff;
31839
+ b[i++] = tl >>> 8 & 0xff;
31840
+ b[i++] = tl & 0xff; // `time_mid`
31841
+
31842
+ const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
31843
+ b[i++] = tmh >>> 8 & 0xff;
31844
+ b[i++] = tmh & 0xff; // `time_high_and_version`
31845
+
31846
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
31847
+
31848
+ b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
31849
+
31850
+ b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`
31851
+
31852
+ b[i++] = clockseq & 0xff; // `node`
31853
+
31854
+ for (let n = 0; n < 6; ++n) {
31855
+ b[i + n] = node[n];
31856
+ }
31857
+
31858
+ return buf || (0, _stringify.unsafeStringify)(b);
31859
+ }
31860
+
31861
+ var _default = v1;
31862
+ exports.default = _default;
31863
+ },{"./rng.js":632,"./stringify.js":634}],636:[function(_dereq_,module,exports){
31864
+ "use strict";
31865
+
31866
+ Object.defineProperty(exports, "__esModule", {
31867
+ value: true
31868
+ });
31869
+ exports.default = void 0;
31870
+
31871
+ var _v = _interopRequireDefault(_dereq_("./v35.js"));
31872
+
31873
+ var _md = _interopRequireDefault(_dereq_("./md5.js"));
31874
+
31875
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31876
+
31877
+ const v3 = (0, _v.default)('v3', 0x30, _md.default);
31878
+ var _default = v3;
31879
+ exports.default = _default;
31880
+ },{"./md5.js":627,"./v35.js":637}],637:[function(_dereq_,module,exports){
31881
+ "use strict";
31882
+
31883
+ Object.defineProperty(exports, "__esModule", {
31884
+ value: true
31885
+ });
31886
+ exports.URL = exports.DNS = void 0;
31887
+ exports.default = v35;
31888
+
31889
+ var _stringify = _dereq_("./stringify.js");
31890
+
31891
+ var _parse = _interopRequireDefault(_dereq_("./parse.js"));
31892
+
31893
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31894
+
31895
+ function stringToBytes(str) {
31896
+ str = unescape(encodeURIComponent(str)); // UTF8 escape
31897
+
31898
+ const bytes = [];
31899
+
31900
+ for (let i = 0; i < str.length; ++i) {
31901
+ bytes.push(str.charCodeAt(i));
31902
+ }
31903
+
31904
+ return bytes;
31905
+ }
31906
+
31907
+ const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
31908
+ exports.DNS = DNS;
31909
+ const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
31910
+ exports.URL = URL;
31911
+
31912
+ function v35(name, version, hashfunc) {
31913
+ function generateUUID(value, namespace, buf, offset) {
31914
+ var _namespace;
31915
+
31916
+ if (typeof value === 'string') {
31917
+ value = stringToBytes(value);
31918
+ }
31919
+
31920
+ if (typeof namespace === 'string') {
31921
+ namespace = (0, _parse.default)(namespace);
31922
+ }
31923
+
31924
+ if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {
31925
+ throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
31926
+ } // Compute hash of namespace and value, Per 4.3
31927
+ // Future: Use spread syntax when supported on all platforms, e.g. `bytes =
31928
+ // hashfunc([...namespace, ... value])`
31929
+
31930
+
31931
+ let bytes = new Uint8Array(16 + value.length);
31932
+ bytes.set(namespace);
31933
+ bytes.set(value, namespace.length);
31934
+ bytes = hashfunc(bytes);
31935
+ bytes[6] = bytes[6] & 0x0f | version;
31936
+ bytes[8] = bytes[8] & 0x3f | 0x80;
31937
+
31938
+ if (buf) {
31939
+ offset = offset || 0;
31940
+
31941
+ for (let i = 0; i < 16; ++i) {
31942
+ buf[offset + i] = bytes[i];
31943
+ }
31944
+
31945
+ return buf;
31946
+ }
31947
+
31948
+ return (0, _stringify.unsafeStringify)(bytes);
31949
+ } // Function#name is not settable on some platforms (#270)
31950
+
31951
+
31952
+ try {
31953
+ generateUUID.name = name; // eslint-disable-next-line no-empty
31954
+ } catch (err) {} // For CommonJS default export support
31955
+
31956
+
31957
+ generateUUID.DNS = DNS;
31958
+ generateUUID.URL = URL;
31959
+ return generateUUID;
31960
+ }
31961
+ },{"./parse.js":630,"./stringify.js":634}],638:[function(_dereq_,module,exports){
31962
+ "use strict";
31963
+
31964
+ Object.defineProperty(exports, "__esModule", {
31965
+ value: true
31966
+ });
31967
+ exports.default = void 0;
31968
+
31969
+ var _native = _interopRequireDefault(_dereq_("./native.js"));
31970
+
31971
+ var _rng = _interopRequireDefault(_dereq_("./rng.js"));
31972
+
31973
+ var _stringify = _dereq_("./stringify.js");
31974
+
31975
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31976
+
31977
+ function v4(options, buf, offset) {
31978
+ if (_native.default.randomUUID && !buf && !options) {
31979
+ return _native.default.randomUUID();
31980
+ }
31981
+
31982
+ options = options || {};
31983
+
31984
+ const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
31985
+
31986
+
31987
+ rnds[6] = rnds[6] & 0x0f | 0x40;
31988
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
31989
+
31990
+ if (buf) {
31991
+ offset = offset || 0;
31992
+
31993
+ for (let i = 0; i < 16; ++i) {
31994
+ buf[offset + i] = rnds[i];
31995
+ }
31996
+
31997
+ return buf;
31998
+ }
31999
+
32000
+ return (0, _stringify.unsafeStringify)(rnds);
32001
+ }
32002
+
32003
+ var _default = v4;
32004
+ exports.default = _default;
32005
+ },{"./native.js":628,"./rng.js":632,"./stringify.js":634}],639:[function(_dereq_,module,exports){
32006
+ "use strict";
32007
+
32008
+ Object.defineProperty(exports, "__esModule", {
32009
+ value: true
32010
+ });
32011
+ exports.default = void 0;
32012
+
32013
+ var _v = _interopRequireDefault(_dereq_("./v35.js"));
32014
+
32015
+ var _sha = _interopRequireDefault(_dereq_("./sha1.js"));
32016
+
32017
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
32018
+
32019
+ const v5 = (0, _v.default)('v5', 0x50, _sha.default);
32020
+ var _default = v5;
32021
+ exports.default = _default;
32022
+ },{"./sha1.js":633,"./v35.js":637}],640:[function(_dereq_,module,exports){
32023
+ "use strict";
32024
+
32025
+ Object.defineProperty(exports, "__esModule", {
32026
+ value: true
32027
+ });
32028
+ exports.default = void 0;
32029
+
32030
+ var _regex = _interopRequireDefault(_dereq_("./regex.js"));
32031
+
32032
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
32033
+
32034
+ function validate(uuid) {
32035
+ return typeof uuid === 'string' && _regex.default.test(uuid);
32036
+ }
32037
+
32038
+ var _default = validate;
32039
+ exports.default = _default;
32040
+ },{"./regex.js":631}],641:[function(_dereq_,module,exports){
32041
+ "use strict";
32042
+
32043
+ Object.defineProperty(exports, "__esModule", {
32044
+ value: true
32045
+ });
32046
+ exports.default = void 0;
32047
+
32048
+ var _validate = _interopRequireDefault(_dereq_("./validate.js"));
32049
+
32050
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
32051
+
32052
+ function version(uuid) {
32053
+ if (!(0, _validate.default)(uuid)) {
32054
+ throw TypeError('Invalid UUID');
32055
+ }
32056
+
32057
+ return parseInt(uuid.slice(14, 15), 16);
32058
+ }
32059
+
32060
+ var _default = version;
32061
+ exports.default = _default;
32062
+ },{"./validate.js":640}]},{},[19])(19)
30898
32063
  });