Tento skript by nemal byť nainštalovaný priamo. Je to knižnica pre ďalšie skripty, ktorú by mali používať cez meta príkaz // @require https://update.greasyfork.org/scripts/370885/617974/parse%20js%20sdk.js
/**
* Parse JavaScript SDK v1.11.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{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Parse=e()}}(function(){return function(){function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){var r=t[s][1][e];return o(r||e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}return e}()({1:[function(e,t,r){"use strict";function n(e,t,r){if(e=e||"",e=e.replace(/^\s*/,""),e=e.replace(/\s*$/,""),0===e.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)._thenRunCallbacks(r)}Object.defineProperty(r,"__esModule",{value:!0}),r.track=n;var o=e("./CoreManager"),i=function(e){return e&&e.__esModule?e:{default:e}}(o),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";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){if(r=r||{},"string"!=typeof e||0===e.length)throw new TypeError("Cloud function name must be a string.");var n={};return r.useMasterKey&&(n.useMasterKey=r.useMasterKey),r.sessionToken&&(n.sessionToken=r.sessionToken),s.default.getCloudController().run(e,t,n)._thenRunCallbacks(r)}Object.defineProperty(r,"__esModule",{value:!0}),r.run=o;var i=e("./CoreManager"),s=n(i),a=e("./decode"),u=n(a),l=e("./encode"),c=n(l),f=e("./ParseError"),d=n(f),h=e("./ParsePromise"),p=n(h),_={run:function(e,t,r){var n=s.default.getRESTController(),o=(0,c.default)(t,!0),i={};return r.hasOwnProperty("useMasterKey")&&(i.useMasterKey=r.useMasterKey),r.hasOwnProperty("sessionToken")&&(i.sessionToken=r.sessionToken),n.request("POST","functions/"+e,o,i).then(function(e){var t=(0,u.default)(e);return t&&t.hasOwnProperty("result")?p.default.as(t.result):p.default.error(new d.default(d.default.INVALID_JSON,"The server returned an invalid response."))})._thenRunCallbacks(r)}};s.default.setCloudController(_)},{"./CoreManager":3,"./ParseError":13,"./ParsePromise":21,"./decode":37,"./encode":38}],3:[function(e,t,r){(function(e){"use strict";function r(e,t,r){t.forEach(function(t){if("function"!=typeof r[t])throw new Error(e+" must implement "+t+"()")})}var n={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:"js1.11.1",APPLICATION_ID:null,JAVASCRIPT_KEY:null,MASTER_KEY:null,USE_MASTER_KEY:!1,PERFORM_USER_REWRITE:!0,FORCE_REVOCABLE_SESSION:!1};t.exports={get:function(e){if(n.hasOwnProperty(e))return n[e];throw new Error("Configuration key not found: "+e)},set:function(e,t){n[e]=t},setAnalyticsController:function(e){r("AnalyticsController",["track"],e),n.AnalyticsController=e},getAnalyticsController:function(){return n.AnalyticsController},setCloudController:function(e){r("CloudController",["run"],e),n.CloudController=e},getCloudController:function(){return n.CloudController},setConfigController:function(e){r("ConfigController",["current","get"],e),n.ConfigController=e},getConfigController:function(){return n.ConfigController},setFileController:function(e){r("FileController",["saveFile","saveBase64"],e),n.FileController=e},getFileController:function(){return n.FileController},setInstallationController:function(e){r("InstallationController",["currentInstallationId"],e),n.InstallationController=e},getInstallationController:function(){return n.InstallationController},setObjectController:function(e){r("ObjectController",["save","fetch","destroy"],e),n.ObjectController=e},getObjectController:function(){return n.ObjectController},setObjectStateController:function(e){r("ObjectStateController",["getState","initializeState","removeState","getServerData","setServerData","getPendingOps","setPendingOp","pushPendingState","popPendingState","mergeFirstPendingState","getObjectCache","estimateAttribute","estimateAttributes","commitServerChanges","enqueueTask","clearAllState"],e),n.ObjectStateController=e},getObjectStateController:function(){return n.ObjectStateController},setPushController:function(e){r("PushController",["send"],e),n.PushController=e},getPushController:function(){return n.PushController},setQueryController:function(e){r("QueryController",["find","aggregate"],e),n.QueryController=e},getQueryController:function(){return n.QueryController},setRESTController:function(e){r("RESTController",["request","ajax"],e),n.RESTController=e},getRESTController:function(){return n.RESTController},setSchemaController:function(e){r("SchemaController",["get","create","update","delete","send","purge"],e),n.SchemaController=e},getSchemaController:function(){return n.SchemaController},setSessionController:function(e){r("SessionController",["getSession"],e),n.SessionController=e},getSessionController:function(){return n.SessionController},setStorageController:function(e){e.async?r("An async StorageController",["getItemAsync","setItemAsync","removeItemAsync"],e):r("A synchronous StorageController",["getItem","setItem","removeItem"],e),n.StorageController=e},getStorageController:function(){return n.StorageController},setAsyncStorage:function(e){n.AsyncStorage=e},getAsyncStorage:function(){return n.AsyncStorage},setUserController:function(e){r("UserController",["setCurrentUser","currentUser","currentUserAsync","signUp","logIn","become","logOut","requestPasswordReset","upgradeToRevocableSession","linkWith"],e),n.UserController=e},getUserController:function(){return n.UserController},setLiveQueryController:function(e){r("LiveQueryController",["subscribe","unsubscribe","open","close"],e),n.LiveQueryController=e},getLiveQueryController:function(){return n.LiveQueryController},setHooksController:function(e){r("HooksController",["create","get","update","remove"],e),n.HooksController=e},getHooksController:function(){return n.HooksController}}}).call(this,e("_process"))},{_process:64}],4:[function(e,t,r){"use strict";t.exports=e("events").EventEmitter},{events:177}],5:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var o,i,s=e("./parseDate"),a=n(s),u=e("./ParseUser"),l=n(u),c=!1,f={authenticate:function(e){var t=this;"undefined"==typeof FB&&e.error(this,"Facebook SDK not found."),FB.login(function(r){r.authResponse?e.success&&e.success(t,{id:r.authResponse.userID,access_token:r.authResponse.accessToken,expiration_date:new Date(1e3*r.authResponse.expiresIn+(new Date).getTime()).toJSON()}):e.error&&e.error(t,r)},{scope:o})},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(i)for(var s in i)o[s]=i[s];o.authResponse=n,o.status=!1;var u=FB.getAuthResponse();u&&u.userID!==n.userID&&FB.logout(),FB.init(o)}return!0},getAuthType:function(){return"facebook"},deauthenticate:function(){this.restoreAuthentication(null)}},d={init:function(e){if("undefined"==typeof FB)throw new Error("The Facebook JavaScript SDK must be loaded before calling init.");if(i={},e)for(var t in e)i[t]=e[t];if(i.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.')}i.status=!1,FB.init(i),l.default._registerAuthenticationProvider(f),c=!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,l.default._logInWith("facebook",r)}if(!c)throw new Error("You must initialize FacebookUtils before calling logIn.");return o=e,l.default._logInWith("facebook",t)},link:function(e,t,r){if(t&&"string"!=typeof t){var n={};if(r)for(var i in r)n[i]=r[i];return n.authData=t,e._linkWith("facebook",n)}if(!c)throw new Error("You must initialize FacebookUtils before calling link.");return o=t,e._linkWith("facebook",r)},unlink:function(e,t){if(!c)throw new Error("You must initialize FacebookUtils before calling unlink.");return e._unlinkFrom("facebook",t)}};r.default=d},{"./ParseUser":27,"./parseDate":42}],6:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}function i(){return o()+o()+"-"+o()+"-"+o()+"-"+o()+"-"+o()+o()+o()}var s=e("./CoreManager"),a=(n(s),e("./ParsePromise")),u=n(a),l=e("./Storage"),c=n(l),f=null,d={currentInstallationId:function(){if("string"==typeof f)return u.default.as(f);var e=c.default.generatePath("installationId");return c.default.getItemAsync(e).then(function(t){return t?(f=t,t):(t=i(),c.default.setItemAsync(e,t).then(function(){return f=t,t}))})},_clearCache:function(){f=null},_setInstallationIdCache:function(e){f=e}};t.exports=d},{"./CoreManager":3,"./ParsePromise":21,"./Storage":31}],7:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var o=e("babel-runtime/helpers/typeof"),i=n(o),s=e("babel-runtime/core-js/get-iterator"),a=n(s),u=e("babel-runtime/core-js/json/stringify"),l=n(u),c=e("babel-runtime/core-js/map"),f=n(c),d=e("babel-runtime/core-js/object/get-prototype-of"),h=n(d),p=e("babel-runtime/helpers/classCallCheck"),_=n(p),v=e("babel-runtime/helpers/createClass"),y=n(v),b=e("babel-runtime/helpers/possibleConstructorReturn"),g=n(b),m=e("babel-runtime/helpers/inherits"),C=n(m),k=e("./EventEmitter"),j=n(k),w=e("./ParsePromise"),O=n(w),S=e("./ParseObject"),E=n(S),P=e("./LiveQuerySubscription"),A=n(P),T={INITIALIZED:"initialized",CONNECTING:"connecting",CONNECTED:"connected",CLOSED:"closed",RECONNECTING:"reconnecting",DISCONNECTED:"disconnected"},I={CONNECT:"connect",SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",ERROR:"error"},N={CONNECTED:"connected",SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed",ERROR:"error",CREATE:"create",UPDATE:"update",ENTER:"enter",LEAVE:"leave",DELETE:"delete"},R={CLOSE:"close",ERROR:"error",OPEN:"open"},M={OPEN:"open",CLOSE:"close",ERROR:"error",CREATE:"create",UPDATE:"update",ENTER:"enter",LEAVE:"leave",DELETE:"delete"},x=function(e){return Math.random()*Math.min(30,Math.pow(2,e)-1)*1e3},L=function(e){function t(e){var r=e.applicationId,n=e.serverURL,o=e.javascriptKey,i=e.masterKey,s=e.sessionToken;(0,_.default)(this,t);var a=(0,g.default)(this,(t.__proto__||(0,h.default)(t)).call(this));if(!n||0!==n.indexOf("ws"))throw new Error("You need to set a proper Parse LiveQuery server url before using LiveQueryClient");return a.reconnectHandle=null,a.attempts=1,a.id=0,a.requestId=1,a.serverURL=n,a.applicationId=r,a.javascriptKey=o,a.masterKey=i,a.sessionToken=s,a.connectPromise=new O.default,a.subscriptions=new f.default,a.state=T.INITIALIZED,a}return(0,C.default)(t,e),(0,y.default)(t,[{key:"shouldOpen",value:function(){return this.state===T.INITIALIZED||this.state===T.DISCONNECTED}},{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:I.SUBSCRIBE,requestId:this.requestId,query:{className:n,where:i,fields:s}};t&&(a.sessionToken=t);var u=new A.default(this.requestId,e,t);return this.subscriptions.set(this.requestId,u),this.requestId+=1,this.connectPromise.then(function(){r.socket.send((0,l.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:I.UNSUBSCRIBE,requestId:e.id};this.connectPromise.then(function(){t.socket.send((0,l.default)(r))})}}},{key:"open",value:function(){var e=this,t=this._getWebSocketImplementation();if(!t)return void this.emit(R.ERROR,"Can not find WebSocket implementation");this.state!==T.RECONNECTING&&(this.state=T.CONNECTING),this.socket=new t(this.serverURL),this.socket.onopen=function(){e._handleWebSocketOpen()},this.socket.onmessage=function(t){e._handleWebSocketMessage(t)},this.socket.onclose=function(){e._handleWebSocketClose()},this.socket.onerror=function(t){e._handleWebSocketError(t)}}},{key:"resubscribe",value:function(){var e=this;this.subscriptions.forEach(function(t,r){var n=t.query,o=n.toJSON(),i=o.where,s=o.keys?o.keys.split(","):void 0,a=n.className,u=t.sessionToken,c={op:I.SUBSCRIBE,requestId:r,query:{className:a,where:i,fields:s}};u&&(c.sessionToken=u),e.connectPromise.then(function(){e.socket.send((0,l.default)(c))})})}},{key:"close",value:function(){if(this.state!==T.INITIALIZED&&this.state!==T.DISCONNECTED){this.state=T.DISCONNECTED,this.socket.close();var e=!0,t=!1,r=void 0;try{for(var n,o=(0,a.default)(this.subscriptions.values());!(e=(n=o.next()).done);e=!0){n.value.emit(M.CLOSE)}}catch(e){t=!0,r=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw r}}this._handleReset(),this.emit(R.CLOSE)}}},{key:"_getWebSocketImplementation",value:function(){return"function"==typeof WebSocket||"object"===("undefined"==typeof WebSocket?"undefined":(0,i.default)(WebSocket))?WebSocket:null}},{key:"_handleReset",value:function(){this.attempts=1,this.id=0,this.requestId=1,this.connectPromise=new O.default,this.subscriptions=new f.default}},{key:"_handleWebSocketOpen",value:function(){this.attempts=1;var e={op:I.CONNECT,applicationId:this.applicationId,javascriptKey:this.javascriptKey,masterKey:this.masterKey,sessionToken:this.sessionToken};this.socket.send((0,l.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 N.CONNECTED:this.state===T.RECONNECTING&&this.resubscribe(),this.emit(R.OPEN),this.id=t.clientId,this.connectPromise.resolve(),this.state=T.CONNECTED;break;case N.SUBSCRIBED:r&&r.emit(M.OPEN);break;case N.ERROR:t.requestId?r&&r.emit(M.ERROR,t.error):this.emit(R.ERROR,t.error);break;case N.UNSUBSCRIBED:break;default:var n=t.object.className;delete t.object.__type,delete t.object.className;var o=new E.default(n);if(o._finishFetch(t.object),!r)break;r.emit(t.op,o)}}},{key:"_handleWebSocketClose",value:function(){if(this.state!==T.DISCONNECTED){this.state=T.CLOSED,this.emit(R.CLOSE);var e=!0,t=!1,r=void 0;try{for(var n,o=(0,a.default)(this.subscriptions.values());!(e=(n=o.next()).done);e=!0){n.value.emit(M.CLOSE)}}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(R.ERROR,e);var t=!0,r=!1,n=void 0;try{for(var o,i=(0,a.default)(this.subscriptions.values());!(t=(o=i.next()).done);t=!0){o.value.emit(M.ERROR)}}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!==T.DISCONNECTED){this.state=T.RECONNECTING;var t=x(this.attempts);this.reconnectHandle&&clearTimeout(this.reconnectHandle),this.reconnectHandle=setTimeout(function(){e.attempts++,e.connectPromise=new O.default,e.open()}.bind(this),t)}}}]),t}(j.default);r.default=L},{"./EventEmitter":4,"./LiveQuerySubscription":8,"./ParseObject":18,"./ParsePromise":21,"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":58,"babel-runtime/helpers/createClass":59,"babel-runtime/helpers/inherits":61,"babel-runtime/helpers/possibleConstructorReturn":62,"babel-runtime/helpers/typeof":63}],8:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var o=e("babel-runtime/core-js/object/get-prototype-of"),i=n(o),s=e("babel-runtime/helpers/classCallCheck"),a=n(s),u=e("babel-runtime/helpers/createClass"),l=n(u),c=e("babel-runtime/helpers/possibleConstructorReturn"),f=n(c),d=e("babel-runtime/helpers/inherits"),h=n(d),p=e("./EventEmitter"),_=n(p),v=e("./CoreManager"),y=n(v),b=function(e){function t(e,r,n){(0,a.default)(this,t);var o=(0,f.default)(this,(t.__proto__||(0,i.default)(t)).call(this));return o.id=e,o.query=r,o.sessionToken=n,o}return(0,h.default)(t,e),(0,l.default)(t,[{key:"unsubscribe",value:function(){var e=this,t=this;y.default.getLiveQueryController().getDefaultLiveQueryClient().then(function(r){r.unsubscribe(t),t.emit("close"),e.resolve()})}}]),t}(_.default);r.default=b},{"./CoreManager":3,"./EventEmitter":4,"babel-runtime/core-js/object/get-prototype-of":52,"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59,"babel-runtime/helpers/inherits":61,"babel-runtime/helpers/possibleConstructorReturn":62}],9:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(){return{serverData:{},pendingOps:[{}],objectCache:{},tasks:new E.default,existed:!1}}function i(e,t){for(var r in t)void 0!==t[r]?e[r]=t[r]:delete e[r]}function s(e,t,r){var n=e.length-1;r?e[n][t]=r:delete e[n][t]}function a(e){e.push({})}function u(e){var t=e.shift();return e.length||(e[0]={}),t}function l(e){var t=u(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]}function c(e,t,r,n,o){for(var i=e[o],s=0;s<t.length;s++)t[s][o]&&(t[s][o]instanceof P.RelationOp?n&&(i=t[s][o].applyTo(i,{className:r,id:n},o)):i=t[s][o].applyTo(i));return i}function f(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 P.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}function d(e,t,r){for(var n in r){var o=r[n];if(e[n]=o,o&&"object"===(void 0===o?"undefined":(0,v.default)(o))&&!(o instanceof k.default)&&!(o instanceof m.default)&&!(o instanceof O.default)){var i=(0,b.default)(o,!1,!0);t[n]=(0,p.default)(i)}}}Object.defineProperty(r,"__esModule",{value:!0});var h=e("babel-runtime/core-js/json/stringify"),p=n(h),_=e("babel-runtime/helpers/typeof"),v=n(_);r.defaultState=o,r.setServerData=i,r.setPendingOp=s,r.pushPendingState=a,r.popPendingState=u,r.mergeFirstPendingState=l,r.estimateAttribute=c,r.estimateAttributes=f,r.commitServerChanges=d;var y=e("./encode"),b=n(y),g=e("./ParseFile"),m=n(g),C=e("./ParseObject"),k=n(C),j=e("./ParsePromise"),w=(n(j),e("./ParseRelation")),O=n(w),S=e("./TaskQueue"),E=n(S),P=e("./ParseOp")},{"./ParseFile":14,"./ParseObject":18,"./ParseOp":19,"./ParsePromise":21,"./ParseRelation":23,"./TaskQueue":33,"./encode":38,"babel-runtime/core-js/json/stringify":46,"babel-runtime/helpers/typeof":63}],10:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var o=e("./decode"),i=n(o),s=e("./encode"),a=n(s),u=e("./CoreManager"),l=n(u),c=e("./InstallationController"),f=n(c),d=e("./ParseOp"),h=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}(d),p=e("./RESTController"),_=n(p),v={initialize:function(e,t){l.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."),v._initialize(e,t)},_initialize:function(e,t,r){l.default.set("APPLICATION_ID",e),l.default.set("JAVASCRIPT_KEY",t),l.default.set("MASTER_KEY",r),l.default.set("USE_MASTER_KEY",!1)},setAsyncStorage:function(e){l.default.setAsyncStorage(e)}};Object.defineProperty(v,"applicationId",{get:function(){return l.default.get("APPLICATION_ID")},set:function(e){l.default.set("APPLICATION_ID",e)}}),Object.defineProperty(v,"javaScriptKey",{get:function(){return l.default.get("JAVASCRIPT_KEY")},set:function(e){l.default.set("JAVASCRIPT_KEY",e)}}),Object.defineProperty(v,"masterKey",{get:function(){return l.default.get("MASTER_KEY")},set:function(e){l.default.set("MASTER_KEY",e)}}),Object.defineProperty(v,"serverURL",{get:function(){return l.default.get("SERVER_URL")},set:function(e){l.default.set("SERVER_URL",e)}}),Object.defineProperty(v,"liveQueryServerURL",{get:function(){return l.default.get("LIVEQUERY_SERVER_URL")},set:function(e){l.default.set("LIVEQUERY_SERVER_URL",e)}}),v.ACL=e("./ParseACL").default,v.Analytics=e("./Analytics"),v.Cloud=e("./Cloud"),v.CoreManager=e("./CoreManager"),v.Config=e("./ParseConfig").default,v.Error=e("./ParseError").default,v.FacebookUtils=e("./FacebookUtils").default,v.File=e("./ParseFile").default,v.GeoPoint=e("./ParseGeoPoint").default,v.Polygon=e("./ParsePolygon").default,v.Installation=e("./ParseInstallation").default,v.Object=e("./ParseObject").default,v.Op={Set:h.SetOp,Unset:h.UnsetOp,Increment:h.IncrementOp,Add:h.AddOp,Remove:h.RemoveOp,AddUnique:h.AddUniqueOp,Relation:h.RelationOp},v.Promise=e("./ParsePromise").default,v.Push=e("./Push"),v.Query=e("./ParseQuery").default,v.Relation=e("./ParseRelation").default,v.Role=e("./ParseRole").default,v.Schema=e("./ParseSchema").default,v.Session=e("./ParseSession").default,v.Storage=e("./Storage"),v.User=e("./ParseUser").default,v.LiveQuery=e("./ParseLiveQuery").default,v.LiveQueryClient=e("./LiveQueryClient").default,v._request=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return l.default.getRESTController().request.apply(null,t)},v._ajax=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return l.default.getRESTController().ajax.apply(null,t)},v._decode=function(e,t){return(0,i.default)(t)},v._encode=function(e,t,r){return(0,a.default)(e,r)},v._getInstallationId=function(){return l.default.getInstallationController().currentInstallationId()},l.default.setInstallationController(f.default),l.default.setRESTController(_.default),v.Parse=v,t.exports=v},{"./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,"./ParsePromise":21,"./ParseQuery":22,"./ParseRelation":23,"./ParseRole":24,"./ParseSchema":25,"./ParseSession":26,"./ParseUser":27,"./Push":28,"./RESTController":29,"./Storage":31,"./decode":37,"./encode":38}],11:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var o=e("babel-runtime/core-js/object/keys"),i=n(o),s=e("babel-runtime/helpers/typeof"),a=n(s),u=e("babel-runtime/helpers/classCallCheck"),l=n(u),c=e("babel-runtime/helpers/createClass"),f=n(c),d=e("./ParseRole"),h=n(d),p=e("./ParseUser"),_=n(p),v=function(){function e(t){if((0,l.default)(this,e),this.permissionsById={},t&&"object"===(void 0===t?"undefined":(0,a.default)(t)))if(t instanceof _.default)this.setReadAccess(t,!0),this.setWriteAccess(t,!0);else for(var r in t){var n=t[r];if("string"!=typeof r)throw new TypeError("Tried to create an ACL with an invalid user id.");this.permissionsById[r]={};for(var o in n){var i=n[o];if("read"!==o&&"write"!==o)throw new TypeError("Tried to create an ACL with an invalid permission type.");if("boolean"!=typeof i)throw new TypeError("Tried to create an ACL with an invalid permission value.");this.permissionsById[r][o]=i}}else if("function"==typeof t)throw new TypeError("ParseACL constructed with a function. Did you forget ()?")}return(0,f.default)(e,[{key:"toJSON",value:function(){var e={};for(var t in this.permissionsById)e[t]=this.permissionsById[t];return e}},{key:"equals",value:function(t){if(!(t instanceof e))return!1;var r=(0,i.default)(this.permissionsById),n=(0,i.default)(t.permissionsById);if(r.length!==n.length)return!1;for(var o in this.permissionsById){if(!t.permissionsById[o])return!1;if(this.permissionsById[o].read!==t.permissionsById[o].read)return!1;if(this.permissionsById[o].write!==t.permissionsById[o].write)return!1}return!0}},{key:"_setAccess",value:function(e,t,r){if(t instanceof _.default)t=t.id;else if(t instanceof h.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,i.default)(o).length&&delete this.permissionsById[t])}},{key:"_getAccess",value:function(e,t){if(t instanceof _.default){if(!(t=t.id))throw new Error("Cannot get access for a ParseUser without an ID")}else if(t instanceof h.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 h.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 h.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 h.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 h.default&&(e=e.getName()),"string"!=typeof e)throw new TypeError("role must be a ParseRole or a String");this.setWriteAccess("role:"+e,t)}}]),e}();r.default=v},{"./ParseRole":24,"./ParseUser":27,"babel-runtime/core-js/object/keys":53,"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59,"babel-runtime/helpers/typeof":63}],12:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){try{var t=JSON.parse(e);if(t&&"object"===(void 0===t?"undefined":(0,u.default)(t)))return(0,v.default)(t)}catch(e){return null}}Object.defineProperty(r,"__esModule",{value:!0});var i=e("babel-runtime/core-js/json/stringify"),s=n(i),a=e("babel-runtime/helpers/typeof"),u=n(a),l=e("babel-runtime/helpers/classCallCheck"),c=n(l),f=e("babel-runtime/helpers/createClass"),d=n(f),h=e("./CoreManager"),p=n(h),_=e("./decode"),v=n(_),y=e("./encode"),b=(n(y),e("./escape")),g=n(b),m=e("./ParseError"),C=n(m),k=e("./ParsePromise"),j=n(k),w=e("./Storage"),O=n(w),S=function(){function e(){(0,c.default)(this,e),this.attributes={},this._escapedAttributes={}}return(0,d.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,g.default)(r.toString())),this._escapedAttributes[e]=n,n}}],[{key:"current",value:function(){return p.default.getConfigController().current()}},{key:"get",value:function(e){return e=e||{},p.default.getConfigController().get()._thenRunCallbacks(e)}}]),e}(),E=null,P={current:function(){if(E)return E;var e,t=new S,r=O.default.generatePath("currentConfig");if(!O.default.async()){if(e=O.default.getItem(r)){var n=o(e);n&&(t.attributes=n,E=t)}return t}return O.default.getItemAsync(r).then(function(e){if(e){var r=o(e);r&&(t.attributes=r,E=t)}return t})},get:function(){return p.default.getRESTController().request("GET","config",{},{}).then(function(e){if(!e||!e.params){var t=new C.default(C.default.INVALID_JSON,"Config JSON response invalid.");return j.default.error(t)}var r=new S;r.attributes={};for(var n in e.params)r.attributes[n]=(0,v.default)(e.params[n]);return E=r,O.default.setItemAsync(O.default.generatePath("currentConfig"),(0,s.default)(e.params)).then(function(){return r})})}};p.default.setConfigController(P),r.default=S},{"./CoreManager":3,"./ParseError":13,"./ParsePromise":21,"./Storage":31,"./decode":37,"./encode":38,"./escape":40,"babel-runtime/core-js/json/stringify":46,"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59,"babel-runtime/helpers/typeof":63}],13:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var o=e("babel-runtime/helpers/classCallCheck"),i=n(o),s=e("babel-runtime/helpers/createClass"),a=n(s),u=function(){function e(t,r){(0,i.default)(this,e),this.code=t,this.message=r}return(0,a.default)(e,[{key:"toString",value:function(){return"ParseError: "+this.code+" "+this.message}}]),e}();u.OTHER_CAUSE=-1,u.INTERNAL_SERVER_ERROR=1,u.CONNECTION_FAILED=100,u.OBJECT_NOT_FOUND=101,u.INVALID_QUERY=102,u.INVALID_CLASS_NAME=103,u.MISSING_OBJECT_ID=104,u.INVALID_KEY_NAME=105,u.INVALID_POINTER=106,u.INVALID_JSON=107,u.COMMAND_UNAVAILABLE=108,u.NOT_INITIALIZED=109,u.INCORRECT_TYPE=111,u.INVALID_CHANNEL_NAME=112,u.PUSH_MISCONFIGURED=115,u.OBJECT_TOO_LARGE=116,u.OPERATION_FORBIDDEN=119,u.CACHE_MISS=120,u.INVALID_NESTED_KEY=121,u.INVALID_FILE_NAME=122,u.INVALID_ACL=123,u.TIMEOUT=124,u.INVALID_EMAIL_ADDRESS=125,u.MISSING_CONTENT_TYPE=126,u.MISSING_CONTENT_LENGTH=127,u.INVALID_CONTENT_LENGTH=128,u.FILE_TOO_LARGE=129,u.FILE_SAVE_ERROR=130,u.DUPLICATE_VALUE=137,u.INVALID_ROLE_NAME=139,u.EXCEEDED_QUOTA=140,u.SCRIPT_FAILED=141,u.VALIDATION_ERROR=142,u.INVALID_IMAGE_DATA=143,u.UNSAVED_FILE_ERROR=151,u.INVALID_PUSH_TIME_ERROR=152,u.FILE_DELETE_ERROR=153,u.REQUEST_LIMIT_EXCEEDED=155,u.INVALID_EVENT_NAME=160,u.USERNAME_MISSING=200,u.PASSWORD_MISSING=201,u.USERNAME_TAKEN=202,u.EMAIL_TAKEN=203,u.EMAIL_MISSING=204,u.EMAIL_NOT_FOUND=205,u.SESSION_MISSING=206,u.MUST_CREATE_USER_THROUGH_SIGNUP=207,u.ACCOUNT_ALREADY_LINKED=208,u.INVALID_SESSION_TOKEN=209,u.LINKED_ID_MISSING=250,u.INVALID_LINKED_SESSION=251,u.UNSUPPORTED_SERVICE=252,u.INVALID_SCHEMA_OPERATION=255,u.AGGREGATE_ERROR=600,u.FILE_READ_ERROR=601,u.X_DOMAIN_REQUEST=602,r.default=u},{"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59}],14:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(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.")}Object.defineProperty(r,"__esModule",{value:!0});var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("babel-runtime/helpers/createClass"),u=n(a),l=e("./CoreManager"),c=n(l),f=e("./ParsePromise"),d=(n(f),/^data:([a-zA-Z]*\/[a-zA-Z+.-]*);(charset=[a-zA-Z0-9\-\/\s]*,)?base64,/),h=function(){function e(t,r,n){(0,s.default)(this,e);var o=n||"";if(this._name=t,void 0!==r)if(Array.isArray(r))this._source={format:"base64",base64:e.encodeBase64(r),type:o};else if("undefined"!=typeof File&&r instanceof File)this._source={format:"file",file:r,type:o};else{
if(!r||"string"!=typeof r.base64)throw new TypeError("Cannot create a Parse.File with that data.");var i=r.base64,a=i.indexOf(",");if(-1!==a){var u=d.exec(i.slice(0,a+1));this._source={format:"base64",base64:i.slice(a+1),type:u[1]}}else this._source={format:"base64",base64:i,type:o}}}return(0,u.default)(e,[{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=c.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._thenRunCallbacks(e)}},{key:"toJSON",value:function(){return{__type:"File",name:this._name,url:this._url}}},{key:"equals",value:function(t){return this===t||t instanceof e&&this.name()===t.name()&&this.url()===t.url()&&void 0!==this.url()}}],[{key:"fromJSON",value:function(t){if("File"!==t.__type)throw new TypeError("JSON object does not represent a ParseFile");var r=new e(t.name);return r._url=t.url,r}},{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],i=e[3*r+1]||0,s=e[3*r+2]||0,a=3*r+1<e.length,u=3*r+2<e.length;t[r]=[o(n>>2&63),o(n<<4&48|i>>4&15),a?o(i<<2&60|s>>6&3):"=",u?o(63&s):"="].join("")}return t.join("")}}]),e}(),p={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":c.default.get("APPLICATION_ID"),"X-Parse-JavaScript-Key":c.default.get("JAVASCRIPT_KEY"),"Content-Type":t.type||(t.file?t.file.type:null)},n=c.default.get("SERVER_URL");return"/"!==n[n.length-1]&&(n+="/"),n+="files/"+e,c.default.getRESTController().ajax("POST",n,t.file,r)},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),c.default.getRESTController().request("POST","files/"+e,n,r)}};c.default.setFileController(p),r.default=h},{"./CoreManager":3,"./ParsePromise":21,"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59}],15:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var o=e("babel-runtime/helpers/typeof"),i=n(o),s=e("babel-runtime/helpers/classCallCheck"),a=n(s),u=e("babel-runtime/helpers/createClass"),l=n(u),c=e("./ParsePromise"),f=n(c),d=function(){function e(t,r){(0,a.default)(this,e),Array.isArray(t)?(e._validate(t[0],t[1]),this._latitude=t[0],this._longitude=t[1]):"object"===(void 0===t?"undefined":(0,i.default)(t))?(e._validate(t.latitude,t.longitude),this._latitude=t.latitude,this._longitude=t.longitude):"number"==typeof t&&"number"==typeof r?(e._validate(t,r),this._latitude=t,this._longitude=r):(this._latitude=0,this._longitude=0)}return(0,l.default)(e,[{key:"toJSON",value:function(){return e._validate(this._latitude,this._longitude),{__type:"GeoPoint",latitude:this._latitude,longitude:this._longitude}}},{key:"equals",value:function(t){return t instanceof e&&this.latitude===t.latitude&&this.longitude===t.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(t){e._validate(t,this.longitude),this._latitude=t}},{key:"longitude",get:function(){return this._longitude},set:function(t){e._validate(this.latitude,t),this._longitude=t}}],[{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(e>90)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(t>180)throw new TypeError("GeoPoint longitude out of bounds: "+t+" > 180.0.")}},{key:"current",value:function(t){var r=new f.default;return navigator.geolocation.getCurrentPosition(function(t){r.resolve(new e(t.coords.latitude,t.coords.longitude))},function(e){r.reject(e)}),r._thenRunCallbacks(t)}}]),e}();r.default=d},{"./ParsePromise":21,"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59,"babel-runtime/helpers/typeof":63}],16:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var o=e("babel-runtime/helpers/typeof"),i=n(o),s=e("babel-runtime/core-js/object/get-prototype-of"),a=n(s),u=e("babel-runtime/helpers/classCallCheck"),l=n(u),c=e("babel-runtime/helpers/possibleConstructorReturn"),f=n(c),d=e("babel-runtime/helpers/inherits"),h=n(d),p=e("./ParseObject"),_=n(p),v=function(e){function t(e){(0,l.default)(this,t);var r=(0,f.default)(this,(t.__proto__||(0,a.default)(t)).call(this,"_Installation"));if(e&&"object"===(void 0===e?"undefined":(0,i.default)(e))&&!r.set(e||{}))throw new Error("Can't create an invalid Session");return r}return(0,h.default)(t,e),t}(_.default);r.default=v,_.default.registerSubclass("_Installation",v)},{"./ParseObject":18,"babel-runtime/core-js/object/get-prototype-of":52,"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/inherits":61,"babel-runtime/helpers/possibleConstructorReturn":62,"babel-runtime/helpers/typeof":63}],17:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(){h.default.getLiveQueryController().open()}function i(){h.default.getLiveQueryController().close()}function s(){return h.default.getUserController().currentUserAsync().then(function(e){return e?e.getSessionToken():void 0})}function a(){return h.default.getLiveQueryController().getDefaultLiveQueryClient()}Object.defineProperty(r,"__esModule",{value:!0});var u=e("./EventEmitter"),l=n(u),c=e("./LiveQueryClient"),f=n(c),d=e("./CoreManager"),h=n(d),p=e("./ParsePromise"),_=n(p),v=new l.default;v.open=o,v.close=i,v.on("error",function(){}),r.default=v;var y=void 0,b={setDefaultLiveQueryClient:function(e){y=e},getDefaultLiveQueryClient:function(){return y?_.default.as(y):s().then(function(e){var t=h.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=h.default.get("SERVER_URL"),n="ws://";0===r.indexOf("https")&&(n="wss://");t=n+r.replace(/^https?:\/\//,""),h.default.set("LIVEQUERY_SERVER_URL",t)}var o=h.default.get("APPLICATION_ID"),i=h.default.get("JAVASCRIPT_KEY"),s=h.default.get("MASTER_KEY");return y=new f.default({applicationId:o,serverURL:t,javascriptKey:i,masterKey:s,sessionToken:e}),y.on("error",function(e){v.emit("error",e)}),y.on("open",function(){v.emit("open")}),y.on("close",function(){v.emit("close")}),y})},open:function(){var e=this;a().then(function(t){e.resolve(t.open())})},close:function(){var e=this;a().then(function(t){e.resolve(t.close())})},subscribe:function(e){var t=this,r=new l.default;return a().then(function(n){return n.shouldOpen()&&n.open(),s().then(function(o){var i=n.subscribe(e,o);r.id=i.id,r.query=i.query,r.sessionToken=i.sessionToken,r.unsubscribe=i.unsubscribe,i.on("open",function(){r.emit("open")}),i.on("create",function(e){r.emit("create",e)}),i.on("update",function(e){r.emit("update",e)}),i.on("enter",function(e){r.emit("enter",e)}),i.on("leave",function(e){r.emit("leave",e)}),i.on("delete",function(e){r.emit("delete",e)}),i.on("close",function(e){r.emit("close",e)}),i.on("error",function(e){r.emit("error",e)}),t.resolve()})}),r},unsubscribe:function(e){var t=this;a().then(function(r){t.resolve(r.unsubscribe(e))})},_clearCachedDefaultClient:function(){y=null}};h.default.setLiveQueryController(b)},{"./CoreManager":3,"./EventEmitter":4,"./LiveQueryClient":7,"./ParsePromise":21}],18:[function(e,t,r){"use strict";function n(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 o(e){return e&&e.__esModule?e:{default:e}}function i(){var e=j.default.get("SERVER_URL");"/"!==e[e.length-1]&&(e+="/");var t=e.replace(/https?:\/\//,"");return t.substr(t.indexOf("/"))}Object.defineProperty(r,"__esModule",{value:!0});var s=e("babel-runtime/core-js/object/define-property"),a=o(s),u=e("babel-runtime/core-js/object/create"),l=o(u),c=e("babel-runtime/core-js/object/freeze"),f=o(c),d=e("babel-runtime/core-js/json/stringify"),h=o(d),p=e("babel-runtime/core-js/object/keys"),_=o(p),v=e("babel-runtime/helpers/typeof"),y=o(v),b=e("babel-runtime/helpers/classCallCheck"),g=o(b),m=e("babel-runtime/helpers/createClass"),C=o(m),k=e("./CoreManager"),j=o(k),w=e("./canBeSerialized"),O=o(w),S=e("./decode"),E=o(S),P=e("./encode"),A=o(P),T=e("./equals"),I=(o(T),e("./escape")),N=o(I),R=e("./ParseACL"),M=o(R),x=e("./parseDate"),L=o(x),D=e("./ParseError"),U=o(D),F=e("./ParseFile"),q=o(F),K=e("./ParseOp"),J=e("./ParsePromise"),W=o(J),Q=e("./ParseQuery"),B=o(Q),G=e("./ParseRelation"),V=o(G),z=e("./SingleInstanceStateController"),Y=n(z),H=e("./unique"),$=o(H),X=e("./UniqueInstanceStateController"),Z=n(X),ee=e("./unsavedChildren"),te=o(ee),re={},ne=0,oe=0,ie=!j.default.get("IS_NODE");ie?j.default.setObjectStateController(Y):j.default.setObjectStateController(Z);var se=function(){function e(t,r,n){(0,g.default)(this,e),"function"==typeof this.initialize&&this.initialize.apply(this,arguments);var o=null;if(this._objCount=oe++,"string"==typeof t)this.className=t,r&&"object"===(void 0===r?"undefined":(0,y.default)(r))&&(o=r);else if(t&&"object"===(void 0===t?"undefined":(0,y.default)(t))){this.className=t.className,o={};for(var i in t)"className"!==i&&(o[i]=t[i]);r&&"object"===(void 0===r?"undefined":(0,y.default)(r))&&(n=r)}if(o&&!this.set(o,n))throw new Error("Can't create an invalid Parse Object")}return(0,C.default)(e,[{key:"_getId",value:function(){if("string"==typeof this.id)return this.id;if("string"==typeof this._localId)return this._localId;var e="local"+String(ne++);return this._localId=e,e}},{key:"_getStateIdentifier",value:function(){if(ie){var e=this.id;return e||(e=this._getId()),{id:e,className:this.className}}return this}},{key:"_getServerData",value:function(){return j.default.getObjectStateController().getServerData(this._getStateIdentifier())}},{key:"_clearServerData",value:function(){var e=this._getServerData(),t={};for(var r in e)t[r]=void 0;j.default.getObjectStateController().setServerData(this._getStateIdentifier(),t)}},{key:"_getPendingOps",value:function(){return j.default.getObjectStateController().getPendingOps(this._getStateIdentifier())}},{key:"_clearPendingOps",value:function(){var e=this._getPendingOps(),t=e[e.length-1];(0,_.default)(t).forEach(function(e){delete t[e]})}},{key:"_getDirtyObjectAttributes",value:function(){var t=this.attributes,r=j.default.getObjectStateController(),n=r.getObjectCache(this._getStateIdentifier()),o={};for(var i in t){var s=t[i];if(s&&"object"===(void 0===s?"undefined":(0,y.default)(s))&&!(s instanceof e)&&!(s instanceof q.default)&&!(s instanceof V.default))try{var a=(0,A.default)(s,!1,!0),u=(0,h.default)(a);n[i]!==u&&(o[i]=s)}catch(e){o[i]=s}}return o}},{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 K.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=j.default.getObjectStateController();t.initializeState(this._getStateIdentifier());var r={};for(var n in e)"ACL"===n?r[n]=new M.default(e[n]):"objectId"!==n&&(r[n]=(0,E.default)(e[n]),r[n]instanceof V.default&&r[n]._ensureParentAndKey(this,n));r.createdAt&&"string"==typeof r.createdAt&&(r.createdAt=(0,L.default)(r.createdAt)),r.updatedAt&&"string"==typeof r.updatedAt&&(r.updatedAt=(0,L.default)(r.updatedAt)),!r.updatedAt&&r.createdAt&&(r.updatedAt=r.createdAt),t.commitServerChanges(this._getStateIdentifier(),r)}},{key:"_setExisted",value:function(e){var t=j.default.getObjectStateController(),r=t.getState(this._getStateIdentifier());r&&(r.existed=e)}},{key:"_migrateId",value:function(e){if(this._localId&&e)if(ie){var t=j.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=j.default.getObjectStateController(),o=n.popPendingState(this._getStateIdentifier());for(var i in o)o[i]instanceof K.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 M.default(e[i]):"objectId"!==i&&(r[i]=(0,E.default)(e[i]),r[i]instanceof K.UnsetOp&&(r[i]=void 0)):r[i]=(0,L.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(),j.default.getObjectStateController().mergeFirstPendingState(this._getStateIdentifier())}},{key:"initialize",value:function(){}},{key:"toJSON",value:function(e){var t=this.id?this.className+":"+this.id:this,e=e||[t],r={},n=this.attributes;for(var o in n)"createdAt"!==o&&"updatedAt"!==o||!n[o].toJSON?r[o]=(0,A.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(t){return this===t||t instanceof e&&this.className===t.className&&this.id===t.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,_.default)(t[0]).length||0!==(0,_.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,_.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 V.default))throw new Error("Called relation() on non-relation field "+e);return t._ensureParentAndKey(this,e),t}return new V.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,N.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,y.default)(e)))n=e,r=t;else{if("string"!=typeof e)return this;n[e]=t}r=r||{};var i=[];"function"==typeof this.constructor.readOnlyAttributes&&(i=i.concat(this.constructor.readOnlyAttributes()));for(var s in n)if("createdAt"!==s&&"updatedAt"!==s){if(i.indexOf(s)>-1)throw new Error("Cannot modify readonly attribute: "+s);r.unset?o[s]=new K.UnsetOp:n[s]instanceof K.Op?o[s]=n[s]:n[s]&&"object"===(0,y.default)(n[s])&&"string"==typeof n[s].__op?o[s]=(0,K.opFromJSON)(n[s]):"objectId"===s||"id"===s?"string"==typeof n[s]&&(this.id=n[s]):"ACL"!==s||"object"!==(0,y.default)(n[s])||n[s]instanceof M.default?o[s]=new K.SetOp(n[s]):o[s]=new K.SetOp(new M.default(n[s]))}var a=this.attributes,u={};for(var l in o)o[l]instanceof K.RelationOp?u[l]=o[l].applyTo(a[l],this,l):o[l]instanceof K.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=j.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||{},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 K.IncrementOp(t))}},{key:"add",value:function(e,t){return this.set(e,new K.AddOp([t]))}},{key:"addAll",value:function(e,t){return this.set(e,new K.AddOp(t))}},{key:"addUnique",value:function(e,t){return this.set(e,new K.AddUniqueOp([t]))}},{key:"addAllUnique",value:function(e,t){return this.set(e,new K.AddUniqueOp(t))}},{key:"remove",value:function(e,t){return this.set(e,new K.RemoveOp([t]))}},{key:"removeAll",value:function(e,t){return this.set(e,new K.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,ie)return e;var t=j.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=j.default.getObjectStateController(),t=e.getState(this._getStateIdentifier());return!!t&&t.existed}},{key:"isValid",value:function(){return!this.validate(this.attributes)}},{key:"validate",value:function(e){if(e.hasOwnProperty("ACL")&&!(e.ACL instanceof M.default))return new U.default(U.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 U.default(U.default.INVALID_KEY_NAME);return!1}},{key:"getACL",value:function(){var e=this.get("ACL");return e instanceof M.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"];"function"==typeof this.constructor.readOnlyAttributes&&(r=r.concat(this.constructor.readOnlyAttributes()));for(var n in e)r.indexOf(n)<0&&(t[n]=!0);return this.set(t,{unset:!0})}},{key:"fetch",value:function(e){e=e||{};var t={};return e.hasOwnProperty("useMasterKey")&&(t.useMasterKey=e.useMasterKey),e.hasOwnProperty("sessionToken")&&(t.sessionToken=e.sessionToken),j.default.getObjectController().fetch(this,!0,t)._thenRunCallbacks(e)}},{key:"save",value:function(e,t,r){var n,o,i=this;if("object"===(void 0===e?"undefined":(0,y.default)(e))||void 0===e?(n=e,"object"===(void 0===t?"undefined":(0,y.default)(t))&&(o=t)):(n={},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),W.default.error(s);this.set(n,o)}o=o||{};var a={};o.hasOwnProperty("useMasterKey")&&(a.useMasterKey=!!o.useMasterKey),o.hasOwnProperty("sessionToken")&&"string"==typeof o.sessionToken&&(a.sessionToken=o.sessionToken);var u=j.default.getObjectController(),l=(0,te.default)(this);return u.save(l,a).then(function(){return u.save(i,a)})._thenRunCallbacks(o,this)}},{key:"destroy",value:function(e){e=e||{};var t={};return e.hasOwnProperty("useMasterKey")&&(t.useMasterKey=e.useMasterKey),e.hasOwnProperty("sessionToken")&&(t.sessionToken=e.sessionToken),this.id?j.default.getObjectController().destroy(this,t)._thenRunCallbacks(e):W.default.as()._thenRunCallbacks(e)}},{key:"attributes",get:function(){var e=j.default.getObjectStateController();return(0,f.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(){j.default.getObjectStateController().clearAllState()}},{key:"fetchAll",value:function(e,t){var t=t||{},r={};return t.hasOwnProperty("useMasterKey")&&(r.useMasterKey=t.useMasterKey),t.hasOwnProperty("sessionToken")&&(r.sessionToken=t.sessionToken),j.default.getObjectController().fetch(e,!0,r)._thenRunCallbacks(t)}},{key:"fetchAllIfNeeded",value:function(e,t){var t=t||{},r={};return t.hasOwnProperty("useMasterKey")&&(r.useMasterKey=t.useMasterKey),t.hasOwnProperty("sessionToken")&&(r.sessionToken=t.sessionToken),j.default.getObjectController().fetch(e,!1,r)._thenRunCallbacks(t)}},{key:"destroyAll",value:function(e,t){var t=t||{},r={};return t.hasOwnProperty("useMasterKey")&&(r.useMasterKey=t.useMasterKey),t.hasOwnProperty("sessionToken")&&(r.sessionToken=t.sessionToken),j.default.getObjectController().destroy(e,r)._thenRunCallbacks(t)}},{key:"saveAll",value:function(e,t){var t=t||{},r={};return t.hasOwnProperty("useMasterKey")&&(r.useMasterKey=t.useMasterKey),t.hasOwnProperty("sessionToken")&&(r.sessionToken=t.sessionToken),j.default.getObjectController().save(e,r)._thenRunCallbacks(t)}},{key:"createWithoutData",value:function(e){var t=new this;return t.id=e,t}},{key:"fromJSON",value:function(t,r){if(!t.className)throw new Error("Cannot create an object without a className");var n=re[t.className],o=n?new n:new e(t.className),i={};for(var s in t)"className"!==s&&"__type"!==s&&(i[s]=t[s]);if(r){i.objectId&&(o.id=i.objectId);var a=null;"function"==typeof o._preserveFieldsOnFetch&&(a=o._preserveFieldsOnFetch()),o._clearServerData(),a&&o._finishFetch(a)}return o._finishFetch(i),t.objectId&&o._setExisted(!0),o}},{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?");re[e]=t,t.className||(t.className=e)}},{key:"extend",value:function(t,r,n){if("string"!=typeof t){if(t&&"string"==typeof t.className)return e.extend(t.className,t,r);throw new Error("Parse.Object.extend's first argument should be the className.")}var o=t;"User"===o&&j.default.get("PERFORM_USER_REWRITE")&&(o="_User");var i=e.prototype;this.hasOwnProperty("__super__")&&this.__super__?i=this.prototype:re[o]&&(i=re[o].prototype);var s=function(e,t){if(this.className=o,this._objCount=oe++,"function"==typeof this.initialize&&this.initialize.apply(this,arguments),e&&"object"===(void 0===e?"undefined":(0,y.default)(e))&&!this.set(e||{},t))throw new Error("Can't create an invalid Parse Object")};if(s.className=o,s.__super__=i,s.prototype=(0,l.default)(i,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),r)for(var u in r)"className"!==u&&(0,a.default)(s.prototype,u,{value:r[u],enumerable:!1,writable:!0,configurable:!0});if(n)for(var u in n)"className"!==u&&(0,a.default)(s,u,{value:n[u],enumerable:!1,writable:!0,configurable:!0});return s.extend=function(t,r,n){return"string"==typeof t?e.extend.call(s,t,r,n):e.extend.call(s,o,t,r)},s.createWithoutData=e.createWithoutData,re[o]=s,s}},{key:"enableSingleInstance",value:function(){ie=!0,j.default.setObjectStateController(Y)}},{key:"disableSingleInstance",value:function(){ie=!1,j.default.setObjectStateController(Z)}}]),e}(),ae={fetch:function(e,t,r){if(Array.isArray(e)){if(e.length<1)return W.default.as([]);var n=[],o=[],i=null,s=[],a=null;if(e.forEach(function(e){a||(i||(i=e.className),i!==e.className&&(a=new U.default(U.default.INVALID_CLASS_NAME,"All objects should be of the same class")),e.id||(a=new U.default(U.default.MISSING_OBJECT_ID,"All objects must have an ID")),(t||0===(0,_.default)(e._getServerData()).length)&&(o.push(e.id),n.push(e)),s.push(e))}),a)return W.default.error(a);var u=new B.default(i);return u.containedIn("objectId",o),u._limit=o.length,u.find(r).then(function(e){var r={};e.forEach(function(e){r[e.id]=e});for(var o=0;o<n.length;o++){var i=n[o];if((!i||!i.id||!r[i.id])&&t)return W.default.error(new U.default(U.default.OBJECT_NOT_FOUND,"All objects must exist on the server."))}if(!ie)for(var o=0;o<s.length;o++){var i=s[o];if(i&&i.id&&r[i.id]){var a=i.id;i._finishFetch(r[a].toJSON()),s[o]=r[a]}}return W.default.as(s)})}return j.default.getRESTController().request("GET","classes/"+e.className+"/"+e._getId(),{},r).then(function(t){return e instanceof se&&(e._clearPendingOps(),e._clearServerData(),e._finishFetch(t)),e})},destroy:function(e,t){var r=j.default.getRESTController();if(Array.isArray(e)){if(e.length<1)return W.default.as([]);var n=[[]];e.forEach(function(e){e.id&&(n[n.length-1].push(e),n[n.length-1].length>=20&&n.push([]))}),0===n[n.length-1].length&&n.pop();var o=W.default.as(),s=[];return n.forEach(function(e){o=o.then(function(){return r.request("POST","batch",{requests:e.map(function(e){return{method:"DELETE",path:i()+"classes/"+e.className+"/"+e._getId(),body:{}}})},t).then(function(t){for(var r=0;r<t.length;r++)if(t[r]&&t[r].hasOwnProperty("error")){var n=new U.default(t[r].error.code,t[r].error.error);n.object=e[r],s.push(n)}})})}),o.then(function(){if(s.length){var t=new U.default(U.default.AGGREGATE_ERROR);return t.errors=s,W.default.error(t)}return W.default.as(e)})}return e instanceof se?r.request("DELETE","classes/"+e.className+"/"+e._getId(),{},t).then(function(){return W.default.as(e)}):W.default.as(e)},save:function(e,t){var r=j.default.getRESTController(),n=j.default.getObjectStateController();if(Array.isArray(e)){if(e.length<1)return W.default.as([]);for(var o=e.concat(),s=0;s<e.length;s++)e[s]instanceof se&&(o=o.concat((0,te.default)(e[s],!0)));o=(0,$.default)(o);var a=W.default.as(),u=[];return o.forEach(function(e){e instanceof q.default?a=a.then(function(){return e.save()}):e instanceof se&&u.push(e)}),a.then(function(){var o=null;return W.default._continueWhile(function(){return u.length>0},function(){var e=[],s=[];if(u.forEach(function(t){e.length<20&&(0,O.default)(t)?e.push(t):s.push(t)}),u=s,e.length<1)return W.default.error(new U.default(U.default.OTHER_CAUSE,"Tried to save a batch with a cycle."));var a=new W.default,l=[],c=[];return e.forEach(function(e,t){var r=new W.default;l.push(r),n.pushPendingState(e._getStateIdentifier()),c.push(n.enqueueTask(e._getStateIdentifier(),function(){return r.resolve(),a.then(function(r,n){if(r[t].hasOwnProperty("success"))e._handleSaveResponse(r[t].success,n);else{if(!o&&r[t].hasOwnProperty("error")){var i=r[t].error;o=new U.default(i.code,i.error),u=[]}e._handleSaveError()}})}))}),W.default.when(l).then(function(){return r.request("POST","batch",{requests:e.map(function(e){var t=e._getSaveParams();return t.path=i()+t.path,t})},t)}).then(function(e,t){a.resolve(e,t)}),W.default.when(c)}).then(function(){return o?W.default.error(o):W.default.as(e)})})}if(e instanceof se){var l=e,c=function(){var e=l._getSaveParams();return r.request(e.method,e.path,e.body,t).then(function(e,t){l._handleSaveResponse(e,t)},function(e){return l._handleSaveError(),W.default.error(e)})};return n.pushPendingState(e._getStateIdentifier()),n.enqueueTask(e._getStateIdentifier(),c).then(function(){return e},function(e){return W.default.error(e)})}return W.default.as()}};j.default.setObjectController(ae),r.default=se},{"./CoreManager":3,"./ParseACL":11,"./ParseError":13,"./ParseFile":14,"./ParseOp":19,"./ParsePromise":21,"./ParseQuery":22,"./ParseRelation":23,"./SingleInstanceStateController":30,"./UniqueInstanceStateController":34,"./canBeSerialized":36,"./decode":37,"./encode":38,"./equals":39,"./escape":40,"./parseDate":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/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59,"babel-runtime/helpers/typeof":63}],19:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){if(!e||!e.__op)return null;switch(e.__op){case"Delete":return new A;case"Increment":return new T(e.amount);case"Add":return new I((0,b.default)(e.objects));case"AddUnique":return new N((0,b.default)(e.objects));case"Remove":return new R((0,b.default)(e.objects));case"AddRelation":var t=(0,b.default)(e.objects);return Array.isArray(t)?new M(t,[]):new M([],[]);case"RemoveRelation":var r=(0,b.default)(e.objects);return Array.isArray(r)?new M([],r):new M([],[]);case"Batch":for(var t=[],r=[],n=0;n<e.ops.length;n++)"AddRelation"===e.ops[n].__op?t=t.concat((0,b.default)(e.ops[n].objects)):"RemoveRelation"===e.ops[n].__op&&(r=r.concat((0,b.default)(e.ops[n].objects)));return new M(t,r)}return null}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=e("babel-runtime/core-js/object/get-prototype-of"),s=n(i),a=e("babel-runtime/helpers/possibleConstructorReturn"),u=n(a),l=e("babel-runtime/helpers/inherits"),c=n(l),f=e("babel-runtime/helpers/classCallCheck"),d=n(f),h=e("babel-runtime/helpers/createClass"),p=n(h);r.opFromJSON=o;var _=e("./arrayContainsObject"),v=n(_),y=e("./decode"),b=n(y),g=e("./encode"),m=n(g),C=e("./ParseObject"),k=n(C),j=e("./ParseRelation"),w=n(j),O=e("./unique"),S=n(O),E=r.Op=function(){function e(){(0,d.default)(this,e)}return(0,p.default)(e,[{key:"applyTo",value:function(){}},{key:"mergeWith",value:function(){}},{key:"toJSON",value:function(){}}]),e}(),P=r.SetOp=function(e){function t(e){(0,d.default)(this,t);var r=(0,u.default)(this,(t.__proto__||(0,s.default)(t)).call(this));return r._value=e,r}return(0,c.default)(t,e),(0,p.default)(t,[{key:"applyTo",value:function(){return this._value}},{key:"mergeWith",value:function(){return new t(this._value)}},{key:"toJSON",value:function(){return(0,m.default)(this._value,!1,!0)}}]),t}(E),A=r.UnsetOp=function(e){function t(){return(0,d.default)(this,t),(0,u.default)(this,(t.__proto__||(0,s.default)(t)).apply(this,arguments))}return(0,c.default)(t,e),(0,p.default)(t,[{key:"applyTo",value:function(){}},{key:"mergeWith",value:function(){return new t}},{key:"toJSON",value:function(){return{__op:"Delete"}}}]),t}(E),T=r.IncrementOp=function(e){function t(e){(0,d.default)(this,t);var r=(0,u.default)(this,(t.__proto__||(0,s.default)(t)).call(this));if("number"!=typeof e)throw new TypeError("Increment Op must be initialized with a numeric amount.");return r._amount=e,r}return(0,c.default)(t,e),(0,p.default)(t,[{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 P)return new P(this.applyTo(e._value))
;if(e instanceof A)return new P(this._amount);if(e instanceof t)return new t(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}}}]),t}(E),I=r.AddOp=function(e){function t(e){(0,d.default)(this,t);var r=(0,u.default)(this,(t.__proto__||(0,s.default)(t)).call(this));return r._value=Array.isArray(e)?e:[e],r}return(0,c.default)(t,e),(0,p.default)(t,[{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 P)return new P(this.applyTo(e._value));if(e instanceof A)return new P(this._value);if(e instanceof t)return new t(this.applyTo(e._value));throw new Error("Cannot merge Add Op with the previous Op")}},{key:"toJSON",value:function(){return{__op:"Add",objects:(0,m.default)(this._value,!1,!0)}}}]),t}(E),N=r.AddUniqueOp=function(e){function t(e){(0,d.default)(this,t);var r=(0,u.default)(this,(t.__proto__||(0,s.default)(t)).call(this));return r._value=(0,S.default)(Array.isArray(e)?e:[e]),r}return(0,c.default)(t,e),(0,p.default)(t,[{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 k.default?(0,v.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 P)return new P(this.applyTo(e._value));if(e instanceof A)return new P(this._value);if(e instanceof t)return new t(this.applyTo(e._value));throw new Error("Cannot merge AddUnique Op with the previous Op")}},{key:"toJSON",value:function(){return{__op:"AddUnique",objects:(0,m.default)(this._value,!1,!0)}}}]),t}(E),R=r.RemoveOp=function(e){function t(e){(0,d.default)(this,t);var r=(0,u.default)(this,(t.__proto__||(0,s.default)(t)).call(this));return r._value=(0,S.default)(Array.isArray(e)?e:[e]),r}return(0,c.default)(t,e),(0,p.default)(t,[{key:"applyTo",value:function(e){if(null==e)return[];if(Array.isArray(e)){for(var t=e.indexOf(this._value),r=e.concat([]),t=0;t<this._value.length;t++){for(var n=r.indexOf(this._value[t]);n>-1;)r.splice(n,1),n=r.indexOf(this._value[t]);if(this._value[t]instanceof k.default&&this._value[t].id)for(var o=0;o<r.length;o++)r[o]instanceof k.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 P)return new P(this.applyTo(e._value));if(e instanceof A)return new A;if(e instanceof t){for(var r=e._value.concat([]),n=0;n<this._value.length;n++)this._value[n]instanceof k.default?(0,v.default)(r,this._value[n])||r.push(this._value[n]):r.indexOf(this._value[n])<0&&r.push(this._value[n]);return new t(r)}throw new Error("Cannot merge Remove Op with the previous Op")}},{key:"toJSON",value:function(){return{__op:"Remove",objects:(0,m.default)(this._value,!1,!0)}}}]),t}(E),M=r.RelationOp=function(e){function t(e,r){(0,d.default)(this,t);var n=(0,u.default)(this,(t.__proto__||(0,s.default)(t)).call(this));return n._targetClassName=null,Array.isArray(e)&&(n.relationsToAdd=(0,S.default)(e.map(n._extractId,n))),Array.isArray(r)&&(n.relationsToRemove=(0,S.default)(r.map(n._extractId,n))),n}return(0,c.default)(t,e),(0,p.default)(t,[{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 k.default(t.className);t.id&&0===t.id.indexOf("local")?n._localId=t.id:t.id&&(n.id=t.id);var o=new w.default(n,r);return o.targetClassName=this._targetClassName,o}if(e instanceof w.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 A)throw new Error("You cannot modify a relation after deleting it.");if(e instanceof t){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);t>-1&&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);t>-1&&n.splice(t,1)}),this.relationsToRemove.forEach(function(e){n.indexOf(e)<0&&n.push(e)});var o=new t(r,n);return o._targetClassName=this._targetClassName,o}throw new Error("Cannot merge Relation Op with the previous Op")}},{key:"toJSON",value:function(){var e=this,t=function(t){return{__type:"Pointer",className:e._targetClassName,objectId:t}},r=null,n=null,o=null;return this.relationsToAdd.length>0&&(o=this.relationsToAdd.map(t),r={__op:"AddRelation",objects:o}),this.relationsToRemove.length>0&&(o=this.relationsToRemove.map(t),n={__op:"RemoveRelation",objects:o}),r&&n?{__op:"Batch",ops:[r,n]}:r||n||{}}}]),t}(E)},{"./ParseObject":18,"./ParseRelation":23,"./arrayContainsObject":35,"./decode":37,"./encode":38,"./unique":43,"babel-runtime/core-js/object/get-prototype-of":52,"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59,"babel-runtime/helpers/inherits":61,"babel-runtime/helpers/possibleConstructorReturn":62}],20:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var o=e("babel-runtime/helpers/classCallCheck"),i=n(o),s=e("babel-runtime/helpers/createClass"),a=n(s),u=e("./ParseGeoPoint"),l=n(u),c=function(){function e(t){(0,i.default)(this,e),this._coordinates=e._validate(t)}return(0,a.default)(e,[{key:"toJSON",value:function(){return e._validate(this._coordinates),{__type:"Polygon",coordinates:this._coordinates}}},{key:"equals",value:function(t){if(!(t instanceof e)||this.coordinates.length!==t.coordinates.length)return!1;for(var r=!0,n=1;n<this._coordinates.length;n+=1)if(this._coordinates[n][0]!=t.coordinates[n][0]||this._coordinates[n][1]!=t.coordinates[n][1]){r=!1;break}return r}},{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(t){this._coordinates=e._validate(t)}}],[{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 l.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 l.default(n[0],n[1])}t.push([o.latitude,o.longitude])}return t}}]),e}();r.default=c},{"./ParseGeoPoint":15,"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59}],21:[function(e,t,r){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var o=e("babel-runtime/core-js/get-iterator"),i=n(o),s=e("babel-runtime/helpers/typeof"),a=n(s),u=e("babel-runtime/helpers/classCallCheck"),l=n(u),c=e("babel-runtime/helpers/createClass"),f=n(c),d=!0,h=function(){function e(t){(0,l.default)(this,e),this._resolved=!1,this._rejected=!1,this._resolvedCallbacks=[],this._rejectedCallbacks=[],"function"==typeof t&&t(this.resolve.bind(this),this.reject.bind(this))}return(0,f.default)(e,[{key:"resolve",value:function(){if(this._resolved||this._rejected)throw new Error("A promise was resolved even though it had already been "+(this._resolved?"resolved":"rejected")+".");this._resolved=!0;for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];this._result=t;for(var n=0;n<this._resolvedCallbacks.length;n++)this._resolvedCallbacks[n].apply(this,t);this._resolvedCallbacks=[],this._rejectedCallbacks=[]}},{key:"reject",value:function(e){if(this._resolved||this._rejected)throw new Error("A promise was rejected even though it had already been "+(this._resolved?"resolved":"rejected")+".");this._rejected=!0,this._error=e;for(var t=0;t<this._rejectedCallbacks.length;t++)this._rejectedCallbacks[t](e);this._resolvedCallbacks=[],this._rejectedCallbacks=[]}},{key:"then",value:function(r,n){var o=this,i=new e,s=function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];if("function"==typeof r)if(d)try{n=[r.apply(this,n)]}catch(t){n=[e.error(t)]}else n=[r.apply(this,n)];1===n.length&&e.is(n[0])?n[0].then(function(){i.resolve.apply(i,arguments)},function(e){i.reject(e)}):i.resolve.apply(i,n)},a=function(t){var r=[];if("function"==typeof n){if(d)try{r=[n(t)]}catch(t){r=[e.error(t)]}else r=[n(t)];1===r.length&&e.is(r[0])?r[0].then(function(){i.resolve.apply(i,arguments)},function(e){i.reject(e)}):d?i.resolve.apply(i,r):i.reject(r[0])}else i.reject(t)},u=function(e){e.call()};return d&&(void 0!==t&&"function"==typeof t.nextTick?u=function(e){t.nextTick(e)}:"function"==typeof setTimeout&&(u=function(e){setTimeout(e,0)})),this._resolved?u(function(){s.apply(o,o._result)}):this._rejected?u(function(){a(o._error)}):(this._resolvedCallbacks.push(s),this._rejectedCallbacks.push(a)),i}},{key:"always",value:function(e){return this.then(e,e)}},{key:"done",value:function(e){return this.then(e)}},{key:"fail",value:function(e){return this.then(null,e)}},{key:"catch",value:function(e){return this.then(null,e)}},{key:"_thenRunCallbacks",value:function(t,r){var n={};return"function"==typeof t?(n.success=function(e){t(e,null)},n.error=function(e){t(null,e)}):"object"===(void 0===t?"undefined":(0,a.default)(t))&&("function"==typeof t.success&&(n.success=t.success),"function"==typeof t.error&&(n.error=t.error)),this.then(function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return n.success&&n.success.apply(this,r),e.as.apply(e,arguments)},function(t){return n.error&&(void 0!==r?n.error(r,t):n.error(t)),e.error(t)})}},{key:"_continueWith",value:function(e){return this.then(function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e(r,null)},function(t){return e(null,t)})}}],[{key:"is",value:function(e){return null!=e&&"function"==typeof e.then}},{key:"as",value:function(){for(var t=new e,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.resolve.apply(t,n),t}},{key:"resolve",value:function(t){return new e(function(r,n){e.is(t)?t.then(r,n):r(t)})}},{key:"error",value:function(){for(var t=new e,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.reject.apply(t,n),t}},{key:"reject",value:function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.error.apply(null,r)}},{key:"when",value:function(t){var r,n=Array.isArray(t);r=n?t:arguments;var o=r.length,i=!1,s=[],a=n?[s]:s,u=[];if(s.length=r.length,u.length=r.length,0===o)return e.as.apply(this,a);for(var l=new e,c=function(){--o<=0&&(i?l.reject(u):l.resolve.apply(l,a))},f=0;f<r.length;f++)!function(t,r){e.is(t)?t.then(function(e){s[r]=e,c()},function(e){u[r]=e,i=!0,c()}):(s[f]=t,c())}(r[f],f);return l}},{key:"all",value:function(t){var r=0,n=[],o=!0,s=!1,a=void 0;try{for(var u,l=(0,i.default)(t);!(o=(u=l.next()).done);o=!0){var c=u.value;n[r++]=c}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}if(0===r)return e.as([]);var f=!1,d=new e,h=0,p=[];return n.forEach(function(t,n){e.is(t)?t.then(function(e){if(f)return!1;p[n]=e,++h>=r&&d.resolve(p)},function(e){d.reject(e),f=!0}):(p[n]=t,h++,!f&&h>=r&&d.resolve(p))}),d}},{key:"race",value:function(t){var r=!1,n=new e,o=!0,s=!1,a=void 0;try{for(var u,l=(0,i.default)(t);!(o=(u=l.next()).done);o=!0){var c=u.value;e.is(c)?c.then(function(e){r||(r=!0,n.resolve(e))},function(e){r||(r=!0,n.reject(e))}):r||(r=!0,n.resolve(c))}}catch(e){s=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw a}}return n}},{key:"_continueWhile",value:function(t,r){return t()?r().then(function(){return e._continueWhile(t,r)}):e.as()}},{key:"isPromisesAPlusCompliant",value:function(){return d}},{key:"enableAPlusCompliant",value:function(){d=!0}},{key:"disableAPlusCompliant",value:function(){d=!1}}]),e}();r.default=h}).call(this,e("_process"))},{_process:64,"babel-runtime/core-js/get-iterator":45,"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59,"babel-runtime/helpers/typeof":63}],22:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return"\\Q"+e.replace("\\E","\\E\\\\E\\Q")+"\\E"}function i(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 s(e,t){var r={};if(t.forEach(function(t){var n=-1!==t.indexOf(".");if(n||e.hasOwnProperty(t)){if(n){var o=t.split("."),i=e,s=r;o.forEach(function(e,t,r){i&&!i.hasOwnProperty(e)&&(i[e]=void 0),void 0!==i&&(i=i[e]),t<r.length-1&&(s[e]||(s[e]={}),s=s[e])})}}else e[t]=void 0}),(0,p.default)(r).length>0){var n=v.default.getObjectStateController().getServerData({id:e.objectId,className:e.className});!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]&&void 0!==t&&null!==t&&e(t[i],r[i],n[i],!0)}(n,e,r,!1)}}Object.defineProperty(r,"__esModule",{value:!0});var a=e("babel-runtime/helpers/typeof"),u=n(a),l=e("babel-runtime/helpers/classCallCheck"),c=n(l),f=e("babel-runtime/helpers/createClass"),d=n(f),h=e("babel-runtime/core-js/object/keys"),p=n(h),_=e("./CoreManager"),v=n(_),y=e("./encode"),b=n(y),g=e("./ParseError"),m=n(g),C=e("./ParseGeoPoint"),k=n(C),j=e("./ParsePolygon"),w=(n(j),e("./ParseObject")),O=n(w),S=e("./ParsePromise"),E=n(S),P=function(){function e(t){if((0,c.default)(this,e),"string"==typeof t)"User"===t&&v.default.get("PERFORM_USER_REWRITE")?this.className="_User":this.className=t;else if(t instanceof O.default)this.className=t.className;else{if("function"!=typeof t)throw new TypeError("A ParseQuery must be constructed with a ParseObject or class name.");if("string"==typeof t.className)this.className=t.className;else{var r=new t;this.className=r.className}}this._where={},this._include=[],this._limit=-1,this._skip=0,this._extraOptions={}}return(0,d.default)(e,[{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,b.default)(r,!1,!0),this}},{key:"toJSON",value:function(){var e={where:this._where};this._include.length&&(e.include=this._include.join(",")),this._select&&(e.keys=this._select.join(",")),this._limit>=0&&(e.limit=this._limit),this._skip>0&&(e.skip=this._skip),this._order&&(e.order=this._order.join(","));for(var t in this._extraOptions)e[t]=this._extraOptions[t];return e}},{key:"withJSON",value:function(e){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(","));for(var t in 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 m.default(m.default.OBJECT_NOT_FOUND,"Object not found.");return E.default.error(t)})._thenRunCallbacks(t,null)}},{key:"find",value:function(e){var t=this;e=e||{};var r={};e.hasOwnProperty("useMasterKey")&&(r.useMasterKey=e.useMasterKey),e.hasOwnProperty("sessionToken")&&(r.sessionToken=e.sessionToken);var n=v.default.getQueryController(),o=this._select;return n.find(this.className,this.toJSON(),r).then(function(e){return e.results.map(function(r){var n=e.className||t.className;return r.className||(r.className=n),o&&s(r,o),O.default.fromJSON(r,!o)})})._thenRunCallbacks(e)}},{key:"count",value:function(e){e=e||{};var t={};e.hasOwnProperty("useMasterKey")&&(t.useMasterKey=e.useMasterKey),e.hasOwnProperty("sessionToken")&&(t.sessionToken=e.sessionToken);var r=v.default.getQueryController(),n=this.toJSON();return n.limit=0,n.count=1,r.find(this.className,n,t).then(function(e){return e.count})._thenRunCallbacks(e)}},{key:"distinct",value:function(e,t){t=t||{};var r={useMasterKey:!0};t.hasOwnProperty("sessionToken")&&(r.sessionToken=t.sessionToken);var n=v.default.getQueryController(),o={distinct:e,where:this._where};return n.aggregate(this.className,o,r).then(function(e){return e.results})._thenRunCallbacks(t)}},{key:"aggregate",value:function(e,t){t=t||{};var r={useMasterKey:!0};t.hasOwnProperty("sessionToken")&&(r.sessionToken=t.sessionToken);var n=v.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,u.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})._thenRunCallbacks(t)}},{key:"first",value:function(e){var t=this;e=e||{};var r={};e.hasOwnProperty("useMasterKey")&&(r.useMasterKey=e.useMasterKey),e.hasOwnProperty("sessionToken")&&(r.sessionToken=e.sessionToken);var n=v.default.getQueryController(),o=this.toJSON();o.limit=1;var i=this._select;return n.find(this.className,o,r).then(function(e){var r=e.results;if(r[0])return r[0].className||(r[0].className=t.className),i&&s(r[0],i),O.default.fromJSON(r[0],!i)})._thenRunCallbacks(e)}},{key:"each",value:function(t,r){if(r=r||{},this._order||this._skip||this._limit>=0)return E.default.error("Cannot iterate on a query with sort, skip, or limit.")._thenRunCallbacks(r);new E.default;var n=new e(this.className);n._limit=r.batchSize||100,n._include=this._include.map(function(e){return e}),this._select&&(n._select=this._select.map(function(e){return e})),n._where={};for(var o in this._where){var i=this._where[o];if(Array.isArray(i))n._where[o]=i.map(function(e){return e});else if(i&&"object"===(void 0===i?"undefined":(0,u.default)(i))){var s={};n._where[o]=s;for(var a in i)s[a]=i[a]}else n._where[o]=i}n.ascending("objectId");var l={};r.hasOwnProperty("useMasterKey")&&(l.useMasterKey=r.useMasterKey),r.hasOwnProperty("sessionToken")&&(l.sessionToken=r.sessionToken);var c=!1;return E.default._continueWhile(function(){return!c},function(){return n.find(l).then(function(e){var r=E.default.as();return e.forEach(function(e){r=r.then(function(){return t(e)})}),r.then(function(){e.length>=n._limit?n.greaterThan("objectId",e[e.length-1].id):c=!0})})})._thenRunCallbacks(r)}},{key:"equalTo",value:function(e,t){return void 0===t?this.doesNotExist(e):(this._where[e]=(0,b.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:"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",o(t))}},{key:"fullText",value:function(e,t){if(!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.");return this._addCondition(e,"$text",{$search:{$term:t}})}},{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","^"+o(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",o(t)+"$")}},{key:"near",value:function(e,t){return t instanceof k.default||(t=new k.default(t)),this._addCondition(e,"$nearSphere",t)}},{key:"withinRadians",value:function(e,t,r){return this.near(e,t),this._addCondition(e,"$maxDistance",r)}},{key:"withinMiles",value:function(e,t,r){return this.withinRadians(e,t,r/3958.8)}},{key:"withinKilometers",value:function(e,t,r){return this.withinRadians(e,t,r/6371)}},{key:"withinGeoBox",value:function(e,t,r){return t instanceof k.default||(t=new k.default(t)),r instanceof k.default||(r=new k.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 e=this;this._order||(this._order=[]);for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.forEach(function(t){Array.isArray(t)&&(t=t.join()),e._order=e._order.concat(t.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 e=this;this._order||(this._order=[]);for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.forEach(function(t){Array.isArray(t)&&(t=t.join()),e._order=e._order.concat(t.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 e=this,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.forEach(function(t){Array.isArray(t)?e._include=e._include.concat(t):e._include.push(t)}),this}},{key:"select",value:function(){var e=this;this._select||(this._select=[]);for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.forEach(function(t){Array.isArray(t)?e._select=e._select.concat(t):e._select.push(t)}),this}},{key:"subscribe",value:function(){return v.default.getLiveQueryController().subscribe(this)}}],[{key:"fromJSON",value:function(t,r){return new e(t).withJSON(r)}},{key:"or",value:function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=i(r),s=new e(o);return s._orQuery(r),s}},{key:"and",value:function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=i(r),s=new e(o);return s._andQuery(r),s}}]),e}(),A={find:function(e,t,r){return v.default.getRESTController().request("GET","classes/"+e,t,r)},aggregate:function(e,t,r){return v.default.getRESTController().request("GET","aggregate/"+e,t,r)}};v.default.setQueryController(A),r.default=P},{"./CoreManager":3,"./ParseError":13,"./ParseGeoPoint":15,"./ParseObject":18,"./ParsePolygon":20,"./ParsePromise":21,"./encode":38,"babel-runtime/core-js/object/keys":53,"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59,"babel-runtime/helpers/typeof":63}],23:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var o=e("babel-runtime/helpers/classCallCheck"),i=n(o),s=e("babel-runtime/helpers/createClass"),a=n(s),u=e("./ParseOp"),l=e("./ParseObject"),c=(n(l),e("./ParseQuery")),f=n(c),d=function(){function e(t,r){(0,i.default)(this,e),this.parent=t,this.key=r,this.targetClassName=null}return(0,a.default)(e,[{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 u.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 u.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 f.default(this.targetClassName):(e=new f.default(t.className),e._extraOptions.redirectClassNameForKey=this.key),e._addCondition("$relatedTo","object",{__type:"Pointer",className:t.className,objectId:t.id}),e._addCondition("$relatedTo","key",this.key),e}}]),e}();r.default=d},{"./ParseObject":18,"./ParseOp":19,"./ParseQuery":22,"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59}],24:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var o=e("babel-runtime/core-js/object/get-prototype-of"),i=n(o),s=e("babel-runtime/helpers/classCallCheck"),a=n(s),u=e("babel-runtime/helpers/createClass"),l=n(u),c=e("babel-runtime/helpers/possibleConstructorReturn"),f=n(c),d=e("babel-runtime/helpers/get"),h=n(d),p=e("babel-runtime/helpers/inherits"),_=n(p),v=e("./ParseACL"),y=n(v),b=e("./ParseError"),g=n(b),m=e("./ParseObject"),C=n(m),k=function(e){function t(e,r){(0,a.default)(this,t);var n=(0,f.default)(this,(t.__proto__||(0,i.default)(t)).call(this,"_Role"));return"string"==typeof e&&r instanceof y.default&&(n.setName(e),n.setACL(r)),n}return(0,_.default)(t,e),(0,l.default)(t,[{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,r){var n=(0,h.default)(t.prototype.__proto__||(0,i.default)(t.prototype),"validate",this).call(this,e,r);if(n)return n;if("name"in e&&e.name!==this.getName()){var o=e.name;if(this.id&&this.id!==e.objectId)return new g.default(g.default.OTHER_CAUSE,"A role's name can only be set before it has been saved.");if("string"!=typeof o)return new g.default(g.default.OTHER_CAUSE,"A role's name must be a String.");if(!/^[0-9a-zA-Z\-_ ]+$/.test(o))return new g.default(g.default.OTHER_CAUSE,"A role's name can be only contain alphanumeric characters, _, -, and spaces.")}return!1}}]),t}(C.default);C.default.registerSubclass("_Role",k),r.default=k},{"./ParseACL":11,"./ParseError":13,"./ParseObject":18,"babel-runtime/core-js/object/get-prototype-of":52,"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59,"babel-runtime/helpers/get":60,"babel-runtime/helpers/inherits":61,"babel-runtime/helpers/possibleConstructorReturn":62}],25:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var o=e("babel-runtime/helpers/classCallCheck"),i=n(o),s=e("babel-runtime/helpers/createClass"),a=n(s),u=e("./CoreManager"),l=n(u),c=e("./ParsePromise"),f=(n(c),["String","Number","Boolean","Date","File","GeoPoint","Polygon","Array","Object","Pointer","Relation"]),d=function(){function e(t){(0,i.default)(this,e),"string"==typeof t&&("User"===t&&l.default.get("PERFORM_USER_REWRITE")?this.className="_User":this.className=t),this._fields={},this._indexes={}}return(0,a.default)(e,[{key:"get",value:function(e){return this.assertClassName(),e=e||{},l.default.getSchemaController().get(this.className,e).then(function(e){if(!e)throw new Error("Schema not found.");return e})._thenRunCallbacks(e)}},{key:"save",value:function(e){this.assertClassName(),e=e||{};var t=l.default.getSchemaController(),r={className:this.className,fields:this._fields,indexes:this._indexes};return t.create(this.className,r,e).then(function(e){return e})._thenRunCallbacks(e)}},{key:"update",value:function(e){this.assertClassName(),e=e||{};var t=l.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})._thenRunCallbacks(e)}},{key:"delete",value:function(e){return this.assertClassName(),e=e||{},l.default.getSchemaController().delete(this.className,e).then(function(e){return e})._thenRunCallbacks(e)}},{key:"purge",value:function(e){return this.assertClassName(),
l.default.getSchemaController().purge(this.className).then(function(e){return e})._thenRunCallbacks(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===f.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||{},l.default.getSchemaController().get("",e).then(function(e){if(0===e.results.length)throw new Error("Schema not found.");return e.results})._thenRunCallbacks(e)}}]),e}(),h={send:function(e,t,r,n){var o=l.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 l.default.getRESTController().request("DELETE","purge/"+e,{},{useMasterKey:!0})}};l.default.setSchemaController(h),r.default=d},{"./CoreManager":3,"./ParsePromise":21,"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59}],26:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var o=e("babel-runtime/helpers/typeof"),i=n(o),s=e("babel-runtime/core-js/object/get-prototype-of"),a=n(s),u=e("babel-runtime/helpers/classCallCheck"),l=n(u),c=e("babel-runtime/helpers/createClass"),f=n(c),d=e("babel-runtime/helpers/possibleConstructorReturn"),h=n(d),p=e("babel-runtime/helpers/inherits"),_=n(p),v=e("./CoreManager"),y=n(v),b=e("./isRevocableSession"),g=n(b),m=e("./ParseObject"),C=n(m),k=e("./ParsePromise"),j=n(k),w=e("./ParseUser"),O=n(w),S=function(e){function t(e){(0,l.default)(this,t);var r=(0,h.default)(this,(t.__proto__||(0,a.default)(t)).call(this,"_Session"));if(e&&"object"===(void 0===e?"undefined":(0,i.default)(e))&&!r.set(e||{}))throw new Error("Can't create an invalid Session");return r}return(0,_.default)(t,e),(0,f.default)(t,[{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=y.default.getSessionController(),r={};return e.hasOwnProperty("useMasterKey")&&(r.useMasterKey=e.useMasterKey),O.default.currentAsync().then(function(e){return e?(e.getSessionToken(),r.sessionToken=e.getSessionToken(),t.getSession(r)):j.default.error("There is no current user.")})}},{key:"isCurrentSessionRevocable",value:function(){var e=O.default.current();return!!e&&(0,g.default)(e.getSessionToken()||"")}}]),t}(C.default);C.default.registerSubclass("_Session",S);var E={getSession:function(e){var t=y.default.getRESTController(),r=new S;return t.request("GET","sessions/me",{},e).then(function(e){return r._finishFetch(e),r._setExisted(!0),r})}};y.default.setSessionController(E),r.default=S},{"./CoreManager":3,"./ParseObject":18,"./ParsePromise":21,"./ParseUser":27,"./isRevocableSession":41,"babel-runtime/core-js/object/get-prototype-of":52,"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59,"babel-runtime/helpers/inherits":61,"babel-runtime/helpers/possibleConstructorReturn":62,"babel-runtime/helpers/typeof":63}],27:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(r,"__esModule",{value:!0});var o=e("babel-runtime/core-js/json/stringify"),i=n(o),s=e("babel-runtime/core-js/object/define-property"),a=n(s),u=e("babel-runtime/helpers/typeof"),l=n(u),c=e("babel-runtime/core-js/object/get-prototype-of"),f=n(c),d=e("babel-runtime/helpers/classCallCheck"),h=n(d),p=e("babel-runtime/helpers/createClass"),_=n(p),v=e("babel-runtime/helpers/possibleConstructorReturn"),y=n(v),b=e("babel-runtime/helpers/get"),g=n(b),m=e("babel-runtime/helpers/inherits"),C=n(m),k=e("./CoreManager"),j=n(k),w=e("./isRevocableSession"),O=n(w),S=e("./ParseError"),E=n(S),P=e("./ParseObject"),A=n(P),T=e("./ParsePromise"),I=n(T),N=e("./ParseSession"),R=n(N),M=e("./Storage"),x=n(M),L=!j.default.get("IS_NODE"),D=!1,U=null,F={},q=function(e){function t(e){(0,h.default)(this,t);var r=(0,y.default)(this,(t.__proto__||(0,f.default)(t)).call(this,"_User"));if(e&&"object"===(void 0===e?"undefined":(0,l.default)(e))&&!r.set(e||{}))throw new Error("Can't create an invalid Parse User");return r}return(0,C.default)(t,e),(0,_.default)(t,[{key:"_upgradeToRevocableSession",value:function(e){e=e||{};var t={};return e.hasOwnProperty("useMasterKey")&&(t.useMasterKey=e.useMasterKey),j.default.getUserController().upgradeToRevocableSession(this,t)._thenRunCallbacks(e)}},{key:"_linkWith",value:function(e,t){var r,n=this;if("string"==typeof e?(r=e,e=F[e]):r=e.getAuthType(),t&&t.hasOwnProperty("authData")){var o=this.get("authData")||{};if("object"!==(void 0===o?"undefined":(0,l.default)(o)))throw new Error("Invalid type: authData field should be an object");o[r]=t.authData;return j.default.getUserController().linkWith(this,o)._thenRunCallbacks(t,this)}var i=new I.default;return e.authenticate({success:function(e,r){var o={};o.authData=r,t.success&&(o.success=t.success),t.error&&(o.error=t.error),n._linkWith(e,o).then(function(){i.resolve(n)},function(e){i.reject(e)})},error:function(e,r){"function"==typeof t.error&&t.error(n,r),i.reject(r)}}),i}},{key:"_synchronizeAuthData",value:function(e){if(this.isCurrent()&&e){var t;"string"==typeof e?(t=e,e=F[t]):t=e.getAuthType();var r=this.get("authData");if(e&&r&&"object"===(void 0===r?"undefined":(0,l.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,l.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,l.default)(e)))for(var t in e)e[t]||delete e[t]}}},{key:"_unlinkFrom",value:function(e,t){var r=this;return"string"==typeof e?e=F[e]:e.getAuthType(),this._linkWith(e,{authData:null}).then(function(){return r._synchronizeAuthData(e),I.default.as(r)})._thenRunCallbacks(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,l.default)(r))&&!!r[t]}},{key:"_logOutWithAll",value:function(){var e=this.get("authData");if("object"===(void 0===e?"undefined":(0,l.default)(e)))for(var t in e)this._logOutWith(t)}},{key:"_logOutWith",value:function(e){this.isCurrent()&&("string"==typeof e&&(e=F[e]),e&&e.deauthenticate&&e.deauthenticate())}},{key:"_preserveFieldsOnFetch",value:function(){return{sessionToken:this.get("sessionToken")}}},{key:"isCurrent",value:function(){var e=t.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,l.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){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=t.current();return!!this.get("sessionToken")&&!!e&&e.id===this.id}},{key:"signUp",value:function(e,t){t=t||{};var r={};return t.hasOwnProperty("useMasterKey")&&(r.useMasterKey=t.useMasterKey),t.hasOwnProperty("installationId")&&(r.installationId=t.installationId),j.default.getUserController().signUp(this,e,r)._thenRunCallbacks(t,this)}},{key:"logIn",value:function(e){e=e||{};var t={};return e.hasOwnProperty("useMasterKey")&&(t.useMasterKey=e.useMasterKey),e.hasOwnProperty("installationId")&&(t.installationId=e.installationId),j.default.getUserController().logIn(this,t)._thenRunCallbacks(e,this)}},{key:"save",value:function(){for(var e=this,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return(0,g.default)(t.prototype.__proto__||(0,f.default)(t.prototype),"save",this).apply(this,n).then(function(){return e.isCurrent()?j.default.getUserController().updateUserOnDisk(e):e})}},{key:"destroy",value:function(){for(var e=this,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return(0,g.default)(t.prototype.__proto__||(0,f.default)(t.prototype),"destroy",this).apply(this,n).then(function(){return e.isCurrent()?j.default.getUserController().removeUserFromDisk():e})}},{key:"fetch",value:function(){for(var e=this,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return(0,g.default)(t.prototype.__proto__||(0,f.default)(t.prototype),"fetch",this).apply(this,n).then(function(){return e.isCurrent()?j.default.getUserController().updateUserOnDisk(e):e})}}],[{key:"readOnlyAttributes",value:function(){return["sessionToken"]}},{key:"extend",value:function(e,r){if(e)for(var n in e)"className"!==n&&(0,a.default)(t.prototype,n,{value:e[n],enumerable:!1,writable:!0,configurable:!0});if(r)for(var n in r)"className"!==n&&(0,a.default)(t,n,{value:r[n],enumerable:!1,writable:!0,configurable:!0});return t}},{key:"current",value:function(){return L?j.default.getUserController().currentUser():null}},{key:"currentAsync",value:function(){return L?j.default.getUserController().currentUserAsync():I.default.as(null)}},{key:"signUp",value:function(e,r,n,o){return n=n||{},n.username=e,n.password=r,new t(n).signUp({},o)}},{key:"logIn",value:function(e,r,n){if("string"!=typeof e)return I.default.error(new E.default(E.default.OTHER_CAUSE,"Username must be a string."));if("string"!=typeof r)return I.default.error(new E.default(E.default.OTHER_CAUSE,"Password must be a string."));var o=new t;return o._finishFetch({username:e,password:r}),o.logIn(n)}},{key:"become",value:function(e,t){if(!L)throw new Error("It is not memory-safe to become a user in a server environment");t=t||{};var r={sessionToken:e};return t.hasOwnProperty("useMasterKey")&&(r.useMasterKey=t.useMasterKey),j.default.getUserController().become(r)._thenRunCallbacks(t)}},{key:"logInWith",value:function(e,r){return t._logInWith(e,r)}},{key:"logOut",value:function(){if(!L)throw new Error("There is no current user on a node.js server environment.");return j.default.getUserController().logOut()}},{key:"requestPasswordReset",value:function(e,t){t=t||{};var r={};return t.hasOwnProperty("useMasterKey")&&(r.useMasterKey=t.useMasterKey),j.default.getUserController().requestPasswordReset(e,r)._thenRunCallbacks(t)}},{key:"allowCustomUserClass",value:function(e){j.default.set("PERFORM_USER_REWRITE",!e)}},{key:"enableRevocableSession",value:function(e){if(e=e||{},j.default.set("FORCE_REVOCABLE_SESSION",!0),L){var r=t.current();if(r)return r._upgradeToRevocableSession(e)}return I.default.as()._thenRunCallbacks(e)}},{key:"enableUnsafeCurrentUser",value:function(){L=!0}},{key:"disableUnsafeCurrentUser",value:function(){L=!1}},{key:"_registerAuthenticationProvider",value:function(e){F[e.getAuthType()]=e,t.currentAsync().then(function(t){t&&t._synchronizeAuthData(e.getAuthType())})}},{key:"_logInWith",value:function(e,r){return(new t)._linkWith(e,r)}},{key:"_clearCache",value:function(){U=null,D=!1}},{key:"_setCurrentUserCache",value:function(e){U=e}}]),t}(A.default);A.default.registerSubclass("_User",q);var K={updateUserOnDisk:function(e){var t=x.default.generatePath("currentUser"),r=e.toJSON();return r.className="_User",x.default.setItemAsync(t,(0,i.default)(r)).then(function(){return e})},removeUserFromDisk:function(){var e=x.default.generatePath("currentUser");return D=!0,U=null,x.default.removeItemAsync(e)},setCurrentUser:function(e){return U=e,e._cleanupAuthData(),e._synchronizeAllAuthData(),K.updateUserOnDisk(e)},currentUser:function(){if(U)return U;if(D)return null;if(x.default.async())throw new Error("Cannot call currentUser() when using a platform with an async storage system. Call currentUserAsync() instead.");var e=x.default.generatePath("currentUser"),t=x.default.getItem(e);if(D=!0,!t)return U=null,null;t=JSON.parse(t),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=A.default.fromJSON(t);return U=r,r._synchronizeAllAuthData(),r},currentUserAsync:function(){if(U)return I.default.as(U);if(D)return I.default.as(null);var e=x.default.generatePath("currentUser");return x.default.getItemAsync(e).then(function(e){if(D=!0,!e)return U=null,I.default.as(null);e=JSON.parse(e),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=A.default.fromJSON(e);return U=t,t._synchronizeAllAuthData(),I.default.as(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}),L?K.setCurrentUser(e):e}):I.default.error(new E.default(E.default.OTHER_CAUSE,"Cannot sign up user with an empty password.")):I.default.error(new E.default(E.default.OTHER_CAUSE,"Cannot sign up user with an empty name."))},logIn:function(e,t){var r=j.default.getRESTController(),n=j.default.getObjectStateController(),o={username:e.get("username"),password:e.get("password")};return r.request("GET","login",o,t).then(function(t){return e._migrateId(t.objectId),e._setExisted(!0),n.setPendingOp(e._getStateIdentifier(),"username",void 0),n.setPendingOp(e._getStateIdentifier(),"password",void 0),t.password=void 0,e._finishFetch(t),L?K.setCurrentUser(e):I.default.as(e)})},become:function(e){var t=new q;return j.default.getRESTController().request("GET","users/me",{},e).then(function(e){return t._finishFetch(e),t._setExisted(!0),K.setCurrentUser(t)})},logOut:function(){return K.currentUserAsync().then(function(e){var t=x.default.generatePath("currentUser"),r=x.default.removeItemAsync(t),n=j.default.getRESTController();if(null!==e){var o=e.getSessionToken();o&&(0,O.default)(o)&&(r=r.then(function(){return n.request("POST","logout",{},{sessionToken:o})})),e._logOutWithAll(),e._finishFetch({sessionToken:void 0})}return D=!0,U=null,r})},requestPasswordReset:function(e,t){return j.default.getRESTController().request("POST","requestPasswordReset",{email:e},t)},upgradeToRevocableSession:function(e,t){var r=e.getSessionToken();return r?(t.sessionToken=r,j.default.getRESTController().request("POST","upgradeToRevocableSession",{},t).then(function(t){var r=new R.default;return r._finishFetch(t),e._finishFetch({sessionToken:r.getSessionToken()}),e.isCurrent()?K.setCurrentUser(e):I.default.as(e)})):I.default.error(new E.default(E.default.SESSION_MISSING,"Cannot upgrade a user with no session token"))},linkWith:function(e,t){return e.save({authData:t}).then(function(){return L?K.setCurrentUser(e):e})}};j.default.setUserController(K),r.default=q},{"./CoreManager":3,"./ParseError":13,"./ParseObject":18,"./ParsePromise":21,"./ParseSession":26,"./Storage":31,"./isRevocableSession":41,"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/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59,"babel-runtime/helpers/get":60,"babel-runtime/helpers/inherits":61,"babel-runtime/helpers/possibleConstructorReturn":62,"babel-runtime/helpers/typeof":63}],28:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(t=t||{},e.where&&e.where instanceof c.default&&(e.where=e.where.toJSON().where),e.push_time&&"object"===(0,s.default)(e.push_time)&&(e.push_time=e.push_time.toJSON()),e.expiration_time&&"object"===(0,s.default)(e.expiration_time)&&(e.expiration_time=e.expiration_time.toJSON()),e.expiration_time&&e.expiration_interval)throw new Error("expiration_time and expiration_interval cannot both be set.");return u.default.getPushController().send(e,{useMasterKey:t.useMasterKey})._thenRunCallbacks(t)}Object.defineProperty(r,"__esModule",{value:!0});var i=e("babel-runtime/helpers/typeof"),s=n(i);r.send=o;var a=e("./CoreManager"),u=n(a),l=e("./ParseQuery"),c=n(l),f={send:function(e,t){return u.default.getRESTController().request("POST","push",e,{useMasterKey:!!t.useMasterKey})._thenRunCallbacks(t)}};u.default.setPushController(f)},{"./CoreManager":3,"./ParseQuery":22,"babel-runtime/helpers/typeof":63}],29:[function(e,t,r){(function(r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){var n=new p.default,o=new XDomainRequest;return o.onload=function(){var e;try{e=JSON.parse(o.responseText)}catch(e){n.reject(e)}e&&n.resolve(e)},o.onerror=o.ontimeout=function(){var e={responseText:(0,u.default)({code:d.default.X_DOMAIN_REQUEST,error:"IE's XDomainRequest does not supply error info."})};n.reject(e)},o.onprogress=function(){},o.open(e,t),o.send(r),n}var i=e("babel-runtime/helpers/typeof"),s=n(i),a=e("babel-runtime/core-js/json/stringify"),u=n(a),l=e("./CoreManager"),c=n(l),f=e("./ParseError"),d=n(f),h=e("./ParsePromise"),p=n(h),_=e("./Storage"),v=(n(_),null);"undefined"!=typeof XMLHttpRequest&&(v=XMLHttpRequest);var y=!1;"undefined"==typeof XDomainRequest||"withCredentials"in new XMLHttpRequest||(y=!0);var b={ajax:function(e,t,n,i){if(y)return o(e,t,n);var s=new p.default,a=0;return function o(){if(null==v)throw new Error("Cannot make a request: No definition of XMLHttpRequest was found.");var u=!1,l=new v;l.onreadystatechange=function(){if(4===l.readyState&&!u)if(u=!0,l.status>=200&&l.status<300){var e;try{e=JSON.parse(l.responseText)}catch(e){s.reject(e.toString())}e&&s.resolve(e,l.status,l)}else if(l.status>=500||0===l.status)if(++a<c.default.get("REQUEST_ATTEMPT_LIMIT")){var t=Math.round(125*Math.random()*Math.pow(2,a));setTimeout(o,t)}else 0===l.status?s.reject("Unable to connect to the Parse API"):s.reject(l);else s.reject(l)},i=i||{},"string"!=typeof i["Content-Type"]&&(i["Content-Type"]="text/plain"),c.default.get("IS_NODE")&&(i["User-Agent"]="Parse/"+c.default.get("VERSION")+" (NodeJS "+r.versions.node+")"),l.open(e,t,!0);for(var f in i)l.setRequestHeader(f,i[f]);l.send(n)}(),s},request:function(e,t,r,n){n=n||{};var o=c.default.get("SERVER_URL");"/"!==o[o.length-1]&&(o+="/"),o+=t;var i={};if(r&&"object"===(void 0===r?"undefined":(0,s.default)(r)))for(var a in r)i[a]=r[a];"POST"!==e&&(i._method=e,e="POST"),i._ApplicationId=c.default.get("APPLICATION_ID");var l=c.default.get("JAVASCRIPT_KEY");l&&(i._JavaScriptKey=l),i._ClientVersion=c.default.get("VERSION");var f=n.useMasterKey;if(void 0===f&&(f=c.default.get("USE_MASTER_KEY")),f){if(!c.default.get("MASTER_KEY"))throw new Error("Cannot use the Master Key, it has not been provided.");delete i._JavaScriptKey,i._MasterKey=c.default.get("MASTER_KEY")}c.default.get("FORCE_REVOCABLE_SESSION")&&(i._RevocableSession="1");var h,_=n.installationId;if(_&&"string"==typeof _)h=p.default.as(_);else{h=c.default.getInstallationController().currentInstallationId()}return h.then(function(e){i._InstallationId=e;var t=c.default.getUserController();return n&&"string"==typeof n.sessionToken?p.default.as(n.sessionToken):t?t.currentUserAsync().then(function(e){return e?p.default.as(e.getSessionToken()):p.default.as(null)}):p.default.as(null)}).then(function(t){t&&(i._SessionToken=t);var r=(0,u.default)(i);return b.ajax(e,o,r)}).then(null,function(e){var t;if(e&&e.responseText)try{var r=JSON.parse(e.responseText);t=new d.default(r.code,r.error)}catch(r){t=new d.default(d.default.INVALID_JSON,"Received an error with invalid JSON from Parse: "+e.responseText)}else t=new d.default(d.default.CONNECTION_FAILED,"XMLHttpRequest failed: "+(0,u.default)(e));return p.default.error(t)})},_setXHR:function(e){v=e}};t.exports=b}).call(this,e("_process"))},{"./CoreManager":3,"./ParseError":13,"./ParsePromise":21,"./Storage":31,_process:64,"babel-runtime/core-js/json/stringify":46,"babel-runtime/helpers/typeof":63}],30:[function(e,t,r){"use strict";function n(e){var t=k[e.className];return t?t[e.id]||null:null}function o(e,t){var r=n(e);return r||(k[e.className]||(k[e.className]={}),t||(t=C.defaultState()),r=k[e.className][e.id]=t)}function i(e){var t=n(e);return null===t?null:(delete k[e.className][e.id],t)}function s(e){var t=n(e);return t?t.serverData:{}}function a(e,t){var r=o(e).serverData;C.setServerData(r,t)}function u(e){var t=n(e);return t?t.pendingOps:[{}]}function l(e,t,r){var n=o(e).pendingOps;C.setPendingOp(n,t,r)}function c(e){var t=o(e).pendingOps;C.pushPendingState(t)}function f(e){var t=o(e).pendingOps;return C.popPendingState(t)}function d(e){var t=u(e);C.mergeFirstPendingState(t)}function h(e){var t=n(e);return t?t.objectCache:{}}function p(e,t){var r=s(e),n=u(e);return C.estimateAttribute(r,n,e.className,e.id,t)}function _(e){var t=s(e),r=u(e);return C.estimateAttributes(t,r,e.className,e.id)}function v(e,t){var r=o(e);C.commitServerChanges(r.serverData,r.objectCache,t)}function y(e,t){return o(e).tasks.enqueue(t)}function b(){k={}}function g(e,t){t.id=e.id}Object.defineProperty(r,"__esModule",{value:!0}),r.getState=n,r.initializeState=o,r.removeState=i,r.getServerData=s,r.setServerData=a,r.getPendingOps=u,r.setPendingOp=l,r.pushPendingState=c,r.popPendingState=f,r.mergeFirstPendingState=d,r.getObjectCache=h,r.estimateAttribute=p,r.estimateAttributes=_,r.commitServerChanges=v,r.enqueueTask=y,r.clearAllState=b,r.duplicateState=g;var m=e("./ObjectStateMutations"),C=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}(m),k={}},{"./ObjectStateMutations":9}],31:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var o=e("./CoreManager"),i=n(o),s=e("./ParsePromise"),a=n(s),u={async:function(){return!!i.default.getStorageController().async},getItem:function(e){var t=i.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=i.default.getStorageController();return 1===t.async?t.getItemAsync(e):a.default.as(t.getItem(e))},setItem:function(e,t){var r=i.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=i.default.getStorageController();return 1===r.async?r.setItemAsync(e,t):a.default.as(r.setItem(e,t))},removeItem:function(e){var t=i.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=i.default.getStorageController();return 1===t.async?t.removeItemAsync(e):a.default.as(t.removeItem(e))},generatePath:function(e){if(!i.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/"+i.default.get("APPLICATION_ID")+"/"+e},_clear:function(){var e=i.default.getStorageController();e.hasOwnProperty("clear")&&e.clear()}};t.exports=u,i.default.setStorageController(e("./StorageController.browser"))},{"./CoreManager":3,"./ParsePromise":21,"./StorageController.browser":32}],32:[function(e,t,r){"use strict";var n=e("./ParsePromise"),o=(function(e){e&&e.__esModule}(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=o},{"./ParsePromise":21}],33:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var o=e("babel-runtime/helpers/classCallCheck"),i=n(o),s=e("babel-runtime/helpers/createClass"),a=n(s),u=e("./ParsePromise"),l=n(u),c=function(){function e(){(0,i.default)(this,e),this.queue=[]}return(0,a.default)(e,[{key:"enqueue",value:function(e){var t=this,r=new l.default;return this.queue.push({task:e,_completion:r}),1===this.queue.length&&e().then(function(){t._dequeue(),r.resolve()},function(e){t._dequeue(),r.reject(e)}),r}},{key:"_dequeue",value:function(){var e=this;if(this.queue.shift(),this.queue.length){var t=this.queue[0];t.task().then(function(){e._dequeue(),t._completion.resolve()},function(r){e._dequeue(),t._completion.reject(r)})}}}]),e}();t.exports=c},{"./ParsePromise":21,"babel-runtime/helpers/classCallCheck":58,"babel-runtime/helpers/createClass":59}],34:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return E.get(e)||null}function i(e,t){var r=o(e);return r||(t||(t={serverData:{},pendingOps:[{}],objectCache:{},tasks:new S.default,existed:!1}),r=t,E.set(e,r),r)}function s(e){var t=o(e);return null===t?null:(E.delete(e),t)}function a(e){var t=o(e);return t?t.serverData:{}}function u(e,t){var r=i(e).serverData;w.setServerData(r,t)}function l(e){var t=o(e);return t?t.pendingOps:[{}]}function c(e,t,r){var n=i(e).pendingOps;w.setPendingOp(n,t,r)}function f(e){var t=i(e).pendingOps;w.pushPendingState(t)}function d(e){var t=i(e).pendingOps;return w.popPendingState(t)}function h(e){var t=l(e);w.mergeFirstPendingState(t)}function p(e){var t=o(e);return t?t.objectCache:{}}function _(e,t){var r=a(e),n=l(e);return w.estimateAttribute(r,n,e.className,e.id,t)}function v(e){var t=a(e),r=l(e);return w.estimateAttributes(t,r,e.className,e.id)}function y(e,t){var r=i(e);w.commitServerChanges(r.serverData,r.objectCache,t)}function b(e,t){return i(e).tasks.enqueue(t)}function g(e,t){var r=i(e),n=i(t);for(var o in r.serverData)n.serverData[o]=r.serverData[o];for(var s=0;s<r.pendingOps.length;s++)for(var a in r.pendingOps[s])n.pendingOps[s][a]=r.pendingOps[s][a];for(var u in r.objectCache)n.objectCache[u]=r.objectCache[u];n.existed=r.existed}function m(){E=new k.default}Object.defineProperty(r,"__esModule",{value:!0});var C=e("babel-runtime/core-js/weak-map"),k=n(C);r.getState=o,r.initializeState=i,r.removeState=s,r.getServerData=a,r.setServerData=u,r.getPendingOps=l,r.setPendingOp=c,r.pushPendingState=f,r.popPendingState=d,r.mergeFirstPendingState=h,r.getObjectCache=p,r.estimateAttribute=_,r.estimateAttributes=v,r.commitServerChanges=y,r.enqueueTask=b,r.duplicateState=g,r.clearAllState=m;var j=e("./ObjectStateMutations"),w=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}(j),O=e("./TaskQueue"),S=n(O),E=new k.default},{"./ObjectStateMutations":9,"./TaskQueue":33,"babel-runtime/core-js/weak-map":57}],35:[function(e,t,r){"use strict";function n(e,t){if(e.indexOf(t)>-1)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}Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;var o=e("./ParseObject"),i=function(e){return e&&e.__esModule?e:{default:e}}(o)},{"./ParseObject":18}],36:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){if(!(e instanceof f.default))return!0;var t=e.attributes;for(var r in t){if(!i(t[r]))return!1}return!0}function i(e){if("object"!==(void 0===e?"undefined":(0,a.default)(e)))return!0;if(e instanceof h.default)return!0;if(e instanceof f.default)return!!e.id;if(e instanceof l.default)return!!e.url();if(Array.isArray(e)){for(var t=0;t<e.length;t++)if(!i(e[t]))return!1;return!0}for(var r in e)if(!i(e[r]))return!1;return!0}Object.defineProperty(r,"__esModule",{value:!0});var s=e("babel-runtime/helpers/typeof"),a=n(s);r.default=o;var u=e("./ParseFile"),l=n(u),c=e("./ParseObject"),f=n(c),d=e("./ParseRelation"),h=n(d)},{"./ParseFile":14,"./ParseObject":18,"./ParseRelation":23,"babel-runtime/helpers/typeof":63}],37:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){if(null===e||"object"!==(void 0===e?"undefined":(0,s.default)(e)))return e;if(Array.isArray(e)){var t=[];return e.forEach(function(e,r){t[r]=o(e)}),t}if("string"==typeof e.__op)return(0,v.opFromJSON)(e);if("Pointer"===e.__type&&e.className)return _.default.fromJSON(e);if("Object"===e.__type&&e.className)return _.default.fromJSON(e);if("Relation"===e.__type){var r=new b.default(null,null);return r.targetClassName=e.className,r}if("Date"===e.__type)return new Date(e.iso);if("File"===e.__type)return l.default.fromJSON(e);if("GeoPoint"===e.__type)return new f.default({latitude:e.latitude,longitude:e.longitude});if("Polygon"===e.__type)return new h.default(e.coordinates);var n={};for(var i in e)n[i]=o(e[i]);return n}Object.defineProperty(r,"__esModule",{value:!0});var i=e("babel-runtime/helpers/typeof"),s=n(i);r.default=o;var a=e("./ParseACL"),u=(n(a),e("./ParseFile")),l=n(u),c=e("./ParseGeoPoint"),f=n(c),d=e("./ParsePolygon"),h=n(d),p=e("./ParseObject"),_=n(p),v=e("./ParseOp"),y=e("./ParseRelation"),b=n(y)},{"./ParseACL":11,"./ParseFile":14,"./ParseGeoPoint":15,"./ParseObject":18,"./ParseOp":19,"./ParsePolygon":20,"./ParseRelation":23,"babel-runtime/helpers/typeof":63}],38:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r,n){if(e instanceof b.default){if(t)throw new Error("Parse Objects not allowed here");var i=e.id?e.className+":"+e.id:e;return r||!n||n.indexOf(i)>-1||e.dirty()||(0,u.default)(e._getServerData()).length<1?e.toPointer():(n=n.concat(i),e._toFullJSON(n))}if(e instanceof g.Op||e instanceof c.default||e instanceof p.default||e instanceof v.default||e instanceof C.default)return e.toJSON();if(e instanceof d.default){if(!e.url())throw new Error("Tried to encode an unsaved file.");return e.toJSON()}if("[object Date]"===k.call(e)){if(isNaN(e))throw new Error("Tried to encode an invalid date.");return{__type:"Date",iso:e.toJSON()}}if("[object RegExp]"===k.call(e)&&"string"==typeof e.source)return e.source;if(Array.isArray(e))return e.map(function(e){return o(e,t,r,n)})
;if(e&&"object"===(void 0===e?"undefined":(0,s.default)(e))){var a={};for(var l in e)a[l]=o(e[l],t,r,n);return a}return e}Object.defineProperty(r,"__esModule",{value:!0});var i=e("babel-runtime/helpers/typeof"),s=n(i),a=e("babel-runtime/core-js/object/keys"),u=n(a);r.default=function(e,t,r,n){return o(e,!!t,!!r,n||[])};var l=e("./ParseACL"),c=n(l),f=e("./ParseFile"),d=n(f),h=e("./ParseGeoPoint"),p=n(h),_=e("./ParsePolygon"),v=n(_),y=e("./ParseObject"),b=n(y),g=e("./ParseOp"),m=e("./ParseRelation"),C=n(m),k=Object.prototype.toString},{"./ParseACL":11,"./ParseFile":14,"./ParseGeoPoint":15,"./ParseObject":18,"./ParseOp":19,"./ParsePolygon":20,"./ParseRelation":23,"babel-runtime/core-js/object/keys":53,"babel-runtime/helpers/typeof":63}],39:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if((void 0===e?"undefined":(0,u.default)(e))!==(void 0===t?"undefined":(0,u.default)(t)))return!1;if(!e||"object"!==(void 0===e?"undefined":(0,u.default)(e)))return e===t;if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(var r=e.length;r--;)if(!o(e[r],t[r]))return!1;return!0}if(e instanceof c.default||e instanceof d.default||e instanceof p.default||e instanceof v.default)return e.equals(t);if((0,s.default)(e).length!==(0,s.default)(t).length)return!1;for(var n in e)if(!o(e[n],t[n]))return!1;return!0}Object.defineProperty(r,"__esModule",{value:!0});var i=e("babel-runtime/core-js/object/keys"),s=n(i),a=e("babel-runtime/helpers/typeof"),u=n(a);r.default=o;var l=e("./ParseACL"),c=n(l),f=e("./ParseFile"),d=n(f),h=e("./ParseGeoPoint"),p=n(h),_=e("./ParseObject"),v=n(_)},{"./ParseACL":11,"./ParseFile":14,"./ParseGeoPoint":15,"./ParseObject":18,"babel-runtime/core-js/object/keys":53,"babel-runtime/helpers/typeof":63}],40:[function(e,t,r){"use strict";function n(e){return e.replace(/[&<>\/'"]/g,function(e){return o[e]})}Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;var o={"&":"&","<":"<",">":">","/":"/","'":"'",'"':"""}},{}],41:[function(e,t,r){"use strict";function n(e){return e.indexOf("r:")>-1}Object.defineProperty(r,"__esModule",{value:!0}),r.default=n},{}],42:[function(e,t,r){"use strict";function n(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$"),r=t.exec(e);if(!r)return null;var n=r[1]||0,o=(r[2]||1)-1,i=r[3]||0,s=r[4]||0,a=r[5]||0,u=r[6]||0,l=r[8]||0;return new Date(Date.UTC(n,o,i,s,a,u,l))}Object.defineProperty(r,"__esModule",{value:!0}),r.default=n},{}],43:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=[];return e.forEach(function(e){e instanceof u.default?(0,s.default)(t,e)||t.push(e):t.indexOf(e)<0&&t.push(e)}),t}Object.defineProperty(r,"__esModule",{value:!0}),r.default=o;var i=e("./arrayContainsObject"),s=n(i),a=e("./ParseObject"),u=n(a)},{"./ParseObject":18,"./arrayContainsObject":35}],44:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r={objects:{},files:[]},n=e.className+":"+e._getId();r.objects[n]=!e.dirty()||e;var o=e.attributes;for(var s in o)"object"===(0,a.default)(o[s])&&i(o[s],r,!1,!!t);var u=[];for(var l in r.objects)l!==n&&!0!==r.objects[l]&&u.push(r.objects[l]);return u.concat(r.files)}function i(e,t,r,n){if(e instanceof f.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 s=e.attributes;for(var u in s)"object"===(0,a.default)(s[u])&&i(s[u],t,!n,n)}}else{if(e instanceof l.default)return void(!e.url()&&t.files.indexOf(e)<0&&t.files.push(e));if(!(e instanceof h.default)){Array.isArray(e)&&e.forEach(function(e){"object"===(void 0===e?"undefined":(0,a.default)(e))&&i(e,t,r,n)});for(var c in e)"object"===(0,a.default)(e[c])&&i(e[c],t,r,n)}}}Object.defineProperty(r,"__esModule",{value:!0});var s=e("babel-runtime/helpers/typeof"),a=n(s);r.default=o;var u=e("./ParseFile"),l=n(u),c=e("./ParseObject"),f=n(c),d=e("./ParseRelation"),h=n(d)},{"./ParseFile":14,"./ParseObject":18,"./ParseRelation":23,"babel-runtime/helpers/typeof":63}],45:[function(e,t,r){t.exports={default:e("core-js/library/fn/get-iterator"),__esModule:!0}},{"core-js/library/fn/get-iterator":65}],46:[function(e,t,r){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":66}],47:[function(e,t,r){t.exports={default:e("core-js/library/fn/map"),__esModule:!0}},{"core-js/library/fn/map":67}],48:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":68}],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":69}],50:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/freeze"),__esModule:!0}},{"core-js/library/fn/object/freeze":70}],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":71}],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":72}],53:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":73}],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":74}],55:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":75}],56:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":76}],57:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-map"),__esModule:!0}},{"core-js/library/fn/weak-map":77}],58:[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")}},{}],59:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("../core-js/object/define-property"),o=function(e){return e&&e.__esModule?e:{default:e}}(n);r.default=function(){function e(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,o.default)(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()},{"../core-js/object/define-property":49}],60:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var o=e("../core-js/object/get-prototype-of"),i=n(o),s=e("../core-js/object/get-own-property-descriptor"),a=n(s);r.default=function e(t,r,n){null===t&&(t=Function.prototype);var o=(0,a.default)(t,r);if(void 0===o){var s=(0,i.default)(t);return null===s?void 0:e(s,r,n)}if("value"in o)return o.value;var u=o.get;if(void 0!==u)return u.call(n)}},{"../core-js/object/get-own-property-descriptor":51,"../core-js/object/get-prototype-of":52}],61:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var o=e("../core-js/object/set-prototype-of"),i=n(o),s=e("../core-js/object/create"),a=n(s),u=e("../helpers/typeof"),l=n(u);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,l.default)(t)));e.prototype=(0,a.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.default?(0,i.default)(e,t):e.__proto__=t)}},{"../core-js/object/create":48,"../core-js/object/set-prototype-of":54,"../helpers/typeof":63}],62:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("../helpers/typeof"),o=function(e){return e&&e.__esModule?e:{default:e}}(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,o.default)(t))&&"function"!=typeof t?e:t}},{"../helpers/typeof":63}],63:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var o=e("../core-js/symbol/iterator"),i=n(o),s=e("../core-js/symbol"),a=n(s),u="function"==typeof a.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof a.default&&e.constructor===a.default&&e!==a.default.prototype?"symbol":typeof e};r.default="function"==typeof a.default&&"symbol"===u(i.default)?function(e){return void 0===e?"undefined":u(e)}:function(e){return e&&"function"==typeof a.default&&e.constructor===a.default&&e!==a.default.prototype?"symbol":void 0===e?"undefined":u(e)}},{"../core-js/symbol":55,"../core-js/symbol/iterator":56}],64:[function(e,t,r){},{}],65:[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":155,"../modules/es6.string.iterator":166,"../modules/web.dom.iterable":176}],66:[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":93}],67:[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"),e("../modules/es7.map.of"),e("../modules/es7.map.from"),t.exports=e("../modules/_core").Map},{"../modules/_core":93,"../modules/es6.map":157,"../modules/es6.object.to-string":165,"../modules/es6.string.iterator":166,"../modules/es7.map.from":169,"../modules/es7.map.of":170,"../modules/es7.map.to-json":171,"../modules/web.dom.iterable":176}],68:[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":93,"../../modules/es6.object.create":158}],69:[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":93,"../../modules/es6.object.define-property":159}],70:[function(e,t,r){e("../../modules/es6.object.freeze"),t.exports=e("../../modules/_core").Object.freeze},{"../../modules/_core":93,"../../modules/es6.object.freeze":160}],71:[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":93,"../../modules/es6.object.get-own-property-descriptor":161}],72:[function(e,t,r){e("../../modules/es6.object.get-prototype-of"),t.exports=e("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":93,"../../modules/es6.object.get-prototype-of":162}],73:[function(e,t,r){e("../../modules/es6.object.keys"),t.exports=e("../../modules/_core").Object.keys},{"../../modules/_core":93,"../../modules/es6.object.keys":163}],74:[function(e,t,r){e("../../modules/es6.object.set-prototype-of"),t.exports=e("../../modules/_core").Object.setPrototypeOf},{"../../modules/_core":93,"../../modules/es6.object.set-prototype-of":164}],75:[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":93,"../../modules/es6.object.to-string":165,"../../modules/es6.symbol":167,"../../modules/es7.symbol.async-iterator":172,"../../modules/es7.symbol.observable":173}],76:[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":152,"../../modules/es6.string.iterator":166,"../../modules/web.dom.iterable":176}],77:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/web.dom.iterable"),e("../modules/es6.weak-map"),e("../modules/es7.weak-map.of"),e("../modules/es7.weak-map.from"),t.exports=e("../modules/_core").WeakMap},{"../modules/_core":93,"../modules/es6.object.to-string":165,"../modules/es6.weak-map":168,"../modules/es7.weak-map.from":174,"../modules/es7.weak-map.of":175,"../modules/web.dom.iterable":176}],78:[function(e,t,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],79:[function(e,t,r){t.exports=function(){}},{}],80:[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}},{}],81:[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":111}],82:[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":102}],83:[function(e,t,r){var n=e("./_to-iobject"),o=e("./_to-length"),i=e("./_to-absolute-index");t.exports=function(e){return function(t,r,s){var a,u=n(t),l=o(u.length),c=i(s,l);if(e&&r!=r){for(;l>c;)if((a=u[c++])!=a)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}}},{"./_to-absolute-index":143,"./_to-iobject":145,"./_to-length":146}],84:[function(e,t,r){var n=e("./_ctx"),o=e("./_iobject"),i=e("./_to-object"),s=e("./_to-length"),a=e("./_array-species-create");t.exports=function(e,t){var r=1==e,u=2==e,l=3==e,c=4==e,f=6==e,d=5==e||f,h=t||a;return function(t,a,p){for(var _,v,y=i(t),b=o(y),g=n(a,p,3),m=s(b.length),C=0,k=r?h(t,m):u?h(t,0):void 0;m>C;C++)if((d||C in b)&&(_=b[C],v=g(_,C,y),e))if(r)k[C]=v;else if(v)switch(e){case 3:return!0;case 5:return _;case 6:return C;case 2:k.push(_)}else if(c)return!1;return f?-1:l||c?c:k}}},{"./_array-species-create":86,"./_ctx":94,"./_iobject":108,"./_to-length":146,"./_to-object":147}],85:[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)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!o(t.prototype)||(t=void 0),n(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},{"./_is-array":110,"./_is-object":111,"./_wks":153}],86:[function(e,t,r){var n=e("./_array-species-constructor");t.exports=function(e,t){return new(n(e))(t)}},{"./_array-species-constructor":85}],87:[function(e,t,r){var n=e("./_cof"),o=e("./_wks")("toStringTag"),i="Arguments"==n(function(){return arguments}()),s=function(e,t){try{return e[t]}catch(e){}};t.exports=function(e){var t,r,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=s(t=Object(e),o))?r:i?n(t):"Object"==(a=n(t))&&"function"==typeof t.callee?"Arguments":a}},{"./_cof":88,"./_wks":153}],88:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],89:[function(e,t,r){"use strict";var n=e("./_object-dp").f,o=e("./_object-create"),i=e("./_redefine-all"),s=e("./_ctx"),a=e("./_an-instance"),u=e("./_for-of"),l=e("./_iter-define"),c=e("./_iter-step"),f=e("./_set-species"),d=e("./_descriptors"),h=e("./_meta").fastKey,p=e("./_validate-collection"),_=d?"_s":"size",v=function(e,t){var r,n=h(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,t,r,l){var c=e(function(e,n){a(e,c,t,"_i"),e._t=t,e._i=o(null),e._f=void 0,e._l=void 0,e[_]=0,void 0!=n&&u(n,r,e[l],e)});return i(c.prototype,{clear:function(){for(var e=p(this,t),r=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];e._f=e._l=void 0,e[_]=0},delete:function(e){var r=p(this,t),n=v(r,e);if(n){var o=n.n,i=n.p;delete r._i[n.i],n.r=!0,i&&(i.n=o),o&&(o.p=i),r._f==n&&(r._f=o),r._l==n&&(r._l=i),r[_]--}return!!n},forEach:function(e){p(this,t);for(var r,n=s(e,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function(e){return!!v(p(this,t),e)}}),d&&n(c.prototype,"size",{get:function(){return p(this,t)[_]}}),c},def:function(e,t,r){var n,o,i=v(e,t);return i?i.v=r:(e._l=i={i:o=h(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){l(e,t,function(e,r){this._t=p(e,t),this._k=r,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)?"keys"==t?c(0,r.k):"values"==t?c(0,r.v):c(0,[r.k,r.v]):(e._t=void 0,c(1))},r?"entries":"values",!r,!0),f(t)}}},{"./_an-instance":80,"./_ctx":94,"./_descriptors":96,"./_for-of":102,"./_iter-define":114,"./_iter-step":115,"./_meta":118,"./_object-create":120,"./_object-dp":121,"./_redefine-all":133,"./_set-species":138,"./_validate-collection":150}],90:[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":82,"./_classof":87}],91:[function(e,t,r){"use strict";var n=e("./_redefine-all"),o=e("./_meta").getWeak,i=e("./_an-object"),s=e("./_is-object"),a=e("./_an-instance"),u=e("./_for-of"),l=e("./_array-methods"),c=e("./_has"),f=e("./_validate-collection"),d=l(5),h=l(6),p=0,_=function(e){return e._l||(e._l=new v)},v=function(){this.a=[]},y=function(e,t){return d(e.a,function(e){return e[0]===t})};v.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var r=y(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=h(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},t.exports={getConstructor:function(e,t,r,i){var l=e(function(e,n){a(e,l,t,"_i"),e._t=t,e._i=p++,e._l=void 0,void 0!=n&&u(n,r,e[i],e)});return n(l.prototype,{delete:function(e){if(!s(e))return!1;var r=o(e);return!0===r?_(f(this,t)).delete(e):r&&c(r,this._i)&&delete r[this._i]},has:function(e){if(!s(e))return!1;var r=o(e);return!0===r?_(f(this,t)).has(e):r&&c(r,this._i)}}),l},def:function(e,t,r){var n=o(i(t),!0);return!0===n?_(e).set(t,r):n[e._i]=r,e},ufstore:_}},{"./_an-instance":80,"./_an-object":81,"./_array-methods":84,"./_for-of":102,"./_has":104,"./_is-object":111,"./_meta":118,"./_redefine-all":133,"./_validate-collection":150}],92:[function(e,t,r){"use strict";var n=e("./_global"),o=e("./_export"),i=e("./_meta"),s=e("./_fails"),a=e("./_hide"),u=e("./_redefine-all"),l=e("./_for-of"),c=e("./_an-instance"),f=e("./_is-object"),d=e("./_set-to-string-tag"),h=e("./_object-dp").f,p=e("./_array-methods")(0),_=e("./_descriptors");t.exports=function(e,t,r,v,y,b){var g=n[e],m=g,C=y?"set":"add",k=m&&m.prototype,j={};return _&&"function"==typeof m&&(b||k.forEach&&!s(function(){(new m).entries().next()}))?(m=t(function(t,r){c(t,m,e,"_c"),t._c=new g,void 0!=r&&l(r,y,t[C],t)}),p("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in k&&(!b||"clear"!=e)&&a(m.prototype,e,function(r,n){if(c(this,m,e),!t&&b&&!f(r))return"get"==e&&void 0;var o=this._c[e](0===r?0:r,n);return t?this:o})}),b||h(m.prototype,"size",{get:function(){return this._c.size}})):(m=v.getConstructor(t,e,y,C),u(m.prototype,r),i.NEED=!0),d(m,e),j[e]=m,o(o.G+o.W+o.F,j),b||v.setStrong(m,e,y),m}},{"./_an-instance":80,"./_array-methods":84,"./_descriptors":96,"./_export":100,"./_fails":101,"./_for-of":102,"./_global":103,"./_hide":105,"./_is-object":111,"./_meta":118,"./_object-dp":121,"./_redefine-all":133,"./_set-to-string-tag":139}],93:[function(e,t,r){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},{}],94:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":78}],95:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],96:[function(e,t,r){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":101}],97:[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":103,"./_is-object":111}],98:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],99:[function(e,t,r){var n=e("./_object-keys"),o=e("./_object-gops"),i=e("./_object-pie");t.exports=function(e){var t=n(e),r=o.f;if(r)for(var s,a=r(e),u=i.f,l=0;a.length>l;)u.call(e,s=a[l++])&&t.push(s);return t}},{"./_object-gops":126,"./_object-keys":129,"./_object-pie":130}],100:[function(e,t,r){var n=e("./_global"),o=e("./_core"),i=e("./_ctx"),s=e("./_hide"),a=function(e,t,r){var u,l,c,f=e&a.F,d=e&a.G,h=e&a.S,p=e&a.P,_=e&a.B,v=e&a.W,y=d?o:o[t]||(o[t]={}),b=y.prototype,g=d?n:h?n[t]:(n[t]||{}).prototype;d&&(r=t);for(u in r)(l=!f&&g&&void 0!==g[u])&&u in y||(c=l?g[u]:r[u],y[u]=d&&"function"!=typeof g[u]?r[u]:_&&l?i(c,n):v&&g[u]==c?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(c):p&&"function"==typeof c?i(Function.call,c):c,p&&((y.virtual||(y.virtual={}))[u]=c,e&a.R&&b&&!b[u]&&s(b,u,c)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},{"./_core":93,"./_ctx":94,"./_global":103,"./_hide":105}],101:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],102:[function(e,t,r){var n=e("./_ctx"),o=e("./_iter-call"),i=e("./_is-array-iter"),s=e("./_an-object"),a=e("./_to-length"),u=e("./core.get-iterator-method"),l={},c={},r=t.exports=function(e,t,r,f,d){var h,p,_,v,y=d?function(){return e}:u(e),b=n(r,f,t?2:1),g=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(i(y)){for(h=a(e.length);h>g;g++)if((v=t?b(s(p=e[g])[0],p[1]):b(e[g]))===l||v===c)return v}else for(_=y.call(e);!(p=_.next()).done;)if((v=o(_,b,p.value,t))===l||v===c)return v};r.BREAK=l,r.RETURN=c},{"./_an-object":81,"./_ctx":94,"./_is-array-iter":109,"./_iter-call":112,"./_to-length":146,"./core.get-iterator-method":154}],103:[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)},{}],104:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],105:[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":96,"./_object-dp":121,"./_property-desc":132}],106:[function(e,t,r){var n=e("./_global").document;t.exports=n&&n.documentElement},{"./_global":103}],107:[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":96,"./_dom-create":97,"./_fails":101}],108:[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":88}],109:[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":116,"./_wks":153}],110:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":88}],111:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],112:[function(e,t,r){var n=e("./_an-object");t.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},{"./_an-object":81}],113:[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":105,"./_object-create":120,"./_property-desc":132,"./_set-to-string-tag":139,"./_wks":153}],114:[function(e,t,r){"use strict";var n=e("./_library"),o=e("./_export"),i=e("./_redefine"),s=e("./_hide"),a=e("./_has"),u=e("./_iterators"),l=e("./_iter-create"),c=e("./_set-to-string-tag"),f=e("./_object-gpo"),d=e("./_wks")("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(e,t,r,_,v,y,b){l(r,t,_);var g,m,C,k=function(e){if(!h&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},j=t+" Iterator",w="values"==v,O=!1,S=e.prototype,E=S[d]||S["@@iterator"]||v&&S[v],P=!h&&E||k(v),A=v?w?k("entries"):P:void 0,T="Array"==t?S.entries||E:E;if(T&&(C=f(T.call(new e)))!==Object.prototype&&C.next&&(c(C,j,!0),n||a(C,d)||s(C,d,p)),w&&E&&"values"!==E.name&&(O=!0,P=function(){return E.call(this)}),n&&!b||!h&&!O&&S[d]||s(S,d,P),u[t]=P,u[j]=p,v)if(g={values:w?P:k("values"),keys:y?P:k("keys"),entries:A},b)for(m in g)m in S||i(S,m,g[m]);else o(o.P+o.F*(h||O),t,g);return g}},{"./_export":100,"./_has":104,"./_hide":105,"./_iter-create":113,"./_iterators":116,"./_library":117,"./_object-gpo":127,"./_redefine":134,"./_set-to-string-tag":139,"./_wks":153}],115:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],116:[function(e,t,r){t.exports={}},{}],117:[function(e,t,r){t.exports=!0},{}],118:[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=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},d=function(e,t){if(!i(e,n)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[n].w},h=function(e){return l&&p.NEED&&u(e)&&!i(e,n)&&c(e),e},p=t.exports={KEY:n,NEED:!1,fastKey:f,getWeak:d,onFreeze:h}},{"./_fails":101,"./_has":104,"./_is-object":111,"./_object-dp":121,"./_uid":149}],119:[function(e,t,r){"use strict";var n=e("./_object-keys"),o=e("./_object-gops"),i=e("./_object-pie"),s=e("./_to-object"),a=e("./_iobject"),u=Object.assign;t.exports=!u||e("./_fails")(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=u({},e)[r]||Object.keys(u({},t)).join("")!=n})?function(e,t){for(var r=s(e),u=arguments.length,l=1,c=o.f,f=i.f;u>l;)for(var d,h=a(arguments[l++]),p=c?n(h).concat(c(h)):n(h),_=p.length,v=0;_>v;)f.call(h,d=p[v++])&&(r[d]=h[d]);return r}:u},{"./_fails":101,"./_iobject":108,"./_object-gops":126,"./_object-keys":129,"./_object-pie":130,"./_to-object":147}],120:[function(e,t,r){var n=e("./_an-object"),o=e("./_object-dps"),i=e("./_enum-bug-keys"),s=e("./_shared-key")("IE_PROTO"),a=function(){},u=function(){var t,r=e("./_dom-create")("iframe"),n=i.length;for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",t=r.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;n--;)delete u.prototype[i[n]];return u()};t.exports=Object.create||function(e,t){var r;return null!==e?(a.prototype=n(e),r=new a,a.prototype=null,r[s]=e):r=u(),void 0===t?r:o(r,t)}},{"./_an-object":81,"./_dom-create":97,"./_enum-bug-keys":98,"./_html":106,"./_object-dps":122,"./_shared-key":140}],121:[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":81,"./_descriptors":96,"./_ie8-dom-define":107,"./_to-primitive":148}],122:[function(e,t,r){var n=e("./_object-dp"),o=e("./_an-object"),i=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){o(e);for(var r,s=i(t),a=s.length,u=0;a>u;)n.f(e,r=s[u++],t[r]);return e}},{"./_an-object":81,"./_descriptors":96,"./_object-dp":121,"./_object-keys":129}],123:[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":96,"./_has":104,"./_ie8-dom-define":107,"./_object-pie":130,"./_property-desc":132,"./_to-iobject":145,"./_to-primitive":148}],124:[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):[],a=function(e){try{return o(e)}catch(e){return s.slice()}};t.exports.f=function(e){return s&&"[object Window]"==i.call(e)?a(e):o(n(e))}},{"./_object-gopn":125,"./_to-iobject":145}],125:[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":98,"./_object-keys-internal":128}],126:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],127:[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":104,"./_shared-key":140,"./_to-object":147}],128:[function(e,t,r){var n=e("./_has"),o=e("./_to-iobject"),i=e("./_array-includes")(!1),s=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var r,a=o(e),u=0,l=[];for(r in a)r!=s&&n(a,r)&&l.push(r);for(;t.length>u;)n(a,r=t[u++])&&(~i(l,r)||l.push(r));return l}},{"./_array-includes":83,"./_has":104,"./_shared-key":140,"./_to-iobject":145}],129:[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":98,"./_object-keys-internal":128}],130:[function(e,t,r){r.f={}.propertyIsEnumerable},{}],131:[function(e,t,r){var n=e("./_export"),o=e("./_core"),i=e("./_fails");t.exports=function(e,t){var r=(o.Object||{})[e]||Object[e],s={};s[e]=t(r),n(n.S+n.F*i(function(){r(1)}),"Object",s)}},{"./_core":93,"./_export":100,"./_fails":101}],132:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],133:[function(e,t,r){var n=e("./_hide");t.exports=function(e,t,r){for(var o in t)r&&e[o]?e[o]=t[o]:n(e,o,t[o]);return e}},{"./_hide":105}],134:[function(e,t,r){t.exports=e("./_hide")},{"./_hide":105}],135:[function(e,t,r){"use strict";var n=e("./_export"),o=e("./_a-function"),i=e("./_ctx"),s=e("./_for-of");t.exports=function(e){n(n.S,e,{from:function(e){var t,r,n,a,u=arguments[1];return o(this),t=void 0!==u,t&&o(u),void 0==e?new this:(r=[],t?(n=0,a=i(u,arguments[2],2),s(e,!1,function(e){r.push(a(e,n++))})):s(e,!1,r.push,r),new this(r))}})}},{"./_a-function":78,"./_ctx":94,"./_export":100,"./_for-of":102}],136:[function(e,t,r){"use strict";var n=e("./_export");t.exports=function(e){n(n.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},{"./_export":100}],137:[function(e,t,r){var n=e("./_is-object"),o=e("./_an-object"),i=function(e,t){if(o(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,r,n){try{n=e("./_ctx")(Function.call,e("./_object-gopd").f(Object.prototype,"__proto__").set,2),n(t,[]),r=!(t 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":81,"./_ctx":94,"./_is-object":111,"./_object-gopd":123}],138:[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":93,"./_descriptors":96,"./_global":103,"./_object-dp":121,"./_wks":153}],139:[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":104,"./_object-dp":121,"./_wks":153}],140:[function(e,t,r){var n=e("./_shared")("keys"),o=e("./_uid");t.exports=function(e){return n[e]||(n[e]=o(e))}},{"./_shared":141,"./_uid":149}],141:[function(e,t,r){var n=e("./_global"),o=n["__core-js_shared__"]||(n["__core-js_shared__"]={});t.exports=function(e){return o[e]||(o[e]={})}},{"./_global":103}],142:[function(e,t,r){var n=e("./_to-integer"),o=e("./_defined");t.exports=function(e){return function(t,r){var i,s,a=String(o(t)),u=n(r),l=a.length;return u<0||u>=l?e?"":void 0:(i=a.charCodeAt(u),i<55296||i>56319||u+1===l||(s=a.charCodeAt(u+1))<56320||s>57343?e?a.charAt(u):i:e?a.slice(u,u+2):s-56320+(i-55296<<10)+65536)}}},{"./_defined":95,"./_to-integer":144}],143:[function(e,t,r){var n=e("./_to-integer"),o=Math.max,i=Math.min;t.exports=function(e,t){return e=n(e),e<0?o(e+t,0):i(e,t)}},{"./_to-integer":144}],144:[function(e,t,r){var n=Math.ceil,o=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},{}],145:[function(e,t,r){var n=e("./_iobject"),o=e("./_defined");t.exports=function(e){return n(o(e))}},{"./_defined":95,"./_iobject":108}],146:[function(e,t,r){var n=e("./_to-integer"),o=Math.min;t.exports=function(e){return e>0?o(n(e),9007199254740991):0}},{"./_to-integer":144}],147:[function(e,t,r){var n=e("./_defined");t.exports=function(e){return Object(n(e))}},{"./_defined":95}],148:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":111}],149:[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))}},{}],150:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},{"./_is-object":111}],151:[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":93,"./_global":103,"./_library":117,"./_object-dp":121,"./_wks-ext":152}],152:[function(e,t,r){r.f=e("./_wks")},{"./_wks":153}],153:[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":103,"./_shared":141,"./_uid":149}],154:[function(e,t,r){var n=e("./_classof"),o=e("./_wks")("iterator"),i=e("./_iterators");t.exports=e("./_core").getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[n(e)]}},{"./_classof":87,"./_core":93,"./_iterators":116,"./_wks":153}],155:[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":81,"./_core":93,"./core.get-iterator-method":154}],156:[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)):"keys"==t?o(0,r):"values"==t?o(0,e[r]):o(0,[r,e[r]])},"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},{"./_add-to-unscopables":79,"./_iter-define":114,"./_iter-step":115,"./_iterators":116,"./_to-iobject":145}],157:[function(e,t,r){"use strict";var n=e("./_collection-strong"),o=e("./_validate-collection");t.exports=e("./_collection")("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=n.getEntry(o(this,"Map"),e);return t&&t.v},set:function(e,t){return n.def(o(this,"Map"),0===e?0:e,t)}},n,!0)},{"./_collection":92,"./_collection-strong":89,"./_validate-collection":150}],158:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{create:e("./_object-create")})},{"./_export":100,"./_object-create":120}],159:[function(e,t,r){var n=e("./_export");n(n.S+n.F*!e("./_descriptors"),"Object",{defineProperty:e("./_object-dp").f})},{"./_descriptors":96,"./_export":100,"./_object-dp":121}],160:[function(e,t,r){var n=e("./_is-object"),o=e("./_meta").onFreeze;e("./_object-sap")("freeze",function(e){return function(t){return e&&n(t)?e(o(t)):t}})},{"./_is-object":111,"./_meta":118,"./_object-sap":131}],161:[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":123,"./_object-sap":131,"./_to-iobject":145}],162:[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":127,"./_object-sap":131,"./_to-object":147}],163:[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":129,"./_object-sap":131,"./_to-object":147}],164:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{setPrototypeOf:e("./_set-proto").set})},{"./_export":100,"./_set-proto":137}],165:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{dup:64}],166:[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":114,"./_string-at":142}],167:[function(e,t,r){"use strict";var n=e("./_global"),o=e("./_has"),i=e("./_descriptors"),s=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("./_enum-keys"),y=e("./_is-array"),b=e("./_an-object"),g=e("./_is-object"),m=e("./_to-iobject"),C=e("./_to-primitive"),k=e("./_property-desc"),j=e("./_object-create"),w=e("./_object-gopn-ext"),O=e("./_object-gopd"),S=e("./_object-dp"),E=e("./_object-keys"),P=O.f,A=S.f,T=w.f,I=n.Symbol,N=n.JSON,R=N&&N.stringify,M=h("_hidden"),x=h("toPrimitive"),L={}.propertyIsEnumerable,D=c("symbol-registry"),U=c("symbols"),F=c("op-symbols"),q=Object.prototype,K="function"==typeof I,J=n.QObject,W=!J||!J.prototype||!J.prototype.findChild,Q=i&&l(function(){return 7!=j(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,B=function(e){var t=U[e]=j(I.prototype);return t._k=e,t},G=K&&"symbol"==typeof I.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof I},V=function(e,t,r){return e===q&&V(F,t,r),b(e),t=C(t,!0),b(r),o(U,t)?(r.enumerable?(o(e,M)&&e[M][t]&&(e[M][t]=!1),r=j(r,{enumerable:k(0,!1)})):(o(e,M)||A(e,M,k(1,{})),e[M][t]=!0),Q(e,t,r)):A(e,t,r)},z=function(e,t){b(e);for(var r,n=v(t=m(t)),o=0,i=n.length;i>o;)V(e,r=n[o++],t[r]);return e},Y=function(e,t){return void 0===t?j(e):z(j(e),t)},H=function(e){var t=L.call(this,e=C(e,!0));return!(this===q&&o(U,e)&&!o(F,e))&&(!(t||!o(this,e)||!o(U,e)||o(this,M)&&this[M][e])||t)},$=function(e,t){if(e=m(e),t=C(t,!0),e!==q||!o(U,t)||o(F,t)){var r=P(e,t);return!r||!o(U,t)||o(e,M)&&e[M][t]||(r.enumerable=!0),r}},X=function(e){for(var t,r=T(m(e)),n=[],i=0;r.length>i;)o(U,t=r[i++])||t==M||t==u||n.push(t);return n},Z=function(e){for(var t,r=e===q,n=T(r?F:m(e)),i=[],s=0;n.length>s;)!o(U,t=n[s++])||r&&!o(q,t)||i.push(U[t]);return i};K||(I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(r){this===q&&t.call(F,r),o(this,M)&&o(this[M],e)&&(this[M][e]=!1),Q(this,e,k(1,r))};return i&&W&&Q(q,e,{configurable:!0,set:t}),B(e)},a(I.prototype,"toString",function(){return this._k}),O.f=$,S.f=V,e("./_object-gopn").f=w.f=X,e("./_object-pie").f=H,e("./_object-gops").f=Z,i&&!e("./_library")&&a(q,"propertyIsEnumerable",H,!0),p.f=function(e){return B(h(e))}),s(s.G+s.W+s.F*!K,{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(var re=E(h.store),ne=0;re.length>ne;)_(re[ne++]);s(s.S+s.F*!K,"Symbol",{for:function(e){return o(D,e+="")?D[e]:D[e]=I(e)},keyFor:function(e){if(!G(e))throw TypeError(e+" is not a symbol!");for(var t in D)if(D[t]===e)return t},useSetter:function(){W=!0},useSimple:function(){W=!1}}),s(s.S+s.F*!K,"Object",{create:Y,defineProperty:V,defineProperties:z,getOwnPropertyDescriptor:$,getOwnPropertyNames:X,getOwnPropertySymbols:Z}),N&&s(s.S+s.F*(!K||l(function(){var e=I();return"[null]"!=R([e])||"{}"!=R({a:e})||"{}"!=R(Object(e))})),"JSON",{stringify:function(e){for(var t,r,n=[e],o=1;arguments.length>o;)n.push(arguments[o++]);if(r=t=n[1],(g(t)||void 0!==e)&&!G(e))return y(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!G(t))return t}),n[1]=t,R.apply(N,n)}}),I.prototype[x]||e("./_hide")(I.prototype,x,I.prototype.valueOf),f(I,"Symbol"),f(Math,"Math",!0),f(n.JSON,"JSON",!0)},{"./_an-object":81,"./_descriptors":96,"./_enum-keys":99,"./_export":100,"./_fails":101,"./_global":103,"./_has":104,"./_hide":105,"./_is-array":110,"./_is-object":111,"./_library":117,"./_meta":118,"./_object-create":120,"./_object-dp":121,"./_object-gopd":123,"./_object-gopn":125,"./_object-gopn-ext":124,"./_object-gops":126,"./_object-keys":129,"./_object-pie":130,"./_property-desc":132,"./_redefine":134,"./_set-to-string-tag":139,"./_shared":141,"./_to-iobject":145,"./_to-primitive":148,"./_uid":149,"./_wks":153,"./_wks-define":151,"./_wks-ext":152}],168:[function(e,t,r){"use strict";var n,o=e("./_array-methods")(0),i=e("./_redefine"),s=e("./_meta"),a=e("./_object-assign"),u=e("./_collection-weak"),l=e("./_is-object"),c=e("./_fails"),f=e("./_validate-collection"),d=s.getWeak,h=Object.isExtensible,p=u.ufstore,_={},v=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(e){if(l(e)){var t=d(e);return!0===t?p(f(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(f(this,"WeakMap"),e,t)}},b=t.exports=e("./_collection")("WeakMap",v,y,u,!0,!0);c(function(){return 7!=(new b).set((Object.freeze||Object)(_),7).get(_)})&&(n=u.getConstructor(v,"WeakMap"),a(n.prototype,y),s.NEED=!0,o(["delete","has","get","set"],function(e){var t=b.prototype,r=t[e];i(t,e,function(t,o){if(l(t)&&!h(t)){this._f||(this._f=new n);var i=this._f[e](t,o);return"set"==e?this:i}return r.call(this,t,o)})}))},{"./_array-methods":84,"./_collection":92,"./_collection-weak":91,"./_fails":101,"./_is-object":111,"./_meta":118,"./_object-assign":119,"./_redefine":134,"./_validate-collection":150}],169:[function(e,t,r){e("./_set-collection-from")("Map")},{"./_set-collection-from":135}],170:[function(e,t,r){e("./_set-collection-of")("Map")},{"./_set-collection-of":136}],171:[function(e,t,r){var n=e("./_export");n(n.P+n.R,"Map",{toJSON:e("./_collection-to-json")("Map")})},{"./_collection-to-json":90,"./_export":100}],172:[function(e,t,r){e("./_wks-define")("asyncIterator")},{"./_wks-define":151}],173:[function(e,t,r){e("./_wks-define")("observable")},{"./_wks-define":151}],174:[function(e,t,r){e("./_set-collection-from")("WeakMap")},{"./_set-collection-from":135}],175:[function(e,t,r){e("./_set-collection-of")("WeakMap")},{"./_set-collection-of":136}],176:[function(e,t,r){e("./es6.array.iterator");for(var n=e("./_global"),o=e("./_hide"),i=e("./_iterators"),s=e("./_wks")("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<a.length;u++){var l=a[u],c=n[l],f=c&&c.prototype;f&&!f[s]&&o(f,s,l),i[l]=i.Array}},{"./_global":103,"./_hide":105,"./_iterators":116,"./_wks":153,"./es6.array.iterator":156}],177:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function i(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,i,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(r=this._events[e],a(r))return!1;if(o(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),r.apply(this,i)}else if(s(r))for(i=Array.prototype.slice.call(arguments,1),l=r.slice(),n=l.length,u=0;u<n;u++)l[u].apply(this,i);return!0},n.prototype.addListener=function(e,t){var r;if(!o(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,o(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!o(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,i,a;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],i=r.length,n=-1,r===t||o(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(a=i;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){n=a;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],o(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(o(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}]},{},[10])(10)});