text: /**
   * Parse JavaScript SDK v2.0.1
   *
   * Copyright (c) 2015-present, Parse, LLC.
   * All rights reserved.
   *
   * The source tree of this library can be found at
   *   https://github.com/ParsePlatform/Parse-SDK-JS
   * This source code is licensed under the BSD-style license found in the
   * LICENSE file in the root directory of this source tree. An additional grant
   * of patent rights can be found in the PATENTS file in the same directory.
   */
  !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Parse=e()}}(function(){return function i(s,a,u){function l(t,e){if(!a[t]){if(!s[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(c)return c(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var o=a[t]={exports:{}};s[t][0].call(o.exports,function(e){return l(s[t][1][e]||e)},o,o.exports,i,s,a,u)}return a[t].exports}for(var c="function"==typeof require&&require,e=0;e<u.length;e++)l(u[e]);return l}({1:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.track=function(e,t,r){if(0===(e=(e=(e=e||"").replace(/^\s*/,"")).replace(/\s*$/,"")).length)throw new TypeError("A name for the custom event must be provided");for(var n in t)if("string"!=typeof n||"string"!=typeof t[n])throw new TypeError('track() dimensions expects keys and values of type "string".');return r=r||{},i.default.getAnalyticsController().track(e,t)};var n,o=e("./CoreManager"),i=(n=o)&&n.__esModule?n:{default:n};var s={track:function(e,t){return i.default.getRESTController().request("POST","events/"+e,{dimensions:t})}};i.default.setAnalyticsController(s)},{"./CoreManager":3}],2:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=o(e("babel-runtime/core-js/promise"));r.run=function(e,t,r){if(r=r||{},"string"!=typeof e||0===e.length)throw new TypeError("Cloud function name must be a string.");var n={};r.useMasterKey&&(n.useMasterKey=r.useMasterKey);r.sessionToken&&(n.sessionToken=r.sessionToken);return s.default.getCloudController().run(e,t,n)},r.getJobsData=function(e){return e=e||{},s.default.getCloudController().getJobsData({useMasterKey:!0})},r.startJob=function(e,t,r){if(r=r||{},"string"!=typeof e||0===e.length)throw new TypeError("Cloud job name must be a string.");return s.default.getCloudController().startJob(e,t,{useMasterKey:!0})},r.getJobStatus=function(e){return new n.default("_JobStatus").get(e,{useMasterKey:!0})};var s=o(e("./CoreManager")),a=o(e("./decode")),u=o(e("./encode")),l=o(e("./ParseError")),n=o(e("./ParseQuery"));function o(e){return e&&e.__esModule?e:{default:e}}var c={run:function(e,t,r){var n=s.default.getRESTController(),o=(0,u.default)(t,!0);return n.request("POST","functions/"+e,o,r).then(function(e){var t=(0,a.default)(e);if(t&&t.hasOwnProperty("result"))return i.default.resolve(t.result);throw new l.default(l.default.INVALID_JSON,"The server returned an invalid response.")})},getJobsData:function(e){return s.default.getRESTController().request("GET","cloud_code/jobs/data",null,e)},startJob:function(e,t,r){var n=s.default.getRESTController(),o=(0,u.default)(t,!0);return n.request("POST","jobs/"+e,o,r)}};s.default.setCloudController(c)},{"./CoreManager":3,"./ParseError":13,"./ParseQuery":21,"./decode":36,"./encode":37,"babel-runtime/core-js/promise":55}],3:[function(e,n,t){(function(e){"use strict";var r={IS_NODE:void 0!==e&&!!e.versions&&!!e.versions.node&&!e.versions.electron,REQUEST_ATTEMPT_LIMIT:5,SERVER_URL:"https://api.parse.com/1",LIVEQUERY_SERVER_URL:null,VERSION:"js2.0.1",APPLICATION_ID:null,JAVASCRIPT_KEY:null,MASTER_KEY:null,USE_MASTER_KEY:!1,PERFORM_USER_REWRITE:!0,FORCE_REVOCABLE_SESSION:!1};function t(t,e,r){e.forEach(function(e){if("function"!=typeof r[e])throw new Error(t+" must implement "+e+"()")})}n.exports={get:function(e){if(r.hasOwnProperty(e))return r[e];throw new Error("Configuration key not found: "+e)},set:function(e,t){r[e]=t},setAnalyticsController:function(e){t("AnalyticsController",["track"],e),r.AnalyticsController=e},getAnalyticsController:function(){return r.AnalyticsController},setCloudController:function(e){t("CloudController",["run","getJobsData","startJob"],e),r.CloudController=e},getCloudController:function(){return r.CloudController},setConfigController:function(e){t("ConfigController",["current","get"],e),r.ConfigController=e},getConfigController:function(){return r.ConfigController},setFileController:function(e){t("FileController",["saveFile","saveBase64"],e),r.FileController=e},getFileController:function(){return r.FileController},setInstallationController:function(e){t("InstallationController",["currentInstallationId"],e),r.InstallationController=e},getInstallationController:function(){return r.InstallationController},setObjectController:function(e){t("ObjectController",["save","fetch","destroy"],e),r.ObjectController=e},getObjectController:function(){return r.ObjectController},setObjectStateController:function(e){t("ObjectStateController",["getState","initializeState","removeState","getServerData","setServerData","getPendingOps","setPendingOp","pushPendingState","popPendingState","mergeFirstPendingState","getObjectCache","estimateAttribute","estimateAttributes","commitServerChanges","enqueueTask","clearAllState"],e),r.ObjectStateController=e},getObjectStateController:function(){return r.ObjectStateController},setPushController:function(e){t("PushController",["send"],e),r.PushController=e},getPushController:function(){return r.PushController},setQueryController:function(e){t("QueryController",["find","aggregate"],e),r.QueryController=e},getQueryController:function(){return r.QueryController},setRESTController:function(e){t("RESTController",["request","ajax"],e),r.RESTController=e},getRESTController:function(){return r.RESTController},setSchemaController:function(e){t("SchemaController",["get","create","update","delete","send","purge"],e),r.SchemaController=e},getSchemaController:function(){return r.SchemaController},setSessionController:function(e){t("SessionController",["getSession"],e),r.SessionController=e},getSessionController:function(){return r.SessionController},setStorageController:function(e){e.async?t("An async StorageController",["getItemAsync","setItemAsync","removeItemAsync"],e):t("A synchronous StorageController",["getItem","setItem","removeItem"],e),r.StorageController=e},getStorageController:function(){return r.StorageController},setAsyncStorage:function(e){r.AsyncStorage=e},getAsyncStorage:function(){return r.AsyncStorage},setUserController:function(e){t("UserController",["setCurrentUser","currentUser","currentUserAsync","signUp","logIn","become","logOut","requestPasswordReset","upgradeToRevocableSession","linkWith"],e),r.UserController=e},getUserController:function(){return r.UserController},setLiveQueryController:function(e){t("LiveQueryController",["subscribe","unsubscribe","open","close"],e),r.LiveQueryController=e},getLiveQueryController:function(){return r.LiveQueryController},setHooksController:function(e){t("HooksController",["create","get","update","remove"],e),r.HooksController=e},getHooksController:function(){return r.HooksController}}}).call(this,e("_process"))},{_process:65}],4:[function(e,t,r){"use strict";t.exports=e("events").EventEmitter},{events:179}],5:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a=n(e("./parseDate")),o=n(e("./ParseUser"));function n(e){return e&&e.__esModule?e:{default:e}}var i,u,s=!1,l={authenticate:function(t){var r=this;"undefined"==typeof FB&&t.error(this,"Facebook SDK not found."),FB.login(function(e){e.authResponse?t.success&&t.success(r,{id:e.authResponse.userID,access_token:e.authResponse.accessToken,expiration_date:new Date(1e3*e.authResponse.expiresIn+(new Date).getTime()).toJSON()}):t.error&&t.error(r,e)},{scope:i})},restoreAuthentication:function(e){if(e){var t=(0,a.default)(e.expiration_date),r=t?(t.getTime()-(new Date).getTime())/1e3:0,n={userID:e.id,accessToken:e.access_token,expiresIn:r},o={};if(u)for(var i in u)o[i]=u[i];o.authResponse=n,o.status=!1;var s=FB.getAuthResponse();s&&s.userID!==n.userID&&FB.logout(),FB.init(o)}return!0},getAuthType:function(){return"facebook"},deauthenticate:function(){this.restoreAuthentication(null)}},c={init:function(e){if("undefined"==typeof FB)throw new Error("The Facebook JavaScript SDK must be loaded before calling init.");if(u={},e)for(var t in e)u[t]=e[t];u.status&&"undefined"!=typeof console&&(console.warn||console.log||function(){}).call(console,'The "status" flag passed into FB.init, when set to true, can interfere with Parse Facebook integration, so it has been suppressed. Please call FB.getLoginStatus() explicitly if you require this behavior.');u.status=!1,FB.init(u),o.default._registerAuthenticationProvider(l),s=!0},isLinked:function(e){return e._isLinked("facebook")},logIn:function(e,t){if(e&&"string"!=typeof e){var r={};if(t)for(var n in t)r[n]=t[n];return r.authData=e,o.default._logInWith("facebook",r)}if(!s)throw new Error("You must initialize FacebookUtils before calling logIn.");return i=e,o.default._logInWith("facebook",t)},link:function(e,t,r){if(t&&"string"!=typeof t){var n={};if(r)for(var o in r)n[o]=r[o];return n.authData=t,e._linkWith("facebook",n)}if(!s)throw new Error("You must initialize FacebookUtils before calling link.");return i=t,e._linkWith("facebook",r)},unlink:function(e,t){if(!s)throw new Error("You must initialize FacebookUtils before calling unlink.");return e._unlinkFrom("facebook",t)}};r.default=c},{"./ParseUser":26,"./parseDate":41}],6:[function(e,t,r){"use strict";var n=i(e("babel-runtime/core-js/promise")),o=(i(e("./CoreManager")),i(e("./Storage")));function i(e){return e&&e.__esModule?e:{default:e}}var s=null;function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}var u={currentInstallationId:function(){if("string"==typeof s)return n.default.resolve(s);var t=o.default.generatePath("installationId");return o.default.getItemAsync(t).then(function(e){return e?s=e:(e=a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a(),o.default.setItemAsync(t,e).then(function(){return s=e}))})},_clearCache:function(){s=null},_setInstallationIdCache:function(e){s=e}};t.exports=u},{"./CoreManager":3,"./Storage":30,"babel-runtime/core-js/promise":55}],7:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=v(e("babel-runtime/helpers/typeof")),s=v(e("babel-runtime/core-js/get-iterator")),c=v(e("babel-runtime/core-js/json/stringify")),u=v(e("babel-runtime/core-js/map")),l=v(e("babel-runtime/core-js/object/get-prototype-of")),f=v(e("babel-runtime/helpers/classCallCheck")),o=v(e("babel-runtime/helpers/createClass")),d=v(e("babel-runtime/helpers/possibleConstructorReturn")),i=v(e("babel-runtime/helpers/inherits")),a=v(e("./EventEmitter")),h=v(e("./ParseObject")),p=v(e("./LiveQuerySubscription")),_=e("./promiseUtils");function v(e){return e&&e.__esModule?e:{default:e}}var y="initialized",b="connecting",g="connected",m="closed",j="reconnecting",w="disconnected",C="connect",k="subscribe",O="unsubscribe",S="connected",E="subscribed",P="unsubscribed",A="error",T="close",I="error",N="open",R="open",M="close",x="error",L=function(e){function a(e){var t=e.applicationId,r=e.serverURL,n=e.javascriptKey,o=e.masterKey,i=e.sessionToken;(0,f.default)(this,a);var s=(0,d.default)(this,(a.__proto__||(0,l.default)(a)).call(this));if(!r||0!==r.indexOf("ws"))throw new Error("You need to set a proper Parse LiveQuery server url before using LiveQueryClient");return s.reconnectHandle=null,s.attempts=1,s.id=0,s.requestId=1,s.serverURL=r,s.applicationId=t,s.javascriptKey=n,s.masterKey=o,s.sessionToken=i,s.connectPromise=(0,_.resolvingPromise)(),s.subscriptions=new u.default,s.state=y,s}return(0,i.default)(a,e),(0,o.default)(a,[{key:"shouldOpen",value:function(){return this.state===y||this.state===w}},{key:"subscribe",value:function(e,t){var r=this;if(e){var n=e.className,o=e.toJSON(),i=o.where,s=o.keys?o.keys.split(","):void 0,a={op:k,requestId:this.requestId,query:{className:n,where:i,fields:s}};t&&(a.sessionToken=t);var u=new p.default(this.requestId,e,t);return this.subscriptions.set(this.requestId,u),this.requestId+=1,this.connectPromise.then(function(){r.socket.send((0,c.default)(a))}),u.on("error",function(){}),u}}},{key:"unsubscribe",value:function(e){var t=this;if(e){this.subscriptions.delete(e.id);var r={op:O,requestId:e.id};this.connectPromise.then(function(){t.socket.send((0,c.default)(r))})}}},{key:"open",value:function(){var t=this,e=this._getWebSocketImplementation();e?(this.state!==j&&(this.state=b),this.socket=new e(this.serverURL),this.socket.onopen=function(){t._handleWebSocketOpen()},this.socket.onmessage=function(e){t._handleWebSocketMessage(e)},this.socket.onclose=function(){t._handleWebSocketClose()},this.socket.onerror=function(e){t._handleWebSocketError(e)}):this.emit(I,"Can not find WebSocket implementation")}},{key:"resubscribe",value:function(){var l=this;this.subscriptions.forEach(function(e,t){var r=e.query,n=r.toJSON(),o=n.where,i=n.keys?n.keys.split(","):void 0,s=r.className,a=e.sessionToken,u={op:k,requestId:t,query:{className:s,where:o,fields:i}};a&&(u.sessionToken=a),l.connectPromise.then(function(){l.socket.send((0,c.default)(u))})})}},{key:"close",value:function(){if(this.state!==y&&this.state!==w){this.state=w,this.socket.close();var e=!0,t=!1,r=void 0;try{for(var n,o=(0,s.default)(this.subscriptions.values());!(e=(n=o.next()).done);e=!0){n.value.emit(M)}}catch(e){t=!0,r=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw r}}this._handleReset(),this.emit(T)}}},{key:"_getWebSocketImplementation",value:function(){return"function"==typeof WebSocket||"object"===("undefined"==typeof WebSocket?"undefined":(0,n.default)(WebSocket))?WebSocket:null}},{key:"_handleReset",value:function(){this.attempts=1,this.id=0,this.requestId=1,this.connectPromise=(0,_.resolvingPromise)(),this.subscriptions=new u.default}},{key:"_handleWebSocketOpen",value:function(){this.attempts=1;var e={op:C,applicationId:this.applicationId,javascriptKey:this.javascriptKey,masterKey:this.masterKey,sessionToken:this.sessionToken};this.socket.send((0,c.default)(e))}},{key:"_handleWebSocketMessage",value:function(e){var t=e.data;"string"==typeof t&&(t=JSON.parse(t));var r=null;switch(t.requestId&&(r=this.subscriptions.get(t.requestId)),t.op){case S:this.state===j&&this.resubscribe(),this.emit(N),this.id=t.clientId,this.connectPromise.resolve(),this.state=g;break;case E:r&&r.emit(R);break;case A:t.requestId?r&&r.emit(x,t.error):this.emit(I,t.error);break;case P:break;default:var n=t.object.className;delete t.object.__type,delete t.object.className;var o=new h.default(n);if(o._finishFetch(t.object),!r)break;r.emit(t.op,o)}}},{key:"_handleWebSocketClose",value:function(){if(this.state!==w){this.state=m,this.emit(T);var e=!0,t=!1,r=void 0;try{for(var n,o=(0,s.default)(this.subscriptions.values());!(e=(n=o.next()).done);e=!0){n.value.emit(M)}}catch(e){t=!0,r=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw r}}this._handleReconnect()}}},{key:"_handleWebSocketError",value:function(e){this.emit(I,e);var t=!0,r=!1,n=void 0;try{for(var o,i=(0,s.default)(this.subscriptions.values());!(t=(o=i.next()).done);t=!0){o.value.emit(x)}}catch(e){r=!0,n=e}finally{try{!t&&i.return&&i.return()}finally{if(r)throw n}}this._handleReconnect()}},{key:"_handleReconnect",value:function(){var e=this;if(this.state!==w){this.state=j;var t,r=(t=this.attempts,Math.random()*Math.min(30,Math.pow(2,t)-1)*1e3);this.reconnectHandle&&clearTimeout(this.reconnectHandle),this.reconnectHandle=setTimeout(function(){e.attempts++,e.connectPromise=(0,_.resolvingPromise)(),e.open()}.bind(this),r)}}}]),a}(a.default);r.default=L},{"./EventEmitter":4,"./LiveQuerySubscription":8,"./ParseObject":18,"./promiseUtils":42,"babel-runtime/core-js/get-iterator":45,"babel-runtime/core-js/json/stringify":46,"babel-runtime/core-js/map":47,"babel-runtime/core-js/object/get-prototype-of":52,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60,"babel-runtime/helpers/inherits":62,"babel-runtime/helpers/possibleConstructorReturn":63,"babel-runtime/helpers/typeof":64}],8:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=c(e("babel-runtime/core-js/object/get-prototype-of")),s=c(e("babel-runtime/helpers/classCallCheck")),n=c(e("babel-runtime/helpers/createClass")),a=c(e("babel-runtime/helpers/possibleConstructorReturn")),u=c(e("babel-runtime/helpers/inherits")),o=c(e("./EventEmitter")),l=c(e("./CoreManager"));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function o(e,t,r){(0,s.default)(this,o);var n=(0,a.default)(this,(o.__proto__||(0,i.default)(o)).call(this));return n.id=e,n.query=t,n.sessionToken=r,n}return(0,u.default)(o,e),(0,n.default)(o,[{key:"unsubscribe",value:function(){var t=this;return l.default.getLiveQueryController().getDefaultLiveQueryClient().then(function(e){e.unsubscribe(t),t.emit("close"),t.resolve()})}}]),o}(o.default);r.default=f},{"./CoreManager":3,"./EventEmitter":4,"babel-runtime/core-js/object/get-prototype-of":52,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60,"babel-runtime/helpers/inherits":62,"babel-runtime/helpers/possibleConstructorReturn":63}],9:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s=o(e("babel-runtime/core-js/json/stringify")),a=o(e("babel-runtime/helpers/typeof"));r.defaultState=function(){return{serverData:{},pendingOps:[{}],objectCache:{},tasks:new n.default,existed:!1}},r.setServerData=function(e,t){for(var r in t)void 0!==t[r]?e[r]=t[r]:delete e[r]},r.setPendingOp=function(e,t,r){var n=e.length-1;r?e[n][t]=r:delete e[n][t]},r.pushPendingState=function(e){e.push({})},r.popPendingState=i,r.mergeFirstPendingState=function(e){var t=i(e),r=e[0];for(var n in t)if(r[n]&&t[n]){var o=r[n].mergeWith(t[n]);o&&(r[n]=o)}else r[n]=t[n]},r.estimateAttribute=function(e,t,r,n,o){for(var i=e[o],s=0;s<t.length;s++)t[s][o]&&(t[s][o]instanceof d.RelationOp?n&&(i=t[s][o].applyTo(i,{className:r,id:n},o)):i=t[s][o].applyTo(i));return i},r.estimateAttributes=function(e,t,r,n){var o={},i=void 0;for(i in e)o[i]=e[i];for(var s=0;s<t.length;s++)for(i in t[s])t[s][i]instanceof d.RelationOp?n&&(o[i]=t[s][i].applyTo(o[i],{className:r,id:n},i)):o[i]=t[s][i].applyTo(o[i]);return o},r.commitServerChanges=function(e,t,r){for(var n in r){var o=r[n];if((e[n]=o)&&"object"===(void 0===o?"undefined":(0,a.default)(o))&&!(o instanceof c.default)&&!(o instanceof l.default)&&!(o instanceof f.default)){var i=(0,u.default)(o,!1,!0);t[n]=(0,s.default)(i)}}};var u=o(e("./encode")),l=o(e("./ParseFile")),c=o(e("./ParseObject")),f=o(e("./ParseRelation")),n=o(e("./TaskQueue")),d=e("./ParseOp");function o(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.shift();return e.length||(e[0]={}),t}},{"./ParseFile":14,"./ParseObject":18,"./ParseOp":19,"./ParseRelation":22,"./TaskQueue":32,"./encode":37,"babel-runtime/core-js/json/stringify":46,"babel-runtime/helpers/typeof":64}],10:[function(e,t,r){"use strict";var n=c(e("babel-runtime/core-js/promise")),o=c(e("./decode")),i=c(e("./encode")),s=c(e("./CoreManager")),a=c(e("./InstallationController")),u=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("./ParseOp")),l=c(e("./RESTController"));function c(e){return e&&e.__esModule?e:{default:e}}var f={initialize:function(e,t){s.default.get("IS_NODE")&&console.log("It looks like you're using the browser version of the SDK in a node.js environment. You should require('parse/node') instead."),f._initialize(e,t)},_initialize:function(e,t,r){s.default.set("APPLICATION_ID",e),s.default.set("JAVASCRIPT_KEY",t),s.default.set("MASTER_KEY",r),s.default.set("USE_MASTER_KEY",!1)},setAsyncStorage:function(e){s.default.setAsyncStorage(e)}};Object.defineProperty(f,"applicationId",{get:function(){return s.default.get("APPLICATION_ID")},set:function(e){s.default.set("APPLICATION_ID",e)}}),Object.defineProperty(f,"javaScriptKey",{get:function(){return s.default.get("JAVASCRIPT_KEY")},set:function(e){s.default.set("JAVASCRIPT_KEY",e)}}),Object.defineProperty(f,"masterKey",{get:function(){return s.default.get("MASTER_KEY")},set:function(e){s.default.set("MASTER_KEY",e)}}),Object.defineProperty(f,"serverURL",{get:function(){return s.default.get("SERVER_URL")},set:function(e){s.default.set("SERVER_URL",e)}}),Object.defineProperty(f,"liveQueryServerURL",{get:function(){return s.default.get("LIVEQUERY_SERVER_URL")},set:function(e){s.default.set("LIVEQUERY_SERVER_URL",e)}}),f.ACL=e("./ParseACL").default,f.Analytics=e("./Analytics"),f.Cloud=e("./Cloud"),f.CoreManager=e("./CoreManager"),f.Config=e("./ParseConfig").default,f.Error=e("./ParseError").default,f.FacebookUtils=e("./FacebookUtils").default,f.File=e("./ParseFile").default,f.GeoPoint=e("./ParseGeoPoint").default,f.Polygon=e("./ParsePolygon").default,f.Installation=e("./ParseInstallation").default,f.Object=e("./ParseObject").default,f.Op={Set:u.SetOp,Unset:u.UnsetOp,Increment:u.IncrementOp,Add:u.AddOp,Remove:u.RemoveOp,AddUnique:u.AddUniqueOp,Relation:u.RelationOp},Promise=n.default,f.Push=e("./Push"),f.Query=e("./ParseQuery").default,f.Relation=e("./ParseRelation").default,f.Role=e("./ParseRole").default,f.Schema=e("./ParseSchema").default,f.Session=e("./ParseSession").default,f.Storage=e("./Storage"),f.User=e("./ParseUser").default,f.LiveQuery=e("./ParseLiveQuery").default,f.LiveQueryClient=e("./LiveQueryClient").default,f._request=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return s.default.getRESTController().request.apply(null,t)},f._ajax=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return s.default.getRESTController().ajax.apply(null,t)},f._decode=function(e,t){return(0,o.default)(t)},f._encode=function(e,t,r){return(0,i.default)(e,r)},f._getInstallationId=function(){return s.default.getInstallationController().currentInstallationId()},s.default.setInstallationController(a.default),s.default.setRESTController(l.default),f.Parse=f,t.exports=f},{"./Analytics":1,"./Cloud":2,"./CoreManager":3,"./FacebookUtils":5,"./InstallationController":6,"./LiveQueryClient":7,"./ParseACL":11,"./ParseConfig":12,"./ParseError":13,"./ParseFile":14,"./ParseGeoPoint":15,"./ParseInstallation":16,"./ParseLiveQuery":17,"./ParseObject":18,"./ParseOp":19,"./ParsePolygon":20,"./ParseQuery":21,"./ParseRelation":22,"./ParseRole":23,"./ParseSchema":24,"./ParseSession":25,"./ParseUser":26,"./Push":27,"./RESTController":28,"./Storage":30,"./decode":36,"./encode":37,"babel-runtime/core-js/promise":55}],11:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s=o(e("babel-runtime/core-js/object/keys")),a=o(e("babel-runtime/helpers/typeof")),u=o(e("babel-runtime/helpers/classCallCheck")),n=o(e("babel-runtime/helpers/createClass")),l=o(e("./ParseRole")),c=o(e("./ParseUser"));function o(e){return e&&e.__esModule?e:{default:e}}var i=function(){function i(e){if((0,u.default)(this,i),this.permissionsById={},e&&"object"===(void 0===e?"undefined":(0,a.default)(e)))if(e instanceof c.default)this.setReadAccess(e,!0),this.setWriteAccess(e,!0);else for(var t in e){var r=e[t];if("string"!=typeof t)throw new TypeError("Tried to create an ACL with an invalid user id.");for(var n in this.permissionsById[t]={},r){var o=r[n];if("read"!==n&&"write"!==n)throw new TypeError("Tried to create an ACL with an invalid permission type.");if("boolean"!=typeof o)throw new TypeError("Tried to create an ACL with an invalid permission value.");this.permissionsById[t][n]=o}}else if("function"==typeof e)throw new TypeError("ParseACL constructed with a function. Did you forget ()?")}return(0,n.default)(i,[{key:"toJSON",value:function(){var e={};for(var t in this.permissionsById)e[t]=this.permissionsById[t];return e}},{key:"equals",value:function(e){if(!(e instanceof i))return!1;var t=(0,s.default)(this.permissionsById),r=(0,s.default)(e.permissionsById);if(t.length!==r.length)return!1;for(var n in this.permissionsById){if(!e.permissionsById[n])return!1;if(this.permissionsById[n].read!==e.permissionsById[n].read)return!1;if(this.permissionsById[n].write!==e.permissionsById[n].write)return!1}return!0}},{key:"_setAccess",value:function(e,t,r){if(t instanceof c.default)t=t.id;else if(t instanceof l.default){var n=t.getName();if(!n)throw new TypeError("Role must have a name");t="role:"+n}if("string"!=typeof t)throw new TypeError("userId must be a string.");if("boolean"!=typeof r)throw new TypeError("allowed must be either true or false.");var o=this.permissionsById[t];if(!o){if(!r)return;o={},this.permissionsById[t]=o}r?this.permissionsById[t][e]=!0:(delete o[e],0===(0,s.default)(o).length&&delete this.permissionsById[t])}},{key:"_getAccess",value:function(e,t){if(t instanceof c.default){if(!(t=t.id))throw new Error("Cannot get access for a ParseUser without an ID")}else if(t instanceof l.default){var r=t.getName();if(!r)throw new TypeError("Role must have a name");t="role:"+r}var n=this.permissionsById[t];return!!n&&!!n[e]}},{key:"setReadAccess",value:function(e,t){this._setAccess("read",e,t)}},{key:"getReadAccess",value:function(e){return this._getAccess("read",e)}},{key:"setWriteAccess",value:function(e,t){this._setAccess("write",e,t)}},{key:"getWriteAccess",value:function(e){return this._getAccess("write",e)}},{key:"setPublicReadAccess",value:function(e){this.setReadAccess("*",e)}},{key:"getPublicReadAccess",value:function(){return this.getReadAccess("*")}},{key:"setPublicWriteAccess",value:function(e){this.setWriteAccess("*",e)}},{key:"getPublicWriteAccess",value:function(){return this.getWriteAccess("*")}},{key:"getRoleReadAccess",value:function(e){if(e instanceof l.default&&(e=e.getName()),"string"!=typeof e)throw new TypeError("role must be a ParseRole or a String");return this.getReadAccess("role:"+e)}},{key:"getRoleWriteAccess",value:function(e){if(e instanceof l.default&&(e=e.getName()),"string"!=typeof e)throw new TypeError("role must be a ParseRole or a String");return this.getWriteAccess("role:"+e)}},{key:"setRoleReadAccess",value:function(e,t){if(e instanceof l.default&&(e=e.getName()),"string"!=typeof e)throw new TypeError("role must be a ParseRole or a String");this.setReadAccess("role:"+e,t)}},{key:"setRoleWriteAccess",value:function(e,t){if(e instanceof l.default&&(e=e.getName()),"string"!=typeof e)throw new TypeError("role must be a ParseRole or a String");this.setWriteAccess("role:"+e,t)}}]),i}();r.default=i},{"./ParseRole":23,"./ParseUser":26,"babel-runtime/core-js/object/keys":53,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60,"babel-runtime/helpers/typeof":64}],12:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=h(e("babel-runtime/core-js/json/stringify")),i=h(e("babel-runtime/core-js/promise")),n=h(e("babel-runtime/helpers/typeof")),s=h(e("babel-runtime/helpers/classCallCheck")),a=h(e("babel-runtime/helpers/createClass")),u=h(e("./CoreManager")),l=h(e("./decode")),c=(h(e("./encode")),h(e("./escape"))),f=h(e("./ParseError")),d=h(e("./Storage"));function h(e){return e&&e.__esModule?e:{default:e}}var p=function(){function e(){(0,s.default)(this,e),this.attributes={},this._escapedAttributes={}}return(0,a.default)(e,[{key:"get",value:function(e){return this.attributes[e]}},{key:"escape",value:function(e){var t=this._escapedAttributes[e];if(t)return t;var r=this.attributes[e],n="";return null!=r&&(n=(0,c.default)(r.toString())),this._escapedAttributes[e]=n}}],[{key:"current",value:function(){return u.default.getConfigController().current()}},{key:"get",value:function(e){return e=e||{},u.default.getConfigController().get()}}]),e}(),_=null,v="currentConfig";function y(e){try{var t=JSON.parse(e);if(t&&"object"===(void 0===t?"undefined":(0,n.default)(t)))return(0,l.default)(t)}catch(e){return null}}var b={current:function(){if(_)return _;var e,r=new p,t=d.default.generatePath(v);if(!d.default.async()){if(e=d.default.getItem(t)){var n=y(e);n&&(r.attributes=n,_=r)}return r}return d.default.getItemAsync(t).then(function(e){if(e){var t=y(e);t&&(r.attributes=t,_=r)}return r})},get:function(){return u.default.getRESTController().request("GET","config",{},{}).then(function(e){if(!e||!e.params){var t=new f.default(f.default.INVALID_JSON,"Config JSON response invalid.");return i.default.reject(t)}var r=new p;for(var n in r.attributes={},e.params)r.attributes[n]=(0,l.default)(e.params[n]);return _=r,d.default.setItemAsync(d.default.generatePath(v),(0,o.default)(e.params)).then(function(){return r})})}};u.default.setConfigController(b),r.default=p},{"./CoreManager":3,"./ParseError":13,"./Storage":30,"./decode":36,"./encode":37,"./escape":39,"babel-runtime/core-js/json/stringify":46,"babel-runtime/core-js/promise":55,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60,"babel-runtime/helpers/typeof":64}],13:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=i(e("babel-runtime/helpers/classCallCheck")),o=i(e("babel-runtime/helpers/createClass"));function i(e){return e&&e.__esModule?e:{default:e}}var s=function(){function r(e,t){(0,n.default)(this,r),this.code=e,this.message=t}return(0,o.default)(r,[{key:"toString",value:function(){return"ParseError: "+this.code+" "+this.message}}]),r}();s.OTHER_CAUSE=-1,s.INTERNAL_SERVER_ERROR=1,s.CONNECTION_FAILED=100,s.OBJECT_NOT_FOUND=101,s.INVALID_QUERY=102,s.INVALID_CLASS_NAME=103,s.MISSING_OBJECT_ID=104,s.INVALID_KEY_NAME=105,s.INVALID_POINTER=106,s.INVALID_JSON=107,s.COMMAND_UNAVAILABLE=108,s.NOT_INITIALIZED=109,s.INCORRECT_TYPE=111,s.INVALID_CHANNEL_NAME=112,s.PUSH_MISCONFIGURED=115,s.OBJECT_TOO_LARGE=116,s.OPERATION_FORBIDDEN=119,s.CACHE_MISS=120,s.INVALID_NESTED_KEY=121,s.INVALID_FILE_NAME=122,s.INVALID_ACL=123,s.TIMEOUT=124,s.INVALID_EMAIL_ADDRESS=125,s.MISSING_CONTENT_TYPE=126,s.MISSING_CONTENT_LENGTH=127,s.INVALID_CONTENT_LENGTH=128,s.FILE_TOO_LARGE=129,s.FILE_SAVE_ERROR=130,s.DUPLICATE_VALUE=137,s.INVALID_ROLE_NAME=139,s.EXCEEDED_QUOTA=140,s.SCRIPT_FAILED=141,s.VALIDATION_ERROR=142,s.INVALID_IMAGE_DATA=143,s.UNSAVED_FILE_ERROR=151,s.INVALID_PUSH_TIME_ERROR=152,s.FILE_DELETE_ERROR=153,s.REQUEST_LIMIT_EXCEEDED=155,s.INVALID_EVENT_NAME=160,s.USERNAME_MISSING=200,s.PASSWORD_MISSING=201,s.USERNAME_TAKEN=202,s.EMAIL_TAKEN=203,s.EMAIL_MISSING=204,s.EMAIL_NOT_FOUND=205,s.SESSION_MISSING=206,s.MUST_CREATE_USER_THROUGH_SIGNUP=207,s.ACCOUNT_ALREADY_LINKED=208,s.INVALID_SESSION_TOKEN=209,s.LINKED_ID_MISSING=250,s.INVALID_LINKED_SESSION=251,s.UNSUPPORTED_SERVICE=252,s.INVALID_SCHEMA_OPERATION=255,s.AGGREGATE_ERROR=600,s.FILE_READ_ERROR=601,s.X_DOMAIN_REQUEST=602,r.default=s},{"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60}],14:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var u=o(e("babel-runtime/helpers/classCallCheck")),n=o(e("babel-runtime/helpers/createClass")),i=o(e("./CoreManager"));function o(e){return e&&e.__esModule?e:{default:e}}var l=/^data:([a-zA-Z]+\/[-a-zA-Z0-9+.]+)(;charset=[a-zA-Z0-9\-\/]*)?;base64,/;function c(e){if(e<26)return String.fromCharCode(65+e);if(e<52)return String.fromCharCode(e-26+97);if(e<62)return String.fromCharCode(e-52+48);if(62===e)return"+";if(63===e)return"/";throw new TypeError("Tried to encode large digit "+e+" in base64.")}var s=function(){function a(e,t,r){(0,u.default)(this,a);var n=r||"";if(this._name=e,void 0!==t)if(Array.isArray(t))this._source={format:"base64",base64:a.encodeBase64(t),type:n};else if("undefined"!=typeof File&&t instanceof File)this._source={format:"file",file:t,type:n};else{if(!t||"string"!=typeof t.base64)throw new TypeError("Cannot create a Parse.File with that data.");var o=t.base64,i=o.indexOf(",");if(-1!==i){var s=l.exec(o.slice(0,i+1));this._source={format:"base64",base64:o.slice(i+1),type:s[1]}}else this._source={format:"base64",base64:o,type:n}}}return(0,n.default)(a,[{key:"name",value:function(){return this._name}},{key:"url",value:function(e){if(e=e||{},this._url)return e.forceSecure?this._url.replace(/^http:\/\//i,"https://"):this._url}},{key:"save",value:function(e){var t=this;e=e||{};var r=i.default.getFileController();if(this._previousSave||("file"===this._source.format?this._previousSave=r.saveFile(this._name,this._source,e).then(function(e){return t._name=e.name,t._url=e.url,t}):this._previousSave=r.saveBase64(this._name,this._source,e).then(function(e){return t._name=e.name,t._url=e.url,t})),this._previousSave)return this._previousSave}},{key:"toJSON",value:function(){return{__type:"File",name:this._name,url:this._url}}},{key:"equals",value:function(e){return this===e||e instanceof a&&this.name()===e.name()&&this.url()===e.url()&&void 0!==this.url()}}],[{key:"fromJSON",value:function(e){if("File"!==e.__type)throw new TypeError("JSON object does not represent a ParseFile");var t=new a(e.name);return t._url=e.url,t}},{key:"encodeBase64",value:function(e){var t=[];t.length=Math.ceil(e.length/3);for(var r=0;r<t.length;r++){var n=e[3*r],o=e[3*r+1]||0,i=e[3*r+2]||0,s=3*r+1<e.length,a=3*r+2<e.length;t[r]=[c(n>>2&63),c(n<<4&48|o>>4&15),s?c(o<<2&60|i>>6&3):"=",a?c(63&i):"="].join("")}return t.join("")}}]),a}(),a={saveFile:function(e,t){if("file"!==t.format)throw new Error("saveFile can only be used with File-type sources.");var r={"X-Parse-Application-ID":i.default.get("APPLICATION_ID"),"Content-Type":t.type||(t.file?t.file.type:null)},n=i.default.get("JAVASCRIPT_KEY");n&&(r["X-Parse-JavaScript-Key"]=n);var o=i.default.get("SERVER_URL");return"/"!==o[o.length-1]&&(o+="/"),o+="files/"+e,i.default.getRESTController().ajax("POST",o,t.file,r).then(function(e){return e.response})},saveBase64:function(e,t,r){if("base64"!==t.format)throw new Error("saveBase64 can only be used with Base64-type sources.");var n={base64:t.base64};return t.type&&(n._ContentType=t.type),i.default.getRESTController().request("POST","files/"+e,n,r)}};i.default.setFileController(a),r.default=s},{"./CoreManager":3,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60}],15:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=s(e("babel-runtime/helpers/typeof")),o=s(e("babel-runtime/helpers/classCallCheck")),i=s(e("babel-runtime/helpers/createClass"));function s(e){return e&&e.__esModule?e:{default:e}}var a=function(){function r(e,t){(0,o.default)(this,r),Array.isArray(e)?(r._validate(e[0],e[1]),this._latitude=e[0],this._longitude=e[1]):"object"===(void 0===e?"undefined":(0,n.default)(e))?(r._validate(e.latitude,e.longitude),this._latitude=e.latitude,this._longitude=e.longitude):"number"==typeof e&&"number"==typeof t?(r._validate(e,t),this._latitude=e,this._longitude=t):(this._latitude=0,this._longitude=0)}return(0,i.default)(r,[{key:"toJSON",value:function(){return r._validate(this._latitude,this._longitude),{__type:"GeoPoint",latitude:this._latitude,longitude:this._longitude}}},{key:"equals",value:function(e){return e instanceof r&&this.latitude===e.latitude&&this.longitude===e.longitude}},{key:"radiansTo",value:function(e){var t=Math.PI/180,r=this.latitude*t,n=this.longitude*t,o=e.latitude*t,i=e.longitude*t,s=Math.sin((r-o)/2),a=Math.sin((n-i)/2),u=s*s+Math.cos(r)*Math.cos(o)*a*a;return u=Math.min(1,u),2*Math.asin(Math.sqrt(u))}},{key:"kilometersTo",value:function(e){return 6371*this.radiansTo(e)}},{key:"milesTo",value:function(e){return 3958.8*this.radiansTo(e)}},{key:"latitude",get:function(){return this._latitude},set:function(e){r._validate(e,this.longitude),this._latitude=e}},{key:"longitude",get:function(){return this._longitude},set:function(e){r._validate(this.latitude,e),this._longitude=e}}],[{key:"_validate",value:function(e,t){if(e!=e||t!=t)throw new TypeError("GeoPoint latitude and longitude must be valid numbers");if(e<-90)throw new TypeError("GeoPoint latitude out of bounds: "+e+" < -90.0.");if(90<e)throw new TypeError("GeoPoint latitude out of bounds: "+e+" > 90.0.");if(t<-180)throw new TypeError("GeoPoint longitude out of bounds: "+t+" < -180.0.");if(180<t)throw new TypeError("GeoPoint longitude out of bounds: "+t+" > 180.0.")}},{key:"current",value:function(){return navigator.geolocation.getCurrentPosition(function(e){return new r(e.coords.latitude,e.coords.longitude)})}}]),r}();r.default=a},{"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60,"babel-runtime/helpers/typeof":64}],16:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=l(e("babel-runtime/helpers/typeof")),o=l(e("babel-runtime/core-js/object/get-prototype-of")),i=l(e("babel-runtime/helpers/classCallCheck")),s=l(e("babel-runtime/helpers/possibleConstructorReturn")),a=l(e("babel-runtime/helpers/inherits")),u=l(e("./ParseObject"));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function r(e){(0,i.default)(this,r);var t=(0,s.default)(this,(r.__proto__||(0,o.default)(r)).call(this,"_Installation"));if(e&&"object"===(void 0===e?"undefined":(0,n.default)(e))&&!t.set(e||{}))throw new Error("Can't create an invalid Session");return t}return(0,a.default)(r,e),r}(u.default);r.default=c,u.default.registerSubclass("_Installation",c)},{"./ParseObject":18,"babel-runtime/core-js/object/get-prototype-of":52,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/inherits":62,"babel-runtime/helpers/possibleConstructorReturn":63,"babel-runtime/helpers/typeof":64}],17:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=o(e("babel-runtime/core-js/promise")),i=o(e("./EventEmitter")),a=o(e("./LiveQueryClient")),u=o(e("./CoreManager"));function o(e){return e&&e.__esModule?e:{default:e}}var l=new i.default;function s(){return u.default.getUserController().currentUserAsync().then(function(e){return e?e.getSessionToken():void 0})}function c(){return u.default.getLiveQueryController().getDefaultLiveQueryClient()}l.open=function(){u.default.getLiveQueryController().open()},l.close=function(){u.default.getLiveQueryController().close()},l.on("error",function(){}),r.default=l;var f=void 0,d={setDefaultLiveQueryClient:function(e){f=e},getDefaultLiveQueryClient:function(){return f?n.default.resolve(f):s().then(function(e){var t=u.default.get("LIVEQUERY_SERVER_URL");if(t&&0!==t.indexOf("ws"))throw new Error("You need to set a proper Parse LiveQuery server url before using LiveQueryClient");if(!t){var r=u.default.get("SERVER_URL"),n="ws://";0===r.indexOf("https")&&(n="wss://"),t=n+r.replace(/^https?:\/\//,""),u.default.set("LIVEQUERY_SERVER_URL",t)}var o=u.default.get("APPLICATION_ID"),i=u.default.get("JAVASCRIPT_KEY"),s=u.default.get("MASTER_KEY");return(f=new a.default({applicationId:o,serverURL:t,javascriptKey:i,masterKey:s,sessionToken:e})).on("error",function(e){l.emit("error",e)}),f.on("open",function(){l.emit("open")}),f.on("close",function(){l.emit("close")}),f})},open:function(){c().then(function(e){return e.open()})},close:function(){c().then(function(e){return e.close()})},subscribe:function(n){var o=new i.default;return c().then(function(r){return r.shouldOpen()&&r.open(),s().then(function(e){var t=r.subscribe(n,e);o.id=t.id,o.query=t.query,o.sessionToken=t.sessionToken,o.unsubscribe=t.unsubscribe,t.on("open",function(){o.emit("open")}),t.on("create",function(e){o.emit("create",e)}),t.on("update",function(e){o.emit("update",e)}),t.on("enter",function(e){o.emit("enter",e)}),t.on("leave",function(e){o.emit("leave",e)}),t.on("delete",function(e){o.emit("delete",e)}),t.on("close",function(e){o.emit("close",e)}),t.on("error",function(e){o.emit("error",e)})})}),o},unsubscribe:function(t){c().then(function(e){return e.unsubscribe(t)})},_clearCachedDefaultClient:function(){f=null}};u.default.setLiveQueryController(d)},{"./CoreManager":3,"./EventEmitter":4,"./LiveQueryClient":7,"babel-runtime/core-js/promise":55}],18:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var u=T(e("babel-runtime/core-js/object/define-property")),l=T(e("babel-runtime/core-js/object/create")),n=T(e("babel-runtime/core-js/object/freeze")),h=T(e("babel-runtime/core-js/promise")),c=T(e("babel-runtime/core-js/json/stringify")),f=T(e("babel-runtime/core-js/object/keys")),_=T(e("babel-runtime/helpers/typeof")),i=T(e("babel-runtime/helpers/classCallCheck")),o=T(e("babel-runtime/helpers/createClass")),v=T(e("./CoreManager")),p=T(e("./canBeSerialized")),s=T(e("./decode")),d=T(e("./encode")),y=(T(e("./equals")),T(e("./escape"))),b=T(e("./ParseACL")),g=T(e("./parseDate")),m=T(e("./ParseError")),j=T(e("./ParseFile")),w=e("./promiseUtils"),C=e("./ParseOp"),k=T(e("./ParseQuery")),O=T(e("./ParseRelation")),S=A(e("./SingleInstanceStateController")),a=T(e("./unique")),E=A(e("./UniqueInstanceStateController")),P=T(e("./unsavedChildren"));function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function T(e){return e&&e.__esModule?e:{default:e}}var I={},N=0,R=0,M=!v.default.get("IS_NODE");function x(){var e=v.default.get("SERVER_URL");"/"!==e[e.length-1]&&(e+="/");var t=e.replace(/https?:\/\//,"");return t.substr(t.indexOf("/"))}M?v.default.setObjectStateController(S):v.default.setObjectStateController(E);var L=function(){function a(e,t,r){(0,i.default)(this,a),"function"==typeof this.initialize&&this.initialize.apply(this,arguments);var n=null;if(this._objCount=R++,"string"==typeof e)this.className=e,t&&"object"===(void 0===t?"undefined":(0,_.default)(t))&&(n=t);else if(e&&"object"===(void 0===e?"undefined":(0,_.default)(e))){for(var o in this.className=e.className,n={},e)"className"!==o&&(n[o]=e[o]);t&&"object"===(void 0===t?"undefined":(0,_.default)(t))&&(r=t)}if(n&&!this.set(n,r))throw new Error("Can't create an invalid Parse Object")}return(0,o.default)(a,[{key:"_getId",value:function(){if("string"==typeof this.id)return this.id;if("string"==typeof this._localId)return this._localId;var e="local"+String(N++);return this._localId=e}},{key:"_getStateIdentifier",value:function(){if(M){var e=this.id;return e||(e=this._getId()),{id:e,className:this.className}}return this}},{key:"_getServerData",value:function(){return v.default.getObjectStateController().getServerData(this._getStateIdentifier())}},{key:"_clearServerData",value:function(){var e=this._getServerData(),t={};for(var r in e)t[r]=void 0;v.default.getObjectStateController().setServerData(this._getStateIdentifier(),t)}},{key:"_getPendingOps",value:function(){return v.default.getObjectStateController().getPendingOps(this._getStateIdentifier())}},{key:"_clearPendingOps",value:function(){var e=this._getPendingOps(),t=e[e.length-1];(0,f.default)(t).forEach(function(e){delete t[e]})}},{key:"_getDirtyObjectAttributes",value:function(){var e=this.attributes,t=v.default.getObjectStateController().getObjectCache(this._getStateIdentifier()),r={};for(var n in e){var o=e[n];if(o&&"object"===(void 0===o?"undefined":(0,_.default)(o))&&!(o instanceof a)&&!(o instanceof j.default)&&!(o instanceof O.default))try{var i=(0,d.default)(o,!1,!0),s=(0,c.default)(i);t[n]!==s&&(r[n]=o)}catch(e){r[n]=o}}return r}},{key:"_toFullJSON",value:function(e){var t=this.toJSON(e);return t.__type="Object",t.className=this.className,t}},{key:"_getSaveJSON",value:function(){var e=this._getPendingOps(),t=this._getDirtyObjectAttributes(),r={};for(var n in t)r[n]=new C.SetOp(t[n]).toJSON();for(n in e[0])r[n]=e[0][n].toJSON();return r}},{key:"_getSaveParams",value:function(){var e=this.id?"PUT":"POST",t=this._getSaveJSON(),r="classes/"+this.className;return this.id?r+="/"+this.id:"_User"===this.className&&(r="users"),{method:e,body:t,path:r}}},{key:"_finishFetch",value:function(e){!this.id&&e.objectId&&(this.id=e.objectId);var t=v.default.getObjectStateController();t.initializeState(this._getStateIdentifier());var r={};for(var n in e)"ACL"===n?r[n]=new b.default(e[n]):"objectId"!==n&&(r[n]=(0,s.default)(e[n]),r[n]instanceof O.default&&r[n]._ensureParentAndKey(this,n));r.createdAt&&"string"==typeof r.createdAt&&(r.createdAt=(0,g.default)(r.createdAt)),r.updatedAt&&"string"==typeof r.updatedAt&&(r.updatedAt=(0,g.default)(r.updatedAt)),!r.updatedAt&&r.createdAt&&(r.updatedAt=r.createdAt),t.commitServerChanges(this._getStateIdentifier(),r)}},{key:"_setExisted",value:function(e){var t=v.default.getObjectStateController().getState(this._getStateIdentifier());t&&(t.existed=e)}},{key:"_migrateId",value:function(e){if(this._localId&&e)if(M){var t=v.default.getObjectStateController(),r=t.removeState(this._getStateIdentifier());this.id=e,delete this._localId,r&&t.initializeState(this._getStateIdentifier(),r)}else this.id=e,delete this._localId}},{key:"_handleSaveResponse",value:function(e,t){var r={},n=v.default.getObjectStateController(),o=n.popPendingState(this._getStateIdentifier());for(var i in o)o[i]instanceof C.RelationOp?r[i]=o[i].applyTo(void 0,this,i):i in e||(r[i]=o[i].applyTo(void 0));for(i in e)"createdAt"!==i&&"updatedAt"!==i||"string"!=typeof e[i]?"ACL"===i?r[i]=new b.default(e[i]):"objectId"!==i&&(r[i]=(0,s.default)(e[i]),r[i]instanceof C.UnsetOp&&(r[i]=void 0)):r[i]=(0,g.default)(e[i]);r.createdAt&&!r.updatedAt&&(r.updatedAt=r.createdAt),this._migrateId(e.objectId),201!==t&&this._setExisted(!0),n.commitServerChanges(this._getStateIdentifier(),r)}},{key:"_handleSaveError",value:function(){this._getPendingOps(),v.default.getObjectStateController().mergeFirstPendingState(this._getStateIdentifier())}},{key:"initialize",value:function(){}},{key:"toJSON",value:function(e){var t=this.id?this.className+":"+this.id:this,r=(e=e||[t],{}),n=this.attributes;for(var o in n)"createdAt"!==o&&"updatedAt"!==o||!n[o].toJSON?r[o]=(0,d.default)(n[o],!1,!1,e):r[o]=n[o].toJSON();var i=this._getPendingOps();for(var o in i[0])r[o]=i[0][o].toJSON();return this.id&&(r.objectId=this.id),r}},{key:"equals",value:function(e){return this===e||e instanceof a&&this.className===e.className&&this.id===e.id&&void 0!==this.id}},{key:"dirty",value:function(e){if(!this.id)return!0;var t=this._getPendingOps(),r=this._getDirtyObjectAttributes();if(e){if(r.hasOwnProperty(e))return!0;for(var n=0;n<t.length;n++)if(t[n].hasOwnProperty(e))return!0;return!1}return 0!==(0,f.default)(t[0]).length||0!==(0,f.default)(r).length}},{key:"dirtyKeys",value:function(){for(var e=this._getPendingOps(),t={},r=0;r<e.length;r++)for(var n in e[r])t[n]=!0;var o=this._getDirtyObjectAttributes();for(var n in o)t[n]=!0;return(0,f.default)(t)}},{key:"toPointer",value:function(){if(!this.id)throw new Error("Cannot create a pointer to an unsaved ParseObject");return{__type:"Pointer",className:this.className,objectId:this.id}}},{key:"get",value:function(e){return this.attributes[e]}},{key:"relation",value:function(e){var t=this.get(e);if(t){if(!(t instanceof O.default))throw new Error("Called relation() on non-relation field "+e);return t._ensureParentAndKey(this,e),t}return new O.default(this,e)}},{key:"escape",value:function(e){var t=this.attributes[e];if(null==t)return"";if("string"!=typeof t){if("function"!=typeof t.toString)return"";t=t.toString()}return(0,y.default)(t)}},{key:"has",value:function(e){var t=this.attributes;return!!t.hasOwnProperty(e)&&null!=t[e]}},{key:"set",value:function(e,t,r){var n={},o={};if(e&&"object"===(void 0===e?"undefined":(0,_.default)(e)))n=e,r=t;else{if("string"!=typeof e)return this;n[e]=t}r=r||{};var i=[];for(var s in"function"==typeof this.constructor.readOnlyAttributes&&(i=i.concat(this.constructor.readOnlyAttributes())),n)if("createdAt"!==s&&"updatedAt"!==s){if(-1<i.indexOf(s))throw new Error("Cannot modify readonly attribute: "+s);r.unset?o[s]=new C.UnsetOp:n[s]instanceof C.Op?o[s]=n[s]:n[s]&&"object"===(0,_.default)(n[s])&&"string"==typeof n[s].__op?o[s]=(0,C.opFromJSON)(n[s]):"objectId"===s||"id"===s?"string"==typeof n[s]&&(this.id=n[s]):"ACL"!==s||"object"!==(0,_.default)(n[s])||n[s]instanceof b.default?o[s]=new C.SetOp(n[s]):o[s]=new C.SetOp(new b.default(n[s]))}var a=this.attributes,u={};for(var l in o)o[l]instanceof C.RelationOp?u[l]=o[l].applyTo(a[l],this,l):o[l]instanceof C.UnsetOp||(u[l]=o[l].applyTo(a[l]));if(!r.ignoreValidation){var c=this.validate(u);if(c)return"function"==typeof r.error&&r.error(this,c),!1}var f=this._getPendingOps(),d=f.length-1,h=v.default.getObjectStateController();for(var l in o){var p=o[l].mergeWith(f[d][l]);h.setPendingOp(this._getStateIdentifier(),l,p)}return this}},{key:"unset",value:function(e,t){return(t=t||{}).unset=!0,this.set(e,null,t)}},{key:"increment",value:function(e,t){if(void 0===t&&(t=1),"number"!=typeof t)throw new Error("Cannot increment by a non-numeric amount.");return this.set(e,new C.IncrementOp(t))}},{key:"add",value:function(e,t){return this.set(e,new C.AddOp([t]))}},{key:"addAll",value:function(e,t){return this.set(e,new C.AddOp(t))}},{key:"addUnique",value:function(e,t){return this.set(e,new C.AddUniqueOp([t]))}},{key:"addAllUnique",value:function(e,t){return this.set(e,new C.AddUniqueOp(t))}},{key:"remove",value:function(e,t){return this.set(e,new C.RemoveOp([t]))}},{key:"removeAll",value:function(e,t){return this.set(e,new C.RemoveOp(t))}},{key:"op",value:function(e){for(var t=this._getPendingOps(),r=t.length;r--;)if(t[r][e])return t[r][e]}},{key:"clone",value:function(){var e=new this.constructor;e.className||(e.className=this.className);var t=this.attributes;if("function"==typeof this.constructor.readOnlyAttributes){var r=this.constructor.readOnlyAttributes()||[],n={};for(var o in t)r.indexOf(o)<0&&(n[o]=t[o]);t=n}return e.set&&e.set(t),e}},{key:"newInstance",value:function(){var e=new this.constructor;if(e.className||(e.className=this.className),e.id=this.id,M)return e;var t=v.default.getObjectStateController();return t&&t.duplicateState(this._getStateIdentifier(),e._getStateIdentifier()),e}},{key:"isNew",value:function(){return!this.id}},{key:"existed",value:function(){if(!this.id)return!1;var e=v.default.getObjectStateController().getState(this._getStateIdentifier());return!!e&&e.existed}},{key:"isValid",value:function(){return!this.validate(this.attributes)}},{key:"validate",value:function(e){if(e.hasOwnProperty("ACL")&&!(e.ACL instanceof b.default))return new m.default(m.default.OTHER_CAUSE,"ACL must be a Parse ACL.");for(var t in e)if(!/^[A-Za-z][0-9A-Za-z_]*$/.test(t))return new m.default(m.default.INVALID_KEY_NAME);return!1}},{key:"getACL",value:function(){var e=this.get("ACL");return e instanceof b.default?e:null}},{key:"setACL",value:function(e,t){return this.set("ACL",e,t)}},{key:"revert",value:function(){this._clearPendingOps()}},{key:"clear",value:function(){var e=this.attributes,t={},r=["createdAt","updatedAt"];for(var n in"function"==typeof this.constructor.readOnlyAttributes&&(r=r.concat(this.constructor.readOnlyAttributes())),e)r.indexOf(n)<0&&(t[n]=!0);return this.set(t,{unset:!0})}},{key:"fetch",value:function(e){var t={};return(e=e||{}).hasOwnProperty("useMasterKey")&&(t.useMasterKey=e.useMasterKey),e.hasOwnProperty("sessionToken")&&(t.sessionToken=e.sessionToken),v.default.getObjectController().fetch(this,!0,t)}},{key:"save",value:function(e,t,r){var n,o,i=this;if("object"===(void 0===e?"undefined":(0,_.default)(e))||void 0===e?(n=e,"object"===(void 0===t?"undefined":(0,_.default)(t))&&(o=t)):((n={})[e]=t,o=r),!o&&n&&(o={},"function"==typeof n.success&&(o.success=n.success,delete n.success),"function"==typeof n.error&&(o.error=n.error,delete n.error)),n){var s=this.validate(n);if(s)return o&&"function"==typeof o.error&&o.error(this,s),h.default.reject(s);this.set(n,o)}var a={};(o=o||{}).hasOwnProperty("useMasterKey")&&(a.useMasterKey=!!o.useMasterKey),o.hasOwnProperty("sessionToken")&&"string"==typeof o.sessionToken&&(a.sessionToken=o.sessionToken);var u=v.default.getObjectController(),l=(0,P.default)(this);return u.save(l,a).then(function(){return u.save(i,a)})}},{key:"destroy",value:function(e){var t={};return(e=e||{}).hasOwnProperty("useMasterKey")&&(t.useMasterKey=e.useMasterKey),e.hasOwnProperty("sessionToken")&&(t.sessionToken=e.sessionToken),this.id?v.default.getObjectController().destroy(this,t):h.default.resolve()}},{key:"attributes",get:function(){var e=v.default.getObjectStateController();return(0,n.default)(e.estimateAttributes(this._getStateIdentifier()))}},{key:"createdAt",get:function(){return this._getServerData().createdAt}},{key:"updatedAt",get:function(){return this._getServerData().updatedAt}}],[{key:"_clearAllState",value:function(){v.default.getObjectStateController().clearAllState()}},{key:"fetchAll",value:function(e,t){var r={};return(t=t||{}).hasOwnProperty("useMasterKey")&&(r.useMasterKey=t.useMasterKey),t.hasOwnProperty("sessionToken")&&(r.sessionToken=t.sessionToken),v.default.getObjectController().fetch(e,!0,r)}},{key:"fetchAllIfNeeded",value:function(e,t){var r={};return(t=t||{}).hasOwnProperty("useMasterKey")&&(r.useMasterKey=t.useMasterKey),t.hasOwnProperty("sessionToken")&&(r.sessionToken=t.sessionToken),v.default.getObjectController().fetch(e,!1,r)}},{key:"destroyAll",value:function(e,t){var r={};return(t=t||{}).hasOwnProperty("useMasterKey")&&(r.useMasterKey=t.useMasterKey),t.hasOwnProperty("sessionToken")&&(r.sessionToken=t.sessionToken),v.default.getObjectController().destroy(e,r)}},{key:"saveAll",value:function(e,t){var r={};return(t=t||{}).hasOwnProperty("useMasterKey")&&(r.useMasterKey=t.useMasterKey),t.hasOwnProperty("sessionToken")&&(r.sessionToken=t.sessionToken),v.default.getObjectController().save(e,r)}},{key:"createWithoutData",value:function(e){var t=new this;return t.id=e,t}},{key:"fromJSON",value:function(e,t){if(!e.className)throw new Error("Cannot create an object without a className");var r=I[e.className],n=r?new r:new a(e.className),o={};for(var i in e)"className"!==i&&"__type"!==i&&(o[i]=e[i]);if(t){o.objectId&&(n.id=o.objectId);var s=null;"function"==typeof n._preserveFieldsOnFetch&&(s=n._preserveFieldsOnFetch()),n._clearServerData(),s&&n._finishFetch(s)}return n._finishFetch(o),e.objectId&&n._setExisted(!0),n}},{key:"registerSubclass",value:function(e,t){if("string"!=typeof e)throw new TypeError("The first argument must be a valid class name.");if(void 0===t)throw new TypeError("You must supply a subclass constructor.");if("function"!=typeof t)throw new TypeError("You must register the subclass constructor. Did you attempt to register an instance of the subclass?");(I[e]=t).className||(t.className=e)}},{key:"extend",value:function(e,t,r){if("string"!=typeof e){if(e&&"string"==typeof e.className)return a.extend(e.className,e,t);throw new Error("Parse.Object.extend's first argument should be the className.")}var n=e;"User"===n&&v.default.get("PERFORM_USER_REWRITE")&&(n="_User");var o=a.prototype;this.hasOwnProperty("__super__")&&this.__super__?o=this.prototype:I[n]&&(o=I[n].prototype);var i=function(e,t){if(this.className=n,this._objCount=R++,"function"==typeof this.initialize&&this.initialize.apply(this,arguments),e&&"object"===(void 0===e?"undefined":(0,_.default)(e))&&!this.set(e||{},t))throw new Error("Can't create an invalid Parse Object")};if(i.className=n,i.__super__=o,i.prototype=(0,l.default)(o,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),t)for(var s in t)"className"!==s&&(0,u.default)(i.prototype,s,{value:t[s],enumerable:!1,writable:!0,configurable:!0});if(r)for(var s in r)"className"!==s&&(0,u.default)(i,s,{value:r[s],enumerable:!1,writable:!0,configurable:!0});return i.extend=function(e,t,r){return"string"==typeof e?a.extend.call(i,e,t,r):a.extend.call(i,n,e,t)},i.createWithoutData=a.createWithoutData,I[n]=i}},{key:"enableSingleInstance",value:function(){M=!0,v.default.setObjectStateController(S)}},{key:"disableSingleInstance",value:function(){M=!1,v.default.setObjectStateController(E)}}]),a}(),D={fetch:function(t,i,e){if(Array.isArray(t)){if(t.length<1)return h.default.resolve([]);var s=[],r=[],n=null,a=[],o=null;if(t.forEach(function(e){o||(n||(n=e.className),n!==e.className&&(o=new m.default(m.default.INVALID_CLASS_NAME,"All objects should be of the same class")),e.id||(o=new m.default(m.default.MISSING_OBJECT_ID,"All objects must have an ID")),(i||0===(0,f.default)(e._getServerData()).length)&&(r.push(e.id),s.push(e)),a.push(e))}),o)return h.default.reject(o);var u=new k.default(n);return u.containedIn("objectId",r),u._limit=r.length,u.find(e).then(function(e){var t={};e.forEach(function(e){t[e.id]=e});for(var r=0;r<s.length;r++){if((!(n=s[r])||!n.id||!t[n.id])&&i)return h.default.reject(new m.default(m.default.OBJECT_NOT_FOUND,"All objects must exist on the server."))}if(!M)for(r=0;r<a.length;r++){var n;if((n=a[r])&&n.id&&t[n.id]){var o=n.id;n._finishFetch(t[o].toJSON()),a[r]=t[o]}}return h.default.resolve(a)})}return v.default.getRESTController().request("GET","classes/"+t.className+"/"+t._getId(),{},e).then(function(e){return t instanceof L&&(t._clearPendingOps(),t._clearServerData(),t._finishFetch(e)),t})},destroy:function(t,e){var r=v.default.getRESTController();if(Array.isArray(t)){if(t.length<1)return h.default.resolve([]);var n=[[]];t.forEach(function(e){e.id&&(n[n.length-1].push(e),20<=n[n.length-1].length&&n.push([]))}),0===n[n.length-1].length&&n.pop();var o=h.default.resolve(),i=[];return n.forEach(function(n){o=o.then(function(){return r.request("POST","batch",{requests:n.map(function(e){return{method:"DELETE",path:x()+"classes/"+e.className+"/"+e._getId(),body:{}}})},e).then(function(e){for(var t=0;t<e.length;t++)if(e[t]&&e[t].hasOwnProperty("error")){var r=new m.default(e[t].error.code,e[t].error.error);r.object=n[t],i.push(r)}})})}),o.then(function(){if(i.length){var e=new m.default(m.default.AGGREGATE_ERROR);return e.errors=i,h.default.reject(e)}return h.default.resolve(t)})}return t instanceof L?r.request("DELETE","classes/"+t.className+"/"+t._getId(),{},e).then(function(){return h.default.resolve(t)}):h.default.resolve(t)},save:function(e,i){var c=v.default.getRESTController(),f=v.default.getObjectStateController();if(Array.isArray(e)){if(e.length<1)return h.default.resolve([]);for(var t=e.concat(),r=0;r<e.length;r++)e[r]instanceof L&&(t=t.concat((0,P.default)(e[r],!0)));t=(0,a.default)(t);var n=h.default.resolve(),d=[];return t.forEach(function(e){e instanceof j.default?n=n.then(function(){return e.save()}):e instanceof L&&d.push(e)}),n.then(function(){var l=null;return(0,w.continueWhile)(function(){return 0<d.length},function(){var r,n,t=[],o=[];if(d.forEach(function(e){t.length<20&&(0,p.default)(e)?t.push(e):o.push(e)}),d=o,t.length<1)return h.default.reject(new m.default(m.default.OTHER_CAUSE,"Tried to save a batch with a cycle."));var s=new h.default(function(e,t){r=e,n=t});s.resolve=r,s.reject=n;var a=[],u=[];return t.forEach(function(n,o){var r,i,e=new h.default(function(e,t){r=e,i=t});e.resolve=r,e.reject=i,a.push(e),f.pushPendingState(n._getStateIdentifier()),u.push(f.enqueueTask(n._getStateIdentifier(),function(){return e.resolve(),s.then(function(e,t){if(e[o].hasOwnProperty("success"))n._handleSaveResponse(e[o].success,t);else{if(!l&&e[o].hasOwnProperty("error")){var r=e[o].error;l=new m.default(r.code,r.error),d=[]}n._handleSaveError()}})}))}),(0,w.when)(a).then(function(){return c.request("POST","batch",{requests:t.map(function(e){var t=e._getSaveParams();return t.path=x()+t.path,t})},i)}).then(function(e,t){s.resolve(e,t)},function(e){s.reject(new m.default(m.default.INCORRECT_TYPE,e.message))}),(0,w.when)(u)}).then(function(){return l?h.default.reject(l):h.default.resolve(e)})})}if(e instanceof L){var o=e;return f.pushPendingState(e._getStateIdentifier()),f.enqueueTask(e._getStateIdentifier(),function(){var e=o._getSaveParams();return c.request(e.method,e.path,e.body,i).then(function(e,t){o._handleSaveResponse(e,t)},function(e){return o._handleSaveError(),h.default.reject(e)})}).then(function(){return e},function(e){return h.default.reject(e)})}return h.default.resolve()}};v.default.setObjectController(D),r.default=L},{"./CoreManager":3,"./ParseACL":11,"./ParseError":13,"./ParseFile":14,"./ParseOp":19,"./ParseQuery":21,"./ParseRelation":22,"./SingleInstanceStateController":29,"./UniqueInstanceStateController":33,"./canBeSerialized":35,"./decode":36,"./encode":37,"./equals":38,"./escape":39,"./parseDate":41,"./promiseUtils":42,"./unique":43,"./unsavedChildren":44,"babel-runtime/core-js/json/stringify":46,"babel-runtime/core-js/object/create":48,"babel-runtime/core-js/object/define-property":49,"babel-runtime/core-js/object/freeze":50,"babel-runtime/core-js/object/keys":53,"babel-runtime/core-js/promise":55,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60,"babel-runtime/helpers/typeof":64}],19:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.RelationOp=r.RemoveOp=r.AddUniqueOp=r.AddOp=r.IncrementOp=r.UnsetOp=r.SetOp=r.Op=void 0;var i=n(e("babel-runtime/core-js/object/get-prototype-of")),s=n(e("babel-runtime/helpers/possibleConstructorReturn")),a=n(e("babel-runtime/helpers/inherits")),u=n(e("babel-runtime/helpers/classCallCheck")),l=n(e("babel-runtime/helpers/createClass"));r.opFromJSON=function(e){if(!e||!e.__op)return null;switch(e.__op){case"Delete":return new y;case"Increment":return new b(e.amount);case"Add":return new g((0,c.default)(e.objects));case"AddUnique":return new m((0,c.default)(e.objects));case"Remove":return new j((0,c.default)(e.objects));case"AddRelation":var t=(0,c.default)(e.objects);return Array.isArray(t)?new w(t,[]):new w([],[]);case"RemoveRelation":var r=(0,c.default)(e.objects);return Array.isArray(r)?new w([],r):new w([],[]);case"Batch":for(var t=[],r=[],n=0;n<e.ops.length;n++)"AddRelation"===e.ops[n].__op?t=t.concat((0,c.default)(e.ops[n].objects)):"RemoveRelation"===e.ops[n].__op&&(r=r.concat((0,c.default)(e.ops[n].objects)));return new w(t,r)}return null};var o=n(e("./arrayContainsObject")),c=n(e("./decode")),f=n(e("./encode")),d=n(e("./ParseObject")),h=n(e("./ParseRelation")),p=n(e("./unique"));function n(e){return e&&e.__esModule?e:{default:e}}var _=r.Op=function(){function e(){(0,u.default)(this,e)}return(0,l.default)(e,[{key:"applyTo",value:function(){}},{key:"mergeWith",value:function(){}},{key:"toJSON",value:function(){}}]),e}(),v=r.SetOp=function(e){function r(e){(0,u.default)(this,r);var t=(0,s.default)(this,(r.__proto__||(0,i.default)(r)).call(this));return t._value=e,t}return(0,a.default)(r,e),(0,l.default)(r,[{key:"applyTo",value:function(){return this._value}},{key:"mergeWith",value:function(){return new r(this._value)}},{key:"toJSON",value:function(){return(0,f.default)(this._value,!1,!0)}}]),r}(_),y=r.UnsetOp=function(e){function t(){return(0,u.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,a.default)(t,e),(0,l.default)(t,[{key:"applyTo",value:function(){}},{key:"mergeWith",value:function(){return new t}},{key:"toJSON",value:function(){return{__op:"Delete"}}}]),t}(_),b=r.IncrementOp=function(e){function r(e){(0,u.default)(this,r);var t=(0,s.default)(this,(r.__proto__||(0,i.default)(r)).call(this));if("number"!=typeof e)throw new TypeError("Increment Op must be initialized with a numeric amount.");return t._amount=e,t}return(0,a.default)(r,e),(0,l.default)(r,[{key:"applyTo",value:function(e){if(void 0===e)return this._amount;if("number"!=typeof e)throw new TypeError("Cannot increment a non-numeric value.");return this._amount+e}},{key:"mergeWith",value:function(e){if(!e)return this;if(e instanceof v)return new v(this.applyTo(e._value));if(e instanceof y)return new v(this._amount);if(e instanceof r)return new r(this.applyTo(e._amount));throw new Error("Cannot merge Increment Op with the previous Op")}},{key:"toJSON",value:function(){return{__op:"Increment",amount:this._amount}}}]),r}(_),g=r.AddOp=function(e){function r(e){(0,u.default)(this,r);var t=(0,s.default)(this,(r.__proto__||(0,i.default)(r)).call(this));return t._value=Array.isArray(e)?e:[e],t}return(0,a.default)(r,e),(0,l.default)(r,[{key:"applyTo",value:function(e){if(null==e)return this._value;if(Array.isArray(e))return e.concat(this._value);throw new Error("Cannot add elements to a non-array value")}},{key:"mergeWith",value:function(e){if(!e)return this;if(e instanceof v)return new v(this.applyTo(e._value));if(e instanceof y)return new v(this._value);if(e instanceof r)return new r(this.applyTo(e._value));throw new Error("Cannot merge Add Op with the previous Op")}},{key:"toJSON",value:function(){return{__op:"Add",objects:(0,f.default)(this._value,!1,!0)}}}]),r}(_),m=r.AddUniqueOp=function(e){function r(e){(0,u.default)(this,r);var t=(0,s.default)(this,(r.__proto__||(0,i.default)(r)).call(this));return t._value=(0,p.default)(Array.isArray(e)?e:[e]),t}return(0,a.default)(r,e),(0,l.default)(r,[{key:"applyTo",value:function(e){if(null==e)return this._value||[];if(Array.isArray(e)){var t=e,r=[];return this._value.forEach(function(e){e instanceof d.default?(0,o.default)(t,e)||r.push(e):t.indexOf(e)<0&&r.push(e)}),e.concat(r)}throw new Error("Cannot add elements to a non-array value")}},{key:"mergeWith",value:function(e){if(!e)return this;if(e instanceof v)return new v(this.applyTo(e._value));if(e instanceof y)return new v(this._value);if(e instanceof r)return new r(this.applyTo(e._value));throw new Error("Cannot merge AddUnique Op with the previous Op")}},{key:"toJSON",value:function(){return{__op:"AddUnique",objects:(0,f.default)(this._value,!1,!0)}}}]),r}(_),j=r.RemoveOp=function(e){function n(e){(0,u.default)(this,n);var t=(0,s.default)(this,(n.__proto__||(0,i.default)(n)).call(this));return t._value=(0,p.default)(Array.isArray(e)?e:[e]),t}return(0,a.default)(n,e),(0,l.default)(n,[{key:"applyTo",value:function(e){if(null==e)return[];if(Array.isArray(e)){var t=e.indexOf(this._value),r=e.concat([]);for(t=0;t<this._value.length;t++){for(var n=r.indexOf(this._value[t]);-1<n;)r.splice(n,1),n=r.indexOf(this._value[t]);if(this._value[t]instanceof d.default&&this._value[t].id)for(var o=0;o<r.length;o++)r[o]instanceof d.default&&this._value[t].id===r[o].id&&(r.splice(o,1),o--)}return r}throw new Error("Cannot remove elements from a non-array value")}},{key:"mergeWith",value:function(e){if(!e)return this;if(e instanceof v)return new v(this.applyTo(e._value));if(e instanceof y)return new y;if(e instanceof n){for(var t=e._value.concat([]),r=0;r<this._value.length;r++)this._value[r]instanceof d.default?(0,o.default)(t,this._value[r])||t.push(this._value[r]):t.indexOf(this._value[r])<0&&t.push(this._value[r]);return new n(t)}throw new Error("Cannot merge Remove Op with the previous Op")}},{key:"toJSON",value:function(){return{__op:"Remove",objects:(0,f.default)(this._value,!1,!0)}}}]),n}(_),w=r.RelationOp=function(e){function o(e,t){(0,u.default)(this,o);var r=(0,s.default)(this,(o.__proto__||(0,i.default)(o)).call(this));return r._targetClassName=null,Array.isArray(e)&&(r.relationsToAdd=(0,p.default)(e.map(r._extractId,r))),Array.isArray(t)&&(r.relationsToRemove=(0,p.default)(t.map(r._extractId,r))),r}return(0,a.default)(o,e),(0,l.default)(o,[{key:"_extractId",value:function(e){if("string"==typeof e)return e;if(!e.id)throw new Error("You cannot add or remove an unsaved Parse Object from a relation");if(this._targetClassName||(this._targetClassName=e.className),this._targetClassName!==e.className)throw new Error("Tried to create a Relation with 2 different object types: "+this._targetClassName+" and "+e.className+".");return e.id}},{key:"applyTo",value:function(e,t,r){if(!e){if(!t||!r)throw new Error("Cannot apply a RelationOp without either a previous value, or an object and a key");var n=new d.default(t.className);t.id&&0===t.id.indexOf("local")?n._localId=t.id:t.id&&(n.id=t.id);var o=new h.default(n,r);return o.targetClassName=this._targetClassName,o}if(e instanceof h.default){if(this._targetClassName)if(e.targetClassName){if(this._targetClassName!==e.targetClassName)throw new Error("Related object must be a "+e.targetClassName+", but a "+this._targetClassName+" was passed in.")}else e.targetClassName=this._targetClassName;return e}throw new Error("Relation cannot be applied to a non-relation field")}},{key:"mergeWith",value:function(e){if(!e)return this;if(e instanceof y)throw new Error("You cannot modify a relation after deleting it.");if(e instanceof o){if(e._targetClassName&&e._targetClassName!==this._targetClassName)throw new Error("Related object must be of class "+e._targetClassName+", but "+(this._targetClassName||"null")+" was passed in.");var r=e.relationsToAdd.concat([]);this.relationsToRemove.forEach(function(e){var t=r.indexOf(e);-1<t&&r.splice(t,1)}),this.relationsToAdd.forEach(function(e){r.indexOf(e)<0&&r.push(e)});var n=e.relationsToRemove.concat([]);this.relationsToAdd.forEach(function(e){var t=n.indexOf(e);-1<t&&n.splice(t,1)}),this.relationsToRemove.forEach(function(e){n.indexOf(e)<0&&n.push(e)});var t=new o(r,n);return t._targetClassName=this._targetClassName,t}throw new Error("Cannot merge Relation Op with the previous Op")}},{key:"toJSON",value:function(){var t=this,e=function(e){return{__type:"Pointer",className:t._targetClassName,objectId:e}},r=null,n=null;return 0<this.relationsToAdd.length&&(r={__op:"AddRelation",objects:this.relationsToAdd.map(e)}),0<this.relationsToRemove.length&&(n={__op:"RemoveRelation",objects:this.relationsToRemove.map(e)}),r&&n?{__op:"Batch",ops:[r,n]}:r||n||{}}}]),o}(_)},{"./ParseObject":18,"./ParseRelation":22,"./arrayContainsObject":34,"./decode":36,"./encode":37,"./unique":43,"babel-runtime/core-js/object/get-prototype-of":52,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60,"babel-runtime/helpers/inherits":62,"babel-runtime/helpers/possibleConstructorReturn":63}],20:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=n(e("babel-runtime/helpers/classCallCheck")),i=n(e("babel-runtime/helpers/createClass")),s=n(e("./ParseGeoPoint"));function n(e){return e&&e.__esModule?e:{default:e}}var a=function(){function n(e){(0,o.default)(this,n),this._coordinates=n._validate(e)}return(0,i.default)(n,[{key:"toJSON",value:function(){return n._validate(this._coordinates),{__type:"Polygon",coordinates:this._coordinates}}},{key:"equals",value:function(e){if(!(e instanceof n)||this.coordinates.length!==e.coordinates.length)return!1;for(var t=!0,r=1;r<this._coordinates.length;r+=1)if(this._coordinates[r][0]!=e.coordinates[r][0]||this._coordinates[r][1]!=e.coordinates[r][1]){t=!1;break}return t}},{key:"containsPoint",value:function(e){for(var t=this._coordinates[0][0],r=this._coordinates[0][0],n=this._coordinates[0][1],o=this._coordinates[0][1],i=1;i<this._coordinates.length;i+=1){var s=this._coordinates[i];t=Math.min(s[0],t),r=Math.max(s[0],r),n=Math.min(s[1],n),o=Math.max(s[1],o)}if(e.latitude<t||e.latitude>r||e.longitude<n||e.longitude>o)return!1;for(var a=!1,u=0,l=this._coordinates.length-1;u<this._coordinates.length;l=u++){var c=this._coordinates[u][0],f=this._coordinates[u][1],d=this._coordinates[l][0],h=this._coordinates[l][1];f>e.longitude!=h>e.longitude&&e.latitude<(d-c)*(e.longitude-f)/(h-f)+c&&(a=!a)}return a}},{key:"coordinates",get:function(){return this._coordinates},set:function(e){this._coordinates=n._validate(e)}}],[{key:"_validate",value:function(e){if(!Array.isArray(e))throw new TypeError("Coordinates must be an Array");if(e.length<3)throw new TypeError("Polygon must have at least 3 GeoPoints or Points");for(var t=[],r=0;r<e.length;r+=1){var n=e[r],o=void 0;if(n instanceof s.default)o=n;else{if(!Array.isArray(n)||2!==n.length)throw new TypeError("Coordinates must be an Array of GeoPoints or Points");o=new s.default(n[0],n[1])}t.push([o.latitude,o.longitude])}return t}}]),n}();r.default=a},{"./ParseGeoPoint":15,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60}],21:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var c=l(e("babel-runtime/helpers/typeof")),f=l(e("babel-runtime/core-js/promise")),n=l(e("babel-runtime/helpers/classCallCheck")),o=l(e("babel-runtime/helpers/createClass")),a=l(e("babel-runtime/core-js/object/keys")),u=l(e("./CoreManager")),i=l(e("./encode")),d=e("./promiseUtils"),s=l(e("./ParseError")),h=l(e("./ParseGeoPoint")),p=(l(e("./ParsePolygon")),l(e("./ParseObject")));function l(e){return e&&e.__esModule?e:{default:e}}function _(e){return"\\Q"+e.replace("\\E","\\E\\\\E\\Q")+"\\E"}function v(e){var t=null;return e.forEach(function(e){if(t||(t=e.className),t!==e.className)throw new Error("All queries must be for the same class.")}),t}function y(i,e){var s={};if(e.forEach(function(e){var t=-1!==e.indexOf(".");if(t||i.hasOwnProperty(e)){if(t){var r=e.split("."),n=i,o=s;r.forEach(function(e,t,r){n&&!n.hasOwnProperty(e)&&(n[e]=void 0),void 0!==n&&(n=n[e]),t<r.length-1&&(o[e]||(o[e]={}),o=o[e])})}}else i[e]=void 0}),0<(0,a.default)(s).length){!function e(t,r,n,o){if(o)for(var i in t)t.hasOwnProperty(i)&&!r.hasOwnProperty(i)&&(r[i]=t[i]);for(var i in n)void 0!==r[i]&&null!==r[i]&&null!=t&&e(t[i],r[i],n[i],!0)}(u.default.getObjectStateController().getServerData({id:i.objectId,className:i.className}),i,s,!1)}}var b=function(){function l(e){if((0,n.default)(this,l),"string"==typeof e)"User"===e&&u.default.get("PERFORM_USER_REWRITE")?this.className="_User":this.className=e;else if(e instanceof p.default)this.className=e.className;else{if("function"!=typeof e)throw new TypeError("A ParseQuery must be constructed with a ParseObject or class name.");if("string"==typeof e.className)this.className=e.className;else{var t=new e;this.className=t.className}}this._where={},this._include=[],this._limit=-1,this._skip=0,this._extraOptions={}}return(0,o.default)(l,[{key:"_orQuery",value:function(e){var t=e.map(function(e){return e.toJSON().where});return this._where.$or=t,this}},{key:"_andQuery",value:function(e){var t=e.map(function(e){return e.toJSON().where});return this._where.$and=t,this}},{key:"_addCondition",value:function(e,t,r){return this._where[e]&&"string"!=typeof this._where[e]||(this._where[e]={}),this._where[e][t]=(0,i.default)(r,!1,!0),this}},{key:"_regexStartWith",value:function(e){return"^"+_(e)}},{key:"toJSON",value:function(){var e={where:this._where};for(var t in this._include.length&&(e.include=this._include.join(",")),this._select&&(e.keys=this._select.join(",")),0<=this._limit&&(e.limit=this._limit),0<this._skip&&(e.skip=this._skip),this._order&&(e.order=this._order.join(",")),this._extraOptions)e[t]=this._extraOptions[t];return e}},{key:"withJSON",value:function(e){for(var t in e.where&&(this._where=e.where),e.include&&(this._include=e.include.split(",")),e.keys&&(this._select=e.keys.split(",")),e.limit&&(this._limit=e.limit),e.skip&&(this._skip=e.skip),e.order&&(this._order=e.order.split(",")),e)e.hasOwnProperty(t)&&-1===["where","include","keys","limit","skip","order"].indexOf(t)&&(this._extraOptions[t]=e[t]);return this}},{key:"get",value:function(e,t){this.equalTo("objectId",e);var r={};return t&&t.hasOwnProperty("useMasterKey")&&(r.useMasterKey=t.useMasterKey),t&&t.hasOwnProperty("sessionToken")&&(r.sessionToken=t.sessionToken),this.first(r).then(function(e){if(e)return e;var t=new s.default(s.default.OBJECT_NOT_FOUND,"Object not found.");return f.default.reject(t)})}},{key:"find",value:function(e){var n=this,t={};(e=e||{}).hasOwnProperty("useMasterKey")&&(t.useMasterKey=e.useMasterKey),e.hasOwnProperty("sessionToken")&&(t.sessionToken=e.sessionToken);var r=u.default.getQueryController(),o=this._select;return r.find(this.className,this.toJSON(),t).then(function(r){return r.results.map(function(e){var t=r.className||n.className;return e.className||(e.className=t),o&&y(e,o),p.default.fromJSON(e,!o)})})}},{key:"count",value:function(e){var t={};(e=e||{}).hasOwnProperty("useMasterKey")&&(t.useMasterKey=e.useMasterKey),e.hasOwnProperty("sessionToken")&&(t.sessionToken=e.sessionToken);var r=u.default.getQueryController(),n=this.toJSON();return n.limit=0,n.count=1,r.find(this.className,n,t).then(function(e){return e.count})}},{key:"distinct",value:function(e,t){var r={useMasterKey:!0};(t=t||{}).hasOwnProperty("sessionToken")&&(r.sessionToken=t.sessionToken);var n=u.default.getQueryController(),o={distinct:e,where:this._where};return n.aggregate(this.className,o,r).then(function(e){return e.results})}},{key:"aggregate",value:function(e,t){var r={useMasterKey:!0};(t=t||{}).hasOwnProperty("sessionToken")&&(r.sessionToken=t.sessionToken);var n=u.default.getQueryController(),o={};if(Array.isArray(e))e.forEach(function(e){for(var t in e)o[t]=e[t]});else{if(!e||"object"!==(void 0===e?"undefined":(0,c.default)(e)))throw new Error("Invalid pipeline must be Array or Object");o=e}return n.aggregate(this.className,o,r).then(function(e){return e.results})}},{key:"first",value:function(e){var r=this,t={};(e=e||{}).hasOwnProperty("useMasterKey")&&(t.useMasterKey=e.useMasterKey),e.hasOwnProperty("sessionToken")&&(t.sessionToken=e.sessionToken);var n=u.default.getQueryController(),o=this.toJSON();o.limit=1;var i=this._select;return n.find(this.className,o,t).then(function(e){var t=e.results;if(t[0])return t[0].className||(t[0].className=r.className),i&&y(t[0],i),p.default.fromJSON(t[0],!i)})}},{key:"each",value:function(r,e){if(e=e||{},this._order||this._skip||0<=this._limit)return f.default.reject("Cannot iterate on a query with sort, skip, or limit.");var n=new l(this.className);for(var t in n._limit=e.batchSize||100,n._include=this._include.map(function(e){return e}),this._select&&(n._select=this._select.map(function(e){return e})),n._where={},this._where){var o=this._where[t];if(Array.isArray(o))n._where[t]=o.map(function(e){return e});else if(o&&"object"===(void 0===o?"undefined":(0,c.default)(o))){var i={};for(var s in n._where[t]=i,o)i[s]=o[s]}else n._where[t]=o}n.ascending("objectId");var a={};e.hasOwnProperty("useMasterKey")&&(a.useMasterKey=e.useMasterKey),e.hasOwnProperty("sessionToken")&&(a.sessionToken=e.sessionToken);var u=!1;return(0,d.continueWhile)(function(){return!u},function(){return n.find(a).then(function(e){var t=f.default.resolve();return e.forEach(function(e){t=t.then(function(){return r(e)})}),t.then(function(){e.length>=n._limit?n.greaterThan("objectId",e[e.length-1].id):u=!0})})})}},{key:"equalTo",value:function(e,t){return void 0===t?this.doesNotExist(e):(this._where[e]=(0,i.default)(t,!1,!0),this)}},{key:"notEqualTo",value:function(e,t){return this._addCondition(e,"$ne",t)}},{key:"lessThan",value:function(e,t){return this._addCondition(e,"$lt",t)}},{key:"greaterThan",value:function(e,t){return this._addCondition(e,"$gt",t)}},{key:"lessThanOrEqualTo",value:function(e,t){return this._addCondition(e,"$lte",t)}},{key:"greaterThanOrEqualTo",value:function(e,t){return this._addCondition(e,"$gte",t)}},{key:"containedIn",value:function(e,t){return this._addCondition(e,"$in",t)}},{key:"notContainedIn",value:function(e,t){return this._addCondition(e,"$nin",t)}},{key:"containsAll",value:function(e,t){return this._addCondition(e,"$all",t)}},{key:"containsAllStartingWith",value:function(e,t){var r=this;return Array.isArray(t)||(t=[t]),t=t.map(function(e){return{$regex:r._regexStartWith(e)}}),this.containsAll(e,t)}},{key:"exists",value:function(e){return this._addCondition(e,"$exists",!0)}},{key:"doesNotExist",value:function(e){return this._addCondition(e,"$exists",!1)}},{key:"matches",value:function(e,t,r){return this._addCondition(e,"$regex",t),r||(r=""),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),r.length&&this._addCondition(e,"$options",r),this}},{key:"matchesQuery",value:function(e,t){var r=t.toJSON();return r.className=t.className,this._addCondition(e,"$inQuery",r)}},{key:"doesNotMatchQuery",value:function(e,t){var r=t.toJSON();return r.className=t.className,this._addCondition(e,"$notInQuery",r)}},{key:"matchesKeyInQuery",value:function(e,t,r){var n=r.toJSON();return n.className=r.className,this._addCondition(e,"$select",{key:t,query:n})}},{key:"doesNotMatchKeyInQuery",value:function(e,t,r){var n=r.toJSON();return n.className=r.className,this._addCondition(e,"$dontSelect",{key:t,query:n})}},{key:"contains",value:function(e,t){if("string"!=typeof t)throw new Error("The value being searched for must be a string.");return this._addCondition(e,"$regex",_(t))}},{key:"fullText",value:function(e,t,r){if(r=r||{},!e)throw new Error("A key is required.");if(!t)throw new Error("A search term is required");if("string"!=typeof t)throw new Error("The value being searched for must be a string.");var n={$term:t};for(var o in r)switch(o){case"language":n.$language=r[o];break;case"caseSensitive":n.$caseSensitive=r[o];break;case"diacriticSensitive":n.$diacriticSensitive=r[o];break;default:throw new Error("Unknown option: "+o)}return this._addCondition(e,"$text",{$search:n})}},{key:"sortByTextScore",value:function(){return this.ascending("$score"),this.select(["$score"]),this}},{key:"startsWith",value:function(e,t){if("string"!=typeof t)throw new Error("The value being searched for must be a string.");return this._addCondition(e,"$regex",this._regexStartWith(t))}},{key:"endsWith",value:function(e,t){if("string"!=typeof t)throw new Error("The value being searched for must be a string.");return this._addCondition(e,"$regex",_(t)+"$")}},{key:"near",value:function(e,t){return t instanceof h.default||(t=new h.default(t)),this._addCondition(e,"$nearSphere",t)}},{key:"withinRadians",value:function(e,t,r,n){return n||void 0===n?(this.near(e,t),this._addCondition(e,"$maxDistance",r)):this._addCondition(e,"$geoWithin",{$centerSphere:[[t.longitude,t.latitude],r]})}},{key:"withinMiles",value:function(e,t,r,n){return this.withinRadians(e,t,r/3958.8,n)}},{key:"withinKilometers",value:function(e,t,r,n){return this.withinRadians(e,t,r/6371,n)}},{key:"withinGeoBox",value:function(e,t,r){return t instanceof h.default||(t=new h.default(t)),r instanceof h.default||(r=new h.default(r)),this._addCondition(e,"$within",{$box:[t,r]}),this}},{key:"withinPolygon",value:function(e,t){return this._addCondition(e,"$geoWithin",{$polygon:t})}},{key:"polygonContains",value:function(e,t){return this._addCondition(e,"$geoIntersects",{$point:t})}},{key:"ascending",value:function(){this._order=[];for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.addAscending.apply(this,t)}},{key:"addAscending",value:function(){var t=this;this._order||(this._order=[]);for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach(function(e){Array.isArray(e)&&(e=e.join()),t._order=t._order.concat(e.replace(/\s/g,"").split(","))}),this}},{key:"descending",value:function(){this._order=[];for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.addDescending.apply(this,t)}},{key:"addDescending",value:function(){var t=this;this._order||(this._order=[]);for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach(function(e){Array.isArray(e)&&(e=e.join()),t._order=t._order.concat(e.replace(/\s/g,"").split(",").map(function(e){return"-"+e}))}),this}},{key:"skip",value:function(e){if("number"!=typeof e||e<0)throw new Error("You can only skip by a positive number");return this._skip=e,this}},{key:"limit",value:function(e){if("number"!=typeof e)throw new Error("You can only set the limit to a numeric value");return this._limit=e,this}},{key:"include",value:function(){for(var t=this,e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach(function(e){Array.isArray(e)?t._include=t._include.concat(e):t._include.push(e)}),this}},{key:"select",value:function(){var t=this;this._select||(this._select=[]);for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach(function(e){Array.isArray(e)?t._select=t._select.concat(e):t._select.push(e)}),this}},{key:"subscribe",value:function(){return u.default.getLiveQueryController().subscribe(this)}}],[{key:"fromJSON",value:function(e,t){return new l(e).withJSON(t)}},{key:"or",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=new l(v(t));return n._orQuery(t),n}},{key:"and",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=new l(v(t));return n._andQuery(t),n}}]),l}(),g={find:function(e,t,r){return u.default.getRESTController().request("GET","classes/"+e,t,r)},aggregate:function(e,t,r){return u.default.getRESTController().request("GET","aggregate/"+e,t,r)}};u.default.setQueryController(g),r.default=b},{"./CoreManager":3,"./ParseError":13,"./ParseGeoPoint":15,"./ParseObject":18,"./ParsePolygon":20,"./encode":37,"./promiseUtils":42,"babel-runtime/core-js/object/keys":53,"babel-runtime/core-js/promise":55,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60,"babel-runtime/helpers/typeof":64}],22:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(e("babel-runtime/helpers/classCallCheck")),o=a(e("babel-runtime/helpers/createClass")),i=e("./ParseOp"),s=(a(e("./ParseObject")),a(e("./ParseQuery")));function a(e){return e&&e.__esModule?e:{default:e}}var u=function(){function r(e,t){(0,n.default)(this,r),this.parent=e,this.key=t,this.targetClassName=null}return(0,o.default)(r,[{key:"_ensureParentAndKey",value:function(e,t){if(this.key=this.key||t,this.key!==t)throw new Error("Internal Error. Relation retrieved from two different keys.");if(this.parent){if(this.parent.className!==e.className)throw new Error("Internal Error. Relation retrieved from two different Objects.");if(this.parent.id){if(this.parent.id!==e.id)throw new Error("Internal Error. Relation retrieved from two different Objects.")}else e.id&&(this.parent=e)}else this.parent=e}},{key:"add",value:function(e){Array.isArray(e)||(e=[e]);var t=new i.RelationOp(e,[]),r=this.parent;if(!r)throw new Error("Cannot add to a Relation without a parent");return r.set(this.key,t),this.targetClassName=t._targetClassName,r}},{key:"remove",value:function(e){Array.isArray(e)||(e=[e]);var t=new i.RelationOp([],e);if(!this.parent)throw new Error("Cannot remove from a Relation without a parent");this.parent.set(this.key,t),this.targetClassName=t._targetClassName}},{key:"toJSON",value:function(){return{__type:"Relation",className:this.targetClassName}}},{key:"query",value:function(){var e,t=this.parent;if(!t)throw new Error("Cannot construct a query for a Relation without a parent");return this.targetClassName?e=new s.default(this.targetClassName):(e=new s.default(t.className))._extraOptions.redirectClassNameForKey=this.key,e._addCondition("$relatedTo","object",{__type:"Pointer",className:t.className,objectId:t.id}),e._addCondition("$relatedTo","key",this.key),e}}]),r}();r.default=u},{"./ParseObject":18,"./ParseOp":19,"./ParseQuery":21,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60}],23:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=d(e("babel-runtime/core-js/object/get-prototype-of")),n=d(e("babel-runtime/helpers/classCallCheck")),s=d(e("babel-runtime/helpers/createClass")),a=d(e("babel-runtime/helpers/possibleConstructorReturn")),u=d(e("babel-runtime/helpers/get")),l=d(e("babel-runtime/helpers/inherits")),c=d(e("./ParseACL")),f=d(e("./ParseError")),o=d(e("./ParseObject"));function d(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function o(e,t){(0,n.default)(this,o);var r=(0,a.default)(this,(o.__proto__||(0,i.default)(o)).call(this,"_Role"));return"string"==typeof e&&t instanceof c.default&&(r.setName(e),r.setACL(t)),r}return(0,l.default)(o,e),(0,s.default)(o,[{key:"getName",value:function(){var e=this.get("name");return null==e||"string"==typeof e?e:""}},{key:"setName",value:function(e,t){return this.set("name",e,t)}},{key:"getUsers",value:function(){return this.relation("users")}},{key:"getRoles",value:function(){return this.relation("roles")}},{key:"validate",value:function(e,t){var r=(0,u.default)(o.prototype.__proto__||(0,i.default)(o.prototype),"validate",this).call(this,e,t);if(r)return r;if("name"in e&&e.name!==this.getName()){var n=e.name;if(this.id&&this.id!==e.objectId)return new f.default(f.default.OTHER_CAUSE,"A role's name can only be set before it has been saved.");if("string"!=typeof n)return new f.default(f.default.OTHER_CAUSE,"A role's name must be a String.");if(!/^[0-9a-zA-Z\-_ ]+$/.test(n))return new f.default(f.default.OTHER_CAUSE,"A role's name can be only contain alphanumeric characters, _, -, and spaces.")}return!1}}]),o}(o.default);o.default.registerSubclass("_Role",h),r.default=h},{"./ParseACL":11,"./ParseError":13,"./ParseObject":18,"babel-runtime/core-js/object/get-prototype-of":52,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60,"babel-runtime/helpers/get":61,"babel-runtime/helpers/inherits":62,"babel-runtime/helpers/possibleConstructorReturn":63}],24:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=i(e("babel-runtime/helpers/classCallCheck")),o=i(e("babel-runtime/helpers/createClass")),s=i(e("./CoreManager"));function i(e){return e&&e.__esModule?e:{default:e}}var a=["String","Number","Boolean","Date","File","GeoPoint","Polygon","Array","Object","Pointer","Relation"],u=function(){function t(e){(0,n.default)(this,t),"string"==typeof e&&("User"===e&&s.default.get("PERFORM_USER_REWRITE")?this.className="_User":this.className=e),this._fields={},this._indexes={}}return(0,o.default)(t,[{key:"get",value:function(e){return this.assertClassName(),e=e||{},s.default.getSchemaController().get(this.className,e).then(function(e){if(!e)throw new Error("Schema not found.");return e})}},{key:"save",value:function(e){this.assertClassName(),e=e||{};var t=s.default.getSchemaController(),r={className:this.className,fields:this._fields,indexes:this._indexes};return t.create(this.className,r,e).then(function(e){return e})}},{key:"update",value:function(e){this.assertClassName(),e=e||{};var t=s.default.getSchemaController(),r={className:this.className,fields:this._fields,indexes:this._indexes};return this._fields={},this._indexes={},t.update(this.className,r,e).then(function(e){return e})}},{key:"delete",value:function(e){return this.assertClassName(),e=e||{},s.default.getSchemaController().delete(this.className,e).then(function(e){return e})}},{key:"purge",value:function(){return this.assertClassName(),s.default.getSchemaController().purge(this.className).then(function(e){return e})}},{key:"assertClassName",value:function(){if(!this.className)throw new Error("You must set a Class Name before making any request.")}},{key:"addField",value:function(e,t){if(t=t||"String",!e)throw new Error("field name may not be null.");if(-1===a.indexOf(t))throw new Error(t+" is not a valid type.");return this._fields[e]={type:t},this}},{key:"addIndex",value:function(e,t){if(!e)throw new Error("index name may not be null.");if(!t)throw new Error("index may not be null.");return this._indexes[e]=t,this}},{key:"addString",value:function(e){return this.addField(e,"String")}},{key:"addNumber",value:function(e){return this.addField(e,"Number")}},{key:"addBoolean",value:function(e){return this.addField(e,"Boolean")}},{key:"addDate",value:function(e){return this.addField(e,"Date")}},{key:"addFile",value:function(e){return this.addField(e,"File")}},{key:"addGeoPoint",value:function(e){return this.addField(e,"GeoPoint")}},{key:"addPolygon",value:function(e){return this.addField(e,"Polygon")}},{key:"addArray",value:function(e){return this.addField(e,"Array")}},{key:"addObject",value:function(e){return this.addField(e,"Object")}},{key:"addPointer",value:function(e,t){if(!e)throw new Error("field name may not be null.");if(!t)throw new Error("You need to set the targetClass of the Pointer.");return this._fields[e]={type:"Pointer",targetClass:t},this}},{key:"addRelation",value:function(e,t){if(!e)throw new Error("field name may not be null.");if(!t)throw new Error("You need to set the targetClass of the Relation.");return this._fields[e]={type:"Relation",targetClass:t},this}},{key:"deleteField",value:function(e){this._fields[e]={__op:"Delete"}}},{key:"deleteIndex",value:function(e){this._indexes[e]={__op:"Delete"}}}],[{key:"all",value:function(e){return e=e||{},s.default.getSchemaController().get("",e).then(function(e){if(0===e.results.length)throw new Error("Schema not found.");return e.results})}}]),t}(),l={send:function(e,t,r,n){var o=s.default.getRESTController(),i={useMasterKey:!0};return n.hasOwnProperty("sessionToken")&&(i.sessionToken=n.sessionToken),o.request(t,"schemas/"+e,r,i)},get:function(e,t){return this.send(e,"GET",{},t)},create:function(e,t,r){return this.send(e,"POST",t,r)},update:function(e,t,r){return this.send(e,"PUT",t,r)},delete:function(e,t){return this.send(e,"DELETE",{},t)},purge:function(e){return s.default.getRESTController().request("DELETE","purge/"+e,{},{useMasterKey:!0})}};s.default.setSchemaController(l),r.default=u},{"./CoreManager":3,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60}],25:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=p(e("babel-runtime/core-js/promise")),o=p(e("babel-runtime/helpers/typeof")),i=p(e("babel-runtime/core-js/object/get-prototype-of")),s=p(e("babel-runtime/helpers/classCallCheck")),a=p(e("babel-runtime/helpers/createClass")),u=p(e("babel-runtime/helpers/possibleConstructorReturn")),l=p(e("babel-runtime/helpers/inherits")),c=p(e("./CoreManager")),f=p(e("./isRevocableSession")),d=p(e("./ParseObject")),h=p(e("./ParseUser"));function p(e){return e&&e.__esModule?e:{default:e}}var _=function(e){function r(e){(0,s.default)(this,r);var t=(0,u.default)(this,(r.__proto__||(0,i.default)(r)).call(this,"_Session"));if(e&&"object"===(void 0===e?"undefined":(0,o.default)(e))&&!t.set(e||{}))throw new Error("Can't create an invalid Session");return t}return(0,l.default)(r,e),(0,a.default)(r,[{key:"getSessionToken",value:function(){var e=this.get("sessionToken");return"string"==typeof e?e:""}}],[{key:"readOnlyAttributes",value:function(){return["createdWith","expiresAt","installationId","restricted","sessionToken","user"]}},{key:"current",value:function(e){e=e||{};var t=c.default.getSessionController(),r={};return e.hasOwnProperty("useMasterKey")&&(r.useMasterKey=e.useMasterKey),h.default.currentAsync().then(function(e){return e?(e.getSessionToken(),r.sessionToken=e.getSessionToken(),t.getSession(r)):n.default.reject("There is no current user.")})}},{key:"isCurrentSessionRevocable",value:function(){var e=h.default.current();return!!e&&(0,f.default)(e.getSessionToken()||"")}}]),r}(d.default);d.default.registerSubclass("_Session",_);var v={getSession:function(e){var t=c.default.getRESTController(),r=new _;return t.request("GET","sessions/me",{},e).then(function(e){return r._finishFetch(e),r._setExisted(!0),r})}};c.default.setSessionController(v),r.default=_},{"./CoreManager":3,"./ParseObject":18,"./ParseUser":26,"./isRevocableSession":40,"babel-runtime/core-js/object/get-prototype-of":52,"babel-runtime/core-js/promise":55,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60,"babel-runtime/helpers/inherits":62,"babel-runtime/helpers/possibleConstructorReturn":63,"babel-runtime/helpers/typeof":64}],26:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=g(e("babel-runtime/core-js/json/stringify")),i=g(e("babel-runtime/core-js/object/define-property")),s=g(e("babel-runtime/core-js/promise")),a=g(e("babel-runtime/helpers/typeof")),u=g(e("babel-runtime/core-js/object/get-prototype-of")),l=g(e("babel-runtime/helpers/classCallCheck")),c=g(e("babel-runtime/helpers/createClass")),f=g(e("babel-runtime/helpers/possibleConstructorReturn")),d=g(e("babel-runtime/helpers/get")),h=g(e("babel-runtime/helpers/inherits")),p=g(e("./CoreManager")),_=g(e("./isRevocableSession")),v=g(e("./ParseError")),o=g(e("./ParseObject")),y=g(e("./ParseSession")),b=g(e("./Storage"));function g(e){return e&&e.__esModule?e:{default:e}}var m="currentUser",j=!p.default.get("IS_NODE"),w=!1,C=null,k={},O=function(e){function o(e){(0,l.default)(this,o);var t=(0,f.default)(this,(o.__proto__||(0,u.default)(o)).call(this,"_User"));if(e&&"object"===(void 0===e?"undefined":(0,a.default)(e))&&!t.set(e||{}))throw new Error("Can't create an invalid Parse User");return t}return(0,h.default)(o,e),(0,c.default)(o,[{key:"_upgradeToRevocableSession",value:function(e){var t={};return(e=e||{}).hasOwnProperty("useMasterKey")&&(t.useMasterKey=e.useMasterKey),p.default.getUserController().upgradeToRevocableSession(this,t)}},{key:"_linkWith",value:function(e,t){var r,i=this;if("string"==typeof e?e=k[r=e]:r=e.getAuthType(),t&&t.hasOwnProperty("authData")){var n=this.get("authData")||{};if("object"!==(void 0===n?"undefined":(0,a.default)(n)))throw new Error("Invalid type: authData field should be an object");return n[r]=t.authData,p.default.getUserController().linkWith(this,n)}return new s.default(function(n,o){e.authenticate({success:function(e,t){var r={};r.authData=t,i._linkWith(e,r).then(function(){n(i)},function(e){o(e)})},error:function(e,t){o(t)}})})}},{key:"_synchronizeAuthData",value:function(e){if(this.isCurrent()&&e){var t;"string"==typeof e?e=k[t=e]:t=e.getAuthType();var r=this.get("authData");if(e&&r&&"object"===(void 0===r?"undefined":(0,a.default)(r)))e.restoreAuthentication(r[t])||this._unlinkFrom(e)}}},{key:"_synchronizeAllAuthData",value:function(){var e=this.get("authData");if("object"===(void 0===e?"undefined":(0,a.default)(e)))for(var t in e)this._synchronizeAuthData(t)}},{key:"_cleanupAuthData",value:function(){if(this.isCurrent()){var e=this.get("authData");if("object"===(void 0===e?"undefined":(0,a.default)(e)))for(var t in e)e[t]||delete e[t]}}},{key:"_unlinkFrom",value:function(e){var t=this;return"string"==typeof e?e=k[e]:e.getAuthType(),this._linkWith(e,{authData:null}).then(function(){return t._synchronizeAuthData(e),s.default.resolve(t)})}},{key:"_isLinked",value:function(e){var t;t="string"==typeof e?e:e.getAuthType();var r=this.get("authData")||{};return"object"===(void 0===r?"undefined":(0,a.default)(r))&&!!r[t]}},{key:"_logOutWithAll",value:function(){var e=this.get("authData");if("object"===(void 0===e?"undefined":(0,a.default)(e)))for(var t in e)this._logOutWith(t)}},{key:"_logOutWith",value:function(e){this.isCurrent()&&("string"==typeof e&&(e=k[e]),e&&e.deauthenticate&&e.deauthenticate())}},{key:"_preserveFieldsOnFetch",value:function(){return{sessionToken:this.get("sessionToken")}}},{key:"isCurrent",value:function(){var e=o.current();return!!e&&e.id===this.id}},{key:"getUsername",value:function(){var e=this.get("username");return null==e||"string"==typeof e?e:""}},{key:"setUsername",value:function(e){var t=this.get("authData");t&&"object"===(void 0===t?"undefined":(0,a.default)(t))&&t.hasOwnProperty("anonymous")&&(t.anonymous=null),this.set("username",e)}},{key:"setPassword",value:function(e){this.set("password",e)}},{key:"getEmail",value:function(){var e=this.get("email");return null==e||"string"==typeof e?e:""}},{key:"setEmail",value:function(e){return this.set("email",e)}},{key:"getSessionToken",value:function(){var e=this.get("sessionToken");return null==e||"string"==typeof e?e:""}},{key:"authenticated",value:function(){var e=o.current();return!!this.get("sessionToken")&&!!e&&e.id===this.id}},{key:"signUp",value:function(e,t){var r={};return(t=t||{}).hasOwnProperty("useMasterKey")&&(r.useMasterKey=t.useMasterKey),t.hasOwnProperty("installationId")&&(r.installationId=t.installationId),p.default.getUserController().signUp(this,e,r)}},{key:"logIn",value:function(e){var t={};return(e=e||{}).hasOwnProperty("useMasterKey")&&(t.useMasterKey=e.useMasterKey),e.hasOwnProperty("installationId")&&(t.installationId=e.installationId),p.default.getUserController().logIn(this,t)}},{key:"save",value:function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return(0,d.default)(o.prototype.__proto__||(0,u.default)(o.prototype),"save",this).apply(this,r).then(function(){return e.isCurrent()?p.default.getUserController().updateUserOnDisk(e):e})}},{key:"destroy",value:function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return(0,d.default)(o.prototype.__proto__||(0,u.default)(o.prototype),"destroy",this).apply(this,r).then(function(){return e.isCurrent()?p.default.getUserController().removeUserFromDisk():e})}},{key:"fetch",value:function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return(0,d.default)(o.prototype.__proto__||(0,u.default)(o.prototype),"fetch",this).apply(this,r).then(function(){return e.isCurrent()?p.default.getUserController().updateUserOnDisk(e):e})}}],[{key:"readOnlyAttributes",value:function(){return["sessionToken"]}},{key:"extend",value:function(e,t){if(e)for(var r in e)"className"!==r&&(0,i.default)(o.prototype,r,{value:e[r],enumerable:!1,writable:!0,configurable:!0});if(t)for(var r in t)"className"!==r&&(0,i.default)(o,r,{value:t[r],enumerable:!1,writable:!0,configurable:!0});return o}},{key:"current",value:function(){return j?p.default.getUserController().currentUser():null}},{key:"currentAsync",value:function(){return j?p.default.getUserController().currentUserAsync():s.default.resolve(null)}},{key:"signUp",value:function(e,t,r,n){return(r=r||{}).username=e,r.password=t,new o(r).signUp({},n)}},{key:"logIn",value:function(e,t,r){if("string"!=typeof e)return s.default.reject(new v.default(v.default.OTHER_CAUSE,"Username must be a string."));if("string"!=typeof t)return s.default.reject(new v.default(v.default.OTHER_CAUSE,"Password must be a string."));var n=new o;return n._finishFetch({username:e,password:t}),n.logIn(r)}},{key:"become",value:function(e,t){if(!j)throw new Error("It is not memory-safe to become a user in a server environment");var r={sessionToken:e};return(t=t||{}).hasOwnProperty("useMasterKey")&&(r.useMasterKey=t.useMasterKey),p.default.getUserController().become(r)}},{key:"logInWith",value:function(e,t){return o._logInWith(e,t)}},{key:"logOut",value:function(){if(!j)throw new Error("There is no current user on a node.js server environment.");return p.default.getUserController().logOut()}},{key:"requestPasswordReset",value:function(e,t){var r={};return(t=t||{}).hasOwnProperty("useMasterKey")&&(r.useMasterKey=t.useMasterKey),p.default.getUserController().requestPasswordReset(e,r)}},{key:"allowCustomUserClass",value:function(e){p.default.set("PERFORM_USER_REWRITE",!e)}},{key:"enableRevocableSession",value:function(e){if(e=e||{},p.default.set("FORCE_REVOCABLE_SESSION",!0),j){var t=o.current();if(t)return t._upgradeToRevocableSession(e)}return s.default.resolve()}},{key:"enableUnsafeCurrentUser",value:function(){j=!0}},{key:"disableUnsafeCurrentUser",value:function(){j=!1}},{key:"_registerAuthenticationProvider",value:function(t){k[t.getAuthType()]=t,o.currentAsync().then(function(e){e&&e._synchronizeAuthData(t.getAuthType())})}},{key:"_logInWith",value:function(e,t){return(new o)._linkWith(e,t)}},{key:"_clearCache",value:function(){C=null,w=!1}},{key:"_setCurrentUserCache",value:function(e){C=e}}]),o}(o.default);o.default.registerSubclass("_User",O);var S={updateUserOnDisk:function(e){var t=b.default.generatePath(m),r=e.toJSON();return r.className="_User",b.default.setItemAsync(t,(0,n.default)(r)).then(function(){return e})},removeUserFromDisk:function(){var e=b.default.generatePath(m);return w=!0,C=null,b.default.removeItemAsync(e)},setCurrentUser:function(e){return(C=e)._cleanupAuthData(),e._synchronizeAllAuthData(),S.updateUserOnDisk(e)},currentUser:function(){if(C)return C;if(w)return null;if(b.default.async())throw new Error("Cannot call currentUser() when using a platform with an async storage system. Call currentUserAsync() instead.");var e=b.default.generatePath(m),t=b.default.getItem(e);if(w=!0,!t)return C=null;(t=JSON.parse(t)).className||(t.className="_User"),t._id&&(t.objectId!==t._id&&(t.objectId=t._id),delete t._id),t._sessionToken&&(t.sessionToken=t._sessionToken,delete t._sessionToken);var r=o.default.fromJSON(t);return(C=r)._synchronizeAllAuthData(),r},currentUserAsync:function(){if(C)return s.default.resolve(C);if(w)return s.default.resolve(null);var e=b.default.generatePath(m);return b.default.getItemAsync(e).then(function(e){if(w=!0,!e)return C=null,s.default.resolve(null);(e=JSON.parse(e)).className||(e.className="_User"),e._id&&(e.objectId!==e._id&&(e.objectId=e._id),delete e._id),e._sessionToken&&(e.sessionToken=e._sessionToken,delete e._sessionToken);var t=o.default.fromJSON(e);return(C=t)._synchronizeAllAuthData(),s.default.resolve(t)})},signUp:function(e,t,r){var n=t&&t.username||e.get("username"),o=t&&t.password||e.get("password");return n&&n.length?o&&o.length?e.save(t,r).then(function(){return e._finishFetch({password:void 0}),j?S.setCurrentUser(e):e}):s.default.reject(new v.default(v.default.OTHER_CAUSE,"Cannot sign up user with an empty password.")):s.default.reject(new v.default(v.default.OTHER_CAUSE,"Cannot sign up user with an empty name."))},logIn:function(t,e){var r=p.default.getRESTController(),n=p.default.getObjectStateController(),o={username:t.get("username"),password:t.get("password")};return r.request("GET","login",o,e).then(function(e){return t._migrateId(e.objectId),t._setExisted(!0),n.setPendingOp(t._getStateIdentifier(),"username",void 0),n.setPendingOp(t._getStateIdentifier(),"password",void 0),e.password=void 0,t._finishFetch(e),j?S.setCurrentUser(t):s.default.resolve(t)})},become:function(e){var t=new O;return p.default.getRESTController().request("GET","users/me",{},e).then(function(e){return t._finishFetch(e),t._setExisted(!0),S.setCurrentUser(t)})},logOut:function(){return S.currentUserAsync().then(function(e){var t=b.default.generatePath(m),r=b.default.removeItemAsync(t),n=p.default.getRESTController();if(null!==e){var o=e.getSessionToken();o&&(0,_.default)(o)&&(r=r.then(function(){return n.request("POST","logout",{},{sessionToken:o})})),e._logOutWithAll(),e._finishFetch({sessionToken:void 0})}return w=!0,C=null,r})},requestPasswordReset:function(e,t){return p.default.getRESTController().request("POST","requestPasswordReset",{email:e},t)},upgradeToRevocableSession:function(r,e){var t=r.getSessionToken();return t?(e.sessionToken=t,p.default.getRESTController().request("POST","upgradeToRevocableSession",{},e).then(function(e){var t=new y.default;return t._finishFetch(e),r._finishFetch({sessionToken:t.getSessionToken()}),r.isCurrent()?S.setCurrentUser(r):s.default.resolve(r)})):s.default.reject(new v.default(v.default.SESSION_MISSING,"Cannot upgrade a user with no session token"))},linkWith:function(e,t){return e.save({authData:t}).then(function(){return j?S.setCurrentUser(e):e})}};p.default.setUserController(S),r.default=O},{"./CoreManager":3,"./ParseError":13,"./ParseObject":18,"./ParseSession":25,"./Storage":30,"./isRevocableSession":40,"babel-runtime/core-js/json/stringify":46,"babel-runtime/core-js/object/define-property":49,"babel-runtime/core-js/object/get-prototype-of":52,"babel-runtime/core-js/promise":55,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60,"babel-runtime/helpers/get":61,"babel-runtime/helpers/inherits":62,"babel-runtime/helpers/possibleConstructorReturn":63,"babel-runtime/helpers/typeof":64}],27:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=s(e("babel-runtime/helpers/typeof"));r.send=function(e,t){t=t||{},e.where&&e.where instanceof i.default&&(e.where=e.where.toJSON().where);e.push_time&&"object"===(0,n.default)(e.push_time)&&(e.push_time=e.push_time.toJSON());e.expiration_time&&"object"===(0,n.default)(e.expiration_time)&&(e.expiration_time=e.expiration_time.toJSON());if(e.expiration_time&&e.expiration_interval)throw new Error("expiration_time and expiration_interval cannot both be set.");return o.default.getPushController().send(e,{useMasterKey:t.useMasterKey})};var o=s(e("./CoreManager")),i=s(e("./ParseQuery"));function s(e){return e&&e.__esModule?e:{default:e}}var a={send:function(e,t){return o.default.getRESTController().request("POST","push",e,{useMasterKey:!!t.useMasterKey})}};o.default.setPushController(a)},{"./CoreManager":3,"./ParseQuery":21,"babel-runtime/helpers/typeof":64}],28:[function(t,r,e){(function(f){"use strict";var d=e(t("babel-runtime/helpers/typeof")),h=e(t("babel-runtime/core-js/json/stringify")),p=e(t("babel-runtime/core-js/promise")),_=e(t("./CoreManager")),v=e(t("./ParseError"));e(t("./Storage"));function e(e){return e&&e.__esModule?e:{default:e}}var y=null;"undefined"!=typeof XMLHttpRequest&&(y=XMLHttpRequest);var b=!1;"undefined"==typeof XDomainRequest||"withCredentials"in new XMLHttpRequest||(b=!0);var g={ajax:function(t,i,s,a){if(b)return e=t,o=i,u=s,new p.default(function(t,r){var n=new XDomainRequest;n.onload=function(){var e;try{e=JSON.parse(n.responseText)}catch(e){r(e)}e&&t({response:e})},n.onerror=n.ontimeout=function(){var e={responseText:(0,h.default)({code:v.default.X_DOMAIN_REQUEST,error:"IE's XDomainRequest does not supply error info."})};r(e)},n.onprogress=function(){},n.open(e,o),n.send(u)});var e,o,u,r,n,l=new p.default(function(e,t){r=e,n=t});l.resolve=r,l.reject=n;var c=0;return function r(){if(null==y)throw new Error("Cannot make a request: No definition of XMLHttpRequest was found.");var n=!1,o=new y;for(var e in o.onreadystatechange=function(){if(4===o.readyState&&!n)if(n=!0,200<=o.status&&o.status<300){var e;try{e=JSON.parse(o.responseText),"function"==typeof o.getResponseHeader&&(o.getAllResponseHeaders()||"").includes("x-parse-job-status-id: ")&&(e=o.getResponseHeader("x-parse-job-status-id"))}catch(e){l.reject(e.toString())}e&&l.resolve({response:e,status:o.status,xhr:o})}else if(500<=o.status||0===o.status)if(++c<_.default.get("REQUEST_ATTEMPT_LIMIT")){var t=Math.round(125*Math.random()*Math.pow(2,c));setTimeout(r,t)}else 0===o.status?l.reject("Unable to connect to the Parse API"):l.reject(o);else l.reject(o)},"string"!=typeof(a=a||{})["Content-Type"]&&(a["Content-Type"]="text/plain"),_.default.get("IS_NODE")&&(a["User-Agent"]="Parse/"+_.default.get("VERSION")+" (NodeJS "+f.versions.node+")"),o.open(t,i,!0),a)o.setRequestHeader(e,a[e]);o.send(s)}(),l},request:function(r,e,t,n){n=n||{};var o=_.default.get("SERVER_URL");"/"!==o[o.length-1]&&(o+="/"),o+=e;var i={};if(t&&"object"===(void 0===t?"undefined":(0,d.default)(t)))for(var s in t)i[s]=t[s];"POST"!==r&&(i._method=r,r="POST"),i._ApplicationId=_.default.get("APPLICATION_ID");var a=_.default.get("JAVASCRIPT_KEY");a&&(i._JavaScriptKey=a),i._ClientVersion=_.default.get("VERSION");var u=n.useMasterKey;if(void 0===u&&(u=_.default.get("USE_MASTER_KEY")),u){if(!_.default.get("MASTER_KEY"))throw new Error("Cannot use the Master Key, it has not been provided.");delete i._JavaScriptKey,i._MasterKey=_.default.get("MASTER_KEY")}_.default.get("FORCE_REVOCABLE_SESSION")&&(i._RevocableSession="1");var l,c=n.installationId;c&&"string"==typeof c?l=p.default.resolve(c):l=_.default.getInstallationController().currentInstallationId();return l.then(function(e){i._InstallationId=e;var t=_.default.getUserController();return n&&"string"==typeof n.sessionToken?p.default.resolve(n.sessionToken):t?t.currentUserAsync().then(function(e){return e?p.default.resolve(e.getSessionToken()):p.default.resolve(null)}):p.default.resolve(null)}).then(function(e){e&&(i._SessionToken=e);var t=(0,h.default)(i);return g.ajax(r,o,t).then(function(e){return e.response})}).catch(function(t){var r;if(t&&t.responseText)try{var e=JSON.parse(t.responseText);r=new v.default(e.code,e.error)}catch(e){r=new v.default(v.default.INVALID_JSON,"Received an error with invalid JSON from Parse: "+t.responseText)}else r=new v.default(v.default.CONNECTION_FAILED,"XMLHttpRequest failed: "+(0,h.default)(t));return p.default.reject(r)})},_setXHR:function(e){y=e}};r.exports=g}).call(this,t("_process"))},{"./CoreManager":3,"./ParseError":13,"./Storage":30,_process:65,"babel-runtime/core-js/json/stringify":46,"babel-runtime/core-js/promise":55,"babel-runtime/helpers/typeof":64}],29:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getState=i,r.initializeState=s,r.removeState=function(e){var t=i(e);if(null===t)return null;return delete n[e.className][e.id],t},r.getServerData=a,r.setServerData=function(e,t){var r=s(e).serverData;o.setServerData(r,t)},r.getPendingOps=u,r.setPendingOp=function(e,t,r){var n=s(e).pendingOps;o.setPendingOp(n,t,r)},r.pushPendingState=function(e){var t=s(e).pendingOps;o.pushPendingState(t)},r.popPendingState=function(e){var t=s(e).pendingOps;return o.popPendingState(t)},r.mergeFirstPendingState=function(e){var t=u(e);o.mergeFirstPendingState(t)},r.getObjectCache=function(e){var t=i(e);if(t)return t.objectCache;return{}},r.estimateAttribute=function(e,t){var r=a(e),n=u(e);return o.estimateAttribute(r,n,e.className,e.id,t)},r.estimateAttributes=function(e){var t=a(e),r=u(e);return o.estimateAttributes(t,r,e.className,e.id)},r.commitServerChanges=function(e,t){var r=s(e);o.commitServerChanges(r.serverData,r.objectCache,t)},r.enqueueTask=function(e,t){return s(e).tasks.enqueue(t)},r.clearAllState=function(){n={}},r.duplicateState=function(e,t){t.id=e.id};var o=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("./ObjectStateMutations"));var n={};function i(e){var t=n[e.className];return t&&t[e.id]||null}function s(e,t){var r=i(e);return r||(n[e.className]||(n[e.className]={}),t||(t=o.defaultState()),r=n[e.className][e.id]=t)}function a(e){var t=i(e);return t?t.serverData:{}}function u(e){var t=i(e);return t?t.pendingOps:[{}]}},{"./ObjectStateMutations":9}],30:[function(e,t,r){"use strict";var n=i(e("babel-runtime/core-js/promise")),o=i(e("./CoreManager"));function i(e){return e&&e.__esModule?e:{default:e}}var s={async:function(){return!!o.default.getStorageController().async},getItem:function(e){var t=o.default.getStorageController();if(1===t.async)throw new Error("Synchronous storage is not supported by the current storage controller");return t.getItem(e)},getItemAsync:function(e){var t=o.default.getStorageController();return 1===t.async?t.getItemAsync(e):n.default.resolve(t.getItem(e))},setItem:function(e,t){var r=o.default.getStorageController();if(1===r.async)throw new Error("Synchronous storage is not supported by the current storage controller");return r.setItem(e,t)},setItemAsync:function(e,t){var r=o.default.getStorageController();return 1===r.async?r.setItemAsync(e,t):n.default.resolve(r.setItem(e,t))},removeItem:function(e){var t=o.default.getStorageController();if(1===t.async)throw new Error("Synchronous storage is not supported by the current storage controller");return t.removeItem(e)},removeItemAsync:function(e){var t=o.default.getStorageController();return 1===t.async?t.removeItemAsync(e):n.default.resolve(t.removeItem(e))},generatePath:function(e){if(!o.default.get("APPLICATION_ID"))throw new Error("You need to call Parse.initialize before using Parse.");if("string"!=typeof e)throw new Error("Tried to get a Storage path that was not a String.");return"/"===e[0]&&(e=e.substr(1)),"Parse/"+o.default.get("APPLICATION_ID")+"/"+e},_clear:function(){var e=o.default.getStorageController();e.hasOwnProperty("clear")&&e.clear()}};t.exports=s,o.default.setStorageController(e("./StorageController.browser"))},{"./CoreManager":3,"./StorageController.browser":31,"babel-runtime/core-js/promise":55}],31:[function(e,t,r){"use strict";var n={async:0,getItem:function(e){return localStorage.getItem(e)},setItem:function(e,t){try{localStorage.setItem(e,t)}catch(e){}},removeItem:function(e){localStorage.removeItem(e)},clear:function(){localStorage.clear()}};t.exports=n},{}],32:[function(e,t,r){"use strict";var i=s(e("babel-runtime/core-js/promise")),n=s(e("babel-runtime/helpers/classCallCheck")),o=s(e("babel-runtime/helpers/createClass"));function s(e){return e&&e.__esModule?e:{default:e}}var a=function(){function e(){(0,n.default)(this,e),this.queue=[]}return(0,o.default)(e,[{key:"enqueue",value:function(e){var r,n,t=this,o=new i.default(function(e,t){r=e,n=t});return o.resolve=r,o.reject=n,this.queue.push({task:e,_completion:o}),1===this.queue.length&&e().then(function(){t._dequeue(),o.resolve()},function(e){t._dequeue(),o.reject(e)}),o}},{key:"_dequeue",value:function(){var t=this;if(this.queue.shift(),this.queue.length){var r=this.queue[0];r.task().then(function(){t._dequeue(),r._completion.resolve()},function(e){t._dequeue(),r._completion.reject(e)})}}}]),e}();t.exports=a},{"babel-runtime/core-js/promise":55,"babel-runtime/helpers/classCallCheck":59,"babel-runtime/helpers/createClass":60}],33:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=s(e("babel-runtime/core-js/weak-map"));r.getState=u,r.initializeState=l,r.removeState=function(e){var t=u(e);if(null===t)return null;return a.delete(e),t},r.getServerData=c,r.setServerData=function(e,t){var r=l(e).serverData;o.setServerData(r,t)},r.getPendingOps=f,r.setPendingOp=function(e,t,r){var n=l(e).pendingOps;o.setPendingOp(n,t,r)},r.pushPendingState=function(e){var t=l(e).pendingOps;o.pushPendingState(t)},r.popPendingState=function(e){var t=l(e).pendingOps;return o.popPendingState(t)},r.mergeFirstPendingState=function(e){var t=f(e);o.mergeFirstPendingState(t)},r.getObjectCache=function(e){var t=u(e);if(t)return t.objectCache;return{}},r.estimateAttribute=function(e,t){var r=c(e),n=f(e);return o.estimateAttribute(r,n,e.className,e.id,t)},r.estimateAttributes=function(e){var t=c(e),r=f(e);return o.estimateAttributes(t,r,e.className,e.id)},r.commitServerChanges=function(e,t){var r=l(e);o.commitServerChanges(r.serverData,r.objectCache,t)},r.enqueueTask=function(e,t){return l(e).tasks.enqueue(t)},r.duplicateState=function(e,t){var r=l(e),n=l(t);for(var o in r.serverData)n.serverData[o]=r.serverData[o];for(var i=0;i<r.pendingOps.length;i++)for(var s in r.pendingOps[i])n.pendingOps[i][s]=r.pendingOps[i][s];for(var a in r.objectCache)n.objectCache[a]=r.objectCache[a];n.existed=r.existed},r.clearAllState=function(){a=new n.default};var o=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}}(e("./ObjectStateMutations")),i=s(e("./TaskQueue"));function s(e){return e&&e.__esModule?e:{default:e}}var a=new n.default;function u(e){return a.get(e)||null}function l(e,t){var r=u(e);return r||(t||(t={serverData:{},pendingOps:[{}],objectCache:{},tasks:new i.default,existed:!1}),r=t,a.set(e,r),r)}function c(e){var t=u(e);return t?t.serverData:{}}function f(e){var t=u(e);return t?t.pendingOps:[{}]}},{"./ObjectStateMutations":9,"./TaskQueue":32,"babel-runtime/core-js/weak-map":58}],34:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){if(-1<e.indexOf(t))return!0;for(var r=0;r<e.length;r++)if(e[r]instanceof i.default&&e[r].className===t.className&&e[r]._getId()===t._getId())return!0;return!1};var n,o=e("./ParseObject"),i=(n=o)&&n.__esModule?n:{default:n}},{"./ParseObject":18}],35:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(e("babel-runtime/helpers/typeof"));r.default=function(e){if(!(e instanceof i.default))return!0;var t=e.attributes;for(var r in t){var n=t[r];if(!u(n))return!1}return!0};var o=a(e("./ParseFile")),i=a(e("./ParseObject")),s=a(e("./ParseRelation"));function a(e){return e&&e.__esModule?e:{default:e}}function u(e){if("object"!==(void 0===e?"undefined":(0,n.default)(e)))return!0;if(e instanceof s.default)return!0;if(e instanceof i.default)return!!e.id;if(e instanceof o.default)return!!e.url();if(Array.isArray(e)){for(var t=0;t<e.length;t++)if(!u(e[t]))return!1;return!0}for(var r in e)if(!u(e[r]))return!1;return!0}},{"./ParseFile":14,"./ParseObject":18,"./ParseRelation":22,"babel-runtime/helpers/typeof":64}],36:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s=n(e("babel-runtime/helpers/typeof"));r.default=function r(e){if(null===e||"object"!==(void 0===e?"undefined":(0,s.default)(e)))return e;if(Array.isArray(e)){var n=[];return e.forEach(function(e,t){n[t]=r(e)}),n}if("string"==typeof e.__op)return(0,f.opFromJSON)(e);if("Pointer"===e.__type&&e.className)return c.default.fromJSON(e);if("Object"===e.__type&&e.className)return c.default.fromJSON(e);if("Relation"===e.__type){var t=new d.default(null,null);return t.targetClassName=e.className,t}if("Date"===e.__type)return new Date(e.iso);if("File"===e.__type)return a.default.fromJSON(e);if("GeoPoint"===e.__type)return new u.default({latitude:e.latitude,longitude:e.longitude});if("Polygon"===e.__type)return new l.default(e.coordinates);var o={};for(var i in e)o[i]=r(e[i]);return o};n(e("./ParseACL"));var a=n(e("./ParseFile")),u=n(e("./ParseGeoPoint")),l=n(e("./ParsePolygon")),c=n(e("./ParseObject")),f=e("./ParseOp"),d=n(e("./ParseRelation"));function n(e){return e&&e.__esModule?e:{default:e}}},{"./ParseACL":11,"./ParseFile":14,"./ParseGeoPoint":15,"./ParseObject":18,"./ParseOp":19,"./ParsePolygon":20,"./ParseRelation":22,"babel-runtime/helpers/typeof":64}],37:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var u=n(e("babel-runtime/helpers/typeof")),l=n(e("babel-runtime/core-js/object/keys"));r.default=function(e,t,r,n){return function t(e,r,n,o){if(e instanceof p.default){if(r)throw new Error("Parse Objects not allowed here");var i=e.id?e.className+":"+e.id:e;return n||!o||-1<o.indexOf(i)||e.dirty()||(0,l.default)(e._getServerData()).length<1?e.toPointer():(o=o.concat(i),e._toFullJSON(o))}if(e instanceof _.Op||e instanceof c.default||e instanceof d.default||e instanceof h.default||e instanceof v.default)return e.toJSON();if(e instanceof f.default){if(!e.url())throw new Error("Tried to encode an unsaved file.");return e.toJSON()}if("[object Date]"===y.call(e)){if(isNaN(e))throw new Error("Tried to encode an invalid date.");return{__type:"Date",iso:e.toJSON()}}if("[object RegExp]"===y.call(e)&&"string"==typeof e.source)return e.source;if(Array.isArray(e))return e.map(function(e){return t(e,r,n,o)});if(e&&"object"===(void 0===e?"undefined":(0,u.default)(e))){var s={};for(var a in e)s[a]=t(e[a],r,n,o);return s}return e}(e,!!t,!!r,n||[])};var c=n(e("./ParseACL")),f=n(e("./ParseFile")),d=n(e("./ParseGeoPoint")),h=n(e("./ParsePolygon")),p=n(e("./ParseObject")),_=e("./ParseOp"),v=n(e("./ParseRelation"));function n(e){return e&&e.__esModule?e:{default:e}}var y=Object.prototype.toString},{"./ParseACL":11,"./ParseFile":14,"./ParseGeoPoint":15,"./ParseObject":18,"./ParseOp":19,"./ParsePolygon":20,"./ParseRelation":22,"babel-runtime/core-js/object/keys":53,"babel-runtime/helpers/typeof":64}],38:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=n(e("babel-runtime/core-js/object/keys")),s=n(e("babel-runtime/helpers/typeof"));r.default=function e(t,r){if((void 0===t?"undefined":(0,s.default)(t))!==(void 0===r?"undefined":(0,s.default)(r)))return!1;if(!t||"object"!==(void 0===t?"undefined":(0,s.default)(t)))return t===r;if(Array.isArray(t)||Array.isArray(r)){if(!Array.isArray(t)||!Array.isArray(r))return!1;if(t.length!==r.length)return!1;for(var n=t.length;n--;)if(!e(t[n],r[n]))return!1;return!0}if(t instanceof a.default||t instanceof u.default||t instanceof l.default||t instanceof c.default)return t.equals(r);if((0,i.default)(t).length!==(0,i.default)(r).length)return!1;for(var o in t)if(!e(t[o],r[o]))return!1;return!0};var a=n(e("./ParseACL")),u=n(e("./ParseFile")),l=n(e("./ParseGeoPoint")),c=n(e("./ParseObject"));function n(e){return e&&e.__esModule?e:{default:e}}},{"./ParseACL":11,"./ParseFile":14,"./ParseGeoPoint":15,"./ParseObject":18,"babel-runtime/core-js/object/keys":53,"babel-runtime/helpers/typeof":64}],39:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return e.replace(/[&<>\/'"]/g,function(e){return n[e]})};var n={"&":"&amp;","<":"&lt;",">":"&gt;","/":"&#x2F;","'":"&#x27;",'"':"&quot;"}},{}],40:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return-1<e.indexOf("r:")}},{}],41:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){var t=new RegExp("^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2})T([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})(.([0-9]+))?Z$").exec(e);if(!t)return null;var r=t[1]||0,n=(t[2]||1)-1,o=t[3]||0,i=t[4]||0,s=t[5]||0,a=t[6]||0,u=t[8]||0;return new Date(Date.UTC(r,n,o,i,s,a,u))}},{}],42:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,o=e("babel-runtime/core-js/promise"),d=(n=o)&&n.__esModule?n:{default:n};function h(){var r=void 0,n=void 0,e=new d.default(function(e,t){r=e,n=t});return e.resolve=r,e.reject=n,e}r.resolvingPromise=h,r.when=function(e){var t,r=Array.isArray(e);t=r?e:arguments;var n=t.length,o=!1,i=[],s=r?[i]:i,a=[];if(i.length=t.length,a.length=t.length,0===n)return d.default.resolve(s);for(var u=new h,l=function(){--n<=0&&(o?u.reject(a):u.resolve(s))},c=function(e,t){e&&"function"==typeof e.then?e.then(function(e){i[t]=e,l()},function(e){a[t]=e,o=!0,l()}):(i[f]=e,l())},f=0;f<t.length;f++)c(t[f],f);return u},r.continueWhile=function e(t,r){if(t())return r().then(function(){return e(t,r)});return d.default.resolve()}},{"babel-runtime/core-js/promise":55}],43:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){var t=[];return e.forEach(function(e){e instanceof o.default?(0,n.default)(t,e)||t.push(e):t.indexOf(e)<0&&t.push(e)}),t};var n=i(e("./arrayContainsObject")),o=i(e("./ParseObject"));function i(e){return e&&e.__esModule?e:{default:e}}},{"./ParseObject":18,"./arrayContainsObject":34}],44:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var u=n(e("babel-runtime/helpers/typeof"));r.default=function(e,t){var r={objects:{},files:[]},n=e.className+":"+e._getId();r.objects[n]=!e.dirty()||e;var o=e.attributes;for(var i in o)"object"===(0,u.default)(o[i])&&d(o[i],r,!1,!!t);var s=[];for(var a in r.objects)a!==n&&!0!==r.objects[a]&&s.push(r.objects[a]);return s.concat(r.files)};var l=n(e("./ParseFile")),c=n(e("./ParseObject")),f=n(e("./ParseRelation"));function n(e){return e&&e.__esModule?e:{default:e}}function d(e,t,r,n){if(e instanceof c.default){if(!e.id&&r)throw new Error("Cannot create a pointer to an unsaved Object.");var o=e.className+":"+e._getId();if(!t.objects[o]){t.objects[o]=!e.dirty()||e;var i=e.attributes;for(var s in i)"object"===(0,u.default)(i[s])&&d(i[s],t,!n,n)}}else if(e instanceof l.default)!e.url()&&t.files.indexOf(e)<0&&t.files.push(e);else if(!(e instanceof f.default))for(var a in Array.isArray(e)&&e.forEach(function(e){"object"===(void 0===e?"undefined":(0,u.default)(e))&&d(e,t,r,n)}),e)"object"===(0,u.default)(e[a])&&d(e[a],t,r,n)}},{"./ParseFile":14,"./ParseObject":18,"./ParseRelation":22,"babel-runtime/helpers/typeof":64}],45:[function(e,t,r){t.exports={default:e("core-js/library/fn/get-iterator"),__esModule:!0}},{"core-js/library/fn/get-iterator":66}],46:[function(e,t,r){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":67}],47:[function(e,t,r){t.exports={default:e("core-js/library/fn/map"),__esModule:!0}},{"core-js/library/fn/map":68}],48:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":69}],49:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":70}],50:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/freeze"),__esModule:!0}},{"core-js/library/fn/object/freeze":71}],51:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/get-own-property-descriptor"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-descriptor":72}],52:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":73}],53:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":74}],54:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/set-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/set-prototype-of":75}],55:[function(e,t,r){t.exports={default:e("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":76}],56:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":77}],57:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":78}],58:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-map"),__esModule:!0}},{"core-js/library/fn/weak-map":79}],59:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],60:[function(e,t,r){"use strict";r.__esModule=!0;var n,o=e("../core-js/object/define-property"),i=(n=o)&&n.__esModule?n:{default:n};r.default=function(){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,i.default)(e,n.key,n)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}}()},{"../core-js/object/define-property":49}],61:[function(e,t,r){"use strict";r.__esModule=!0;var a=n(e("../core-js/object/get-prototype-of")),u=n(e("../core-js/object/get-own-property-descriptor"));function n(e){return e&&e.__esModule?e:{default:e}}r.default=function e(t,r,n){null===t&&(t=Function.prototype);var o=(0,u.default)(t,r);if(void 0===o){var i=(0,a.default)(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(n):void 0}},{"../core-js/object/get-own-property-descriptor":51,"../core-js/object/get-prototype-of":52}],62:[function(e,t,r){"use strict";r.__esModule=!0;var n=s(e("../core-js/object/set-prototype-of")),o=s(e("../core-js/object/create")),i=s(e("../helpers/typeof"));function s(e){return e&&e.__esModule?e:{default:e}}r.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,i.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(n.default?(0,n.default)(e,t):e.__proto__=t)}},{"../core-js/object/create":48,"../core-js/object/set-prototype-of":54,"../helpers/typeof":64}],63:[function(e,t,r){"use strict";r.__esModule=!0;var n,o=e("../helpers/typeof"),i=(n=o)&&n.__esModule?n:{default:n};r.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},{"../helpers/typeof":64}],64:[function(e,t,r){"use strict";r.__esModule=!0;var n=s(e("../core-js/symbol/iterator")),o=s(e("../core-js/symbol")),i="function"==typeof o.default&&"symbol"==typeof n.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};function s(e){return e&&e.__esModule?e:{default:e}}r.default="function"==typeof o.default&&"symbol"===i(n.default)?function(e){return void 0===e?"undefined":i(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":i(e)}},{"../core-js/symbol":56,"../core-js/symbol/iterator":57}],65:[function(e,t,r){},{}],66:[function(e,t,r){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.get-iterator")},{"../modules/core.get-iterator":160,"../modules/es6.string.iterator":172,"../modules/web.dom.iterable":178}],67:[function(e,t,r){var n=e("../../modules/_core"),o=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(e){return o.stringify.apply(o,arguments)}},{"../../modules/_core":95}],68:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.map"),e("../modules/es7.map.to-json"),t.exports=e("../modules/_core").Map},{"../modules/_core":95,"../modules/es6.map":162,"../modules/es6.object.to-string":170,"../modules/es6.string.iterator":172,"../modules/es7.map.to-json":175,"../modules/web.dom.iterable":178}],69:[function(e,t,r){e("../../modules/es6.object.create");var n=e("../../modules/_core").Object;t.exports=function(e,t){return n.create(e,t)}},{"../../modules/_core":95,"../../modules/es6.object.create":163}],70:[function(e,t,r){e("../../modules/es6.object.define-property");var n=e("../../modules/_core").Object;t.exports=function(e,t,r){return n.defineProperty(e,t,r)}},{"../../modules/_core":95,"../../modules/es6.object.define-property":164}],71:[function(e,t,r){e("../../modules/es6.object.freeze"),t.exports=e("../../modules/_core").Object.freeze},{"../../modules/_core":95,"../../modules/es6.object.freeze":165}],72:[function(e,t,r){e("../../modules/es6.object.get-own-property-descriptor");var n=e("../../modules/_core").Object;t.exports=function(e,t){return n.getOwnPropertyDescriptor(e,t)}},{"../../modules/_core":95,"../../modules/es6.object.get-own-property-descriptor":166}],73:[function(e,t,r){e("../../modules/es6.object.get-prototype-of"),t.exports=e("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":95,"../../modules/es6.object.get-prototype-of":167}],74:[function(e,t,r){e("../../modules/es6.object.keys"),t.exports=e("../../modules/_core").Object.keys},{"../../modules/_core":95,"../../modules/es6.object.keys":168}],75:[function(e,t,r){e("../../modules/es6.object.set-prototype-of"),t.exports=e("../../modules/_core").Object.setPrototypeOf},{"../../modules/_core":95,"../../modules/es6.object.set-prototype-of":169}],76:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.promise"),t.exports=e("../modules/_core").Promise},{"../modules/_core":95,"../modules/es6.object.to-string":170,"../modules/es6.promise":171,"../modules/es6.string.iterator":172,"../modules/web.dom.iterable":178}],77:[function(e,t,r){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),e("../../modules/es7.symbol.async-iterator"),e("../../modules/es7.symbol.observable"),t.exports=e("../../modules/_core").Symbol},{"../../modules/_core":95,"../../modules/es6.object.to-string":170,"../../modules/es6.symbol":173,"../../modules/es7.symbol.async-iterator":176,"../../modules/es7.symbol.observable":177}],78:[function(e,t,r){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":157,"../../modules/es6.string.iterator":172,"../../modules/web.dom.iterable":178}],79:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/web.dom.iterable"),e("../modules/es6.weak-map"),t.exports=e("../modules/_core").WeakMap},{"../modules/_core":95,"../modules/es6.object.to-string":170,"../modules/es6.weak-map":174,"../modules/web.dom.iterable":178}],80:[function(e,t,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],81:[function(e,t,r){t.exports=function(){}},{}],82:[function(e,t,r){t.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},{}],83:[function(e,t,r){var n=e("./_is-object");t.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":114}],84:[function(e,t,r){var n=e("./_for-of");t.exports=function(e,t){var r=[];return n(e,!1,r.push,r,t),r}},{"./_for-of":104}],85:[function(e,t,r){var u=e("./_to-iobject"),l=e("./_to-length"),c=e("./_to-index");t.exports=function(a){return function(e,t,r){var n,o=u(e),i=l(o.length),s=c(r,i);if(a&&t!=t){for(;s<i;)if((n=o[s++])!=n)return!0}else for(;s<i;s++)if((a||s in o)&&o[s]===t)return a||s||0;return!a&&-1}}},{"./_to-index":149,"./_to-iobject":151,"./_to-length":152}],86:[function(e,t,r){var g=e("./_ctx"),m=e("./_iobject"),j=e("./_to-object"),w=e("./_to-length"),n=e("./_array-species-create");t.exports=function(f,e){var d=1==f,h=2==f,p=3==f,_=4==f,v=6==f,y=5==f||v,b=e||n;return function(e,t,r){for(var n,o,i=j(e),s=m(i),a=g(t,r,3),u=w(s.length),l=0,c=d?b(e,u):h?b(e,0):void 0;l<u;l++)if((y||l in s)&&(o=a(n=s[l],l,i),f))if(d)c[l]=o;else if(o)switch(f){case 3:return!0;case 5:return n;case 6:return l;case 2:c.push(n)}else if(_)return!1;return v?-1:p||_?_:c}}},{"./_array-species-create":88,"./_ctx":96,"./_iobject":111,"./_to-length":152,"./_to-object":153}],87:[function(e,t,r){var n=e("./_is-object"),o=e("./_is-array"),i=e("./_wks")("species");t.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),n(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},{"./_is-array":113,"./_is-object":114,"./_wks":158}],88:[function(e,t,r){var n=e("./_array-species-constructor");t.exports=function(e,t){return new(n(e))(t)}},{"./_array-species-constructor":87}],89:[function(e,t,r){var o=e("./_cof"),i=e("./_wks")("toStringTag"),s="Arguments"==o(function(){return arguments}());t.exports=function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:s?o(t):"Object"==(n=o(t))&&"function"==typeof t.callee?"Arguments":n}},{"./_cof":90,"./_wks":158}],90:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],91:[function(e,t,r){"use strict";var s=e("./_object-dp").f,a=e("./_object-create"),u=e("./_redefine-all"),l=e("./_ctx"),c=e("./_an-instance"),f=e("./_defined"),d=e("./_for-of"),n=e("./_iter-define"),o=e("./_iter-step"),i=e("./_set-species"),h=e("./_descriptors"),p=e("./_meta").fastKey,_=h?"_s":"size",v=function(e,t){var r,n=p(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};t.exports={getConstructor:function(e,r,n,o){var i=e(function(e,t){c(e,i,r,"_i"),e._i=a(null),e._f=void 0,e._l=void 0,e[_]=0,null!=t&&d(t,n,e[o],e)});return u(i.prototype,{clear:function(){for(var e=this,t=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete t[r.i];e._f=e._l=void 0,e[_]=0},delete:function(e){var t=this,r=v(t,e);if(r){var n=r.n,o=r.p;delete t._i[r.i],r.r=!0,o&&(o.n=n),n&&(n.p=o),t._f==r&&(t._f=n),t._l==r&&(t._l=o),t[_]--}return!!r},forEach:function(e){c(this,i,"forEach");for(var t,r=l(e,1<arguments.length?arguments[1]:void 0,3);t=t?t.n:this._f;)for(r(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!v(this,e)}}),h&&s(i.prototype,"size",{get:function(){return f(this[_])}}),i},def:function(e,t,r){var n,o,i=v(e,t);return i?i.v=r:(e._l=i={i:o=p(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=i),n&&(n.n=i),e[_]++,"F"!==o&&(e._i[o]=i)),e},getEntry:v,setStrong:function(e,t,r){n(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,r=e._l;r&&r.r;)r=r.p;return e._t&&(e._l=r=r?r.n:e._t._f)?o(0,"keys"==t?r.k:"values"==t?r.v:[r.k,r.v]):(e._t=void 0,o(1))},r?"entries":"values",!r,!0),i(t)}}},{"./_an-instance":82,"./_ctx":96,"./_defined":97,"./_descriptors":98,"./_for-of":104,"./_iter-define":117,"./_iter-step":119,"./_meta":123,"./_object-create":126,"./_object-dp":127,"./_redefine-all":139,"./_set-species":142}],92:[function(e,t,r){var n=e("./_classof"),o=e("./_array-from-iterable");t.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return o(this)}}},{"./_array-from-iterable":84,"./_classof":89}],93:[function(e,t,r){"use strict";var s=e("./_redefine-all"),a=e("./_meta").getWeak,o=e("./_an-object"),u=e("./_is-object"),l=e("./_an-instance"),c=e("./_for-of"),n=e("./_array-methods"),f=e("./_has"),i=n(5),d=n(6),h=0,p=function(e){return e._l||(e._l=new _)},_=function(){this.a=[]},v=function(e,t){return i(e.a,function(e){return e[0]===t})};_.prototype={get:function(e){var t=v(this,e);if(t)return t[1]},has:function(e){return!!v(this,e)},set:function(e,t){var r=v(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(t){var e=d(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(e,r,n,o){var i=e(function(e,t){l(e,i,r,"_i"),e._i=h++,e._l=void 0,null!=t&&c(t,n,e[o],e)});return s(i.prototype,{delete:function(e){if(!u(e))return!1;var t=a(e);return!0===t?p(this).delete(e):t&&f(t,this._i)&&delete t[this._i]},has:function(e){if(!u(e))return!1;var t=a(e);return!0===t?p(this).has(e):t&&f(t,this._i)}}),i},def:function(e,t,r){var n=a(o(t),!0);return!0===n?p(e).set(t,r):n[e._i]=r,e},ufstore:p}},{"./_an-instance":82,"./_an-object":83,"./_array-methods":86,"./_for-of":104,"./_has":106,"./_is-object":114,"./_meta":123,"./_redefine-all":139}],94:[function(e,t,r){"use strict";var f=e("./_global"),d=e("./_export"),h=e("./_meta"),p=e("./_fails"),_=e("./_hide"),v=e("./_redefine-all"),y=e("./_for-of"),b=e("./_an-instance"),g=e("./_is-object"),m=e("./_set-to-string-tag"),j=e("./_object-dp").f,w=e("./_array-methods")(0),C=e("./_descriptors");t.exports=function(r,e,t,n,o,i){var s=f[r],a=s,u=o?"set":"add",l=a&&a.prototype,c={};return C&&"function"==typeof a&&(i||l.forEach&&!p(function(){(new a).entries().next()}))?(a=e(function(e,t){b(e,a,r,"_c"),e._c=new s,null!=t&&y(t,o,e[u],e)}),w("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(n){var o="add"==n||"set"==n;n in l&&(!i||"clear"!=n)&&_(a.prototype,n,function(e,t){if(b(this,a,n),!o&&i&&!g(e))return"get"==n&&void 0;var r=this._c[n](0===e?0:e,t);return o?this:r})}),"size"in l&&j(a.prototype,"size",{get:function(){return this._c.size}})):(a=n.getConstructor(e,r,o,u),v(a.prototype,t),h.NEED=!0),m(a,r),c[r]=a,d(d.G+d.W+d.F,c),i||n.setStrong(a,r,o),a}},{"./_an-instance":82,"./_array-methods":86,"./_descriptors":98,"./_export":102,"./_fails":103,"./_for-of":104,"./_global":105,"./_hide":107,"./_is-object":114,"./_meta":123,"./_object-dp":127,"./_redefine-all":139,"./_set-to-string-tag":143}],95:[function(e,t,r){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},{}],96:[function(e,t,r){var i=e("./_a-function");t.exports=function(n,o,e){if(i(n),void 0===o)return n;switch(e){case 1:return function(e){return n.call(o,e)};case 2:return function(e,t){return n.call(o,e,t)};case 3:return function(e,t,r){return n.call(o,e,t,r)}}return function(){return n.apply(o,arguments)}}},{"./_a-function":80}],97:[function(e,t,r){t.exports=function(e){if(null==e)throw TypeError("Can't call method on  "+e);return e}},{}],98:[function(e,t,r){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":103}],99:[function(e,t,r){var n=e("./_is-object"),o=e("./_global").document,i=n(o)&&n(o.createElement);t.exports=function(e){return i?o.createElement(e):{}}},{"./_global":105,"./_is-object":114}],100:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],101:[function(e,t,r){var a=e("./_object-keys"),u=e("./_object-gops"),l=e("./_object-pie");t.exports=function(e){var t=a(e),r=u.f;if(r)for(var n,o=r(e),i=l.f,s=0;o.length>s;)i.call(e,n=o[s++])&&t.push(n);return t}},{"./_object-gops":132,"./_object-keys":135,"./_object-pie":136}],102:[function(e,t,r){var _=e("./_global"),v=e("./_core"),y=e("./_ctx"),b=e("./_hide"),g="prototype",m=function(e,t,r){var n,o,i,s=e&m.F,a=e&m.G,u=e&m.S,l=e&m.P,c=e&m.B,f=e&m.W,d=a?v:v[t]||(v[t]={}),h=d[g],p=a?_:u?_[t]:(_[t]||{})[g];for(n in a&&(r=t),r)(o=!s&&p&&void 0!==p[n])&&n in d||(i=o?p[n]:r[n],d[n]=a&&"function"!=typeof p[n]?r[n]:c&&o?y(i,_):f&&p[n]==i?function(n){var e=function(e,t,r){if(this instanceof n){switch(arguments.length){case 0:return new n;case 1:return new n(e);case 2:return new n(e,t)}return new n(e,t,r)}return n.apply(this,arguments)};return e[g]=n[g],e}(i):l&&"function"==typeof i?y(Function.call,i):i,l&&((d.virtual||(d.virtual={}))[n]=i,e&m.R&&h&&!h[n]&&b(h,n,i)))};m.F=1,m.G=2,m.S=4,m.P=8,m.B=16,m.W=32,m.U=64,m.R=128,t.exports=m},{"./_core":95,"./_ctx":96,"./_global":105,"./_hide":107}],103:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],104:[function(e,t,r){var d=e("./_ctx"),h=e("./_iter-call"),p=e("./_is-array-iter"),_=e("./_an-object"),v=e("./_to-length"),y=e("./core.get-iterator-method"),b={},g={};(r=t.exports=function(e,t,r,n,o){var i,s,a,u,l=o?function(){return e}:y(e),c=d(r,n,t?2:1),f=0;if("function"!=typeof l)throw TypeError(e+" is not iterable!");if(p(l)){for(i=v(e.length);f<i;f++)if((u=t?c(_(s=e[f])[0],s[1]):c(e[f]))===b||u===g)return u}else for(a=l.call(e);!(s=a.next()).done;)if((u=h(a,c,s.value,t))===b||u===g)return u}).BREAK=b,r.RETURN=g},{"./_an-object":83,"./_ctx":96,"./_is-array-iter":112,"./_iter-call":115,"./_to-length":152,"./core.get-iterator-method":159}],105:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],106:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],107:[function(e,t,r){var n=e("./_object-dp"),o=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":98,"./_object-dp":127,"./_property-desc":138}],108:[function(e,t,r){t.exports=e("./_global").document&&document.documentElement},{"./_global":105}],109:[function(e,t,r){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":98,"./_dom-create":99,"./_fails":103}],110:[function(e,t,r){t.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},{}],111:[function(e,t,r){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":90}],112:[function(e,t,r){var n=e("./_iterators"),o=e("./_wks")("iterator"),i=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||i[o]===e)}},{"./_iterators":120,"./_wks":158}],113:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":90}],114:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],115:[function(e,t,r){var i=e("./_an-object");t.exports=function(t,e,r,n){try{return n?e(i(r)[0],r[1]):e(r)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},{"./_an-object":83}],116:[function(e,t,r){"use strict";var n=e("./_object-create"),o=e("./_property-desc"),i=e("./_set-to-string-tag"),s={};e("./_hide")(s,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,r){e.prototype=n(s,{next:o(1,r)}),i(e,t+" Iterator")}},{"./_hide":107,"./_object-create":126,"./_property-desc":138,"./_set-to-string-tag":143,"./_wks":158}],117:[function(e,t,r){"use strict";var g=e("./_library"),m=e("./_export"),j=e("./_redefine"),w=e("./_hide"),C=e("./_has"),k=e("./_iterators"),O=e("./_iter-create"),S=e("./_set-to-string-tag"),E=e("./_object-gpo"),P=e("./_wks")("iterator"),A=!([].keys&&"next"in[].keys()),T="values",I=function(){return this};t.exports=function(e,t,r,n,o,i,s){O(r,t,n);var a,u,l,c=function(e){if(!A&&e in p)return p[e];switch(e){case"keys":case T:return function(){return new r(this,e)}}return function(){return new r(this,e)}},f=t+" Iterator",d=o==T,h=!1,p=e.prototype,_=p[P]||p["@@iterator"]||o&&p[o],v=_||c(o),y=o?d?c("entries"):v:void 0,b="Array"==t&&p.entries||_;if(b&&(l=E(b.call(new e)))!==Object.prototype&&(S(l,f,!0),g||C(l,P)||w(l,P,I)),d&&_&&_.name!==T&&(h=!0,v=function(){return _.call(this)}),g&&!s||!A&&!h&&p[P]||w(p,P,v),k[t]=v,k[f]=I,o)if(a={values:d?v:c(T),keys:i?v:c("keys"),entries:y},s)for(u in a)u in p||j(p,u,a[u]);else m(m.P+m.F*(A||h),t,a);return a}},{"./_export":102,"./_has":106,"./_hide":107,"./_iter-create":116,"./_iterators":120,"./_library":122,"./_object-gpo":133,"./_redefine":140,"./_set-to-string-tag":143,"./_wks":158}],118:[function(e,t,r){var i=e("./_wks")("iterator"),s=!1;try{var n=[7][i]();n.return=function(){s=!0},Array.from(n,function(){throw 2})}catch(e){}t.exports=function(e,t){if(!t&&!s)return!1;var r=!1;try{var n=[7],o=n[i]();o.next=function(){return{done:r=!0}},n[i]=function(){return o},e(n)}catch(e){}return r}},{"./_wks":158}],119:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],120:[function(e,t,r){t.exports={}},{}],121:[function(e,t,r){var a=e("./_object-keys"),u=e("./_to-iobject");t.exports=function(e,t){for(var r,n=u(e),o=a(n),i=o.length,s=0;s<i;)if(n[r=o[s++]]===t)return r}},{"./_object-keys":135,"./_to-iobject":151}],122:[function(e,t,r){t.exports=!0},{}],123:[function(e,t,r){var n=e("./_uid")("meta"),o=e("./_is-object"),i=e("./_has"),s=e("./_object-dp").f,a=0,u=Object.isExtensible||function(){return!0},l=!e("./_fails")(function(){return u(Object.preventExtensions({}))}),c=function(e){s(e,n,{value:{i:"O"+ ++a,w:{}}})},f=t.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,n)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[n].i},getWeak:function(e,t){if(!i(e,n)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[n].w},onFreeze:function(e){return l&&f.NEED&&u(e)&&!i(e,n)&&c(e),e}}},{"./_fails":103,"./_has":106,"./_is-object":114,"./_object-dp":127,"./_uid":155}],124:[function(e,t,r){var a=e("./_global"),u=e("./_task").set,l=a.MutationObserver||a.WebKitMutationObserver,c=a.process,f=a.Promise,d="process"==e("./_cof")(c);t.exports=function(){var r,n,o,e=function(){var e,t;for(d&&(e=c.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(e){throw r?o():n=void 0,e}}n=void 0,e&&e.enter()};if(d)o=function(){c.nextTick(e)};else if(l){var t=!0,i=document.createTextNode("");new l(e).observe(i,{characterData:!0}),o=function(){i.data=t=!t}}else if(f&&f.resolve){var s=f.resolve();o=function(){s.then(e)}}else o=function(){u.call(a,e)};return function(e){var t={fn:e,next:void 0};n&&(n.next=t),r||(r=t,o()),n=t}}},{"./_cof":90,"./_global":105,"./_task":148}],125:[function(e,t,r){"use strict";var d=e("./_object-keys"),h=e("./_object-gops"),p=e("./_object-pie"),_=e("./_to-object"),v=e("./_iobject"),o=Object.assign;t.exports=!o||e("./_fails")(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=o({},e)[r]||Object.keys(o({},t)).join("")!=n})?function(e,t){for(var r=_(e),n=arguments.length,o=1,i=h.f,s=p.f;o<n;)for(var a,u=v(arguments[o++]),l=i?d(u).concat(i(u)):d(u),c=l.length,f=0;f<c;)s.call(u,a=l[f++])&&(r[a]=u[a]);return r}:o},{"./_fails":103,"./_iobject":111,"./_object-gops":132,"./_object-keys":135,"./_object-pie":136,"./_to-object":153}],126:[function(n,e,t){var o=n("./_an-object"),i=n("./_object-dps"),s=n("./_enum-bug-keys"),a=n("./_shared-key")("IE_PROTO"),u=function(){},l="prototype",c=function(){var e,t=n("./_dom-create")("iframe"),r=s.length;for(t.style.display="none",n("./_html").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;r--;)delete c[l][s[r]];return c()};e.exports=Object.create||function(e,t){var r;return null!==e?(u[l]=o(e),r=new u,u[l]=null,r[a]=e):r=c(),void 0===t?r:i(r,t)}},{"./_an-object":83,"./_dom-create":99,"./_enum-bug-keys":100,"./_html":108,"./_object-dps":128,"./_shared-key":144}],127:[function(e,t,r){var n=e("./_an-object"),o=e("./_ie8-dom-define"),i=e("./_to-primitive"),s=Object.defineProperty;r.f=e("./_descriptors")?Object.defineProperty:function(e,t,r){if(n(e),t=i(t,!0),n(r),o)try{return s(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},{"./_an-object":83,"./_descriptors":98,"./_ie8-dom-define":109,"./_to-primitive":154}],128:[function(e,t,r){var s=e("./_object-dp"),a=e("./_an-object"),u=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){a(e);for(var r,n=u(t),o=n.length,i=0;i<o;)s.f(e,r=n[i++],t[r]);return e}},{"./_an-object":83,"./_descriptors":98,"./_object-dp":127,"./_object-keys":135}],129:[function(e,t,r){var n=e("./_object-pie"),o=e("./_property-desc"),i=e("./_to-iobject"),s=e("./_to-primitive"),a=e("./_has"),u=e("./_ie8-dom-define"),l=Object.getOwnPropertyDescriptor;r.f=e("./_descriptors")?l:function(e,t){if(e=i(e),t=s(t,!0),u)try{return l(e,t)}catch(e){}if(a(e,t))return o(!n.f.call(e,t),e[t])}},{"./_descriptors":98,"./_has":106,"./_ie8-dom-define":109,"./_object-pie":136,"./_property-desc":138,"./_to-iobject":151,"./_to-primitive":154}],130:[function(e,t,r){var n=e("./_to-iobject"),o=e("./_object-gopn").f,i={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(e){return s&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(e){return s.slice()}}(e):o(n(e))}},{"./_object-gopn":131,"./_to-iobject":151}],131:[function(e,t,r){var n=e("./_object-keys-internal"),o=e("./_enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},{"./_enum-bug-keys":100,"./_object-keys-internal":134}],132:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],133:[function(e,t,r){var n=e("./_has"),o=e("./_to-object"),i=e("./_shared-key")("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},{"./_has":106,"./_shared-key":144,"./_to-object":153}],134:[function(e,t,r){var s=e("./_has"),a=e("./_to-iobject"),u=e("./_array-includes")(!1),l=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var r,n=a(e),o=0,i=[];for(r in n)r!=l&&s(n,r)&&i.push(r);for(;t.length>o;)s(n,r=t[o++])&&(~u(i,r)||i.push(r));return i}},{"./_array-includes":85,"./_has":106,"./_shared-key":144,"./_to-iobject":151}],135:[function(e,t,r){var n=e("./_object-keys-internal"),o=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return n(e,o)}},{"./_enum-bug-keys":100,"./_object-keys-internal":134}],136:[function(e,t,r){r.f={}.propertyIsEnumerable},{}],137:[function(e,t,r){var o=e("./_export"),i=e("./_core"),s=e("./_fails");t.exports=function(e,t){var r=(i.Object||{})[e]||Object[e],n={};n[e]=t(r),o(o.S+o.F*s(function(){r(1)}),"Object",n)}},{"./_core":95,"./_export":102,"./_fails":103}],138:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],139:[function(e,t,r){var o=e("./_hide");t.exports=function(e,t,r){for(var n in t)r&&e[n]?e[n]=t[n]:o(e,n,t[n]);return e}},{"./_hide":107}],140:[function(e,t,r){t.exports=e("./_hide")},{"./_hide":107}],141:[function(t,e,r){var n=t("./_is-object"),o=t("./_an-object"),i=function(e,t){if(o(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,r,n){try{(n=t("./_ctx")(Function.call,t("./_object-gopd").f(Object.prototype,"__proto__").set,2))(e,[]),r=!(e instanceof Array)}catch(e){r=!0}return function(e,t){return i(e,t),r?e.__proto__=t:n(e,t),e}}({},!1):void 0),check:i}},{"./_an-object":83,"./_ctx":96,"./_is-object":114,"./_object-gopd":129}],142:[function(e,t,r){"use strict";var n=e("./_global"),o=e("./_core"),i=e("./_object-dp"),s=e("./_descriptors"),a=e("./_wks")("species");t.exports=function(e){var t="function"==typeof o[e]?o[e]:n[e];s&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},{"./_core":95,"./_descriptors":98,"./_global":105,"./_object-dp":127,"./_wks":158}],143:[function(e,t,r){var n=e("./_object-dp").f,o=e("./_has"),i=e("./_wks")("toStringTag");t.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},{"./_has":106,"./_object-dp":127,"./_wks":158}],144:[function(e,t,r){var n=e("./_shared")("keys"),o=e("./_uid");t.exports=function(e){return n[e]||(n[e]=o(e))}},{"./_shared":145,"./_uid":155}],145:[function(e,t,r){var n=e("./_global"),o="__core-js_shared__",i=n[o]||(n[o]={});t.exports=function(e){return i[e]||(i[e]={})}},{"./_global":105}],146:[function(e,t,r){var o=e("./_an-object"),i=e("./_a-function"),s=e("./_wks")("species");t.exports=function(e,t){var r,n=o(e).constructor;return void 0===n||null==(r=o(n)[s])?t:i(r)}},{"./_a-function":80,"./_an-object":83,"./_wks":158}],147:[function(e,t,r){var u=e("./_to-integer"),l=e("./_defined");t.exports=function(a){return function(e,t){var r,n,o=String(l(e)),i=u(t),s=o.length;return i<0||s<=i?a?"":void 0:(r=o.charCodeAt(i))<55296||56319<r||i+1===s||(n=o.charCodeAt(i+1))<56320||57343<n?a?o.charAt(i):r:a?o.slice(i,i+2):n-56320+(r-55296<<10)+65536}}},{"./_defined":97,"./_to-integer":150}],148:[function(e,t,r){var n,o,i,s=e("./_ctx"),a=e("./_invoke"),u=e("./_html"),l=e("./_dom-create"),c=e("./_global"),f=c.process,d=c.setImmediate,h=c.clearImmediate,p=c.MessageChannel,_=0,v={},y="onreadystatechange",b=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},g=function(e){b.call(e.data)};d&&h||(d=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return v[++_]=function(){a("function"==typeof e?e:Function(e),t)},n(_),_},h=function(e){delete v[e]},"process"==e("./_cof")(f)?n=function(e){f.nextTick(s(b,e,1))}:p?(i=(o=new p).port2,o.port1.onmessage=g,n=s(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(n=function(e){c.postMessage(e+"","*")},c.addEventListener("message",g,!1)):n=y in l("script")?function(e){u.appendChild(l("script"))[y]=function(){u.removeChild(this),b.call(e)}}:function(e){setTimeout(s(b,e,1),0)}),t.exports={set:d,clear:h}},{"./_cof":90,"./_ctx":96,"./_dom-create":99,"./_global":105,"./_html":108,"./_invoke":110}],149:[function(e,t,r){var n=e("./_to-integer"),o=Math.max,i=Math.min;t.exports=function(e,t){return(e=n(e))<0?o(e+t,0):i(e,t)}},{"./_to-integer":150}],150:[function(e,t,r){var n=Math.ceil,o=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(0<e?o:n)(e)}},{}],151:[function(e,t,r){var n=e("./_iobject"),o=e("./_defined");t.exports=function(e){return n(o(e))}},{"./_defined":97,"./_iobject":111}],152:[function(e,t,r){var n=e("./_to-integer"),o=Math.min;t.exports=function(e){return 0<e?o(n(e),9007199254740991):0}},{"./_to-integer":150}],153:[function(e,t,r){var n=e("./_defined");t.exports=function(e){return Object(n(e))}},{"./_defined":97}],154:[function(e,t,r){var o=e("./_is-object");t.exports=function(e,t){if(!o(e))return e;var r,n;if(t&&"function"==typeof(r=e.toString)&&!o(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!o(n=r.call(e)))return n;if(!t&&"function"==typeof(r=e.toString)&&!o(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":114}],155:[function(e,t,r){var n=0,o=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},{}],156:[function(e,t,r){var n=e("./_global"),o=e("./_core"),i=e("./_library"),s=e("./_wks-ext"),a=e("./_object-dp").f;t.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:s.f(e)})}},{"./_core":95,"./_global":105,"./_library":122,"./_object-dp":127,"./_wks-ext":157}],157:[function(e,t,r){r.f=e("./_wks")},{"./_wks":158}],158:[function(e,t,r){var n=e("./_shared")("wks"),o=e("./_uid"),i=e("./_global").Symbol,s="function"==typeof i;(t.exports=function(e){return n[e]||(n[e]=s&&i[e]||(s?i:o)("Symbol."+e))}).store=n},{"./_global":105,"./_shared":145,"./_uid":155}],159:[function(e,t,r){var n=e("./_classof"),o=e("./_wks")("iterator"),i=e("./_iterators");t.exports=e("./_core").getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[n(e)]}},{"./_classof":89,"./_core":95,"./_iterators":120,"./_wks":158}],160:[function(e,t,r){var n=e("./_an-object"),o=e("./core.get-iterator-method");t.exports=e("./_core").getIterator=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},{"./_an-object":83,"./_core":95,"./core.get-iterator-method":159}],161:[function(e,t,r){"use strict";var n=e("./_add-to-unscopables"),o=e("./_iter-step"),i=e("./_iterators"),s=e("./_to-iobject");t.exports=e("./_iter-define")(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])},"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},{"./_add-to-unscopables":81,"./_iter-define":117,"./_iter-step":119,"./_iterators":120,"./_to-iobject":151}],162:[function(e,t,r){"use strict";var n=e("./_collection-strong");t.exports=e("./_collection")("Map",function(e){return function(){return e(this,0<arguments.length?arguments[0]:void 0)}},{get:function(e){var t=n.getEntry(this,e);return t&&t.v},set:function(e,t){return n.def(this,0===e?0:e,t)}},n,!0)},{"./_collection":94,"./_collection-strong":91}],163:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{create:e("./_object-create")})},{"./_export":102,"./_object-create":126}],164:[function(e,t,r){var n=e("./_export");n(n.S+n.F*!e("./_descriptors"),"Object",{defineProperty:e("./_object-dp").f})},{"./_descriptors":98,"./_export":102,"./_object-dp":127}],165:[function(e,t,r){var n=e("./_is-object"),o=e("./_meta").onFreeze;e("./_object-sap")("freeze",function(t){return function(e){return t&&n(e)?t(o(e)):e}})},{"./_is-object":114,"./_meta":123,"./_object-sap":137}],166:[function(e,t,r){var n=e("./_to-iobject"),o=e("./_object-gopd").f;e("./_object-sap")("getOwnPropertyDescriptor",function(){return function(e,t){return o(n(e),t)}})},{"./_object-gopd":129,"./_object-sap":137,"./_to-iobject":151}],167:[function(e,t,r){var n=e("./_to-object"),o=e("./_object-gpo");e("./_object-sap")("getPrototypeOf",function(){return function(e){return o(n(e))}})},{"./_object-gpo":133,"./_object-sap":137,"./_to-object":153}],168:[function(e,t,r){var n=e("./_to-object"),o=e("./_object-keys");e("./_object-sap")("keys",function(){return function(e){return o(n(e))}})},{"./_object-keys":135,"./_object-sap":137,"./_to-object":153}],169:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{setPrototypeOf:e("./_set-proto").set})},{"./_export":102,"./_set-proto":141}],170:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{dup:65}],171:[function(r,e,t){"use strict";var n,o,i,s=r("./_library"),a=r("./_global"),u=r("./_ctx"),l=r("./_classof"),c=r("./_export"),f=r("./_is-object"),d=r("./_a-function"),h=r("./_an-instance"),p=r("./_for-of"),_=r("./_species-constructor"),v=r("./_task").set,y=r("./_microtask")(),b="Promise",g=a.TypeError,m=a.process,j=a[b],w="process"==l(m=a.process),C=function(){},k=!!function(){try{var e=j.resolve(1),t=(e.constructor={})[r("./_wks")("species")]=function(e){e(C,C)};return(w||"function"==typeof PromiseRejectionEvent)&&e.then(C)instanceof t}catch(e){}}(),O=function(e,t){return e===t||e===j&&t===i},S=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},E=function(e){return O(j,e)?new P(e):new o(e)},P=o=function(e){var r,n;this.promise=new e(function(e,t){if(void 0!==r||void 0!==n)throw g("Bad Promise constructor");r=e,n=t}),this.resolve=d(r),this.reject=d(n)},A=function(e){try{e()}catch(e){return{error:e}}},T=function(l,r){if(!l._n){l._n=!0;var n=l._c;y(function(){for(var a=l._v,u=1==l._s,e=0,t=function(e){var t,r,n=u?e.ok:e.fail,o=e.resolve,i=e.reject,s=e.domain;try{n?(u||(2==l._h&&R(l),l._h=1),!0===n?t=a:(s&&s.enter(),t=n(a),s&&s.exit()),t===e.promise?i(g("Promise-chain cycle")):(r=S(t))?r.call(t,o,i):o(t)):i(a)}catch(e){i(e)}};n.length>e;)t(n[e++]);l._c=[],l._n=!1,r&&!l._h&&I(l)})}},I=function(o){v.call(a,function(){var e,t,r,n=o._v;if(N(o)&&(e=A(function(){w?m.emit("unhandledRejection",n,o):(t=a.onunhandledrejection)?t({promise:o,reason:n}):(r=a.console)&&r.error&&r.error("Unhandled promise rejection",n)}),o._h=w||N(o)?2:1),o._a=void 0,e)throw e.error})},N=function(e){if(1==e._h)return!1;for(var t,r=e._a||e._c,n=0;r.length>n;)if((t=r[n++]).fail||!N(t.promise))return!1;return!0},R=function(t){v.call(a,function(){var e;w?m.emit("rejectionHandled",t):(e=a.onrejectionhandled)&&e({promise:t,reason:t._v})})},M=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),T(t,!0))},x=function(e){var r,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw g("Promise can't be resolved itself");(r=S(e))?y(function(){var t={_w:n,_d:!1};try{r.call(e,u(x,t,1),u(M,t,1))}catch(e){M.call(t,e)}}):(n._v=e,n._s=1,T(n,!1))}catch(e){M.call({_w:n,_d:!1},e)}}};k||(j=function(e){h(this,j,b,"_h"),d(e),n.call(this);try{e(u(x,this,1),u(M,this,1))}catch(e){M.call(this,e)}},(n=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r("./_redefine-all")(j.prototype,{then:function(e,t){var r=E(_(this,j));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=w?m.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&T(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),P=function(){var e=new n;this.promise=e,this.resolve=u(x,e,1),this.reject=u(M,e,1)}),c(c.G+c.W+c.F*!k,{Promise:j}),r("./_set-to-string-tag")(j,b),r("./_set-species")(b),i=r("./_core")[b],c(c.S+c.F*!k,b,{reject:function(e){var t=E(this);return(0,t.reject)(e),t.promise}}),c(c.S+c.F*(s||!k),b,{resolve:function(e){if(e instanceof j&&O(e.constructor,this))return e;var t=E(this);return(0,t.resolve)(e),t.promise}}),c(c.S+c.F*!(k&&r("./_iter-detect")(function(e){j.all(e).catch(C)})),b,{all:function(e){var s=this,t=E(s),a=t.resolve,u=t.reject,r=A(function(){var n=[],o=0,i=1;p(e,!1,function(e){var t=o++,r=!1;n.push(void 0),i++,s.resolve(e).then(function(e){r||(r=!0,n[t]=e,--i||a(n))},u)}),--i||a(n)});return r&&u(r.error),t.promise},race:function(e){var t=this,r=E(t),n=r.reject,o=A(function(){p(e,!1,function(e){t.resolve(e).then(r.resolve,n)})});return o&&n(o.error),r.promise}})},{"./_a-function":80,"./_an-instance":82,"./_classof":89,"./_core":95,"./_ctx":96,"./_export":102,"./_for-of":104,"./_global":105,"./_is-object":114,"./_iter-detect":118,"./_library":122,"./_microtask":124,"./_redefine-all":139,"./_set-species":142,"./_set-to-string-tag":143,"./_species-constructor":146,"./_task":148,"./_wks":158}],172:[function(e,t,r){"use strict";var n=e("./_string-at")(!0);e("./_iter-define")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},{"./_iter-define":117,"./_string-at":147}],173:[function(e,t,r){"use strict";var n=e("./_global"),s=e("./_has"),o=e("./_descriptors"),i=e("./_export"),a=e("./_redefine"),u=e("./_meta").KEY,l=e("./_fails"),c=e("./_shared"),f=e("./_set-to-string-tag"),d=e("./_uid"),h=e("./_wks"),p=e("./_wks-ext"),_=e("./_wks-define"),v=e("./_keyof"),y=e("./_enum-keys"),b=e("./_is-array"),g=e("./_an-object"),m=e("./_to-iobject"),j=e("./_to-primitive"),w=e("./_property-desc"),C=e("./_object-create"),k=e("./_object-gopn-ext"),O=e("./_object-gopd"),S=e("./_object-dp"),E=e("./_object-keys"),P=O.f,A=S.f,T=k.f,I=n.Symbol,N=n.JSON,R=N&&N.stringify,M="prototype",x=h("_hidden"),L=h("toPrimitive"),D={}.propertyIsEnumerable,U=c("symbol-registry"),F=c("symbols"),K=c("op-symbols"),q=Object[M],J="function"==typeof I,W=n.QObject,Q=!W||!W[M]||!W[M].findChild,G=o&&l(function(){return 7!=C(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=P(q,t);n&&delete q[t],A(e,t,r),n&&e!==q&&A(q,t,n)}:A,V=function(e){var t=F[e]=C(I[M]);return t._k=e,t},B=J&&"symbol"==typeof I.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof I},z=function(e,t,r){return e===q&&z(K,t,r),g(e),t=j(t,!0),g(r),s(F,t)?(r.enumerable?(s(e,x)&&e[x][t]&&(e[x][t]=!1),r=C(r,{enumerable:w(0,!1)})):(s(e,x)||A(e,x,w(1,{})),e[x][t]=!0),G(e,t,r)):A(e,t,r)},Y=function(e,t){g(e);for(var r,n=y(t=m(t)),o=0,i=n.length;o<i;)z(e,r=n[o++],t[r]);return e},$=function(e){var t=D.call(this,e=j(e,!0));return!(this===q&&s(F,e)&&!s(K,e))&&(!(t||!s(this,e)||!s(F,e)||s(this,x)&&this[x][e])||t)},H=function(e,t){if(e=m(e),t=j(t,!0),e!==q||!s(F,t)||s(K,t)){var r=P(e,t);return!r||!s(F,t)||s(e,x)&&e[x][t]||(r.enumerable=!0),r}},X=function(e){for(var t,r=T(m(e)),n=[],o=0;r.length>o;)s(F,t=r[o++])||t==x||t==u||n.push(t);return n},Z=function(e){for(var t,r=e===q,n=T(r?K:m(e)),o=[],i=0;n.length>i;)!s(F,t=n[i++])||r&&!s(q,t)||o.push(F[t]);return o};J||(a((I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var t=d(0<arguments.length?arguments[0]:void 0),r=function(e){this===q&&r.call(K,e),s(this,x)&&s(this[x],t)&&(this[x][t]=!1),G(this,t,w(1,e))};return o&&Q&&G(q,t,{configurable:!0,set:r}),V(t)})[M],"toString",function(){return this._k}),O.f=H,S.f=z,e("./_object-gopn").f=k.f=X,e("./_object-pie").f=$,e("./_object-gops").f=Z,o&&!e("./_library")&&a(q,"propertyIsEnumerable",$,!0),p.f=function(e){return V(h(e))}),i(i.G+i.W+i.F*!J,{Symbol:I});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)h(ee[te++]);for(ee=E(h.store),te=0;ee.length>te;)_(ee[te++]);i(i.S+i.F*!J,"Symbol",{for:function(e){return s(U,e+="")?U[e]:U[e]=I(e)},keyFor:function(e){if(B(e))return v(U,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){Q=!0},useSimple:function(){Q=!1}}),i(i.S+i.F*!J,"Object",{create:function(e,t){return void 0===t?C(e):Y(C(e),t)},defineProperty:z,defineProperties:Y,getOwnPropertyDescriptor:H,getOwnPropertyNames:X,getOwnPropertySymbols:Z}),N&&i(i.S+i.F*(!J||l(function(){var e=I();return"[null]"!=R([e])||"{}"!=R({a:e})||"{}"!=R(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!B(e)){for(var t,r,n=[e],o=1;arguments.length>o;)n.push(arguments[o++]);return"function"==typeof(t=n[1])&&(r=t),!r&&b(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!B(t))return t}),n[1]=t,R.apply(N,n)}}}),I[M][L]||e("./_hide")(I[M],L,I[M].valueOf),f(I,"Symbol"),f(Math,"Math",!0),f(n.JSON,"JSON",!0)},{"./_an-object":83,"./_descriptors":98,"./_enum-keys":101,"./_export":102,"./_fails":103,"./_global":105,"./_has":106,"./_hide":107,"./_is-array":113,"./_keyof":121,"./_library":122,"./_meta":123,"./_object-create":126,"./_object-dp":127,"./_object-gopd":129,"./_object-gopn":131,"./_object-gopn-ext":130,"./_object-gops":132,"./_object-keys":135,"./_object-pie":136,"./_property-desc":138,"./_redefine":140,"./_set-to-string-tag":143,"./_shared":145,"./_to-iobject":151,"./_to-primitive":154,"./_uid":155,"./_wks":158,"./_wks-define":156,"./_wks-ext":157}],174:[function(e,t,r){"use strict";var i,n=e("./_array-methods")(0),s=e("./_redefine"),o=e("./_meta"),a=e("./_object-assign"),u=e("./_collection-weak"),l=e("./_is-object"),c=o.getWeak,f=Object.isExtensible,d=u.ufstore,h={},p=function(e){return function(){return e(this,0<arguments.length?arguments[0]:void 0)}},_={get:function(e){if(l(e)){var t=c(e);return!0===t?d(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(this,e,t)}},v=t.exports=e("./_collection")("WeakMap",p,_,u,!0,!0);7!=(new v).set((Object.freeze||Object)(h),7).get(h)&&(a((i=u.getConstructor(p)).prototype,_),o.NEED=!0,n(["delete","has","get","set"],function(n){var e=v.prototype,o=e[n];s(e,n,function(e,t){if(l(e)&&!f(e)){this._f||(this._f=new i);var r=this._f[n](e,t);return"set"==n?this:r}return o.call(this,e,t)})}))},{"./_array-methods":86,"./_collection":94,"./_collection-weak":93,"./_is-object":114,"./_meta":123,"./_object-assign":125,"./_redefine":140}],175:[function(e,t,r){var n=e("./_export");n(n.P+n.R,"Map",{toJSON:e("./_collection-to-json")("Map")})},{"./_collection-to-json":92,"./_export":102}],176:[function(e,t,r){e("./_wks-define")("asyncIterator")},{"./_wks-define":156}],177:[function(e,t,r){e("./_wks-define")("observable")},{"./_wks-define":156}],178:[function(e,t,r){e("./es6.array.iterator");for(var n=e("./_global"),o=e("./_hide"),i=e("./_iterators"),s=e("./_wks")("toStringTag"),a=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var l=a[u],c=n[l],f=c&&c.prototype;f&&!f[s]&&o(f,s,l),i[l]=i.Array}},{"./_global":105,"./_hide":107,"./_iterators":120,"./_wks":158,"./es6.array.iterator":161}],179:[function(e,t,r){var u=Object.create||function(e){var t=function(){};return t.prototype=e,new t},s=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return r},i=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function n(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=u(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}((t.exports=n).EventEmitter=n).prototype._events=void 0,n.prototype._maxListeners=void 0;var o,a=10;try{var l={};Object.defineProperty&&Object.defineProperty(l,"x",{value:0}),o=0===l.x}catch(e){o=!1}function c(e){return void 0===e._maxListeners?n.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){var o,i,s;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((i=e._events)?(i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]):(i=e._events=u(null),e._eventsCount=0),s){if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),!s.warned&&(o=c(e))&&0<o&&s.length>o){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",a.name,a.message)}}else s=i[t]=r,++e._eventsCount;return e}function d(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t<e.length;++t)e[t]=arguments[t];this.listener.apply(this.target,e)}}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=i.call(d,n);return o.listener=r,n.wrapFn=o}function p(e,t,r){var n=e._events;if(!n)return[];var o=n[t];return o?"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):v(o,o.length):[]}function _(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function v(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}o?Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');a=e}}):n.defaultMaxListeners=a,n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},n.prototype.getMaxListeners=function(){return c(this)},n.prototype.emit=function(e){var t,r,n,o,i,s,a="error"===e;if(s=this._events)a=a&&null==s.error;else if(!a)return!1;if(a){if(1<arguments.length&&(t=arguments[1]),t instanceof Error)throw t;var u=new Error('Unhandled "error" event. ('+t+")");throw u.context=t,u}if(!(r=s[e]))return!1;var l="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,o=v(e,n),i=0;i<n;++i)o[i].call(r)}(r,l,this);break;case 2:!function(e,t,r,n){if(t)e.call(r,n);else for(var o=e.length,i=v(e,o),s=0;s<o;++s)i[s].call(r,n)}(r,l,this,arguments[1]);break;case 3:!function(e,t,r,n,o){if(t)e.call(r,n,o);else for(var i=e.length,s=v(e,i),a=0;a<i;++a)s[a].call(r,n,o)}(r,l,this,arguments[1],arguments[2]);break;case 4:!function(e,t,r,n,o,i){if(t)e.call(r,n,o,i);else for(var s=e.length,a=v(e,s),u=0;u<s;++u)a[u].call(r,n,o,i)}(r,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(n-1),i=1;i<n;i++)o[i-1]=arguments[i];!function(e,t,r,n){if(t)e.apply(r,n);else for(var o=e.length,i=v(e,o),s=0;s<o;++s)i[s].apply(r,n)}(r,l,this,o)}return!0},n.prototype.on=n.prototype.addListener=function(e,t){return f(this,e,t,!1)},n.prototype.prependListener=function(e,t){return f(this,e,t,!0)},n.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,h(this,e,t)),this},n.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,h(this,e,t)),this},n.prototype.removeListener=function(e,t){var r,n,o,i,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=u(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;0<=i;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(var r=t,n=r+1,o=e.length;n<o;r+=1,n+=1)e[r]=e[n];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),n.removeListener&&this.emit("removeListener",e,s||t)}return this},n.prototype.removeAllListeners=function(e){var t,r,n;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=u(null),this._eventsCount=0):r[e]&&(0==--this._eventsCount?this._events=u(null):delete r[e]),this;if(0===arguments.length){var o,i=s(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=u(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t)for(n=t.length-1;0<=n;n--)this.removeListener(e,t[n]);return this},n.prototype.listeners=function(e){return p(this,e,!0)},n.prototype.rawListeners=function(e){return p(this,e,!1)},n.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):_.call(e,t)},n.prototype.listenerCount=_,n.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]}},{}]},{},[10])(10)});