parse 6.2.0-alpha.1 → 6.2.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/parse.js +59920 -26560
- package/dist/parse.min.js +1 -14
- package/dist/parse.weapp.js +59961 -26565
- package/dist/parse.weapp.min.js +1 -14
- package/index.js +1 -1
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/Parse.js +2 -1
- package/lib/browser/ParseFile.js +2 -2
- package/lib/browser/RESTController.js +1 -1
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/Parse.js +3 -3
- package/lib/node/ParseFile.js +2 -2
- package/lib/node/RESTController.js +1 -1
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/Parse.js +0 -1
- package/lib/react-native/ParseFile.js +2 -2
- package/lib/react-native/RESTController.js +1 -1
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/Parse.js +0 -1
- package/lib/weapp/ParseFile.js +2 -2
- package/lib/weapp/RESTController.js +1 -1
- package/node.js +1 -1
- package/package.json +14 -15
- package/react-native.js +1 -1
- package/types/ParseFile.d.ts +1 -0
- package/weapp.js +1 -1
package/dist/parse.min.js
CHANGED
|
@@ -1,14 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parse JavaScript SDK v6.2.0-alpha.1
|
|
3
|
-
*
|
|
4
|
-
* Copyright 2015-present Parse Platform
|
|
5
|
-
* All rights reserved.
|
|
6
|
-
*
|
|
7
|
-
* The source tree of this library can be found at
|
|
8
|
-
* https://github.com/ParsePlatform/Parse-SDK-JS
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the license found in the LICENSE
|
|
11
|
-
* file in the root directory of this source tree. Additional legal
|
|
12
|
-
* information can be found in the NOTICE file in the same directory.
|
|
13
|
-
*/
|
|
14
|
-
!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Parse=e()}(function(){return function n(s,a,i){function o(t,e){if(!a[t]){if(!s[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}r=a[t]={exports:{}},s[t][0].call(r.exports,function(e){return o(s[t][1][e]||e)},r,r.exports,n,s,a,i)}return a[t].exports}for(var l="function"==typeof require&&require,e=0;e<i.length;e++)o(i[e]);return o}({1:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.track=function(e,t){if(0===(e=(e=(e=e||"").replace(/^\s*/,"")).replace(/\s*$/,"")).length)throw new TypeError("A name for the custom event must be provided");for(const r in t)if("string"!=typeof r||"string"!=typeof t[r])throw new TypeError('track() dimensions expects keys and values of type "string".');return a.default.getAnalyticsController().track(e,t)},s(e("./CoreManager")));a.default.setAnalyticsController({track(e,t){const r=a.default.getRESTController();return r.request("POST","events/"+e,{dimensions:t})}})},{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],2:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("./ParseUser"))),i=s(e("./uuid"));let o=!1;r.default={isLinked(e){const t=this._getAuthProvider();return e._isLinked(t.getAuthType())},logIn(e){const t=this._getAuthProvider();return a.default.logInWith(t.getAuthType(),t.getAuthData(),e)},link(e,t){const r=this._getAuthProvider();return e.linkWith(r.getAuthType(),r.getAuthData(),t)},isRegistered(){return o},_getAuthProvider(){var e={restoreAuthentication(){return!0},getAuthType(){return"anonymous"},getAuthData(){return{authData:{id:(0,i.default)()}}}};return o||(a.default._registerAuthenticationProvider(e),o=!0),e}}},{"./ParseUser":38,"./uuid":64,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],3:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.getJobStatus=function(e){const t=new f.default("_JobStatus");return t.get(e,{useMasterKey:!0})},r.getJobsData=function(){return o.default.getCloudController().getJobsData({useMasterKey:!0})},r.run=function(e,t,r){if("string"!=typeof e||0===e.length)throw new TypeError("Cloud function name must be a string.");r=d.default._getRequestOptions(r);return o.default.getCloudController().run(e,t,r)},r.startJob=function(e,t){if("string"==typeof e&&0!==e.length)return o.default.getCloudController().startJob(e,t,{useMasterKey:!0});throw new TypeError("Cloud job name must be a string.")},s(e("@babel/runtime-corejs3/core-js-stable/object/keys"))),i=s(e("@babel/runtime-corejs3/core-js-stable/promise")),o=s(e("./CoreManager")),l=s(e("./decode")),u=s(e("./encode")),c=s(e("./ParseError")),f=s(e("./ParseQuery")),d=s(e("./ParseObject"));o.default.setCloudController({run(e,t,r){const n=o.default.getRESTController();t=(0,u.default)(t,!0);const s=n.request("POST","functions/"+e,t,r);return s.then(e=>{if("object"==typeof e&&0<(0,a.default)(e).length&&!Object.hasOwn(e,"result"))throw new c.default(c.default.INVALID_JSON,"The server returned an invalid response.");e=(0,l.default)(e);return e&&Object.hasOwn(e,"result")?i.default.resolve(e.result):i.default.resolve(void 0)})},getJobsData(e){const t=o.default.getRESTController();return t.request("GET","cloud_code/jobs/data",null,e)},async startJob(e,t,r){const n=o.default.getRESTController();t=(0,u.default)(t,!0),r.returnStatus=!0,e=await n.request("POST","jobs/"+e,t,r);return e._headers?.["X-Parse-Job-Status-Id"]}})},{"./CoreManager":4,"./ParseError":24,"./ParseObject":30,"./ParseQuery":33,"./decode":55,"./encode":56,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/keys":96,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],4:[function(i,e,o){!function(a){!function(){"use strict";var e=i("@babel/runtime-corejs3/core-js-stable/object/define-property"),t=i("@babel/runtime-corejs3/helpers/interopRequireDefault"),n=(e(o,"__esModule",{value:!0}),o.default=void 0,t(i("@babel/runtime-corejs3/core-js-stable/instance/for-each")));const r={IS_NODE:void 0!==a&&!!a.versions&&!!a.versions.node&&!a.versions.electron,REQUEST_ATTEMPT_LIMIT:5,REQUEST_BATCH_SIZE:20,REQUEST_HEADERS:{},SERVER_URL:"https://api.parse.com/1",SERVER_AUTH_TYPE:null,SERVER_AUTH_TOKEN:null,LIVEQUERY_SERVER_URL:null,ENCRYPTED_KEY:null,VERSION:"js6.2.0-alpha.1",APPLICATION_ID:null,JAVASCRIPT_KEY:null,MAINTENANCE_KEY:null,MASTER_KEY:null,USE_MASTER_KEY:!1,PERFORM_USER_REWRITE:!0,FORCE_REVOCABLE_SESSION:!1,ENCRYPTED_USER:!1,IDEMPOTENCY:!1,ALLOW_CUSTOM_OBJECT_ID:!1,PARSE_ERRORS:[]};function s(t,e,r){(0,n.default)(e).call(e,e=>{if("function"!=typeof r[e])throw new Error(t+` must implement ${e}()`)})}o.default={get:function(e){if(Object.hasOwn(r,e))return r[e];throw new Error("Configuration key not found: "+e)},set:function(e,t){r[e]=t},setIfNeeded:function(e,t){return Object.hasOwn(r,e)||(r[e]=t),r[e]},setAnalyticsController(e){s("AnalyticsController",["track"],e),r.AnalyticsController=e},getAnalyticsController(){return r.AnalyticsController},setCloudController(e){s("CloudController",["run","getJobsData","startJob"],e),r.CloudController=e},getCloudController(){return r.CloudController},setConfigController(e){s("ConfigController",["current","get","save"],e),r.ConfigController=e},getConfigController(){return r.ConfigController},setCryptoController(e){s("CryptoController",["encrypt","decrypt"],e),r.CryptoController=e},getCryptoController(){return r.CryptoController},setEventEmitter(e){r.EventEmitter=e},getEventEmitter(){return r.EventEmitter},setFileController(e){s("FileController",["saveFile","saveBase64"],e),r.FileController=e},setEventuallyQueue(e){s("EventuallyQueue",["poll","save","destroy"],e),r.EventuallyQueue=e},getEventuallyQueue(){return r.EventuallyQueue},getFileController(){return r.FileController},setInstallationController(e){s("InstallationController",["currentInstallationId","currentInstallation","updateInstallationOnDisk"],e),r.InstallationController=e},getInstallationController(){return r.InstallationController},setLiveQuery(e){r.LiveQuery=e},getLiveQuery(){return r.LiveQuery},setObjectController(e){s("ObjectController",["save","fetch","destroy"],e),r.ObjectController=e},getObjectController(){return r.ObjectController},setObjectStateController(e){s("ObjectStateController",["getState","initializeState","removeState","getServerData","setServerData","getPendingOps","setPendingOp","pushPendingState","popPendingState","mergeFirstPendingState","getObjectCache","estimateAttribute","estimateAttributes","commitServerChanges","enqueueTask","clearAllState"],e),r.ObjectStateController=e},getObjectStateController(){return r.ObjectStateController},setPushController(e){s("PushController",["send"],e),r.PushController=e},getPushController(){return r.PushController},setQueryController(e){s("QueryController",["find","aggregate"],e),r.QueryController=e},getQueryController(){return r.QueryController},setRESTController(e){s("RESTController",["request","ajax"],e),r.RESTController=e},getRESTController(){return r.RESTController},setSchemaController(e){s("SchemaController",["get","create","update","delete","send","purge"],e),r.SchemaController=e},getSchemaController(){return r.SchemaController},setSessionController(e){s("SessionController",["getSession"],e),r.SessionController=e},getSessionController(){return r.SessionController},setStorageController(e){e.async?s("An async StorageController",["getItemAsync","setItemAsync","removeItemAsync","getAllKeysAsync"],e):s("A synchronous StorageController",["getItem","setItem","removeItem","getAllKeys"],e),r.StorageController=e},setLocalDatastoreController(e){s("LocalDatastoreController",["pinWithName","fromPinWithName","unPinWithName","getAllContents","clear"],e),r.LocalDatastoreController=e},getLocalDatastoreController(){return r.LocalDatastoreController},setLocalDatastore(e){r.LocalDatastore=e},getLocalDatastore(){return r.LocalDatastore},getStorageController(){return r.StorageController},setAsyncStorage(e){r.AsyncStorage=e},getAsyncStorage(){return r.AsyncStorage},setWebSocketController(e){r.WebSocketController=e},getWebSocketController(){return r.WebSocketController},setUserController(e){s("UserController",["setCurrentUser","currentUser","currentUserAsync","signUp","logIn","become","logOut","me","requestPasswordReset","upgradeToRevocableSession","requestEmailVerification","verifyPassword","linkWith"],e),r.UserController=e},getUserController(){return r.UserController},setLiveQueryController(e){s("LiveQueryController",["setDefaultLiveQueryClient","getDefaultLiveQueryClient","_clearCachedDefaultClient"],e),r.LiveQueryController=e},getLiveQueryController(){return r.LiveQueryController},setHooksController(e){s("HooksController",["create","get","update","remove"],e),r.HooksController=e},getHooksController(){return r.HooksController},setParseOp(e){r.ParseOp=e},getParseOp(){return r.ParseOp},setParseObject(e){r.ParseObject=e},getParseObject(){return r.ParseObject},setParseQuery(e){r.ParseQuery=e},getParseQuery(){return r.ParseQuery},setParseRole(e){r.ParseRole=e},getParseRole(){return r.ParseRole},setParseUser(e){r.ParseUser=e},getParseUser(){return r.ParseUser}}}.call(this)}.call(this,i("_process"))},{"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104,_process:108}],5:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/json/stringify")));let i,o;i=e("crypto-js/aes"),o=e("crypto-js/enc-utf8");r.default={encrypt(e,t){const r=i.encrypt((0,a.default)(e),t);return r.toString()},decrypt(e,t){return i.decrypt(e,t).toString(o)}}},{"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104,"crypto-js/aes":481,"crypto-js/enc-utf8":485}],6:[function(e,t,r){"use strict";e("@babel/runtime-corejs3/core-js-stable/object/define-property")(r,"__esModule",{value:!0}),r.default=void 0;let n;try{n=e("events").EventEmitter}catch(e){}r.default=n},{"@babel/runtime-corejs3/core-js-stable/object/define-property":91,events:490}],7:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/json/stringify"))),i=s(e("@babel/runtime-corejs3/core-js-stable/instance/splice")),o=s(e("@babel/runtime-corejs3/core-js-stable/instance/find-index")),l=s(e("@babel/runtime-corejs3/core-js-stable/set-interval")),u=s(e("@babel/runtime-corejs3/core-js-stable/instance/find")),c=s(e("./CoreManager")),f=s(e("./ParseError")),d=s(e("./ParseObject")),p=s(e("./ParseQuery")),b=s(e("./Storage"));const h="Parse/Eventually/Queue";let y=[],m=!0,g=void 0;const j={save(e,t){return this.enqueue("save",e,t)},destroy(e,t){return this.enqueue("destroy",e,t)},generateQueueId(e,t){t._getId();const{className:r,id:n,_localId:s}=t,a=t.get("hash")||s;return[e,r,n,a].join("_")},async enqueue(e,t,r){const n=await this.getQueue();var s=this.generateQueueId(e,t);let a=this.queueItemExists(n,s);if(-1<a)for(const i in n[a].object)void 0===t.get(i)&&t.set(i,n[a].object[i]);else a=n.length;return n[a]={queueId:s,action:e,object:t.toJSON(),serverOptions:r||{},id:t.id,className:t.className,hash:t.get("hash"),createdAt:new Date},this.setQueue(n)},store(e){return b.default.setItemAsync(h,(0,a.default)(e))},load(){return b.default.getItemAsync(h)},async getQueue(){return m&&(y=JSON.parse(await this.load()||"[]"),m=!1),y},setQueue(e){return y=e,this.store(y)},async remove(e){var t=await this.getQueue(),e=this.queueItemExists(t,e);-1<e&&((0,i.default)(t).call(t,e,1),await this.setQueue(t))},clear(){return y=[],this.store([])},queueItemExists(e,t){return(0,o.default)(e).call(e,e=>e.queueId===t)},async length(){return(await this.getQueue()).length},async sendQueue(){var t=[...await this.getQueue()];if(0===t.length)return!1;for(let e=0;e<t.length;e+=1){var r=t[e],{id:n,hash:s,className:a}=r,a=d.default.extend(a);n?await this.process.byId(a,r):s?await this.process.byHash(a,r):await this.process.create(a,r)}return!0},async sendQueueCallback(e,t){if(!e)return this.remove(t.queueId);switch(t.action){case"save":if(void 0!==e.updatedAt&&e.updatedAt>new Date(t.object.createdAt))return this.remove(t.queueId);try{await e.save(t.object,t.serverOptions),await this.remove(t.queueId)}catch(e){e.code!==f.default.CONNECTION_FAILED&&await this.remove(t.queueId)}break;case"destroy":try{await e.destroy(t.serverOptions),await this.remove(t.queueId)}catch(e){e.code!==f.default.CONNECTION_FAILED&&await this.remove(t.queueId)}}},poll(e){g=g||(0,l.default)(()=>{const e=c.default.getRESTController();e.request("GET","health").then(e=>{e=e.status;if("ok"===e)return this.stopPoll(),this.sendQueue()}).catch(e=>e)},e||2e3)},stopPoll(){clearInterval(g),g=void 0},isPolling(){return!!g},_setPolling(e){g=e},process:{create(e,t){e=new e;return j.sendQueueCallback(e,t)},async byId(e,t){var r=t.serverOptions["sessionToken"];const n=new p.default(e);n.equalTo("objectId",t.id);e=await(0,u.default)(n).call(n,{sessionToken:r});return j.sendQueueCallback(e[0],t)},async byHash(e,t){var r=t.serverOptions["sessionToken"];const n=new p.default(e);n.equalTo("hash",t.hash);r=await(0,u.default)(n).call(n,{sessionToken:r});return 0<r.length?j.sendQueueCallback(r[0],t):j.process.create(e,t)}}};r.default=j},{"./CoreManager":4,"./ParseError":24,"./ParseObject":30,"./ParseQuery":33,"./Storage":43,"@babel/runtime-corejs3/core-js-stable/instance/find":73,"@babel/runtime-corejs3/core-js-stable/instance/find-index":72,"@babel/runtime-corejs3/core-js-stable/instance/splice":83,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/set-interval":99,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],8:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("./ParseUser")));let i=!1,o,l;const u={authenticate(t){"undefined"==typeof FB&&t.error(this,"Facebook SDK not found."),FB.login(e=>{e.authResponse?t.success&&t.success(this,{id:e.authResponse.userID,access_token:e.authResponse.accessToken,expiration_date:new Date(1e3*e.authResponse.expiresIn+(new Date).getTime()).toJSON()}):t.error&&t.error(this,e)},{scope:o})},restoreAuthentication(e){if(e){const r={};if(l)for(const n in l)r[n]=l[n];r.status=!1;var t=FB.getAuthResponse();t&&t.userID!==e.id&&FB.logout(),FB.init(r)}return!0},getAuthType(){return"facebook"},deauthenticate(){this.restoreAuthentication(null)}};r.default={init(e){if("undefined"==typeof FB)throw new Error("The Facebook JavaScript SDK must be loaded before calling init.");if(l={},e)for(const t in e)l[t]=e[t];if(l.status&&"undefined"!=typeof console){const r=console.warn||console.log||function(){};r.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.')}l.status=!1,FB.init(l),a.default._registerAuthenticationProvider(u),i=!0},isLinked(e){return e._isLinked("facebook")},logIn(e,t){if(e&&"string"!=typeof e)return a.default.logInWith("facebook",{authData:e},t);if(i)return o=e,a.default.logInWith("facebook",t);throw new Error("You must initialize FacebookUtils before calling logIn.")},link(e,t,r){if(t&&"string"!=typeof t)return e.linkWith("facebook",{authData:t},r);if(i)return o=t,e.linkWith("facebook",r);throw new Error("You must initialize FacebookUtils before calling link.")},unlink:function(e,t){if(i)return e._unlinkFrom("facebook",t);throw new Error("You must initialize FacebookUtils before calling unlink.")},_getAuthProvider(){return u}}},{"./ParseUser":38,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],9:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/instance/keys"),s=(e("@babel/runtime-corejs3/core-js-stable/object/define-property")(r,"__esModule",{value:!0}),r.default=void 0,e("idb-keyval"));let a;if("undefined"!=typeof window&&window.indexedDB)try{const i=(0,s.createStore)("parseDB","parseStore");a={async:1,getItemAsync(e){return(0,s.get)(e,i)},setItemAsync(e,t){return(0,s.set)(e,t,i)},removeItemAsync(e){return(0,s.del)(e,i)},getAllKeysAsync(){return n(s)(i)},clear(){return(0,s.clear)(i)}}}catch(e){a=void 0}else a=void 0;r.default=a},{"@babel/runtime-corejs3/core-js-stable/instance/keys":77,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"idb-keyval":491}],10:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/json/stringify"))),i=s(e("./CoreManager")),o=s(e("./Storage")),l=s(e("./ParseInstallation")),u=s(e("./uuid"));const c="currentInstallation";let f=null,d=null,p=!1;r.default={async updateInstallationOnDisk(e){var t=o.default.generatePath(c);await o.default.setItemAsync(t,(0,a.default)(e.toJSON())),this._setCurrentInstallationCache(e)},async currentInstallationId(){if("string"==typeof f)return f;var e=o.default.generatePath("currentInstallationId");let t=await o.default.getItemAsync(e);return t?f=t:(t=(0,u.default)(),o.default.setItemAsync(e,t).then(()=>f=t))},async currentInstallation(){if(d)return d;if(p)return null;var e=o.default.generatePath(c);let t=await o.default.getItemAsync(e);if(p=!0,t)return(t=JSON.parse(t)).className="_Installation",r=l.default.fromJSON(t),d=r;var r=await this.currentInstallationId();const n=new l.default;return n.set("deviceType",l.default.DEVICE_TYPES.WEB),n.set("installationId",r),n.set("parseVersion",i.default.get("VERSION")),d=n,await o.default.setItemAsync(e,(0,a.default)(n.toJSON())),n},_clearCache(){f=null,d=null,p=!1},_setInstallationIdCache(e){f=e},_setCurrentInstallationCache(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];d=e,p=t}}},{"./CoreManager":4,"./ParseInstallation":28,"./Storage":43,"./uuid":64,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],11:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),l=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/instance/index-of"))),u=s(e("@babel/runtime-corejs3/core-js-stable/map")),c=s(e("@babel/runtime-corejs3/core-js-stable/instance/keys")),f=s(e("@babel/runtime-corejs3/core-js-stable/json/stringify")),a=s(e("@babel/runtime-corejs3/core-js-stable/instance/for-each")),i=s(e("@babel/runtime-corejs3/core-js-stable/instance/values")),o=s(e("@babel/runtime-corejs3/core-js-stable/set-timeout")),d=s(e("@babel/runtime-corejs3/core-js-stable/instance/bind")),p=s(e("@babel/runtime-corejs3/helpers/defineProperty")),b=s(e("./CoreManager")),h=s(e("./ParseObject")),y=s(e("./LiveQuerySubscription")),m=e("./promiseUtils"),g=s(e("./ParseError"));const j={INITIALIZED:"initialized",CONNECTING:"connecting",CONNECTED:"connected",CLOSED:"closed",RECONNECTING:"reconnecting",DISCONNECTED:"disconnected"},v={CONNECT:"connect",SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",ERROR:"error"},_={CONNECTED:"connected",SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed",ERROR:"error",CREATE:"create",UPDATE:"update",ENTER:"enter",LEAVE:"leave",DELETE:"delete"},w={CLOSE:"close",ERROR:"error",OPEN:"open"},E={OPEN:"open",CLOSE:"close",ERROR:"error",CREATE:"create",UPDATE:"update",ENTER:"enter",LEAVE:"leave",DELETE:"delete"};r.default=class{constructor(e){var s=this,{applicationId:e,serverURL:t,javascriptKey:r,masterKey:n,sessionToken:a,installationId:i}=e;if((0,p.default)(this,"attempts",void 0),(0,p.default)(this,"id",void 0),(0,p.default)(this,"requestId",void 0),(0,p.default)(this,"applicationId",void 0),(0,p.default)(this,"serverURL",void 0),(0,p.default)(this,"javascriptKey",void 0),(0,p.default)(this,"masterKey",void 0),(0,p.default)(this,"sessionToken",void 0),(0,p.default)(this,"installationId",void 0),(0,p.default)(this,"additionalProperties",void 0),(0,p.default)(this,"connectPromise",void 0),(0,p.default)(this,"subscriptions",void 0),(0,p.default)(this,"socket",void 0),(0,p.default)(this,"state",void 0),(0,p.default)(this,"reconnectHandle",void 0),(0,p.default)(this,"emitter",void 0),(0,p.default)(this,"on",void 0),(0,p.default)(this,"emit",void 0),!t||0!==(0,l.default)(t).call(t,"ws"))throw new Error("You need to set a proper Parse LiveQuery server url before using LiveQueryClient");this.reconnectHandle=null,this.attempts=1,this.id=0,this.requestId=1,this.serverURL=t,this.applicationId=e,this.javascriptKey=r||void 0,this.masterKey=n||void 0,this.sessionToken=a||void 0,this.installationId=i||void 0,this.additionalProperties=!0,this.connectPromise=(0,m.resolvingPromise)(),this.subscriptions=new u.default,this.state=j.INITIALIZED;const o=b.default.getEventEmitter();this.emitter=new o,this.on=(e,t)=>this.emitter.on(e,t),this.emit=function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return s.emitter.emit(e,...r)},this.on("error",()=>{})}shouldOpen(){return this.state===j.INITIALIZED||this.state===j.DISCONNECTED}subscribe(e,t){if(e){var r=e.className;const i=e.toJSON();var n=i.where,s=(0,c.default)(i)?.split(","),a=i.watch?.split(",");const o={op:v.SUBSCRIBE,requestId:this.requestId,query:{className:r,where:n,keys:s,watch:a},sessionToken:void 0},l=(t&&(o.sessionToken=t),new y.default(this.requestId,e,t));return this.subscriptions.set(this.requestId,l),this.requestId+=1,this.connectPromise.then(()=>{this.socket.send((0,f.default)(o))}).catch(e=>{l.subscribePromise.reject(e)}),l}}async unsubscribe(e){if(e){const t={op:v.UNSUBSCRIBE,requestId:e.id};return this.connectPromise.then(()=>this.socket.send((0,f.default)(t))).then(()=>e.unsubscribePromise)}}open(){const e=b.default.getWebSocketController();e?(this.state!==j.RECONNECTING&&(this.state=j.CONNECTING),this.socket=new e(this.serverURL),this.socket.closingPromise=(0,m.resolvingPromise)(),this.socket.onopen=()=>{this._handleWebSocketOpen()},this.socket.onmessage=e=>{this._handleWebSocketMessage(e)},this.socket.onclose=e=>{this.socket.closingPromise?.resolve(e),this._handleWebSocketClose()},this.socket.onerror=e=>{this._handleWebSocketError(e)}):this.emit(w.ERROR,"Can not find WebSocket implementation")}resubscribe(){var e;(0,a.default)(e=this.subscriptions).call(e,(e,t)=>{const r=e.query,n=r.toJSON();var s=n.where,a=(0,c.default)(n)?.split(","),i=n.watch?.split(","),o=r.className,e=e.sessionToken;const l={op:v.SUBSCRIBE,requestId:t,query:{className:o,where:s,keys:a,watch:i},sessionToken:void 0};e&&(l.sessionToken=e),this.connectPromise.then(()=>{this.socket.send((0,f.default)(l))})})}async close(){if(this.state!==j.INITIALIZED&&this.state!==j.DISCONNECTED){this.state=j.DISCONNECTED,this.socket?.close();for(const t of(0,i.default)(e=this.subscriptions).call(e)){var e;t.subscribed=!1,t.emit(E.CLOSE)}return this._handleReset(),this.emit(w.CLOSE),this.socket?.closingPromise}}_handleReset(){this.attempts=1,this.id=0,this.requestId=1,this.connectPromise=(0,m.resolvingPromise)(),this.subscriptions=new u.default}_handleWebSocketOpen(){const e={op:v.CONNECT,applicationId:this.applicationId,javascriptKey:this.javascriptKey,masterKey:this.masterKey,sessionToken:this.sessionToken,installationId:void 0};this.additionalProperties&&(e.installationId=this.installationId),this.socket.send((0,f.default)(e))}_handleWebSocketMessage(e){let t=e.data,r=("string"==typeof t&&(t=JSON.parse(t)),null);t.requestId&&(r=this.subscriptions.get(t.requestId)||null);const n={clientId:t.clientId,installationId:t.installationId};switch(t.op){case _.CONNECTED:this.state===j.RECONNECTING&&this.resubscribe(),this.emit(w.OPEN),this.id=t.clientId,this.connectPromise.resolve(),this.state=j.CONNECTED;break;case _.SUBSCRIBED:r&&(this.attempts=1,r.subscribed=!0,r.subscribePromise.resolve(),(0,o.default)(()=>r.emit(E.OPEN,n),200));break;case _.ERROR:var s=new g.default(t.code,t.error);this.id||(this.connectPromise.reject(s),this.state=j.DISCONNECTED),t.requestId?r&&(r.subscribePromise.reject(s),(0,o.default)(()=>r.emit(E.ERROR,t.error),200)):this.emit(w.ERROR,t.error),"Additional properties not allowed"===t.error&&(this.additionalProperties=!1),t.reconnect&&this._handleReconnect();break;case _.UNSUBSCRIBED:r&&(this.subscriptions.delete(t.requestId),r.subscribed=!1,r.unsubscribePromise.resolve());break;default:if(r){let e=!1;if(t.original){e=!0,delete t.original.__type;for(const i in t.original)i in t.object||(t.object[i]=void 0);t.original=h.default.fromJSON(t.original,!1)}delete t.object.__type;s=h.default.fromJSON(t.object,(!r.query||!r.query._select)&&e);t.original?r.emit(t.op,s,t.original,n):r.emit(t.op,s,n);const a=b.default.getLocalDatastore();e&&a.isEnabled&&a._updateObjectIfPinned(s).then(()=>{})}}}_handleWebSocketClose(){if(this.state!==j.DISCONNECTED){this.state=j.CLOSED,this.emit(w.CLOSE);for(const t of(0,i.default)(e=this.subscriptions).call(e)){var e;t.emit(E.CLOSE)}this._handleReconnect()}}_handleWebSocketError(e){this.emit(w.ERROR,e);for(const r of(0,i.default)(t=this.subscriptions).call(t)){var t;r.emit(E.ERROR,e)}this._handleReconnect()}_handleReconnect(){var e,t;this.state!==j.DISCONNECTED&&(this.state=j.RECONNECTING,t=this.attempts,t=Math.random()*Math.min(30,Math.pow(2,t)-1)*1e3,this.reconnectHandle&&clearTimeout(this.reconnectHandle),this.reconnectHandle=(0,o.default)((0,d.default)(e=()=>{this.attempts++,this.connectPromise=(0,m.resolvingPromise)(),this.open()}).call(e,this),t))}}},{"./CoreManager":4,"./LiveQuerySubscription":12,"./ParseError":24,"./ParseObject":30,"./promiseUtils":61,"@babel/runtime-corejs3/core-js-stable/instance/bind":67,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/instance/keys":77,"@babel/runtime-corejs3/core-js-stable/instance/values":85,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/map":87,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/set-timeout":100,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],12:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/helpers/defineProperty"))),i=s(e("./CoreManager")),o=e("./promiseUtils");r.default=class{constructor(e,t,r){var s=this;(0,a.default)(this,"id",void 0),(0,a.default)(this,"query",void 0),(0,a.default)(this,"sessionToken",void 0),(0,a.default)(this,"subscribePromise",void 0),(0,a.default)(this,"unsubscribePromise",void 0),(0,a.default)(this,"subscribed",void 0),(0,a.default)(this,"emitter",void 0),(0,a.default)(this,"on",void 0),(0,a.default)(this,"emit",void 0),this.id=e,this.query=t,this.sessionToken=r,this.subscribePromise=(0,o.resolvingPromise)(),this.unsubscribePromise=(0,o.resolvingPromise)(),this.subscribed=!1;const n=i.default.getEventEmitter();this.emitter=new n,this.on=(e,t)=>this.emitter.on(e,t),this.emit=function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return s.emitter.emit(e,...r)},this.on("error",()=>{})}unsubscribe(){return i.default.getLiveQueryController().getDefaultLiveQueryClient().then(e=>(this.emit("close"),e.unsubscribe(this)))}}},{"./CoreManager":4,"./promiseUtils":61,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],13:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),f=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/promise"))),d=s(e("@babel/runtime-corejs3/core-js-stable/set")),p=s(e("@babel/runtime-corejs3/core-js-stable/object/keys")),b=s(e("@babel/runtime-corejs3/core-js-stable/instance/filter")),h=s(e("@babel/runtime-corejs3/core-js-stable/instance/includes")),y=s(e("@babel/runtime-corejs3/core-js-stable/instance/starts-with")),a=s(e("@babel/runtime-corejs3/core-js-stable/array/is-array")),l=s(e("@babel/runtime-corejs3/core-js-stable/instance/map")),u=s(e("@babel/runtime-corejs3/core-js-stable/instance/concat")),c=s(e("@babel/runtime-corejs3/core-js-stable/array/from")),m=s(e("@babel/runtime-corejs3/core-js-stable/instance/find")),i=s(e("./CoreManager")),n=s(e("./LocalDatastoreController")),g=s(e("./ParseQuery")),j=e("./LocalDatastoreUtils"),s={isEnabled:!1,isSyncing:!1,fromPinWithName(e){const t=i.default.getLocalDatastoreController();return t.fromPinWithName(e)},async pinWithName(e,t){const r=i.default.getLocalDatastoreController();return r.pinWithName(e,t)},async unPinWithName(e){const t=i.default.getLocalDatastoreController();return t.unPinWithName(e)},_getAllContents(){const e=i.default.getLocalDatastoreController();return e.getAllContents()},async _getRawStorage(){const e=i.default.getLocalDatastoreController();return e.getRawStorage()},async _clear(){const e=i.default.getLocalDatastoreController();return e.clear()},async _handlePinAllWithName(e,t){e=this.getPinName(e);const r=[],n=[];for(const a of t){const i=this._getChildren(a);var s=this.getKeyForObject(a);const o=a._toFullJSON(void 0,!0);a._localId&&(o._localId=a._localId),i[s]=o;for(const l in i)n.push(l),r.push(this.pinWithName(l,[i[l]]))}var t=this.fromPinWithName(e),[t]=await f.default.all([t,r]),t=[...new d.default([...t||[],...n])];return this.pinWithName(e,t)},async _handleUnPinAllWithName(e,t){const r=await this._getAllContents();e=this.getPinName(e);const n=[];let s=[];for(const l of t){var a=this._getChildren(l),i=this.getKeyForObject(l);s.push(i,...(0,p.default)(a))}s=[...new d.default(s)];t=r[e]||[];0==(t=(0,b.default)(t).call(t,e=>!(0,h.default)(s).call(s,e))).length?(n.push(this.unPinWithName(e)),delete r[e]):(n.push(this.pinWithName(e,t)),r[e]=t);for(const u of s){let e=!1;for(const c in r)if(c===j.DEFAULT_PIN||(0,y.default)(c).call(c,j.PIN_PREFIX)){var o=r[c]||[];if((0,h.default)(o).call(o,u)){e=!0;break}}e||n.push(this.unPinWithName(u))}return f.default.all(n)},_getChildren(e){var t={},r=e._toFullJSON(void 0,!0);for(const n in r)r[n]&&r[n].__type&&"Object"===r[n].__type&&this._traverse(r[n],t);return t},_traverse(t,r){if(t.objectId){var e=this.getKeyForObject(t);if(!r[e])for(const n in r[e]=t){let e=t[n];(e=t[n]?e:t).__type&&"Object"===e.__type&&this._traverse(e,r)}}},async _serializeObjectsFromPinName(e){var t,r=await this._getAllContents();const n=[];for(const s in r)(0,y.default)(s).call(s,j.OBJECT_PREFIX)&&n.push(r[s][0]);return e?(e=r[this.getPinName(e)],(0,a.default)(e)?(e=(0,l.default)(e).call(e,e=>this.fromPinWithName(e)),e=await f.default.all(e),e=(0,u.default)(t=[]).call(t,...e),(0,b.default)(e).call(e,e=>null!=e)):[]):n},async _serializeObject(e,t){let r=t;if(!(r=r||await this._getAllContents())[e]||0===r[e].length)return null;t=r[e][0];const n=[],s={};let a=0;for(s[a]=t,n.push(a);0!==n.length;){var i=n.shift();const l=s[i];for(const u in l){var o=l[u];o.__type&&"Object"===o.__type&&(o=this.getKeyForObject(o),r[o]&&0<r[o].length&&(o=r[o][0],a++,s[a]=o,l[u]=o,n.push(a)))}}return t},async _updateObjectIfPinned(e){if(this.isEnabled){var t=this.getKeyForObject(e),r=await this.fromPinWithName(t);if(r&&0!==r.length)return this.pinWithName(t,[e._toFullJSON()])}},async _destroyObjectIfPinned(e){if(this.isEnabled){const r=await this._getAllContents(),n=this.getKeyForObject(e);var t;if(r[n]){const s=[this.unPinWithName(n)];delete r[n];for(const a in r)a!==j.DEFAULT_PIN&&!(0,y.default)(a).call(a,j.PIN_PREFIX)||(t=r[a]||[],(0,h.default)(t).call(t,n)&&(0==(t=(0,b.default)(t).call(t,e=>e!==n)).length?(s.push(this.unPinWithName(a)),delete r[a]):(s.push(this.pinWithName(a,t)),r[a]=t)));return f.default.all(s)}}},async _updateLocalIdForObject(e,t){if(this.isEnabled){const n=""+j.OBJECT_PREFIX+t.className+"_"+e;var r=this.getKeyForObject(t),e=await this.fromPinWithName(n);if(e&&0!==e.length){const s=[this.unPinWithName(n),this.pinWithName(r,e)],a=await this._getAllContents();for(const i in a)if(i===j.DEFAULT_PIN||(0,y.default)(i).call(i,j.PIN_PREFIX)){let e=a[i]||[];(0,h.default)(e).call(e,n)&&((e=(0,b.default)(e).call(e,e=>e!==n)).push(r),s.push(this.pinWithName(i,e)),a[i]=e)}return f.default.all(s)}}},async updateFromServer(){if(this.checkIfEnabled()&&!this.isSyncing){const s=[];for(const a in await this._getAllContents())(0,y.default)(a).call(a,j.OBJECT_PREFIX)&&s.push(a);if(0!==s.length){this.isSyncing=!0;const i={};for(const o of s){let[,,e,t]=o.split("_");5===o.split("_").length&&"User"===o.split("_")[3]&&(e="_User",t=o.split("_")[4]),(0,y.default)(t).call(t,"local")||(e in i||(i[e]=new d.default),i[e].add(t))}var e=(0,l.default)(e=(0,p.default)(i)).call(e,e=>{var t=(0,c.default)(i[e]);const r=new g.default(e);return r.limit(t.length),1===t.length?r.equalTo("objectId",t[0]):r.containedIn("objectId",t),(0,m.default)(r).call(r)});try{var t=await f.default.all(e),r=(0,u.default)([]).apply([],t),n=(0,l.default)(r).call(r,e=>{var t=this.getKeyForObject(e);return this.pinWithName(t,e._toFullJSON())});await f.default.all(n),this.isSyncing=!1}catch(e){console.error("Error syncing LocalDatastore: ",e),this.isSyncing=!1}}}},getKeyForObject(e){var t=e.objectId||e._getId();return""+j.OBJECT_PREFIX+e.className+"_"+t},getPinName(e){return e&&e!==j.DEFAULT_PIN?j.PIN_PREFIX+e:j.DEFAULT_PIN},checkIfEnabled(){return this.isEnabled||console.error("Parse.enableLocalDatastore() must be called first"),this.isEnabled}};r.default=s;i.default.setLocalDatastoreController(n.default),i.default.setLocalDatastore(s)},{"./CoreManager":4,"./LocalDatastoreController":15,"./LocalDatastoreUtils":17,"./ParseQuery":33,"@babel/runtime-corejs3/core-js-stable/array/from":65,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/instance/concat":68,"@babel/runtime-corejs3/core-js-stable/instance/filter":71,"@babel/runtime-corejs3/core-js-stable/instance/find":73,"@babel/runtime-corejs3/core-js-stable/instance/includes":75,"@babel/runtime-corejs3/core-js-stable/instance/map":78,"@babel/runtime-corejs3/core-js-stable/instance/starts-with":84,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/keys":96,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/core-js-stable/set":101,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],14:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/json/stringify"))),i=s(e("@babel/runtime-corejs3/core-js-stable/instance/reduce")),o=s(e("@babel/runtime-corejs3/core-js-stable/promise")),l=s(e("@babel/runtime-corejs3/core-js-stable/instance/map")),u=e("./LocalDatastoreUtils"),c=s(e("./Storage"));r.default={async fromPinWithName(e){e=await c.default.getItemAsync(e);return e?JSON.parse(e):[]},pinWithName(e,t){t=(0,a.default)(t);return c.default.setItemAsync(e,t)},unPinWithName(e){return c.default.removeItemAsync(e)},async getAllContents(){var e=await c.default.getAllKeysAsync();return(0,i.default)(e).call(e,async(e,t)=>{const r=await e;if((0,u.isLocalDatastoreKey)(t)){e=await c.default.getItemAsync(t);try{r[t]=JSON.parse(e)}catch(e){console.error("Error getAllContents: ",e)}}return r},o.default.resolve({}))},async getRawStorage(){var e=await c.default.getAllKeysAsync();return(0,i.default)(e).call(e,async(e,t)=>{const r=await e;e=await c.default.getItemAsync(t);return r[t]=e,r},o.default.resolve({}))},async clear(){const e=[];for(const r of await c.default.getAllKeysAsync())(0,u.isLocalDatastoreKey)(r)&&e.push(r);var t=(0,l.default)(e).call(e,this.unPinWithName);return o.default.all(t)}}},{"./LocalDatastoreUtils":17,"./Storage":43,"@babel/runtime-corejs3/core-js-stable/instance/map":78,"@babel/runtime-corejs3/core-js-stable/instance/reduce":79,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],15:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),n=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("./LocalDatastoreController.react-native")),s(e("./LocalDatastoreController.default")).default);r.default=n},{"./LocalDatastoreController.default":14,"./LocalDatastoreController.react-native":16,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],16:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/json/stringify"))),i=s(e("@babel/runtime-corejs3/core-js-stable/instance/for-each")),o=s(e("@babel/runtime-corejs3/core-js-stable/instance/map")),l=e("./LocalDatastoreUtils"),u=s(e("./StorageController.react-native"));r.default={async fromPinWithName(e){e=await u.default.getItemAsync(e);return e?JSON.parse(e):[]},async pinWithName(e,t){try{var r=(0,a.default)(t);await u.default.setItemAsync(e,r)}catch(e){console.error(e.message)}},unPinWithName(e){return u.default.removeItemAsync(e)},async getAllContents(){var t=await u.default.getAllKeysAsync();const r=[];for(let e=0;e<t.length;e+=1){var n=t[e];(0,l.isLocalDatastoreKey)(n)&&r.push(n)}const s={};let e=[];try{e=await u.default.multiGet(r)}catch(e){return console.error("Error getAllContents: ",e),{}}return(0,i.default)(e).call(e,t=>{var[t,e]=t;try{s[t]=JSON.parse(e)}catch(e){s[t]=null}}),s},async getRawStorage(){var e=await u.default.getAllKeysAsync();const r={};var e=await u.default.multiGet(e);return(0,o.default)(e=e).call(e,e=>{var[e,t]=e;r[e]=t}),r},async clear(){var t=await u.default.getAllKeysAsync();const r=[];for(let e=0;e<t.length;e+=1){var n=t[e];(0,l.isLocalDatastoreKey)(n)&&r.push(n)}await u.default.multiRemove(r).catch(e=>console.error("Error clearing local datastore: ",e))}}},{"./LocalDatastoreUtils":17,"./StorageController.react-native":47,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/map":78,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],17:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.PIN_PREFIX=r.OBJECT_PREFIX=r.DEFAULT_PIN=void 0,r.isLocalDatastoreKey=function(e){return!(!e||e!==i&&!(0,a.default)(e).call(e,o)&&!(0,a.default)(e).call(e,l))},s(e("@babel/runtime-corejs3/core-js-stable/instance/starts-with")));const i=r.DEFAULT_PIN="_default",o=r.PIN_PREFIX="parsePin_",l=r.OBJECT_PREFIX="Parse_LDS_"},{"@babel/runtime-corejs3/core-js-stable/instance/starts-with":84,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],18:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),u=(n(r,"__esModule",{value:!0}),r.commitServerChanges=function(e,t,r){var n=l.default.getParseObject();for(const a in r){var s=r[a];!function(t,e,r){var n=e.split(".");for(let e=0;e<n.length-1;e++){var s,a=n[e];a in t||(s=n[e+1],isNaN(s)?t[a]={}:t[a]=[]),t=t[a]}void 0===r?delete t[n[n.length-1]]:t[n[n.length-1]]=r}(e,a,s),!s||"object"!=typeof s||s instanceof n||s instanceof f.default||s instanceof d.default||(s=(0,o.default)(s,!1,!0),t[a]=(0,i.default)(s))}},r.defaultState=function(){return{serverData:{},pendingOps:[{}],objectCache:{},tasks:new a.default,existed:!1}},r.estimateAttribute=function(e,t,r,n){let s=e[n];for(let e=0;e<t.length;e++)t[e][n]&&(t[e][n]instanceof p.RelationOp?r.id&&(s=t[e][n].applyTo(s,r,n)):s=t[e][n].applyTo(s));return s},r.estimateAttributes=function(e,r,t){const n={};for(var s in e)n[s]=e[s];for(let e=0;e<r.length;e++)for(s in r[e])if(r[e][s]instanceof p.RelationOp)t.id&&(n[s]=r[e][s].applyTo(n[s],t,s));else if((0,u.default)(s).call(s,".")){var a=s.split("."),i=a[a.length-1];let t=n;for(let e=0;e<a.length-1;e++){var o,l=a[e];l in t?(0,c.default)(t[l])?t[l]=[...t[l]]:t[l]={...t[l]}:(o=a[e+1],isNaN(o)?t[l]={}:t[l]=[]),t=t[l]}t[i]=r[e][s].applyTo(t[i])}else n[s]=r[e][s].applyTo(n[s]);return n},r.mergeFirstPendingState=function(e){const t=b(e),r=e[0];for(const s in t){var n;r[s]&&t[s]?(n=r[s].mergeWith(t[s]))&&(r[s]=n):r[s]=t[s]}},r.popPendingState=b,r.pushPendingState=function(e){e.push({})},r.setPendingOp=function(e,t,r){var n=e.length-1;r?e[n][t]=r:delete e[n][t]},r.setServerData=function(e,t){for(const r in t)void 0!==t[r]?e[r]=t[r]:delete e[r]},s(e("@babel/runtime-corejs3/core-js-stable/instance/includes"))),c=s(e("@babel/runtime-corejs3/core-js-stable/array/is-array")),i=s(e("@babel/runtime-corejs3/core-js-stable/json/stringify")),o=s(e("./encode")),l=s(e("./CoreManager")),f=s(e("./ParseFile")),d=s(e("./ParseRelation")),a=s(e("./TaskQueue")),p=e("./ParseOp");function b(e){var t=e.shift();return e.length||(e[0]={}),t}},{"./CoreManager":4,"./ParseFile":25,"./ParseOp":31,"./ParseRelation":34,"./TaskQueue":49,"./encode":56,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/instance/includes":75,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],19:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),B=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/array/is-array"))),W=s(e("@babel/runtime-corejs3/core-js-stable/instance/index-of")),K=s(e("@babel/runtime-corejs3/core-js-stable/instance/filter")),J=s(e("@babel/runtime-corejs3/core-js-stable/instance/slice")),c=s(e("@babel/runtime-corejs3/core-js-stable/number/is-integer")),z=s(e("@babel/runtime-corejs3/core-js-stable/instance/map")),a=s(e("@babel/runtime-corejs3/core-js-stable/instance/for-each")),i=s(e("@babel/runtime-corejs3/core-js-stable/object/keys")),Q=s(e("./equals")),V=s(e("./decode")),H=s(e("./ParseError")),$=s(e("./ParsePolygon")),G=s(e("./ParseGeoPoint"));function Y(e,t){if(!t||!t.__type||"Pointer"!==t.__type&&"Object"!==t.__type){if((0,B.default)(t))for(const n of t)if(Y(e,n))return 1;return-1<(0,W.default)(e).call(e,t)}for(const s in e){var r=e[s];if("string"==typeof r&&r===t.objectId)return 1;if(r.className===t.className&&r.objectId===t.objectId)return 1}}function X(e){return e._toFullJSON?e._toFullJSON():e}function Z(e,t,r,n){if(t.className!==e)return!1;let s=t,a=n;t.toJSON&&(s=t.toJSON()),n.toJSON&&(a=n.toJSON().where),s.className=e;for(const i in a)if(!function M(e,s,t,a,i){if(null===i)return!1;if(0<=(0,W.default)(a).call(a,".")){const c=a.split("."),f=c[0],d=(0,J.default)(c).call(c,1).join(".");return M(e,s[f]||{},t,d,i)}let r;if("$or"===a){for(r=0;r<i.length;r++)if(Z(e,s,t,i[r]))return!0;return!1}if("$and"===a){for(r=0;r<i.length;r++)if(!Z(e,s,t,i[r]))return!1;return!0}if("$nor"===a){for(r=0;r<i.length;r++)if(Z(e,s,t,i[r]))return!1;return!0}if("$relatedTo"===a)return!1;if(!/^[A-Za-z][0-9A-Za-z_]*$/.test(a))throw new H.default(H.default.INVALID_KEY_NAME,"Invalid Key: "+a);{var n;if("object"!=typeof i)return(0,B.default)(s[a])?-1<(0,W.default)(n=s[a]).call(n,i):s[a]===i}let o;if(i.__type)return"Pointer"===i.__type?ee(s[a],i,function(e,t){return void 0!==e&&t.className===e.className&&t.objectId===e.objectId}):ee((0,V.default)(s[a]),(0,V.default)(i),Q.default);for(const p in i){if((o=(o=i[p])?.__type?(0,V.default)(o):o)?.$relativeTime){const b=te(o.$relativeTime);if("success"!==b.status)throw new H.default(H.default.INVALID_JSON,`bad $relativeTime (${a}) value. `+b.info);o=b.result}switch(("[object Date]"===toString.call(o)||"string"==typeof o&&"Invalid Date"!==new Date(o).toString())&&(s[a]=new Date(s[a].iso||s[a])),p){case"$lt":if(s[a]>=o)return!1;break;case"$lte":if(s[a]>o)return!1;break;case"$gt":if(s[a]<=o)return!1;break;case"$gte":if(s[a]<o)return!1;break;case"$ne":if((0,Q.default)(s[a],o))return!1;break;case"$in":if(Y(o,s[a]))break;return!1;case"$nin":if(Y(o,s[a]))return!1;break;case"$all":for(r=0;r<o.length;r++){var l;if((0,W.default)(l=s[a]).call(l,o[r])<0)return!1}break;case"$exists":{const h=void 0!==s[a],y=i.$exists;if("boolean"!=typeof i.$exists)break;if(!h&&y||h&&!y)return!1;break}case"$regex":{if("object"==typeof o)return o.test(s[a]);let e="",t=-2,r=(0,W.default)(o).call(o,"\\Q");for(;-1<r;)e+=o.substring(t+2,r),-1<(t=(0,W.default)(o).call(o,"\\E",r))&&(e+=o.substring(r+2,t).replace(/\\\\\\\\E/g,"\\E").replace(/\W/g,"\\$&")),r=(0,W.default)(o).call(o,"\\Q",t);e+=o.substring(Math.max(r,t+2));let n=i.$options||"";n=n.replace("x","").replace("s","");const m=new RegExp(e,n);if(m.test(s[a]))break;return!1}case"$nearSphere":{if(!o||!s[a])return!1;const g=o.radiansTo(s[a]),j=i.$maxDistance||1/0;return g<=j}case"$within":{if(!o||!s[a])return!1;const v=o.$box[0],_=o.$box[1];return v.latitude>_.latitude||v.longitude>_.longitude?!1:s[a].latitude>v.latitude&&s[a].latitude<_.latitude&&s[a].longitude>v.longitude&&s[a].longitude<_.longitude}case"$options":case"$maxDistance":break;case"$select":{const w=(0,K.default)(t).call(t,(e,t,r)=>Z(o.query.className,e,r,o.query.where));for(let e=0;e<w.length;e+=1){const E=X(w[e]);return(0,Q.default)(s[a],E[o.key])}return!1}case"$dontSelect":{const S=(0,K.default)(t).call(t,(e,t,r)=>Z(o.query.className,e,r,o.query.where));for(let e=0;e<S.length;e+=1){const O=X(S[e]);return!(0,Q.default)(s[a],O[o.key])}return!1}case"$inQuery":{const C=(0,K.default)(t).call(t,(e,t,r)=>Z(o.className,e,r,o.where));for(let e=0;e<C.length;e+=1){const x=X(C[e]);if(s[a].className===x.className&&s[a].objectId===x.objectId)return!0}return!1}case"$notInQuery":{const P=(0,K.default)(t).call(t,(e,t,r)=>Z(o.className,e,r,o.where));for(let e=0;e<P.length;e+=1){const A=X(P[e]);if(s[a].className===A.className&&s[a].objectId===A.objectId)return!1}return!0}case"$containedBy":for(const R of s[a])if(!Y(o,R))return!1;return!0;case"$geoWithin":if(o.$polygon){var u;const I=(0,z.default)(u=o.$polygon).call(u,e=>[e.latitude,e.longitude]),N=new $.default(I);return N.containsPoint(s[a])}if(o.$centerSphere){const[T,k]=o.$centerSphere,D=new G.default({latitude:T[1],longitude:T[0]}),L=new G.default(s[a]),q=L.radiansTo(D);return q<=k}return!1;case"$geoIntersects":{const U=new $.default(s[a].coordinates),F=new G.default(o.$point);return U.containsPoint(F)}default:return!1}}return!0}(e,s,r,i,a[i]))return!1;return!0}function ee(t,r,n){if((0,B.default)(t)){for(let e=0;e<t.length;e++)if(n(t[e],r))return!0;return!1}return n(t,r)}function te(e,t){let r=1<arguments.length&&void 0!==t?t:new Date,n=(e=e.toLowerCase()).split(" ");var s,a,t="in"===(n=(0,K.default)(n).call(n,e=>""!==e))[0],i="ago"===n[n.length-1];if(!t&&!i&&"now"!==e)return{status:"error",info:"Time should either start with 'in' or end with 'ago'"};if(t&&i)return{status:"error",info:"Time cannot have both 'in' and 'ago'"};if((n=t?(0,J.default)(n).call(n,1):(0,J.default)(n).call(n,0,n.length-1)).length%2!=0&&"now"!==e)return{status:"error",info:"Invalid time string. Dangling unit or number."};const o=[];for(;n.length;)o.push([n.shift(),n.shift()]);let l=0;for([s,a]of o){var u=Number(s);if(!(0,c.default)(u))return{status:"error",info:`'${s}' is not an integer.`};switch(a){case"yr":case"yrs":case"year":case"years":l+=31536e3*u;break;case"wk":case"wks":case"week":case"weeks":l+=604800*u;break;case"d":case"day":case"days":l+=86400*u;break;case"hr":case"hrs":case"hour":case"hours":l+=3600*u;break;case"min":case"mins":case"minute":case"minutes":l+=60*u;break;case"sec":case"secs":case"second":case"seconds":l+=u;break;default:return{status:"error",info:`Invalid interval: '${a}'`}}}e=1e3*l;return t?{status:"success",info:"future",result:new Date(r.valueOf()+e)}:i?{status:"success",info:"past",result:new Date(r.valueOf()-e)}:{status:"success",info:"present",result:new Date(r.valueOf())}}r.default={matchesQuery:Z,validateQuery:function(e){let t=e;e.toJSON&&(t=e.toJSON().where);const r=["$and","$or","$nor","_rperm","_wperm","_perishable_token","_email_verify_token","_email_verify_token_expires_at","_account_lockout_expires_at","_failed_login_count"];(0,a.default)(e=(0,i.default)(t)).call(e,e=>{if(t&&t[e]&&t[e].$regex&&"string"==typeof t[e].$options&&!t[e].$options.match(/^[imxs]+$/))throw new H.default(H.default.INVALID_QUERY,"Bad $options value for query: "+t[e].$options);if((0,W.default)(r).call(r,e)<0&&!e.match(/^[a-zA-Z][a-zA-Z0-9_\.]*$/))throw new H.default(H.default.INVALID_KEY_NAME,"Invalid key name: "+e)})}}},{"./ParseError":24,"./ParseGeoPoint":26,"./ParsePolygon":32,"./decode":55,"./equals":57,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/instance/filter":71,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/instance/map":78,"@babel/runtime-corejs3/core-js-stable/instance/slice":80,"@babel/runtime-corejs3/core-js-stable/number/is-integer":88,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/keys":96,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],20:[function(Q,V,H){!function(z){!function(){"use strict";var n=Q("@babel/runtime-corejs3/core-js-stable/weak-map"),a=Q("@babel/runtime-corejs3/core-js-stable/object/define-property"),i=Q("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor"),e=Q("@babel/runtime-corejs3/helpers/interopRequireDefault"),t=(a(H,"__esModule",{value:!0}),H.default=void 0,e(Q("@babel/runtime-corejs3/core-js-stable/promise"))),r=e(Q("./decode")),s=e(Q("./encode")),o=e(Q("./CryptoController")),l=e(Q("./EventuallyQueue")),u=e(Q("./IndexedDBStorageController")),c=e(Q("./InstallationController")),f=k(Q("./ParseOp")),d=e(Q("./RESTController")),p=e(Q("./ParseACL")),b=k(Q("./Analytics")),h=e(Q("./AnonymousUtils")),y=k(Q("./Cloud")),m=e(Q("./ParseCLP")),g=e(Q("./CoreManager")),j=e(Q("./EventEmitter")),v=e(Q("./ParseConfig")),_=e(Q("./ParseError")),w=e(Q("./FacebookUtils")),E=e(Q("./ParseFile")),S=(k(Q("./ParseHooks")),e(Q("./ParseGeoPoint"))),O=e(Q("./ParsePolygon")),C=e(Q("./ParseInstallation")),x=e(Q("./LocalDatastore")),P=e(Q("./ParseObject")),A=k(Q("./Push")),R=e(Q("./ParseQuery")),I=e(Q("./ParseRelation")),N=e(Q("./ParseRole")),M=e(Q("./ParseSchema")),L=e(Q("./ParseSession")),q=e(Q("./Storage")),U=e(Q("./ParseUser")),F=e(Q("./ParseLiveQuery")),B=e(Q("./LiveQueryClient")),W=e(Q("./LocalDatastoreController")),K=e(Q("./StorageController")),J=e(Q("./WebSocketController"));function T(e){var t,r;return"function"!=typeof n?null:(t=new n,r=new n,(T=function(e){return e?r:t})(e))}function k(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};t=T(t);if(t&&t.has(e))return t.get(e);var r,n,s={__proto__:null};for(r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&((n=a&&i?i(e,r):null)&&(n.get||n.set)?a(s,r,n):s[r]=e[r]);return s.default=e,t&&t.set(e,s),s}const D={ACL:p.default,Analytics:b,AnonymousUtils:h.default,Cloud:y,CLP:m.default,CoreManager:g.default,Config:v.default,Error:_.default,FacebookUtils:w.default,File:E.default,GeoPoint:S.default,Polygon:O.default,Installation:C.default,LocalDatastore:x.default,Object:P.default,Op:{Set:f.SetOp,Unset:f.UnsetOp,Increment:f.IncrementOp,Add:f.AddOp,Remove:f.RemoveOp,AddUnique:f.AddUniqueOp,Relation:f.RelationOp},Push:A,Query:R.default,Relation:I.default,Role:N.default,Schema:M.default,Session:L.default,Storage:q.default,User:U.default,LiveQueryClient:B.default,IndexedDB:void 0,Hooks:void 0,Parse:void 0,set EventuallyQueue(e){g.default.setEventuallyQueue(e)},get EventuallyQueue(){return g.default.getEventuallyQueue()},initialize(e,t){g.default.get("IS_NODE")&&!z.env.SERVER_RENDERING&&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."),D._initialize(e,t)},_initialize(e,t,r,n){g.default.set("APPLICATION_ID",e),g.default.set("JAVASCRIPT_KEY",t),g.default.set("MAINTENANCE_KEY",n),g.default.set("MASTER_KEY",r),g.default.set("USE_MASTER_KEY",!1),g.default.setIfNeeded("EventEmitter",j.default),g.default.setIfNeeded("LiveQuery",new F.default),g.default.setIfNeeded("CryptoController",o.default),g.default.setIfNeeded("EventuallyQueue",l.default),g.default.setIfNeeded("InstallationController",c.default),g.default.setIfNeeded("LocalDatastoreController",W.default),g.default.setIfNeeded("StorageController",K.default),g.default.setIfNeeded("WebSocketController",J.default),D.IndexedDB=g.default.setIfNeeded("IndexedDBStorageController",u.default)},setAsyncStorage(e){g.default.setAsyncStorage(e)},setLocalDatastoreController(e){g.default.setLocalDatastoreController(e)},getServerHealth(){return g.default.getRESTController().request("GET","health")},set applicationId(e){g.default.set("APPLICATION_ID",e)},get applicationId(){return g.default.get("APPLICATION_ID")},set javaScriptKey(e){g.default.set("JAVASCRIPT_KEY",e)},get javaScriptKey(){return g.default.get("JAVASCRIPT_KEY")},set masterKey(e){g.default.set("MASTER_KEY",e)},get masterKey(){return g.default.get("MASTER_KEY")},set maintenanceKey(e){g.default.set("MAINTENANCE_KEY",e)},get maintenanceKey(){return g.default.get("MAINTENANCE_KEY")},set serverURL(e){g.default.set("SERVER_URL",e)},get serverURL(){return g.default.get("SERVER_URL")},set serverAuthToken(e){g.default.set("SERVER_AUTH_TOKEN",e)},get serverAuthToken(){return g.default.get("SERVER_AUTH_TOKEN")},set serverAuthType(e){g.default.set("SERVER_AUTH_TYPE",e)},get serverAuthType(){return g.default.get("SERVER_AUTH_TYPE")},set LiveQuery(e){g.default.setLiveQuery(e)},get LiveQuery(){return g.default.getLiveQuery()},set liveQueryServerURL(e){g.default.set("LIVEQUERY_SERVER_URL",e)},get liveQueryServerURL(){return g.default.get("LIVEQUERY_SERVER_URL")},set encryptedUser(e){g.default.set("ENCRYPTED_USER",e)},get encryptedUser(){return g.default.get("ENCRYPTED_USER")},set secret(e){g.default.set("ENCRYPTED_KEY",e)},get secret(){return g.default.get("ENCRYPTED_KEY")},set idempotency(e){g.default.set("IDEMPOTENCY",e)},get idempotency(){return g.default.get("IDEMPOTENCY")},set allowCustomObjectId(e){g.default.set("ALLOW_CUSTOM_OBJECT_ID",e)},get allowCustomObjectId(){return g.default.get("ALLOW_CUSTOM_OBJECT_ID")},_request(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.default.getRESTController().request.apply(null,t)},_ajax(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.default.getRESTController().ajax.apply(null,t)},_decode(e,t){return(0,r.default)(t)},_encode(e,t,r){return(0,s.default)(e,r)},_getInstallationId(){return g.default.getInstallationController().currentInstallationId()},enableLocalDatastore(e,t){this.applicationId?this.LocalDatastore.isEnabled||(this.LocalDatastore.isEnabled=!0,!e&&void 0!==e||g.default.getEventuallyQueue().poll(t||2e3)):console.log("'enableLocalDataStore' must be called after 'initialize'")},isLocalDatastoreEnabled(){return this.LocalDatastore.isEnabled},dumpLocalDatastore(){return this.LocalDatastore.isEnabled?D.LocalDatastore._getAllContents():(console.log("Parse.enableLocalDatastore() must be called first"),t.default.resolve({}))},enableEncryptedUser(){this.encryptedUser=!0},isEncryptedUserEnabled(){return this.encryptedUser}};g.default.setRESTController(d.default),D.Parse=D,V.exports=D;H.default=D}.call(this)}.call(this,Q("_process"))},{"./Analytics":1,"./AnonymousUtils":2,"./Cloud":3,"./CoreManager":4,"./CryptoController":5,"./EventEmitter":6,"./EventuallyQueue":7,"./FacebookUtils":8,"./IndexedDBStorageController":9,"./InstallationController":10,"./LiveQueryClient":11,"./LocalDatastore":13,"./LocalDatastoreController":15,"./ParseACL":21,"./ParseCLP":22,"./ParseConfig":23,"./ParseError":24,"./ParseFile":25,"./ParseGeoPoint":26,"./ParseHooks":27,"./ParseInstallation":28,"./ParseLiveQuery":29,"./ParseObject":30,"./ParseOp":31,"./ParsePolygon":32,"./ParseQuery":33,"./ParseRelation":34,"./ParseRole":35,"./ParseSchema":36,"./ParseSession":37,"./ParseUser":38,"./Push":39,"./RESTController":40,"./Storage":43,"./StorageController":46,"./WebSocketController":51,"./decode":55,"./encode":56,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":94,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/core-js-stable/weak-map":102,"@babel/runtime-corejs3/helpers/interopRequireDefault":104,_process:108}],21:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/object/keys"))),i=s(e("@babel/runtime-corejs3/helpers/defineProperty")),o=s(e("./CoreManager"));r.default=class l{constructor(e){if((0,i.default)(this,"permissionsById",void 0),this.permissionsById={},e&&"object"==typeof e)if(e instanceof o.default.getParseUser())this.setReadAccess(e,!0),this.setWriteAccess(e,!0);else for(const n in e){var t=e[n];this.permissionsById[n]={};for(const s in t){var r=t[s];if("read"!==s&&"write"!==s)throw new TypeError("Tried to create an ACL with an invalid permission type.");if("boolean"!=typeof r)throw new TypeError("Tried to create an ACL with an invalid permission value.");this.permissionsById[n][s]=r}}else if("function"==typeof e)throw new TypeError("ParseACL constructed with a function. Did you forget ()?")}toJSON(){const e={};for(const t in this.permissionsById)e[t]=this.permissionsById[t];return e}equals(e){if(!(e instanceof l))return!1;var t=(0,a.default)(this.permissionsById),r=(0,a.default)(e.permissionsById);if(t.length!==r.length)return!1;for(const n in this.permissionsById){if(!e.permissionsById[n])return!1;if(this.permissionsById[n].read!==e.permissionsById[n].read)return!1;if(this.permissionsById[n].write!==e.permissionsById[n].write)return!1}return!0}_setAccess(e,t,r){var n=o.default.getParseRole();if(t instanceof o.default.getParseUser())t=t.id;else if(t instanceof n){if(!(n=t.getName()))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.");let s=this.permissionsById[t];if(!s){if(!r)return;s={},this.permissionsById[t]=s}r?this.permissionsById[t][e]=!0:(delete s[e],0===(0,a.default)(s).length&&delete this.permissionsById[t])}_getAccess(e,t){var r=o.default.getParseRole();if(t instanceof o.default.getParseUser()){if(!(t=t.id))throw new Error("Cannot get access for a ParseUser without an ID")}else if(t instanceof r){if(!(r=t.getName()))throw new TypeError("Role must have a name");t="role:"+r}return!!(r=this.permissionsById[t])&&!!r[e]}setReadAccess(e,t){this._setAccess("read",e,t)}getReadAccess(e){return this._getAccess("read",e)}setWriteAccess(e,t){this._setAccess("write",e,t)}getWriteAccess(e){return this._getAccess("write",e)}setPublicReadAccess(e){this.setReadAccess("*",e)}getPublicReadAccess(){return this.getReadAccess("*")}setPublicWriteAccess(e){this.setWriteAccess("*",e)}getPublicWriteAccess(){return this.getWriteAccess("*")}getRoleReadAccess(e){if("string"!=typeof(e=e instanceof o.default.getParseRole()?e.getName():e))throw new TypeError("role must be a ParseRole or a String");return this.getReadAccess("role:"+e)}getRoleWriteAccess(e){if("string"!=typeof(e=e instanceof o.default.getParseRole()?e.getName():e))throw new TypeError("role must be a ParseRole or a String");return this.getWriteAccess("role:"+e)}setRoleReadAccess(e,t){if("string"!=typeof(e=e instanceof o.default.getParseRole()?e.getName():e))throw new TypeError("role must be a ParseRole or a String");this.setReadAccess("role:"+e,t)}setRoleWriteAccess(e,t){if("string"!=typeof(e=e instanceof o.default.getParseRole()?e.getName():e))throw new TypeError("role must be a ParseRole or a String");this.setWriteAccess("role:"+e,t)}}},{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/keys":96,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],22:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),p=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/helpers/defineProperty"))),n=s(e("@babel/runtime-corejs3/core-js-stable/map")),b=s(e("@babel/runtime-corejs3/core-js-stable/instance/entries")),h=s(e("@babel/runtime-corejs3/core-js-stable/object/assign")),y=s(e("@babel/runtime-corejs3/core-js-stable/instance/slice")),m=s(e("@babel/runtime-corejs3/core-js-stable/instance/includes")),g=s(e("@babel/runtime-corejs3/core-js-stable/instance/every")),o=s(e("@babel/runtime-corejs3/core-js-stable/object/keys")),a=s(e("@babel/runtime-corejs3/core-js-stable/array/is-array")),j=s(e("./ParseRole")),v=s(e("./ParseUser"));const _="*",w=new n.default,E=(w.set("get",{}),w.set("find",{}),w.set("count",{}),w.set("create",{}),w.set("update",{}),w.set("delete",{}),w.set("addField",{}),new n.default);E.set("protectedFields",{});r.default=class l{constructor(e){(0,p.default)(this,"permissionsMap",void 0),this.permissionsMap={};for(const[l,u]of(0,b.default)(w).call(w)){this.permissionsMap[l]=(0,h.default)({},u);const c=l.charAt(0).toUpperCase()+(0,y.default)(l).call(l,1);this[`get${c}RequiresAuthentication`]=function(){return this._getAccess(l,"requiresAuthentication")},this[`set${c}RequiresAuthentication`]=function(e){this._setAccess(l,"requiresAuthentication",e)},this[`get${c}PointerFields`]=function(){return this._getAccess(l,"pointerFields",!1)},this[`set${c}PointerFields`]=function(e){this._setArrayAccess(l,"pointerFields",e)},this[`get${c}Access`]=function(e){return this._getAccess(l,e)},this[`set${c}Access`]=function(e,t){this._setAccess(l,e,t)},this[`getPublic${c}Access`]=function(){return this[`get${c}Access`](_)},this[`setPublic${c}Access`]=function(e){this[`set${c}Access`](_,e)},this[`getRole${c}Access`]=function(e){return this[`get${c}Access`](this._getRoleName(e))},this[`setRole${c}Access`]=function(e,t){this[`set${c}Access`](this._getRoleName(e),t)}}for(var[t,r]of(0,b.default)(E).call(E))this.permissionsMap[t]=(0,h.default)({},r);if(e&&"object"==typeof e)if(e instanceof v.default)this.setReadAccess(e,!0),this.setWriteAccess(e,!0);else if(e instanceof j.default)this.setRoleReadAccess(e,!0),this.setRoleWriteAccess(e,!0);else for(const f in e){var n=e[f],s=!!w.get(f),a=!!E.get(f),i=(0,m.default)(i=["readUserFields","writeUserFields"]).call(i,f);if("string"!=typeof f||!(s||a||i))throw new TypeError("Tried to create an CLP with an invalid permission type.");if(i){if((0,g.default)(n).call(n,e=>"string"==typeof e)){this.permissionsMap[f]=n;continue}throw new TypeError("Tried to create an CLP with an invalid permission value.")}for(const d in n){var o=n[d];if("boolean"!=typeof o&&!a&&"pointerFields"!==d)throw new TypeError("Tried to create an CLP with an invalid permission value.");this.permissionsMap[f][d]=o}}else if("function"==typeof e)throw new TypeError("ParseCLP constructed with a function. Did you forget ()?")}toJSON(){return{...this.permissionsMap}}equals(e){if(!(e instanceof l))return!1;var t=(0,o.default)(this.permissionsMap),r=(0,o.default)(e.permissionsMap);if(t.length!==r.length)return!1;for(const a in this.permissionsMap){if(!e.permissionsMap[a])return!1;var n=(0,o.default)(this.permissionsMap[a]),s=(0,o.default)(e.permissionsMap[a]);if(n.length!==s.length)return!1;for(const i in this.permissionsMap[a]){if(!e.permissionsMap[a][i])return!1;if(this.permissionsMap[a][i]!==e.permissionsMap[a][i])return!1}}return!0}_getRoleName(e){let t=e;if("string"!=typeof(t=e instanceof j.default?e.getName():t))throw new TypeError("role must be a Parse.Role or a String");return"role:"+t}_parseEntity(e){let t=e;if(t instanceof v.default){if(!(t=t.id))throw new Error("Cannot get access for a Parse.User without an id.")}else t instanceof j.default&&(t=this._getRoleName(t));if("string"!=typeof t)throw new TypeError("userId must be a string.");return t}_setAccess(e,t,r){if(t=this._parseEntity(t),"boolean"!=typeof r)throw new TypeError("allowed must be either true or false.");if(!this.permissionsMap[e][t]){if(!r)return;this.permissionsMap[e][t]={}}r?this.permissionsMap[e][t]=!0:delete this.permissionsMap[e][t]}_getAccess(e,t){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],n=(t=this._parseEntity(t),this.permissionsMap[e][t]);return r?!!n&&!!this.permissionsMap[e][t]:n}_setArrayAccess(e,t,r){if(t=this._parseEntity(t),this.permissionsMap[e][t]||(this.permissionsMap[e][t]=[]),!r||(0,a.default)(r)&&0===r.length)delete this.permissionsMap[e][t];else{if(!(0,a.default)(r)||!(0,g.default)(r).call(r,e=>"string"==typeof e))throw new TypeError("fields must be an array of strings or undefined.");this.permissionsMap[e][t]=r}}_setGroupPointerPermission(e,t){if(this.permissionsMap[e]||(this.permissionsMap[e]=[]),!t||(0,a.default)(t)&&0===t.length)delete this.permissionsMap[e];else{if(!(0,a.default)(t)||!(0,g.default)(t).call(t,e=>"string"==typeof e))throw new TypeError(e+".pointerFields must be an array of strings or undefined.");this.permissionsMap[e]=t}}_getGroupPointerPermissions(e){return this.permissionsMap[e]||[]}setReadUserFields(e){this._setGroupPointerPermission("readUserFields",e)}getReadUserFields(){return this._getGroupPointerPermissions("readUserFields")||[]}setWriteUserFields(e){this._setGroupPointerPermission("writeUserFields",e)}getWriteUserFields(){return this._getGroupPointerPermissions("writeUserFields")||[]}setProtectedFields(e,t){this._setArrayAccess("protectedFields",e,t)}getProtectedFields(e){return this._getAccess("protectedFields",e,!1)}setReadAccess(e,t){this._setAccess("find",e,t),this._setAccess("get",e,t),this._setAccess("count",e,t)}getReadAccess(e){return this._getAccess("find",e)&&this._getAccess("get",e)&&this._getAccess("count",e)}setWriteAccess(e,t){this._setAccess("create",e,t),this._setAccess("update",e,t),this._setAccess("delete",e,t),this._setAccess("addField",e,t)}getWriteAccess(e){return this._getAccess("create",e)&&this._getAccess("update",e)&&this._getAccess("delete",e)&&this._getAccess("addField",e)}setPublicReadAccess(e){this.setReadAccess(_,e)}getPublicReadAccess(){return this.getReadAccess(_)}setPublicWriteAccess(e){this.setWriteAccess(_,e)}getPublicWriteAccess(){return this.getWriteAccess(_)}setPublicProtectedFields(e){this.setProtectedFields(_,e)}getPublicProtectedFields(){return this.getProtectedFields(_)}getRoleReadAccess(e){return this.getReadAccess(this._getRoleName(e))}getRoleWriteAccess(e){return this.getWriteAccess(this._getRoleName(e))}setRoleReadAccess(e,t){this.setReadAccess(this._getRoleName(e),t)}setRoleWriteAccess(e,t){this.setWriteAccess(this._getRoleName(e),t)}getRoleProtectedFields(e){return this.getProtectedFields(this._getRoleName(e))}setRoleProtectedFields(e,t){this.setProtectedFields(this._getRoleName(e),t)}}},{"./ParseRole":35,"./ParseUser":38,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/instance/entries":69,"@babel/runtime-corejs3/core-js-stable/instance/every":70,"@babel/runtime-corejs3/core-js-stable/instance/includes":75,"@babel/runtime-corejs3/core-js-stable/instance/slice":80,"@babel/runtime-corejs3/core-js-stable/map":87,"@babel/runtime-corejs3/core-js-stable/object/assign":89,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/keys":96,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],23:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/promise"))),i=s(e("@babel/runtime-corejs3/core-js-stable/json/stringify")),o=s(e("@babel/runtime-corejs3/helpers/defineProperty")),l=s(e("./CoreManager")),u=s(e("./decode")),c=s(e("./encode")),f=s(e("./escape")),d=s(e("./ParseError")),p=s(e("./Storage"));class b{constructor(){(0,o.default)(this,"attributes",void 0),(0,o.default)(this,"_escapedAttributes",void 0),this.attributes={},this._escapedAttributes={}}get(e){return this.attributes[e]}escape(e){var t=this._escapedAttributes[e];if(t)return t;const r=this.attributes[e];let n="";return null!=r&&(n=(0,f.default)(r.toString())),this._escapedAttributes[e]=n}static current(){const e=l.default.getConfigController();return e.current()}static get(e){const t=l.default.getConfigController();return t.get(e)}static save(e,t){const r=l.default.getConfigController();return r.save(e,t).then(()=>r.get({useMasterKey:!0}),e=>a.default.reject(e))}static _clearCache(){h=null}}let h=null;const y="currentConfig";function m(e){try{var t=JSON.parse(e);if(t&&"object"==typeof t)return(0,u.default)(t)}catch(e){return null}}l.default.setConfigController({current(){if(h)return h;const t=new b;var e=p.default.generatePath(y);return p.default.async()?p.default.getItemAsync(e).then(e=>{return e&&(e=m(e))&&(t.attributes=e,h=t),t}):((e=p.default.getItem(e))&&(e=m(e))&&(t.attributes=e,h=t),t)},get(e){const t=l.default.getRESTController();return t.request("GET","config",{},e).then(e=>{var t;if(!e||!e.params)return t=new d.default(d.default.INVALID_JSON,"Config JSON response invalid."),a.default.reject(t);const r=new b;r.attributes={};for(const n in e.params)r.attributes[n]=(0,u.default)(e.params[n]);return h=r,p.default.setItemAsync(p.default.generatePath(y),(0,i.default)(e.params)).then(()=>r)})},save(e,t){const r=l.default.getRESTController(),n={};for(const s in e)n[s]=(0,c.default)(e[s]);return r.request("PUT","config",{params:n,masterKeyOnly:t},{useMasterKey:!0}).then(e=>{return e&&e.result?a.default.resolve():(e=new d.default(d.default.INTERNAL_SERVER_ERROR,"Error occured updating Config."),a.default.reject(e))})}}),r.default=b},{"./CoreManager":4,"./ParseError":24,"./Storage":43,"./decode":55,"./encode":56,"./escape":58,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],24:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/instance/for-each"))),i=s(e("@babel/runtime-corejs3/core-js-stable/object/define-property")),o=s(e("@babel/runtime-corejs3/helpers/defineProperty")),l=s(e("./CoreManager"));class u extends Error{constructor(t,e){super(e),(0,o.default)(this,"code",void 0),(0,o.default)(this,"message",void 0),(0,o.default)(this,"object",void 0),(0,o.default)(this,"errors",void 0),this.code=t;let r=e;(0,a.default)(e=l.default.get("PARSE_ERRORS")).call(e,e=>{e.code===t&&e.code&&(r=e.message)}),(0,i.default)(this,"message",{enumerable:!0,value:r})}toString(){return"ParseError: "+this.code+" "+this.message}}(0,o.default)(u,"OTHER_CAUSE",-1),(0,o.default)(u,"INTERNAL_SERVER_ERROR",1),(0,o.default)(u,"CONNECTION_FAILED",100),(0,o.default)(u,"OBJECT_NOT_FOUND",101),(0,o.default)(u,"INVALID_QUERY",102),(0,o.default)(u,"INVALID_CLASS_NAME",103),(0,o.default)(u,"MISSING_OBJECT_ID",104),(0,o.default)(u,"INVALID_KEY_NAME",105),(0,o.default)(u,"INVALID_POINTER",106),(0,o.default)(u,"INVALID_JSON",107),(0,o.default)(u,"COMMAND_UNAVAILABLE",108),(0,o.default)(u,"NOT_INITIALIZED",109),(0,o.default)(u,"INCORRECT_TYPE",111),(0,o.default)(u,"INVALID_CHANNEL_NAME",112),(0,o.default)(u,"PUSH_MISCONFIGURED",115),(0,o.default)(u,"OBJECT_TOO_LARGE",116),(0,o.default)(u,"OPERATION_FORBIDDEN",119),(0,o.default)(u,"CACHE_MISS",120),(0,o.default)(u,"INVALID_NESTED_KEY",121),(0,o.default)(u,"INVALID_FILE_NAME",122),(0,o.default)(u,"INVALID_ACL",123),(0,o.default)(u,"TIMEOUT",124),(0,o.default)(u,"INVALID_EMAIL_ADDRESS",125),(0,o.default)(u,"MISSING_CONTENT_TYPE",126),(0,o.default)(u,"MISSING_CONTENT_LENGTH",127),(0,o.default)(u,"INVALID_CONTENT_LENGTH",128),(0,o.default)(u,"FILE_TOO_LARGE",129),(0,o.default)(u,"FILE_SAVE_ERROR",130),(0,o.default)(u,"DUPLICATE_VALUE",137),(0,o.default)(u,"INVALID_ROLE_NAME",139),(0,o.default)(u,"EXCEEDED_QUOTA",140),(0,o.default)(u,"SCRIPT_FAILED",141),(0,o.default)(u,"VALIDATION_ERROR",142),(0,o.default)(u,"INVALID_IMAGE_DATA",143),(0,o.default)(u,"UNSAVED_FILE_ERROR",151),(0,o.default)(u,"INVALID_PUSH_TIME_ERROR",152),(0,o.default)(u,"FILE_DELETE_ERROR",153),(0,o.default)(u,"FILE_DELETE_UNNAMED_ERROR",161),(0,o.default)(u,"REQUEST_LIMIT_EXCEEDED",155),(0,o.default)(u,"DUPLICATE_REQUEST",159),(0,o.default)(u,"INVALID_EVENT_NAME",160),(0,o.default)(u,"INVALID_VALUE",162),(0,o.default)(u,"USERNAME_MISSING",200),(0,o.default)(u,"PASSWORD_MISSING",201),(0,o.default)(u,"USERNAME_TAKEN",202),(0,o.default)(u,"EMAIL_TAKEN",203),(0,o.default)(u,"EMAIL_MISSING",204),(0,o.default)(u,"EMAIL_NOT_FOUND",205),(0,o.default)(u,"SESSION_MISSING",206),(0,o.default)(u,"MUST_CREATE_USER_THROUGH_SIGNUP",207),(0,o.default)(u,"ACCOUNT_ALREADY_LINKED",208),(0,o.default)(u,"INVALID_SESSION_TOKEN",209),(0,o.default)(u,"MFA_ERROR",210),(0,o.default)(u,"MFA_TOKEN_REQUIRED",211),(0,o.default)(u,"LINKED_ID_MISSING",250),(0,o.default)(u,"INVALID_LINKED_SESSION",251),(0,o.default)(u,"UNSUPPORTED_SERVICE",252),(0,o.default)(u,"INVALID_SCHEMA_OPERATION",255),(0,o.default)(u,"AGGREGATE_ERROR",600),(0,o.default)(u,"FILE_READ_ERROR",601),(0,o.default)(u,"X_DOMAIN_REQUEST",602);r.default=u},{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],25:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/array/is-array"))),i=s(e("@babel/runtime-corejs3/core-js-stable/instance/slice")),o=s(e("@babel/runtime-corejs3/core-js-stable/instance/for-each")),l=s(e("@babel/runtime-corejs3/core-js-stable/object/keys")),u=s(e("@babel/runtime-corejs3/core-js-stable/promise")),c=(s(e("@babel/runtime-corejs3/core-js-stable/instance/index-of")),s(e("@babel/runtime-corejs3/helpers/defineProperty"))),f=s(e("./CoreManager")),d=s(e("./ParseError"));s(e("./Xhr.weapp"));let p=null;function b(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.")}"undefined"!=typeof XMLHttpRequest&&(p=XMLHttpRequest);class h{constructor(e,t,r,n,s){(0,c.default)(this,"_name",void 0),(0,c.default)(this,"_url",void 0),(0,c.default)(this,"_source",void 0),(0,c.default)(this,"_previousSave",void 0),(0,c.default)(this,"_data",void 0),(0,c.default)(this,"_requestTask",void 0),(0,c.default)(this,"_metadata",void 0),(0,c.default)(this,"_tags",void 0);r=r||"";if(this._name=e,this._metadata=n||{},this._tags=s||{},void 0!==t)if((0,a.default)(t)||t instanceof Uint8Array)this._data=h.encodeBase64(t),this._source={format:"base64",base64:this._data,type:r};else if("undefined"!=typeof Blob&&t instanceof Blob)this._source={format:"file",file:t,type:r};else if(t&&"string"==typeof t.uri&&void 0!==t.uri)this._source={format:"uri",uri:t.uri,type:r};else{if(!t||"string"!=typeof t.base64)throw new TypeError("Cannot create a Parse.File with that data.");n=(0,i.default)(e=t.base64.split(",")).call(e,-1)[0],r=r||(0,i.default)(e=(0,i.default)(s=t.base64.split(";")).call(s,0,1)[0].split(":")).call(e,1,2)[0]||"text/plain";this._data=n,this._source={format:"base64",base64:n,type:r}}}async getData(){if(!this._data){if(!this._url)throw new Error("Cannot retrieve data for unsaved ParseFile.");const t=f.default.getFileController();var e=await t.download(this._url,{requestTask:e=>this._requestTask=e});this._data=e.base64}return this._data}name(){return this._name}url(e){if(e=e||{},this._url)return e.forceSecure?this._url.replace(/^http:\/\//i,"https://"):this._url}metadata(){return this._metadata}tags(){return this._tags}save(r){(r=r||{}).requestTask=e=>this._requestTask=e,r.metadata=this._metadata,r.tags=this._tags;const n=f.default.getFileController();if(this._previousSave||("file"===this._source.format?this._previousSave=n.saveFile(this._name,this._source,r).then(e=>(this._name=e.name,this._url=e.url,this._data=null,this._requestTask=null,this)):"uri"===this._source.format?this._previousSave=n.download(this._source.uri,r).then(e=>{var t;return e&&e.base64?(t={format:"base64",base64:e.base64,type:e.contentType},this._data=e.base64,this._requestTask=null,n.saveBase64(this._name,t,r)):{}}).then(e=>(this._name=e.name,this._url=e.url,this._requestTask=null,this)):this._previousSave=n.saveBase64(this._name,this._source,r).then(e=>(this._name=e.name,this._url=e.url,this._requestTask=null,this))),this._previousSave)return this._previousSave}cancel(){this._requestTask&&"function"==typeof this._requestTask.abort&&(this._requestTask._aborted=!0,this._requestTask.abort()),this._requestTask=null}destroy(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(!this._name)throw new d.default(d.default.FILE_DELETE_UNNAMED_ERROR,"Cannot delete an unnamed file.");const t={useMasterKey:!0},r=(Object.hasOwn(e,"useMasterKey")&&(t.useMasterKey=!!e.useMasterKey),f.default.getFileController());return r.deleteFile(this._name,t).then(()=>(this._data=void 0,this._requestTask=null,this))}toJSON(){return{__type:"File",name:this._name,url:this._url}}equals(e){return this===e||e instanceof h&&this.name()===e.name()&&this.url()===e.url()&&void 0!==this.url()}setMetadata(t){var e;t&&"object"==typeof t&&(0,o.default)(e=(0,l.default)(t)).call(e,e=>{this.addMetadata(e,t[e])})}addMetadata(e,t){"string"==typeof e&&(this._metadata[e]=t)}setTags(t){var e;t&&"object"==typeof t&&(0,o.default)(e=(0,l.default)(t)).call(e,e=>{this.addTag(e,t[e])})}addTag(e,t){"string"==typeof e&&(this._tags[e]=t)}static fromJSON(e){if("File"!==e.__type)throw new TypeError("JSON object does not represent a ParseFile");const t=new h(e.name);return t._url=e.url,t}static encodeBase64(t){const r=[];r.length=Math.ceil(t.length/3);for(let e=0;e<r.length;e++){var n=t[3*e],s=t[3*e+1]||0,a=t[3*e+2]||0,i=3*e+1<t.length,o=3*e+2<t.length;r[e]=[b(n>>2&63),b(n<<4&48|s>>4&15),i?b(s<<2&60|a>>6&3):"=",o?b(63&a):"="].join("")}return r.join("")}}const y={saveFile:async function(e,n,t){if("file"!==n.format)throw new Error("saveFile can only be used with File-type sources.");const r=await new u.default((e,t)=>{const r=new FileReader;r.onload=()=>e(r.result),r.onerror=e=>t(e),r.readAsDataURL(n.file)});var[s,a]=r.split(","),a={format:"base64",base64:a||s,type:n.type||(n.file?n.file.type:void 0)};return y.saveBase64(e,a,t)},saveBase64:function(e,t){let r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if("base64"!==t.format)throw new Error("saveBase64 can only be used with Base64-type sources.");const n={base64:t.base64,fileData:{metadata:{...r.metadata},tags:{...r.tags}}};return delete r.metadata,delete r.tags,t.type&&(n._ContentType=t.type),f.default.getRESTController().request("POST","files/"+e,n,r)},download:function(e,t){return p?this.downloadAjax(e,t):u.default.reject("Cannot make a request: No definition of XMLHttpRequest was found.")},downloadAjax:function(e,s){return new u.default((t,r)=>{const n=new p;n.open("GET",e,!0),n.responseType="arraybuffer",n.onerror=function(e){r(e)},n.onreadystatechange=function(){var e;if(n.readyState===n.DONE)return this.response?(e=new Uint8Array(this.response),void t({base64:h.encodeBase64(e),contentType:n.getResponseHeader("content-type")})):t({})},s.requestTask(n),n.send()})},deleteFile:function(e,t){const r={"X-Parse-Application-ID":f.default.get("APPLICATION_ID")};t.useMasterKey&&(r["X-Parse-Master-Key"]=f.default.get("MASTER_KEY"));let n=f.default.get("SERVER_URL");return"/"!==n[n.length-1]&&(n+="/"),n+="files/"+e,f.default.getRESTController().ajax("DELETE",n,"",r).catch(e=>e&&"SyntaxError: Unexpected end of JSON input"!==e?f.default.getRESTController().handleError(e):u.default.resolve())},_setXHR(e){p=e},_getXHR(){return p}};f.default.setFileController(y);r.default=h;r.b64Digit=b},{"./CoreManager":4,"./ParseError":24,"./Xhr.weapp":52,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/instance/slice":80,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/keys":96,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],26:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/array/is-array"))),i=s(e("@babel/runtime-corejs3/core-js-stable/promise")),o=s(e("@babel/runtime-corejs3/helpers/defineProperty"));class l{constructor(e,t){(0,o.default)(this,"_latitude",void 0),(0,o.default)(this,"_longitude",void 0),(0,a.default)(e)?(l._validate(e[0],e[1]),this._latitude=e[0],this._longitude=e[1]):"object"==typeof e?(l._validate(e.latitude,e.longitude),this._latitude=e.latitude,this._longitude=e.longitude):void 0!==e&&void 0!==t?(l._validate(e,t),this._latitude=e,this._longitude=t):(this._latitude=0,this._longitude=0)}get latitude(){return this._latitude}set latitude(e){l._validate(e,this.longitude),this._latitude=e}get longitude(){return this._longitude}set longitude(e){l._validate(this.latitude,e),this._longitude=e}toJSON(){return l._validate(this._latitude,this._longitude),{__type:"GeoPoint",latitude:this._latitude,longitude:this._longitude}}equals(e){return e instanceof l&&this.latitude===e.latitude&&this.longitude===e.longitude}radiansTo(e){var t=Math.PI/180,r=this.latitude*t,n=this.longitude*t,s=e.latitude*t,e=e.longitude*t,t=Math.sin((r-s)/2),n=Math.sin((n-e)/2),e=t*t+Math.cos(r)*Math.cos(s)*n*n,e=Math.min(1,e);return 2*Math.asin(Math.sqrt(e))}kilometersTo(e){return 6371*this.radiansTo(e)}milesTo(e){return 3958.8*this.radiansTo(e)}static _validate(e,t){if(isNaN(e)||isNaN(t)||"number"!=typeof e||"number"!=typeof t)throw new TypeError("GeoPoint latitude and longitude must be valid numbers");if(e<-90)throw new TypeError("GeoPoint latitude out of bounds: "+e+" < -90.0.");if(90<e)throw new TypeError("GeoPoint latitude out of bounds: "+e+" > 90.0.");if(t<-180)throw new TypeError("GeoPoint longitude out of bounds: "+t+" < -180.0.");if(180<t)throw new TypeError("GeoPoint longitude out of bounds: "+t+" > 180.0.")}static current(r){return new i.default((t,e)=>{navigator.geolocation.getCurrentPosition(e=>{t(new l(e.coords.latitude,e.coords.longitude))},e,r)})}}r.default=l},{"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],27:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.create=u,r.createFunction=function(e,t){return u({functionName:e,url:t})},r.createTrigger=function(e,t,r){return u({className:e,triggerName:t,url:r})},r.getFunction=function(e){return i.default.getHooksController().get("functions",e)},r.getFunctions=function(){return i.default.getHooksController().get("functions")},r.getTrigger=function(e,t){return i.default.getHooksController().get("triggers",e,t)},r.getTriggers=function(){return i.default.getHooksController().get("triggers")},r.remove=f,r.removeFunction=function(e){return f({functionName:e})},r.removeTrigger=function(e,t){return f({className:e,triggerName:t})},r.update=c,r.updateFunction=function(e,t){return c({functionName:e,url:t})},r.updateTrigger=function(e,t,r){return c({className:e,triggerName:t,url:r})},s(e("@babel/runtime-corejs3/core-js-stable/promise"))),i=s(e("./CoreManager")),o=s(e("./decode")),l=s(e("./ParseError"));function u(e){return i.default.getHooksController().create(e)}function c(e){return i.default.getHooksController().update(e)}function f(e){return i.default.getHooksController().remove(e)}i.default.setHooksController({get(e,t,r){let n="hooks/"+e;return t&&(n+="/"+t,r&&(n+="/"+r)),this.sendRequest("GET",n)},create(e){let t;if(e.functionName&&e.url)t="hooks/functions";else{if(!(e.className&&e.triggerName&&e.url))return a.default.reject({error:"invalid hook declaration",code:143});t="hooks/triggers"}return this.sendRequest("POST",t,e)},remove(e){let t;if(e.functionName)t="hooks/functions/"+e.functionName,delete e.functionName;else{if(!e.className||!e.triggerName)return a.default.reject({error:"invalid hook declaration",code:143});t="hooks/triggers/"+e.className+"/"+e.triggerName,delete e.className,delete e.triggerName}return this.sendRequest("PUT",t,{__op:"Delete"})},update(e){let t;if(e.functionName&&e.url)t="hooks/functions/"+e.functionName,delete e.functionName;else{if(!(e.className&&e.triggerName&&e.url))return a.default.reject({error:"invalid hook declaration",code:143});t="hooks/triggers/"+e.className+"/"+e.triggerName,delete e.className,delete e.triggerName}return this.sendRequest("PUT",t,e)},sendRequest(e,t,r){return i.default.getRESTController().request(e,t,r,{useMasterKey:!0}).then(e=>{e=(0,o.default)(e);return e?a.default.resolve(e):a.default.reject(new l.default(l.default.INVALID_JSON,"The server returned an invalid response."))})}})},{"./CoreManager":4,"./ParseError":24,"./decode":55,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],28:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/object/entries"))),i=s(e("./CoreManager")),o=s(e("./ParseError")),n=s(e("./ParseObject"));const l={IOS:"ios",MACOS:"macos",TVOS:"tvos",FCM:"fcm",ANDROID:"android",WEB:"web"};class u extends n.default{constructor(e){if(super("_Installation"),e&&"object"==typeof e)try{this.set(e||{})}catch(e){throw new Error("Can't create an invalid Installation")}}get appIdentifier(){return this.get("appIdentifier")}get appVersion(){return this.get("appVersion")}get appName(){return this.get("appName")}get badge(){return this.get("badge")}get channels(){return this.get("channels")}get deviceToken(){return this.get("deviceToken")}get deviceType(){return this.get("deviceType")}get GCMSenderId(){return this.get("GCMSenderId")}get installationId(){return this.get("installationId")}get localeIdentifier(){return this.get("localeIdentifier")}get parseVersion(){return this.get("parseVersion")}get pushType(){return this.get("pushType")}get timeZone(){return this.get("timeZone")}static get DEVICE_TYPES(){return l}async fetch(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];try{await super.fetch.apply(this,t)}catch(e){if(e.code!==o.default.OBJECT_NOT_FOUND)throw e;delete this.id,this._getId(),this._markAllFieldsDirty(),await super.save.apply(this,t)}return await i.default.getInstallationController().updateInstallationOnDisk(this),this}async save(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];try{await super.save.apply(this,t)}catch(e){if(e.code!==o.default.OBJECT_NOT_FOUND)throw e;delete this.id,this._getId(),this._markAllFieldsDirty(),await super.save.apply(this,t)}return await i.default.getInstallationController().updateInstallationOnDisk(this),this}_markAllFieldsDirty(){for(var[e,t]of(0,a.default)(this.attributes))this.set(e,t)}static currentInstallation(){return i.default.getInstallationController().currentInstallation()}}n.default.registerSubclass("_Installation",u);r.default=u},{"./CoreManager":4,"./ParseError":24,"./ParseObject":30,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/entries":92,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],29:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),u=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/promise"))),c=s(e("@babel/runtime-corejs3/core-js-stable/instance/index-of")),a=s(e("@babel/runtime-corejs3/helpers/defineProperty")),f=s(e("./LiveQueryClient")),d=s(e("./CoreManager"));function i(){return d.default.getLiveQueryController().getDefaultLiveQueryClient()}r.default=class{constructor(){var s=this;(0,a.default)(this,"emitter",void 0),(0,a.default)(this,"on",void 0),(0,a.default)(this,"emit",void 0);const e=d.default.getEventEmitter();this.emitter=new e,this.on=(e,t)=>this.emitter.on(e,t),this.emit=function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return s.emitter.emit(e,...r)},this.on("error",()=>{})}async open(){const e=await i();e.open()}async close(){const e=await i();e.close()}};let p;d.default.setLiveQueryController({setDefaultLiveQueryClient(e){p=e},async getDefaultLiveQueryClient(){if(!p){const[a,i]=await u.default.all([d.default.getUserController().currentUserAsync(),d.default.getInstallationController().currentInstallationId()]);var t=a?a.getSessionToken():void 0;let e=d.default.get("LIVEQUERY_SERVER_URL");if(e&&0!==(0,c.default)(e).call(e,"ws"))throw new Error("You need to set a proper Parse LiveQuery server url before using LiveQueryClient");if(!e){const l=d.default.get("SERVER_URL");var r=0===(0,c.default)(l).call(l,"https")?"wss://":"ws://",n=l.replace(/^https?:\/\//,"");e=r+n,d.default.set("LIVEQUERY_SERVER_URL",e)}var r=d.default.get("APPLICATION_ID"),n=d.default.get("JAVASCRIPT_KEY"),s=d.default.get("MASTER_KEY");p=new f.default({applicationId:r,serverURL:e,javascriptKey:n,masterKey:s,sessionToken:t,installationId:i});const o=d.default.getLiveQuery();p.on("error",e=>{o.emit("error",e)}),p.on("open",()=>{o.emit("open")}),p.on("close",()=>{o.emit("close")})}return p},_clearCachedDefaultClient(){p=null}})},{"./CoreManager":4,"./LiveQueryClient":11,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],30:[function(e,M,t){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/weak-map"),a=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),i=e("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor"),r=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),o=(a(t,"__esModule",{value:!0}),t.default=void 0,r(e("@babel/runtime-corejs3/helpers/defineProperty"))),y=r(e("@babel/runtime-corejs3/core-js-stable/instance/index-of")),L=r(e("@babel/runtime-corejs3/core-js-stable/object/freeze")),s=r(e("@babel/runtime-corejs3/core-js-stable/object/keys")),b=r(e("@babel/runtime-corejs3/core-js-stable/instance/for-each")),q=r(e("@babel/runtime-corejs3/core-js-stable/json/stringify")),U=r(e("@babel/runtime-corejs3/core-js-stable/instance/includes")),F=r(e("@babel/runtime-corejs3/core-js-stable/object/get-prototype-of")),m=r(e("@babel/runtime-corejs3/core-js-stable/instance/concat")),h=r(e("@babel/runtime-corejs3/core-js-stable/instance/some")),g=r(e("@babel/runtime-corejs3/core-js-stable/promise")),j=r(e("@babel/runtime-corejs3/core-js-stable/array/is-array")),B=r(e("@babel/runtime-corejs3/core-js-stable/object/create")),l=r(e("@babel/runtime-corejs3/core-js-stable/object/define-property")),W=r(e("@babel/runtime-corejs3/core-js-stable/instance/find")),v=r(e("@babel/runtime-corejs3/core-js-stable/instance/map")),_=r(e("./CoreManager")),w=r(e("./canBeSerialized")),u=r(e("./decode")),c=r(e("./encode")),K=r(e("./escape")),E=r(e("./ParseACL")),f=r(e("./parseDate")),S=r(e("./ParseError")),O=r(e("./ParseFile")),C=e("./promiseUtils"),d=e("./LocalDatastoreUtils"),J=r(e("./uuid")),x=e("./ParseOp"),P=r(e("./ParseRelation")),p=N(e("./SingleInstanceStateController")),z=r(e("./unique")),A=N(e("./UniqueInstanceStateController")),R=r(e("./unsavedChildren"));function I(e){var t,r;return"function"!=typeof n?null:(t=new n,r=new n,(I=function(e){return e?r:t})(e))}function N(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};t=I(t);if(t&&t.has(e))return t.get(e);var r,n,s={__proto__:null};for(r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&((n=a&&i?i(e,r):null)&&(n.get||n.set)?a(s,r,n):s[r]=e[r]);return s.default=e,t&&t.set(e,s),s}const T={};let Q=0,k=!_.default.get("IS_NODE");function V(){let e=_.default.get("SERVER_URL");"/"!==e[e.length-1]&&(e+="/");const t=e.replace(/https?:\/\//,"");return t.substr((0,y.default)(t).call(t,"/"))}k?_.default.setObjectStateController(p):_.default.setObjectStateController(A);class D{constructor(e,t,r){(0,o.default)(this,"id",void 0),(0,o.default)(this,"_localId",void 0),(0,o.default)(this,"_objCount",void 0),(0,o.default)(this,"className",void 0),"function"==typeof this.initialize&&this.initialize.apply(this,arguments);let n=null;if(this._objCount=Q++,"string"==typeof e)this.className=e,t&&"object"==typeof t&&(n=t);else if(e&&"object"==typeof e){this.className=e.className,n={};for(const s in e)"className"!==s&&(n[s]=e[s]);t&&"object"==typeof t&&(r=t)}if(n)try{this.set(n,r)}catch(e){throw new Error("Can't create an invalid Parse Object")}}get attributes(){const e=_.default.getObjectStateController();return(0,L.default)(e.estimateAttributes(this._getStateIdentifier()))}get createdAt(){return this._getServerData().createdAt}get updatedAt(){return this._getServerData().updatedAt}_getId(){var e;return"string"==typeof this.id?this.id:"string"==typeof this._localId?this._localId:(e="local"+(0,J.default)(),this._localId=e)}_getStateIdentifier(){if(k){let e=this.id;return{id:e=e||this._getId(),className:this.className}}return this}_getServerData(){const e=_.default.getObjectStateController();return e.getServerData(this._getStateIdentifier())}_clearServerData(){const e={};for(const r in this._getServerData())e[r]=void 0;const t=_.default.getObjectStateController();t.setServerData(this._getStateIdentifier(),e)}_getPendingOps(){const e=_.default.getObjectStateController();return e.getPendingOps(this._getStateIdentifier())}_clearPendingOps(e){var t=this._getPendingOps();const r=t[t.length-1];t=e||(0,s.default)(r);(0,b.default)(t).call(t,e=>{delete r[e]})}_getDirtyObjectAttributes(){var e=this.attributes;const t=_.default.getObjectStateController();var r=t.getObjectCache(this._getStateIdentifier());const n={};for(const o in e){var s=e[o];if(s&&"object"==typeof s&&!(s instanceof D)&&!(s instanceof O.default)&&!(s instanceof P.default))try{var a=(0,c.default)(s,!1,!0),i=(0,q.default)(a);r[o]!==i&&(n[o]=s)}catch(e){n[o]=s}}return n}_toFullJSON(e,t){const r=this.toJSON(e,t);return r.__type="Object",r.className=this.className,r}_getSaveJSON(){const r=this._getPendingOps();var n,e=this._getDirtyObjectAttributes();const s={};for(n in e){let t=!1;for(let e=0;e<r.length;e+=1)for(const a in r[e])if((0,U.default)(a).call(a,"."))if(a.split(".")[0]===n){t=!0;break}t||(s[n]=new x.SetOp(e[n]).toJSON())}for(n in r[0])s[n]=r[0][n].toJSON();return s}_getSaveParams(){let e=this.id?"PUT":"POST";const t=this._getSaveJSON();let r="classes/"+this.className;return _.default.get("ALLOW_CUSTOM_OBJECT_ID")?this.createdAt?(e="PUT",r+="/"+this.id):(e="POST",t.objectId=this.id):this.id?r+="/"+this.id:"_User"===this.className&&(r="users"),{method:e,body:t,path:r}}_finishFetch(e){!this.id&&e.objectId&&(this.id=e.objectId);const t=_.default.getObjectStateController(),r=(t.initializeState(this._getStateIdentifier()),{});for(const n in e)"ACL"===n?r[n]=new E.default(e[n]):"objectId"!==n&&(r[n]=(0,u.default)(e[n]),r[n]instanceof P.default&&r[n]._ensureParentAndKey(this,n));r.createdAt&&"string"==typeof r.createdAt&&(r.createdAt=(0,f.default)(r.createdAt)),r.updatedAt&&"string"==typeof r.updatedAt&&(r.updatedAt=(0,f.default)(r.updatedAt)),!r.updatedAt&&r.createdAt&&(r.updatedAt=r.createdAt),t.commitServerChanges(this._getStateIdentifier(),r)}_setExisted(e){const t=_.default.getObjectStateController(),r=t.getState(this._getStateIdentifier());r&&(r.existed=e)}_migrateId(e){if(this._localId&&e)if(k){const r=_.default.getObjectStateController();var t=r.removeState(this._getStateIdentifier());this.id=e,delete this._localId,t&&r.initializeState(this._getStateIdentifier(),t)}else this.id=e,delete this._localId}_handleSaveResponse(e,t){const r={},n=_.default.getObjectStateController(),s=n.popPendingState(this._getStateIdentifier());for(var a in s)s[a]instanceof x.RelationOp?r[a]=s[a].applyTo(void 0,this,a):a in e||(r[a]=s[a].applyTo(void 0));for(a in e){var i;"createdAt"!==a&&"updatedAt"!==a||"string"!=typeof e[a]?"ACL"===a?r[a]=new E.default(e[a]):"objectId"!==a&&((i=(0,u.default)(e[a]))&&(0,F.default)(i)===Object.prototype?r[a]={...this.attributes[a],...i}:r[a]=i,r[a]instanceof x.UnsetOp&&(r[a]=void 0)):r[a]=(0,f.default)(e[a])}r.createdAt&&!r.updatedAt&&(r.updatedAt=r.createdAt),this._migrateId(e.objectId),201!==t&&this._setExisted(!0),n.commitServerChanges(this._getStateIdentifier(),r)}_handleSaveError(){const e=_.default.getObjectStateController();e.mergeFirstPendingState(this._getStateIdentifier())}static _getClassMap(){return T}static _getRequestOptions(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};const t={},r=Object["hasOwn"];return r(e,"useMasterKey")&&(t.useMasterKey=!!e.useMasterKey),r(e,"useMaintenanceKey")&&(t.useMaintenanceKey=!!e.useMaintenanceKey),r(e,"sessionToken")&&"string"==typeof e.sessionToken&&(t.sessionToken=e.sessionToken),r(e,"installationId")&&"string"==typeof e.installationId&&(t.installationId=e.installationId),r(e,"transaction")&&"boolean"==typeof e.transaction&&(t.transaction=e.transaction),r(e,"batchSize")&&"number"==typeof e.batchSize&&(t.batchSize=e.batchSize),r(e,"context")&&"object"==typeof e.context&&(t.context=e.context),r(e,"include")&&(t.include=D.handleIncludeOptions(e)),r(e,"usePost")&&(t.usePost=e.usePost),r(e,"json")&&(t.json=e.json),t}initialize(){}toJSON(e,t){var r=this.id?this.className+":"+this.id:this;e=e||[r];const n={},s=this.attributes;for(const i in s)"createdAt"!==i&&"updatedAt"!==i||!s[i].toJSON?n[i]=(0,c.default)(s[i],!1,!1,e,t):n[i]=s[i].toJSON();const a=this._getPendingOps();for(const o in a[0])(0,y.default)(o).call(o,".")<0&&(n[o]=a[0][o].toJSON(t));return this.id&&(n.objectId=this.id),n}equals(e){return this===e||e instanceof D&&this.className===e.className&&this.id===e.id&&void 0!==this.id}dirty(t){if(!this.id)return!0;var r=this._getPendingOps(),e=this._getDirtyObjectAttributes();if(t){if(Object.hasOwn(e,t))return!0;for(let e=0;e<r.length;e++)if(Object.hasOwn(r[e],t))return!0;return!1}return 0!==(0,s.default)(r[0]).length||0!==(0,s.default)(e).length}dirtyKeys(){var t=this._getPendingOps();const r={};for(let e=0;e<t.length;e++)for(const n in t[e])r[n]=!0;for(const e in this._getDirtyObjectAttributes())r[e]=!0;return(0,s.default)(r)}isDataAvailable(){var e=this._getServerData();return!!(0,s.default)(e).length}toPointer(){if(this.id)return{__type:"Pointer",className:this.className,objectId:this.id};throw new Error("Cannot create a pointer to an unsaved ParseObject")}toOfflinePointer(){if(this._localId)return{__type:"Object",className:this.className,_localId:this._localId};throw new Error("Cannot create a offline pointer to a saved ParseObject")}get(e){return this.attributes[e]}relation(e){const t=this.get(e);if(t){if(t instanceof P.default)return t._ensureParentAndKey(this,e),t;throw new Error("Called relation() on non-relation field "+e)}return new P.default(this,e)}escape(e){let t=this.attributes[e];if(null==t)return"";if("string"!=typeof t){if("function"!=typeof t.toString)return"";t=t.toString()}return(0,K.default)(t)}has(e){var t=this.attributes;return!!Object.hasOwn(t,e)&&null!=t[e]}set(e,t,r){let n={};const s={};if(e&&"object"==typeof e)n=e,r=t;else{if("string"!=typeof e)return this;n[e]=t}r=r||{};let a=[];"function"==typeof this.constructor.readOnlyAttributes&&(a=(0,m.default)(a).call(a,this.constructor.readOnlyAttributes()));for(const d in n)if("createdAt"!==d&&"updatedAt"!==d){if(-1<(0,y.default)(a).call(a,d))throw new Error("Cannot modify readonly attribute: "+d);if(r.unset)s[d]=new x.UnsetOp;else if(n[d]instanceof x.Op)s[d]=n[d];else if(n[d]&&"object"==typeof n[d]&&"string"==typeof n[d].__op)s[d]=(0,x.opFromJSON)(n[d]);else if("objectId"===d||"id"===d)"string"==typeof n[d]&&(this.id=n[d]);else if("ACL"!==d||"object"!=typeof n[d]||n[d]instanceof E.default)if(n[d]instanceof P.default){const p=new P.default(this,d);p.targetClassName=n[d].targetClassName,s[d]=new x.SetOp(p)}else s[d]=new x.SetOp(n[d]);else s[d]=new x.SetOp(new E.default(n[d]))}var i=this.attributes;const o={};for(const b in s)s[b]instanceof x.RelationOp?o[b]=s[b].applyTo(i[b],this,b):s[b]instanceof x.UnsetOp||(o[b]=s[b].applyTo(i[b]));if(!r.ignoreValidation){e=this.validate(o);if(e)throw e}var l=this._getPendingOps(),u=l.length-1;const c=_.default.getObjectStateController();for(const h in s){var f=s[h].mergeWith(l[u][h]);c.setPendingOp(this._getStateIdentifier(),h,f)}return this}unset(e,t){return(t=t||{}).unset=!0,this.set(e,null,t)}increment(e,t){if("number"!=typeof(t=void 0===t?1:t))throw new Error("Cannot increment by a non-numeric amount.");return this.set(e,new x.IncrementOp(t))}decrement(e,t){if("number"!=typeof(t=void 0===t?1:t))throw new Error("Cannot decrement by a non-numeric amount.");return this.set(e,new x.IncrementOp(-1*t))}add(e,t){return this.set(e,new x.AddOp([t]))}addAll(e,t){return this.set(e,new x.AddOp(t))}addUnique(e,t){return this.set(e,new x.AddUniqueOp([t]))}addAllUnique(e,t){return this.set(e,new x.AddUniqueOp(t))}remove(e,t){return this.set(e,new x.RemoveOp([t]))}removeAll(e,t){return this.set(e,new x.RemoveOp(t))}op(t){var r=this._getPendingOps();for(let e=0;e<r.length;e+=1)if(r[e][t])return r[e][t]}clone(){const e=new this.constructor(this.className);let t=this.attributes;if("function"==typeof this.constructor.readOnlyAttributes){var r=this.constructor.readOnlyAttributes()||[];const n={};for(const s in t)(0,y.default)(r).call(r,s)<0&&(n[s]=t[s]);t=n}return e.set&&e.set(t),e}newInstance(){const e=new this.constructor(this.className);if(e.id=this.id,!k){const t=_.default.getObjectStateController();t&&t.duplicateState(this._getStateIdentifier(),e._getStateIdentifier())}return e}isNew(){return!this.id}existed(){if(!this.id)return!1;const e=_.default.getObjectStateController();var t=e.getState(this._getStateIdentifier());return!!t&&t.existed}async exists(e){if(!this.id)return!1;try{const t=_.default.getParseQuery(),r=new t(this.className);return await r.get(this.id,e),!0}catch(e){if(e.code===S.default.OBJECT_NOT_FOUND)return!1;throw e}}isValid(){return!this.validate(this.attributes)}validate(e){if(Object.hasOwn(e,"ACL")&&!(e.ACL instanceof E.default))return new S.default(S.default.OTHER_CAUSE,"ACL must be a Parse ACL.");for(const t in e)if(!/^[A-Za-z_][0-9A-Za-z_.]*$/.test(t))return new S.default(S.default.INVALID_KEY_NAME,"Invalid key name: "+t);return!1}getACL(){var e=this.get("ACL");return e instanceof E.default?e:null}setACL(e,t){return this.set("ACL",e,t)}revert(){let e;for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length){e=[];for(const s of r){if("string"!=typeof s)throw new Error("Parse.Object#revert expects either no, or a list of string, arguments.");e.push(s)}}this._clearPendingOps(e)}clear(){var e=this.attributes;const t={};let r=["createdAt","updatedAt"];"function"==typeof this.constructor.readOnlyAttributes&&(r=(0,m.default)(r).call(r,this.constructor.readOnlyAttributes()));for(const n in e)(0,y.default)(r).call(r,n)<0&&(t[n]=!0);return this.set(t,{unset:!0})}fetch(e){e=D._getRequestOptions(e);const t=_.default.getObjectController();return t.fetch(this,!0,e)}fetchWithInclude(e,t){return(t=t||{}).include=e,this.fetch(t)}async saveEventually(t){try{await this.save(null,t)}catch(e){e.code===S.default.CONNECTION_FAILED&&(await _.default.getEventuallyQueue().save(this,t),_.default.getEventuallyQueue().poll())}return this}async save(e,t,r){let n,s;"object"==typeof e||void 0===e?(n=e,"object"==typeof t&&(s=t)):((n={})[e]=t,s=r),s=s||{},n&&this.set(n,s);const a=D._getRequestOptions(s),i=_.default.getObjectController();e=!1!==s.cascadeSave?(0,R.default)(this):null;if(e&&e.length&&!0===s.transaction&&(0,h.default)(e).call(e,e=>e instanceof D)){const o=[],l=[],u=((0,b.default)(e).call(e,e=>{(e instanceof O.default?o:l).push(e)}),l.push(this),o.length?i.save(o,a):g.default.resolve());return u.then(()=>i.save(l,a)).then(e=>e.pop())}return await i.save(e,a),i.save(this,a)}async destroyEventually(t){try{await this.destroy(t)}catch(e){e.code===S.default.CONNECTION_FAILED&&(await _.default.getEventuallyQueue().destroy(this,t),_.default.getEventuallyQueue().poll())}return this}destroy(e){return this.id?(e=D._getRequestOptions(e),_.default.getObjectController().destroy(this,e)):g.default.resolve(void 0)}pin(){return D.pinAllWithName(d.DEFAULT_PIN,[this])}unPin(){return D.unPinAllWithName(d.DEFAULT_PIN,[this])}async isPinned(){const e=_.default.getLocalDatastore();var t;return e.isEnabled?(t=e.getKeyForObject(this),0<(await e.fromPinWithName(t)).length):g.default.reject("Parse.enableLocalDatastore() must be called first")}pinWithName(e){return D.pinAllWithName(e,[this])}unPinWithName(e){return D.unPinAllWithName(e,[this])}async fetchFromLocalDatastore(){const e=_.default.getLocalDatastore();if(!e.isEnabled)throw new Error("Parse.enableLocalDatastore() must be called first");var t=e.getKeyForObject(this),t=await e._serializeObject(t);if(!t)throw new Error("Cannot fetch an unsaved ParseObject");const r=D.fromJSON(t);return this._finishFetch(r.toJSON()),this}static _clearAllState(){const e=_.default.getObjectStateController();e.clearAllState()}static fetchAll(e,t){t=D._getRequestOptions(t);return _.default.getObjectController().fetch(e,!0,t)}static fetchAllWithInclude(e,t,r){return(r=r||{}).include=t,D.fetchAll(e,r)}static fetchAllIfNeededWithInclude(e,t,r){return(r=r||{}).include=t,D.fetchAllIfNeeded(e,r)}static fetchAllIfNeeded(e,t){t=D._getRequestOptions(t);return _.default.getObjectController().fetch(e,!1,t)}static handleIncludeOptions(e){let t=[];var r;return(0,j.default)(e.include)?(0,b.default)(r=e.include).call(r,e=>{(0,j.default)(e)?t=(0,m.default)(t).call(t,e):t.push(e)}):t.push(e.include),t}static destroyAll(e,t){t=D._getRequestOptions(t);return _.default.getObjectController().destroy(e,t)}static saveAll(e,t){t=D._getRequestOptions(t);return _.default.getObjectController().save(e,t)}static createWithoutData(e){const t=new this;return t.id=e,t}static fromJSON(e,t,r){if(!e.className)throw new Error("Cannot create an object without a className");const n=T[e.className],s=new(n||D)(e.className),a={};for(const i in e)"className"!==i&&"__type"!==i&&(a[i]=e[i],r&&s.set(i,e[i]));if(t){a.objectId&&(s.id=a.objectId);let e=null;"function"==typeof s._preserveFieldsOnFetch&&(e=s._preserveFieldsOnFetch()),s._clearServerData(),e&&s._finishFetch(e)}return s._finishFetch(a),e.objectId&&s._setExisted(!0),s}static registerSubclass(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?");(T[e]=t).className||(t.className=e)}static unregisterSubclass(e){if("string"!=typeof e)throw new TypeError("The first argument must be a valid class name.");delete T[e]}static extend(e,t,r){if("string"!=typeof e){if(e&&"string"==typeof e.className)return D.extend(e.className,e,t);throw new Error("Parse.Object.extend's first argument should be the className.")}let n=e,s=("User"===n&&_.default.get("PERFORM_USER_REWRITE")&&(n="_User"),D.prototype),a=(Object.hasOwn(this,"__super__")&&this.__super__&&(s=this.prototype),function(e,t){if(this.className=n,this._objCount=Q++,"function"==typeof this.initialize&&this.initialize.apply(this,arguments),this._initializers)for(const r of this._initializers)r.apply(this,arguments);if(e&&"object"==typeof e)try{this.set(e||{},t)}catch(e){throw new Error("Can't create an invalid Parse Object")}});if(T[n]?a=T[n]:(a.extend=function(e,t,r){return"string"==typeof e?D.extend.call(a,e,t,r):D.extend.call(a,n,e,t)},a.createWithoutData=D.createWithoutData,a.className=n,a.__super__=s,a.prototype=(0,B.default)(s,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})),t)for(const i in t)"initialize"===i?(0,l.default)(a.prototype,"_initializers",{value:[...a.prototype._initializers||[],t[i]],enumerable:!1,writable:!0,configurable:!0}):"className"!==i&&(0,l.default)(a.prototype,i,{value:t[i],enumerable:!1,writable:!0,configurable:!0});if(r)for(const o in r)"className"!==o&&(0,l.default)(a,o,{value:r[o],enumerable:!1,writable:!0,configurable:!0});return T[n]=a}static enableSingleInstance(){k=!0,_.default.setObjectStateController(p)}static disableSingleInstance(){k=!1,_.default.setObjectStateController(A)}static pinAll(e){return _.default.getLocalDatastore().isEnabled?D.pinAllWithName(d.DEFAULT_PIN,e):g.default.reject("Parse.enableLocalDatastore() must be called first")}static pinAllWithName(e,t){const r=_.default.getLocalDatastore();return r.isEnabled?r._handlePinAllWithName(e,t):g.default.reject("Parse.enableLocalDatastore() must be called first")}static unPinAll(e){return _.default.getLocalDatastore().isEnabled?D.unPinAllWithName(d.DEFAULT_PIN,e):g.default.reject("Parse.enableLocalDatastore() must be called first")}static unPinAllWithName(e,t){const r=_.default.getLocalDatastore();return r.isEnabled?r._handleUnPinAllWithName(e,t):g.default.reject("Parse.enableLocalDatastore() must be called first")}static unPinAllObjects(){const e=_.default.getLocalDatastore();return e.isEnabled?e.unPinWithName(d.DEFAULT_PIN):g.default.reject("Parse.enableLocalDatastore() must be called first")}static unPinAllObjectsWithName(e){const t=_.default.getLocalDatastore();return t.isEnabled?t.unPinWithName(d.PIN_PREFIX+e):g.default.reject("Parse.enableLocalDatastore() must be called first")}}r={fetch(n,i,e){const o=_.default.getLocalDatastore();if((0,j.default)(n)){if(n.length<1)return g.default.resolve([]);const l=[],s=[];let t=null;const u=[];let r=null;if((0,b.default)(n).call(n,e=>{r||((t=t||e.className)!==e.className&&(r=new S.default(S.default.INVALID_CLASS_NAME,"All objects should be of the same class")),e.id||(r=new S.default(S.default.MISSING_OBJECT_ID,"All objects must have an ID")),!i&&e.isDataAvailable()||(s.push(e.id),l.push(e)),u.push(e))}),r)return g.default.reject(r);const a=_.default.getParseQuery(),c=new a(t);return c.containedIn("objectId",s),e&&e.include&&c.include(e.include),c._limit=s.length,(0,W.default)(c).call(c,e).then(async e=>{const t={};(0,b.default)(e).call(e,e=>{t[e.id]=e});for(let e=0;e<l.length;e++){var r=l[e];if((!r||!r.id||!t[r.id])&&i)return g.default.reject(new S.default(S.default.OBJECT_NOT_FOUND,"All objects must exist on the server."))}if(!k)for(let e=0;e<u.length;e++){const s=u[e];var n;s&&s.id&&t[s.id]&&(n=s.id,s._finishFetch(t[n].toJSON()),u[e]=t[n])}for(const a of u)await o._updateObjectIfPinned(a);return g.default.resolve(u)})}if(n instanceof D){if(!n.id)return g.default.reject(new S.default(S.default.MISSING_OBJECT_ID,"Object does not have an ID"));const t=_.default.getRESTController(),r={};return e&&e.include&&(r.include=e.include.join()),t.request("GET","classes/"+n.className+"/"+n._getId(),r,e).then(async e=>(n._clearPendingOps(),n._clearServerData(),n._finishFetch(e),await o._updateObjectIfPinned(n),n))}return g.default.resolve(void 0)},async destroy(n,s){if(s&&s.batchSize&&s.transaction)throw new S.default(S.default.OTHER_CAUSE,"You cannot use both transaction and batchSize options simultaneously.");let t=s&&s.batchSize?s.batchSize:_.default.get("REQUEST_BATCH_SIZE");const a=_.default.getLocalDatastore(),i=_.default.getRESTController();if((0,j.default)(n)){if(s&&s.transaction&&1<n.length&&(t=n.length),n.length<1)return g.default.resolve([]);const o=[[]];(0,b.default)(n).call(n,e=>{e.id&&(o[o.length-1].push(e),o[o.length-1].length>=t&&o.push([]))}),0===o[o.length-1].length&&o.pop();let r=g.default.resolve();const l=[];return(0,b.default)(o).call(o,n=>{var e=(0,v.default)(n).call(n,e=>({method:"DELETE",path:V()+"classes/"+e.className+"/"+e._getId(),body:{}}));const t=s&&s.transaction&&1<e.length?{requests:e,transaction:!0}:{requests:e};r=r.then(()=>i.request("POST","batch",t,s).then(t=>{for(let e=0;e<t.length;e++)if(t[e]&&Object.hasOwn(t[e],"error")){const r=new S.default(t[e].error.code,t[e].error.error);r.object=n[e],l.push(r)}}))}),r.then(async()=>{if(l.length){const e=new S.default(S.default.AGGREGATE_ERROR);return e.errors=l,g.default.reject(e)}for(const t of n)await a._destroyObjectIfPinned(t);return g.default.resolve(n)})}return n instanceof D?i.request("DELETE","classes/"+n.className+"/"+n._getId(),{},s).then(async()=>(await a._destroyObjectIfPinned(n),g.default.resolve(n))):g.default.resolve(n)},save(r,n){if(n&&n.batchSize&&n.transaction)return g.default.reject(new S.default(S.default.OTHER_CAUSE,"You cannot use both transaction and batchSize options simultaneously."));let s=n&&n.batchSize?n.batchSize:_.default.get("REQUEST_BATCH_SIZE");const a=_.default.getLocalDatastore(),c={},f=_.default.getRESTController(),d=_.default.getObjectStateController(),p=_.default.get("ALLOW_CUSTOM_OBJECT_ID");if((n=n||{}).returnStatus=n.returnStatus||!0,(0,j.default)(r)){if(r.length<1)return g.default.resolve([]);let t=(0,m.default)(r).call(r);for(let e=0;e<r.length;e++){var i=r[e];i instanceof D&&(t=(0,m.default)(t).call(t,(0,R.default)(i,!0)))}t=(0,z.default)(t);const o=[];let u=[];if((0,b.default)(t).call(t,e=>{e instanceof O.default?o.push(e.save(n)):e instanceof D&&u.push(e)}),n&&n.transaction&&1<u.length){if((0,h.default)(u).call(u,e=>!(0,w.default)(e)))return g.default.reject(new S.default(S.default.OTHER_CAUSE,"Tried to save a transactional batch containing an object with unserializable attributes."));s=u.length}return g.default.all(o).then(()=>{let l=null;return(0,C.continueWhile)(()=>0<u.length,()=>{const t=[],r=[];if((0,b.default)(u).call(u,e=>{if(p&&Object.hasOwn(e,"id")&&!e.id)throw new S.default(S.default.MISSING_OBJECT_ID,"objectId must not be empty or null");(t.length<s&&(0,w.default)(e)?t:r).push(e)}),u=r,t.length<1)return g.default.reject(new S.default(S.default.OTHER_CAUSE,"Tried to save a batch with a cycle."));const a=(0,C.resolvingPromise)(),i=[],o=[];return(0,b.default)(t).call(t,(n,s)=>{const e=(0,C.resolvingPromise)();i.push(e),d.pushPendingState(n._getStateIdentifier()),o.push(d.enqueueTask(n._getStateIdentifier(),function(){return e.resolve(),a.then(e=>{var t,r;Object.hasOwn(e[s],"success")?(r=e[s].success.objectId,t=e[s]._status,delete e[s]._status,delete e[s]._headers,delete e[s]._xhr,c[r]=n._localId,n._handleSaveResponse(e[s].success,t)):(!l&&Object.hasOwn(e[s],"error")&&(r=e[s].error,l=new S.default(r.code,r.error),u=[]),n._handleSaveError())})}))}),(0,C.when)(i).then(()=>{var e=(0,v.default)(t).call(t,e=>{const t=e._getSaveParams();return t.path=V()+t.path,t}),e=n&&n.transaction&&1<e.length?{requests:e,transaction:!0}:{requests:e};return f.request("POST","batch",e,n)}).then(a.resolve,e=>{a.reject(new S.default(S.default.INCORRECT_TYPE,e.message))}),(0,C.when)(o)}).then(async()=>{if(l)return g.default.reject(l);for(const e of r)e instanceof D&&(await a._updateLocalIdForObject(c[e.id],e),await a._updateObjectIfPinned(e));return g.default.resolve(r)})})}if(r instanceof D){if(p&&Object.hasOwn(r,"id")&&!r.id)throw new S.default(S.default.MISSING_OBJECT_ID,"objectId must not be empty or null");r._getId();const e=r._localId,l=r;return d.pushPendingState(r._getStateIdentifier()),d.enqueueTask(r._getStateIdentifier(),function(){var e=l._getSaveParams();return f.request(e.method,e.path,e.body,n).then(e=>{var t=e._status;delete e._status,delete e._headers,delete e._xhr,l._handleSaveResponse(e,t)},e=>(l._handleSaveError(),g.default.reject(e)))}).then(async()=>(await a._updateLocalIdForObject(e,r),await a._updateObjectIfPinned(r),r),e=>g.default.reject(e))}return g.default.resolve(void 0)}};_.default.setParseObject(D),_.default.setObjectController(r),t.default=D},{"./CoreManager":4,"./LocalDatastoreUtils":17,"./ParseACL":21,"./ParseError":24,"./ParseFile":25,"./ParseOp":31,"./ParseRelation":34,"./SingleInstanceStateController":41,"./UniqueInstanceStateController":50,"./canBeSerialized":54,"./decode":55,"./encode":56,"./escape":58,"./parseDate":60,"./promiseUtils":61,"./unique":62,"./unsavedChildren":63,"./uuid":64,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/instance/concat":68,"@babel/runtime-corejs3/core-js-stable/instance/find":73,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/includes":75,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/instance/map":78,"@babel/runtime-corejs3/core-js-stable/instance/some":81,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/create":90,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/freeze":93,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":94,"@babel/runtime-corejs3/core-js-stable/object/get-prototype-of":95,"@babel/runtime-corejs3/core-js-stable/object/keys":96,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/core-js-stable/weak-map":102,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],31:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.UnsetOp=r.SetOp=r.RemoveOp=r.RelationOp=r.Op=r.IncrementOp=r.AddUniqueOp=r.AddOp=void 0,r.opFromJSON=g,s(e("@babel/runtime-corejs3/helpers/defineProperty"))),i=s(e("@babel/runtime-corejs3/core-js-stable/array/is-array")),o=s(e("@babel/runtime-corejs3/core-js-stable/instance/concat")),l=s(e("@babel/runtime-corejs3/core-js-stable/instance/for-each")),u=s(e("@babel/runtime-corejs3/core-js-stable/instance/index-of")),c=s(e("@babel/runtime-corejs3/core-js-stable/instance/splice")),f=s(e("@babel/runtime-corejs3/core-js-stable/instance/map")),d=s(e("./arrayContainsObject")),p=s(e("./decode")),b=s(e("./encode")),h=s(e("./CoreManager")),y=s(e("./ParseRelation")),m=s(e("./unique"));function g(n){if(n&&n.__op)switch(n.__op){case"Delete":return new _;case"Increment":return new w(n.amount);case"Add":return new E((0,p.default)(n.objects));case"AddUnique":return new S((0,p.default)(n.objects));case"Remove":return new O((0,p.default)(n.objects));case"AddRelation":var e=(0,p.default)(n.objects);return(0,i.default)(e)?new C(e,[]):new C([],[]);case"RemoveRelation":e=(0,p.default)(n.objects);return(0,i.default)(e)?new C([],e):new C([],[]);case"Batch":{let t=[],r=[];for(let e=0;e<n.ops.length;e++)"AddRelation"===n.ops[e].__op?t=(0,o.default)(t).call(t,(0,p.default)(n.ops[e].objects)):"RemoveRelation"===n.ops[e].__op&&(r=(0,o.default)(r).call(r,(0,p.default)(n.ops[e].objects)));return new C(t,r)}}return null}class j{applyTo(){}mergeWith(){}toJSON(){}}class v extends(r.Op=j){constructor(e){super(),(0,a.default)(this,"_value",void 0),this._value=e}applyTo(){return this._value}mergeWith(){return new v(this._value)}toJSON(e){return(0,b.default)(this._value,!1,!0,void 0,e)}}r.SetOp=v;class _ extends j{applyTo(){}mergeWith(){return new _}toJSON(){return{__op:"Delete"}}}r.UnsetOp=_;class w extends j{constructor(e){if(super(),(0,a.default)(this,"_amount",void 0),"number"!=typeof e)throw new TypeError("Increment Op must be initialized with a numeric amount.");this._amount=e}applyTo(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}mergeWith(e){if(!e)return this;if(e instanceof v)return new v(this.applyTo(e._value));if(e instanceof _)return new v(this._amount);if(e instanceof w)return new w(this.applyTo(e._amount));throw new Error("Cannot merge Increment Op with the previous Op")}toJSON(){return{__op:"Increment",amount:this._amount}}}r.IncrementOp=w;class E extends j{constructor(e){super(),(0,a.default)(this,"_value",void 0),this._value=(0,i.default)(e)?e:[e]}applyTo(e){if(null==e)return this._value;if((0,i.default)(e))return(0,o.default)(e).call(e,this._value);throw new Error("Cannot add elements to a non-array value")}mergeWith(e){if(!e)return this;if(e instanceof v)return new v(this.applyTo(e._value));if(e instanceof _)return new v(this._value);if(e instanceof E)return new E(this.applyTo(e._value));throw new Error("Cannot merge Add Op with the previous Op")}toJSON(){return{__op:"Add",objects:(0,b.default)(this._value,!1,!0)}}}r.AddOp=E;class S extends j{constructor(e){super(),(0,a.default)(this,"_value",void 0),this._value=(0,m.default)((0,i.default)(e)?e:[e])}applyTo(t){if(null==t)return this._value||[];if((0,i.default)(t)){var e;const r=h.default.getParseObject(),n=[];return(0,l.default)(e=this._value).call(e,e=>{e instanceof r?(0,d.default)(t,e)||n.push(e):(0,u.default)(t).call(t,e)<0&&n.push(e)}),(0,o.default)(t).call(t,n)}throw new Error("Cannot add elements to a non-array value")}mergeWith(e){if(!e)return this;if(e instanceof v)return new v(this.applyTo(e._value));if(e instanceof _)return new v(this._value);if(e instanceof S)return new S(this.applyTo(e._value));throw new Error("Cannot merge AddUnique Op with the previous Op")}toJSON(){return{__op:"AddUnique",objects:(0,b.default)(this._value,!1,!0)}}}r.AddUniqueOp=S;class O extends j{constructor(e){super(),(0,a.default)(this,"_value",void 0),this._value=(0,m.default)((0,i.default)(e)?e:[e])}applyTo(e){if(null==e)return[];if((0,i.default)(e)){var r=h.default.getParseObject(),n=(0,o.default)(e).call(e,[]);for(let t=0;t<this._value.length;t++){let e=(0,u.default)(n).call(n,this._value[t]);for(;-1<e;)(0,c.default)(n).call(n,e,1),e=(0,u.default)(n).call(n,this._value[t]);if(this._value[t]instanceof r&&this._value[t].id)for(let e=0;e<n.length;e++)n[e]instanceof r&&this._value[t].id===n[e].id&&((0,c.default)(n).call(n,e,1),e--)}return n}throw new Error("Cannot remove elements from a non-array value")}mergeWith(e){if(!e)return this;if(e instanceof v)return new v(this.applyTo(e._value));if(e instanceof _)return new _;if(e instanceof O){var t=h.default.getParseObject();const r=(0,o.default)(e=e._value).call(e,[]);for(let e=0;e<this._value.length;e++)this._value[e]instanceof t?(0,d.default)(r,this._value[e])||r.push(this._value[e]):(0,u.default)(r).call(r,this._value[e])<0&&r.push(this._value[e]);return new O(r)}throw new Error("Cannot merge Remove Op with the previous Op")}toJSON(){return{__op:"Remove",objects:(0,b.default)(this._value,!1,!0)}}}r.RemoveOp=O;class C extends j{constructor(e,t){super(),(0,a.default)(this,"_targetClassName",void 0),(0,a.default)(this,"relationsToAdd",void 0),(0,a.default)(this,"relationsToRemove",void 0),(this._targetClassName=null,i.default)(e)&&(this.relationsToAdd=(0,m.default)((0,f.default)(e).call(e,this._extractId,this))),(0,i.default)(t)&&(this.relationsToRemove=(0,m.default)((0,f.default)(t).call(t,this._extractId,this)))}_extractId(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}applyTo(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");const n=new y.default(t,r);return n.targetClassName=this._targetClassName,n}if(e instanceof y.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")}mergeWith(e){if(!e)return this;if(e instanceof _)throw new Error("You cannot modify a relation after deleting it.");if(e instanceof v&&e._value instanceof y.default)return this;if(e instanceof C){var 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.");const r=(0,o.default)(t=e.relationsToAdd).call(t,[]),n=((0,l.default)(t=this.relationsToRemove).call(t,e=>{e=(0,u.default)(r).call(r,e);-1<e&&(0,c.default)(r).call(r,e,1)}),(0,l.default)(t=this.relationsToAdd).call(t,e=>{(0,u.default)(r).call(r,e)<0&&r.push(e)}),(0,o.default)(t=e.relationsToRemove).call(t,[])),s=((0,l.default)(e=this.relationsToAdd).call(e,e=>{e=(0,u.default)(n).call(n,e);-1<e&&(0,c.default)(n).call(n,e,1)}),(0,l.default)(t=this.relationsToRemove).call(t,e=>{(0,u.default)(n).call(n,e)<0&&n.push(e)}),new C(r,n));return s._targetClassName=this._targetClassName,s}throw new Error("Cannot merge Relation Op with the previous Op")}toJSON(){var e,t=e=>({__type:"Pointer",className:this._targetClassName,objectId:e});let r=null,n=null,s=null;return 0<this.relationsToAdd.length&&(r=(0,f.default)(e=this.relationsToAdd).call(e,t),n={__op:"AddRelation",objects:r}),0<this.relationsToRemove.length&&(r=(0,f.default)(e=this.relationsToRemove).call(e,t),s={__op:"RemoveRelation",objects:r}),n&&s?{__op:"Batch",ops:[n,s]}:n||s||{}}}r.RelationOp=C,h.default.setParseOp({Op:j,opFromJSON:g,SetOp:v,UnsetOp:_,IncrementOp:w,AddOp:E,RelationOp:C,RemoveOp:O,AddUniqueOp:S})},{"./CoreManager":4,"./ParseRelation":34,"./arrayContainsObject":53,"./decode":55,"./encode":56,"./unique":62,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/instance/concat":68,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/instance/map":78,"@babel/runtime-corejs3/core-js-stable/instance/splice":83,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],32:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/array/is-array"))),i=s(e("@babel/runtime-corejs3/helpers/defineProperty")),o=s(e("./ParseGeoPoint"));class l{constructor(e){(0,i.default)(this,"_coordinates",void 0),this._coordinates=l._validate(e)}get coordinates(){return this._coordinates}set coordinates(e){this._coordinates=l._validate(e)}toJSON(){return l._validate(this._coordinates),{__type:"Polygon",coordinates:this._coordinates}}equals(t){if(!(t instanceof l)||this.coordinates.length!==t.coordinates.length)return!1;let r=!0;for(let e=1;e<this._coordinates.length;e+=1)if(this._coordinates[e][0]!=t.coordinates[e][0]||this._coordinates[e][1]!=t.coordinates[e][1]){r=!1;break}return r}containsPoint(r){let t=this._coordinates[0][0],n=this._coordinates[0][0],s=this._coordinates[0][1],a=this._coordinates[0][1];for(let e=1;e<this._coordinates.length;e+=1){var i=this._coordinates[e];t=Math.min(i[0],t),n=Math.max(i[0],n),s=Math.min(i[1],s),a=Math.max(i[1],a)}if(r.latitude<t||r.latitude>n||r.longitude<s||r.longitude>a)return!1;let o=!1;for(let e=0,t=this._coordinates.length-1;e<this._coordinates.length;t=e++){var l=this._coordinates[e][0],u=this._coordinates[e][1],c=this._coordinates[t][0],f=this._coordinates[t][1];u>r.longitude!=f>r.longitude&&r.latitude<(c-l)*(r.longitude-u)/(f-u)+l&&(o=!o)}return o}static _validate(r){if(!(0,a.default)(r))throw new TypeError("Coordinates must be an Array");if(r.length<3)throw new TypeError("Polygon must have at least 3 GeoPoints or Points");const n=[];for(let t=0;t<r.length;t+=1){var s=r[t];let e;if(s instanceof o.default)e=s;else{if(!(0,a.default)(s)||2!==s.length)throw new TypeError("Coordinates must be an Array of GeoPoints or Points");e=new o.default(s[0],s[1])}n.push([e.latitude,e.longitude])}return n}}r.default=l},{"./ParseGeoPoint":26,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],33:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/helpers/defineProperty"))),o=s(e("@babel/runtime-corejs3/core-js-stable/instance/for-each")),i=s(e("@babel/runtime-corejs3/core-js-stable/instance/index-of")),l=s(e("@babel/runtime-corejs3/core-js-stable/object/keys")),u=s(e("@babel/runtime-corejs3/core-js-stable/instance/slice")),c=s(e("@babel/runtime-corejs3/core-js-stable/instance/map")),f=s(e("@babel/runtime-corejs3/core-js-stable/instance/filter")),d=s(e("@babel/runtime-corejs3/core-js-stable/instance/keys")),p=s(e("@babel/runtime-corejs3/core-js-stable/instance/concat")),b=s(e("@babel/runtime-corejs3/core-js-stable/instance/includes")),h=s(e("@babel/runtime-corejs3/core-js-stable/instance/sort")),y=s(e("@babel/runtime-corejs3/core-js-stable/instance/splice")),m=s(e("@babel/runtime-corejs3/core-js-stable/promise")),g=s(e("@babel/runtime-corejs3/core-js-stable/instance/find")),j=s(e("@babel/runtime-corejs3/core-js-stable/instance/bind")),v=s(e("@babel/runtime-corejs3/core-js-stable/array/is-array")),_=s(e("@babel/runtime-corejs3/core-js-stable/object/entries")),w=s(e("./CoreManager")),E=s(e("./encode")),S=e("./promiseUtils"),O=s(e("./ParseError")),C=s(e("./ParseGeoPoint")),x=s(e("./ParseObject")),P=s(e("./OfflineQuery")),A=e("./LocalDatastoreUtils");function R(e){return"\\Q"+e.replace("\\E","\\E\\\\E\\Q")+"\\E"}function I(e){let t=null;return(0,o.default)(e).call(e,e=>{if((t=t||e.className)!==e.className)throw new Error("All queries must be for the same class.")}),t}function N(r,e){const a={};(0,o.default)(e).call(e,e=>{var t=-1!==(0,i.default)(e).call(e,".");if(t||Object.hasOwn(r,e)){if(t){t=e.split(".");let n=r,s=a;(0,o.default)(t).call(t,(e,t,r)=>{n&&!Object.hasOwn(n,e)&&(n[e]=void 0),n&&"object"==typeof n&&(n=n[e]),t<r.length-1&&(s[e]||(s[e]={}),s=s[e])})}}else r[e]=void 0}),0<(0,l.default)(a).length&&function e(t,r,n,s){if(s)for(const a in t)Object.hasOwn(t,a)&&!Object.hasOwn(r,a)&&(r[a]=t[a]);for(const i in n)void 0!==r[i]&&null!==r[i]&&null!=t&&e(t[i],r[i],n[i],!0)}(w.default.getObjectStateController().getServerData({id:r.objectId,className:r.className}),r,a,!1)}class T{constructor(e){if((0,a.default)(this,"className",void 0),(0,a.default)(this,"_where",void 0),(0,a.default)(this,"_watch",void 0),(0,a.default)(this,"_include",void 0),(0,a.default)(this,"_exclude",void 0),(0,a.default)(this,"_select",void 0),(0,a.default)(this,"_limit",void 0),(0,a.default)(this,"_skip",void 0),(0,a.default)(this,"_count",void 0),(0,a.default)(this,"_order",void 0),(0,a.default)(this,"_readPreference",void 0),(0,a.default)(this,"_includeReadPreference",void 0),(0,a.default)(this,"_subqueryReadPreference",void 0),(0,a.default)(this,"_queriesLocalDatastore",void 0),(0,a.default)(this,"_localDatastorePinName",void 0),(0,a.default)(this,"_extraOptions",void 0),(0,a.default)(this,"_hint",void 0),(0,a.default)(this,"_explain",void 0),(0,a.default)(this,"_xhrRequest",void 0),(0,a.default)(this,"_comment",void 0),"string"==typeof e)"User"===e&&w.default.get("PERFORM_USER_REWRITE")?this.className="_User":this.className=e;else if(e instanceof x.default)this.className=e.className;else{if("function"!=typeof e)throw new TypeError("A ParseQuery must be constructed with a ParseObject or class name.");{const t=e;"string"==typeof t.className?this.className=t.className:(e=new t,this.className=e.className)}}this._where={},this._watch=[],this._include=[],this._exclude=[],this._count=!1,this._limit=-1,this._skip=0,this._readPreference=null,this._includeReadPreference=null,this._subqueryReadPreference=null,this._queriesLocalDatastore=!1,this._localDatastorePinName=null,this._extraOptions={},this._xhrRequest={task:null,onchange:()=>{}},this._comment=null}_orQuery(e){e=(0,c.default)(e).call(e,e=>e.toJSON().where);return this._where.$or=e,this}_andQuery(e){e=(0,c.default)(e).call(e,e=>e.toJSON().where);return this._where.$and=e,this}_norQuery(e){e=(0,c.default)(e).call(e,e=>e.toJSON().where);return this._where.$nor=e,this}_addCondition(e,t,r){return this._where[e]&&"string"!=typeof this._where[e]||(this._where[e]={}),this._where[e][t]=(0,E.default)(r,!1,!0),this}_regexStartWith(e){return"^"+R(e)}async _handleOfflineQuery(e){P.default.validateQuery(this);const t=w.default.getLocalDatastore();var r=await t._serializeObjectsFromPinName(this._localDatastorePinName);let n=(0,f.default)(r=(0,c.default)(r).call(r,(e,t,r)=>{const n=x.default.fromJSON(e,!1);return e._localId&&!e.objectId&&(n._localId=e._localId),P.default.matchesQuery(this.className,n,r,this)?n:null})).call(r,e=>null!==e);if((0,d.default)(e)){let r=(0,d.default)(e).split(",");r=(0,p.default)(r).call(r,["className","objectId","createdAt","updatedAt","ACL"]),n=(0,c.default)(n).call(n,e=>{const t=e._toFullJSON();return(0,o.default)(e=(0,l.default)(t)).call(e,e=>{(0,b.default)(r).call(r,e)||delete t[e]}),x.default.fromJSON(t,!1)})}if(e.order){const i=e.order.split(",");(0,h.default)(n).call(n,(e,t)=>function e(t,r,n){let s=n[0];var a,i,o="-"===(0,u.default)(s).call(s,0,1);if("_updated_at"===(s="_created_at"===(s=o?s.substring(1):s)?"createdAt":s)&&(s="updatedAt"),/^[A-Za-z][0-9A-Za-z_]*$/.test(s)&&"password"!==s)return(a=t.get(s))<(i=r.get(s))?o?1:-1:i<a?o?-1:1:1<n.length?e(t,r,(0,u.default)(n).call(n,1)):0;throw new O.default(O.default.INVALID_KEY_NAME,"Invalid Key: "+s)}(e,t,i))}let s,a=(e.count&&(s=n.length),(n=e.skip?e.skip>=n.length?[]:(0,y.default)(n).call(n,e.skip,n.length):n).length);return 0!==e.limit&&e.limit<n.length&&(a=e.limit),n=(0,y.default)(n).call(n,0,a),"number"==typeof s?{results:n,count:s}:n}toJSON(){const e={where:this._where};this._watch.length&&(e.watch=this._watch.join(",")),this._include.length&&(e.include=this._include.join(",")),this._exclude.length&&(e.excludeKeys=this._exclude.join(",")),this._select&&(e.keys=this._select.join(",")),this._count&&(e.count=1),0<=this._limit&&(e.limit=this._limit),0<this._skip&&(e.skip=this._skip),this._order&&(e.order=this._order.join(",")),this._readPreference&&(e.readPreference=this._readPreference),this._includeReadPreference&&(e.includeReadPreference=this._includeReadPreference),this._subqueryReadPreference&&(e.subqueryReadPreference=this._subqueryReadPreference),this._hint&&(e.hint=this._hint),this._explain&&(e.explain=!0),this._comment&&(e.comment=this._comment);for(const t in this._extraOptions)e[t]=this._extraOptions[t];return e}withJSON(e){e.where&&(this._where=e.where),e.watch&&(this._watch=e.watch.split(",")),e.include&&(this._include=e.include.split(",")),(0,d.default)(e)&&(this._select=(0,d.default)(e).split(",")),e.excludeKeys&&(this._exclude=e.excludeKeys.split(",")),e.count&&(this._count=1===e.count),e.limit&&(this._limit=e.limit),e.skip&&(this._skip=e.skip),e.order&&(this._order=e.order.split(",")),e.readPreference&&(this._readPreference=e.readPreference),e.includeReadPreference&&(this._includeReadPreference=e.includeReadPreference),e.subqueryReadPreference&&(this._subqueryReadPreference=e.subqueryReadPreference),e.hint&&(this._hint=e.hint),e.explain&&(this._explain=!!e.explain),e.comment&&(this._comment=e.comment);for(const r in e){var t;Object.hasOwn(e,r)&&-1===(0,i.default)(t=["where","include","keys","count","limit","skip","order","readPreference","includeReadPreference","subqueryReadPreference","hint","explain","comment"]).call(t,r)&&(this._extraOptions[r]=e[r])}return this}static fromJSON(e,t){const r=new T(e);return r.withJSON(t)}get(e,t){this.equalTo("objectId",e);e=x.default._getRequestOptions(t);return this.first(e).then(e=>{return e||(e=new O.default(O.default.OBJECT_NOT_FOUND,"Object not found."),m.default.reject(e))})}find(e){const n=x.default._getRequestOptions(e);this._setRequestTask(n);e=w.default.getQueryController();const s=this._select;return this._queriesLocalDatastore?this._handleOfflineQuery(this.toJSON()):(0,g.default)(e).call(e,this.className,this.toJSON(),n).then(r=>{var e,t;return this._explain?r.results:(e=(null==(t=r.results)?void 0:(0,j.default)(e=Function.call).call(e,(0,c.default)(t),t))?.(e=>{var t=r.className||this.className;return e.className||(e.className=t),s&&N(e,s),n.json?e:x.default.fromJSON(e,!s)}),"number"==typeof(t=r.count)?{results:e,count:t}:e)})}async findAll(e){let t=[];return await this.eachBatch(e=>{t=[...t,...e]},e),t}count(e){var e=x.default._getRequestOptions(e=e||{}),t=(this._setRequestTask(e),w.default.getQueryController());const r=this.toJSON();return r.limit=0,r.count=1,(0,g.default)(t).call(t,this.className,r,e).then(e=>e.count)}distinct(e){var t={useMasterKey:!0},e=(this._setRequestTask(t),{distinct:e,where:this._where,hint:this._hint});const r=w.default.getQueryController();return r.aggregate(this.className,e,t).then(e=>e.results)}aggregate(e){if(!(0,v.default)(e)&&"object"!=typeof e)throw new Error("Invalid pipeline must be Array or Object");(0,l.default)(this._where||{}).length&&(e=(0,v.default)(e)?e:[e]).unshift({$match:this._where});var e={pipeline:e,hint:this._hint,explain:this._explain,readPreference:this._readPreference},t={useMasterKey:!0};this._setRequestTask(t);const r=w.default.getQueryController();return r.aggregate(this.className,e,t).then(e=>e.results)}first(){const r=x.default._getRequestOptions(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{});this._setRequestTask(r);var e=w.default.getQueryController();const t=this.toJSON(),n=(t.limit=1,this._select);return this._queriesLocalDatastore?this._handleOfflineQuery(t).then(e=>{if(e[0])return e[0]}):(0,g.default)(e).call(e,this.className,t,r).then(e=>{const t=e.results;if(t[0])return t[0].className||(t[0].className=this.className),n&&N(t[0],n),r.json?t[0]:x.default.fromJSON(t[0],!n)})}eachBatch(t,e){if(e=e||{},this._order||this._skip||0<=this._limit)return m.default.reject("Cannot iterate on a query with sort, skip, or limit.");const r=T.fromJSON(this.className,this.toJSON()),n=(r.ascending("objectId"),r._limit=e.batchSize||100,x.default._getRequestOptions(e));let s=!1,a=[];return(0,S.continueWhile)(()=>!s,async()=>{var[e]=await m.default.all([(0,g.default)(r).call(r,n),m.default.resolve(0<a.length&&t(a))]);e.length>=r._limit?(n.json?r.greaterThan("objectId",e[e.length-1].objectId):r.greaterThan("objectId",e[e.length-1].id),a=e):s=(0<e.length&&await m.default.resolve(t(e)),!0)})}each(r,e){return this.eachBatch(e=>{let t=m.default.resolve();return(0,o.default)(e).call(e,e=>{t=t.then(()=>r(e))}),t},e)}hint(e){return void 0===e&&delete this._hint,this._hint=e,this}explain(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];if("boolean"!=typeof e)throw new Error("You can only set explain to a boolean value");return this._explain=e,this}async map(t,e){const r=[];let n=0;return await this.each(e=>m.default.resolve(t(e,n,this)).then(e=>{r.push(e),n+=1}),e),r}async reduce(t,r,e){let n=r,s=0;if(await this.each(e=>{if(0!==s||void 0!==r)return m.default.resolve(t(n,e,s)).then(e=>{n=e,s+=1});n=e,s+=1},e),0===s&&void 0===r)throw new TypeError("Reducing empty query result set with no initial value");return n}async filter(e,t){const r=[];let n=0;return await this.each(t=>m.default.resolve(e(t,n,this)).then(e=>{e&&r.push(t),n+=1}),t),r}equalTo(e,t){var r;if(e&&"object"==typeof e)(0,o.default)(r=(0,_.default)(e)).call(r,e=>{var[e,t]=e;return this.equalTo(e,t)});else{if(void 0===t)return this.doesNotExist(e);this._where[e]=(0,E.default)(t,!1,!0)}return this}notEqualTo(e,t){var r;return e&&"object"==typeof e?((0,o.default)(r=(0,_.default)(e)).call(r,e=>{var[e,t]=e;return this.notEqualTo(e,t)}),this):this._addCondition(e,"$ne",t)}lessThan(e,t){return this._addCondition(e,"$lt",t)}greaterThan(e,t){return this._addCondition(e,"$gt",t)}lessThanOrEqualTo(e,t){return this._addCondition(e,"$lte",t)}greaterThanOrEqualTo(e,t){return this._addCondition(e,"$gte",t)}containedIn(e,t){return this._addCondition(e,"$in",t)}notContainedIn(e,t){return this._addCondition(e,"$nin",t)}containedBy(e,t){return this._addCondition(e,"$containedBy",t)}containsAll(e,t){return this._addCondition(e,"$all",t)}containsAllStartingWith(e,t){(0,v.default)(t)||(t=[t]);t=(0,c.default)(t).call(t,e=>({$regex:this._regexStartWith(e)}));return this.containsAll(e,t)}exists(e){return this._addCondition(e,"$exists",!0)}doesNotExist(e){return this._addCondition(e,"$exists",!1)}matches(e,t,r){return this._addCondition(e,"$regex",t),r=r||"","string"!=typeof t&&(t.ignoreCase&&(r+="i"),t.multiline&&(r+="m")),r.length&&this._addCondition(e,"$options",r),this}matchesQuery(e,t){const r=t.toJSON();return r.className=t.className,this._addCondition(e,"$inQuery",r)}doesNotMatchQuery(e,t){const r=t.toJSON();return r.className=t.className,this._addCondition(e,"$notInQuery",r)}matchesKeyInQuery(e,t,r){const n=r.toJSON();return n.className=r.className,this._addCondition(e,"$select",{key:t,query:n})}doesNotMatchKeyInQuery(e,t,r){const n=r.toJSON();return n.className=r.className,this._addCondition(e,"$dontSelect",{key:t,query:n})}contains(e,t){if("string"!=typeof t)throw new Error("The value being searched for must be a string.");return this._addCondition(e,"$regex",R(t))}fullText(e,t,r){if(r=r||{},!e)throw new Error("A key is required.");if(!t)throw new Error("A search term is required");if("string"!=typeof t)throw new Error("The value being searched for must be a string.");const n={};n.$term=t;for(const s in r)switch(s){case"language":n.$language=r[s];break;case"caseSensitive":n.$caseSensitive=r[s];break;case"diacriticSensitive":n.$diacriticSensitive=r[s];break;default:throw new Error("Unknown option: "+s)}return this._addCondition(e,"$text",{$search:n})}sortByTextScore(){return this.ascending("$score"),this.select(["$score"]),this}startsWith(e,t,r){if("string"!=typeof t)throw new Error("The value being searched for must be a string.");return this.matches(e,this._regexStartWith(t),r)}endsWith(e,t,r){if("string"!=typeof t)throw new Error("The value being searched for must be a string.");return this.matches(e,R(t)+"$",r)}near(e,t){return t instanceof C.default||(t=new C.default(t)),this._addCondition(e,"$nearSphere",t)}withinRadians(e,t,r,n){return n||void 0===n?(this.near(e,t),this._addCondition(e,"$maxDistance",r)):this._addCondition(e,"$geoWithin",{$centerSphere:[[t.longitude,t.latitude],r]})}withinMiles(e,t,r,n){return this.withinRadians(e,t,r/3958.8,n)}withinKilometers(e,t,r,n){return this.withinRadians(e,t,r/6371,n)}withinGeoBox(e,t,r){return t instanceof C.default||(t=new C.default(t)),r instanceof C.default||(r=new C.default(r)),this._addCondition(e,"$within",{$box:[t,r]}),this}withinPolygon(e,t){return this._addCondition(e,"$geoWithin",{$polygon:t})}polygonContains(e,t){return this._addCondition(e,"$geoIntersects",{$point:t})}ascending(){this._order=[];for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.addAscending.apply(this,t)}addAscending(){this._order||(this._order=[]);for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,o.default)(t).call(t,e=>{var t;(0,v.default)(e)&&(e=e.join()),this._order=(0,p.default)(t=this._order).call(t,e.replace(/\s/g,"").split(","))}),this}descending(){this._order=[];for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.addDescending.apply(this,t)}addDescending(){this._order||(this._order=[]);for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,o.default)(t).call(t,e=>{var t;(0,v.default)(e)&&(e=e.join()),this._order=(0,p.default)(t=this._order).call(t,(0,c.default)(t=e.replace(/\s/g,"").split(",")).call(t,e=>"-"+e))}),this}skip(e){if("number"!=typeof e||e<0)throw new Error("You can only skip by a positive number");return this._skip=e,this}limit(e){if("number"!=typeof e)throw new Error("You can only set the limit to a numeric value");return this._limit=e,this}withCount(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];if("boolean"!=typeof e)throw new Error("You can only set withCount to a boolean value");return this._count=e,this}include(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,o.default)(t).call(t,e=>{var t;(0,v.default)(e)?this._include=(0,p.default)(t=this._include).call(t,e):this._include.push(e)}),this}includeAll(){return this.include("*")}select(){this._select||(this._select=[]);for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,o.default)(t).call(t,e=>{var t;(0,v.default)(e)?this._select=(0,p.default)(t=this._select).call(t,e):this._select.push(e)}),this}exclude(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,o.default)(t).call(t,e=>{var t;(0,v.default)(e)?this._exclude=(0,p.default)(t=this._exclude).call(t,e):this._exclude.push(e)}),this}watch(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,o.default)(t).call(t,e=>{var t;(0,v.default)(e)?this._watch=(0,p.default)(t=this._watch).call(t,e):this._watch.push(e)}),this}readPreference(e,t,r){return this._readPreference=e,this._includeReadPreference=t||null,this._subqueryReadPreference=r||null,this}async subscribe(e){const t=await w.default.getUserController().currentUserAsync(),r=(e=e||t&&t.getSessionToken()||void 0,await w.default.getLiveQueryController().getDefaultLiveQueryClient()),n=(r.shouldOpen()&&r.open(),r.subscribe(this,e));return n.subscribePromise.then(()=>n)}static or(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=I(t);const s=new T(n);return s._orQuery(t),s}static and(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=I(t);const s=new T(n);return s._andQuery(t),s}static nor(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=I(t);const s=new T(n);return s._norQuery(t),s}fromNetwork(){return this._queriesLocalDatastore=!1,this._localDatastorePinName=null,this}fromLocalDatastore(){return this.fromPinWithName(null)}fromPin(){return this.fromPinWithName(A.DEFAULT_PIN)}fromPinWithName(e){const t=w.default.getLocalDatastore();return t.checkIfEnabled()&&(this._queriesLocalDatastore=!0,this._localDatastorePinName=e),this}cancel(){return this._xhrRequest.task&&"function"==typeof this._xhrRequest.task.abort?(this._xhrRequest.task._aborted=!0,this._xhrRequest.task.abort(),this._xhrRequest.task=null,this._xhrRequest.onchange=()=>{}):this._xhrRequest.onchange=()=>this.cancel(),this}_setRequestTask(e){e.requestTask=e=>{this._xhrRequest.task=e,this._xhrRequest.onchange()}}comment(e){if(null==e)delete this._comment;else{if("string"!=typeof e)throw new Error("The value of a comment to be sent with this query must be a string.");this._comment=e}return this}}n={find(e,t,r){const n=w.default.getRESTController();return n.request("GET","classes/"+e,t,r)},aggregate(e,t,r){const n=w.default.getRESTController();return n.request("GET","aggregate/"+e,t,r)}};w.default.setParseQuery(T),w.default.setQueryController(n),r.default=T},{"./CoreManager":4,"./LocalDatastoreUtils":17,"./OfflineQuery":19,"./ParseError":24,"./ParseGeoPoint":26,"./ParseObject":30,"./encode":56,"./promiseUtils":61,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/instance/bind":67,"@babel/runtime-corejs3/core-js-stable/instance/concat":68,"@babel/runtime-corejs3/core-js-stable/instance/filter":71,"@babel/runtime-corejs3/core-js-stable/instance/find":73,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/includes":75,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/instance/keys":77,"@babel/runtime-corejs3/core-js-stable/instance/map":78,"@babel/runtime-corejs3/core-js-stable/instance/slice":80,"@babel/runtime-corejs3/core-js-stable/instance/sort":82,"@babel/runtime-corejs3/core-js-stable/instance/splice":83,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/entries":92,"@babel/runtime-corejs3/core-js-stable/object/keys":96,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],34:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/array/is-array"))),i=s(e("@babel/runtime-corejs3/helpers/defineProperty")),o=s(e("./CoreManager"));r.default=class{constructor(e,t){(0,i.default)(this,"parent",void 0),(0,i.default)(this,"key",void 0),(0,i.default)(this,"targetClassName",void 0),this.parent=e,this.key=t,this.targetClassName=null}_ensureParentAndKey(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}add(e){(0,a.default)(e)||(e=[e]);const t=o.default.getParseOp()["RelationOp"];var r=new t(e,[]);const n=this.parent;if(n)return 0!==e.length&&(n.set(this.key,r),this.targetClassName=r._targetClassName),n;throw new Error("Cannot add to a Relation without a parent")}remove(e){(0,a.default)(e)||(e=[e]);const t=o.default.getParseOp()["RelationOp"];var r=new t([],e);if(!this.parent)throw new Error("Cannot remove from a Relation without a parent");0!==e.length&&(this.parent.set(this.key,r),this.targetClassName=r._targetClassName)}toJSON(){return{__type:"Relation",className:this.targetClassName}}query(){let e;var t=this.parent;if(!t)throw new Error("Cannot construct a query for a Relation without a parent");const r=o.default.getParseQuery();return this.targetClassName?e=new r(this.targetClassName):(e=new r(t.className))._extraOptions.redirectClassNameForKey=this.key,e._addCondition("$relatedTo","object",{__type:"Pointer",className:t.className,objectId:t.id}),e._addCondition("$relatedTo","key",this.key),e}}},{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],35:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),n=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("./CoreManager"))),a=s(e("./ParseACL")),i=s(e("./ParseError")),s=s(e("./ParseObject"));class o extends s.default{constructor(e,t){super("_Role"),"string"==typeof e&&t instanceof a.default&&(this.setName(e),this.setACL(t))}getName(){var e=this.get("name");return null==e||"string"==typeof e?e:""}setName(e,t){return this._validateName(e),this.set("name",e,t)}getUsers(){return this.relation("users")}getRoles(){return this.relation("roles")}_validateName(e){if("string"!=typeof e)throw new i.default(i.default.OTHER_CAUSE,"A role's name must be a String.");if(!/^[0-9a-zA-Z\-_ ]+$/.test(e))throw new i.default(i.default.OTHER_CAUSE,"A role's name can be only contain alphanumeric characters, _, -, and spaces.")}validate(e,t){t=super.validate(e,t);if(t)return t;if("name"in e&&e.name!==this.getName()){t=e.name;if(this.id&&this.id!==e.objectId)return new i.default(i.default.OTHER_CAUSE,"A role's name can only be set before it has been saved.");try{this._validateName(t)}catch(e){return e}}return!1}}n.default.setParseRole(o),s.default.registerSubclass("_Role",o);r.default=o},{"./CoreManager":4,"./ParseACL":21,"./ParseError":24,"./ParseObject":30,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],36:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/instance/index-of"))),i=s(e("@babel/runtime-corejs3/helpers/defineProperty")),o=s(e("./CoreManager")),l=s(e("./ParseObject")),u=s(e("./ParseCLP"));const c=["String","Number","Boolean","Bytes","Date","File","GeoPoint","Polygon","Array","Object","Pointer","Relation"];o.default.setSchemaController({send(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};const n=o.default.getRESTController();return n.request(t,"schemas/"+e,r,{useMasterKey:!0})},get(e){return this.send(e,"GET")},create(e,t){return this.send(e,"POST",t)},update(e,t){return this.send(e,"PUT",t)},delete(e){return this.send(e,"DELETE")},purge(e){const t=o.default.getRESTController();return t.request("DELETE","purge/"+e,{},{useMasterKey:!0})}}),r.default=class{constructor(e){(0,i.default)(this,"className",void 0),(0,i.default)(this,"_fields",void 0),(0,i.default)(this,"_indexes",void 0),(0,i.default)(this,"_clp",void 0),"string"==typeof e&&("User"===e&&o.default.get("PERFORM_USER_REWRITE")?this.className="_User":this.className=e),this._fields={},this._indexes={}}static all(){const e=o.default.getSchemaController();return e.get("").then(e=>{if(0===e.results.length)throw new Error("Schema not found.");return e.results})}get(){this.assertClassName();const e=o.default.getSchemaController();return e.get(this.className).then(e=>{if(e)return e;throw new Error("Schema not found.")})}save(){this.assertClassName();const e=o.default.getSchemaController();var t={className:this.className,fields:this._fields,indexes:this._indexes,classLevelPermissions:this._clp};return e.create(this.className,t)}update(){this.assertClassName();const e=o.default.getSchemaController();var t={className:this.className,fields:this._fields,indexes:this._indexes,classLevelPermissions:this._clp};return this._fields={},this._indexes={},e.update(this.className,t)}delete(){this.assertClassName();const e=o.default.getSchemaController();return e.delete(this.className)}purge(){this.assertClassName();const e=o.default.getSchemaController();return e.purge(this.className)}assertClassName(){if(!this.className)throw new Error("You must set a Class Name before making any request.")}setCLP(e){return e instanceof u.default?this._clp=e.toJSON():this._clp=e,this}addField(e,t,r){if(t=t||"String",r=r||{},!e)throw new Error("field name may not be null.");if(-1===(0,a.default)(c).call(c,t))throw new Error(t+" is not a valid type.");if("Pointer"===t)return this.addPointer(e,r.targetClass,r);if("Relation"===t)return this.addRelation(e,r.targetClass);const n={type:t};return"boolean"==typeof r.required&&(n.required=r.required),void 0!==r.defaultValue&&(n.defaultValue=r.defaultValue),"Date"===t&&r&&r.defaultValue&&(n.defaultValue={__type:"Date",iso:new Date(r.defaultValue)}),"Bytes"===t&&r&&r.defaultValue&&(n.defaultValue={__type:"Bytes",base64:r.defaultValue}),this._fields[e]=n,this}addIndex(e,t){if(!e)throw new Error("index name may not be null.");if(t)return this._indexes[e]=t,this;throw new Error("index may not be null.")}addString(e,t){return this.addField(e,"String",t)}addNumber(e,t){return this.addField(e,"Number",t)}addBoolean(e,t){return this.addField(e,"Boolean",t)}addBytes(e,t){return this.addField(e,"Bytes",t)}addDate(e,t){return this.addField(e,"Date",t)}addFile(e,t){return this.addField(e,"File",t)}addGeoPoint(e,t){return this.addField(e,"GeoPoint",t)}addPolygon(e,t){return this.addField(e,"Polygon",t)}addArray(e,t){return this.addField(e,"Array",t)}addObject(e,t){return this.addField(e,"Object",t)}addPointer(e,t,r){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.");const n={type:"Pointer",targetClass:t};return"boolean"==typeof r?.required&&(n.required=r.required),void 0!==r?.defaultValue&&(n.defaultValue=r.defaultValue,r.defaultValue instanceof l.default&&(n.defaultValue=r.defaultValue.toPointer())),this._fields[e]=n,this}addRelation(e,t){if(!e)throw new Error("field name may not be null.");if(t)return this._fields[e]={type:"Relation",targetClass:t},this;throw new Error("You need to set the targetClass of the Relation.")}deleteField(e){return this._fields[e]={__op:"Delete"},this}deleteIndex(e){return this._indexes[e]={__op:"Delete"},this}}},{"./CoreManager":4,"./ParseCLP":22,"./ParseObject":30,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],37:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/promise"))),i=s(e("./CoreManager")),o=s(e("./isRevocableSession")),l=s(e("./ParseObject")),u=s(e("./ParseUser"));class c extends l.default{constructor(e){if(super("_Session"),e&&"object"==typeof e)try{this.set(e||{})}catch(e){throw new Error("Can't create an invalid Session")}}getSessionToken(){var e=this.get("sessionToken");return"string"==typeof e?e:""}static readOnlyAttributes(){return["createdWith","expiresAt","installationId","restricted","sessionToken","user"]}static current(e){const t=i.default.getSessionController(),r=l.default._getRequestOptions(e);return u.default.currentAsync().then(e=>e?(r.sessionToken=e.getSessionToken(),t.getSession(r)):a.default.reject("There is no current user."))}static isCurrentSessionRevocable(){const e=u.default.current();return!!e&&(0,o.default)(e.getSessionToken()||"")}}l.default.registerSubclass("_Session",c);i.default.setSessionController({getSession(e){const t=i.default.getRESTController(),r=new c;return t.request("GET","sessions/me",{},e).then(e=>(r._finishFetch(e),r._setExisted(!0),r))}}),r.default=c},{"./CoreManager":4,"./ParseObject":30,"./ParseUser":38,"./isRevocableSession":59,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],38:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),l=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/promise"))),a=s(e("@babel/runtime-corejs3/core-js-stable/object/define-property")),i=s(e("@babel/runtime-corejs3/core-js-stable/json/stringify")),u=s(e("./CoreManager")),o=s(e("./isRevocableSession")),c=s(e("./ParseError")),f=s(e("./ParseObject")),d=s(e("./Storage"));const p="currentUser";let b=!u.default.get("IS_NODE"),h=!1,y=null;const m={};class g extends f.default{constructor(e){if(super("_User"),e&&"object"==typeof e)try{this.set(e||{})}catch(e){throw new Error("Can't create an invalid Parse User")}}_upgradeToRevocableSession(e){e=f.default._getRequestOptions(e);const t=u.default.getUserController();return t.upgradeToRevocableSession(this,e)}linkWith(e,t){let a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};a.sessionToken=a.sessionToken||this.getSessionToken()||"";let r;var n;if("string"==typeof e?(r=e,e=m[e]||(n={restoreAuthentication(){return!0},getAuthType(){return r}},m[n.getAuthType()]=n)):r=e.getAuthType(),t&&Object.hasOwn(t,"authData")){const s=this.get("authData")||{};if("object"!=typeof s)throw new Error("Invalid type: authData field should be an object");s[r]=t.authData;const i=s.anonymous,o=(this.stripAnonymity(),u.default.getUserController());return o.linkWith(this,s,a).catch(e=>{throw delete s[r],this.restoreAnonimity(i),e})}return new l.default((n,s)=>{e.authenticate({success:(e,t)=>{const r={};r.authData=t,this.linkWith(e,r,a).then(()=>{n(this)},e=>{s(e)})},error:(e,t)=>{s(t)}})})}_linkWith(e,t){return this.linkWith(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{})}_synchronizeAuthData(t){if(this.isCurrent()&&t){let e;"string"==typeof t?(e=t,t=m[e]):e=t.getAuthType();var r=this.get("authData");t&&r&&"object"==typeof r&&(t.restoreAuthentication(r[e])||this._unlinkFrom(t))}}_synchronizeAllAuthData(){var e=this.get("authData");if("object"==typeof e)for(const t in e)this._synchronizeAuthData(t)}_cleanupAuthData(){if(this.isCurrent()){const e=this.get("authData");if("object"==typeof e)for(const t in e)e[t]||delete e[t]}}_unlinkFrom(e,t){return this.linkWith(e,{authData:null},t).then(()=>(this._synchronizeAuthData(e),l.default.resolve(this)))}_isLinked(e){let t;t="string"==typeof e?e:e.getAuthType();e=this.get("authData")||{};return"object"==typeof e&&!!e[t]}_logOutWithAll(){var e=this.get("authData");if("object"==typeof e)for(const t in e)this._logOutWith(t)}_logOutWith(e){this.isCurrent()&&(e="string"==typeof e?m[e]:e)&&e.deauthenticate&&e.deauthenticate()}_preserveFieldsOnFetch(){return{sessionToken:this.get("sessionToken")}}isCurrent(){var e=g.current();return!!e&&e.id===this.id}async isCurrentAsync(){var e=await g.currentAsync();return!!e&&e.id===this.id}stripAnonymity(){const e=this.get("authData");e&&"object"==typeof e&&Object.hasOwn(e,"anonymous")&&(e.anonymous=null)}restoreAnonimity(e){if(e){const t=this.get("authData");t.anonymous=e}}getUsername(){var e=this.get("username");return null==e||"string"==typeof e?e:""}setUsername(e){this.stripAnonymity(),this.set("username",e)}setPassword(e){this.set("password",e)}getEmail(){var e=this.get("email");return null==e||"string"==typeof e?e:""}setEmail(e){return this.set("email",e)}getSessionToken(){var e=this.get("sessionToken");return null==e||"string"==typeof e?e:""}authenticated(){var e=g.current();return!!this.get("sessionToken")&&!!e&&e.id===this.id}signUp(e,t){t=f.default._getRequestOptions(t);const r=u.default.getUserController();return r.signUp(this,e,t)}logIn(){const e=f.default._getRequestOptions(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}),t=(Object.hasOwn(e,"usePost")||(e.usePost=!0),u.default.getUserController());return t.logIn(this,e)}async save(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return await super.save.apply(this,t),await this.isCurrentAsync()?u.default.getUserController().updateUserOnDisk(this):this}async destroy(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return await super.destroy.apply(this,t),await this.isCurrentAsync()?u.default.getUserController().removeUserFromDisk():this}async fetch(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return await super.fetch.apply(this,t),await this.isCurrentAsync()?u.default.getUserController().updateUserOnDisk(this):this}async fetchWithInclude(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return await super.fetchWithInclude.apply(this,t),await this.isCurrentAsync()?u.default.getUserController().updateUserOnDisk(this):this}verifyPassword(e,t){var r=this.getUsername()||"";return g.verifyPassword(r,e,t)}static readOnlyAttributes(){return["sessionToken"]}static extend(e,t){if(e)for(const r in e)"className"!==r&&(0,a.default)(g.prototype,r,{value:e[r],enumerable:!1,writable:!0,configurable:!0});if(t)for(const n in t)"className"!==n&&(0,a.default)(g,n,{value:t[n],enumerable:!1,writable:!0,configurable:!0});return g}static current(){if(!b)return null;const e=u.default.getUserController();return e.currentUser()}static currentAsync(){if(!b)return l.default.resolve(null);const e=u.default.getUserController();return e.currentUserAsync()}static signUp(e,t,r,n){(r=r||{}).username=e,r.password=t;const s=new this(r);return s.signUp({},n)}static logIn(e,t,r){if("string"!=typeof e)return l.default.reject(new c.default(c.default.OTHER_CAUSE,"Username must be a string."));if("string"!=typeof t)return l.default.reject(new c.default(c.default.OTHER_CAUSE,"Password must be a string."));const n=new this;return n._finishFetch({username:e,password:t}),n.logIn(r)}static logInWithAdditionalAuth(e,t,r,n){if("string"!=typeof e)return l.default.reject(new c.default(c.default.OTHER_CAUSE,"Username must be a string."));if("string"!=typeof t)return l.default.reject(new c.default(c.default.OTHER_CAUSE,"Password must be a string."));if("[object Object]"!==Object.prototype.toString.call(r))return l.default.reject(new c.default(c.default.OTHER_CAUSE,"Auth must be an object."));const s=new this;return s._finishFetch({username:e,password:t,authData:r}),s.logIn(n)}static loginAs(e){if(!e)throw new c.default(c.default.USERNAME_MISSING,"Cannot log in as user with an empty user id");const t=u.default.getUserController();var r=new this;return t.loginAs(r,e)}static become(e,t){if(!b)throw new Error("It is not memory-safe to become a user in a server environment");const r=f.default._getRequestOptions(t),n=(r.sessionToken=e,u.default.getUserController());t=new this;return n.become(t,r)}static me(e,t){const r=u.default.getUserController(),n=f.default._getRequestOptions(t);n.sessionToken=e;t=new this;return r.me(t,n)}static hydrate(e){const t=u.default.getUserController();var r=new this;return t.hydrate(r,e)}static logInWith(e,t,r){const n=new this;return n.linkWith(e,t,r)}static logOut(e){const t=u.default.getUserController();return t.logOut(e)}static requestPasswordReset(e,t){t=f.default._getRequestOptions(t);const r=u.default.getUserController();return r.requestPasswordReset(e,t)}static requestEmailVerification(e,t){t=f.default._getRequestOptions(t);const r=u.default.getUserController();return r.requestEmailVerification(e,t)}static verifyPassword(e,t,r){if("string"!=typeof e)return l.default.reject(new c.default(c.default.OTHER_CAUSE,"Username must be a string."));if("string"!=typeof t)return l.default.reject(new c.default(c.default.OTHER_CAUSE,"Password must be a string."));const n=u.default.getUserController();return n.verifyPassword(e,t,r||{})}static allowCustomUserClass(e){u.default.set("PERFORM_USER_REWRITE",!e)}static enableRevocableSession(e){if(e=e||{},u.default.set("FORCE_REVOCABLE_SESSION",!0),b){const t=g.current();if(t)return t._upgradeToRevocableSession(e)}return l.default.resolve()}static enableUnsafeCurrentUser(){b=!0}static disableUnsafeCurrentUser(){b=!1}static _registerAuthenticationProvider(t){m[t.getAuthType()]=t,g.currentAsync().then(e=>{e&&e._synchronizeAuthData(t.getAuthType())})}static _logInWith(e,t,r){const n=new this;return n.linkWith(e,t,r)}static _clearCache(){y=null,h=!1}static _setCurrentUserCache(e){y=e}}f.default.registerSubclass("_User",g);const j={updateUserOnDisk(e){var t=d.default.generatePath(p);const r=e.toJSON();delete r.password,r.className="_User";let n=(0,i.default)(r);if(u.default.get("ENCRYPTED_USER")){const s=u.default.getCryptoController();n=s.encrypt(r,u.default.get("ENCRYPTED_KEY"))}return d.default.setItemAsync(t,n).then(()=>e)},removeUserFromDisk(){var e=d.default.generatePath(p);return h=!0,y=null,d.default.removeItemAsync(e)},setCurrentUser(e){return(y=e)._cleanupAuthData(),e._synchronizeAllAuthData(),j.updateUserOnDisk(e)},currentUser(){if(y)return y;if(h)return null;if(d.default.async())throw new Error("Cannot call currentUser() when using a platform with an async storage system. Call currentUserAsync() instead.");var e=d.default.generatePath(p);let t=d.default.getItem(e);if(h=!0,!t)return y=null;if(u.default.get("ENCRYPTED_USER")){const n=u.default.getCryptoController();t=n.decrypt(t,u.default.get("ENCRYPTED_KEY"))}(t=JSON.parse(t)).className||(t.className="_User"),t._id&&(t.objectId!==t._id&&(t.objectId=t._id),delete t._id),t._sessionToken&&(t.sessionToken=t._sessionToken,delete t._sessionToken);const r=f.default.fromJSON(t);return(y=r)._synchronizeAllAuthData(),r},currentUserAsync(){var e;return y?l.default.resolve(y):h?l.default.resolve(null):(e=d.default.generatePath(p),d.default.getItemAsync(e).then(e=>{if(h=!0,!e)return y=null,l.default.resolve(null);if(u.default.get("ENCRYPTED_USER")){const r=u.default.getCryptoController();e=r.decrypt(e.toString(),u.default.get("ENCRYPTED_KEY"))}(e=JSON.parse(e)).className||(e.className="_User"),e._id&&(e.objectId!==e._id&&(e.objectId=e._id),delete e._id),e._sessionToken&&(e.sessionToken=e._sessionToken,delete e._sessionToken);const t=f.default.fromJSON(e);return(y=t)._synchronizeAllAuthData(),l.default.resolve(t)}))},signUp(e,t,r){var n=t&&t.username||e.get("username"),s=t&&t.password||e.get("password");return n&&n.length?s&&s.length?e.save(t,r).then(()=>(e._finishFetch({password:void 0}),b?j.setCurrentUser(e):e)):l.default.reject(new c.default(c.default.OTHER_CAUSE,"Cannot sign up user with an empty password.")):l.default.reject(new c.default(c.default.OTHER_CAUSE,"Cannot sign up user with an empty username."))},logIn(t,e){const r=u.default.getRESTController(),n=u.default.getObjectStateController();var s={username:t.get("username"),password:t.get("password"),authData:t.get("authData")};return r.request(e.usePost?"POST":"GET","login",s,e).then(e=>(t._migrateId(e.objectId),t._setExisted(!0),n.setPendingOp(t._getStateIdentifier(),"username",void 0),n.setPendingOp(t._getStateIdentifier(),"password",void 0),e.password=void 0,t._finishFetch(e),b?j.setCurrentUser(t):l.default.resolve(t)))},loginAs(t,e){const r=u.default.getRESTController();return r.request("POST","loginAs",{userId:e},{useMasterKey:!0}).then(e=>(t._finishFetch(e),t._setExisted(!0),b?j.setCurrentUser(t):l.default.resolve(t)))},become(t,e){const r=u.default.getRESTController();return r.request("GET","users/me",{},e).then(e=>(t._finishFetch(e),t._setExisted(!0),j.setCurrentUser(t)))},hydrate(e,t){return e._finishFetch(t),e._setExisted(!0),t.sessionToken&&b?j.setCurrentUser(e):l.default.resolve(e)},me(t,e){const r=u.default.getRESTController();return r.request("GET","users/me",{},e).then(e=>(t._finishFetch(e),t._setExisted(!0),t))},logOut(e){const s=u.default.getRESTController();return e?.sessionToken?s.request("POST","logout",{},e):j.currentUserAsync().then(e=>{var t=d.default.generatePath(p);let r=d.default.removeItemAsync(t);if(null!==e){const n=e.getSessionToken();n&&(0,o.default)(n)&&(r=r.then(()=>s.request("POST","logout",{},{sessionToken:n}))),e._logOutWithAll(),e._finishFetch({sessionToken:void 0})}return h=!0,y=null,r})},requestPasswordReset(e,t){const r=u.default.getRESTController();return r.request("POST","requestPasswordReset",{email:e},t)},async upgradeToRevocableSession(e,t){var r=e.getSessionToken();if(!r)return l.default.reject(new c.default(c.default.SESSION_MISSING,"Cannot upgrade a user with no session token"));t.sessionToken=r;const n=u.default.getRESTController();r=await n.request("POST","upgradeToRevocableSession",{},t),e._finishFetch({sessionToken:r?.sessionToken||""}),t=await e.isCurrentAsync();return t?j.setCurrentUser(e):l.default.resolve(e)},linkWith(e,t,r){return e.save({authData:t},r).then(()=>b?j.setCurrentUser(e):e)},verifyPassword(e,t,r){const n=u.default.getRESTController();e={username:e,password:t,...void 0!==r.ignoreEmailVerification&&{ignoreEmailVerification:r.ignoreEmailVerification}};return n.request("GET","verifyPassword",e,r)},requestEmailVerification(e,t){const r=u.default.getRESTController();return r.request("POST","verificationEmailRequest",{email:e},t)}};u.default.setParseUser(g),u.default.setUserController(j);r.default=g},{"./CoreManager":4,"./ParseError":24,"./ParseObject":30,"./Storage":43,"./isRevocableSession":59,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],39:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.getPushStatus=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};const r={useMasterKey:!0};Object.hasOwn(t,"useMasterKey")&&(r.useMasterKey=t.useMasterKey);const n=new i.default("_PushStatus");return n.get(e,r)},r.send=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};e.where&&e.where instanceof i.default&&(e.where=e.where.toJSON().where);e.push_time&&"object"==typeof e.push_time&&(e.push_time=e.push_time.toJSON());e.expiration_time&&"object"==typeof e.expiration_time&&(e.expiration_time=e.expiration_time.toJSON());if(e.expiration_time&&e.expiration_interval)throw new Error("expiration_time and expiration_interval cannot both be set.");const r={useMasterKey:!0};Object.hasOwn(t,"useMasterKey")&&(r.useMasterKey=t.useMasterKey);return a.default.getPushController().send(e,r)},s(e("./CoreManager"))),i=s(e("./ParseQuery"));a.default.setPushController({async send(e,t){return t.returnStatus=!0,(await a.default.getRESTController().request("POST","push",e,t))._headers?.["X-Parse-Push-Status-Id"]}})},{"./CoreManager":4,"./ParseQuery":33,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],40:[function(s,e,a){!function(A){!function(){"use strict";var e=s("@babel/runtime-corejs3/core-js-stable/object/define-property"),t=s("@babel/runtime-corejs3/helpers/interopRequireDefault"),g=(e(a,"__esModule",{value:!0}),a.default=void 0,t(s("@babel/runtime-corejs3/core-js-stable/promise"))),j=t(s("@babel/runtime-corejs3/core-js-stable/json/stringify")),r=t(s("@babel/runtime-corejs3/core-js-stable/instance/includes")),v=t(s("@babel/runtime-corejs3/core-js-stable/instance/index-of")),_=t(s("@babel/runtime-corejs3/core-js-stable/instance/bind")),w=t(s("@babel/runtime-corejs3/core-js-stable/instance/for-each")),E=t(s("@babel/runtime-corejs3/core-js-stable/set-timeout")),n=t(s("./uuid")),S=t(s("./CoreManager")),O=t(s("./ParseError")),C=s("./promiseUtils");t(s("./Xhr.weapp"));let x=null,P=("undefined"!=typeof XMLHttpRequest&&(x=XMLHttpRequest),!1);"undefined"==typeof XDomainRequest||"withCredentials"in new XMLHttpRequest||(P=!0);const c={ajax(i,o,l,u,c){var e,s,a,f,d;if(P)return s=i,a=o,f=l,d=c,new g.default((t,r)=>{const n=new XDomainRequest;n.onload=function(){let e;try{e=JSON.parse(n.responseText)}catch(e){r(e)}e&&t({response:e})},n.onerror=n.ontimeout=function(){var e={responseText:(0,j.default)({code:O.default.X_DOMAIN_REQUEST,error:"IE's XDomainRequest does not supply error info."})};r(e)},n.onprogress=function(){d&&"function"==typeof d.progress&&d.progress(n.responseText)},n.open(s,a),n.send(f),d&&"function"==typeof d.requestTask&&d.requestTask(n)});const p=(0,C.resolvingPromise)(),b=S.default.get("IDEMPOTENCY")&&(0,r.default)(e=["POST","PUT"]).call(e,i),h=b?(0,n.default)():"";let y=0;function m(){if(null==x)throw new Error("Cannot make a request: No definition of XMLHttpRequest was found.");let e=!1;const a=new x;a.onreadystatechange=function(){if(4===a.readyState&&!e&&!a._aborted)if(e=!0,200<=a.status&&a.status<300){let e;try{var t,r;e=JSON.parse(a.responseText);const s="function"==typeof a.getAllResponseHeaders?a.getAllResponseHeaders():"";u={},"function"==typeof a.getResponseHeader&&0<=(null==(t=s)?void 0:(0,_.default)(n=Function.call).call(n,(0,v.default)(t),t))?.("access-control-expose-headers")&&(r=a.getResponseHeader("access-control-expose-headers").split(", "),(0,w.default)(r).call(r,e=>{0<=(0,v.default)(s).call(s,e.toLowerCase())&&(u[e]=a.getResponseHeader(e.toLowerCase()))}))}catch(e){p.reject(e.toString())}e&&p.resolve({response:e,headers:u,status:a.status,xhr:a})}else{var n;500<=a.status||0===a.status?++y<S.default.get("REQUEST_ATTEMPT_LIMIT")?(n=Math.round(125*Math.random()*Math.pow(2,y)),(0,E.default)(m,n)):0===a.status?p.reject("Unable to connect to the Parse API"):p.reject(a):p.reject(a)}},"string"!=typeof(u=u||{})["Content-Type"]&&(u["Content-Type"]="text/plain"),S.default.get("IS_NODE")&&(u["User-Agent"]="Parse/"+S.default.get("VERSION")+" (NodeJS "+A.versions.node+")"),b&&(u["X-Parse-Request-Id"]=h),S.default.get("SERVER_AUTH_TYPE")&&S.default.get("SERVER_AUTH_TOKEN")&&(u.Authorization=S.default.get("SERVER_AUTH_TYPE")+" "+S.default.get("SERVER_AUTH_TOKEN"));var t=S.default.get("REQUEST_HEADERS");for(const r in t)u[r]=t[r];if(c&&"function"==typeof c.progress){const n=function(e,t){t.lengthComputable?c.progress(t.loaded/t.total,t.loaded,t.total,{type:e}):c.progress(null,null,null,{type:e})};a.onprogress=e=>{n("download",e)},a.upload&&(a.upload.onprogress=e=>{n("upload",e)})}a.open(i,o,!0);for(const s in u)a.setRequestHeader(s,u[s]);a.onabort=function(){p.resolve({response:{results:[]},status:0,xhr:a})},a.send(l),c&&"function"==typeof c.requestTask&&c.requestTask(a)}return m(),p},request(t,e,r,s){s=s||{};let n=S.default.get("SERVER_URL");"/"!==n[n.length-1]&&(n+="/"),n+=e;const a={};if(r&&"object"==typeof r)for(const l in r)a[l]=r[l];e=s.context,void 0!==e&&(a._context=e),"POST"!==t&&(a._method=t,t="POST"),a._ApplicationId=S.default.get("APPLICATION_ID"),e=S.default.get("JAVASCRIPT_KEY");e&&(a._JavaScriptKey=e),a._ClientVersion=S.default.get("VERSION");let i=s.useMasterKey;if(i=void 0===i?S.default.get("USE_MASTER_KEY"):i){if(!S.default.get("MASTER_KEY"))throw new Error("Cannot use the Master Key, it has not been provided.");delete a._JavaScriptKey,a._MasterKey=S.default.get("MASTER_KEY")}s.useMaintenanceKey&&(a._MaintenanceKey=S.default.get("MAINTENANCE_KEY")),S.default.get("FORCE_REVOCABLE_SESSION")&&(a._RevocableSession="1");e=s.installationId;let o;if(e&&"string"==typeof e)o=g.default.resolve(e);else{const u=S.default.getInstallationController();o=u.currentInstallationId()}return o.then(e=>{a._InstallationId=e;const t=S.default.getUserController();return s&&"string"==typeof s.sessionToken?g.default.resolve(s.sessionToken):t?t.currentUserAsync().then(e=>e?g.default.resolve(e.getSessionToken()):g.default.resolve(null)):g.default.resolve(null)}).then(e=>{e&&(a._SessionToken=e);e=(0,j.default)(a);return c.ajax(t,n,e,{},s).then(e=>{var{response:e,status:t,headers:r,xhr:n}=e;return s.returnStatus?{...e,_status:t,_headers:r,_xhr:n}:e})}).catch(c.handleError)},handleError(t){let r;if(t&&t.responseText)try{var e=JSON.parse(t.responseText);r=new O.default(e.code,e.error)}catch(e){r=new O.default(O.default.INVALID_JSON,"Received an error with invalid JSON from Parse: "+t.responseText)}else{e=t.message||t;r=new O.default(O.default.CONNECTION_FAILED,"XMLHttpRequest failed: "+(0,j.default)(e))}return g.default.reject(r)},_setXHR(e){x=e},_getXHR(){return x}};a.default=c}.call(this)}.call(this,s("_process"))},{"./CoreManager":4,"./ParseError":24,"./Xhr.weapp":52,"./promiseUtils":61,"./uuid":64,"@babel/runtime-corejs3/core-js-stable/instance/bind":67,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/includes":75,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/core-js-stable/set-timeout":100,"@babel/runtime-corejs3/helpers/interopRequireDefault":104,_process:108}],41:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/weak-map"),a=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),i=e("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor"),s=(a(r,"__esModule",{value:!0}),r.clearAllState=function(){l={}},r.commitServerChanges=function(e,t){e=c(e);s.commitServerChanges(e.serverData,e.objectCache,t)},r.duplicateState=function(e,t){t.id=e.id},r.enqueueTask=function(e,t){const r=c(e);return r.tasks.enqueue(t)},r.estimateAttribute=function(e,t){var r=f(e),n=d(e);return s.estimateAttribute(r,n,e,t)},r.estimateAttributes=function(e){var t=f(e),r=d(e);return s.estimateAttributes(t,r,e)},r.getObjectCache=function(e){e=u(e);if(e)return e.objectCache;return{}},r.getPendingOps=d,r.getServerData=f,r.getState=u,r.initializeState=c,r.mergeFirstPendingState=function(e){e=d(e);s.mergeFirstPendingState(e)},r.popPendingState=function(e){e=c(e).pendingOps;return s.popPendingState(e)},r.pushPendingState=function(e){e=c(e).pendingOps;s.pushPendingState(e)},r.removeState=function(e){var t=u(e);return null!==t?(delete l[e.className][e.id],t):null},r.setPendingOp=function(e,t,r){e=c(e).pendingOps;s.setPendingOp(e,t,r)},r.setServerData=function(e,t){e=c(e).serverData;s.setServerData(e,t)},function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};t=o(t);if(t&&t.has(e))return t.get(e);var r,n={__proto__:null};for(r in e){var s;"default"!==r&&{}.hasOwnProperty.call(e,r)&&((s=a&&i?i(e,r):null)&&(s.get||s.set)?a(n,r,s):n[r]=e[r])}return n.default=e,t&&t.set(e,n),n}(e("./ObjectStateMutations")));function o(e){var t,r;return"function"!=typeof n?null:(t=new n,r=new n,(o=function(e){return e?r:t})(e))}let l={};function u(e){var t=l[e.className];return t&&t[e.id]||null}function c(e,t){let r=u(e);return r||(l[e.className]||(l[e.className]={}),t=t||s.defaultState(),r=l[e.className][e.id]=t),r}function f(e){e=u(e);return e?e.serverData:{}}function d(e){e=u(e);return e?e.pendingOps:[{}]}},{"./ObjectStateMutations":18,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":94,"@babel/runtime-corejs3/core-js-stable/weak-map":102}],42:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/helpers/defineProperty")));r.default=class{constructor(e){(0,a.default)(this,"onopen",void 0),(0,a.default)(this,"onmessage",void 0),(0,a.default)(this,"onclose",void 0),(0,a.default)(this,"onerror",void 0),this.onopen=()=>{},this.onmessage=()=>{},this.onclose=()=>{},this.onerror=()=>{},wx.onSocketOpen(()=>{this.onopen()}),wx.onSocketMessage(e=>{this.onmessage(e)}),wx.onSocketClose(e=>{this.onclose(e)}),wx.onSocketError(e=>{this.onerror(e)}),wx.connectSocket({url:e})}send(e){wx.sendSocketMessage({data:e})}close(){wx.closeSocket()}}},{"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],43:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/promise"))),i=s(e("./CoreManager"));r.default={async(){return!!i.default.getStorageController().async},getItem(e){const 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(e){const t=i.default.getStorageController();return 1===t.async?t.getItemAsync(e):a.default.resolve(t.getItem(e))},setItem(e,t){const 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(e,t){const r=i.default.getStorageController();return 1===r.async?r.setItemAsync(e,t):a.default.resolve(r.setItem(e,t))},removeItem(e){const 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(e){const t=i.default.getStorageController();return 1===t.async?t.removeItemAsync(e):a.default.resolve(t.removeItem(e))},getAllKeys(){const e=i.default.getStorageController();if(1===e.async)throw new Error("Synchronous storage is not supported by the current storage controller");return e.getAllKeys()},getAllKeysAsync(){const e=i.default.getStorageController();return 1===e.async?e.getAllKeysAsync():a.default.resolve(e.getAllKeys())},generatePath(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(){const e=i.default.getStorageController();Object.hasOwn(e,"clear")&&e.clear()}}},{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],44:[function(e,t,r){"use strict";e("@babel/runtime-corejs3/core-js-stable/object/define-property")(r,"__esModule",{value:!0}),r.default=void 0;e={async:0,getItem(e){return localStorage.getItem(e)},setItem(e,t){try{localStorage.setItem(e,t)}catch(e){console.log(e.message)}},removeItem(e){localStorage.removeItem(e)},getAllKeys(){const t=[];for(let e=0;e<localStorage.length;e+=1)t.push(localStorage.key(e));return t},clear(){localStorage.clear()}};r.default=e},{"@babel/runtime-corejs3/core-js-stable/object/define-property":91}],45:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/object/keys")));const i={};r.default={async:0,getItem(e){return Object.hasOwn(i,e)?i[e]:null},setItem(e,t){i[e]=String(t)},removeItem(e){delete i[e]},getAllKeys(){return(0,a.default)(i)},clear(){for(const e in i)Object.hasOwn(i,e)&&delete i[e]}}},{"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/keys":96,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],46:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),n=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("./StorageController.react-native")),s(e("./StorageController.browser"))),s=(s(e("./StorageController.weapp")),s(e("./StorageController.default")).default,n.default);r.default=s},{"./StorageController.browser":44,"./StorageController.default":45,"./StorageController.react-native":47,"./StorageController.weapp":48,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],47:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/promise"))),i=s(e("./CoreManager"));r.default={async:1,getItemAsync(e){return new a.default((r,n)=>{i.default.getAsyncStorage().getItem(e,(e,t)=>{e?n(e):r(t||null)})})},setItemAsync(e,n){return new a.default((t,r)=>{i.default.getAsyncStorage().setItem(e,n,e=>{e?r(e):t()})})},removeItemAsync(e){return new a.default((t,r)=>{i.default.getAsyncStorage().removeItem(e,e=>{e?r(e):t()})})},getAllKeysAsync(){return new a.default((r,n)=>{i.default.getAsyncStorage().getAllKeys((e,t)=>{e?n(e):r(t||[])})})},multiGet(e){return new a.default((r,n)=>{i.default.getAsyncStorage().multiGet(e,(e,t)=>{e?n(e):r(t||null)})})},multiRemove(n){return new a.default((t,r)=>{i.default.getAsyncStorage().multiRemove(n,e=>{e?r(e):t(n)})})},clear(){return i.default.getAsyncStorage().clear()}}},{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],48:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/instance/keys")));r.default={async:0,getItem(e){return wx.getStorageSync(e)},setItem(e,t){try{wx.setStorageSync(e,t)}catch(e){}},removeItem(e){wx.removeStorageSync(e)},getAllKeys(){var e=wx.getStorageInfoSync();return(0,a.default)(e)},clear(){wx.clearStorageSync()}}},{"@babel/runtime-corejs3/core-js-stable/instance/keys":77,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],49:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/helpers/defineProperty"))),i=e("./promiseUtils");r.default=class{constructor(){(0,a.default)(this,"queue",void 0),this.queue=[]}enqueue(e){const t=(0,i.resolvingPromise)();return this.queue.push({task:e,_completion:t}),1===this.queue.length&&e().then(()=>{this._dequeue(),t.resolve()},e=>{this._dequeue(),t.reject(e)}),t}_dequeue(){if(this.queue.shift(),this.queue.length){const t=this.queue[0];t.task().then(()=>{this._dequeue(),t._completion.resolve()},e=>{this._dequeue(),t._completion.reject(e)})}}}},{"./promiseUtils":61,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],50:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/weak-map"),a=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),i=e("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),o=(a(r,"__esModule",{value:!0}),r.clearAllState=function(){f=new o.default},r.commitServerChanges=function(e,t){e=p(e);l.commitServerChanges(e.serverData,e.objectCache,t)},r.duplicateState=function(e,t){const r=p(e),n=p(t);for(const s in r.serverData)n.serverData[s]=r.serverData[s];for(let e=0;e<r.pendingOps.length;e++)for(const a in r.pendingOps[e])n.pendingOps[e][a]=r.pendingOps[e][a];for(const i in r.objectCache)n.objectCache[i]=r.objectCache[i];n.existed=r.existed},r.enqueueTask=function(e,t){const r=p(e);return r.tasks.enqueue(t)},r.estimateAttribute=function(e,t){var r=b(e),n=h(e);return l.estimateAttribute(r,n,e,t)},r.estimateAttributes=function(e){var t=b(e),r=h(e);return l.estimateAttributes(t,r,e)},r.getObjectCache=function(e){e=d(e);if(e)return e.objectCache;return{}},r.getPendingOps=h,r.getServerData=b,r.getState=d,r.initializeState=p,r.mergeFirstPendingState=function(e){e=h(e);l.mergeFirstPendingState(e)},r.popPendingState=function(e){e=p(e).pendingOps;return l.popPendingState(e)},r.pushPendingState=function(e){e=p(e).pendingOps;l.pushPendingState(e)},r.removeState=function(e){var t=d(e);return null!==t?(f.delete(e),t):null},r.setPendingOp=function(e,t,r){e=p(e).pendingOps;l.setPendingOp(e,t,r)},r.setServerData=function(e,t){e=p(e).serverData;l.setServerData(e,t)},s(e("@babel/runtime-corejs3/core-js-stable/weak-map"))),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};t=c(t);if(t&&t.has(e))return t.get(e);var r,n={__proto__:null};for(r in e){var s;"default"!==r&&{}.hasOwnProperty.call(e,r)&&((s=a&&i?i(e,r):null)&&(s.get||s.set)?a(n,r,s):n[r]=e[r])}return n.default=e,t&&t.set(e,n),n}(e("./ObjectStateMutations")),u=s(e("./TaskQueue"));function c(e){var t,r;return"function"!=typeof n?null:(t=new n,r=new n,(c=function(e){return e?r:t})(e))}let f=new o.default;function d(e){return f.get(e)||null}function p(e,t){let r=d(e);return r||(t=t||{serverData:{},pendingOps:[{}],objectCache:{},tasks:new u.default,existed:!1},r=t,f.set(e,r)),r}function b(e){e=d(e);return e?e.serverData:{}}function h(e){e=d(e);return e?e.pendingOps:[{}]}},{"./ObjectStateMutations":18,"./TaskQueue":49,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":94,"@babel/runtime-corejs3/core-js-stable/weak-map":102,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],51:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault");n(r,"__esModule",{value:!0}),r.default=void 0,s(e("ws")),s(e("./Socket.weapp"));let a;try{a="function"==typeof WebSocket||"object"==typeof WebSocket?WebSocket:null}catch(e){}r.default=a},{"./Socket.weapp":42,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104,ws:513}],52:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=void 0,s(e("@babel/runtime-corejs3/core-js-stable/json/stringify"))),i=s(e("@babel/runtime-corejs3/helpers/defineProperty"));r.default=class{constructor(){(0,i.default)(this,"UNSENT",void 0),(0,i.default)(this,"OPENED",void 0),(0,i.default)(this,"HEADERS_RECEIVED",void 0),(0,i.default)(this,"LOADING",void 0),(0,i.default)(this,"DONE",void 0),(0,i.default)(this,"header",void 0),(0,i.default)(this,"readyState",void 0),(0,i.default)(this,"status",void 0),(0,i.default)(this,"response",void 0),(0,i.default)(this,"responseType",void 0),(0,i.default)(this,"responseText",void 0),(0,i.default)(this,"responseHeader",void 0),(0,i.default)(this,"method",void 0),(0,i.default)(this,"url",void 0),(0,i.default)(this,"onabort",void 0),(0,i.default)(this,"onprogress",void 0),(0,i.default)(this,"onerror",void 0),(0,i.default)(this,"onreadystatechange",void 0),(0,i.default)(this,"requestTask",void 0),this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.header={},this.readyState=this.DONE,this.status=0,this.response="",this.responseType="",this.responseText="",this.responseHeader={},this.method="",this.url="",this.onabort=()=>{},this.onprogress=()=>{},this.onerror=()=>{},this.onreadystatechange=()=>{},this.requestTask=null}getAllResponseHeaders(){let e="";for(const t in this.responseHeader)e+=t+":"+this.getResponseHeader(t)+"\r\n";return e}getResponseHeader(e){return this.responseHeader[e]}setRequestHeader(e,t){this.header[e]=t}open(e,t){this.method=e,this.url=t}abort(){this.requestTask&&(this.requestTask.abort(),this.status=0,this.response=void 0,this.onabort(),this.onreadystatechange())}send(e){this.requestTask=wx.request({url:this.url,method:this.method,data:e,header:this.header,responseType:this.responseType,success:e=>{this.status=e.statusCode,this.response=e.data,this.responseHeader=e.header,this.responseText=(0,a.default)(e.data),this.requestTask=null,this.onreadystatechange()},fail:e=>{this.requestTask=null,this.onerror(e)}}),this.requestTask.onProgressUpdate(e=>{e={lengthComputable:0!==e.totalBytesExpectedToWrite,loaded:e.totalBytesWritten,total:e.totalBytesExpectedToWrite};this.onprogress(e)})}}},{"@babel/runtime-corejs3/core-js-stable/json/stringify":86,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/defineProperty":103,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],53:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=function(t,r){if(-1<(0,a.default)(t).call(t,r))return!0;var n=i.default.getParseObject();for(let e=0;e<t.length;e++)if(t[e]instanceof n&&t[e].className===r.className&&t[e]._getId()===r._getId())return!0;return!1},s(e("@babel/runtime-corejs3/core-js-stable/instance/index-of"))),i=s(e("./CoreManager"))},{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],54:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=function(e){var t=i.default.getParseObject();if(e instanceof t){var r=e.attributes;for(const n in r)if(!function t(r){if("object"!=typeof r)return!0;if(r instanceof l.default)return!0;const e=i.default.getParseObject();if(r instanceof e)return!!r.id;if(r instanceof o.default)return!!r.url();if((0,a.default)(r)){for(let e=0;e<r.length;e++)if(!t(r[e]))return!1;return!0}for(const n in r)if(!t(r[n]))return!1;return!0}(r[n]))return!1}return!0},s(e("@babel/runtime-corejs3/core-js-stable/array/is-array"))),i=s(e("./CoreManager")),o=s(e("./ParseFile")),l=s(e("./ParseRelation"))},{"./CoreManager":4,"./ParseFile":25,"./ParseRelation":34,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],55:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),l=(n(r,"__esModule",{value:!0}),r.default=function r(e){if(null===e||"object"!=typeof e||e instanceof Date)return e;if((0,l.default)(e)){const s=[];return(0,u.default)(e).call(e,(e,t)=>{s[t]=r(e)}),s}if("string"==typeof e.__op){const a=c.default.getParseOp()["opFromJSON"];return a(e)}const t=c.default.getParseObject();if("Pointer"===e.__type&&e.className)return t.fromJSON(e);if("Object"===e.__type&&e.className)return t.fromJSON(e);if("Relation"===e.__type){const i=new b.default(null,null);return i.targetClassName=e.className,i}if("Date"===e.__type)return new Date(e.iso);if("File"===e.__type)return f.default.fromJSON(e);if("GeoPoint"===e.__type)return new d.default({latitude:e.latitude,longitude:e.longitude});if("Polygon"===e.__type)return new p.default(e.coordinates);const n={};for(const o in e)n[o]=r(e[o]);return n},s(e("@babel/runtime-corejs3/core-js-stable/array/is-array"))),u=s(e("@babel/runtime-corejs3/core-js-stable/instance/for-each")),c=s(e("./CoreManager")),f=s(e("./ParseFile")),d=s(e("./ParseGeoPoint")),p=s(e("./ParsePolygon")),b=s(e("./ParseRelation"))},{"./CoreManager":4,"./ParseFile":25,"./ParseGeoPoint":26,"./ParsePolygon":32,"./ParseRelation":34,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],56:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),d=(n(r,"__esModule",{value:!0}),r.default=function(e,t,r,n,s){return function t(e,r,n,s,a){const i=g.default.getParseObject();if(e instanceof i){if(r)throw new Error("Parse Objects not allowed here");const u=e.id?e.className+":"+e.id:e;var o;return n||!s||-1<(0,d.default)(s).call(s,u)||e.dirty()||(0,p.default)(e._getServerData()).length<1?a&&(0,b.default)(o=e._getId()).call(o,"local")?e.toOfflinePointer():e.toPointer():(s=(0,h.default)(s).call(s,u),e._toFullJSON(s,a))}const l=g.default.getParseOp()["Op"];if(e instanceof l||e instanceof j.default||e instanceof _.default||e instanceof w.default||e instanceof E.default)return e.toJSON();if(e instanceof v.default){if(e.url())return e.toJSON();throw new Error("Tried to encode an unsaved file.")}if("[object Date]"===Object.prototype.toString.call(e)){if(isNaN(e))throw new Error("Tried to encode an invalid date.");return{__type:"Date",iso:e.toJSON()}}if("[object RegExp]"===Object.prototype.toString.call(e)&&"string"==typeof e.source)return e.source;if((0,y.default)(e))return(0,m.default)(e).call(e,e=>t(e,r,n,s,a));if(e&&"object"==typeof e){const c={};for(const f in e)c[f]=t(e[f],r,n,s,a);return c}return e}(e,!!t,!!r,n||[],s)},s(e("@babel/runtime-corejs3/core-js-stable/instance/index-of"))),p=s(e("@babel/runtime-corejs3/core-js-stable/object/keys")),b=s(e("@babel/runtime-corejs3/core-js-stable/instance/starts-with")),h=s(e("@babel/runtime-corejs3/core-js-stable/instance/concat")),y=s(e("@babel/runtime-corejs3/core-js-stable/array/is-array")),m=s(e("@babel/runtime-corejs3/core-js-stable/instance/map")),g=s(e("./CoreManager")),j=s(e("./ParseACL")),v=s(e("./ParseFile")),_=s(e("./ParseGeoPoint")),w=s(e("./ParsePolygon")),E=s(e("./ParseRelation"))},{"./CoreManager":4,"./ParseACL":21,"./ParseFile":25,"./ParseGeoPoint":26,"./ParsePolygon":32,"./ParseRelation":34,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/instance/concat":68,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/instance/map":78,"@babel/runtime-corejs3/core-js-stable/instance/starts-with":84,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/keys":96,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],57:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),l=(n(r,"__esModule",{value:!0}),r.default=function t(r,n){const e=Object.prototype.toString;if("[object Date]"===e.call(r)||"[object Date]"===e.call(n)){const a=new Date(r),i=new Date(n);return+a==+i}if(typeof r!=typeof n)return!1;if(!r||"object"!=typeof r)return r===n;if((0,l.default)(r)||(0,l.default)(n)){if(!(0,l.default)(r)||!(0,l.default)(n))return!1;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e+=1)if(!t(r[e],n[e]))return!1;return!0}const s=c.default.getParseObject();if(r instanceof f.default||r instanceof d.default||r instanceof p.default||r instanceof s)return r.equals(n);if(n instanceof s&&("Object"===r.__type||"Pointer"===r.__type))return r.objectId===n.id&&r.className===n.className;if((0,u.default)(r).length!==(0,u.default)(n).length)return!1;for(const o in r)if(!t(r[o],n[o]))return!1;return!0},s(e("@babel/runtime-corejs3/core-js-stable/array/is-array"))),u=s(e("@babel/runtime-corejs3/core-js-stable/object/keys")),c=s(e("./CoreManager")),f=s(e("./ParseACL")),d=s(e("./ParseFile")),p=s(e("./ParseGeoPoint"))},{"./CoreManager":4,"./ParseACL":21,"./ParseFile":25,"./ParseGeoPoint":26,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/object/keys":96,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],58:[function(e,t,r){"use strict";e("@babel/runtime-corejs3/core-js-stable/object/define-property")(r,"__esModule",{value:!0}),r.default=function(e){return e.replace(/[&<>\/'"]/g,function(e){return n[e]})};const n={"&":"&","<":"<",">":">","/":"/","'":"'",'"':"""}},{"@babel/runtime-corejs3/core-js-stable/object/define-property":91}],59:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=function(e){return-1<(0,a.default)(e).call(e,"r:")},s(e("@babel/runtime-corejs3/core-js-stable/instance/index-of")))},{"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],60:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),u=(n(r,"__esModule",{value:!0}),r.default=function(e){const 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 e=(0,u.default)(r[1])||0,n=((0,u.default)(r[2])||1)-1,s=(0,u.default)(r[3])||0,a=(0,u.default)(r[4])||0,i=(0,u.default)(r[5])||0,o=(0,u.default)(r[6])||0,l=(0,u.default)(r[8])||0;return new Date(Date.UTC(e,n,s,a,i,o,l))},s(e("@babel/runtime-corejs3/core-js-stable/parse-int")))},{"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/parse-int":97,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],61:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),c=(n(r,"__esModule",{value:!0}),r.continueWhile=function e(t,r){if(t())return r().then(()=>e(t,r));return c.default.resolve()},r.resolvingPromise=d,r.when=function(e){let t;var r=(0,f.default)(e);t=r?e:arguments;let n=t.length,s=!1;const a=[],i=r?[a]:a,o=[];if(a.length=t.length,o.length=t.length,0===n)return c.default.resolve(i);function l(){--n<=0&&(s?u.reject(o):u.resolve(i))}const u=d();for(let e=0;e<t.length;e++)!function(e,t){e&&"function"==typeof e.then?e.then(function(e){a[t]=e,l()},function(e){o[t]=e,s=!0,l()}):(a[t]=e,l())}(t[e],e);return u},s(e("@babel/runtime-corejs3/core-js-stable/promise"))),f=s(e("@babel/runtime-corejs3/core-js-stable/array/is-array"));function d(){let r,n;const e=new c.default((e,t)=>{r=e,n=t});return e.resolve=r,e.reject=n,e}},{"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/core-js-stable/promise":98,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],62:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),a=(n(r,"__esModule",{value:!0}),r.default=function(e){const t=[];return(0,a.default)(e).call(e,e=>{e instanceof l.default.getParseObject()?(0,o.default)(t,e)||t.push(e):(0,i.default)(t).call(t,e)<0&&t.push(e)}),t},s(e("@babel/runtime-corejs3/core-js-stable/instance/for-each"))),i=s(e("@babel/runtime-corejs3/core-js-stable/instance/index-of")),o=s(e("./arrayContainsObject")),l=s(e("./CoreManager"))},{"./CoreManager":4,"./arrayContainsObject":53,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],63:[function(e,t,r){"use strict";var n=e("@babel/runtime-corejs3/core-js-stable/object/define-property"),s=e("@babel/runtime-corejs3/helpers/interopRequireDefault"),l=(n(r,"__esModule",{value:!0}),r.default=function(e,t){const r={objects:{},files:[]},n=e.className+":"+e._getId(),s=(r.objects[n]=!e.dirty()||e,e.attributes);for(const i in s)"object"==typeof s[i]&&!function t(e,r,n,s){const a=b.default.getParseObject();if(e instanceof a){if(!e.id&&n)throw new Error("Cannot create a pointer to an unsaved Object.");const o=e.className+":"+e._getId();if(!r.objects[o]){r.objects[o]=!e.dirty()||e;const l=e.attributes;for(const u in l)"object"==typeof l[u]&&t(l[u],r,!s,s)}return}{var i;if(e instanceof h.default)return void(!e.url()&&(0,f.default)(i=r.files).call(i,e)<0&&r.files.push(e))}if(e instanceof y.default)return;(0,d.default)(e)&&(0,p.default)(e).call(e,e=>{"object"==typeof e&&t(e,r,n,s)});for(const c in e)"object"==typeof e[c]&&t(e[c],r,n,s)}(s[i],r,!1,!!t);const a=[];for(const o in r.objects)o!==n&&!0!==r.objects[o]&&a.push(r.objects[o]);return(0,l.default)(a).call(a,r.files)},s(e("@babel/runtime-corejs3/core-js-stable/instance/concat"))),f=s(e("@babel/runtime-corejs3/core-js-stable/instance/index-of")),d=s(e("@babel/runtime-corejs3/core-js-stable/array/is-array")),p=s(e("@babel/runtime-corejs3/core-js-stable/instance/for-each")),b=s(e("./CoreManager")),h=s(e("./ParseFile")),y=s(e("./ParseRelation"))},{"./CoreManager":4,"./ParseFile":25,"./ParseRelation":34,"@babel/runtime-corejs3/core-js-stable/array/is-array":66,"@babel/runtime-corejs3/core-js-stable/instance/concat":68,"@babel/runtime-corejs3/core-js-stable/instance/for-each":74,"@babel/runtime-corejs3/core-js-stable/instance/index-of":76,"@babel/runtime-corejs3/core-js-stable/object/define-property":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":104}],64:[function(e,t,r){"use strict";e("@babel/runtime-corejs3/core-js-stable/object/define-property")(r,"__esModule",{value:!0}),r.default=void 0;e=e("uuid").v4;r.default=e},{"@babel/runtime-corejs3/core-js-stable/object/define-property":91,uuid:492}],65:[function(e,t,r){t.exports=e("core-js-pure/stable/array/from")},{"core-js-pure/stable/array/from":436}],66:[function(e,t,r){t.exports=e("core-js-pure/stable/array/is-array")},{"core-js-pure/stable/array/is-array":437}],67:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/bind")},{"core-js-pure/stable/instance/bind":442}],68:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/concat")},{"core-js-pure/stable/instance/concat":443}],69:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/entries")},{"core-js-pure/stable/instance/entries":444}],70:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/every")},{"core-js-pure/stable/instance/every":445}],71:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/filter")},{"core-js-pure/stable/instance/filter":446}],72:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/find-index")},{"core-js-pure/stable/instance/find-index":447}],73:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/find")},{"core-js-pure/stable/instance/find":448}],74:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/for-each")},{"core-js-pure/stable/instance/for-each":449}],75:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/includes")},{"core-js-pure/stable/instance/includes":450}],76:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/index-of")},{"core-js-pure/stable/instance/index-of":451}],77:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/keys")},{"core-js-pure/stable/instance/keys":452}],78:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/map")},{"core-js-pure/stable/instance/map":453}],79:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/reduce")},{"core-js-pure/stable/instance/reduce":454}],80:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/slice")},{"core-js-pure/stable/instance/slice":455}],81:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/some")},{"core-js-pure/stable/instance/some":456}],82:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/sort")},{"core-js-pure/stable/instance/sort":457}],83:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/splice")},{"core-js-pure/stable/instance/splice":458}],84:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/starts-with")},{"core-js-pure/stable/instance/starts-with":459}],85:[function(e,t,r){t.exports=e("core-js-pure/stable/instance/values")},{"core-js-pure/stable/instance/values":460}],86:[function(e,t,r){t.exports=e("core-js-pure/stable/json/stringify")},{"core-js-pure/stable/json/stringify":461}],87:[function(e,t,r){t.exports=e("core-js-pure/stable/map")},{"core-js-pure/stable/map":462}],88:[function(e,t,r){t.exports=e("core-js-pure/stable/number/is-integer")},{"core-js-pure/stable/number/is-integer":463}],89:[function(e,t,r){t.exports=e("core-js-pure/stable/object/assign")},{"core-js-pure/stable/object/assign":464}],90:[function(e,t,r){t.exports=e("core-js-pure/stable/object/create")},{"core-js-pure/stable/object/create":465}],91:[function(e,t,r){t.exports=e("core-js-pure/stable/object/define-property")},{"core-js-pure/stable/object/define-property":466}],92:[function(e,t,r){t.exports=e("core-js-pure/stable/object/entries")},{"core-js-pure/stable/object/entries":467}],93:[function(e,t,r){t.exports=e("core-js-pure/stable/object/freeze")},{"core-js-pure/stable/object/freeze":468}],94:[function(e,t,r){t.exports=e("core-js-pure/stable/object/get-own-property-descriptor")},{"core-js-pure/stable/object/get-own-property-descriptor":469}],95:[function(e,t,r){t.exports=e("core-js-pure/stable/object/get-prototype-of")},{"core-js-pure/stable/object/get-prototype-of":470}],96:[function(e,t,r){t.exports=e("core-js-pure/stable/object/keys")},{"core-js-pure/stable/object/keys":471}],97:[function(e,t,r){t.exports=e("core-js-pure/stable/parse-int")},{"core-js-pure/stable/parse-int":472}],98:[function(e,t,r){t.exports=e("core-js-pure/stable/promise")},{"core-js-pure/stable/promise":473}],99:[function(e,t,r){t.exports=e("core-js-pure/stable/set-interval")},{"core-js-pure/stable/set-interval":474}],100:[function(e,t,r){t.exports=e("core-js-pure/stable/set-timeout")},{"core-js-pure/stable/set-timeout":475}],101:[function(e,t,r){t.exports=e("core-js-pure/stable/set")},{"core-js-pure/stable/set":476}],102:[function(e,t,r){t.exports=e("core-js-pure/stable/weak-map")},{"core-js-pure/stable/weak-map":480}],103:[function(e,t,r){var n=e("core-js-pure/features/object/define-property.js"),s=e("./toPropertyKey.js");t.exports=function(e,t,r){return(t=s(t))in e?n(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},t.exports.__esModule=!0,t.exports.default=t.exports},{"./toPropertyKey.js":106,"core-js-pure/features/object/define-property.js":168}],104:[function(e,t,r){t.exports=function(e){return e&&e.__esModule?e:{default:e}},t.exports.__esModule=!0,t.exports.default=t.exports},{}],105:[function(e,t,r){var n=e("core-js-pure/features/symbol/to-primitive.js"),s=e("./typeof.js").default;t.exports=function(e,t){if("object"!=s(e)||!e)return e;var r=e[n];if(void 0===r)return("string"===t?String:Number)(e);if(r=r.call(e,t||"default"),"object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")},t.exports.__esModule=!0,t.exports.default=t.exports},{"./typeof.js":107,"core-js-pure/features/symbol/to-primitive.js":171}],106:[function(e,t,r){var n=e("./typeof.js").default,s=e("./toPrimitive.js");t.exports=function(e){return e=s(e,"string"),"symbol"==n(e)?e:e+""},t.exports.__esModule=!0,t.exports.default=t.exports},{"./toPrimitive.js":105,"./typeof.js":107}],107:[function(e,t,r){var n=e("core-js-pure/features/symbol/index.js"),s=e("core-js-pure/features/symbol/iterator.js");function a(e){return t.exports=a="function"==typeof n&&"symbol"==typeof s?function(e){return typeof e}:function(e){return e&&"function"==typeof n&&e.constructor===n&&e!==n.prototype?"symbol":typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,a(e)}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports},{"core-js-pure/features/symbol/index.js":169,"core-js-pure/features/symbol/iterator.js":170}],108:[function(e,t,r){},{}],109:[function(e,t,r){e=e("../../stable/object/define-property");t.exports=e},{"../../stable/object/define-property":466}],110:[function(e,t,r){var n=e("../../stable/symbol");e("../../modules/esnext.symbol.dispose"),t.exports=n},{"../../modules/esnext.symbol.dispose":423,"../../stable/symbol":477}],111:[function(e,t,r){e=e("../../stable/symbol/iterator");t.exports=e},{"../../stable/symbol/iterator":478}],112:[function(e,t,r){e=e("../../stable/symbol/to-primitive");t.exports=e},{"../../stable/symbol/to-primitive":479}],113:[function(e,t,r){e("../../modules/es.string.iterator"),e("../../modules/es.array.from");e=e("../../internals/path");t.exports=e.Array.from},{"../../internals/path":308,"../../modules/es.array.from":356,"../../modules/es.string.iterator":400}],114:[function(e,t,r){e("../../modules/es.array.is-array");e=e("../../internals/path");t.exports=e.Array.isArray},{"../../internals/path":308,"../../modules/es.array.is-array":359}],115:[function(e,t,r){e("../../../modules/es.array.concat");e=e("../../../internals/entry-virtual");t.exports=e("Array").concat},{"../../../internals/entry-virtual":232,"../../../modules/es.array.concat":350}],116:[function(e,t,r){e("../../../modules/es.array.iterator"),e("../../../modules/es.object.to-string");e=e("../../../internals/entry-virtual");t.exports=e("Array").entries},{"../../../internals/entry-virtual":232,"../../../modules/es.array.iterator":360,"../../../modules/es.object.to-string":384}],117:[function(e,t,r){e("../../../modules/es.array.every");e=e("../../../internals/entry-virtual");t.exports=e("Array").every},{"../../../internals/entry-virtual":232,"../../../modules/es.array.every":351}],118:[function(e,t,r){e("../../../modules/es.array.filter");e=e("../../../internals/entry-virtual");t.exports=e("Array").filter},{"../../../internals/entry-virtual":232,"../../../modules/es.array.filter":352}],119:[function(e,t,r){e("../../../modules/es.array.find-index");e=e("../../../internals/entry-virtual");t.exports=e("Array").findIndex},{"../../../internals/entry-virtual":232,"../../../modules/es.array.find-index":353}],120:[function(e,t,r){e("../../../modules/es.array.find");e=e("../../../internals/entry-virtual");t.exports=e("Array").find},{"../../../internals/entry-virtual":232,"../../../modules/es.array.find":354}],121:[function(e,t,r){e("../../../modules/es.array.for-each");e=e("../../../internals/entry-virtual");t.exports=e("Array").forEach},{"../../../internals/entry-virtual":232,"../../../modules/es.array.for-each":355}],122:[function(e,t,r){e("../../../modules/es.array.includes");e=e("../../../internals/entry-virtual");t.exports=e("Array").includes},{"../../../internals/entry-virtual":232,"../../../modules/es.array.includes":357}],123:[function(e,t,r){e("../../../modules/es.array.index-of");e=e("../../../internals/entry-virtual");t.exports=e("Array").indexOf},{"../../../internals/entry-virtual":232,"../../../modules/es.array.index-of":358}],124:[function(e,t,r){e("../../../modules/es.array.iterator"),e("../../../modules/es.object.to-string");e=e("../../../internals/entry-virtual");t.exports=e("Array").keys},{"../../../internals/entry-virtual":232,"../../../modules/es.array.iterator":360,"../../../modules/es.object.to-string":384}],125:[function(e,t,r){e("../../../modules/es.array.map");e=e("../../../internals/entry-virtual");t.exports=e("Array").map},{"../../../internals/entry-virtual":232,"../../../modules/es.array.map":361}],126:[function(e,t,r){e("../../../modules/es.array.reduce");e=e("../../../internals/entry-virtual");t.exports=e("Array").reduce},{"../../../internals/entry-virtual":232,"../../../modules/es.array.reduce":362}],127:[function(e,t,r){e("../../../modules/es.array.slice");e=e("../../../internals/entry-virtual");t.exports=e("Array").slice},{"../../../internals/entry-virtual":232,"../../../modules/es.array.slice":363}],128:[function(e,t,r){e("../../../modules/es.array.some");e=e("../../../internals/entry-virtual");t.exports=e("Array").some},{"../../../internals/entry-virtual":232,"../../../modules/es.array.some":364}],129:[function(e,t,r){e("../../../modules/es.array.sort");e=e("../../../internals/entry-virtual");t.exports=e("Array").sort},{"../../../internals/entry-virtual":232,"../../../modules/es.array.sort":365}],130:[function(e,t,r){e("../../../modules/es.array.splice");e=e("../../../internals/entry-virtual");t.exports=e("Array").splice},{"../../../internals/entry-virtual":232,"../../../modules/es.array.splice":366}],131:[function(e,t,r){e("../../../modules/es.array.iterator"),e("../../../modules/es.object.to-string");e=e("../../../internals/entry-virtual");t.exports=e("Array").values},{"../../../internals/entry-virtual":232,"../../../modules/es.array.iterator":360,"../../../modules/es.object.to-string":384}],132:[function(e,t,r){e("../../../modules/es.function.bind");e=e("../../../internals/entry-virtual");t.exports=e("Function").bind},{"../../../internals/entry-virtual":232,"../../../modules/es.function.bind":368}],133:[function(e,t,r){var n=e("../../internals/object-is-prototype-of"),s=e("../function/virtual/bind"),a=Function.prototype;t.exports=function(e){var t=e.bind;return e===a||n(a,e)&&t===a.bind?s:t}},{"../../internals/object-is-prototype-of":299,"../function/virtual/bind":132}],134:[function(e,t,r){var n=e("../../internals/object-is-prototype-of"),s=e("../array/virtual/concat"),a=Array.prototype;t.exports=function(e){var t=e.concat;return e===a||n(a,e)&&t===a.concat?s:t}},{"../../internals/object-is-prototype-of":299,"../array/virtual/concat":115}],135:[function(e,t,r){var n=e("../../internals/object-is-prototype-of"),s=e("../array/virtual/every"),a=Array.prototype;t.exports=function(e){var t=e.every;return e===a||n(a,e)&&t===a.every?s:t}},{"../../internals/object-is-prototype-of":299,"../array/virtual/every":117}],136:[function(e,t,r){var n=e("../../internals/object-is-prototype-of"),s=e("../array/virtual/filter"),a=Array.prototype;t.exports=function(e){var t=e.filter;return e===a||n(a,e)&&t===a.filter?s:t}},{"../../internals/object-is-prototype-of":299,"../array/virtual/filter":118}],137:[function(e,t,r){var n=e("../../internals/object-is-prototype-of"),s=e("../array/virtual/find-index"),a=Array.prototype;t.exports=function(e){var t=e.findIndex;return e===a||n(a,e)&&t===a.findIndex?s:t}},{"../../internals/object-is-prototype-of":299,"../array/virtual/find-index":119}],138:[function(e,t,r){var n=e("../../internals/object-is-prototype-of"),s=e("../array/virtual/find"),a=Array.prototype;t.exports=function(e){var t=e.find;return e===a||n(a,e)&&t===a.find?s:t}},{"../../internals/object-is-prototype-of":299,"../array/virtual/find":120}],139:[function(e,t,r){var n=e("../../internals/object-is-prototype-of"),s=e("../array/virtual/includes"),a=e("../string/virtual/includes"),i=Array.prototype,o=String.prototype;t.exports=function(e){var t=e.includes;return e===i||n(i,e)&&t===i.includes?s:"string"==typeof e||e===o||n(o,e)&&t===o.includes?a:t}},{"../../internals/object-is-prototype-of":299,"../array/virtual/includes":122,"../string/virtual/includes":162}],140:[function(e,t,r){var n=e("../../internals/object-is-prototype-of"),s=e("../array/virtual/index-of"),a=Array.prototype;t.exports=function(e){var t=e.indexOf;return e===a||n(a,e)&&t===a.indexOf?s:t}},{"../../internals/object-is-prototype-of":299,"../array/virtual/index-of":123}],141:[function(e,t,r){var n=e("../../internals/object-is-prototype-of"),s=e("../array/virtual/map"),a=Array.prototype;t.exports=function(e){var t=e.map;return e===a||n(a,e)&&t===a.map?s:t}},{"../../internals/object-is-prototype-of":299,"../array/virtual/map":125}],142:[function(e,t,r){var n=e("../../internals/object-is-prototype-of"),s=e("../array/virtual/reduce"),a=Array.prototype;t.exports=function(e){var t=e.reduce;return e===a||n(a,e)&&t===a.reduce?s:t}},{"../../internals/object-is-prototype-of":299,"../array/virtual/reduce":126}],143:[function(e,t,r){var n=e("../../internals/object-is-prototype-of"),s=e("../array/virtual/slice"),a=Array.prototype;t.exports=function(e){var t=e.slice;return e===a||n(a,e)&&t===a.slice?s:t}},{"../../internals/object-is-prototype-of":299,"../array/virtual/slice":127}],144:[function(e,t,r){var n=e("../../internals/object-is-prototype-of"),s=e("../array/virtual/some"),a=Array.prototype;t.exports=function(e){var t=e.some;return e===a||n(a,e)&&t===a.some?s:t}},{"../../internals/object-is-prototype-of":299,"../array/virtual/some":128}],145:[function(e,t,r){var n=e("../../internals/object-is-prototype-of"),s=e("../array/virtual/sort"),a=Array.prototype;t.exports=function(e){var t=e.sort;return e===a||n(a,e)&&t===a.sort?s:t}},{"../../internals/object-is-prototype-of":299,"../array/virtual/sort":129}],146:[function(e,t,r){var n=e("../../internals/object-is-prototype-of"),s=e("../array/virtual/splice"),a=Array.prototype;t.exports=function(e){var t=e.splice;return e===a||n(a,e)&&t===a.splice?s:t}},{"../../internals/object-is-prototype-of":299,"../array/virtual/splice":130}],147:[function(e,t,r){var n=e("../../internals/object-is-prototype-of"),s=e("../string/virtual/starts-with"),a=String.prototype;t.exports=function(e){var t=e.startsWith;return"string"==typeof e||e===a||n(a,e)&&t===a.startsWith?s:t}},{"../../internals/object-is-prototype-of":299,"../string/virtual/starts-with":163}],148:[function(e,t,r){e("../../modules/es.json.stringify");var n=e("../../internals/path"),s=e("../../internals/function-apply");n.JSON||(n.JSON={stringify:JSON.stringify}),t.exports=function(e,t,r){return s(n.JSON.stringify,null,arguments)}},{"../../internals/function-apply":240,"../../internals/path":308,"../../modules/es.json.stringify":369}],149:[function(e,t,r){e("../../modules/es.array.iterator"),e("../../modules/es.map"),e("../../modules/es.object.to-string"),e("../../modules/es.string.iterator");e=e("../../internals/path");t.exports=e.Map},{"../../internals/path":308,"../../modules/es.array.iterator":360,"../../modules/es.map":372,"../../modules/es.object.to-string":384,"../../modules/es.string.iterator":400}],150:[function(e,t,r){e("../../modules/es.number.is-integer");e=e("../../internals/path");t.exports=e.Number.isInteger},{"../../internals/path":308,"../../modules/es.number.is-integer":374}],151:[function(e,t,r){e("../../modules/es.object.assign");e=e("../../internals/path");t.exports=e.Object.assign},{"../../internals/path":308,"../../modules/es.object.assign":375}],152:[function(e,t,r){e("../../modules/es.object.create");var n=e("../../internals/path").Object;t.exports=function(e,t){return n.create(e,t)}},{"../../internals/path":308,"../../modules/es.object.create":376}],153:[function(e,t,r){e("../../modules/es.object.define-property");var n=e("../../internals/path").Object,e=t.exports=function(e,t,r){return n.defineProperty(e,t,r)};n.defineProperty.sham&&(e.sham=!0)},{"../../internals/path":308,"../../modules/es.object.define-property":377}],154:[function(e,t,r){e("../../modules/es.object.entries");e=e("../../internals/path");t.exports=e.Object.entries},{"../../internals/path":308,"../../modules/es.object.entries":378}],155:[function(e,t,r){e("../../modules/es.object.freeze");e=e("../../internals/path");t.exports=e.Object.freeze},{"../../internals/path":308,"../../modules/es.object.freeze":379}],156:[function(e,t,r){e("../../modules/es.object.get-own-property-descriptor");var n=e("../../internals/path").Object,e=t.exports=function(e,t){return n.getOwnPropertyDescriptor(e,t)};n.getOwnPropertyDescriptor.sham&&(e.sham=!0)},{"../../internals/path":308,"../../modules/es.object.get-own-property-descriptor":380}],157:[function(e,t,r){e("../../modules/es.object.get-prototype-of");e=e("../../internals/path");t.exports=e.Object.getPrototypeOf},{"../../internals/path":308,"../../modules/es.object.get-prototype-of":382}],158:[function(e,t,r){e("../../modules/es.object.keys");e=e("../../internals/path");t.exports=e.Object.keys},{"../../internals/path":308,"../../modules/es.object.keys":383}],159:[function(e,t,r){e("../modules/es.parse-int");e=e("../internals/path");t.exports=e.parseInt},{"../internals/path":308,"../modules/es.parse-int":385}],160:[function(e,t,r){e("../../modules/es.aggregate-error"),e("../../modules/es.array.iterator"),e("../../modules/es.object.to-string"),e("../../modules/es.promise"),e("../../modules/es.promise.all-settled"),e("../../modules/es.promise.any"),e("../../modules/es.promise.finally"),e("../../modules/es.string.iterator");e=e("../../internals/path");t.exports=e.Promise},{"../../internals/path":308,"../../modules/es.aggregate-error":349,"../../modules/es.array.iterator":360,"../../modules/es.object.to-string":384,"../../modules/es.promise":392,"../../modules/es.promise.all-settled":386,"../../modules/es.promise.any":388,"../../modules/es.promise.finally":391,"../../modules/es.string.iterator":400}],161:[function(e,t,r){e("../../modules/es.array.iterator"),e("../../modules/es.object.to-string"),e("../../modules/es.set"),e("../../modules/es.string.iterator");e=e("../../internals/path");t.exports=e.Set},{"../../internals/path":308,"../../modules/es.array.iterator":360,"../../modules/es.object.to-string":384,"../../modules/es.set":398,"../../modules/es.string.iterator":400}],162:[function(e,t,r){e("../../../modules/es.string.includes");e=e("../../../internals/entry-virtual");t.exports=e("String").includes},{"../../../internals/entry-virtual":232,"../../../modules/es.string.includes":399}],163:[function(e,t,r){e("../../../modules/es.string.starts-with");e=e("../../../internals/entry-virtual");t.exports=e("String").startsWith},{"../../../internals/entry-virtual":232,"../../../modules/es.string.starts-with":401}],164:[function(e,t,r){e("../../modules/es.array.concat"),e("../../modules/es.object.to-string"),e("../../modules/es.symbol"),e("../../modules/es.symbol.async-iterator"),e("../../modules/es.symbol.description"),e("../../modules/es.symbol.has-instance"),e("../../modules/es.symbol.is-concat-spreadable"),e("../../modules/es.symbol.iterator"),e("../../modules/es.symbol.match"),e("../../modules/es.symbol.match-all"),e("../../modules/es.symbol.replace"),e("../../modules/es.symbol.search"),e("../../modules/es.symbol.species"),e("../../modules/es.symbol.split"),e("../../modules/es.symbol.to-primitive"),e("../../modules/es.symbol.to-string-tag"),e("../../modules/es.symbol.unscopables"),e("../../modules/es.json.to-string-tag"),e("../../modules/es.math.to-string-tag"),e("../../modules/es.reflect.to-string-tag");e=e("../../internals/path");t.exports=e.Symbol},{"../../internals/path":308,"../../modules/es.array.concat":350,"../../modules/es.json.to-string-tag":370,"../../modules/es.math.to-string-tag":373,"../../modules/es.object.to-string":384,"../../modules/es.reflect.to-string-tag":396,"../../modules/es.symbol":409,"../../modules/es.symbol.async-iterator":402,"../../modules/es.symbol.description":404,"../../modules/es.symbol.has-instance":406,"../../modules/es.symbol.is-concat-spreadable":407,"../../modules/es.symbol.iterator":408,"../../modules/es.symbol.match":412,"../../modules/es.symbol.match-all":411,"../../modules/es.symbol.replace":413,"../../modules/es.symbol.search":414,"../../modules/es.symbol.species":415,"../../modules/es.symbol.split":416,"../../modules/es.symbol.to-primitive":417,"../../modules/es.symbol.to-string-tag":418,"../../modules/es.symbol.unscopables":419}],165:[function(e,t,r){e("../../modules/es.array.iterator"),e("../../modules/es.object.to-string"),e("../../modules/es.string.iterator"),e("../../modules/es.symbol.iterator");e=e("../../internals/well-known-symbol-wrapped");t.exports=e.f("iterator")},{"../../internals/well-known-symbol-wrapped":345,"../../modules/es.array.iterator":360,"../../modules/es.object.to-string":384,"../../modules/es.string.iterator":400,"../../modules/es.symbol.iterator":408}],166:[function(e,t,r){e("../../modules/es.date.to-primitive"),e("../../modules/es.symbol.to-primitive");e=e("../../internals/well-known-symbol-wrapped");t.exports=e.f("toPrimitive")},{"../../internals/well-known-symbol-wrapped":345,"../../modules/es.date.to-primitive":367,"../../modules/es.symbol.to-primitive":417}],167:[function(e,t,r){e("../../modules/es.array.iterator"),e("../../modules/es.object.to-string"),e("../../modules/es.weak-map");e=e("../../internals/path");t.exports=e.WeakMap},{"../../internals/path":308,"../../modules/es.array.iterator":360,"../../modules/es.object.to-string":384,"../../modules/es.weak-map":421}],168:[function(e,t,r){t.exports=e("../../full/object/define-property")},{"../../full/object/define-property":172}],169:[function(e,t,r){t.exports=e("../../full/symbol")},{"../../full/symbol":173}],170:[function(e,t,r){t.exports=e("../../full/symbol/iterator")},{"../../full/symbol/iterator":174}],171:[function(e,t,r){t.exports=e("../../full/symbol/to-primitive")},{"../../full/symbol/to-primitive":175}],172:[function(e,t,r){e=e("../../actual/object/define-property");t.exports=e},{"../../actual/object/define-property":109}],173:[function(e,t,r){var n=e("../../actual/symbol");e("../../modules/esnext.symbol.async-dispose"),e("../../modules/esnext.symbol.is-registered"),e("../../modules/esnext.symbol.is-well-known"),e("../../modules/esnext.symbol.matcher"),e("../../modules/esnext.symbol.metadata-key"),e("../../modules/esnext.symbol.observable"),e("../../modules/esnext.symbol.metadata"),e("../../modules/esnext.symbol.pattern-match"),e("../../modules/esnext.symbol.replace-all"),t.exports=n},{"../../actual/symbol":110,"../../modules/esnext.symbol.async-dispose":422,"../../modules/esnext.symbol.is-registered":424,"../../modules/esnext.symbol.is-well-known":425,"../../modules/esnext.symbol.matcher":426,"../../modules/esnext.symbol.metadata":428,"../../modules/esnext.symbol.metadata-key":427,"../../modules/esnext.symbol.observable":429,"../../modules/esnext.symbol.pattern-match":430,"../../modules/esnext.symbol.replace-all":431}],174:[function(e,t,r){e=e("../../actual/symbol/iterator");t.exports=e},{"../../actual/symbol/iterator":111}],175:[function(e,t,r){e=e("../../actual/symbol/to-primitive");t.exports=e},{"../../actual/symbol/to-primitive":112}],176:[function(e,t,r){var n=e("../internals/is-callable"),s=e("../internals/try-to-string"),a=TypeError;t.exports=function(e){if(n(e))return e;throw a(s(e)+" is not a function")}},{"../internals/is-callable":267,"../internals/try-to-string":338}],177:[function(e,t,r){var n=e("../internals/is-constructor"),s=e("../internals/try-to-string"),a=TypeError;t.exports=function(e){if(n(e))return e;throw a(s(e)+" is not a constructor")}},{"../internals/is-constructor":268,"../internals/try-to-string":338}],178:[function(e,t,r){var n=e("../internals/is-callable"),s=String,a=TypeError;t.exports=function(e){if("object"==typeof e||n(e))return e;throw a("Can't set "+s(e)+" as a prototype")}},{"../internals/is-callable":267}],179:[function(e,t,r){t.exports=function(){}},{}],180:[function(e,t,r){var n=e("../internals/object-is-prototype-of"),s=TypeError;t.exports=function(e,t){if(n(t,e))return e;throw s("Incorrect invocation")}},{"../internals/object-is-prototype-of":299}],181:[function(e,t,r){var n=e("../internals/is-object"),s=String,a=TypeError;t.exports=function(e){if(n(e))return e;throw a(s(e)+" is not an object")}},{"../internals/is-object":272}],182:[function(e,t,r){e=e("../internals/fails");t.exports=e(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))})},{"../internals/fails":238}],183:[function(e,t,r){"use strict";var n=e("../internals/array-iteration").forEach,e=e("../internals/array-method-is-strict")("forEach");t.exports=e?[].forEach:function(e){return n(this,e,1<arguments.length?arguments[1]:void 0)}},{"../internals/array-iteration":186,"../internals/array-method-is-strict":188}],184:[function(e,t,r){"use strict";var d=e("../internals/function-bind-context"),p=e("../internals/function-call"),b=e("../internals/to-object"),h=e("../internals/call-with-safe-iteration-closing"),y=e("../internals/is-array-iterator-method"),m=e("../internals/is-constructor"),g=e("../internals/length-of-array-like"),j=e("../internals/create-property"),v=e("../internals/get-iterator"),_=e("../internals/get-iterator-method"),w=Array;t.exports=function(e){var t,r,n,s,a,i,o=b(e),e=m(this),l=arguments.length,u=1<l?arguments[1]:void 0,c=void 0!==u,l=(c&&(u=d(u,2<l?arguments[2]:void 0)),_(o)),f=0;if(!l||this===w&&y(l))for(t=g(o),r=e?new this(t):w(t);f<t;f++)i=c?u(o[f],f):o[f],j(r,f,i);else for(a=(s=v(o,l)).next,r=e?new this:[];!(n=p(a,s)).done;f++)i=c?h(s,u,[n.value,f],!0):n.value,j(r,f,i);return r.length=f,r}},{"../internals/call-with-safe-iteration-closing":196,"../internals/create-property":209,"../internals/function-bind-context":241,"../internals/function-call":244,"../internals/get-iterator":251,"../internals/get-iterator-method":250,"../internals/is-array-iterator-method":265,"../internals/is-constructor":268,"../internals/length-of-array-like":282,"../internals/to-object":333}],185:[function(e,t,r){function n(o){return function(e,t,r){var n,s=l(e),a=c(s),i=u(r,a);if(o&&t!=t){for(;i<a;)if((n=s[i++])!=n)return!0}else for(;i<a;i++)if((o||i in s)&&s[i]===t)return o||i||0;return!o&&-1}}var l=e("../internals/to-indexed-object"),u=e("../internals/to-absolute-index"),c=e("../internals/length-of-array-like");t.exports={includes:n(!0),indexOf:n(!1)}},{"../internals/length-of-array-like":282,"../internals/to-absolute-index":329,"../internals/to-indexed-object":330}],186:[function(e,t,r){function n(d){var p=1==d,b=2==d,h=3==d,y=4==d,m=6==d,g=7==d,j=5==d||m;return function(e,t,r,n){for(var s,a,i=w(e),o=_(i),l=v(t,r),u=E(o),c=0,t=n||S,f=p?t(e,u):b||g?t(e,0):void 0;c<u;c++)if((j||c in o)&&(a=l(s=o[c],c,i),d))if(p)f[c]=a;else if(a)switch(d){case 3:return!0;case 5:return s;case 6:return c;case 2:O(f,s)}else switch(d){case 4:return!1;case 7:O(f,s)}return m?-1:h||y?y:f}}var v=e("../internals/function-bind-context"),s=e("../internals/function-uncurry-this"),_=e("../internals/indexed-object"),w=e("../internals/to-object"),E=e("../internals/length-of-array-like"),S=e("../internals/array-species-create"),O=s([].push);t.exports={forEach:n(0),map:n(1),filter:n(2),some:n(3),every:n(4),find:n(5),findIndex:n(6),filterReject:n(7)}},{"../internals/array-species-create":195,"../internals/function-bind-context":241,"../internals/function-uncurry-this":248,"../internals/indexed-object":260,"../internals/length-of-array-like":282,"../internals/to-object":333}],187:[function(e,t,r){var n=e("../internals/fails"),s=e("../internals/well-known-symbol"),a=e("../internals/engine-v8-version"),i=s("species");t.exports=function(t){return 51<=a||!n(function(){var e=[];return(e.constructor={})[i]=function(){return{foo:1}},1!==e[t](Boolean).foo})}},{"../internals/engine-v8-version":230,"../internals/fails":238,"../internals/well-known-symbol":346}],188:[function(e,t,r){"use strict";var n=e("../internals/fails");t.exports=function(e,t){var r=[][e];return!!r&&n(function(){r.call(null,t||function(){return 1},1)})}},{"../internals/fails":238}],189:[function(e,t,r){function n(u){return function(e,t,r,n){c(t);var s=f(e),a=d(s),i=p(s),o=u?i-1:0,l=u?-1:1;if(r<2)for(;;){if(o in a){n=a[o],o+=l;break}if(o+=l,u?o<0:i<=o)throw b("Reduce of empty array with no initial value")}for(;u?0<=o:o<i;o+=l)o in a&&(n=t(n,a[o],o,s));return n}}var c=e("../internals/a-callable"),f=e("../internals/to-object"),d=e("../internals/indexed-object"),p=e("../internals/length-of-array-like"),b=TypeError;t.exports={left:n(!1),right:n(!0)}},{"../internals/a-callable":176,"../internals/indexed-object":260,"../internals/length-of-array-like":282,"../internals/to-object":333}],190:[function(e,t,r){"use strict";var n=e("../internals/descriptors"),s=e("../internals/is-array"),a=TypeError,i=Object.getOwnPropertyDescriptor,e=n&&!function(){if(void 0!==this)return 1;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();t.exports=e?function(e,t){if(s(e)&&!i(e,"length").writable)throw a("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},{"../internals/descriptors":215,"../internals/is-array":266}],191:[function(e,t,r){var l=e("../internals/to-absolute-index"),u=e("../internals/length-of-array-like"),c=e("../internals/create-property"),f=Array,d=Math.max;t.exports=function(e,t,r){for(var n=u(e),s=l(t,n),a=l(void 0===r?n:r,n),i=f(d(a-s,0)),o=0;s<a;s++,o++)c(i,o,e[s]);return i.length=o,i}},{"../internals/create-property":209,"../internals/length-of-array-like":282,"../internals/to-absolute-index":329}],192:[function(e,t,r){e=e("../internals/function-uncurry-this");t.exports=e([].slice)},{"../internals/function-uncurry-this":248}],193:[function(e,t,r){function g(e,t){var r=e.length,n=v(r/2);if(r<8){for(var s,a,i=e,o=t,l=i.length,u=1;u<l;){for(s=i[a=u];a&&0<o(i[a-1],s);)i[a]=i[--a];a!==u++&&(i[a]=s)}return i}for(var c=e,f=g(j(e,0,n),t),d=g(j(e,n),t),p=t,b=f.length,h=d.length,y=0,m=0;y<b||m<h;)c[y+m]=y<b&&m<h?p(f[y],d[m])<=0?f[y++]:d[m++]:y<b?f[y++]:d[m++];return c}var j=e("../internals/array-slice-simple"),v=Math.floor;t.exports=g},{"../internals/array-slice-simple":191}],194:[function(e,t,r){var n=e("../internals/is-array"),s=e("../internals/is-constructor"),a=e("../internals/is-object"),i=e("../internals/well-known-symbol")("species"),o=Array;t.exports=function(e){var t;return n(e)&&(t=e.constructor,(s(t)&&(t===o||n(t.prototype))||a(t)&&null===(t=t[i]))&&(t=void 0)),void 0===t?o:t}},{"../internals/is-array":266,"../internals/is-constructor":268,"../internals/is-object":272,"../internals/well-known-symbol":346}],195:[function(e,t,r){var n=e("../internals/array-species-constructor");t.exports=function(e,t){return new(n(e))(0===t?0:t)}},{"../internals/array-species-constructor":194}],196:[function(e,t,r){var s=e("../internals/an-object"),a=e("../internals/iterator-close");t.exports=function(t,e,r,n){try{return n?e(s(r)[0],r[1]):e(r)}catch(e){a(t,"throw",e)}}},{"../internals/an-object":181,"../internals/iterator-close":277}],197:[function(e,t,r){var s=e("../internals/well-known-symbol")("iterator"),a=!1;try{var n=0,i={next:function(){return{done:!!n++}},return:function(){a=!0}};i[s]=function(){return this},Array.from(i,function(){throw 2})}catch(e){}t.exports=function(e,t){if(!t&&!a)return!1;var r=!1;try{var n={};n[s]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}},{"../internals/well-known-symbol":346}],198:[function(e,t,r){var e=e("../internals/function-uncurry-this"),n=e({}.toString),s=e("".slice);t.exports=function(e){return s(n(e),8,-1)}},{"../internals/function-uncurry-this":248}],199:[function(e,t,r){var n=e("../internals/to-string-tag-support"),s=e("../internals/is-callable"),a=e("../internals/classof-raw"),i=e("../internals/well-known-symbol")("toStringTag"),o=Object,l="Arguments"==a(function(){return arguments}());t.exports=n?a:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,t){try{return e[t]}catch(e){}}(e=o(e),i))?t:l?a(e):"Object"==(t=a(e))&&s(e.callee)?"Arguments":t}},{"../internals/classof-raw":198,"../internals/is-callable":267,"../internals/to-string-tag-support":336,"../internals/well-known-symbol":346}],200:[function(e,t,r){"use strict";var u=e("../internals/object-create"),c=e("../internals/define-built-in-accessor"),f=e("../internals/define-built-ins"),d=e("../internals/function-bind-context"),p=e("../internals/an-instance"),b=e("../internals/is-null-or-undefined"),h=e("../internals/iterate"),i=e("../internals/iterator-define"),o=e("../internals/create-iter-result-object"),l=e("../internals/set-species"),y=e("../internals/descriptors"),m=e("../internals/internal-metadata").fastKey,e=e("../internals/internal-state"),g=e.set,j=e.getterFor;t.exports={getConstructor:function(e,r,n,s){function a(e,t,r){var n,s=l(e),a=i(e,t);return a?a.value=r:(s.last=a={index:n=m(t,!0),key:t,value:r,previous:t=s.last,next:void 0,removed:!1},s.first||(s.first=a),t&&(t.next=a),y?s.size++:e.size++,"F"!==n&&(s.index[n]=a)),e}function i(e,t){var r,e=l(e),n=m(t);if("F"!==n)return e.index[n];for(r=e.first;r;r=r.next)if(r.key==t)return r}var e=e(function(e,t){p(e,o),g(e,{type:r,index:u(null),first:void 0,last:void 0,size:0}),y||(e.size=0),b(t)||h(t,e[s],{that:e,AS_ENTRIES:n})}),o=e.prototype,l=j(r);return f(o,{clear:function(){for(var e=l(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,y?e.size=0:this.size=0},delete:function(e){var t,r,n=l(this),e=i(this,e);return e&&(t=e.next,r=e.previous,delete n.index[e.index],e.removed=!0,r&&(r.next=t),t&&(t.previous=r),n.first==e&&(n.first=t),n.last==e&&(n.last=r),y?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=l(this),n=d(e,1<arguments.length?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!i(this,e)}}),f(o,n?{get:function(e){e=i(this,e);return e&&e.value},set:function(e,t){return a(this,0===e?0:e,t)}}:{add:function(e){return a(this,e=0===e?0:e,e)}}),y&&c(o,"size",{configurable:!0,get:function(){return l(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",s=j(t),a=j(n);i(e,t,function(e,t){g(this,{type:n,target:e,state:s(e),kind:t,last:void 0})},function(){for(var e=a(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?o("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,o(void 0,!0))},r?"entries":"values",!r,!0),l(t)}}},{"../internals/an-instance":180,"../internals/create-iter-result-object":206,"../internals/define-built-in-accessor":210,"../internals/define-built-ins":212,"../internals/descriptors":215,"../internals/function-bind-context":241,"../internals/internal-metadata":263,"../internals/internal-state":264,"../internals/is-null-or-undefined":271,"../internals/iterate":276,"../internals/iterator-define":279,"../internals/object-create":290,"../internals/set-species":317}],201:[function(e,t,r){"use strict";function l(e){return e.frozen||(e.frozen=new n)}function n(){this.entries=[]}function s(e,t){return o(e.entries,function(e){return e[0]===t})}var a=e("../internals/function-uncurry-this"),u=e("../internals/define-built-ins"),c=e("../internals/internal-metadata").getWeakData,f=e("../internals/an-instance"),d=e("../internals/an-object"),p=e("../internals/is-null-or-undefined"),b=e("../internals/is-object"),h=e("../internals/iterate"),i=e("../internals/array-iteration"),y=e("../internals/has-own-property"),e=e("../internals/internal-state"),m=e.set,g=e.getterFor,o=i.find,j=i.findIndex,v=a([].splice),_=0;n.prototype={get:function(e){e=s(this,e);if(e)return e[1]},has:function(e){return!!s(this,e)},set:function(e,t){var r=s(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(t){var e=j(this.entries,function(e){return e[0]===t});return~e&&v(this.entries,e,1),!!~e}},t.exports={getConstructor:function(e,r,n,s){function a(e,t,r){var n=o(e),s=c(d(t),!0);return!0===s?l(n).set(t,r):s[n.id]=r,e}var e=e(function(e,t){f(e,i),m(e,{type:r,id:_++,frozen:void 0}),p(t)||h(t,e[s],{that:e,AS_ENTRIES:n})}),i=e.prototype,o=g(r);return u(i,{delete:function(e){var t,r=o(this);return!!b(e)&&(!0===(t=c(e))?l(r).delete(e):t&&y(t,r.id)&&delete t[r.id])},has:function(e){var t,r=o(this);return!!b(e)&&(!0===(t=c(e))?l(r).has(e):t&&y(t,r.id))}}),u(i,n?{get:function(e){var t,r=o(this);if(b(e))return!0===(t=c(e))?l(r).get(e):t?t[r.id]:void 0},set:function(e,t){return a(this,e,t)}}:{add:function(e){return a(this,e,!0)}}),e}}},{"../internals/an-instance":180,"../internals/an-object":181,"../internals/array-iteration":186,"../internals/define-built-ins":212,"../internals/function-uncurry-this":248,"../internals/has-own-property":255,"../internals/internal-metadata":263,"../internals/internal-state":264,"../internals/is-null-or-undefined":271,"../internals/is-object":272,"../internals/iterate":276}],202:[function(e,t,r){"use strict";var d=e("../internals/export"),p=e("../internals/global"),b=e("../internals/internal-metadata"),h=e("../internals/fails"),y=e("../internals/create-non-enumerable-property"),m=e("../internals/iterate"),g=e("../internals/an-instance"),j=e("../internals/is-callable"),v=e("../internals/is-object"),_=e("../internals/set-to-string-tag"),w=e("../internals/object-define-property").f,E=e("../internals/array-iteration").forEach,S=e("../internals/descriptors"),e=e("../internals/internal-state"),O=e.set,C=e.getterFor;t.exports=function(r,e,t){var n,a,i,s=-1!==r.indexOf("Map"),o=-1!==r.indexOf("Weak"),l=s?"set":"add",u=p[r],c=u&&u.prototype,f={};return S&&j(u)&&(o||c.forEach&&!h(function(){(new u).entries().next()}))?(a=(n=e(function(e,t){O(g(e,a),{type:r,collection:new u}),null!=t&&m(t,e[l],{that:e,AS_ENTRIES:s})})).prototype,i=C(r),E(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(n){var s="add"==n||"set"==n;n in c&&(!o||"clear"!=n)&&y(a,n,function(e,t){var r=i(this).collection;return s||!o||v(e)?(r=r[n](0===e?0:e,t),s?this:r):"get"==n&&void 0})}),o||w(a,"size",{configurable:!0,get:function(){return i(this).collection.size}})):(n=t.getConstructor(e,r,s,l),b.enable()),_(n,r,!1,!0),f[r]=n,d({global:!0,forced:!0},f),o||t.setStrong(n,r,s),n}},{"../internals/an-instance":180,"../internals/array-iteration":186,"../internals/create-non-enumerable-property":207,"../internals/descriptors":215,"../internals/export":237,"../internals/fails":238,"../internals/global":254,"../internals/internal-metadata":263,"../internals/internal-state":264,"../internals/is-callable":267,"../internals/is-object":272,"../internals/iterate":276,"../internals/object-define-property":292,"../internals/set-to-string-tag":318}],203:[function(e,t,r){var l=e("../internals/has-own-property"),u=e("../internals/own-keys"),c=e("../internals/object-get-own-property-descriptor"),f=e("../internals/object-define-property");t.exports=function(e,t,r){for(var n=u(t),s=f.f,a=c.f,i=0;i<n.length;i++){var o=n[i];l(e,o)||r&&l(r,o)||s(e,o,a(t,o))}}},{"../internals/has-own-property":255,"../internals/object-define-property":292,"../internals/object-get-own-property-descriptor":293,"../internals/own-keys":307}],204:[function(e,t,r){var n=e("../internals/well-known-symbol")("match");t.exports=function(t){var r=/./;try{"/./"[t](r)}catch(e){try{return r[n]=!1,"/./"[t](r)}catch(e){}}return!1}},{"../internals/well-known-symbol":346}],205:[function(e,t,r){e=e("../internals/fails");t.exports=!e(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},{"../internals/fails":238}],206:[function(e,t,r){t.exports=function(e,t){return{value:e,done:t}}},{}],207:[function(e,t,r){var n=e("../internals/descriptors"),s=e("../internals/object-define-property"),a=e("../internals/create-property-descriptor");t.exports=n?function(e,t,r){return s.f(e,t,a(1,r))}:function(e,t,r){return e[t]=r,e}},{"../internals/create-property-descriptor":208,"../internals/descriptors":215,"../internals/object-define-property":292}],208:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],209:[function(e,t,r){"use strict";var n=e("../internals/to-property-key"),s=e("../internals/object-define-property"),a=e("../internals/create-property-descriptor");t.exports=function(e,t,r){t=n(t);t in e?s.f(e,t,a(0,r)):e[t]=r}},{"../internals/create-property-descriptor":208,"../internals/object-define-property":292,"../internals/to-property-key":335}],210:[function(e,t,r){var n=e("../internals/object-define-property");t.exports=function(e,t,r){return n.f(e,t,r)}},{"../internals/object-define-property":292}],211:[function(e,t,r){var s=e("../internals/create-non-enumerable-property");t.exports=function(e,t,r,n){return n&&n.enumerable?e[t]=r:s(e,t,r),e}},{"../internals/create-non-enumerable-property":207}],212:[function(e,t,r){var s=e("../internals/define-built-in");t.exports=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:s(e,n,t[n],r);return e}},{"../internals/define-built-in":211}],213:[function(e,t,r){var n=e("../internals/global"),s=Object.defineProperty;t.exports=function(t,r){try{s(n,t,{value:r,configurable:!0,writable:!0})}catch(e){n[t]=r}return r}},{"../internals/global":254}],214:[function(e,t,r){"use strict";var n=e("../internals/try-to-string"),s=TypeError;t.exports=function(e,t){if(!delete e[t])throw s("Cannot delete property "+n(t)+" of "+n(e))}},{"../internals/try-to-string":338}],215:[function(e,t,r){e=e("../internals/fails");t.exports=!e(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},{"../internals/fails":238}],216:[function(e,t,r){var n="object"==typeof document&&document.all;t.exports={all:n,IS_HTMLDDA:void 0===n&&void 0!==n}},{}],217:[function(e,t,r){var n=e("../internals/global"),e=e("../internals/is-object"),s=n.document,a=e(s)&&e(s.createElement);t.exports=function(e){return a?s.createElement(e):{}}},{"../internals/global":254,"../internals/is-object":272}],218:[function(e,t,r){var n=TypeError;t.exports=function(e){if(9007199254740991<e)throw n("Maximum allowed index exceeded");return e}},{}],219:[function(e,t,r){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],220:[function(e,t,r){e=e("../internals/engine-user-agent").match(/firefox\/(\d+)/i);t.exports=!!e&&+e[1]},{"../internals/engine-user-agent":229}],221:[function(e,t,r){var n=e("../internals/engine-is-deno"),e=e("../internals/engine-is-node");t.exports=!n&&!e&&"object"==typeof window&&"object"==typeof document},{"../internals/engine-is-deno":223,"../internals/engine-is-node":227}],222:[function(e,t,r){t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},{}],223:[function(e,t,r){t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},{}],224:[function(e,t,r){e=e("../internals/engine-user-agent");t.exports=/MSIE|Trident/.test(e)},{"../internals/engine-user-agent":229}],225:[function(e,t,r){e=e("../internals/engine-user-agent");t.exports=/ipad|iphone|ipod/i.test(e)&&"undefined"!=typeof Pebble},{"../internals/engine-user-agent":229}],226:[function(e,t,r){e=e("../internals/engine-user-agent");t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(e)},{"../internals/engine-user-agent":229}],227:[function(r,n,e){!function(t){!function(){var e=r("../internals/classof-raw");n.exports=void 0!==t&&"process"==e(t)}.call(this)}.call(this,r("_process"))},{"../internals/classof-raw":198,_process:108}],228:[function(e,t,r){e=e("../internals/engine-user-agent");t.exports=/web0s(?!.*chrome)/i.test(e)},{"../internals/engine-user-agent":229}],229:[function(e,t,r){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},{}],230:[function(e,t,r){var n,s,a=e("../internals/global"),e=e("../internals/engine-user-agent"),i=a.process,a=a.Deno,i=i&&i.versions||a&&a.version,a=i&&i.v8;!(s=a?0<(n=a.split("."))[0]&&n[0]<4?1:+(n[0]+n[1]):s)&&e&&(!(n=e.match(/Edge\/(\d+)/))||74<=n[1])&&(n=e.match(/Chrome\/(\d+)/))&&(s=+n[1]),t.exports=s},{"../internals/engine-user-agent":229,"../internals/global":254}],231:[function(e,t,r){e=e("../internals/engine-user-agent").match(/AppleWebKit\/(\d+)\./);t.exports=!!e&&+e[1]},{"../internals/engine-user-agent":229}],232:[function(e,t,r){var n=e("../internals/path");t.exports=function(e){return n[e+"Prototype"]}},{"../internals/path":308}],233:[function(e,t,r){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],234:[function(e,t,r){var e=e("../internals/function-uncurry-this"),n=Error,s=e("".replace),e=String(n("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,i=a.test(e);t.exports=function(e,t){if(i&&"string"==typeof e&&!n.prepareStackTrace)for(;t--;)e=s(e,a,"");return e}},{"../internals/function-uncurry-this":248}],235:[function(e,t,r){var s=e("../internals/create-non-enumerable-property"),a=e("../internals/error-stack-clear"),i=e("../internals/error-stack-installable"),o=Error.captureStackTrace;t.exports=function(e,t,r,n){i&&(o?o(e,t):s(e,"stack",a(r,n)))}},{"../internals/create-non-enumerable-property":207,"../internals/error-stack-clear":234,"../internals/error-stack-installable":236}],236:[function(e,t,r){var n=e("../internals/fails"),s=e("../internals/create-property-descriptor");t.exports=!n(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",s(1,7)),7!==e.stack)})},{"../internals/create-property-descriptor":208,"../internals/fails":238}],237:[function(e,t,r){"use strict";function h(n){function s(e,t,r){if(this instanceof s){switch(arguments.length){case 0:return new n;case 1:return new n(e);case 2:return new n(e,t)}return new n(e,t,r)}return a(n,this,arguments)}return s.prototype=n.prototype,s}var y=e("../internals/global"),a=e("../internals/function-apply"),m=e("../internals/function-uncurry-this-clause"),g=e("../internals/is-callable"),j=e("../internals/object-get-own-property-descriptor").f,v=e("../internals/is-forced"),_=e("../internals/path"),w=e("../internals/function-bind-context"),E=e("../internals/create-non-enumerable-property"),S=e("../internals/has-own-property");t.exports=function(e,t){var r,n,s,a,i,o,l=e.target,u=e.global,c=e.stat,f=e.proto,d=u?y:c?y[l]:(y[l]||{}).prototype,p=u?_:_[l]||E(_,l,{})[l],b=p.prototype;for(n in t)i=!(r=v(u?n:l+(c?".":"#")+n,e.forced))&&d&&S(d,n),a=p[n],i&&(o=e.dontCallGetSet?(o=j(d,n))&&o.value:d[n]),s=i&&o?o:t[n],i&&typeof a==typeof s||(i=e.bind&&i?w(s,y):e.wrap&&i?h(s):f&&g(s)?m(s):s,(e.sham||s&&s.sham||a&&a.sham)&&E(i,"sham",!0),E(p,n,i),f&&(S(_,a=l+"Prototype")||E(_,a,{}),E(_[a],n,s),e.real&&b&&(r||!b[n])&&E(b,n,s)))}},{"../internals/create-non-enumerable-property":207,"../internals/function-apply":240,"../internals/function-bind-context":241,"../internals/function-uncurry-this-clause":247,"../internals/global":254,"../internals/has-own-property":255,"../internals/is-callable":267,"../internals/is-forced":269,"../internals/object-get-own-property-descriptor":293,"../internals/path":308}],238:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],239:[function(e,t,r){e=e("../internals/fails");t.exports=!e(function(){return Object.isExtensible(Object.preventExtensions({}))})},{"../internals/fails":238}],240:[function(e,t,r){var e=e("../internals/function-bind-native"),n=Function.prototype,s=n.apply,a=n.call;t.exports="object"==typeof Reflect&&Reflect.apply||(e?a.bind(s):function(){return a.apply(s,arguments)})},{"../internals/function-bind-native":242}],241:[function(e,t,r){var n=e("../internals/function-uncurry-this-clause"),s=e("../internals/a-callable"),a=e("../internals/function-bind-native"),i=n(n.bind);t.exports=function(e,t){return s(e),void 0===t?e:a?i(e,t):function(){return e.apply(t,arguments)}}},{"../internals/a-callable":176,"../internals/function-bind-native":242,"../internals/function-uncurry-this-clause":247}],242:[function(e,t,r){e=e("../internals/fails");t.exports=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},{"../internals/fails":238}],243:[function(e,t,r){"use strict";var n=e("../internals/function-uncurry-this"),s=e("../internals/a-callable"),a=e("../internals/is-object"),c=e("../internals/has-own-property"),f=e("../internals/array-slice"),e=e("../internals/function-bind-native"),d=Function,p=n([].concat),b=n([].join),h={};t.exports=e?d.bind:function(i){var o=s(this),e=o.prototype,l=f(arguments,1),u=function(){var e=p(l,f(arguments));if(this instanceof u){var t=o,r=e.length,n=e;if(!c(h,r)){for(var s=[],a=0;a<r;a++)s[a]="a["+a+"]";h[r]=d("C,a","return new C("+b(s,",")+")")}return h[r](t,n)}return o.apply(i,e)};return a(e)&&(u.prototype=e),u}},{"../internals/a-callable":176,"../internals/array-slice":192,"../internals/function-bind-native":242,"../internals/function-uncurry-this":248,"../internals/has-own-property":255,"../internals/is-object":272}],244:[function(e,t,r){var e=e("../internals/function-bind-native"),n=Function.prototype.call;t.exports=e?n.bind(n):function(){return n.apply(n,arguments)}},{"../internals/function-bind-native":242}],245:[function(e,t,r){var n=e("../internals/descriptors"),e=e("../internals/has-own-property"),s=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,e=e(s,"name"),i=e&&"something"===function(){}.name,n=e&&(!n||a(s,"name").configurable);t.exports={EXISTS:e,PROPER:i,CONFIGURABLE:n}},{"../internals/descriptors":215,"../internals/has-own-property":255}],246:[function(e,t,r){var n=e("../internals/function-uncurry-this"),s=e("../internals/a-callable");t.exports=function(e,t,r){try{return n(s(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},{"../internals/a-callable":176,"../internals/function-uncurry-this":248}],247:[function(e,t,r){var n=e("../internals/classof-raw"),s=e("../internals/function-uncurry-this");t.exports=function(e){if("Function"===n(e))return s(e)}},{"../internals/classof-raw":198,"../internals/function-uncurry-this":248}],248:[function(e,t,r){var e=e("../internals/function-bind-native"),n=Function.prototype,s=n.call,n=e&&n.bind.bind(s,s);t.exports=e?n:function(e){return function(){return s.apply(e,arguments)}}},{"../internals/function-bind-native":242}],249:[function(e,t,r){function n(e){return i(e)?e:void 0}var s=e("../internals/path"),a=e("../internals/global"),i=e("../internals/is-callable");t.exports=function(e,t){return arguments.length<2?n(s[e])||n(a[e]):s[e]&&s[e][t]||a[e]&&a[e][t]}},{"../internals/global":254,"../internals/is-callable":267,"../internals/path":308}],250:[function(e,t,r){var n=e("../internals/classof"),s=e("../internals/get-method"),a=e("../internals/is-null-or-undefined"),i=e("../internals/iterators"),o=e("../internals/well-known-symbol")("iterator");t.exports=function(e){if(!a(e))return s(e,o)||s(e,"@@iterator")||i[n(e)]}},{"../internals/classof":199,"../internals/get-method":253,"../internals/is-null-or-undefined":271,"../internals/iterators":281,"../internals/well-known-symbol":346}],251:[function(e,t,r){var n=e("../internals/function-call"),s=e("../internals/a-callable"),a=e("../internals/an-object"),i=e("../internals/try-to-string"),o=e("../internals/get-iterator-method"),l=TypeError;t.exports=function(e,t){var r=arguments.length<2?o(e):t;if(s(r))return a(n(r,e));throw l(i(e)+" is not iterable")}},{"../internals/a-callable":176,"../internals/an-object":181,"../internals/function-call":244,"../internals/get-iterator-method":250,"../internals/try-to-string":338}],252:[function(e,t,r){var n=e("../internals/function-uncurry-this"),o=e("../internals/is-array"),l=e("../internals/is-callable"),u=e("../internals/classof-raw"),c=e("../internals/to-string"),f=n([].push);t.exports=function(e){if(l(e))return e;if(o(e)){for(var t=e.length,n=[],r=0;r<t;r++){var s=e[r];"string"==typeof s?f(n,s):"number"!=typeof s&&"Number"!=u(s)&&"String"!=u(s)||f(n,c(s))}var a=n.length,i=!0;return function(e,t){if(i)return i=!1,t;if(o(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}}},{"../internals/classof-raw":198,"../internals/function-uncurry-this":248,"../internals/is-array":266,"../internals/is-callable":267,"../internals/to-string":337}],253:[function(e,t,r){var n=e("../internals/a-callable"),s=e("../internals/is-null-or-undefined");t.exports=function(e,t){e=e[t];return s(e)?void 0:n(e)}},{"../internals/a-callable":176,"../internals/is-null-or-undefined":271}],254:[function(e,r,t){!function(t){!function(){function e(e){return e&&e.Math==Math&&e}r.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t&&t)||function(){return this}()||this||Function("return this")()}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],255:[function(e,t,r){var n=e("../internals/function-uncurry-this"),s=e("../internals/to-object"),a=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return a(s(e),t)}},{"../internals/function-uncurry-this":248,"../internals/to-object":333}],256:[function(e,t,r){t.exports={}},{}],257:[function(e,t,r){t.exports=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}}},{}],258:[function(e,t,r){e=e("../internals/get-built-in");t.exports=e("document","documentElement")},{"../internals/get-built-in":249}],259:[function(e,t,r){var n=e("../internals/descriptors"),s=e("../internals/fails"),a=e("../internals/document-create-element");t.exports=!n&&!s(function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a})},{"../internals/descriptors":215,"../internals/document-create-element":217,"../internals/fails":238}],260:[function(e,t,r){var n=e("../internals/function-uncurry-this"),s=e("../internals/fails"),a=e("../internals/classof-raw"),i=Object,o=n("".split);t.exports=s(function(){return!i("z").propertyIsEnumerable(0)})?function(e){return"String"==a(e)?o(e,""):i(e)}:i},{"../internals/classof-raw":198,"../internals/fails":238,"../internals/function-uncurry-this":248}],261:[function(e,t,r){var n=e("../internals/function-uncurry-this"),s=e("../internals/is-callable"),e=e("../internals/shared-store"),a=n(Function.toString);s(e.inspectSource)||(e.inspectSource=function(e){return a(e)}),t.exports=e.inspectSource},{"../internals/function-uncurry-this":248,"../internals/is-callable":267,"../internals/shared-store":320}],262:[function(e,t,r){var n=e("../internals/is-object"),s=e("../internals/create-non-enumerable-property");t.exports=function(e,t){n(t)&&"cause"in t&&s(e,"cause",t.cause)}},{"../internals/create-non-enumerable-property":207,"../internals/is-object":272}],263:[function(e,t,r){function n(e){u(e,y,{value:{objectID:"O"+m++,weakData:{}}})}var i=e("../internals/export"),o=e("../internals/function-uncurry-this"),s=e("../internals/hidden-keys"),a=e("../internals/is-object"),l=e("../internals/has-own-property"),u=e("../internals/object-define-property").f,c=e("../internals/object-get-own-property-names"),f=e("../internals/object-get-own-property-names-external"),d=e("../internals/object-is-extensible"),p=e("../internals/uid"),b=e("../internals/freezing"),h=!1,y=p("meta"),m=0,g=t.exports={enable:function(){g.enable=function(){},h=!0;var s=c.f,a=o([].splice),e={};e[y]=1,s(e).length&&(c.f=function(e){for(var t=s(e),r=0,n=t.length;r<n;r++)if(t[r]===y){a(t,r,1);break}return t},i({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:f.f}))},fastKey:function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!l(e,y)){if(!d(e))return"F";if(!t)return"E";n(e)}return e[y].objectID},getWeakData:function(e,t){if(!l(e,y)){if(!d(e))return!0;if(!t)return!1;n(e)}return e[y].weakData},onFreeze:function(e){return b&&h&&d(e)&&!l(e,y)&&n(e),e}};s[y]=!0},{"../internals/export":237,"../internals/freezing":239,"../internals/function-uncurry-this":248,"../internals/has-own-property":255,"../internals/hidden-keys":256,"../internals/is-object":272,"../internals/object-define-property":292,"../internals/object-get-own-property-names":295,"../internals/object-get-own-property-names-external":294,"../internals/object-is-extensible":298,"../internals/uid":339}],264:[function(e,t,r){var n,s,a,i,o=e("../internals/weak-map-basic-detection"),l=e("../internals/global"),u=e("../internals/is-object"),c=e("../internals/create-non-enumerable-property"),f=e("../internals/has-own-property"),d=e("../internals/shared-store"),p=e("../internals/shared-key"),e=e("../internals/hidden-keys"),b="Object already initialized",h=l.TypeError,l=l.WeakMap,y=o||d.state?((a=d.state||(d.state=new l)).get=a.get,a.has=a.has,a.set=a.set,n=function(e,t){if(a.has(e))throw h(b);return t.facade=e,a.set(e,t),t},s=function(e){return a.get(e)||{}},function(e){return a.has(e)}):(e[i=p("state")]=!0,n=function(e,t){if(f(e,i))throw h(b);return t.facade=e,c(e,i,t),t},s=function(e){return f(e,i)?e[i]:{}},function(e){return f(e,i)});t.exports={set:n,get:s,has:y,enforce:function(e){return y(e)?s(e):n(e,{})},getterFor:function(t){return function(e){if(u(e)&&(e=s(e)).type===t)return e;throw h("Incompatible receiver, "+t+" required")}}}},{"../internals/create-non-enumerable-property":207,"../internals/global":254,"../internals/has-own-property":255,"../internals/hidden-keys":256,"../internals/is-object":272,"../internals/shared-key":319,"../internals/shared-store":320,"../internals/weak-map-basic-detection":343}],265:[function(e,t,r){var n=e("../internals/well-known-symbol"),s=e("../internals/iterators"),a=n("iterator"),i=Array.prototype;t.exports=function(e){return void 0!==e&&(s.Array===e||i[a]===e)}},{"../internals/iterators":281,"../internals/well-known-symbol":346}],266:[function(e,t,r){var n=e("../internals/classof-raw");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"../internals/classof-raw":198}],267:[function(e,t,r){var e=e("../internals/document-all"),n=e.all;t.exports=e.IS_HTMLDDA?function(e){return"function"==typeof e||e===n}:function(e){return"function"==typeof e}},{"../internals/document-all":216}],268:[function(e,t,r){function n(){}function s(e){if(!l(e))return!1;try{return p(n,d,e),!0}catch(e){return!1}}function a(e){if(!l(e))return!1;switch(u(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return y||!!h(b,f(e))}catch(e){return!0}}var i=e("../internals/function-uncurry-this"),o=e("../internals/fails"),l=e("../internals/is-callable"),u=e("../internals/classof"),c=e("../internals/get-built-in"),f=e("../internals/inspect-source"),d=[],p=c("Reflect","construct"),b=/^\s*(?:class|function)\b/,h=i(b.exec),y=!b.exec(n);a.sham=!0,t.exports=!p||o(function(){var e;return s(s.call)||!s(Object)||!s(function(){e=!0})||e})?a:s},{"../internals/classof":199,"../internals/fails":238,"../internals/function-uncurry-this":248,"../internals/get-built-in":249,"../internals/inspect-source":261,"../internals/is-callable":267}],269:[function(e,t,r){function n(e,t){return(e=l[o(e)])==c||e!=u&&(a(t)?s(t):!!t)}var s=e("../internals/fails"),a=e("../internals/is-callable"),i=/#|\.prototype\./,o=n.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=n.data={},u=n.NATIVE="N",c=n.POLYFILL="P";t.exports=n},{"../internals/fails":238,"../internals/is-callable":267}],270:[function(e,t,r){var n=e("../internals/is-object"),s=Math.floor;t.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&s(e)===e}},{"../internals/is-object":272}],271:[function(e,t,r){t.exports=function(e){return null==e}},{}],272:[function(e,t,r){var n=e("../internals/is-callable"),e=e("../internals/document-all"),s=e.all;t.exports=e.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:n(e)||e===s}:function(e){return"object"==typeof e?null!==e:n(e)}},{"../internals/document-all":216,"../internals/is-callable":267}],273:[function(e,t,r){t.exports=!0},{}],274:[function(e,t,r){var n=e("../internals/is-object"),s=e("../internals/classof-raw"),a=e("../internals/well-known-symbol")("match");t.exports=function(e){var t;return n(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==s(e))}},{"../internals/classof-raw":198,"../internals/is-object":272,"../internals/well-known-symbol":346}],275:[function(e,t,r){var n=e("../internals/get-built-in"),s=e("../internals/is-callable"),a=e("../internals/object-is-prototype-of"),e=e("../internals/use-symbol-as-uid"),i=Object;t.exports=e?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return s(t)&&a(t.prototype,i(e))}},{"../internals/get-built-in":249,"../internals/is-callable":267,"../internals/object-is-prototype-of":299,"../internals/use-symbol-as-uid":340}],276:[function(e,t,r){function m(e,t){this.stopped=e,this.result=t}var g=e("../internals/function-bind-context"),j=e("../internals/function-call"),v=e("../internals/an-object"),_=e("../internals/try-to-string"),w=e("../internals/is-array-iterator-method"),E=e("../internals/length-of-array-like"),S=e("../internals/object-is-prototype-of"),O=e("../internals/get-iterator"),C=e("../internals/get-iterator-method"),x=e("../internals/iterator-close"),P=TypeError,A=m.prototype;t.exports=function(e,t,r){function n(e){return a&&x(a,"normal",e),new m(!0,e)}function s(e){return d?(v(e),h?y(e[0],e[1],n):y(e[0],e[1])):h?y(e,n):y(e)}var a,i,o,l,u,c,f=r&&r.that,d=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),b=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),y=g(t,f);if(p)a=e.iterator;else if(b)a=e;else{if(!(r=C(e)))throw P(_(e)+" is not iterable");if(w(r)){for(i=0,o=E(e);i<o;i++)if((l=s(e[i]))&&S(A,l))return l;return new m(!1)}a=O(e,r)}for(u=(p?e:a).next;!(c=j(u,a)).done;){try{l=s(c.value)}catch(e){x(a,"throw",e)}if("object"==typeof l&&l&&S(A,l))return l}return new m(!1)}},{"../internals/an-object":181,"../internals/function-bind-context":241,"../internals/function-call":244,"../internals/get-iterator":251,"../internals/get-iterator-method":250,"../internals/is-array-iterator-method":265,"../internals/iterator-close":277,"../internals/length-of-array-like":282,"../internals/object-is-prototype-of":299,"../internals/try-to-string":338}],277:[function(e,t,r){var a=e("../internals/function-call"),i=e("../internals/an-object"),o=e("../internals/get-method");t.exports=function(e,t,r){var n,s;i(e);try{if(!(n=o(e,"return"))){if("throw"===t)throw r;return r}n=a(n,e)}catch(e){s=!0,n=e}if("throw"===t)throw r;if(s)throw n;return i(n),r}},{"../internals/an-object":181,"../internals/function-call":244,"../internals/get-method":253}],278:[function(e,t,r){"use strict";function s(){return this}var a=e("../internals/iterators-core").IteratorPrototype,i=e("../internals/object-create"),o=e("../internals/create-property-descriptor"),l=e("../internals/set-to-string-tag"),u=e("../internals/iterators");t.exports=function(e,t,r,n){t+=" Iterator";return e.prototype=i(a,{next:o(+!n,r)}),l(e,t,!1,!0),u[t]=s,e}},{"../internals/create-property-descriptor":208,"../internals/iterators":281,"../internals/iterators-core":280,"../internals/object-create":290,"../internals/set-to-string-tag":318}],279:[function(e,t,r){"use strict";function h(){return this}var y=e("../internals/export"),m=e("../internals/function-call"),g=e("../internals/is-pure"),n=e("../internals/function-name"),j=e("../internals/is-callable"),v=e("../internals/iterator-create-constructor"),_=e("../internals/object-get-prototype-of"),w=e("../internals/object-set-prototype-of"),E=e("../internals/set-to-string-tag"),S=e("../internals/create-non-enumerable-property"),O=e("../internals/define-built-in"),s=e("../internals/well-known-symbol"),C=e("../internals/iterators"),e=e("../internals/iterators-core"),x=n.PROPER,P=n.CONFIGURABLE,A=e.IteratorPrototype,R=e.BUGGY_SAFARI_ITERATORS,I=s("iterator"),N="values";t.exports=function(e,t,r,n,s,a,i){v(r,t,n);function o(e){if(e===s&&p)return p;if(!R&&e in f)return f[e];switch(e){case"keys":case N:case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}}var l,u,n=t+" Iterator",c=!1,f=e.prototype,d=f[I]||f["@@iterator"]||s&&f[s],p=!R&&d||o(s),b="Array"==t&&f.entries||d;if(b&&(b=_(b.call(new e)))!==Object.prototype&&b.next&&(g||_(b)===A||(w?w(b,A):j(b[I])||O(b,I,h)),E(b,n,!0,!0),g&&(C[n]=h)),x&&s==N&&d&&d.name!==N&&(!g&&P?S(f,"name",N):(c=!0,p=function(){return m(d,this)})),s)if(l={values:o(N),keys:a?p:o("keys"),entries:o("entries")},i)for(u in l)!R&&!c&&u in f||O(f,u,l[u]);else y({target:t,proto:!0,forced:R||c},l);return g&&!i||f[I]===p||O(f,I,p,{name:s}),C[t]=p,l}},{"../internals/create-non-enumerable-property":207,"../internals/define-built-in":211,"../internals/export":237,"../internals/function-call":244,"../internals/function-name":245,"../internals/is-callable":267,"../internals/is-pure":273,"../internals/iterator-create-constructor":278,"../internals/iterators":281,"../internals/iterators-core":280,"../internals/object-get-prototype-of":297,"../internals/object-set-prototype-of":303,"../internals/set-to-string-tag":318,"../internals/well-known-symbol":346}],280:[function(e,t,r){"use strict";var n,s,a=e("../internals/fails"),i=e("../internals/is-callable"),o=e("../internals/is-object"),l=e("../internals/object-create"),u=e("../internals/object-get-prototype-of"),c=e("../internals/define-built-in"),f=e("../internals/well-known-symbol"),e=e("../internals/is-pure"),d=f("iterator"),f=!1;[].keys&&("next"in(s=[].keys())?(u=u(u(s)))!==Object.prototype&&(n=u):f=!0),!o(n)||a(function(){var e={};return n[d].call(e)!==e})?n={}:e&&(n=l(n)),i(n[d])||c(n,d,function(){return this}),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:f}},{"../internals/define-built-in":211,"../internals/fails":238,"../internals/is-callable":267,"../internals/is-object":272,"../internals/is-pure":273,"../internals/object-create":290,"../internals/object-get-prototype-of":297,"../internals/well-known-symbol":346}],281:[function(e,t,r){arguments[4][256][0].apply(r,arguments)},{dup:256}],282:[function(e,t,r){var n=e("../internals/to-length");t.exports=function(e){return n(e.length)}},{"../internals/to-length":332}],283:[function(e,t,r){var n=Math.ceil,s=Math.floor;t.exports=Math.trunc||function(e){e=+e;return(0<e?s:n)(e)}},{}],284:[function(e,t,r){var n,s,a,i,o,l,u=e("../internals/global"),c=e("../internals/function-bind-context"),f=e("../internals/object-get-own-property-descriptor").f,d=e("../internals/task").set,p=e("../internals/queue"),b=e("../internals/engine-is-ios"),h=e("../internals/engine-is-ios-pebble"),y=e("../internals/engine-is-webos-webkit"),m=e("../internals/engine-is-node"),e=u.MutationObserver||u.WebKitMutationObserver,g=u.document,j=u.process,v=u.Promise,f=f(u,"queueMicrotask"),f=f&&f.value;f||(i=new p,o=function(){var e,t;for(m&&(e=j.domain)&&e.exit();t=i.get();)try{t()}catch(e){throw i.head&&l(),e}e&&e.enter()},l=b||m||y||!e||!g?!h&&v&&v.resolve?((p=v.resolve(void 0)).constructor=v,a=c(p.then,p),function(){a(o)}):m?function(){j.nextTick(o)}:(d=c(d,u),function(){d(o)}):(n=!0,s=g.createTextNode(""),new e(o).observe(s,{characterData:!0}),function(){s.data=n=!n}),f=function(e){i.head||l(),i.add(e)}),t.exports=f},{"../internals/engine-is-ios":226,"../internals/engine-is-ios-pebble":225,"../internals/engine-is-node":227,"../internals/engine-is-webos-webkit":228,"../internals/function-bind-context":241,"../internals/global":254,"../internals/object-get-own-property-descriptor":293,"../internals/queue":314,"../internals/task":328}],285:[function(e,t,r){"use strict";function n(e){var r,n;this.promise=new e(function(e,t){if(void 0!==r||void 0!==n)throw a("Bad Promise constructor");r=e,n=t}),this.resolve=s(r),this.reject=s(n)}var s=e("../internals/a-callable"),a=TypeError;t.exports.f=function(e){return new n(e)}},{"../internals/a-callable":176}],286:[function(e,t,r){var n=e("../internals/to-string");t.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},{"../internals/to-string":337}],287:[function(e,t,r){var n=e("../internals/is-regexp"),s=TypeError;t.exports=function(e){if(n(e))throw s("The method doesn't accept regular expressions");return e}},{"../internals/is-regexp":274}],288:[function(e,t,r){var n=e("../internals/global"),s=e("../internals/fails"),a=e("../internals/function-uncurry-this"),i=e("../internals/to-string"),o=e("../internals/string-trim").trim,e=e("../internals/whitespaces"),l=n.parseInt,n=n.Symbol,u=n&&n.iterator,c=/^[+-]?0x/i,f=a(c.exec),n=8!==l(e+"08")||22!==l(e+"0x16")||u&&!s(function(){l(Object(u))});t.exports=n?function(e,t){e=o(i(e));return l(e,t>>>0||(f(c,e)?16:10))}:l},{"../internals/fails":238,"../internals/function-uncurry-this":248,"../internals/global":254,"../internals/string-trim":324,"../internals/to-string":337,"../internals/whitespaces":347}],289:[function(e,t,r){"use strict";var d=e("../internals/descriptors"),n=e("../internals/function-uncurry-this"),p=e("../internals/function-call"),s=e("../internals/fails"),b=e("../internals/object-keys"),h=e("../internals/object-get-own-property-symbols"),y=e("../internals/object-property-is-enumerable"),m=e("../internals/to-object"),g=e("../internals/indexed-object"),a=Object.assign,i=Object.defineProperty,j=n([].concat);t.exports=!a||s(function(){var e,t,r,n;return!(!d||1===a({b:1},a(i({},"a",{enumerable:!0,get:function(){i(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},n="abcdefghijklmnopqrst",(e={})[r=Symbol()]=7,n.split("").forEach(function(e){t[e]=e}),7!=a({},e)[r]||b(a({},t)).join("")!=n)})?function(e,t){for(var r=m(e),n=arguments.length,s=1,a=h.f,i=y.f;s<n;)for(var o,l=g(arguments[s++]),u=a?j(b(l),a(l)):b(l),c=u.length,f=0;f<c;)o=u[f++],d&&!p(i,l,o)||(r[o]=l[o]);return r}:a},{"../internals/descriptors":215,"../internals/fails":238,"../internals/function-call":244,"../internals/function-uncurry-this":248,"../internals/indexed-object":260,"../internals/object-get-own-property-symbols":296,"../internals/object-keys":301,"../internals/object-property-is-enumerable":302,"../internals/to-object":333}],290:[function(e,t,r){function n(){}function s(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t}var a,i=e("../internals/an-object"),o=e("../internals/object-define-properties"),l=e("../internals/enum-bug-keys"),u=e("../internals/hidden-keys"),c=e("../internals/html"),f=e("../internals/document-create-element"),e=e("../internals/shared-key"),d="prototype",p="script",b=e("IE_PROTO"),h=function(e){return"<"+p+">"+e+"</"+p+">"},y=function(){try{a=new ActiveXObject("htmlfile")}catch(e){}y="undefined"==typeof document||document.domain&&a?s(a):(e=f("iframe"),t="java"+p+":",e.style.display="none",c.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F);for(var e,t,r=l.length;r--;)delete y[d][l[r]];return y()};u[b]=!0,t.exports=Object.create||function(e,t){var r;return null!==e?(n[d]=i(e),r=new n,n[d]=null,r[b]=e):r=y(),void 0===t?r:o.f(r,t)}},{"../internals/an-object":181,"../internals/document-create-element":217,"../internals/enum-bug-keys":233,"../internals/hidden-keys":256,"../internals/html":258,"../internals/object-define-properties":291,"../internals/shared-key":319}],291:[function(e,t,r){var n=e("../internals/descriptors"),s=e("../internals/v8-prototype-define-bug"),o=e("../internals/object-define-property"),l=e("../internals/an-object"),u=e("../internals/to-indexed-object"),c=e("../internals/object-keys");r.f=n&&!s?Object.defineProperties:function(e,t){l(e);for(var r,n=u(t),s=c(t),a=s.length,i=0;i<a;)o.f(e,r=s[i++],n[r]);return e}},{"../internals/an-object":181,"../internals/descriptors":215,"../internals/object-define-property":292,"../internals/object-keys":301,"../internals/to-indexed-object":330,"../internals/v8-prototype-define-bug":341}],292:[function(e,t,r){var n=e("../internals/descriptors"),s=e("../internals/ie8-dom-define"),a=e("../internals/v8-prototype-define-bug"),i=e("../internals/an-object"),o=e("../internals/to-property-key"),l=TypeError,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,f="enumerable",d="configurable",p="writable";r.f=n?a?function(e,t,r){var n;return i(e),t=o(t),i(r),"function"==typeof e&&"prototype"===t&&"value"in r&&p in r&&!r[p]&&((n=c(e,t))&&n[p]&&(e[t]=r.value,r={configurable:(d in r?r:n)[d],enumerable:(f in r?r:n)[f],writable:!1})),u(e,t,r)}:u:function(e,t,r){if(i(e),t=o(t),i(r),s)try{return u(e,t,r)}catch(e){}if("get"in r||"set"in r)throw l("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},{"../internals/an-object":181,"../internals/descriptors":215,"../internals/ie8-dom-define":259,"../internals/to-property-key":335,"../internals/v8-prototype-define-bug":341}],293:[function(e,t,r){var n=e("../internals/descriptors"),s=e("../internals/function-call"),a=e("../internals/object-property-is-enumerable"),i=e("../internals/create-property-descriptor"),o=e("../internals/to-indexed-object"),l=e("../internals/to-property-key"),u=e("../internals/has-own-property"),c=e("../internals/ie8-dom-define"),f=Object.getOwnPropertyDescriptor;r.f=n?f:function(e,t){if(e=o(e),t=l(t),c)try{return f(e,t)}catch(e){}if(u(e,t))return i(!s(a.f,e,t),e[t])}},{"../internals/create-property-descriptor":208,"../internals/descriptors":215,"../internals/function-call":244,"../internals/has-own-property":255,"../internals/ie8-dom-define":259,"../internals/object-property-is-enumerable":302,"../internals/to-indexed-object":330,"../internals/to-property-key":335}],294:[function(e,t,r){var n=e("../internals/classof-raw"),s=e("../internals/to-indexed-object"),a=e("../internals/object-get-own-property-names").f,i=e("../internals/array-slice-simple"),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(e){if(!o||"Window"!=n(e))return a(s(e));try{return a(e)}catch(e){return i(o)}}},{"../internals/array-slice-simple":191,"../internals/classof-raw":198,"../internals/object-get-own-property-names":295,"../internals/to-indexed-object":330}],295:[function(e,t,r){var n=e("../internals/object-keys-internal"),s=e("../internals/enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,s)}},{"../internals/enum-bug-keys":233,"../internals/object-keys-internal":300}],296:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],297:[function(e,t,r){var n=e("../internals/has-own-property"),s=e("../internals/is-callable"),a=e("../internals/to-object"),i=e("../internals/shared-key"),e=e("../internals/correct-prototype-getter"),o=i("IE_PROTO"),l=Object,u=l.prototype;t.exports=e?l.getPrototypeOf:function(e){var t,e=a(e);return n(e,o)?e[o]:(t=e.constructor,s(t)&&e instanceof t?t.prototype:e instanceof l?u:null)}},{"../internals/correct-prototype-getter":205,"../internals/has-own-property":255,"../internals/is-callable":267,"../internals/shared-key":319,"../internals/to-object":333}],298:[function(e,t,r){var n=e("../internals/fails"),s=e("../internals/is-object"),a=e("../internals/classof-raw"),i=e("../internals/array-buffer-non-extensible"),o=Object.isExtensible,e=n(function(){o(1)});t.exports=e||i?function(e){return!!s(e)&&((!i||"ArrayBuffer"!=a(e))&&(!o||o(e)))}:o},{"../internals/array-buffer-non-extensible":182,"../internals/classof-raw":198,"../internals/fails":238,"../internals/is-object":272}],299:[function(e,t,r){e=e("../internals/function-uncurry-this");t.exports=e({}.isPrototypeOf)},{"../internals/function-uncurry-this":248}],300:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=e("../internals/has-own-property"),o=e("../internals/to-indexed-object"),l=e("../internals/array-includes").indexOf,u=e("../internals/hidden-keys"),c=n([].push);t.exports=function(e,t){var r,n=o(e),s=0,a=[];for(r in n)!i(u,r)&&i(n,r)&&c(a,r);for(;t.length>s;)!i(n,r=t[s++])||~l(a,r)||c(a,r);return a}},{"../internals/array-includes":185,"../internals/function-uncurry-this":248,"../internals/has-own-property":255,"../internals/hidden-keys":256,"../internals/to-indexed-object":330}],301:[function(e,t,r){var n=e("../internals/object-keys-internal"),s=e("../internals/enum-bug-keys");t.exports=Object.keys||function(e){return n(e,s)}},{"../internals/enum-bug-keys":233,"../internals/object-keys-internal":300}],302:[function(e,t,r){"use strict";var n={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,a=s&&!n.call({1:2},1);r.f=a?function(e){e=s(this,e);return!!e&&e.enumerable}:n},{}],303:[function(e,t,r){var s=e("../internals/function-uncurry-this-accessor"),a=e("../internals/an-object"),i=e("../internals/a-possible-prototype");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=s(Object.prototype,"__proto__","set"))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return a(e),i(t),n?r(e,t):e.__proto__=t,e}}():void 0)},{"../internals/a-possible-prototype":178,"../internals/an-object":181,"../internals/function-uncurry-this-accessor":246}],304:[function(e,t,r){function n(o){return function(e){for(var t,r=c(e),n=u(r),s=n.length,a=0,i=[];a<s;)t=n[a++],l&&!f(r,t)||d(i,o?[t,r[t]]:r[t]);return i}}var l=e("../internals/descriptors"),s=e("../internals/function-uncurry-this"),u=e("../internals/object-keys"),c=e("../internals/to-indexed-object"),f=s(e("../internals/object-property-is-enumerable").f),d=s([].push);t.exports={entries:n(!0),values:n(!1)}},{"../internals/descriptors":215,"../internals/function-uncurry-this":248,"../internals/object-keys":301,"../internals/object-property-is-enumerable":302,"../internals/to-indexed-object":330}],305:[function(e,t,r){"use strict";var n=e("../internals/to-string-tag-support"),s=e("../internals/classof");t.exports=n?{}.toString:function(){return"[object "+s(this)+"]"}},{"../internals/classof":199,"../internals/to-string-tag-support":336}],306:[function(e,t,r){var s=e("../internals/function-call"),a=e("../internals/is-callable"),i=e("../internals/is-object"),o=TypeError;t.exports=function(e,t){var r,n;if("string"===t&&a(r=e.toString)&&!i(n=s(r,e)))return n;if(a(r=e.valueOf)&&!i(n=s(r,e)))return n;if("string"!==t&&a(r=e.toString)&&!i(n=s(r,e)))return n;throw o("Can't convert object to primitive value")}},{"../internals/function-call":244,"../internals/is-callable":267,"../internals/is-object":272}],307:[function(e,t,r){var n=e("../internals/get-built-in"),s=e("../internals/function-uncurry-this"),a=e("../internals/object-get-own-property-names"),i=e("../internals/object-get-own-property-symbols"),o=e("../internals/an-object"),l=s([].concat);t.exports=n("Reflect","ownKeys")||function(e){var t=a.f(o(e)),r=i.f;return r?l(t,r(e)):t}},{"../internals/an-object":181,"../internals/function-uncurry-this":248,"../internals/get-built-in":249,"../internals/object-get-own-property-names":295,"../internals/object-get-own-property-symbols":296}],308:[function(e,t,r){arguments[4][256][0].apply(r,arguments)},{dup:256}],309:[function(e,t,r){t.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},{}],310:[function(e,t,r){var n=e("../internals/global"),s=e("../internals/promise-native-constructor"),a=e("../internals/is-callable"),i=e("../internals/is-forced"),o=e("../internals/inspect-source"),l=e("../internals/well-known-symbol"),u=e("../internals/engine-is-browser"),c=e("../internals/engine-is-deno"),f=e("../internals/is-pure"),d=e("../internals/engine-v8-version"),p=s&&s.prototype,b=l("species"),h=!1,y=a(n.PromiseRejectionEvent),e=i("Promise",function(){var e=o(s),t=e!==String(s);if(!t&&66===d)return!0;if(f&&(!p.catch||!p.finally))return!0;if(!d||d<51||!/native code/.test(e)){function r(e){e(function(){},function(){})}e=new s(function(e){e(1)});if((e.constructor={})[b]=r,!(h=e.then(function(){})instanceof r))return!0}return!t&&(u||c)&&!y});t.exports={CONSTRUCTOR:e,REJECTION_EVENT:y,SUBCLASSING:h}},{"../internals/engine-is-browser":221,"../internals/engine-is-deno":223,"../internals/engine-v8-version":230,"../internals/global":254,"../internals/inspect-source":261,"../internals/is-callable":267,"../internals/is-forced":269,"../internals/is-pure":273,"../internals/promise-native-constructor":311,"../internals/well-known-symbol":346}],311:[function(e,t,r){e=e("../internals/global");t.exports=e.Promise},{"../internals/global":254}],312:[function(e,t,r){var n=e("../internals/an-object"),s=e("../internals/is-object"),a=e("../internals/new-promise-capability");t.exports=function(e,t){return n(e),s(t)&&t.constructor===e?t:((0,(e=a.f(e)).resolve)(t),e.promise)}},{"../internals/an-object":181,"../internals/is-object":272,"../internals/new-promise-capability":285}],313:[function(e,t,r){var n=e("../internals/promise-native-constructor"),s=e("../internals/check-correctness-of-iteration"),e=e("../internals/promise-constructor-detection").CONSTRUCTOR;t.exports=e||!s(function(e){n.all(e).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":197,"../internals/promise-constructor-detection":310,"../internals/promise-native-constructor":311}],314:[function(e,t,r){function n(){this.head=null,this.tail=null}n.prototype={add:function(e){var e={item:e,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},t.exports=n},{}],315:[function(e,t,r){var n=e("../internals/is-null-or-undefined"),s=TypeError;t.exports=function(e){if(n(e))throw s("Can't call method on "+e);return e}},{"../internals/is-null-or-undefined":271}],316:[function(e,t,r){"use strict";var n=e("../internals/global"),l=e("../internals/function-apply"),u=e("../internals/is-callable"),s=e("../internals/engine-is-bun"),a=e("../internals/engine-user-agent"),c=e("../internals/array-slice"),f=e("../internals/validate-arguments-length"),d=n.Function,p=/MSIE .\./.test(a)||s&&((e=n.Bun.version.split(".")).length<3||0==e[0]&&(e[1]<3||3==e[1]&&0==e[2]));t.exports=function(a,i){var o=i?2:1;return p?function(e,t){var r=f(arguments.length,1)>o,n=u(e)?e:d(e),s=r?c(arguments,o):[],e=r?function(){l(n,this,s)}:n;return i?a(e,t):a(e)}:a}},{"../internals/array-slice":192,"../internals/engine-is-bun":222,"../internals/engine-user-agent":229,"../internals/function-apply":240,"../internals/global":254,"../internals/is-callable":267,"../internals/validate-arguments-length":342}],317:[function(e,t,r){"use strict";var n=e("../internals/get-built-in"),s=e("../internals/define-built-in-accessor"),a=e("../internals/well-known-symbol"),i=e("../internals/descriptors"),o=a("species");t.exports=function(e){e=n(e);i&&e&&!e[o]&&s(e,o,{configurable:!0,get:function(){return this}})}},{"../internals/define-built-in-accessor":210,"../internals/descriptors":215,"../internals/get-built-in":249,"../internals/well-known-symbol":346}],318:[function(e,t,r){var s=e("../internals/to-string-tag-support"),a=e("../internals/object-define-property").f,i=e("../internals/create-non-enumerable-property"),o=e("../internals/has-own-property"),l=e("../internals/object-to-string"),u=e("../internals/well-known-symbol")("toStringTag");t.exports=function(e,t,r,n){e&&(r=r?e:e.prototype,o(r,u)||a(r,u,{configurable:!0,value:t}),n&&!s&&i(r,"toString",l))}},{"../internals/create-non-enumerable-property":207,"../internals/has-own-property":255,"../internals/object-define-property":292,"../internals/object-to-string":305,"../internals/to-string-tag-support":336,"../internals/well-known-symbol":346}],319:[function(e,t,r){var n=e("../internals/shared"),s=e("../internals/uid"),a=n("keys");t.exports=function(e){return a[e]||(a[e]=s(e))}},{"../internals/shared":321,"../internals/uid":339}],320:[function(e,t,r){var n=e("../internals/global"),e=e("../internals/define-global-property"),s="__core-js_shared__",n=n[s]||e(s,{});t.exports=n},{"../internals/define-global-property":213,"../internals/global":254}],321:[function(e,t,r){var n=e("../internals/is-pure"),s=e("../internals/shared-store");(t.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":273,"../internals/shared-store":320}],322:[function(e,t,r){var n=e("../internals/an-object"),s=e("../internals/a-constructor"),a=e("../internals/is-null-or-undefined"),i=e("../internals/well-known-symbol")("species");t.exports=function(e,t){var e=n(e).constructor;return void 0===e||a(e=n(e)[i])?t:s(e)}},{"../internals/a-constructor":177,"../internals/an-object":181,"../internals/is-null-or-undefined":271,"../internals/well-known-symbol":346}],323:[function(e,t,r){function n(s){return function(e,t){var r,e=i(o(e)),t=a(t),n=e.length;return t<0||n<=t?s?"":void 0:(r=u(e,t))<55296||56319<r||t+1===n||(n=u(e,t+1))<56320||57343<n?s?l(e,t):r:s?c(e,t,t+2):n-56320+(r-55296<<10)+65536}}var s=e("../internals/function-uncurry-this"),a=e("../internals/to-integer-or-infinity"),i=e("../internals/to-string"),o=e("../internals/require-object-coercible"),l=s("".charAt),u=s("".charCodeAt),c=s("".slice);t.exports={codeAt:n(!1),charAt:n(!0)}},{"../internals/function-uncurry-this":248,"../internals/require-object-coercible":315,"../internals/to-integer-or-infinity":331,"../internals/to-string":337}],324:[function(e,t,r){function n(t){return function(e){e=i(a(e));return 1&t&&(e=o(e,l,"")),e=2&t?o(e,u,"$1"):e}}var s=e("../internals/function-uncurry-this"),a=e("../internals/require-object-coercible"),i=e("../internals/to-string"),e=e("../internals/whitespaces"),o=s("".replace),l=RegExp("^["+e+"]+"),u=RegExp("(^|[^"+e+"])["+e+"]+$");t.exports={start:n(1),end:n(2),trim:n(3)}},{"../internals/function-uncurry-this":248,"../internals/require-object-coercible":315,"../internals/to-string":337,"../internals/whitespaces":347}],325:[function(e,t,r){var n=e("../internals/engine-v8-version"),s=e("../internals/fails"),a=e("../internals/global").String;t.exports=!!Object.getOwnPropertySymbols&&!s(function(){var e=Symbol();return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},{"../internals/engine-v8-version":230,"../internals/fails":238,"../internals/global":254}],326:[function(e,t,r){var n=e("../internals/function-call"),s=e("../internals/get-built-in"),a=e("../internals/well-known-symbol"),i=e("../internals/define-built-in");t.exports=function(){var e=s("Symbol"),e=e&&e.prototype,t=e&&e.valueOf,r=a("toPrimitive");e&&!e[r]&&i(e,r,function(e){return n(t,this)},{arity:1})}},{"../internals/define-built-in":211,"../internals/function-call":244,"../internals/get-built-in":249,"../internals/well-known-symbol":346}],327:[function(e,t,r){e=e("../internals/symbol-constructor-detection");t.exports=e&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/symbol-constructor-detection":325}],328:[function(e,t,r){function n(e){return function(){A(e)}}function s(e){A(e.data)}function a(e){l.postMessage(O(e),i.protocol+"//"+i.host)}var i,o,l=e("../internals/global"),u=e("../internals/function-apply"),c=e("../internals/function-bind-context"),f=e("../internals/is-callable"),d=e("../internals/has-own-property"),p=e("../internals/fails"),b=e("../internals/html"),h=e("../internals/array-slice"),y=e("../internals/document-create-element"),m=e("../internals/validate-arguments-length"),g=e("../internals/engine-is-ios"),e=e("../internals/engine-is-node"),j=l.setImmediate,v=l.clearImmediate,_=l.process,w=l.Dispatch,E=l.Function,S=l.MessageChannel,O=l.String,C=0,x={},P="onreadystatechange",A=(p(function(){i=l.location}),function(e){var t;d(x,e)&&(t=x[e],delete x[e],t())});j&&v||(j=function(e){m(arguments.length,1);var t=f(e)?e:E(e),r=h(arguments,1);return x[++C]=function(){u(t,void 0,r)},o(C),C},v=function(e){delete x[e]},e?o=function(e){_.nextTick(n(e))}:w&&w.now?o=function(e){w.now(n(e))}:S&&!g?(g=(e=new S).port2,e.port1.onmessage=s,o=c(g.postMessage,g)):l.addEventListener&&f(l.postMessage)&&!l.importScripts&&i&&"file:"!==i.protocol&&!p(a)?(o=a,l.addEventListener("message",s,!1)):o=P in y("script")?function(e){b.appendChild(y("script"))[P]=function(){b.removeChild(this),A(e)}}:function(e){setTimeout(n(e),0)}),t.exports={set:j,clear:v}},{"../internals/array-slice":192,"../internals/document-create-element":217,"../internals/engine-is-ios":226,"../internals/engine-is-node":227,"../internals/fails":238,"../internals/function-apply":240,"../internals/function-bind-context":241,"../internals/global":254,"../internals/has-own-property":255,"../internals/html":258,"../internals/is-callable":267,"../internals/validate-arguments-length":342}],329:[function(e,t,r){var n=e("../internals/to-integer-or-infinity"),s=Math.max,a=Math.min;t.exports=function(e,t){e=n(e);return e<0?s(e+t,0):a(e,t)}},{"../internals/to-integer-or-infinity":331}],330:[function(e,t,r){var n=e("../internals/indexed-object"),s=e("../internals/require-object-coercible");t.exports=function(e){return n(s(e))}},{"../internals/indexed-object":260,"../internals/require-object-coercible":315}],331:[function(e,t,r){var n=e("../internals/math-trunc");t.exports=function(e){e=+e;return e!=e||0==e?0:n(e)}},{"../internals/math-trunc":283}],332:[function(e,t,r){var n=e("../internals/to-integer-or-infinity"),s=Math.min;t.exports=function(e){return 0<e?s(n(e),9007199254740991):0}},{"../internals/to-integer-or-infinity":331}],333:[function(e,t,r){var n=e("../internals/require-object-coercible"),s=Object;t.exports=function(e){return s(n(e))}},{"../internals/require-object-coercible":315}],334:[function(e,t,r){var n=e("../internals/function-call"),s=e("../internals/is-object"),a=e("../internals/is-symbol"),i=e("../internals/get-method"),o=e("../internals/ordinary-to-primitive"),e=e("../internals/well-known-symbol"),l=TypeError,u=e("toPrimitive");t.exports=function(e,t){if(!s(e)||a(e))return e;var r=i(e,u);if(r){if(r=n(r,e,t=void 0===t?"default":t),!s(r)||a(r))return r;throw l("Can't convert object to primitive value")}return o(e,t=void 0===t?"number":t)}},{"../internals/function-call":244,"../internals/get-method":253,"../internals/is-object":272,"../internals/is-symbol":275,"../internals/ordinary-to-primitive":306,"../internals/well-known-symbol":346}],335:[function(e,t,r){var n=e("../internals/to-primitive"),s=e("../internals/is-symbol");t.exports=function(e){e=n(e,"string");return s(e)?e:e+""}},{"../internals/is-symbol":275,"../internals/to-primitive":334}],336:[function(e,t,r){var n={};n[e("../internals/well-known-symbol")("toStringTag")]="z",t.exports="[object z]"===String(n)},{"../internals/well-known-symbol":346}],337:[function(e,t,r){var n=e("../internals/classof"),s=String;t.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return s(e)}},{"../internals/classof":199}],338:[function(e,t,r){var n=String;t.exports=function(e){try{return n(e)}catch(e){return"Object"}}},{}],339:[function(e,t,r){var e=e("../internals/function-uncurry-this"),n=0,s=Math.random(),a=e(1..toString);t.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++n+s,36)}},{"../internals/function-uncurry-this":248}],340:[function(e,t,r){e=e("../internals/symbol-constructor-detection");t.exports=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},{"../internals/symbol-constructor-detection":325}],341:[function(e,t,r){var n=e("../internals/descriptors"),e=e("../internals/fails");t.exports=n&&e(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},{"../internals/descriptors":215,"../internals/fails":238}],342:[function(e,t,r){var n=TypeError;t.exports=function(e,t){if(e<t)throw n("Not enough arguments");return e}},{}],343:[function(e,t,r){var n=e("../internals/global"),e=e("../internals/is-callable"),n=n.WeakMap;t.exports=e(n)&&/native code/.test(String(n))},{"../internals/global":254,"../internals/is-callable":267}],344:[function(e,t,r){var n=e("../internals/path"),s=e("../internals/has-own-property"),a=e("../internals/well-known-symbol-wrapped"),i=e("../internals/object-define-property").f;t.exports=function(e){var t=n.Symbol||(n.Symbol={});s(t,e)||i(t,e,{value:a.f(e)})}},{"../internals/has-own-property":255,"../internals/object-define-property":292,"../internals/path":308,"../internals/well-known-symbol-wrapped":345}],345:[function(e,t,r){e=e("../internals/well-known-symbol");r.f=e},{"../internals/well-known-symbol":346}],346:[function(e,t,r){var n=e("../internals/global"),s=e("../internals/shared"),a=e("../internals/has-own-property"),i=e("../internals/uid"),o=e("../internals/symbol-constructor-detection"),e=e("../internals/use-symbol-as-uid"),l=n.Symbol,u=s("wks"),c=e?l.for||l:l&&l.withoutSetter||i;t.exports=function(e){return a(u,e)||(u[e]=o&&a(l,e)?l[e]:c("Symbol."+e)),u[e]}},{"../internals/global":254,"../internals/has-own-property":255,"../internals/shared":321,"../internals/symbol-constructor-detection":325,"../internals/uid":339,"../internals/use-symbol-as-uid":340}],347:[function(e,t,r){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},{}],348:[function(e,t,r){"use strict";function s(e,t){var r,n=a(j,this);return o?r=o(m(),n?i(this):j):(r=n?this:u(j),c(r,y,"Error")),void 0!==t&&c(r,"message",h(t)),p(r,s,r.stack,1),2<arguments.length&&d(r,arguments[2]),b(e,g,{that:n=[]}),c(r,"errors",n),r}var n=e("../internals/export"),a=e("../internals/object-is-prototype-of"),i=e("../internals/object-get-prototype-of"),o=e("../internals/object-set-prototype-of"),l=e("../internals/copy-constructor-properties"),u=e("../internals/object-create"),c=e("../internals/create-non-enumerable-property"),f=e("../internals/create-property-descriptor"),d=e("../internals/install-error-cause"),p=e("../internals/error-stack-install"),b=e("../internals/iterate"),h=e("../internals/normalize-string-argument"),y=e("../internals/well-known-symbol")("toStringTag"),m=Error,g=[].push,j=(o?o(s,m):l(s,m,{name:!0}),s.prototype=u(m.prototype,{constructor:f(1,s),message:f(1,""),name:f(1,"AggregateError")}));n({global:!0,constructor:!0,arity:2},{AggregateError:s})},{"../internals/copy-constructor-properties":203,"../internals/create-non-enumerable-property":207,"../internals/create-property-descriptor":208,"../internals/error-stack-install":235,"../internals/export":237,"../internals/install-error-cause":262,"../internals/iterate":276,"../internals/normalize-string-argument":286,"../internals/object-create":290,"../internals/object-get-prototype-of":297,"../internals/object-is-prototype-of":299,"../internals/object-set-prototype-of":303,"../internals/well-known-symbol":346}],349:[function(e,t,r){e("../modules/es.aggregate-error.constructor")},{"../modules/es.aggregate-error.constructor":348}],350:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/fails"),f=e("../internals/is-array"),d=e("../internals/is-object"),p=e("../internals/to-object"),b=e("../internals/length-of-array-like"),h=e("../internals/does-not-exceed-safe-integer"),y=e("../internals/create-property"),m=e("../internals/array-species-create"),a=e("../internals/array-method-has-species-support"),i=e("../internals/well-known-symbol"),e=e("../internals/engine-v8-version"),g=i("isConcatSpreadable"),i=51<=e||!s(function(){var e=[];return e[g]=!1,e.concat()[0]!==e});n({target:"Array",proto:!0,arity:1,forced:!i||!a("concat")},{concat:function(e){for(var t,r,n,s,a,i=p(this),o=m(i,0),l=0,u=-1,c=arguments.length;u<c;u++)if(a=void 0,!d(s=n=-1===u?i:arguments[u])||(void 0!==(a=s[g])?!a:!f(s)))h(l+1),y(o,l++,n);else for(r=b(n),h(l+r),t=0;t<r;t++,l++)t in n&&y(o,l,n[t]);return o.length=l,o}})},{"../internals/array-method-has-species-support":187,"../internals/array-species-create":195,"../internals/create-property":209,"../internals/does-not-exceed-safe-integer":218,"../internals/engine-v8-version":230,"../internals/export":237,"../internals/fails":238,"../internals/is-array":266,"../internals/is-object":272,"../internals/length-of-array-like":282,"../internals/to-object":333,"../internals/well-known-symbol":346}],351:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/array-iteration").every;n({target:"Array",proto:!0,forced:!e("../internals/array-method-is-strict")("every")},{every:function(e){return s(this,e,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":186,"../internals/array-method-is-strict":188,"../internals/export":237}],352:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/array-iteration").filter;n({target:"Array",proto:!0,forced:!e("../internals/array-method-has-species-support")("filter")},{filter:function(e){return s(this,e,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":186,"../internals/array-method-has-species-support":187,"../internals/export":237}],353:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/array-iteration").findIndex,e=e("../internals/add-to-unscopables"),a="findIndex",i=!0;a in[]&&Array(1)[a](function(){i=!1}),n({target:"Array",proto:!0,forced:i},{findIndex:function(e){return s(this,e,1<arguments.length?arguments[1]:void 0)}}),e(a)},{"../internals/add-to-unscopables":179,"../internals/array-iteration":186,"../internals/export":237}],354:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/array-iteration").find,e=e("../internals/add-to-unscopables"),a=!0;"find"in[]&&Array(1).find(function(){a=!1}),n({target:"Array",proto:!0,forced:a},{find:function(e){return s(this,e,1<arguments.length?arguments[1]:void 0)}}),e("find")},{"../internals/add-to-unscopables":179,"../internals/array-iteration":186,"../internals/export":237}],355:[function(e,t,r){"use strict";var n=e("../internals/export"),e=e("../internals/array-for-each");n({target:"Array",proto:!0,forced:[].forEach!=e},{forEach:e})},{"../internals/array-for-each":183,"../internals/export":237}],356:[function(e,t,r){var n=e("../internals/export"),s=e("../internals/array-from");n({target:"Array",stat:!0,forced:!e("../internals/check-correctness-of-iteration")(function(e){Array.from(e)})},{from:s})},{"../internals/array-from":184,"../internals/check-correctness-of-iteration":197,"../internals/export":237}],357:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/array-includes").includes,a=e("../internals/fails"),e=e("../internals/add-to-unscopables");n({target:"Array",proto:!0,forced:a(function(){return!Array(1).includes()})},{includes:function(e){return s(this,e,1<arguments.length?arguments[1]:void 0)}}),e("includes")},{"../internals/add-to-unscopables":179,"../internals/array-includes":185,"../internals/export":237,"../internals/fails":238}],358:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/function-uncurry-this-clause"),a=e("../internals/array-includes").indexOf,e=e("../internals/array-method-is-strict"),i=s([].indexOf),o=!!i&&1/i([1],1,-0)<0;n({target:"Array",proto:!0,forced:o||!e("indexOf")},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return o?i(this,e,t)||0:a(this,e,t)}})},{"../internals/array-includes":185,"../internals/array-method-is-strict":188,"../internals/export":237,"../internals/function-uncurry-this-clause":247}],359:[function(e,t,r){e("../internals/export")({target:"Array",stat:!0},{isArray:e("../internals/is-array")})},{"../internals/export":237,"../internals/is-array":266}],360:[function(e,t,r){"use strict";var n=e("../internals/to-indexed-object"),s=e("../internals/add-to-unscopables"),a=e("../internals/iterators"),i=e("../internals/internal-state"),o=e("../internals/object-define-property").f,l=e("../internals/iterator-define"),u=e("../internals/create-iter-result-object"),c=e("../internals/is-pure"),e=e("../internals/descriptors"),f="Array Iterator",d=i.set,p=i.getterFor(f),i=(t.exports=l(Array,"Array",function(e,t){d(this,{type:f,target:n(e),index:0,kind:t})},function(){var e=p(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,u(void 0,!0)):u("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)},"values"),a.Arguments=a.Array);if(s("keys"),s("values"),s("entries"),!c&&e&&"values"!==i.name)try{o(i,"name",{value:"values"})}catch(e){}},{"../internals/add-to-unscopables":179,"../internals/create-iter-result-object":206,"../internals/descriptors":215,"../internals/internal-state":264,"../internals/is-pure":273,"../internals/iterator-define":279,"../internals/iterators":281,"../internals/object-define-property":292,"../internals/to-indexed-object":330}],361:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/array-iteration").map;n({target:"Array",proto:!0,forced:!e("../internals/array-method-has-species-support")("map")},{map:function(e){return s(this,e,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":186,"../internals/array-method-has-species-support":187,"../internals/export":237}],362:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/array-reduce").left,a=e("../internals/array-method-is-strict"),i=e("../internals/engine-v8-version");n({target:"Array",proto:!0,forced:!e("../internals/engine-is-node")&&79<i&&i<83||!a("reduce")},{reduce:function(e){var t=arguments.length;return s(this,e,t,1<t?arguments[1]:void 0)}})},{"../internals/array-method-is-strict":188,"../internals/array-reduce":189,"../internals/engine-is-node":227,"../internals/engine-v8-version":230,"../internals/export":237}],363:[function(e,t,r){"use strict";var n=e("../internals/export"),u=e("../internals/is-array"),c=e("../internals/is-constructor"),f=e("../internals/is-object"),d=e("../internals/to-absolute-index"),p=e("../internals/length-of-array-like"),b=e("../internals/to-indexed-object"),h=e("../internals/create-property"),s=e("../internals/well-known-symbol"),a=e("../internals/array-method-has-species-support"),y=e("../internals/array-slice"),e=a("slice"),m=s("species"),g=Array,j=Math.max;n({target:"Array",proto:!0,forced:!e},{slice:function(e,t){var r,n,s,a=b(this),i=p(a),o=d(e,i),l=d(void 0===t?i:t,i);if(u(a)&&(r=a.constructor,(r=c(r)&&(r===g||u(r.prototype))||f(r)&&null===(r=r[m])?void 0:r)===g||void 0===r))return y(a,o,l);for(n=new(void 0===r?g:r)(j(l-o,0)),s=0;o<l;o++,s++)o in a&&h(n,s,a[o]);return n.length=s,n}})},{"../internals/array-method-has-species-support":187,"../internals/array-slice":192,"../internals/create-property":209,"../internals/export":237,"../internals/is-array":266,"../internals/is-constructor":268,"../internals/is-object":272,"../internals/length-of-array-like":282,"../internals/to-absolute-index":329,"../internals/to-indexed-object":330,"../internals/well-known-symbol":346}],364:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/array-iteration").some;n({target:"Array",proto:!0,forced:!e("../internals/array-method-is-strict")("some")},{some:function(e){return s(this,e,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":186,"../internals/array-method-is-strict":188,"../internals/export":237}],365:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/function-uncurry-this"),o=e("../internals/a-callable"),l=e("../internals/to-object"),u=e("../internals/length-of-array-like"),c=e("../internals/delete-property-or-throw"),f=e("../internals/to-string"),a=e("../internals/fails"),d=e("../internals/array-sort"),i=e("../internals/array-method-is-strict"),p=e("../internals/engine-ff-version"),b=e("../internals/engine-is-ie-or-edge"),h=e("../internals/engine-v8-version"),y=e("../internals/engine-webkit-version"),m=[],g=s(m.sort),j=s(m.push),e=a(function(){m.sort(void 0)}),s=a(function(){m.sort(null)}),i=i("sort"),v=!a(function(){if(h)return h<70;if(!(p&&3<p)){if(b)return!0;if(y)return y<603;for(var e,t,r,n="",s=65;s<76;s++){switch(e=String.fromCharCode(s),s){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)m.push({k:e+r,v:t})}for(m.sort(function(e,t){return t.v-e.v}),r=0;r<m.length;r++)e=m[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}});n({target:"Array",proto:!0,forced:e||!s||!i||!v},{sort:function(e){void 0!==e&&o(e);var t=l(this);if(v)return void 0===e?g(t):g(t,e);for(var r,n,s=[],a=u(t),i=0;i<a;i++)i in t&&j(s,t[i]);for(d(s,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:f(e)>f(t)?1:-1})),r=u(s),i=0;i<r;)t[i]=s[i++];for(;i<a;)c(t,i++);return t}})},{"../internals/a-callable":176,"../internals/array-method-is-strict":188,"../internals/array-sort":193,"../internals/delete-property-or-throw":214,"../internals/engine-ff-version":220,"../internals/engine-is-ie-or-edge":224,"../internals/engine-v8-version":230,"../internals/engine-webkit-version":231,"../internals/export":237,"../internals/fails":238,"../internals/function-uncurry-this":248,"../internals/length-of-array-like":282,"../internals/to-object":333,"../internals/to-string":337}],366:[function(e,t,r){"use strict";var n=e("../internals/export"),f=e("../internals/to-object"),d=e("../internals/to-absolute-index"),p=e("../internals/to-integer-or-infinity"),b=e("../internals/length-of-array-like"),h=e("../internals/array-set-length"),y=e("../internals/does-not-exceed-safe-integer"),m=e("../internals/array-species-create"),g=e("../internals/create-property"),j=e("../internals/delete-property-or-throw"),e=e("../internals/array-method-has-species-support")("splice"),v=Math.max,_=Math.min;n({target:"Array",proto:!0,forced:!e},{splice:function(e,t){var r,n,s,a,i,o,l=f(this),u=b(l),c=d(e,u),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,u-c):(r=e-2,_(v(p(t),0),u-c)),y(u+r-n),s=m(l,n),a=0;a<n;a++)(i=c+a)in l&&g(s,a,l[i]);if(r<(s.length=n)){for(a=c;a<u-n;a++)o=a+r,(i=a+n)in l?l[o]=l[i]:j(l,o);for(a=u;u-n+r<a;a--)j(l,a-1)}else if(n<r)for(a=u-n;c<a;a--)o=a+r-1,(i=a+n-1)in l?l[o]=l[i]:j(l,o);for(a=0;a<r;a++)l[a+c]=arguments[a+2];return h(l,u-n+r),s}})},{"../internals/array-method-has-species-support":187,"../internals/array-set-length":190,"../internals/array-species-create":195,"../internals/create-property":209,"../internals/delete-property-or-throw":214,"../internals/does-not-exceed-safe-integer":218,"../internals/export":237,"../internals/length-of-array-like":282,"../internals/to-absolute-index":329,"../internals/to-integer-or-infinity":331,"../internals/to-object":333}],367:[function(e,t,r){},{}],368:[function(e,t,r){var n=e("../internals/export"),e=e("../internals/function-bind");n({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e})},{"../internals/export":237,"../internals/function-bind":243}],369:[function(e,t,r){function s(e,t){var r=p(arguments),n=b(t);if(f(n)||void 0!==e&&!d(e))return r[1]=function(e,t){if(f(n)&&(t=l(n,this,h(e),t)),!d(t))return t},o(y,null,r)}function a(e,t,r){var n=g(r,t-1),r=g(r,t+1);return m(E,e)&&!m(S,r)||m(S,e)&&!m(E,n)?"\\u"+_(j(e,0),16):e}var n=e("../internals/export"),i=e("../internals/get-built-in"),o=e("../internals/function-apply"),l=e("../internals/function-call"),u=e("../internals/function-uncurry-this"),c=e("../internals/fails"),f=e("../internals/is-callable"),d=e("../internals/is-symbol"),p=e("../internals/array-slice"),b=e("../internals/get-json-replacer-function"),e=e("../internals/symbol-constructor-detection"),h=String,y=i("JSON","stringify"),m=u(/./.exec),g=u("".charAt),j=u("".charCodeAt),v=u("".replace),_=u(1..toString),w=/[\uD800-\uDFFF]/g,E=/^[\uD800-\uDBFF]$/,S=/^[\uDC00-\uDFFF]$/,O=!e||c(function(){var e=i("Symbol")();return"[null]"!=y([e])||"{}"!=y({a:e})||"{}"!=y(Object(e))}),C=c(function(){return'"\\udf06\\ud834"'!==y("\udf06\ud834")||'"\\udead"'!==y("\udead")});y&&n({target:"JSON",stat:!0,arity:3,forced:O||C},{stringify:function(e,t,r){var n=p(arguments),n=o(O?s:y,null,n);return C&&"string"==typeof n?v(n,w,a):n}})},{"../internals/array-slice":192,"../internals/export":237,"../internals/fails":238,"../internals/function-apply":240,"../internals/function-call":244,"../internals/function-uncurry-this":248,"../internals/get-built-in":249,"../internals/get-json-replacer-function":252,"../internals/is-callable":267,"../internals/is-symbol":275,"../internals/symbol-constructor-detection":325}],370:[function(e,t,r){var n=e("../internals/global");e("../internals/set-to-string-tag")(n.JSON,"JSON",!0)},{"../internals/global":254,"../internals/set-to-string-tag":318}],371:[function(e,t,r){"use strict";e("../internals/collection")("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},e("../internals/collection-strong"))},{"../internals/collection":202,"../internals/collection-strong":200}],372:[function(e,t,r){e("../modules/es.map.constructor")},{"../modules/es.map.constructor":371}],373:[function(e,t,r){arguments[4][367][0].apply(r,arguments)},{dup:367}],374:[function(e,t,r){e("../internals/export")({target:"Number",stat:!0},{isInteger:e("../internals/is-integral-number")})},{"../internals/export":237,"../internals/is-integral-number":270}],375:[function(e,t,r){var n=e("../internals/export"),e=e("../internals/object-assign");n({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e})},{"../internals/export":237,"../internals/object-assign":289}],376:[function(e,t,r){e("../internals/export")({target:"Object",stat:!0,sham:!e("../internals/descriptors")},{create:e("../internals/object-create")})},{"../internals/descriptors":215,"../internals/export":237,"../internals/object-create":290}],377:[function(e,t,r){var n=e("../internals/export"),s=e("../internals/descriptors"),e=e("../internals/object-define-property").f;n({target:"Object",stat:!0,forced:Object.defineProperty!==e,sham:!s},{defineProperty:e})},{"../internals/descriptors":215,"../internals/export":237,"../internals/object-define-property":292}],378:[function(e,t,r){var n=e("../internals/export"),s=e("../internals/object-to-array").entries;n({target:"Object",stat:!0},{entries:function(e){return s(e)}})},{"../internals/export":237,"../internals/object-to-array":304}],379:[function(e,t,r){var n=e("../internals/export"),s=e("../internals/freezing"),a=e("../internals/fails"),i=e("../internals/is-object"),o=e("../internals/internal-metadata").onFreeze,l=Object.freeze;n({target:"Object",stat:!0,forced:a(function(){l(1)}),sham:!s},{freeze:function(e){return l&&i(e)?l(o(e)):e}})},{"../internals/export":237,"../internals/fails":238,"../internals/freezing":239,"../internals/internal-metadata":263,"../internals/is-object":272}],380:[function(e,t,r){var n=e("../internals/export"),s=e("../internals/fails"),a=e("../internals/to-indexed-object"),i=e("../internals/object-get-own-property-descriptor").f,e=e("../internals/descriptors");n({target:"Object",stat:!0,forced:!e||s(function(){i(1)}),sham:!e},{getOwnPropertyDescriptor:function(e,t){return i(a(e),t)}})},{"../internals/descriptors":215,"../internals/export":237,"../internals/fails":238,"../internals/object-get-own-property-descriptor":293,"../internals/to-indexed-object":330}],381:[function(e,t,r){var n=e("../internals/export"),s=e("../internals/symbol-constructor-detection"),a=e("../internals/fails"),i=e("../internals/object-get-own-property-symbols"),o=e("../internals/to-object");n({target:"Object",stat:!0,forced:!s||a(function(){i.f(1)})},{getOwnPropertySymbols:function(e){var t=i.f;return t?t(o(e)):[]}})},{"../internals/export":237,"../internals/fails":238,"../internals/object-get-own-property-symbols":296,"../internals/symbol-constructor-detection":325,"../internals/to-object":333}],382:[function(e,t,r){var n=e("../internals/export"),s=e("../internals/fails"),a=e("../internals/to-object"),i=e("../internals/object-get-prototype-of"),e=e("../internals/correct-prototype-getter");n({target:"Object",stat:!0,forced:s(function(){i(1)}),sham:!e},{getPrototypeOf:function(e){return i(a(e))}})},{"../internals/correct-prototype-getter":205,"../internals/export":237,"../internals/fails":238,"../internals/object-get-prototype-of":297,"../internals/to-object":333}],383:[function(e,t,r){var n=e("../internals/export"),s=e("../internals/to-object"),a=e("../internals/object-keys");n({target:"Object",stat:!0,forced:e("../internals/fails")(function(){a(1)})},{keys:function(e){return a(s(e))}})},{"../internals/export":237,"../internals/fails":238,"../internals/object-keys":301,"../internals/to-object":333}],384:[function(e,t,r){arguments[4][367][0].apply(r,arguments)},{dup:367}],385:[function(e,t,r){var n=e("../internals/export"),e=e("../internals/number-parse-int");n({global:!0,forced:parseInt!=e},{parseInt:e})},{"../internals/export":237,"../internals/number-parse-int":288}],386:[function(e,t,r){"use strict";var n=e("../internals/export"),u=e("../internals/function-call"),c=e("../internals/a-callable"),s=e("../internals/new-promise-capability"),a=e("../internals/perform"),f=e("../internals/iterate");n({target:"Promise",stat:!0,forced:e("../internals/promise-statics-incorrect-iteration")},{allSettled:function(e){var o=this,t=s.f(o),l=t.resolve,r=t.reject,n=a(function(){var n=c(o.resolve),s=[],a=0,i=1;f(e,function(e){var t=a++,r=!1;i++,u(n,o,e).then(function(e){r||(r=!0,s[t]={status:"fulfilled",value:e},--i||l(s))},function(e){r||(r=!0,s[t]={status:"rejected",reason:e},--i||l(s))})}),--i||l(s)});return n.error&&r(n.value),t.promise}})},{"../internals/a-callable":176,"../internals/export":237,"../internals/function-call":244,"../internals/iterate":276,"../internals/new-promise-capability":285,"../internals/perform":309,"../internals/promise-statics-incorrect-iteration":313}],387:[function(e,t,r){"use strict";var n=e("../internals/export"),c=e("../internals/function-call"),f=e("../internals/a-callable"),s=e("../internals/new-promise-capability"),a=e("../internals/perform"),d=e("../internals/iterate");n({target:"Promise",stat:!0,forced:e("../internals/promise-statics-incorrect-iteration")},{all:function(e){var o=this,t=s.f(o),l=t.resolve,u=t.reject,r=a(function(){var n=f(o.resolve),s=[],a=0,i=1;d(e,function(e){var t=a++,r=!1;i++,c(n,o,e).then(function(e){r||(r=!0,s[t]=e,--i||l(s))},u)}),--i||l(s)});return r.error&&u(r.value),t.promise}})},{"../internals/a-callable":176,"../internals/export":237,"../internals/function-call":244,"../internals/iterate":276,"../internals/new-promise-capability":285,"../internals/perform":309,"../internals/promise-statics-incorrect-iteration":313}],388:[function(e,t,r){"use strict";var n=e("../internals/export"),d=e("../internals/function-call"),p=e("../internals/a-callable"),s=e("../internals/get-built-in"),a=e("../internals/new-promise-capability"),i=e("../internals/perform"),b=e("../internals/iterate"),e=e("../internals/promise-statics-incorrect-iteration"),h="No one promise resolved";n({target:"Promise",stat:!0,forced:e},{any:function(e){var l=this,u=s("AggregateError"),t=a.f(l),c=t.resolve,f=t.reject,r=i(function(){var n=p(l.resolve),s=[],a=0,i=1,o=!1;b(e,function(e){var t=a++,r=!1;i++,d(n,l,e).then(function(e){r||o||(o=!0,c(e))},function(e){r||o||(r=!0,s[t]=e,--i||f(new u(s,h)))})}),--i||f(new u(s,h))});return r.error&&f(r.value),t.promise}})},{"../internals/a-callable":176,"../internals/export":237,"../internals/function-call":244,"../internals/get-built-in":249,"../internals/iterate":276,"../internals/new-promise-capability":285,"../internals/perform":309,"../internals/promise-statics-incorrect-iteration":313}],389:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/is-pure"),a=e("../internals/promise-constructor-detection").CONSTRUCTOR,i=e("../internals/promise-native-constructor"),o=e("../internals/get-built-in"),l=e("../internals/is-callable"),e=e("../internals/define-built-in"),u=i&&i.prototype;n({target:"Promise",proto:!0,forced:a,real:!0},{catch:function(e){return this.then(void 0,e)}}),!s&&l(i)&&(n=o("Promise").prototype.catch,u.catch!==n&&e(u,"catch",n,{unsafe:!0}))},{"../internals/define-built-in":211,"../internals/export":237,"../internals/get-built-in":249,"../internals/is-callable":267,"../internals/is-pure":273,"../internals/promise-constructor-detection":310,"../internals/promise-native-constructor":311}],390:[function(e,M,L){"use strict";function a(e,t){var r,n,s,a,i=t.value,o=t.state==C,l=o?e.ok:e.fail,u=e.resolve,c=e.reject,f=e.domain;try{l?(o||(t.rejection===P&&(a=t,b(h,p,function(){var e=a.facade;d?E.emit("rejectionHandled",e):I(Z,e,a.value)})),t.rejection=x),!0===l?r=i:(f&&f.enter(),r=l(i),f&&(f.exit(),s=!0)),r===e.promise?c(_("Promise-chain cycle")):(n=A(r))?b(n,r,u,c):u(r)):c(i)}catch(e){f&&!s&&f.exit(),c(e)}}var r,t,n,q=e("../internals/export"),U=e("../internals/is-pure"),d=e("../internals/engine-is-node"),p=e("../internals/global"),b=e("../internals/function-call"),s=e("../internals/define-built-in"),i=e("../internals/object-set-prototype-of"),F=e("../internals/set-to-string-tag"),B=e("../internals/set-species"),W=e("../internals/a-callable"),o=e("../internals/is-callable"),K=e("../internals/is-object"),J=e("../internals/an-instance"),z=e("../internals/species-constructor"),h=e("../internals/task").set,l=e("../internals/microtask"),Q=e("../internals/host-report-errors"),V=e("../internals/perform"),H=e("../internals/queue"),u=e("../internals/internal-state"),c=e("../internals/promise-native-constructor"),f=e("../internals/promise-constructor-detection"),e=e("../internals/new-promise-capability"),y="Promise",m=f.CONSTRUCTOR,$=f.REJECTION_EVENT,f=f.SUBCLASSING,g=u.getterFor(y),G=u.set,u=c&&c.prototype,j=c,v=u,_=p.TypeError,w=p.document,E=p.process,S=e.f,Y=S,X=!!(w&&w.createEvent&&p.dispatchEvent),O="unhandledrejection",Z="rejectionhandled",C=1,ee=2,x=1,P=2,A=function(e){var t;return!(!K(e)||!o(t=e.then))&&t},R=function(r,s){r.notified||(r.notified=!0,l(function(){for(var e,n,t=r.reactions;e=t.get();)a(e,r);r.notified=!1,s&&!r.rejection&&(n=r,b(h,p,function(){var e=n.facade,t=n.value,r=N(n);if(r&&(r=V(function(){d?E.emit("unhandledRejection",t,e):I(O,e,t)}),n.rejection=d||N(n)?P:x,r.error))throw r.value}))}))},I=function(e,t,r){var n;X?((n=w.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),p.dispatchEvent(n)):n={promise:t,reason:r},!$&&(t=p["on"+e])?t(n):e===O&&Q("Unhandled promise rejection",r)},N=function(e){return e.rejection!==x&&!e.parent},T=function(t,r,n){return function(e){t(r,e,n)}},k=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=ee,R(e,!0))},D=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw _("Promise can't be resolved itself");var n=A(e);n?l(function(){var t={done:!1};try{b(n,e,T(D,t,r),T(k,t,r))}catch(e){k(t,e,r)}}):(r.value=e,r.state=C,R(r,!1))}catch(e){k({done:!1},e,r)}}};if(m&&(v=(j=function(e){J(this,v),W(e),b(r,this);var t=g(this);try{e(T(D,t),T(k,t))}catch(e){k(t,e)}}).prototype,(r=function(e){G(this,{type:y,done:!1,notified:!1,parent:!1,reactions:new H,rejection:!1,state:0,value:void 0})}).prototype=s(v,"then",function(e,t){var r=g(this),n=S(z(this,j));return r.parent=!0,n.ok=!o(e)||e,n.fail=o(t)&&t,n.domain=d?E.domain:void 0,0==r.state?r.reactions.add(n):l(function(){a(n,r)}),n.promise}),t=function(){var e=new r,t=g(e);this.promise=e,this.resolve=T(D,t),this.reject=T(k,t)},e.f=S=function(e){return e===j||void 0===e?new t:Y(e)},!U&&o(c)&&u!==Object.prototype)){n=u.then,f||s(u,"then",function(e,t){var r=this;return new j(function(e,t){b(n,r,e,t)}).then(e,t)},{unsafe:!0});try{delete u.constructor}catch(e){}i&&i(u,v)}q({global:!0,constructor:!0,wrap:!0,forced:m},{Promise:j}),F(j,y,!1,!0),B(y)},{"../internals/a-callable":176,"../internals/an-instance":180,"../internals/define-built-in":211,"../internals/engine-is-node":227,"../internals/export":237,"../internals/function-call":244,"../internals/global":254,"../internals/host-report-errors":257,"../internals/internal-state":264,"../internals/is-callable":267,"../internals/is-object":272,"../internals/is-pure":273,"../internals/microtask":284,"../internals/new-promise-capability":285,"../internals/object-set-prototype-of":303,"../internals/perform":309,"../internals/promise-constructor-detection":310,"../internals/promise-native-constructor":311,"../internals/queue":314,"../internals/set-species":317,"../internals/set-to-string-tag":318,"../internals/species-constructor":322,"../internals/task":328}],391:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/is-pure"),a=e("../internals/promise-native-constructor"),i=e("../internals/fails"),o=e("../internals/get-built-in"),l=e("../internals/is-callable"),u=e("../internals/species-constructor"),c=e("../internals/promise-resolve"),e=e("../internals/define-built-in"),f=a&&a.prototype;n({target:"Promise",proto:!0,real:!0,forced:!!a&&i(function(){f.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=u(this,o("Promise")),e=l(t);return this.then(e?function(e){return c(r,t()).then(function(){return e})}:t,e?function(e){return c(r,t()).then(function(){throw e})}:t)}}),!s&&l(a)&&(n=o("Promise").prototype.finally,f.finally!==n&&e(f,"finally",n,{unsafe:!0}))},{"../internals/define-built-in":211,"../internals/export":237,"../internals/fails":238,"../internals/get-built-in":249,"../internals/is-callable":267,"../internals/is-pure":273,"../internals/promise-native-constructor":311,"../internals/promise-resolve":312,"../internals/species-constructor":322}],392:[function(e,t,r){e("../modules/es.promise.constructor"),e("../modules/es.promise.all"),e("../modules/es.promise.catch"),e("../modules/es.promise.race"),e("../modules/es.promise.reject"),e("../modules/es.promise.resolve")},{"../modules/es.promise.all":387,"../modules/es.promise.catch":389,"../modules/es.promise.constructor":390,"../modules/es.promise.race":393,"../modules/es.promise.reject":394,"../modules/es.promise.resolve":395}],393:[function(e,t,r){"use strict";var n=e("../internals/export"),a=e("../internals/function-call"),i=e("../internals/a-callable"),o=e("../internals/new-promise-capability"),l=e("../internals/perform"),u=e("../internals/iterate");n({target:"Promise",stat:!0,forced:e("../internals/promise-statics-incorrect-iteration")},{race:function(e){var r=this,n=o.f(r),s=n.reject,t=l(function(){var t=i(r.resolve);u(e,function(e){a(t,r,e).then(n.resolve,s)})});return t.error&&s(t.value),n.promise}})},{"../internals/a-callable":176,"../internals/export":237,"../internals/function-call":244,"../internals/iterate":276,"../internals/new-promise-capability":285,"../internals/perform":309,"../internals/promise-statics-incorrect-iteration":313}],394:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/function-call"),a=e("../internals/new-promise-capability");n({target:"Promise",stat:!0,forced:e("../internals/promise-constructor-detection").CONSTRUCTOR},{reject:function(e){var t=a.f(this);return s(t.reject,void 0,e),t.promise}})},{"../internals/export":237,"../internals/function-call":244,"../internals/new-promise-capability":285,"../internals/promise-constructor-detection":310}],395:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/get-built-in"),a=e("../internals/is-pure"),i=e("../internals/promise-native-constructor"),o=e("../internals/promise-constructor-detection").CONSTRUCTOR,l=e("../internals/promise-resolve"),u=s("Promise"),c=a&&!o;n({target:"Promise",stat:!0,forced:a||o},{resolve:function(e){return l(c&&this===u?i:this,e)}})},{"../internals/export":237,"../internals/get-built-in":249,"../internals/is-pure":273,"../internals/promise-constructor-detection":310,"../internals/promise-native-constructor":311,"../internals/promise-resolve":312}],396:[function(e,t,r){arguments[4][367][0].apply(r,arguments)},{dup:367}],397:[function(e,t,r){"use strict";e("../internals/collection")("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},e("../internals/collection-strong"))},{"../internals/collection":202,"../internals/collection-strong":200}],398:[function(e,t,r){e("../modules/es.set.constructor")},{"../modules/es.set.constructor":397}],399:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/function-uncurry-this"),a=e("../internals/not-a-regexp"),i=e("../internals/require-object-coercible"),o=e("../internals/to-string"),e=e("../internals/correct-is-regexp-logic"),l=s("".indexOf);n({target:"String",proto:!0,forced:!e("includes")},{includes:function(e){return!!~l(o(i(this)),o(a(e)),1<arguments.length?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":204,"../internals/export":237,"../internals/function-uncurry-this":248,"../internals/not-a-regexp":287,"../internals/require-object-coercible":315,"../internals/to-string":337}],400:[function(e,t,r){"use strict";var n=e("../internals/string-multibyte").charAt,s=e("../internals/to-string"),a=e("../internals/internal-state"),i=e("../internals/iterator-define"),o=e("../internals/create-iter-result-object"),l="String Iterator",u=a.set,c=a.getterFor(l);i(String,"String",function(e){u(this,{type:l,string:s(e),index:0})},function(){var e=c(this),t=e.string,r=e.index;return r>=t.length?o(void 0,!0):(t=n(t,r),e.index+=t.length,o(t,!1))})},{"../internals/create-iter-result-object":206,"../internals/internal-state":264,"../internals/iterator-define":279,"../internals/string-multibyte":323,"../internals/to-string":337}],401:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/function-uncurry-this-clause"),a=e("../internals/object-get-own-property-descriptor").f,i=e("../internals/to-length"),o=e("../internals/to-string"),l=e("../internals/not-a-regexp"),u=e("../internals/require-object-coercible"),c=e("../internals/correct-is-regexp-logic"),e=e("../internals/is-pure"),f=s("".startsWith),d=s("".slice),p=Math.min,s=c("startsWith");n({target:"String",proto:!0,forced:!!(e||s||(!(c=a(String.prototype,"startsWith"))||c.writable))&&!s},{startsWith:function(e){var t=o(u(this)),r=(l(e),i(p(1<arguments.length?arguments[1]:void 0,t.length))),e=o(e);return f?f(t,e,r):d(t,r,r+e.length)===e}})},{"../internals/correct-is-regexp-logic":204,"../internals/export":237,"../internals/function-uncurry-this-clause":247,"../internals/is-pure":273,"../internals/not-a-regexp":287,"../internals/object-get-own-property-descriptor":293,"../internals/require-object-coercible":315,"../internals/to-length":332,"../internals/to-string":337}],402:[function(e,t,r){e("../internals/well-known-symbol-define")("asyncIterator")},{"../internals/well-known-symbol-define":344}],403:[function(e,M,L){"use strict";function n(e,t){var r=N[e]=g(R);return re(r,{type:P,tag:e,description:t}),f||(r.description=t),r}function s(e,t,r){return e===A&&s(T,t,r),b(e),t=y(t),b(r),(p(N,t)?(r.enumerable?(p(e,x)&&e[x][t]&&(e[x][t]=!1),r=g(r,{enumerable:m(0,!1)})):(p(e,x)||I(e,x,m(1,{})),e[x][t]=!0),D):I)(e,t,r)}function r(t,e){b(t);var r=h(e),e=j(r).concat(o(r));return C(e,function(e){f&&!c(a,r,e)||s(t,e,r[e])}),t}function a(e){var e=y(e),t=c(oe,this,e);return!(this===A&&p(N,e)&&!p(T,e))&&(!(t||!p(this,e)||!p(N,e)||p(this,x)&&this[x][e])||t)}function t(e,t){var r,e=h(e),t=y(t);if(e!==A||!p(N,t)||p(T,t))return!(r=ae(e,t))||!p(N,t)||p(e,x)&&e[x][t]||(r.enumerable=!0),r}function i(e){var e=ie(h(e)),t=[];return C(e,function(e){p(N,e)||p($,e)||le(t,e)}),t}function o(e){var t=e===A,e=ie(t?T:h(e)),r=[];return C(e,function(e){!p(N,e)||t&&!p(A,e)||le(r,N[e])}),r}var l=e("../internals/export"),u=e("../internals/global"),c=e("../internals/function-call"),q=e("../internals/function-uncurry-this"),U=e("../internals/is-pure"),f=e("../internals/descriptors"),d=e("../internals/symbol-constructor-detection"),F=e("../internals/fails"),p=e("../internals/has-own-property"),B=e("../internals/object-is-prototype-of"),b=e("../internals/an-object"),h=e("../internals/to-indexed-object"),y=e("../internals/to-property-key"),W=e("../internals/to-string"),m=e("../internals/create-property-descriptor"),g=e("../internals/object-create"),j=e("../internals/object-keys"),K=e("../internals/object-get-own-property-names"),v=e("../internals/object-get-own-property-names-external"),J=e("../internals/object-get-own-property-symbols"),_=e("../internals/object-get-own-property-descriptor"),z=e("../internals/object-define-property"),Q=e("../internals/object-define-properties"),V=e("../internals/object-property-is-enumerable"),w=e("../internals/define-built-in"),H=e("../internals/define-built-in-accessor"),E=e("../internals/shared"),S=e("../internals/shared-key"),$=e("../internals/hidden-keys"),G=e("../internals/uid"),Y=e("../internals/well-known-symbol"),X=e("../internals/well-known-symbol-wrapped"),Z=e("../internals/well-known-symbol-define"),ee=e("../internals/symbol-define-to-primitive"),te=e("../internals/set-to-string-tag"),O=e("../internals/internal-state"),C=e("../internals/array-iteration").forEach,x=S("hidden"),P="Symbol",e="prototype",re=O.set,ne=O.getterFor(P),A=Object[e],S=u.Symbol,R=S&&S[e],se=u.TypeError,O=u.QObject,ae=_.f,I=z.f,ie=v.f,oe=V.f,le=q([].push),N=E("symbols"),T=E("op-symbols"),u=E("wks"),k=!O||!O[e]||!O[e].findChild,D=f&&F(function(){return 7!=g(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=ae(A,t);n&&delete A[t],I(e,t,r),n&&e!==A&&I(A,t,n)}:I;d||(w(R=(S=function(){if(B(R,this))throw se("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?W(arguments[0]):void 0,t=G(e),r=function(e){this===A&&c(r,T,e),p(this,x)&&p(this[x],t)&&(this[x][t]=!1),D(this,t,m(1,e))};return f&&k&&D(A,t,{configurable:!0,set:r}),n(t,e)})[e],"toString",function(){return ne(this).tag}),w(S,"withoutSetter",function(e){return n(G(e),e)}),V.f=a,z.f=s,Q.f=r,_.f=t,K.f=v.f=i,J.f=o,X.f=function(e){return n(Y(e),e)},f&&(H(R,"description",{configurable:!0,get:function(){return ne(this).description}}),U||w(A,"propertyIsEnumerable",a,{unsafe:!0}))),l({global:!0,constructor:!0,wrap:!0,forced:!d,sham:!d},{Symbol:S}),C(j(u),function(e){Z(e)}),l({target:P,stat:!0,forced:!d},{useSetter:function(){k=!0},useSimple:function(){k=!1}}),l({target:"Object",stat:!0,forced:!d,sham:!f},{create:function(e,t){return void 0===t?g(e):r(g(e),t)},defineProperty:s,defineProperties:r,getOwnPropertyDescriptor:t}),l({target:"Object",stat:!0,forced:!d},{getOwnPropertyNames:i}),ee(),te(S,P),$[x]=!0},{"../internals/an-object":181,"../internals/array-iteration":186,"../internals/create-property-descriptor":208,"../internals/define-built-in":211,"../internals/define-built-in-accessor":210,"../internals/descriptors":215,"../internals/export":237,"../internals/fails":238,"../internals/function-call":244,"../internals/function-uncurry-this":248,"../internals/global":254,"../internals/has-own-property":255,"../internals/hidden-keys":256,"../internals/internal-state":264,"../internals/is-pure":273,"../internals/object-create":290,"../internals/object-define-properties":291,"../internals/object-define-property":292,"../internals/object-get-own-property-descriptor":293,"../internals/object-get-own-property-names":295,"../internals/object-get-own-property-names-external":294,"../internals/object-get-own-property-symbols":296,"../internals/object-is-prototype-of":299,"../internals/object-keys":301,"../internals/object-property-is-enumerable":302,"../internals/set-to-string-tag":318,"../internals/shared":321,"../internals/shared-key":319,"../internals/symbol-constructor-detection":325,"../internals/symbol-define-to-primitive":326,"../internals/to-indexed-object":330,"../internals/to-property-key":335,"../internals/to-string":337,"../internals/uid":339,"../internals/well-known-symbol":346,"../internals/well-known-symbol-define":344,"../internals/well-known-symbol-wrapped":345}],404:[function(e,t,r){arguments[4][367][0].apply(r,arguments)},{dup:367}],405:[function(e,t,r){var n=e("../internals/export"),s=e("../internals/get-built-in"),a=e("../internals/has-own-property"),i=e("../internals/to-string"),o=e("../internals/shared"),e=e("../internals/symbol-registry-detection"),l=o("string-to-symbol-registry"),u=o("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!e},{for:function(e){var t,e=i(e);return a(l,e)?l[e]:(t=s("Symbol")(e),l[e]=t,u[t]=e,t)}})},{"../internals/export":237,"../internals/get-built-in":249,"../internals/has-own-property":255,"../internals/shared":321,"../internals/symbol-registry-detection":327,"../internals/to-string":337}],406:[function(e,t,r){e("../internals/well-known-symbol-define")("hasInstance")},{"../internals/well-known-symbol-define":344}],407:[function(e,t,r){e("../internals/well-known-symbol-define")("isConcatSpreadable")},{"../internals/well-known-symbol-define":344}],408:[function(e,t,r){e("../internals/well-known-symbol-define")("iterator")},{"../internals/well-known-symbol-define":344}],409:[function(e,t,r){e("../modules/es.symbol.constructor"),e("../modules/es.symbol.for"),e("../modules/es.symbol.key-for"),e("../modules/es.json.stringify"),e("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":369,"../modules/es.object.get-own-property-symbols":381,"../modules/es.symbol.constructor":403,"../modules/es.symbol.for":405,"../modules/es.symbol.key-for":410}],410:[function(e,t,r){var n=e("../internals/export"),s=e("../internals/has-own-property"),a=e("../internals/is-symbol"),i=e("../internals/try-to-string"),o=e("../internals/shared"),e=e("../internals/symbol-registry-detection"),l=o("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!e},{keyFor:function(e){if(!a(e))throw TypeError(i(e)+" is not a symbol");if(s(l,e))return l[e]}})},{"../internals/export":237,"../internals/has-own-property":255,"../internals/is-symbol":275,"../internals/shared":321,"../internals/symbol-registry-detection":327,"../internals/try-to-string":338}],411:[function(e,t,r){e("../internals/well-known-symbol-define")("matchAll")},{"../internals/well-known-symbol-define":344}],412:[function(e,t,r){e("../internals/well-known-symbol-define")("match")},{"../internals/well-known-symbol-define":344}],413:[function(e,t,r){e("../internals/well-known-symbol-define")("replace")},{"../internals/well-known-symbol-define":344}],414:[function(e,t,r){e("../internals/well-known-symbol-define")("search")},{"../internals/well-known-symbol-define":344}],415:[function(e,t,r){e("../internals/well-known-symbol-define")("species")},{"../internals/well-known-symbol-define":344}],416:[function(e,t,r){e("../internals/well-known-symbol-define")("split")},{"../internals/well-known-symbol-define":344}],417:[function(e,t,r){var n=e("../internals/well-known-symbol-define"),e=e("../internals/symbol-define-to-primitive");n("toPrimitive"),e()},{"../internals/symbol-define-to-primitive":326,"../internals/well-known-symbol-define":344}],418:[function(e,t,r){var n=e("../internals/get-built-in"),s=e("../internals/well-known-symbol-define"),e=e("../internals/set-to-string-tag");s("toStringTag"),e(n("Symbol"),"Symbol")},{"../internals/get-built-in":249,"../internals/set-to-string-tag":318,"../internals/well-known-symbol-define":344}],419:[function(e,t,r){e("../internals/well-known-symbol-define")("unscopables")},{"../internals/well-known-symbol-define":344}],420:[function(e,t,r){"use strict";function n(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}var s,a,i,o,l=e("../internals/freezing"),u=e("../internals/global"),c=e("../internals/function-uncurry-this"),f=e("../internals/define-built-ins"),d=e("../internals/internal-metadata"),p=e("../internals/collection"),b=e("../internals/collection-weak"),h=e("../internals/is-object"),y=e("../internals/internal-state").enforce,m=e("../internals/fails"),e=e("../internals/weak-map-basic-detection"),g=Object,j=Array.isArray,v=g.isExtensible,_=g.isFrozen,w=g.isSealed,E=g.freeze,S=g.seal,O={},C={},g=!u.ActiveXObject&&"ActiveXObject"in u,x=p("WeakMap",n,b),u=x.prototype,P=c(u.set);e&&(g?(s=b.getConstructor(n,"WeakMap",!0),d.enable(),a=c(u.delete),i=c(u.has),o=c(u.get),f(u,{delete:function(e){var t;return h(e)&&!v(e)?((t=y(this)).frozen||(t.frozen=new s),a(this,e)||t.frozen.delete(e)):a(this,e)},has:function(e){var t;return h(e)&&!v(e)?((t=y(this)).frozen||(t.frozen=new s),i(this,e)||t.frozen.has(e)):i(this,e)},get:function(e){var t;return!h(e)||v(e)||((t=y(this)).frozen||(t.frozen=new s),i(this,e))?o(this,e):t.frozen.get(e)},set:function(e,t){var r;return!h(e)||v(e)||((r=y(this)).frozen||(r.frozen=new s),i(this,e))?P(this,e,t):r.frozen.set(e,t),this}})):l&&m(function(){var e=E([]);return P(new x,e,1),!_(e)})&&f(u,{set:function(e,t){var r;return j(e)&&(_(e)?r=O:w(e)&&(r=C)),P(this,e,t),r==O&&E(e),r==C&&S(e),this}}))},{"../internals/collection":202,"../internals/collection-weak":201,"../internals/define-built-ins":212,"../internals/fails":238,"../internals/freezing":239,"../internals/function-uncurry-this":248,"../internals/global":254,"../internals/internal-metadata":263,"../internals/internal-state":264,"../internals/is-object":272,"../internals/weak-map-basic-detection":343}],421:[function(e,t,r){e("../modules/es.weak-map.constructor")},{"../modules/es.weak-map.constructor":420}],422:[function(e,t,r){e("../internals/well-known-symbol-define")("asyncDispose")},{"../internals/well-known-symbol-define":344}],423:[function(e,t,r){e("../internals/well-known-symbol-define")("dispose")},{"../internals/well-known-symbol-define":344}],424:[function(e,t,r){var n=e("../internals/export"),s=e("../internals/get-built-in"),e=e("../internals/function-uncurry-this"),s=s("Symbol"),a=s.keyFor,i=e(s.prototype.valueOf);n({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==a(i(e))}catch(e){return!1}}})},{"../internals/export":237,"../internals/function-uncurry-this":248,"../internals/get-built-in":249}],425:[function(e,t,r){for(var n=e("../internals/export"),s=e("../internals/shared"),a=e("../internals/get-built-in"),i=e("../internals/function-uncurry-this"),o=e("../internals/is-symbol"),l=e("../internals/well-known-symbol"),u=a("Symbol"),c=u.isWellKnown,f=a("Object","getOwnPropertyNames"),d=i(u.prototype.valueOf),p=s("wks"),b=0,h=f(u),y=h.length;b<y;b++)try{var m=h[b];o(u[m])&&l(m)}catch(e){}n({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(c&&c(e))return!0;try{for(var t=d(e),r=0,n=f(p),s=n.length;r<s;r++)if(p[n[r]]==t)return!0}catch(e){}return!1}})},{"../internals/export":237,"../internals/function-uncurry-this":248,"../internals/get-built-in":249,"../internals/is-symbol":275,"../internals/shared":321,"../internals/well-known-symbol":346}],426:[function(e,t,r){e("../internals/well-known-symbol-define")("matcher")},{"../internals/well-known-symbol-define":344}],427:[function(e,t,r){e("../internals/well-known-symbol-define")("metadataKey")},{"../internals/well-known-symbol-define":344}],428:[function(e,t,r){e("../internals/well-known-symbol-define")("metadata")},{"../internals/well-known-symbol-define":344}],429:[function(e,t,r){e("../internals/well-known-symbol-define")("observable")},{"../internals/well-known-symbol-define":344}],430:[function(e,t,r){e("../internals/well-known-symbol-define")("patternMatch")},{"../internals/well-known-symbol-define":344}],431:[function(e,t,r){e("../internals/well-known-symbol-define")("replaceAll")},{"../internals/well-known-symbol-define":344}],432:[function(e,t,r){e("../modules/es.array.iterator");var n,s=e("../internals/dom-iterables"),a=e("../internals/global"),i=e("../internals/classof"),o=e("../internals/create-non-enumerable-property"),l=e("../internals/iterators"),u=e("../internals/well-known-symbol")("toStringTag");for(n in s){var c=a[n],c=c&&c.prototype;c&&i(c)!==u&&o(c,u,n),l[n]=l.Array}},{"../internals/classof":199,"../internals/create-non-enumerable-property":207,"../internals/dom-iterables":219,"../internals/global":254,"../internals/iterators":281,"../internals/well-known-symbol":346,"../modules/es.array.iterator":360}],433:[function(e,t,r){var n=e("../internals/export"),s=e("../internals/global"),e=e("../internals/schedulers-fix")(s.setInterval,!0);n({global:!0,bind:!0,forced:s.setInterval!==e},{setInterval:e})},{"../internals/export":237,"../internals/global":254,"../internals/schedulers-fix":316}],434:[function(e,t,r){var n=e("../internals/export"),s=e("../internals/global"),e=e("../internals/schedulers-fix")(s.setTimeout,!0);n({global:!0,bind:!0,forced:s.setTimeout!==e},{setTimeout:e})},{"../internals/export":237,"../internals/global":254,"../internals/schedulers-fix":316}],435:[function(e,t,r){e("../modules/web.set-interval"),e("../modules/web.set-timeout")},{"../modules/web.set-interval":433,"../modules/web.set-timeout":434}],436:[function(e,t,r){e=e("../../es/array/from");t.exports=e},{"../../es/array/from":113}],437:[function(e,t,r){e=e("../../es/array/is-array");t.exports=e},{"../../es/array/is-array":114}],438:[function(e,t,r){e=e("../../../es/array/virtual/entries");t.exports=e},{"../../../es/array/virtual/entries":116}],439:[function(e,t,r){e=e("../../../es/array/virtual/for-each");t.exports=e},{"../../../es/array/virtual/for-each":121}],440:[function(e,t,r){e=e("../../../es/array/virtual/keys");t.exports=e},{"../../../es/array/virtual/keys":124}],441:[function(e,t,r){e=e("../../../es/array/virtual/values");t.exports=e},{"../../../es/array/virtual/values":131}],442:[function(e,t,r){e=e("../../es/instance/bind");t.exports=e},{"../../es/instance/bind":133}],443:[function(e,t,r){e=e("../../es/instance/concat");t.exports=e},{"../../es/instance/concat":134}],444:[function(e,t,r){e("../../modules/web.dom-collections.iterator");var n=e("../../internals/classof"),s=e("../../internals/has-own-property"),a=e("../../internals/object-is-prototype-of"),i=e("../array/virtual/entries"),o=Array.prototype,l={DOMTokenList:!0,NodeList:!0};t.exports=function(e){var t=e.entries;return e===o||a(o,e)&&t===o.entries||s(l,n(e))?i:t}},{"../../internals/classof":199,"../../internals/has-own-property":255,"../../internals/object-is-prototype-of":299,"../../modules/web.dom-collections.iterator":432,"../array/virtual/entries":438}],445:[function(e,t,r){e=e("../../es/instance/every");t.exports=e},{"../../es/instance/every":135}],446:[function(e,t,r){e=e("../../es/instance/filter");t.exports=e},{"../../es/instance/filter":136}],447:[function(e,t,r){e=e("../../es/instance/find-index");t.exports=e},{"../../es/instance/find-index":137}],448:[function(e,t,r){e=e("../../es/instance/find");t.exports=e},{"../../es/instance/find":138}],449:[function(e,t,r){e("../../modules/web.dom-collections.iterator");var n=e("../../internals/classof"),s=e("../../internals/has-own-property"),a=e("../../internals/object-is-prototype-of"),i=e("../array/virtual/for-each"),o=Array.prototype,l={DOMTokenList:!0,NodeList:!0};t.exports=function(e){var t=e.forEach;return e===o||a(o,e)&&t===o.forEach||s(l,n(e))?i:t}},{"../../internals/classof":199,"../../internals/has-own-property":255,"../../internals/object-is-prototype-of":299,"../../modules/web.dom-collections.iterator":432,"../array/virtual/for-each":439}],450:[function(e,t,r){e=e("../../es/instance/includes");t.exports=e},{"../../es/instance/includes":139}],451:[function(e,t,r){e=e("../../es/instance/index-of");t.exports=e},{"../../es/instance/index-of":140}],452:[function(e,t,r){e("../../modules/web.dom-collections.iterator");var n=e("../../internals/classof"),s=e("../../internals/has-own-property"),a=e("../../internals/object-is-prototype-of"),i=e("../array/virtual/keys"),o=Array.prototype,l={DOMTokenList:!0,NodeList:!0};t.exports=function(e){var t=e.keys;return e===o||a(o,e)&&t===o.keys||s(l,n(e))?i:t}},{"../../internals/classof":199,"../../internals/has-own-property":255,"../../internals/object-is-prototype-of":299,"../../modules/web.dom-collections.iterator":432,"../array/virtual/keys":440}],453:[function(e,t,r){e=e("../../es/instance/map");t.exports=e},{"../../es/instance/map":141}],454:[function(e,t,r){e=e("../../es/instance/reduce");t.exports=e},{"../../es/instance/reduce":142}],455:[function(e,t,r){e=e("../../es/instance/slice");t.exports=e},{"../../es/instance/slice":143}],456:[function(e,t,r){e=e("../../es/instance/some");t.exports=e},{"../../es/instance/some":144}],457:[function(e,t,r){e=e("../../es/instance/sort");t.exports=e},{"../../es/instance/sort":145}],458:[function(e,t,r){e=e("../../es/instance/splice");t.exports=e},{"../../es/instance/splice":146}],459:[function(e,t,r){e=e("../../es/instance/starts-with");t.exports=e},{"../../es/instance/starts-with":147}],460:[function(e,t,r){e("../../modules/web.dom-collections.iterator");var n=e("../../internals/classof"),s=e("../../internals/has-own-property"),a=e("../../internals/object-is-prototype-of"),i=e("../array/virtual/values"),o=Array.prototype,l={DOMTokenList:!0,NodeList:!0};t.exports=function(e){var t=e.values;return e===o||a(o,e)&&t===o.values||s(l,n(e))?i:t}},{"../../internals/classof":199,"../../internals/has-own-property":255,"../../internals/object-is-prototype-of":299,"../../modules/web.dom-collections.iterator":432,"../array/virtual/values":441}],461:[function(e,t,r){e=e("../../es/json/stringify");t.exports=e},{"../../es/json/stringify":148}],462:[function(e,t,r){var n=e("../../es/map");e("../../modules/web.dom-collections.iterator"),t.exports=n},{"../../es/map":149,"../../modules/web.dom-collections.iterator":432}],463:[function(e,t,r){e=e("../../es/number/is-integer");t.exports=e},{"../../es/number/is-integer":150}],464:[function(e,t,r){e=e("../../es/object/assign");t.exports=e},{"../../es/object/assign":151}],465:[function(e,t,r){e=e("../../es/object/create");t.exports=e},{"../../es/object/create":152}],466:[function(e,t,r){e=e("../../es/object/define-property");t.exports=e},{"../../es/object/define-property":153}],467:[function(e,t,r){e=e("../../es/object/entries");t.exports=e},{"../../es/object/entries":154}],468:[function(e,t,r){e=e("../../es/object/freeze");t.exports=e},{"../../es/object/freeze":155}],469:[function(e,t,r){e=e("../../es/object/get-own-property-descriptor");t.exports=e},{"../../es/object/get-own-property-descriptor":156}],470:[function(e,t,r){e=e("../../es/object/get-prototype-of");t.exports=e},{"../../es/object/get-prototype-of":157}],471:[function(e,t,r){e=e("../../es/object/keys");t.exports=e},{"../../es/object/keys":158}],472:[function(e,t,r){e=e("../es/parse-int");t.exports=e},{"../es/parse-int":159}],473:[function(e,t,r){var n=e("../../es/promise");e("../../modules/web.dom-collections.iterator"),t.exports=n},{"../../es/promise":160,"../../modules/web.dom-collections.iterator":432}],474:[function(e,t,r){e("../modules/web.timers");e=e("../internals/path");t.exports=e.setInterval},{"../internals/path":308,"../modules/web.timers":435}],475:[function(e,t,r){e("../modules/web.timers");e=e("../internals/path");t.exports=e.setTimeout},{"../internals/path":308,"../modules/web.timers":435}],476:[function(e,t,r){var n=e("../../es/set");e("../../modules/web.dom-collections.iterator"),t.exports=n},{"../../es/set":161,"../../modules/web.dom-collections.iterator":432}],477:[function(e,t,r){var n=e("../../es/symbol");e("../../modules/web.dom-collections.iterator"),t.exports=n},{"../../es/symbol":164,"../../modules/web.dom-collections.iterator":432}],478:[function(e,t,r){var n=e("../../es/symbol/iterator");e("../../modules/web.dom-collections.iterator"),t.exports=n},{"../../es/symbol/iterator":165,"../../modules/web.dom-collections.iterator":432}],479:[function(e,t,r){e=e("../../es/symbol/to-primitive");t.exports=e},{"../../es/symbol/to-primitive":166}],480:[function(e,t,r){var n=e("../../es/weak-map");e("../../modules/web.dom-collections.iterator"),t.exports=n},{"../../es/weak-map":167,"../../modules/web.dom-collections.iterator":432}],481:[function(e,t,r){var n,s;n=this,s=function(e){for(var t=e,r=t.lib.BlockCipher,n=t.algo,u=[],s=[],a=[],i=[],o=[],l=[],c=[],f=[],d=[],p=[],b=[],h=0;h<256;h++)b[h]=h<128?h<<1:h<<1^283;for(var y=0,m=0,h=0;h<256;h++){var g=m^m<<1^m<<2^m<<3^m<<4,j=(u[y]=g=g>>>8^255&g^99,b[s[g]=y]),v=b[j],_=b[v],w=257*b[g]^16843008*g;a[y]=w<<24|w>>>8,i[y]=w<<16|w>>>16,o[y]=w<<8|w>>>24,l[y]=w,c[g]=(w=16843009*_^65537*v^257*j^16843008*y)<<24|w>>>8,f[g]=w<<16|w>>>16,d[g]=w<<8|w>>>24,p[g]=w,y?(y=j^b[b[b[_^j]]],m^=b[b[m]]):y=m=1}var E=[0,1,2,4,8,16,32,64,128,27,54],n=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*(1+(this._nRounds=6+r)),s=this._keySchedule=[],a=0;a<n;a++)a<r?s[a]=t[a]:(l=s[a-1],a%r?6<r&&a%r==4&&(l=u[l>>>24]<<24|u[l>>>16&255]<<16|u[l>>>8&255]<<8|u[255&l]):(l=u[(l=l<<8|l>>>24)>>>24]<<24|u[l>>>16&255]<<16|u[l>>>8&255]<<8|u[255&l],l^=E[a/r|0]<<24),s[a]=s[a-r]^l);for(var i=this._invKeySchedule=[],o=0;o<n;o++){var l,a=n-o;l=o%4?s[a]:s[a-4],i[o]=o<4||a<=4?l:c[u[l>>>24]]^f[u[l>>>16&255]]^d[u[l>>>8&255]]^p[u[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,i,o,l,u)},decryptBlock:function(e,t){var r=e[t+1],r=(e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,c,f,d,p,s),e[t+1]);e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,s,a,i,o){for(var l=this._nRounds,u=e[t]^r[0],c=e[t+1]^r[1],f=e[t+2]^r[2],d=e[t+3]^r[3],p=4,b=1;b<l;b++)var h=n[u>>>24]^s[c>>>16&255]^a[f>>>8&255]^i[255&d]^r[p++],y=n[c>>>24]^s[f>>>16&255]^a[d>>>8&255]^i[255&u]^r[p++],m=n[f>>>24]^s[d>>>16&255]^a[u>>>8&255]^i[255&c]^r[p++],g=n[d>>>24]^s[u>>>16&255]^a[c>>>8&255]^i[255&f]^r[p++],u=h,c=y,f=m,d=g;h=(o[u>>>24]<<24|o[c>>>16&255]<<16|o[f>>>8&255]<<8|o[255&d])^r[p++],y=(o[c>>>24]<<24|o[f>>>16&255]<<16|o[d>>>8&255]<<8|o[255&u])^r[p++],m=(o[f>>>24]<<24|o[d>>>16&255]<<16|o[u>>>8&255]<<8|o[255&c])^r[p++],g=(o[d>>>24]<<24|o[u>>>16&255]<<16|o[c>>>8&255]<<8|o[255&f])^r[p++];e[t]=h,e[t+1]=y,e[t+2]=m,e[t+3]=g},keySize:8});return t.AES=r._createHelper(n),e.AES},"object"==typeof r?t.exports=r=s(e("./core"),e("./enc-base64"),e("./md5"),e("./evpkdf"),e("./cipher-core")):s(n.CryptoJS)},{"./cipher-core":482,"./core":483,"./enc-base64":484,"./evpkdf":486,"./md5":488}],482:[function(e,t,r){var n,s;n=this,s=function(e){function s(e){return"string"==typeof e?b:p}function a(e,t,r){var n,s=this._iv;s?(n=s,this._iv=void 0):n=this._prevBlock;for(var a=0;a<r;a++)e[t+a]^=n[a]}var t,r,i,n,o,l,u,c,f,d,p,b;e.lib.Cipher||(t=(e=e).lib,r=t.Base,i=t.WordArray,n=t.BufferedBlockAlgorithm,(o=e.enc).Utf8,l=o.Base64,u=e.algo.EvpKDF,c=t.Cipher=n.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){n.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(n){return{encrypt:function(e,t,r){return s(t).encrypt(n,e,t,r)},decrypt:function(e,t,r){return s(t).decrypt(n,e,t,r)}}}}),t.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),o=e.mode={},f=t.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),f=o.CBC=((o=f.extend()).Encryptor=o.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize;a.call(this,e,t,n),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+n)}}),o.Decryptor=o.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,s=e.slice(t,t+n);r.decryptBlock(e,t),a.call(this,e,t,n),this._prevBlock=s}}),o),o=(e.pad={}).Pkcs7={pad:function(e,t){for(var t=4*t,r=t-e.sigBytes%t,n=r<<24|r<<16|r<<8|r,s=[],a=0;a<r;a+=4)s.push(n);t=i.create(s,r);e.concat(t)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},t.BlockCipher=c.extend({cfg:c.cfg.extend({mode:f,padding:o}),reset:function(){c.reset.call(this);var e,t=this.cfg,r=t.iv,t=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=t.createEncryptor:(e=t.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(t,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),d=t.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),f=(e.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,e=e.salt,e=e?i.create([1398893684,1701076831]).concat(e).concat(t):t;return e.toString(l)},parse:function(e){var t,e=l.parse(e),r=e.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=i.create(r.slice(2,4)),r.splice(0,4),e.sigBytes-=16),d.create({ciphertext:e,salt:t})}},p=t.SerializableCipher=r.extend({cfg:r.extend({format:f}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var s=e.createEncryptor(r,n),t=s.finalize(t),s=s.cfg;return d.create({ciphertext:t,key:r,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),o=(e.kdf={}).OpenSSL={execute:function(e,t,r,n,s){n=n||i.random(8),s=(s?u.create({keySize:t+r,hasher:s}):u.create({keySize:t+r})).compute(e,n);e=i.create(s.words.slice(t),4*r);return s.sigBytes=4*t,d.create({key:s,iv:e,salt:n})}},b=t.PasswordBasedCipher=p.extend({cfg:p.cfg.extend({kdf:o}),encrypt:function(e,t,r,n){r=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize,n.salt,n.hasher),n.iv=r.iv,e=p.encrypt.call(this,e,t,r.key,n);return e.mixIn(r),e},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);r=n.kdf.execute(r,e.keySize,e.ivSize,t.salt,n.hasher);return n.iv=r.iv,p.decrypt.call(this,e,t,r.key,n)}}))},"object"==typeof r?t.exports=r=s(e("./core"),e("./evpkdf")):s(n.CryptoJS)},{"./core":483,"./evpkdf":486}],483:[function(h,r,n){!function(b){!function(){var e,t;e=this,t=function(){var n,u=Math;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),!(n=!(n=!(n="undefined"!=typeof globalThis&&globalThis.crypto?globalThis.crypto:n)&&"undefined"!=typeof window&&window.msCrypto?window.msCrypto:n)&&void 0!==b&&b.crypto?b.crypto:n)&&"function"==typeof h)try{n=h("crypto")}catch(e){}var r=Object.create||function(e){return t.prototype=e,e=new t,t.prototype=null,e};function t(){}var e={},s=e.lib={},a=s.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),(t.init.prototype=t).$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=s.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||o).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,s=e.sigBytes;if(this.clamp(),n%4)for(var a=0;a<s;a++){var i=r[a>>>2]>>>24-a%4*8&255;t[n+a>>>2]|=i<<24-(n+a)%4*8}else for(var o=0;o<s;o+=4)t[n+o>>>2]=r[o>>>2];return this.sigBytes+=s,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=u.ceil(t/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")}());return new c.init(t,e)}}),i=e.enc={},o=i.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],s=0;s<r;s++){var a=t[s>>>2]>>>24-s%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},l=i.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],s=0;s<r;s++){var a=t[s>>>2]>>>24-s%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},f=i.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t,r=this._data,n=r.words,s=r.sigBytes,a=this.blockSize,i=s/(4*a),o=(i=e?u.ceil(i):u.max((0|i)-this._minBufferSize,0))*a,e=u.min(4*o,s);if(o){for(var l=0;l<o;l+=a)this._doProcessBlock(n,l);t=n.splice(0,o),r.sigBytes-=e}return new c.init(t,e)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),p=(s.Hasher=d.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(r){return function(e,t){return new r.init(t).finalize(e)}},_createHmacHelper:function(r){return function(e,t){return new p.HMAC.init(r,t).finalize(e)}}}),e.algo={});return e},"object"==typeof n?r.exports=n=t():e.CryptoJS=t()}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{crypto:void 0}],484:[function(e,t,r){var n,s;n=this,s=function(e){var b;return b=e.lib.WordArray,e.enc.Base64={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=this._map,s=(e.clamp(),[]),a=0;a<r;a+=3)for(var i=(t[a>>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,o=0;o<4&&a+.75*o<r;o++)s.push(n.charAt(i>>>6*(3-o)&63));var l=n.charAt(64);if(l)for(;s.length%4;)s.push(l);return s.join("")},parse:function(e){var t=e.length,r=this._map;if(!(n=this._reverseMap))for(var n=this._reverseMap=[],s=0;s<r.length;s++)n[r.charCodeAt(s)]=s;for(var a,i,o=r.charAt(64),l=(!o||-1!==(o=e.indexOf(o))&&(t=o),e),u=t,c=n,f=[],d=0,p=0;p<u;p++)p%4&&(i=c[l.charCodeAt(p-1)]<<p%4*2,a=c[l.charCodeAt(p)]>>>6-p%4*2,i=i|a,f[d>>>2]|=i<<24-d%4*8,d++);return b.create(f,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e.enc.Base64},"object"==typeof r?t.exports=r=s(e("./core")):s(n.CryptoJS)},{"./core":483}],485:[function(e,t,r){var n,s;n=this,s=function(e){return e.enc.Utf8},"object"==typeof r?t.exports=r=s(e("./core")):s(n.CryptoJS)},{"./core":483}],486:[function(e,t,r){var n,s;n=this,s=function(e){var t,r,n,c,s,a;return r=(t=e).lib,n=r.Base,c=r.WordArray,r=t.algo,s=r.MD5,a=r.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,s=n.hasher.create(),a=c.create(),i=a.words,o=n.keySize,l=n.iterations;i.length<o;){r&&s.update(r),r=s.update(e).finalize(t),s.reset();for(var u=1;u<l;u++)r=s.finalize(r),s.reset();a.concat(r)}return a.sigBytes=4*o,a}}),t.EvpKDF=function(e,t,r){return a.create(r).compute(e,t)},e.EvpKDF},"object"==typeof r?t.exports=r=s(e("./core"),e("./sha1"),e("./hmac")):s(n.CryptoJS)},{"./core":483,"./hmac":487,"./sha1":489}],487:[function(e,t,r){var n,s;n=this,s=function(e){var t,o;t=e.lib.Base,o=e.enc.Utf8,e.algo.HMAC=t.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=o.parse(t));for(var r=e.blockSize,n=4*r,e=((t=t.sigBytes>n?e.finalize(t):t).clamp(),this._oKey=t.clone()),t=this._iKey=t.clone(),s=e.words,a=t.words,i=0;i<r;i++)s[i]^=1549556828,a[i]^=909522486;e.sigBytes=t.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,e=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(e))}})},"object"==typeof r?t.exports=r=s(e("./core")):s(n.CryptoJS)},{"./core":483}],488:[function(e,t,r){var n,s;n=this,s=function(e){for(var l=Math,t=e,r=(s=t.lib).WordArray,n=s.Hasher,s=t.algo,C=[],a=0;a<64;a++)C[a]=4294967296*l.abs(l.sin(a+1))|0;function x(e,t,r,n,s,a,i){e=e+(t&r|~t&n)+s+i;return(e<<a|e>>>32-a)+t}function P(e,t,r,n,s,a,i){e=e+(t&n|r&~n)+s+i;return(e<<a|e>>>32-a)+t}function A(e,t,r,n,s,a,i){e=e+(t^r^n)+s+i;return(e<<a|e>>>32-a)+t}function R(e,t,r,n,s,a,i){e=e+(r^(t|~n))+s+i;return(e<<a|e>>>32-a)+t}return s=s.MD5=n.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,s=e[n];e[n]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}var a=this._hash.words,i=e[t+0],o=e[t+1],l=e[t+2],u=e[t+3],c=e[t+4],f=e[t+5],d=e[t+6],p=e[t+7],b=e[t+8],h=e[t+9],y=e[t+10],m=e[t+11],g=e[t+12],j=e[t+13],v=e[t+14],_=e[t+15],w=x(a[0],O=a[1],S=a[2],E=a[3],i,7,C[0]),E=x(E,w,O,S,o,12,C[1]),S=x(S,E,w,O,l,17,C[2]),O=x(O,S,E,w,u,22,C[3]);w=x(w,O,S,E,c,7,C[4]),E=x(E,w,O,S,f,12,C[5]),S=x(S,E,w,O,d,17,C[6]),O=x(O,S,E,w,p,22,C[7]),w=x(w,O,S,E,b,7,C[8]),E=x(E,w,O,S,h,12,C[9]),S=x(S,E,w,O,y,17,C[10]),O=x(O,S,E,w,m,22,C[11]),w=x(w,O,S,E,g,7,C[12]),E=x(E,w,O,S,j,12,C[13]),S=x(S,E,w,O,v,17,C[14]),w=P(w,O=x(O,S,E,w,_,22,C[15]),S,E,o,5,C[16]),E=P(E,w,O,S,d,9,C[17]),S=P(S,E,w,O,m,14,C[18]),O=P(O,S,E,w,i,20,C[19]),w=P(w,O,S,E,f,5,C[20]),E=P(E,w,O,S,y,9,C[21]),S=P(S,E,w,O,_,14,C[22]),O=P(O,S,E,w,c,20,C[23]),w=P(w,O,S,E,h,5,C[24]),E=P(E,w,O,S,v,9,C[25]),S=P(S,E,w,O,u,14,C[26]),O=P(O,S,E,w,b,20,C[27]),w=P(w,O,S,E,j,5,C[28]),E=P(E,w,O,S,l,9,C[29]),S=P(S,E,w,O,p,14,C[30]),w=A(w,O=P(O,S,E,w,g,20,C[31]),S,E,f,4,C[32]),E=A(E,w,O,S,b,11,C[33]),S=A(S,E,w,O,m,16,C[34]),O=A(O,S,E,w,v,23,C[35]),w=A(w,O,S,E,o,4,C[36]),E=A(E,w,O,S,c,11,C[37]),S=A(S,E,w,O,p,16,C[38]),O=A(O,S,E,w,y,23,C[39]),w=A(w,O,S,E,j,4,C[40]),E=A(E,w,O,S,i,11,C[41]),S=A(S,E,w,O,u,16,C[42]),O=A(O,S,E,w,d,23,C[43]),w=A(w,O,S,E,h,4,C[44]),E=A(E,w,O,S,g,11,C[45]),S=A(S,E,w,O,_,16,C[46]),w=R(w,O=A(O,S,E,w,l,23,C[47]),S,E,i,6,C[48]),E=R(E,w,O,S,p,10,C[49]),S=R(S,E,w,O,v,15,C[50]),O=R(O,S,E,w,f,21,C[51]),w=R(w,O,S,E,g,6,C[52]),E=R(E,w,O,S,u,10,C[53]),S=R(S,E,w,O,y,15,C[54]),O=R(O,S,E,w,o,21,C[55]),w=R(w,O,S,E,b,6,C[56]),E=R(E,w,O,S,_,10,C[57]),S=R(S,E,w,O,d,15,C[58]),O=R(O,S,E,w,j,21,C[59]),w=R(w,O,S,E,c,6,C[60]),E=R(E,w,O,S,m,10,C[61]),S=R(S,E,w,O,l,15,C[62]),O=R(O,S,E,w,h,21,C[63]),a[0]=a[0]+w|0,a[1]=a[1]+O|0,a[2]=a[2]+S|0,a[3]=a[3]+E|0},_doFinalize:function(){for(var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes,s=(t[n>>>5]|=128<<24-n%32,l.floor(r/4294967296)),s=(t[15+(64+n>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t[14+(64+n>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process(),this._hash),a=s.words,i=0;i<4;i++){var o=a[i];a[i]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}return s},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}}),t.MD5=n._createHelper(s),t.HmacMD5=n._createHmacHelper(s),e.MD5},"object"==typeof r?t.exports=r=s(e("./core")):s(n.CryptoJS)},{"./core":483}],489:[function(e,t,r){var n,s;n=this,s=function(e){var t,r,n,s,c;return r=(t=e).lib,n=r.WordArray,s=r.Hasher,r=t.algo,c=[],r=r.SHA1=s.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],s=r[1],a=r[2],i=r[3],o=r[4],l=0;l<80;l++){l<16?c[l]=0|e[t+l]:(u=c[l-3]^c[l-8]^c[l-14]^c[l-16],c[l]=u<<1|u>>>31);var u=(n<<5|n>>>27)+o+c[l];u+=l<20?1518500249+(s&a|~s&i):l<40?1859775393+(s^a^i):l<60?(s&a|s&i|a&i)-1894007588:(s^a^i)-899497514,o=i,i=a,a=s<<30|s>>>2,s=n,n=u}r[0]=r[0]+n|0,r[1]=r[1]+s|0,r[2]=r[2]+a|0,r[3]=r[3]+i|0,r[4]=r[4]+o|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(64+n>>>9<<4)]=Math.floor(r/4294967296),t[15+(64+n>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=s._createHelper(r),t.HmacSHA1=s._createHmacHelper(r),e.SHA1},"object"==typeof r?t.exports=r=s(e("./core")):s(n.CryptoJS)},{"./core":483}],490:[function(e,t,r){"use strict";var n="object"==typeof Reflect?Reflect:null,l=n&&"function"==typeof n.apply?n.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};var s=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)},a=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}t.exports=i,t.exports.once=function(o,l){return new Promise(function(e,t){function r(e){o.removeListener(l,n),t(e)}function n(){"function"==typeof o.removeListener&&o.removeListener("error",r),e([].slice.call(arguments))}var s,a,i;y(o,l,n,{once:!0}),"error"!==l&&(a=r,i={once:!0},"function"==typeof(s=o).on&&y(s,"error",a,i))})},(i.EventEmitter=i).prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){var s,a;return u(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener||r),s=e._events),a=s[t]),void 0===a?(a=s[t]=r,++e._eventsCount):("function"==typeof a?a=s[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),0<(s=c(e))&&a.length>s&&!a.warned&&(a.warned=!0,(n=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit")).name="MaxListenersExceededWarning",n.emitter=e,n.type=t,n.count=a.length,r=n,console&&console.warn&&console.warn(r))),e}function d(e,t,r){e={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},t=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}.bind(e);return t.listener=r,e.wrapFn=t}function p(e,t,r){e=e._events;if(void 0===e)return[];e=e[t];if(void 0===e)return[];if("function"==typeof e)return r?[e.listener||e]:[e];if(r){for(var n=e,s=new Array(n.length),a=0;a<s.length;++a)s[a]=n[a].listener||n[a];return s}return h(e,e.length)}function b(e){var t=this._events;if(void 0!==t){t=t[e];if("function"==typeof t)return 1;if(void 0!==t)return t.length}return 0}function h(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function y(r,n,s,a){if("function"==typeof r.on)a.once?r.once(n,s):r.on(n,s);else{if("function"!=typeof r.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r);r.addEventListener(n,function e(t){a.once&&r.removeEventListener(n,e),s(t)})}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,s=this._events;if(void 0!==s)n=n&&void 0===s.error;else if(!n)return!1;if(n){if((a=0<t.length?t[0]:a)instanceof Error)throw a;n=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw n.context=a,n}var a=s[e];if(void 0===a)return!1;if("function"==typeof a)l(a,this,t);else for(var i=a.length,o=h(a,i),r=0;r<i;++r)l(o[r],this,t);return!0},i.prototype.on=i.prototype.addListener=function(e,t){return f(this,e,t,!1)},i.prototype.prependListener=function(e,t){return f(this,e,t,!0)},i.prototype.once=function(e,t){return u(t),this.on(e,d(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,d(this,e,t)),this},i.prototype.off=i.prototype.removeListener=function(e,t){var r,n,s,a,i;if(u(t),void 0!==(n=this._events)&&void 0!==(r=n[e]))if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(s=-1,a=r.length-1;0<=a;a--)if(r[a]===t||r[a].listener===t){i=r[a].listener,s=a;break}if(s<0)return this;if(0===s)r.shift();else{for(var o=r,l=s;l+1<o.length;l++)o[l]=o[l+1];o.pop()}1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,i||t)}return this},i.prototype.removeAllListeners=function(e){var t,r=this._events;if(void 0!==r)if(void 0===r.removeListener)0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]);else if(0===arguments.length){for(var n,s=Object.keys(r),a=0;a<s.length;++a)"removeListener"!==(n=s[a])&&this.removeAllListeners(n);this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0}else if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(a=t.length-1;0<=a;a--)this.removeListener(e,t[a]);return this},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):b.call(e,t)},i.prototype.listenerCount=b,i.prototype.eventNames=function(){return 0<this._eventsCount?s(this._events):[]}},{}],491:[function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,s,a=[],i=!0,o=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){o=!0,s=e}finally{try{i||null==r.return||r.return()}finally{if(o)throw s}}return a}}(e,t)||function(e,t){var r;if(e)return"string"==typeof e?s(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(r){return new Promise(function(e,t){r.oncomplete=r.onsuccess=function(){return e(r.result)},r.onabort=r.onerror=function(){return t(r.error)}})}function i(e,n){var t=indexedDB.open(e),s=(t.onupgradeneeded=function(){return t.result.createObjectStore(n)},a(t));return function(t,r){return s.then(function(e){return r(e.transaction(n,t).objectStore(n))})}}var o;function l(){return o=o||i("keyval-store","keyval")}function u(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},a(e.transaction)}Object.defineProperty(r,"__esModule",{value:!0}),r.clear=function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:l())("readwrite",function(e){return e.clear(),a(e.transaction)})},r.createStore=i,r.del=function(t){return(1<arguments.length&&void 0!==arguments[1]?arguments[1]:l())("readwrite",function(e){return e.delete(t),a(e.transaction)})},r.delMany=function(e){return(1<arguments.length&&void 0!==arguments[1]?arguments[1]:l())("readwrite",function(t){return e.forEach(function(e){return t.delete(e)}),a(t.transaction)})},r.entries=function(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:l();return r("readonly",function(e){var t;return e.getAll&&e.getAllKeys?Promise.all([a(e.getAllKeys()),a(e.getAll())]).then(function(e){var e=n(e,2),t=e[0],r=e[1];return t.map(function(e,t){return[e,r[t]]})}):(t=[],r("readonly",function(e){return u(e,function(e){t.push([e.key,e.value])}).then(function(){return t})}))})},r.get=function(t){return(1<arguments.length&&void 0!==arguments[1]?arguments[1]:l())("readonly",function(e){return a(e.get(t))})},r.getMany=function(e){return(1<arguments.length&&void 0!==arguments[1]?arguments[1]:l())("readonly",function(t){return Promise.all(e.map(function(e){return a(t.get(e))}))})},r.keys=function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:l())("readonly",function(e){var t;return e.getAllKeys?a(e.getAllKeys()):(t=[],u(e,function(e){t.push(e.key)}).then(function(){return t}))})},r.promisifyRequest=a,r.set=function(t,r){return(2<arguments.length&&void 0!==arguments[2]?arguments[2]:l())("readwrite",function(e){return e.put(r,t),a(e.transaction)})},r.setMany=function(e){return(1<arguments.length&&void 0!==arguments[1]?arguments[1]:l())("readwrite",function(t){return e.forEach(function(e){return t.put(e[1],e[0])}),a(t.transaction)})},r.update=function(n,s){return(2<arguments.length&&void 0!==arguments[2]?arguments[2]:l())("readwrite",function(r){return new Promise(function(e,t){r.get(n).onsuccess=function(){try{r.put(s(this.result),n),e(a(r.transaction))}catch(e){t(e)}}})})},r.values=function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:l())("readonly",function(e){var t;return e.getAll?a(e.getAll()):(t=[],u(e,function(e){t.push(e.value)}).then(function(){return t}))})}},{}],492:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"MAX",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(r,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(r,"parse",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(r,"v1",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(r,"v1ToV6",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(r,"v3",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(r,"v4",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(r,"v5",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(r,"v6",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(r,"v6ToV1",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(r,"v7",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(r,"validate",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(r,"version",{enumerable:!0,get:function(){return y.default}});var n=m(e("./max.js")),s=m(e("./nil.js")),a=m(e("./parse.js")),i=m(e("./stringify.js")),o=m(e("./v1.js")),l=m(e("./v1ToV6.js")),u=m(e("./v3.js")),c=m(e("./v4.js")),f=m(e("./v5.js")),d=m(e("./v6.js")),p=m(e("./v6ToV1.js")),b=m(e("./v7.js")),h=m(e("./validate.js")),y=m(e("./version.js"));function m(e){return e&&e.__esModule?e:{default:e}}},{"./max.js":493,"./nil.js":496,"./parse.js":497,"./stringify.js":501,"./v1.js":502,"./v1ToV6.js":503,"./v3.js":504,"./v4.js":506,"./v5.js":507,"./v6.js":508,"./v6ToV1.js":509,"./v7.js":510,"./validate.js":511,"./version.js":512}],493:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default="ffffffff-ffff-ffff-ffff-ffffffffffff"},{}],494:[function(e,t,r){"use strict";function c(e){return 14+(e+64>>>9<<4)+1}function f(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function o(e,t,r,n,s,a){return f((t=f(f(t,e),f(n,a)))<<s|t>>>32-s,r)}function d(e,t,r,n,s,a,i){return o(t&r|~t&n,e,t,s,a,i)}function p(e,t,r,n,s,a,i){return o(t&n|r&~n,e,t,s,a,i)}function b(e,t,r,n,s,a,i){return o(t^r^n,e,t,s,a,i)}function h(e,t,r,n,s,a,i){return o(r^(t|~n),e,t,s,a,i)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(t){if("string"==typeof t){const s=unescape(encodeURIComponent(t));t=new Uint8Array(s.length);for(let e=0;e<s.length;++e)t[e]=s.charCodeAt(e)}{var r=function(t,e){t[e>>5]|=128<<e%32,t[c(e)-1]=e;let r=1732584193,n=-271733879,s=-1732584194,a=271733878;for(let e=0;e<t.length;e+=16){var i=r,o=n,l=s,u=a;r=d(r,n,s,a,t[e],7,-680876936),a=d(a,r,n,s,t[e+1],12,-389564586),s=d(s,a,r,n,t[e+2],17,606105819),n=d(n,s,a,r,t[e+3],22,-1044525330),r=d(r,n,s,a,t[e+4],7,-176418897),a=d(a,r,n,s,t[e+5],12,1200080426),s=d(s,a,r,n,t[e+6],17,-1473231341),n=d(n,s,a,r,t[e+7],22,-45705983),r=d(r,n,s,a,t[e+8],7,1770035416),a=d(a,r,n,s,t[e+9],12,-1958414417),s=d(s,a,r,n,t[e+10],17,-42063),n=d(n,s,a,r,t[e+11],22,-1990404162),r=d(r,n,s,a,t[e+12],7,1804603682),a=d(a,r,n,s,t[e+13],12,-40341101),s=d(s,a,r,n,t[e+14],17,-1502002290),n=d(n,s,a,r,t[e+15],22,1236535329),r=p(r,n,s,a,t[e+1],5,-165796510),a=p(a,r,n,s,t[e+6],9,-1069501632),s=p(s,a,r,n,t[e+11],14,643717713),n=p(n,s,a,r,t[e],20,-373897302),r=p(r,n,s,a,t[e+5],5,-701558691),a=p(a,r,n,s,t[e+10],9,38016083),s=p(s,a,r,n,t[e+15],14,-660478335),n=p(n,s,a,r,t[e+4],20,-405537848),r=p(r,n,s,a,t[e+9],5,568446438),a=p(a,r,n,s,t[e+14],9,-1019803690),s=p(s,a,r,n,t[e+3],14,-187363961),n=p(n,s,a,r,t[e+8],20,1163531501),r=p(r,n,s,a,t[e+13],5,-1444681467),a=p(a,r,n,s,t[e+2],9,-51403784),s=p(s,a,r,n,t[e+7],14,1735328473),n=p(n,s,a,r,t[e+12],20,-1926607734),r=b(r,n,s,a,t[e+5],4,-378558),a=b(a,r,n,s,t[e+8],11,-2022574463),s=b(s,a,r,n,t[e+11],16,1839030562),n=b(n,s,a,r,t[e+14],23,-35309556),r=b(r,n,s,a,t[e+1],4,-1530992060),a=b(a,r,n,s,t[e+4],11,1272893353),s=b(s,a,r,n,t[e+7],16,-155497632),n=b(n,s,a,r,t[e+10],23,-1094730640),r=b(r,n,s,a,t[e+13],4,681279174),a=b(a,r,n,s,t[e],11,-358537222),s=b(s,a,r,n,t[e+3],16,-722521979),n=b(n,s,a,r,t[e+6],23,76029189),r=b(r,n,s,a,t[e+9],4,-640364487),a=b(a,r,n,s,t[e+12],11,-421815835),s=b(s,a,r,n,t[e+15],16,530742520),n=b(n,s,a,r,t[e+2],23,-995338651),r=h(r,n,s,a,t[e],6,-198630844),a=h(a,r,n,s,t[e+7],10,1126891415),s=h(s,a,r,n,t[e+14],15,-1416354905),n=h(n,s,a,r,t[e+5],21,-57434055),r=h(r,n,s,a,t[e+12],6,1700485571),a=h(a,r,n,s,t[e+3],10,-1894986606),s=h(s,a,r,n,t[e+10],15,-1051523),n=h(n,s,a,r,t[e+1],21,-2054922799),r=h(r,n,s,a,t[e+8],6,1873313359),a=h(a,r,n,s,t[e+15],10,-30611744),s=h(s,a,r,n,t[e+6],15,-1560198380),n=h(n,s,a,r,t[e+13],21,1309151649),r=h(r,n,s,a,t[e+4],6,-145523070),a=h(a,r,n,s,t[e+11],10,-1120210379),s=h(s,a,r,n,t[e+2],15,718787259),n=h(n,s,a,r,t[e+9],21,-343485551),r=f(r,i),n=f(n,o),s=f(s,l),a=f(a,u)}return[r,n,s,a]}(function(t){if(0===t.length)return[];const r=8*t.length,n=new Uint32Array(c(r));for(let e=0;e<r;e+=8)n[e>>5]|=(255&t[e/8])<<e%32;return n}(t),8*t.length);const a=[],i=32*r.length,o="0123456789abcdef";for(let e=0;e<i;e+=8){var n=r[e>>5]>>>e%32&255,n=parseInt(o.charAt(n>>>4&15)+o.charAt(15&n),16);a.push(n)}return a}}},{}],495:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);r.default={randomUUID:n}},{}],496:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default="00000000-0000-0000-0000-000000000000"},{}],497:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(e=e("./validate.js"))&&e.__esModule?e:{default:e};r.default=function(e){if(!(0,n.default)(e))throw TypeError("Invalid UUID");var t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}},{"./validate.js":511}],498:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},{}],499:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(s)};let n;const s=new Uint8Array(16)},{}],500:[function(e,t,r){"use strict";function f(e,t){return e<<t|e>>>32-t}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(r){var o=[1518500249,1859775393,2400959708,3395469782];const e=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){const s=unescape(encodeURIComponent(r));r=[];for(let e=0;e<s.length;++e)r.push(s.charCodeAt(e))}else Array.isArray(r)||(r=Array.prototype.slice.call(r));r.push(128);var t=r.length/4+2,n=Math.ceil(t/16);const l=new Array(n);for(let t=0;t<n;++t){const a=new Uint32Array(16);for(let e=0;e<16;++e)a[e]=r[64*t+4*e]<<24|r[64*t+4*e+1]<<16|r[64*t+4*e+2]<<8|r[64*t+4*e+3];l[t]=a}l[n-1][14]=8*(r.length-1)/Math.pow(2,32),l[n-1][14]=Math.floor(l[n-1][14]),l[n-1][15]=8*(r.length-1)&4294967295;for(let i=0;i<n;++i){const c=new Uint32Array(80);for(let e=0;e<16;++e)c[e]=l[i][e];for(let e=16;e<80;++e)c[e]=f(c[e-3]^c[e-8]^c[e-14]^c[e-16],1);let t=e[0],r=e[1],n=e[2],s=e[3],a=e[4];for(let e=0;e<80;++e){var u=Math.floor(e/20),u=f(t,5)+function(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}(u,r,n,s)+a+o[u]+c[e]>>>0;a=s,s=n,n=f(r,30)>>>0,r=t,t=u}e[0]=e[0]+t>>>0,e[1]=e[1]+r>>>0,e[2]=e[2]+n>>>0,e[3]=e[3]+s>>>0,e[4]=e[4]+a>>>0}return[e[0]>>24&255,e[0]>>16&255,e[0]>>8&255,255&e[0],e[1]>>24&255,e[1]>>16&255,e[1]>>8&255,255&e[1],e[2]>>24&255,e[2]>>16&255,e[2]>>8&255,255&e[2],e[3]>>24&255,e[3]>>16&255,e[3]>>8&255,255&e[3],e[4]>>24&255,e[4]>>16&255,e[4]>>8&255,255&e[4]]}},{}],501:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.unsafeStringify=a;var n=(e=e("./validate.js"))&&e.__esModule?e:{default:e};const s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function a(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}r.default=function(e,t=0){if(e=a(e,t),(0,n.default)(e))return e;throw TypeError("Stringified UUID is invalid")}},{"./validate.js":511}],502:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,u=(n=e("./rng.js"))&&n.__esModule?n:{default:n},c=e("./stringify.js");let f,d,p=0,b=0;r.default=function(e,t,r){var n=t&&r||0;const s=t||new Array(16);let a=(e=e||{}).node,i=e.clockseq,o=(e._v6||(a=a||f,null==i&&(i=d)),null!=a&&null!=i||(r=e.random||(e.rng||u.default)(),null==a&&(a=[r[0],r[1],r[2],r[3],r[4],r[5]],f||e._v6||(a[0]|=1,f=a)),null==i&&(i=16383&(r[6]<<8|r[7]),void 0!==d||e._v6||(d=i))),void 0!==e.msecs?e.msecs:Date.now()),l=void 0!==e.nsecs?e.nsecs:b+1;if((r=o-p+(l-b)/1e4)<0&&void 0===e.clockseq&&(i=i+1&16383),1e4<=(l=(r<0||o>p)&&void 0===e.nsecs?0:l))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=o,b=l,d=i,r=(1e4*(268435455&(o+=122192928e5))+l)%4294967296,s[n++]=r>>>24&255,s[n++]=r>>>16&255,s[n++]=r>>>8&255,s[n++]=255&r,e=o/4294967296*1e4&268435455,s[n++]=e>>>8&255,s[n++]=255&e,s[n++]=e>>>24&15|16,s[n++]=e>>>16&255,s[n++]=i>>>8|128,s[n++]=255&i;for(let e=0;e<6;++e)s[n+e]=a[e];return t||(0,c.unsafeStringify)(s)}},{"./rng.js":499,"./stringify.js":501}],503:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){var t="string"==typeof e?(0,n.default)(e):e,t=function(e){return Uint8Array.of((15&e[6])<<4|e[7]>>4&15,(15&e[7])<<4|(240&e[4])>>4,(15&e[4])<<4|(240&e[5])>>4,(15&e[5])<<4|(240&e[0])>>4,(15&e[0])<<4|(240&e[1])>>4,(15&e[1])<<4|(240&e[2])>>4,96|15&e[2],e[3],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}(t);return"string"==typeof e?(0,s.unsafeStringify)(t):t};var n=(r=e("./parse.js"))&&r.__esModule?r:{default:r},s=e("./stringify.js")},{"./parse.js":497,"./stringify.js":501}],504:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=s(e("./v35.js")),e=s(e("./md5.js"));function s(e){return e&&e.__esModule?e:{default:e}}n=(0,n.default)("v3",48,e.default);r.default=n},{"./md5.js":494,"./v35.js":505}],505:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.URL=r.DNS=void 0,r.default=function(e,i,o){function t(e,t,r,n){var s;if("string"==typeof e&&(e=function(t){t=unescape(encodeURIComponent(t));const r=[];for(let e=0;e<t.length;++e)r.push(t.charCodeAt(e));return r}(e)),16!==(null==(s=t="string"==typeof t?(0,u.default)(t):t)?void 0:s.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(t),a.set(e,t.length),(a=o(a))[6]=15&a[6]|i,a[8]=63&a[8]|128,r){n=n||0;for(let e=0;e<16;++e)r[n+e]=a[e];return r}return(0,l.unsafeStringify)(a)}try{t.name=e}catch(e){}return t.DNS=n,t.URL=s,t};var l=e("./stringify.js"),u=(e=e("./parse.js"))&&e.__esModule?e:{default:e};const n=r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",s=r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8"},{"./parse.js":497,"./stringify.js":501}],506:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=n(e("./native.js")),a=n(e("./rng.js")),i=e("./stringify.js");function n(e){return e&&e.__esModule?e:{default:e}}r.default=function(e,t,r){if(s.default.randomUUID&&!t&&!e)return s.default.randomUUID();const n=(e=e||{}).random||(e.rng||a.default)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return(0,i.unsafeStringify)(n)}},{"./native.js":495,"./rng.js":499,"./stringify.js":501}],507:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=s(e("./v35.js")),e=s(e("./sha1.js"));function s(e){return e&&e.__esModule?e:{default:e}}n=(0,n.default)("v5",80,e.default);r.default=n},{"./sha1.js":500,"./v35.js":505}],508:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e={},t,r=0){var n=(0,a.default)({...e,_v6:!0},new Uint8Array(16));if(n=(0,i.default)(n),t){for(let e=0;e<16;e++)t[r+e]=n[e];return t}return(0,s.unsafeStringify)(n)};var s=e("./stringify.js"),a=n(e("./v1.js")),i=n(e("./v1ToV6.js"));function n(e){return e&&e.__esModule?e:{default:e}}},{"./stringify.js":501,"./v1.js":502,"./v1ToV6.js":503}],509:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){var t="string"==typeof e?(0,n.default)(e):e,t=function(e){return Uint8Array.of((15&e[3])<<4|e[4]>>4&15,(15&e[4])<<4|(240&e[5])>>4,(15&e[5])<<4|15&e[6],e[7],(15&e[1])<<4|(240&e[2])>>4,(15&e[2])<<4|(240&e[3])>>4,16|(240&e[0])>>4,(15&e[0])<<4|(240&e[1])>>4,e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}(t);return"string"==typeof e?(0,s.unsafeStringify)(t):t};var n=(r=e("./parse.js"))&&r.__esModule?r:{default:r},s=e("./stringify.js")},{"./parse.js":497,"./stringify.js":501}],510:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,u=(n=e("./rng.js"))&&n.__esModule?n:{default:n},c=e("./stringify.js");let f=null,d=null,p=0;r.default=function(e,t,r){e=e||{},r=t&&r||0;const n=t||new Uint8Array(16);var s=e.random||(e.rng||u.default)(),a=void 0!==e.msecs?e.msecs:Date.now();let i=void 0!==e.seq?e.seq:null,o=d,l=f;return a>p&&void 0===e.msecs&&(p=a,null!==i&&(o=null,l=null)),null!==i&&(2147483647<i&&(i=2147483647),o=i>>>19&4095,l=524287&i),null!==o&&null!==l||(o=(o=127&s[6])<<8|s[7],l=(l=(l=63&s[8])<<8|s[9])<<5|s[10]>>>3),a+1e4>p&&null===i?524287<++l&&(l=0,4095<++o&&(o=0,p++)):p=a,d=o,f=l,n[r++]=p/1099511627776&255,n[r++]=p/4294967296&255,n[r++]=p/16777216&255,n[r++]=p/65536&255,n[r++]=p/256&255,n[r++]=255&p,n[r++]=o>>>4&15|112,n[r++]=255&o,n[r++]=l>>>13&63|128,n[r++]=l>>>5&255,n[r++]=l<<3&255|7&s[10],n[r++]=s[11],n[r++]=s[12],n[r++]=s[13],n[r++]=s[14],n[+r]=s[15],t||(0,c.unsafeStringify)(n)}},{"./rng.js":499,"./stringify.js":501}],511:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(e=e("./regex.js"))&&e.__esModule?e:{default:e};r.default=function(e){return"string"==typeof e&&n.default.test(e)}},{"./regex.js":498}],512:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=(e=e("./validate.js"))&&e.__esModule?e:{default:e};r.default=function(e){if((0,n.default)(e))return parseInt(e.slice(14,15),16);throw TypeError("Invalid UUID")}},{"./validate.js":511}],513:[function(e,t,r){"use strict";t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},{}]},{},[20])(20)});
|
|
1
|
+
!function(e){"function"==typeof define&&define.amd?define(["xmlhttprequest"],e):e()}((function(){"use strict";function _mergeNamespaces(e,t){for(var r=0;r<t.length;r++){const i=t[r];if("string"!=typeof i&&!Array.isArray(i))for(const t in i)if("default"!==t&&!(t in e)){const r=Object.getOwnPropertyDescriptor(i,t);r&&Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>i[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function getDefaultExportFromCjs$1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var browser$e={exports:{}},process=browser$e.exports={},cachedSetTimeout,cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,runClearTimeout(e)}}function Item(e,t){this.fun=e,this.array=t}function noop(){}process.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];queue.push(new Item(e,t)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(e){return[]},process.binding=function(e){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(e){throw new Error("process.chdir is not supported")},process.umask=function(){return 0};var browserExports$1=browser$e.exports;const process$1=getDefaultExportFromCjs$1(browserExports$1),config={IS_NODE:void 0!==process$1&&!!process$1.versions&&!!process$1.versions.node&&!process$1.versions.electron,REQUEST_ATTEMPT_LIMIT:5,REQUEST_BATCH_SIZE:20,REQUEST_HEADERS:{},SERVER_URL:"https://api.parse.com/1",SERVER_AUTH_TYPE:null,SERVER_AUTH_TOKEN:null,LIVEQUERY_SERVER_URL:null,ENCRYPTED_KEY:null,VERSION:"js6.2.0-alpha.3",APPLICATION_ID:null,JAVASCRIPT_KEY:null,MAINTENANCE_KEY:null,MASTER_KEY:null,USE_MASTER_KEY:!1,PERFORM_USER_REWRITE:!0,FORCE_REVOCABLE_SESSION:!1,ENCRYPTED_USER:!1,IDEMPOTENCY:!1,ALLOW_CUSTOM_OBJECT_ID:!1,PARSE_ERRORS:[]};function requireMethods(e,t,r){t.forEach((t=>{if("function"!=typeof r[t])throw new Error(`${e} must implement ${t}()`)}))}const CoreManager={get:function(e){if(Object.hasOwn(config,e))return config[e];throw new Error("Configuration key not found: "+e)},set:function(e,t){config[e]=t},setIfNeeded:function(e,t){return Object.hasOwn(config,e)||(config[e]=t),config[e]},setAnalyticsController(e){requireMethods("AnalyticsController",["track"],e),config.AnalyticsController=e},getAnalyticsController:()=>config.AnalyticsController,setCloudController(e){requireMethods("CloudController",["run","getJobsData","startJob"],e),config.CloudController=e},getCloudController:()=>config.CloudController,setConfigController(e){requireMethods("ConfigController",["current","get","save"],e),config.ConfigController=e},getConfigController:()=>config.ConfigController,setCryptoController(e){requireMethods("CryptoController",["encrypt","decrypt"],e),config.CryptoController=e},getCryptoController:()=>config.CryptoController,setEventEmitter(e){config.EventEmitter=e},getEventEmitter:()=>config.EventEmitter,setFileController(e){requireMethods("FileController",["saveFile","saveBase64"],e),config.FileController=e},setEventuallyQueue(e){requireMethods("EventuallyQueue",["poll","save","destroy"],e),config.EventuallyQueue=e},getEventuallyQueue:()=>config.EventuallyQueue,getFileController:()=>config.FileController,setInstallationController(e){requireMethods("InstallationController",["currentInstallationId","currentInstallation","updateInstallationOnDisk"],e),config.InstallationController=e},getInstallationController:()=>config.InstallationController,setLiveQuery(e){config.LiveQuery=e},getLiveQuery:()=>config.LiveQuery,setObjectController(e){requireMethods("ObjectController",["save","fetch","destroy"],e),config.ObjectController=e},getObjectController:()=>config.ObjectController,setObjectStateController(e){requireMethods("ObjectStateController",["getState","initializeState","removeState","getServerData","setServerData","getPendingOps","setPendingOp","pushPendingState","popPendingState","mergeFirstPendingState","getObjectCache","estimateAttribute","estimateAttributes","commitServerChanges","enqueueTask","clearAllState"],e),config.ObjectStateController=e},getObjectStateController:()=>config.ObjectStateController,setPushController(e){requireMethods("PushController",["send"],e),config.PushController=e},getPushController:()=>config.PushController,setQueryController(e){requireMethods("QueryController",["find","aggregate"],e),config.QueryController=e},getQueryController:()=>config.QueryController,setRESTController(e){requireMethods("RESTController",["request","ajax"],e),config.RESTController=e},getRESTController:()=>config.RESTController,setSchemaController(e){requireMethods("SchemaController",["get","create","update","delete","send","purge"],e),config.SchemaController=e},getSchemaController:()=>config.SchemaController,setSessionController(e){requireMethods("SessionController",["getSession"],e),config.SessionController=e},getSessionController:()=>config.SessionController,setStorageController(e){e.async?requireMethods("An async StorageController",["getItemAsync","setItemAsync","removeItemAsync","getAllKeysAsync"],e):requireMethods("A synchronous StorageController",["getItem","setItem","removeItem","getAllKeys"],e),config.StorageController=e},setLocalDatastoreController(e){requireMethods("LocalDatastoreController",["pinWithName","fromPinWithName","unPinWithName","getAllContents","clear"],e),config.LocalDatastoreController=e},getLocalDatastoreController:()=>config.LocalDatastoreController,setLocalDatastore(e){config.LocalDatastore=e},getLocalDatastore:()=>config.LocalDatastore,getStorageController:()=>config.StorageController,setAsyncStorage(e){config.AsyncStorage=e},getAsyncStorage:()=>config.AsyncStorage,setWebSocketController(e){config.WebSocketController=e},getWebSocketController:()=>config.WebSocketController,setUserController(e){requireMethods("UserController",["setCurrentUser","currentUser","currentUserAsync","signUp","logIn","become","logOut","me","requestPasswordReset","upgradeToRevocableSession","requestEmailVerification","verifyPassword","linkWith"],e),config.UserController=e},getUserController:()=>config.UserController,setLiveQueryController(e){requireMethods("LiveQueryController",["setDefaultLiveQueryClient","getDefaultLiveQueryClient","_clearCachedDefaultClient"],e),config.LiveQueryController=e},getLiveQueryController:()=>config.LiveQueryController,setHooksController(e){requireMethods("HooksController",["create","get","update","remove"],e),config.HooksController=e},getHooksController:()=>config.HooksController,setParseOp(e){config.ParseOp=e},getParseOp:()=>config.ParseOp,setParseObject(e){config.ParseObject=e},getParseObject:()=>config.ParseObject,setParseQuery(e){config.ParseQuery=e},getParseQuery:()=>config.ParseQuery,setParseRole(e){config.ParseRole=e},getParseRole:()=>config.ParseRole,setParseUser(e){config.ParseUser=e},getParseUser:()=>config.ParseUser};var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var httpsBrowserify={exports:{}},streamHttp={},buffer$1={},base64Js={};base64Js.byteLength=byteLength,base64Js.toByteArray=toByteArray,base64Js.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i$1=0,len=code.length;i$1<len;++i$1)lookup[i$1]=code[i$1],revLookup[code.charCodeAt(i$1)]=i$1;function getLens(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function byteLength(e){var t=getLens(e),r=t[0],i=t[1];return 3*(r+i)/4-i}function _byteLength(e,t,r){return 3*(t+r)/4-r}function toByteArray(e){var t,r,i=getLens(e),n=i[0],o=i[1],s=new Arr(_byteLength(e,n,o)),a=0,u=o>0?n-4:n;for(r=0;r<u;r+=4)t=revLookup[e.charCodeAt(r)]<<18|revLookup[e.charCodeAt(r+1)]<<12|revLookup[e.charCodeAt(r+2)]<<6|revLookup[e.charCodeAt(r+3)],s[a++]=t>>16&255,s[a++]=t>>8&255,s[a++]=255&t;return 2===o&&(t=revLookup[e.charCodeAt(r)]<<2|revLookup[e.charCodeAt(r+1)]>>4,s[a++]=255&t),1===o&&(t=revLookup[e.charCodeAt(r)]<<10|revLookup[e.charCodeAt(r+1)]<<4|revLookup[e.charCodeAt(r+2)]>>2,s[a++]=t>>8&255,s[a++]=255&t),s}function tripletToBase64(e){return lookup[e>>18&63]+lookup[e>>12&63]+lookup[e>>6&63]+lookup[63&e]}function encodeChunk(e,t,r){for(var i,n=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),n.push(tripletToBase64(i));return n.join("")}function fromByteArray(e){for(var t,r=e.length,i=r%3,n=[],o=16383,s=0,a=r-i;s<a;s+=o)n.push(encodeChunk(e,s,s+o>a?a:s+o));return 1===i?(t=e[r-1],n.push(lookup[t>>2]+lookup[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],n.push(lookup[t>>10]+lookup[t>>4&63]+lookup[t<<2&63]+"=")),n.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63;var ieee754={read:function(e,t,r,i,n){var o,s,a=8*n-i-1,u=(1<<a)-1,h=u>>1,f=-7,l=r?n-1:0,c=r?-1:1,d=e[t+l];for(l+=c,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+e[t+l],l+=c,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=i;f>0;s=256*s+e[t+l],l+=c,f-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,i),o-=h}return(d?-1:1)*s*Math.pow(2,o-i)},write:function(e,t,r,i,n,o){var s,a,u,h=8*o-n-1,f=(1<<h)-1,l=f>>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,p=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+l>=1?c/u:c*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(t*u-1)*Math.pow(2,n),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,n),s=0));n>=8;e[r+d]=255&a,d+=p,a/=256,n-=8);for(s=s<<n|a,h+=n;h>0;e[r+d]=255&s,d+=p,s/=256,h-=8);e[r+d-p]|=128*m}};!function(e){const t=base64Js,r=ieee754,i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=h,e.SlowBuffer=function(e){+e!=e&&(e=0);return h.alloc(+e)},e.INSPECT_MAX_BYTES=50;const n=2147483647;e.kMaxLength=n;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;function u(e){if(e>n)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new o(e);return Object.setPrototypeOf(t,h.prototype),t}function h(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return f(e,t,r)}function f(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!h.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let i=u(r);const n=i.write(e,t);n!==r&&(i=i.slice(0,n));return i}(e,t);if(s.isView(e))return function(e){if(Q(e,o)){const t=new o(e);return p(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Q(e,s)||e&&Q(e.buffer,s))return p(e,t,r);if(void 0!==a&&(Q(e,a)||e&&Q(e.buffer,a)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return h.from(i,t,r);const n=function(e){if(h.isBuffer(e)){const t=0|m(e.length),r=u(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||Z(e.length)?u(0):d(e);if("Buffer"===e.type&&Array.isArray(e.data))return d(e.data)}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return h.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return l(e),u(e<0?0:0|m(e))}function d(e){const t=e.length<0?0:0|m(e.length),r=u(t);for(let i=0;i<t;i+=1)r[i]=255&e[i];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let i;return i=void 0===t&&void 0===r?new o(e):void 0===r?new o(e,t):new o(e,t,r),Object.setPrototypeOf(i,h.prototype),i}function m(e){if(e>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function g(e,t){if(h.isBuffer(e))return e.length;if(s.isView(e)||Q(e,s))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(e).length;default:if(n)return i?-1:G(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return q(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function b(e,t,r){const i=e[t];e[t]=e[r],e[r]=i}function v(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Z(r=+r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=h.from(t,i)),h.isBuffer(t))return 0===t.length?-1:w(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof o.prototype.indexOf?n?o.prototype.indexOf.call(e,t,r):o.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,i,n){let o,s=1,a=e.length,u=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function h(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(n){let i=-1;for(o=r;o<a;o++)if(h(e,o)===h(t,-1===i?0:o-i)){if(-1===i&&(i=o),o-i+1===u)return i*s}else-1!==i&&(o-=o-i),i=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let i=0;i<u;i++)if(h(e,o+i)!==h(t,i)){r=!1;break}if(r)return o}return-1}function _(e,t,r,i){r=Number(r)||0;const n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;const o=t.length;let s;for(i>o/2&&(i=o/2),s=0;s<i;++s){const i=parseInt(t.substr(2*s,2),16);if(Z(i))return s;e[r+s]=i}return s}function M(e,t,r,i){return J(G(t,e.length-r),e,r,i)}function S(e,t,r,i){return J(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,i)}function E(e,t,r,i){return J(V(t),e,r,i)}function R(e,t,r,i){return J(function(e,t){let r,i,n;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),i=r>>8,n=r%256,o.push(n),o.push(i);return o}(t,e.length-r),e,r,i)}function q(e,r,i){return 0===r&&i===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,i))}function A(e,t,r){r=Math.min(e.length,r);const i=[];let n=t;for(;n<r;){const t=e[n];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(n+s<=r){let r,i,a,u;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[n+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[n+1],i=e[n+2],128==(192&r)&&128==(192&i)&&(u=(15&t)<<12|(63&r)<<6|63&i,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[n+1],i=e[n+2],a=e[n+3],128==(192&r)&&128==(192&i)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&i)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),n+=s}return function(e){const t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);let r="",i=0;for(;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=C));return r}(i)}h.TYPED_ARRAY_SUPPORT=function(){try{const e=new o(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,o.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),h.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=function(e,t,r){return f(e,t,r)},Object.setPrototypeOf(h.prototype,o.prototype),Object.setPrototypeOf(h,o),h.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?u(e):void 0!==t?"string"==typeof r?u(e).fill(t,r):u(e).fill(t):u(e)}(e,t,r)},h.allocUnsafe=function(e){return c(e)},h.allocUnsafeSlow=function(e){return c(e)},h.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==h.prototype},h.compare=function(e,t){if(Q(e,o)&&(e=h.from(e,e.offset,e.byteLength)),Q(t,o)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(e)||!h.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,i=t.length;for(let n=0,o=Math.min(r,i);n<o;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0},h.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return h.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const i=h.allocUnsafe(t);let n=0;for(r=0;r<e.length;++r){let t=e[r];if(Q(t,o))n+t.length>i.length?(h.isBuffer(t)||(t=h.from(t)),t.copy(i,n)):o.prototype.set.call(i,t,n);else{if(!h.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,n)}n+=t.length}return i},h.byteLength=g,h.prototype._isBuffer=!0,h.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)b(this,t,t+1);return this},h.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},h.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},h.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):y.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(e){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===h.compare(this,e)},h.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},i&&(h.prototype[i]=h.prototype.inspect),h.prototype.compare=function(e,t,r,i,n){if(Q(e,o)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(n>>>=0)-(i>>>=0),a=(r>>>=0)-(t>>>=0);const u=Math.min(s,a),f=this.slice(i,n),l=e.slice(t,r);for(let e=0;e<u;++e)if(f[e]!==l[e]){s=f[e],a=l[e];break}return s<a?-1:a<s?1:0},h.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},h.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},h.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},h.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}const n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let o=!1;for(;;)switch(i){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return M(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function P(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}function I(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function O(e,t,r){const i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);let n="";for(let i=t;i<r;++i)n+=Y[e[i]];return n}function B(e,t,r){const i=e.slice(t,r);let n="";for(let e=0;e<i.length-1;e+=2)n+=String.fromCharCode(i[e]+256*i[e+1]);return n}function k(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,r,i,n,o){if(!h.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function x(e,t,r,i,n){z(t,i,n,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function N(e,t,r,i,n){z(t,i,n,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function j(e,t,r,i,n,o){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function $(e,t,i,n,o){return t=+t,i>>>=0,o||j(e,0,i,4),r.write(e,t,i,n,23,4),i+4}function D(e,t,i,n,o){return t=+t,i>>>=0,o||j(e,0,i,8),r.write(e,t,i,n,52,8),i+8}h.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const i=this.subarray(e,t);return Object.setPrototypeOf(i,h.prototype),i},h.prototype.readUintLE=h.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);let i=this[e],n=1,o=0;for(;++o<t&&(n*=256);)i+=this[e+o]*n;return i},h.prototype.readUintBE=h.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);let i=this[e+--t],n=1;for(;t>0&&(n*=256);)i+=this[e+--t]*n;return i},h.prototype.readUint8=h.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readBigUInt64LE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const i=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,n=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(i)+(BigInt(n)<<BigInt(32))})),h.prototype.readBigUInt64BE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const i=t*2**24+65536*this[++e]+256*this[++e]+this[++e],n=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(i)<<BigInt(32))+BigInt(n)})),h.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);let i=this[e],n=1,o=0;for(;++o<t&&(n*=256);)i+=this[e+o]*n;return n*=128,i>=n&&(i-=Math.pow(2,8*t)),i},h.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);let i=t,n=1,o=this[e+--i];for(;i>0&&(n*=256);)o+=this[e+--i]*n;return n*=128,o>=n&&(o-=Math.pow(2,8*t)),o},h.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},h.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readBigInt64LE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const i=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),h.prototype.readBigInt64BE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const i=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),h.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),r.read(this,e,!0,23,4)},h.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),r.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),r.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),r.read(this,e,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(e,t,r,i){if(e=+e,t>>>=0,r>>>=0,!i){T(this,e,t,r,Math.pow(2,8*r)-1,0)}let n=1,o=0;for(this[t]=255&e;++o<r&&(n*=256);)this[t+o]=e/n&255;return t+r},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(e,t,r,i){if(e=+e,t>>>=0,r>>>=0,!i){T(this,e,t,r,Math.pow(2,8*r)-1,0)}let n=r-1,o=1;for(this[t+n]=255&e;--n>=0&&(o*=256);)this[t+n]=e/o&255;return t+r},h.prototype.writeUint8=h.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,255,0),this[t]=255&e,t+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},h.prototype.writeBigUInt64LE=X((function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),h.prototype.writeBigUInt64BE=X((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),h.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*r-1);T(this,e,t,r,i-1,-i)}let n=0,o=1,s=0;for(this[t]=255&e;++n<r&&(o*=256);)e<0&&0===s&&0!==this[t+n-1]&&(s=1),this[t+n]=(e/o|0)-s&255;return t+r},h.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*r-1);T(this,e,t,r,i-1,-i)}let n=r-1,o=1,s=0;for(this[t+n]=255&e;--n>=0&&(o*=256);)e<0&&0===s&&0!==this[t+n+1]&&(s=1),this[t+n]=(e/o|0)-s&255;return t+r},h.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},h.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},h.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},h.prototype.writeBigInt64LE=X((function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),h.prototype.writeBigInt64BE=X((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),h.prototype.writeFloatLE=function(e,t,r){return $(this,e,t,!0,r)},h.prototype.writeFloatBE=function(e,t,r){return $(this,e,t,!1,r)},h.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},h.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},h.prototype.copy=function(e,t,r,i){if(!h.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);const n=i-r;return this===e&&"function"==typeof o.prototype.copyWithin?this.copyWithin(t,r,i):o.prototype.set.call(e,this.subarray(r,i),t),n},h.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!h.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){const t=e.charCodeAt(0);("utf8"===i&&t<128||"latin1"===i)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let n;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n<r;++n)this[n]=e;else{const o=h.isBuffer(e)?e:h.from(e,i),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<r-t;++n)this[n+t]=o[n%s]}return this};const U={};function L(e,t,r){U[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function F(e){let t="",r=e.length;const i="-"===e[0]?1:0;for(;r>=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function z(e,t,r,i,n,o){if(e>r||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`,new U.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||K(t,e.length-(r+1))}(i,n,o)}function H(e,t){if("number"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function K(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new U.ERR_OUT_OF_RANGE("offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,e)}L("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),L("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),L("ERR_OUT_OF_RANGE",(function(e,t,r){let i=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=F(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=F(n)),n+="n"),i+=` It must be ${t}. Received ${n}`,i}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const i=e.length;let n=null;const o=[];for(let s=0;s<i;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function V(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,r,i){let n;for(n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function Q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const i=16*r;for(let n=0;n<16;++n)t[i+n]=e[r]+e[n]}return t}();function X(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}}(buffer$1);const Buffer=buffer$1.Buffer;var request={exports:{}},capability={},hasRequiredCapability;function requireCapability(){return hasRequiredCapability||(hasRequiredCapability=1,function(e){var t;function r(){if(void 0!==t)return t;if(commonjsGlobal.XMLHttpRequest){t=new commonjsGlobal.XMLHttpRequest;try{t.open("GET",commonjsGlobal.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null;return t}function i(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function n(e){return"function"==typeof e}e.fetch=n(commonjsGlobal.fetch)&&n(commonjsGlobal.ReadableStream),e.writableStream=n(commonjsGlobal.WritableStream),e.abortController=n(commonjsGlobal.AbortController),e.arraybuffer=e.fetch||i("arraybuffer"),e.msstream=!e.fetch&&i("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&i("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!r()&&n(r().overrideMimeType),t=null}(capability)),capability}var inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,"function"==typeof Object.create?inherits_browser.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),inherits_browser.exports}var response={},readableBrowser$1={exports:{}},events$1={exports:{}},hasRequiredEvents,streamBrowser$1,hasRequiredStreamBrowser$1;function requireEvents(){if(hasRequiredEvents)return events$1.exports;hasRequiredEvents=1;var e,t="object"==typeof Reflect?Reflect:null,r=t&&"function"==typeof t.apply?t.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function n(){n.init.call(this)}events$1.exports=n,events$1.exports.once=function(e,t){return new Promise((function(r,i){function n(r){e.removeListener(t,o),i(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",n),r([].slice.call(arguments))}p(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&p(e,"error",t,r)}(e,n,{once:!0})}))},n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function a(e){return void 0===e._maxListeners?n.defaultMaxListeners:e._maxListeners}function u(e,t,r,i){var n,o,u,h;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),u=o[t]),void 0===u)u=o[t]=r,++e._eventsCount;else if("function"==typeof u?u=o[t]=i?[r,u]:[u,r]:i?u.unshift(r):u.push(r),(n=a(e))>0&&u.length>n&&!u.warned){u.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=u.length,h=f,console&&console.warn&&console.warn(h)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=h.bind(i);return n.listener=r,i.wrapFn=n,n}function l(e,t,r){var i=e._events;if(void 0===i)return[];var n=i[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(n):d(n,n.length)}function c(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function d(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function p(e,t,r,i){if("function"==typeof e.on)i.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function n(o){i.once&&e.removeEventListener(t,n),r(o)}))}}return Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),n.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},n.prototype.getMaxListeners=function(){return a(this)},n.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var h=u.length,f=d(u,h);for(i=0;i<h;++i)r(f[i],this,t)}return!0},n.prototype.addListener=function(e,t){return u(this,e,t,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(e,t){return u(this,e,t,!0)},n.prototype.once=function(e,t){return s(t),this.on(e,f(this,e,t)),this},n.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,f(this,e,t)),this},n.prototype.removeListener=function(e,t){var r,i,n,o,a;if(s(t),void 0===(i=this._events))return this;if(void 0===(r=i[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(n=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,n=o;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,n),1===r.length&&(i[e]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",e,a||t)}return this},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(e){var t,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var n,o=Object.keys(r);for(i=0;i<o.length;++i)"removeListener"!==(n=o[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},n.prototype.listeners=function(e){return l(this,e,!0)},n.prototype.rawListeners=function(e){return l(this,e,!1)},n.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):c.call(e,t)},n.prototype.listenerCount=c,n.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},events$1.exports}function requireStreamBrowser$1(){return hasRequiredStreamBrowser$1?streamBrowser$1:(hasRequiredStreamBrowser$1=1,streamBrowser$1=requireEvents().EventEmitter)}var dist={},hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});for(var t={},r={byteLength:function(e){var t=u(e),r=t[0],i=t[1];return 3*(r+i)/4-i},toByteArray:function(e){var t,r,i=u(e),s=i[0],a=i[1],h=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),f=0,l=a>0?s-4:s;for(r=0;r<l;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],h[f++]=t>>16&255,h[f++]=t>>8&255,h[f++]=255&t;2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,h[f++]=255&t);1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,h[f++]=t>>8&255,h[f++]=255&t);return h},fromByteArray:function(e){for(var t,r=e.length,n=r%3,o=[],s=16383,a=0,u=r-n;a<u;a+=s)o.push(h(e,a,a+s>u?u:a+s));1===n?(t=e[r-1],o.push(i[t>>2]+i[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],o.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return o.join("")}},i=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)i[a]=s[a],n[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function h(e,t,r){for(var n,o,s=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(i[(o=n)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63;var f={read:function(e,t,r,i,n){var o,s,a=8*n-i-1,u=(1<<a)-1,h=u>>1,f=-7,l=r?n-1:0,c=r?-1:1,d=e[t+l];for(l+=c,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+e[t+l],l+=c,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=i;f>0;s=256*s+e[t+l],l+=c,f-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,i),o-=h}return(d?-1:1)*s*Math.pow(2,o-i)},write:function(e,t,r,i,n,o){var s,a,u,h=8*o-n-1,f=(1<<h)-1,l=f>>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,p=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+l>=1?c/u:c*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(t*u-1)*Math.pow(2,n),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,n),s=0));n>=8;e[r+d]=255&a,d+=p,a/=256,n-=8);for(s=s<<n|a,h+=n;h>0;e[r+d]=255&s,d+=p,s/=256,h-=8);e[r+d-p]|=128*m}};!function(e){const t=r,i=f,n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o;const{Uint8Array:s,ArrayBuffer:a,SharedArrayBuffer:u}=globalThis;function h(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new s(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|b(e,t);let i=h(r);const n=i.write(e,t);n!==r&&(i=i.slice(0,n));return i}(e,t);if(a.isView(e))return function(e){if(Y(e,s)){const t=new s(e);return g(t.buffer,t.byteOffset,t.byteLength)}return m(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,a)||e&&Y(e.buffer,a))return g(e,t,r);if(void 0!==u&&(Y(e,u)||e&&Y(e.buffer,u)))return g(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return l.from(i,t,r);const n=function(e){if(l.isBuffer(e)){const t=0|y(e.length),r=h(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||X(e.length)?h(0):m(e);if("Buffer"===e.type&&Array.isArray(e.data))return m(e.data)}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function d(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return d(e),h(e<0?0:0|y(e))}function m(e){const t=e.length<0?0:0|y(e.length),r=h(t);for(let i=0;i<t;i+=1)r[i]=255&e[i];return r}function g(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let i;return i=void 0===t&&void 0===r?new s(e):void 0===r?new s(e,t):new s(e,t,r),Object.setPrototypeOf(i,l.prototype),i}function y(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function b(e,t){if(l.isBuffer(e))return e.length;if(a.isView(e)||Y(e,a))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(e).length;default:if(n)return i?-1:J(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return B(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function w(e,t,r){const i=e[t];e[t]=e[r],e[r]=i}function _(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=l.from(t,i)),l.isBuffer(t))return 0===t.length?-1:M(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof s.prototype.indexOf?n?s.prototype.indexOf.call(e,t,r):s.prototype.lastIndexOf.call(e,t,r):M(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function M(e,t,r,i,n){let o,s=1,a=e.length,u=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function h(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(n){let i=-1;for(o=r;o<a;o++)if(h(e,o)===h(t,-1===i?0:o-i)){if(-1===i&&(i=o),o-i+1===u)return i*s}else-1!==i&&(o-=o-i),i=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let i=0;i<u;i++)if(h(e,o+i)!==h(t,i)){r=!1;break}if(r)return o}return-1}function S(e,t,r,i){r=Number(r)||0;const n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;const o=t.length;let s;for(i>o/2&&(i=o/2),s=0;s<i;++s){const i=parseInt(t.substr(2*s,2),16);if(X(i))return s;e[r+s]=i}return s}function E(e,t,r,i){return Z(J(t,e.length-r),e,r,i)}function R(e,t,r,i){return Z(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,i)}function q(e,t,r,i){return Z(Q(t),e,r,i)}function A(e,t,r,i){return Z(function(e,t){let r,i,n;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),i=r>>8,n=r%256,o.push(n),o.push(i);return o}(t,e.length-r),e,r,i)}function C(e,r,i){return 0===r&&i===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,i))}function P(e,t,r){r=Math.min(e.length,r);const i=[];let n=t;for(;n<r;){const t=e[n];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(n+s<=r){let r,i,a,u;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[n+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[n+1],i=e[n+2],128==(192&r)&&128==(192&i)&&(u=(15&t)<<12|(63&r)<<6|63&i,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[n+1],i=e[n+2],a=e[n+3],128==(192&r)&&128==(192&i)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&i)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),n+=s}return function(e){const t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);let r="",i=0;for(;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=I));return r}(i)}l.TYPED_ARRAY_SUPPORT=function(){try{const e=new s(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,s.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(l.prototype,s.prototype),Object.setPrototypeOf(l,s),l.alloc=function(e,t,r){return function(e,t,r){return d(e),e<=0?h(e):void 0!==t?"string"==typeof r?h(e).fill(t,r):h(e).fill(t):h(e)}(e,t,r)},l.allocUnsafe=function(e){return p(e)},l.allocUnsafeSlow=function(e){return p(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(Y(e,s)&&(e=l.from(e,e.offset,e.byteLength)),Y(t,s)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,i=t.length;for(let n=0,o=Math.min(r,i);n<o;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const i=l.allocUnsafe(t);let n=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,s))n+t.length>i.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(i,n)):s.prototype.set.call(i,t,n);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,n)}n+=t.length}return i},l.byteLength=b,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)w(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)w(this,t,t+3),w(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)w(this,t,t+7),w(this,t+1,t+6),w(this,t+2,t+5),w(this,t+3,t+4);return this},l.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):v.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},n&&(l.prototype[n]=l.prototype.inspect),l.prototype.compare=function(e,t,r,i,n){if(Y(e,s)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(n>>>=0)-(i>>>=0),a=(r>>>=0)-(t>>>=0);const u=Math.min(o,a),h=this.slice(i,n),f=e.slice(t,r);for(let e=0;e<u;++e)if(h[e]!==f[e]){o=h[e],a=f[e];break}return o<a?-1:a<o?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return _(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return _(this,e,t,r,!1)},l.prototype.write=function(e,t,r,i){if(void 0===t)i="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)i=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}const n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let o=!1;for(;;)switch(i){case"hex":return S(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return R(this,e,t,r);case"base64":return q(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function O(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(127&e[n]);return i}function B(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function k(e,t,r){const i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);let n="";for(let i=t;i<r;++i)n+=ee[e[i]];return n}function T(e,t,r){const i=e.slice(t,r);let n="";for(let e=0;e<i.length-1;e+=2)n+=String.fromCharCode(i[e]+256*i[e+1]);return n}function x(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,i,n,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<o)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function j(e,t,r,i,n){K(t,i,n,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function $(e,t,r,i,n){K(t,i,n,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function D(e,t,r,i,n,o){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const i=this.subarray(e,t);return Object.setPrototypeOf(i,l.prototype),i},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);let i=this[e],n=1,o=0;for(;++o<t&&(n*=256);)i+=this[e+o]*n;return i},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);let i=this[e+--t],n=1;for(;t>0&&(n*=256);)i+=this[e+--t]*n;return i},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||x(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=te((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const i=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,n=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(i)+(BigInt(n)<<BigInt(32))})),l.prototype.readBigUInt64BE=te((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const i=t*2**24+65536*this[++e]+256*this[++e]+this[++e],n=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(i)<<BigInt(32))+BigInt(n)})),l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);let i=this[e],n=1,o=0;for(;++o<t&&(n*=256);)i+=this[e+o]*n;return n*=128,i>=n&&(i-=Math.pow(2,8*t)),i},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||x(e,t,this.length);let i=t,n=1,o=this[e+--i];for(;i>0&&(n*=256);)o+=this[e+--i]*n;return n*=128,o>=n&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||x(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||x(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||x(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||x(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=te((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const i=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),l.prototype.readBigInt64BE=te((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const i=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||x(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||x(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||x(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||x(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,i){if(e=+e,t>>>=0,r>>>=0,!i){N(this,e,t,r,Math.pow(2,8*r)-1,0)}let n=1,o=0;for(this[t]=255&e;++o<r&&(n*=256);)this[t+o]=e/n&255;return t+r},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,r,i){if(e=+e,t>>>=0,r>>>=0,!i){N(this,e,t,r,Math.pow(2,8*r)-1,0)}let n=r-1,o=1;for(this[t+n]=255&e;--n>=0&&(o*=256);)this[t+n]=e/o&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=te((function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=te((function(e,t=0){return $(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*r-1);N(this,e,t,r,i-1,-i)}let n=0,o=1,s=0;for(this[t]=255&e;++n<r&&(o*=256);)e<0&&0===s&&0!==this[t+n-1]&&(s=1),this[t+n]=(e/o|0)-s&255;return t+r},l.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*r-1);N(this,e,t,r,i-1,-i)}let n=r-1,o=1,s=0;for(this[t+n]=255&e;--n>=0&&(o*=256);)e<0&&0===s&&0!==this[t+n+1]&&(s=1),this[t+n]=(e/o|0)-s&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=te((function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=te((function(e,t=0){return $(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,i){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-r&&(i=e.length-t+r);const n=i-r;return this===e&&"function"==typeof s.prototype.copyWithin?this.copyWithin(t,r,i):s.prototype.set.call(e,this.subarray(r,i),t),n},l.prototype.fill=function(e,t,r,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){const t=e.charCodeAt(0);("utf8"===i&&t<128||"latin1"===i)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let n;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n<r;++n)this[n]=e;else{const o=l.isBuffer(e)?e:l.from(e,i),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<r-t;++n)this[n+t]=o[n%s]}return this};const F={};function z(e,t,r){F[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function H(e){let t="",r=e.length;const i="-"===e[0]?1:0;for(;r>=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function K(e,t,r,i,n,o){if(e>r||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||G(t,e.length-(r+1))}(i,n,o)}function W(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,r){if(Math.floor(e)!==e)throw W(e,r),new F.ERR_OUT_OF_RANGE("offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${t}`,e)}z("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),z("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),z("ERR_OUT_OF_RANGE",(function(e,t,r){let i=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=H(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=H(n)),n+="n"),i+=` It must be ${t}. Received ${n}`,i}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function J(e,t){let r;t=t||1/0;const i=e.length;let n=null;const o=[];for(let s=0;s<i;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Q(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Z(e,t,r,i){let n;for(n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function X(e){return e!=e}const ee=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const i=16*r;for(let n=0;n<16;++n)t[i+n]=e[r]+e[n]}return t}();function te(e){return"undefined"==typeof BigInt?re:e}function re(){throw new Error("BigInt not supported")}}(t);const l=t.Buffer;e.Blob=t.Blob,e.BlobOptions=t.BlobOptions,e.Buffer=t.Buffer,e.File=t.File,e.FileOptions=t.FileOptions,e.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,e.SlowBuffer=t.SlowBuffer,e.TranscodeEncoding=t.TranscodeEncoding,e.atob=t.atob,e.btoa=t.btoa,e.constants=t.constants,e.default=l,e.isAscii=t.isAscii,e.isUtf8=t.isUtf8,e.kMaxLength=t.kMaxLength,e.kStringMaxLength=t.kStringMaxLength,e.resolveObjectURL=t.resolveObjectURL,e.transcode=t.transcode}(dist)),dist}var util$1={},types={},shams$1,hasRequiredShams$1,shams,hasRequiredShams,esObjectAtoms,hasRequiredEsObjectAtoms,esErrors,hasRequiredEsErrors,_eval,hasRequired_eval,range,hasRequiredRange,ref,hasRequiredRef,syntax,hasRequiredSyntax,type,hasRequiredType,uri,hasRequiredUri,abs,hasRequiredAbs,floor,hasRequiredFloor,max,hasRequiredMax,min,hasRequiredMin,pow,hasRequiredPow,round,hasRequiredRound,_isNaN,hasRequired_isNaN,sign$1,hasRequiredSign$1,gOPD,hasRequiredGOPD,gopd,hasRequiredGopd,esDefineProperty,hasRequiredEsDefineProperty,hasSymbols,hasRequiredHasSymbols,Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf,Object_getPrototypeOf,hasRequiredObject_getPrototypeOf,implementation,hasRequiredImplementation,functionBind,hasRequiredFunctionBind,functionCall,hasRequiredFunctionCall,functionApply,hasRequiredFunctionApply,reflectApply,hasRequiredReflectApply,actualApply,hasRequiredActualApply,callBindApplyHelpers,hasRequiredCallBindApplyHelpers,get$1,hasRequiredGet,getProto,hasRequiredGetProto,hasown,hasRequiredHasown,getIntrinsic,hasRequiredGetIntrinsic,callBound,hasRequiredCallBound,isArguments,hasRequiredIsArguments,isRegex,hasRequiredIsRegex,safeRegexTest,hasRequiredSafeRegexTest,isGeneratorFunction,hasRequiredIsGeneratorFunction,isCallable,hasRequiredIsCallable,forEach,hasRequiredForEach,possibleTypedArrayNames,hasRequiredPossibleTypedArrayNames,availableTypedArrays,hasRequiredAvailableTypedArrays;function requireShams$1(){return hasRequiredShams$1?shams$1:(hasRequiredShams$1=1,shams$1=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var i in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0})}function requireShams(){if(hasRequiredShams)return shams;hasRequiredShams=1;var e=requireShams$1();return shams=function(){return e()&&!!Symbol.toStringTag}}function requireEsObjectAtoms(){return hasRequiredEsObjectAtoms?esObjectAtoms:(hasRequiredEsObjectAtoms=1,esObjectAtoms=Object)}function requireEsErrors(){return hasRequiredEsErrors?esErrors:(hasRequiredEsErrors=1,esErrors=Error)}function require_eval(){return hasRequired_eval?_eval:(hasRequired_eval=1,_eval=EvalError)}function requireRange(){return hasRequiredRange?range:(hasRequiredRange=1,range=RangeError)}function requireRef(){return hasRequiredRef?ref:(hasRequiredRef=1,ref=ReferenceError)}function requireSyntax(){return hasRequiredSyntax?syntax:(hasRequiredSyntax=1,syntax=SyntaxError)}function requireType(){return hasRequiredType?type:(hasRequiredType=1,type=TypeError)}function requireUri(){return hasRequiredUri?uri:(hasRequiredUri=1,uri=URIError)}function requireAbs(){return hasRequiredAbs?abs:(hasRequiredAbs=1,abs=Math.abs)}function requireFloor(){return hasRequiredFloor?floor:(hasRequiredFloor=1,floor=Math.floor)}function requireMax(){return hasRequiredMax?max:(hasRequiredMax=1,max=Math.max)}function requireMin(){return hasRequiredMin?min:(hasRequiredMin=1,min=Math.min)}function requirePow(){return hasRequiredPow?pow:(hasRequiredPow=1,pow=Math.pow)}function requireRound(){return hasRequiredRound?round:(hasRequiredRound=1,round=Math.round)}function require_isNaN(){return hasRequired_isNaN?_isNaN:(hasRequired_isNaN=1,_isNaN=Number.isNaN||function(e){return e!=e})}function requireSign$1(){if(hasRequiredSign$1)return sign$1;hasRequiredSign$1=1;var e=require_isNaN();return sign$1=function(t){return e(t)||0===t?t:t<0?-1:1}}function requireGOPD(){return hasRequiredGOPD?gOPD:(hasRequiredGOPD=1,gOPD=Object.getOwnPropertyDescriptor)}function requireGopd(){if(hasRequiredGopd)return gopd;hasRequiredGopd=1;var e=requireGOPD();if(e)try{e([],"length")}catch(t){e=null}return gopd=e}function requireEsDefineProperty(){if(hasRequiredEsDefineProperty)return esDefineProperty;hasRequiredEsDefineProperty=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return esDefineProperty=e}function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols;hasRequiredHasSymbols=1;var e="undefined"!=typeof Symbol&&Symbol,t=requireShams$1();return hasSymbols=function(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf?Reflect_getPrototypeOf:(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function requireObject_getPrototypeOf(){return hasRequiredObject_getPrototypeOf?Object_getPrototypeOf:(hasRequiredObject_getPrototypeOf=1,Object_getPrototypeOf=requireEsObjectAtoms().getPrototypeOf||null)}function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var e=Object.prototype.toString,t=Math.max,r=function(e,t){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var n=0;n<t.length;n+=1)r[n+e.length]=t[n];return r};return implementation=function(i){var n=this;if("function"!=typeof n||"[object Function]"!==e.apply(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var o,s=function(e,t){for(var r=[],i=t,n=0;i<e.length;i+=1,n+=1)r[n]=e[i];return r}(arguments,1),a=t(0,n.length-s.length),u=[],h=0;h<a;h++)u[h]="$"+h;if(o=Function("binder","return function ("+function(e,t){for(var r="",i=0;i<e.length;i+=1)r+=e[i],i+1<e.length&&(r+=t);return r}(u,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var e=n.apply(this,r(s,arguments));return Object(e)===e?e:this}return n.apply(i,r(s,arguments))})),n.prototype){var f=function(){};f.prototype=n.prototype,o.prototype=new f,f.prototype=null}return o},implementation}function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var e=requireImplementation();return functionBind=Function.prototype.bind||e}function requireFunctionCall(){return hasRequiredFunctionCall?functionCall:(hasRequiredFunctionCall=1,functionCall=Function.prototype.call)}function requireFunctionApply(){return hasRequiredFunctionApply?functionApply:(hasRequiredFunctionApply=1,functionApply=Function.prototype.apply)}function requireReflectApply(){return hasRequiredReflectApply?reflectApply:(hasRequiredReflectApply=1,reflectApply="undefined"!=typeof Reflect&&Reflect&&Reflect.apply)}function requireActualApply(){if(hasRequiredActualApply)return actualApply;hasRequiredActualApply=1;var e=requireFunctionBind(),t=requireFunctionApply(),r=requireFunctionCall(),i=requireReflectApply();return actualApply=i||e.call(r,t)}function requireCallBindApplyHelpers(){if(hasRequiredCallBindApplyHelpers)return callBindApplyHelpers;hasRequiredCallBindApplyHelpers=1;var e=requireFunctionBind(),t=requireType(),r=requireFunctionCall(),i=requireActualApply();return callBindApplyHelpers=function(n){if(n.length<1||"function"!=typeof n[0])throw new t("a function is required");return i(e,r,n)}}function requireGet(){if(hasRequiredGet)return get$1;hasRequiredGet=1;var e,t=requireCallBindApplyHelpers(),r=requireGopd();try{e=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var i=!!e&&r&&r(Object.prototype,"__proto__"),n=Object,o=n.getPrototypeOf;return get$1=i&&"function"==typeof i.get?t([i.get]):"function"==typeof o&&function(e){return o(null==e?e:n(e))}}function requireGetProto(){if(hasRequiredGetProto)return getProto;hasRequiredGetProto=1;var e=requireReflect_getPrototypeOf(),t=requireObject_getPrototypeOf(),r=requireGet();return getProto=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:r?function(e){return r(e)}:null}function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=requireFunctionBind();return hasown=r.call(e,t)}function requireGetIntrinsic(){if(hasRequiredGetIntrinsic)return getIntrinsic;var e;hasRequiredGetIntrinsic=1;var t=requireEsObjectAtoms(),r=requireEsErrors(),i=require_eval(),n=requireRange(),o=requireRef(),s=requireSyntax(),a=requireType(),u=requireUri(),h=requireAbs(),f=requireFloor(),l=requireMax(),c=requireMin(),d=requirePow(),p=requireRound(),m=requireSign$1(),g=Function,y=function(e){try{return g('"use strict"; return ('+e+").constructor;")()}catch(e){}},b=requireGopd(),v=requireEsDefineProperty(),w=function(){throw new a},_=b?function(){try{return w}catch(e){try{return b(arguments,"callee").get}catch(e){return w}}}():w,M=requireHasSymbols()(),S=requireGetProto(),E=requireObject_getPrototypeOf(),R=requireReflect_getPrototypeOf(),q=requireFunctionApply(),A=requireFunctionCall(),C={},P="undefined"!=typeof Uint8Array&&S?S(Uint8Array):e,I={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":M&&S?S([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":C,"%AsyncGenerator%":C,"%AsyncGeneratorFunction%":C,"%AsyncIteratorPrototype%":C,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":i,"%Float16Array%":"undefined"==typeof Float16Array?e:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":C,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":M&&S?S(S([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&M&&S?S((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":n,"%ReferenceError%":o,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&M&&S?S((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":M&&S?S(""[Symbol.iterator]()):e,"%Symbol%":M?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":_,"%TypedArray%":P,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"%Function.prototype.call%":A,"%Function.prototype.apply%":q,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":E,"%Math.abs%":h,"%Math.floor%":f,"%Math.max%":l,"%Math.min%":c,"%Math.pow%":d,"%Math.round%":p,"%Math.sign%":m,"%Reflect.getPrototypeOf%":R};if(S)try{null.error}catch(e){var O=S(S(e));I["%Error.prototype%"]=O}var B=function e(t){var r;if("%AsyncFunction%"===t)r=y("async function () {}");else if("%GeneratorFunction%"===t)r=y("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=y("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var n=e("%AsyncGenerator%");n&&S&&(r=S(n.prototype))}return I[t]=r,r},k={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},T=requireFunctionBind(),x=requireHasown(),N=T.call(A,Array.prototype.concat),j=T.call(q,Array.prototype.splice),$=T.call(A,String.prototype.replace),D=T.call(A,String.prototype.slice),U=T.call(A,RegExp.prototype.exec),L=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F=/\\(\\)?/g,z=function(e,t){var r,i=e;if(x(k,i)&&(i="%"+(r=k[i])[0]+"%"),x(I,i)){var n=I[i];if(n===C&&(n=B(i)),void 0===n&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:n}}throw new s("intrinsic "+e+" does not exist!")};return getIntrinsic=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===U(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=D(e,0,1),r=D(e,-1);if("%"===t&&"%"!==r)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var i=[];return $(e,L,(function(e,t,r,n){i[i.length]=r?$(n,F,"$1"):t||e})),i}(e),i=r.length>0?r[0]:"",n=z("%"+i+"%",t),o=n.name,u=n.value,h=!1,f=n.alias;f&&(i=f[0],j(r,N([0,1],f)));for(var l=1,c=!0;l<r.length;l+=1){var d=r[l],p=D(d,0,1),m=D(d,-1);if(('"'===p||"'"===p||"`"===p||'"'===m||"'"===m||"`"===m)&&p!==m)throw new s("property names with quotes must have matching quotes");if("constructor"!==d&&c||(h=!0),x(I,o="%"+(i+="."+d)+"%"))u=I[o];else if(null!=u){if(!(d in u)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(b&&l+1>=r.length){var g=b(u,d);u=(c=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:u[d]}else c=x(u,d),u=u[d];c&&!h&&(I[o]=u)}}return u},getIntrinsic}function requireCallBound(){if(hasRequiredCallBound)return callBound;hasRequiredCallBound=1;var e=requireGetIntrinsic(),t=requireCallBindApplyHelpers(),r=t([e("%String.prototype.indexOf%")]);return callBound=function(i,n){var o=e(i,!!n);return"function"==typeof o&&r(i,".prototype.")>-1?t([o]):o}}function requireIsArguments(){if(hasRequiredIsArguments)return isArguments;hasRequiredIsArguments=1;var e=requireShams()(),t=requireCallBound()("Object.prototype.toString"),r=function(r){return!(e&&r&&"object"==typeof r&&Symbol.toStringTag in r)&&"[object Arguments]"===t(r)},i=function(e){return!!r(e)||null!==e&&"object"==typeof e&&"length"in e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==t(e)&&"callee"in e&&"[object Function]"===t(e.callee)},n=function(){return r(arguments)}();return r.isLegacyArguments=i,isArguments=n?r:i}function requireIsRegex(){if(hasRequiredIsRegex)return isRegex;hasRequiredIsRegex=1;var e,t=requireCallBound(),r=requireShams()(),i=requireHasown(),n=requireGopd();if(r){var o=t("RegExp.prototype.exec"),s={},a=function(){throw s},u={toString:a,valueOf:a};"symbol"==typeof Symbol.toPrimitive&&(u[Symbol.toPrimitive]=a),e=function(e){if(!e||"object"!=typeof e)return!1;var t=n(e,"lastIndex");if(!(t&&i(t,"value")))return!1;try{o(e,u)}catch(e){return e===s}}}else{var h=t("Object.prototype.toString");e=function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===h(e)}}return isRegex=e}function requireSafeRegexTest(){if(hasRequiredSafeRegexTest)return safeRegexTest;hasRequiredSafeRegexTest=1;var e=requireCallBound(),t=requireIsRegex(),r=e("RegExp.prototype.exec"),i=requireType();return safeRegexTest=function(e){if(!t(e))throw new i("`regex` must be a RegExp");return function(t){return null!==r(e,t)}}}function requireIsGeneratorFunction(){if(hasRequiredIsGeneratorFunction)return isGeneratorFunction;hasRequiredIsGeneratorFunction=1;var e,t=requireCallBound(),r=requireSafeRegexTest()(/^\s*(?:function)?\*/),i=requireShams()(),n=requireGetProto(),o=t("Object.prototype.toString"),s=t("Function.prototype.toString");return isGeneratorFunction=function(t){if("function"!=typeof t)return!1;if(r(s(t)))return!0;if(!i)return"[object GeneratorFunction]"===o(t);if(!n)return!1;if(void 0===e){var a=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch(e){}}();e=!!a&&n(a)}return n(t)===e}}function requireIsCallable(){if(hasRequiredIsCallable)return isCallable;hasRequiredIsCallable=1;var e,t,r=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw t}}),t={},i((function(){throw 42}),null,e)}catch(e){e!==t&&(i=null)}else i=null;var n=/^\s*class\b/,o=function(e){try{var t=r.call(e);return n.test(t)}catch(e){return!1}},s=function(e){try{return!o(e)&&(r.call(e),!0)}catch(e){return!1}},a=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,h=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var l=document.all;a.call(l)===a.call(document.all)&&(f=function(e){if((h||!e)&&(void 0===e||"object"==typeof e))try{var t=a.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}return isCallable=i?function(r){if(f(r))return!0;if(!r)return!1;if("function"!=typeof r&&"object"!=typeof r)return!1;try{i(r,null,e)}catch(e){if(e!==t)return!1}return!o(r)&&s(r)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(u)return s(e);if(o(e))return!1;var t=a.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}}function requireForEach(){if(hasRequiredForEach)return forEach;hasRequiredForEach=1;var e=requireIsCallable(),t=Object.prototype.toString,r=Object.prototype.hasOwnProperty;return forEach=function(i,n,o){if(!e(n))throw new TypeError("iterator must be a function");var s,a;arguments.length>=3&&(s=o),a=i,"[object Array]"===t.call(a)?function(e,t,i){for(var n=0,o=e.length;n<o;n++)r.call(e,n)&&(null==i?t(e[n],n,e):t.call(i,e[n],n,e))}(i,n,s):"string"==typeof i?function(e,t,r){for(var i=0,n=e.length;i<n;i++)null==r?t(e.charAt(i),i,e):t.call(r,e.charAt(i),i,e)}(i,n,s):function(e,t,i){for(var n in e)r.call(e,n)&&(null==i?t(e[n],n,e):t.call(i,e[n],n,e))}(i,n,s)},forEach}function requirePossibleTypedArrayNames(){return hasRequiredPossibleTypedArrayNames?possibleTypedArrayNames:(hasRequiredPossibleTypedArrayNames=1,possibleTypedArrayNames=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"])}function requireAvailableTypedArrays(){if(hasRequiredAvailableTypedArrays)return availableTypedArrays;hasRequiredAvailableTypedArrays=1;var e=requirePossibleTypedArrayNames(),t="undefined"==typeof globalThis?commonjsGlobal:globalThis;return availableTypedArrays=function(){for(var r=[],i=0;i<e.length;i++)"function"==typeof t[e[i]]&&(r[r.length]=e[i]);return r}}var callBind={exports:{}},defineDataProperty,hasRequiredDefineDataProperty,hasPropertyDescriptors_1,hasRequiredHasPropertyDescriptors,setFunctionLength,hasRequiredSetFunctionLength,applyBind,hasRequiredApplyBind,hasRequiredCallBind,whichTypedArray,hasRequiredWhichTypedArray,isTypedArray,hasRequiredIsTypedArray,hasRequiredTypes,isBufferBrowser,hasRequiredIsBufferBrowser,hasRequiredUtil$1,buffer_list,hasRequiredBuffer_list,destroy_1$1,hasRequiredDestroy$1;function requireDefineDataProperty(){if(hasRequiredDefineDataProperty)return defineDataProperty;hasRequiredDefineDataProperty=1;var e=requireEsDefineProperty(),t=requireSyntax(),r=requireType(),i=requireGopd();return defineDataProperty=function(n,o,s){if(!n||"object"!=typeof n&&"function"!=typeof n)throw new r("`obj` must be an object or a function`");if("string"!=typeof o&&"symbol"!=typeof o)throw new r("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new r("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],l=!!i&&i(n,o);if(e)e(n,o,{configurable:null===h&&l?l.configurable:!h,enumerable:null===a&&l?l.enumerable:!a,value:s,writable:null===u&&l?l.writable:!u});else{if(!f&&(a||u||h))throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");n[o]=s}},defineDataProperty}function requireHasPropertyDescriptors(){if(hasRequiredHasPropertyDescriptors)return hasPropertyDescriptors_1;hasRequiredHasPropertyDescriptors=1;var e=requireEsDefineProperty(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return 1!==e([],"length",{value:1}).length}catch(e){return!0}},hasPropertyDescriptors_1=t}function requireSetFunctionLength(){if(hasRequiredSetFunctionLength)return setFunctionLength;hasRequiredSetFunctionLength=1;var e=requireGetIntrinsic(),t=requireDefineDataProperty(),r=requireHasPropertyDescriptors()(),i=requireGopd(),n=requireType(),o=e("%Math.floor%");return setFunctionLength=function(e,s){if("function"!=typeof e)throw new n("`fn` is not a function");if("number"!=typeof s||s<0||s>4294967295||o(s)!==s)throw new n("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],u=!0,h=!0;if("length"in e&&i){var f=i(e,"length");f&&!f.configurable&&(u=!1),f&&!f.writable&&(h=!1)}return(u||h||!a)&&(r?t(e,"length",s,!0,!0):t(e,"length",s)),e},setFunctionLength}function requireApplyBind(){if(hasRequiredApplyBind)return applyBind;hasRequiredApplyBind=1;var e=requireFunctionBind(),t=requireFunctionApply(),r=requireActualApply();return applyBind=function(){return r(e,t,arguments)},applyBind}function requireCallBind(){return hasRequiredCallBind||(hasRequiredCallBind=1,e=callBind,t=requireSetFunctionLength(),r=requireEsDefineProperty(),i=requireCallBindApplyHelpers(),n=requireApplyBind(),e.exports=function(e){var r=i(arguments),n=e.length-(arguments.length-1);return t(r,1+(n>0?n:0),!0)},r?r(e.exports,"apply",{value:n}):e.exports.apply=n),callBind.exports;var e,t,r,i,n}function requireWhichTypedArray(){if(hasRequiredWhichTypedArray)return whichTypedArray;hasRequiredWhichTypedArray=1;var e=requireForEach(),t=requireAvailableTypedArrays(),r=requireCallBind(),i=requireCallBound(),n=requireGopd(),o=requireGetProto(),s=i("Object.prototype.toString"),a=requireShams()(),u="undefined"==typeof globalThis?commonjsGlobal:globalThis,h=t(),f=i("String.prototype.slice"),l=i("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},c={__proto__:null};e(h,a&&n&&o?function(e){var t=new u[e];if(Symbol.toStringTag in t&&o){var i=o(t),s=n(i,Symbol.toStringTag);if(!s&&i){var a=o(i);s=n(a,Symbol.toStringTag)}c["$"+e]=r(s.get)}}:function(e){var t=new u[e],i=t.slice||t.set;i&&(c["$"+e]=r(i))});return whichTypedArray=function(t){if(!t||"object"!=typeof t)return!1;if(!a){var r=f(s(t),8,-1);return l(h,r)>-1?r:"Object"===r&&function(t){var r=!1;return e(c,(function(e,i){if(!r)try{e(t),r=f(i,1)}catch(e){}})),r}(t)}return n?function(t){var r=!1;return e(c,(function(e,i){if(!r)try{"$"+e(t)===i&&(r=f(i,1))}catch(e){}})),r}(t):null}}function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray;hasRequiredIsTypedArray=1;var e=requireWhichTypedArray();return isTypedArray=function(t){return!!e(t)}}function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,function(e){var t=requireIsArguments(),r=requireIsGeneratorFunction(),i=requireWhichTypedArray(),n=requireIsTypedArray();function o(e){return e.call.bind(e)}var s="undefined"!=typeof BigInt,a="undefined"!=typeof Symbol,u=o(Object.prototype.toString),h=o(Number.prototype.valueOf),f=o(String.prototype.valueOf),l=o(Boolean.prototype.valueOf);if(s)var c=o(BigInt.prototype.valueOf);if(a)var d=o(Symbol.prototype.valueOf);function p(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function m(e){return"[object Map]"===u(e)}function g(e){return"[object Set]"===u(e)}function y(e){return"[object WeakMap]"===u(e)}function b(e){return"[object WeakSet]"===u(e)}function v(e){return"[object ArrayBuffer]"===u(e)}function w(e){return"undefined"!=typeof ArrayBuffer&&(v.working?v(e):e instanceof ArrayBuffer)}function _(e){return"[object DataView]"===u(e)}function M(e){return"undefined"!=typeof DataView&&(_.working?_(e):e instanceof DataView)}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=n,e.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},e.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):n(e)||M(e)},e.isUint8Array=function(e){return"Uint8Array"===i(e)},e.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},e.isUint16Array=function(e){return"Uint16Array"===i(e)},e.isUint32Array=function(e){return"Uint32Array"===i(e)},e.isInt8Array=function(e){return"Int8Array"===i(e)},e.isInt16Array=function(e){return"Int16Array"===i(e)},e.isInt32Array=function(e){return"Int32Array"===i(e)},e.isFloat32Array=function(e){return"Float32Array"===i(e)},e.isFloat64Array=function(e){return"Float64Array"===i(e)},e.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},e.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},m.working="undefined"!=typeof Map&&m(new Map),e.isMap=function(e){return"undefined"!=typeof Map&&(m.working?m(e):e instanceof Map)},g.working="undefined"!=typeof Set&&g(new Set),e.isSet=function(e){return"undefined"!=typeof Set&&(g.working?g(e):e instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),e.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(y.working?y(e):e instanceof WeakMap)},b.working="undefined"!=typeof WeakSet&&b(new WeakSet),e.isWeakSet=function(e){return b(e)},v.working="undefined"!=typeof ArrayBuffer&&v(new ArrayBuffer),e.isArrayBuffer=w,_.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&_(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=M;var S="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function E(e){return"[object SharedArrayBuffer]"===u(e)}function R(e){return void 0!==S&&(void 0===E.working&&(E.working=E(new S)),E.working?E(e):e instanceof S)}function q(e){return p(e,h)}function A(e){return p(e,f)}function C(e){return p(e,l)}function P(e){return s&&p(e,c)}function I(e){return a&&p(e,d)}e.isSharedArrayBuffer=R,e.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},e.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},e.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},e.isGeneratorObject=function(e){return"[object Generator]"===u(e)},e.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},e.isNumberObject=q,e.isStringObject=A,e.isBooleanObject=C,e.isBigIntObject=P,e.isSymbolObject=I,e.isBoxedPrimitive=function(e){return q(e)||A(e)||C(e)||P(e)||I(e)},e.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(w(e)||R(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))}(types)),types}function requireIsBufferBrowser(){return hasRequiredIsBufferBrowser?isBufferBrowser:(hasRequiredIsBufferBrowser=1,isBufferBrowser=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8})}function requireUtil$1(){return hasRequiredUtil$1||(hasRequiredUtil$1=1,function(e){var t={},r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},i=0;i<t.length;i++)r[t[i]]=Object.getOwnPropertyDescriptor(e,t[i]);return r},i=/%[sdj%]/g;e.format=function(e){if(!y(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(a(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(e).replace(i,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),u=n[r];r<o;u=n[++r])m(u)||!w(u)?s+=" "+u:s+=" "+a(u);return s},e.deprecate=function(t,r){if(void 0!==process$1&&!0===process$1.noDeprecation)return t;if(void 0===process$1)return function(){return e.deprecate(t,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(process$1.throwDeprecation)throw new Error(r);process$1.traceDeprecation?console.trace(r):console.error(r),i=!0}return t.apply(this,arguments)}};var n={},o=/^$/;if(t.NODE_DEBUG){var s=t.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),o=new RegExp("^"+s+"$","i")}function a(t,r){var i={seen:[],stylize:h};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),p(r)?i.showHidden=r:r&&e._extend(i,r),b(i.showHidden)&&(i.showHidden=!1),b(i.depth)&&(i.depth=2),b(i.colors)&&(i.colors=!1),b(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=u),f(i,t,i.depth)}function u(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function h(e,t){return e}function f(t,r,i){if(t.customInspect&&r&&S(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(i,t);return y(n)||(n=f(t,n,i)),n}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(g(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(m(t))return e.stylize("null","null")}(t,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),M(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(S(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(v(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return t.stylize(Date.prototype.toString.call(r),"date");if(M(r))return l(r)}var h,w="",E=!1,R=["{","}"];(d(r)&&(E=!0,R=["[","]"]),S(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return v(r)&&(w=" "+RegExp.prototype.toString.call(r)),_(r)&&(w=" "+Date.prototype.toUTCString.call(r)),M(r)&&(w=" "+l(r)),0!==s.length||E&&0!=r.length?i<0?v(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),h=E?function(e,t,r,i,n){for(var o=[],s=0,a=t.length;s<a;++s)A(t,String(s))?o.push(c(e,t,r,i,String(s),!0)):o.push("");return n.forEach((function(n){n.match(/^\d+$/)||o.push(c(e,t,r,i,n,!0))})),o}(t,r,i,a,s):s.map((function(e){return c(t,r,i,a,e,E)})),t.seen.pop(),function(e,t,r){var i=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(i>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(h,w,R)):R[0]+w+R[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function c(e,t,r,i,n,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),A(i,n)||(s="["+n+"]"),a||(e.seen.indexOf(u.value)<0?(a=m(r)?f(e,u.value,null):f(e,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),b(s)){if(o&&n.match(/^\d+$/))return a;(s=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function b(e){return void 0===e}function v(e){return w(e)&&"[object RegExp]"===E(e)}function w(e){return"object"==typeof e&&null!==e}function _(e){return w(e)&&"[object Date]"===E(e)}function M(e){return w(e)&&("[object Error]"===E(e)||e instanceof Error)}function S(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function R(e){return e<10?"0"+e.toString(10):e.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!n[t])if(o.test(t)){var r=process$1.pid;n[t]=function(){var i=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,i)}}else n[t]=function(){};return n[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=requireTypes(),e.isArray=d,e.isBoolean=p,e.isNull=m,e.isNullOrUndefined=function(e){return null==e},e.isNumber=g,e.isString=y,e.isSymbol=function(e){return"symbol"==typeof e},e.isUndefined=b,e.isRegExp=v,e.types.isRegExp=v,e.isObject=w,e.isDate=_,e.types.isDate=_,e.isError=M,e.types.isNativeError=M,e.isFunction=S,e.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},e.isBuffer=requireIsBufferBrowser();var q=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.log=function(){var t,r;console.log("%s - %s",(r=[R((t=new Date).getHours()),R(t.getMinutes()),R(t.getSeconds())].join(":"),[t.getDate(),q[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=requireInherits_browser(),e._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};var C="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function P(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}e.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(C&&e[C]){var t;if("function"!=typeof(t=e[C]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,C,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,i=new Promise((function(e,i){t=e,r=i})),n=[],o=0;o<arguments.length;o++)n.push(arguments[o]);n.push((function(e,i){e?r(e):t(i)}));try{e.apply(this,n)}catch(e){r(e)}return i}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),C&&Object.defineProperty(t,C,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},e.promisify.custom=C,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var i=t.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var n=this,o=function(){return i.apply(n,arguments)};e.apply(this,t).then((function(e){process$1.nextTick(o.bind(null,null,e))}),(function(e){process$1.nextTick(P.bind(null,e,o))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,r(e)),t}}(util$1)),util$1}function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function t(t){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?e(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}hasRequiredBuffer_list=1;var o=requireDist().Buffer,s=requireUtil$1().inspect,a=s&&s.custom||"inspect";return buffer_list=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return i(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,r,i,n=o.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=n,i=a,o.prototype.copy.call(t,r,i),a+=s.data.length,s=s.next;return n}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,i=t.data;for(e-=i.length;t=t.next;){var n=t.data,o=e>n.length?n.length:e;if(o===n.length?i+=n:i+=n.slice(0,e),0===(e-=o)){o===n.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(o));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var n=r.data,s=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,s),0===(e-=s)){s===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(s));break}++i}return this.length-=i,t}},{key:a,value:function(e,r){return s(this,t(t({},r),{},{depth:0,customInspect:!1}))}}]),e}()}function requireDestroy$1(){if(hasRequiredDestroy$1)return destroy_1$1;function e(e,i){r(e,i),t(e)}function t(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}return hasRequiredDestroy$1=1,destroy_1$1={destroy:function(i,n){var o=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(n?n(i):i&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process$1.nextTick(r,this,i)):process$1.nextTick(r,this,i)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(i||null,(function(r){!n&&r?o._writableState?o._writableState.errorEmitted?process$1.nextTick(t,o):(o._writableState.errorEmitted=!0,process$1.nextTick(e,o,r)):process$1.nextTick(e,o,r):n?(process$1.nextTick(t,o),n(r)):process$1.nextTick(t,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}}}var errorsBrowser={},hasRequiredErrorsBrowser,state,hasRequiredState,browser$d,hasRequiredBrowser$d,_stream_writable$1,hasRequired_stream_writable$1,_stream_duplex$1,hasRequired_stream_duplex$1;function requireErrorsBrowser(){if(hasRequiredErrorsBrowser)return errorsBrowser;hasRequiredErrorsBrowser=1;var e={};function t(t,r,i){i||(i=Error);var n=function(e){var t,i;function n(t,i,n){return e.call(this,function(e,t,i){return"string"==typeof r?r:r(e,t,i)}(t,i,n))||this}return i=e,(t=n).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i,n}(i);n.prototype.name=i.name,n.prototype.code=t,e[t]=n}function r(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}return t("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),t("ERR_INVALID_ARG_TYPE",(function(e,t,i){var n,o,s;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(n," ").concat(r(t,"type"));else{var a=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(r(t,"type"))}return s+=". Received type ".concat(typeof i)}),TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errorsBrowser.codes=e,errorsBrowser}function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var e=requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;return state={getHighWaterMark:function(t,r,i,n){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(r,n,i);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new e(n?i:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}}function requireBrowser$d(){if(hasRequiredBrowser$d)return browser$d;function e(e){try{if(!commonjsGlobal.localStorage)return!1}catch(e){return!1}var t=commonjsGlobal.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}return hasRequiredBrowser$d=1,browser$d=function(t,r){if(e("noDeprecation"))return t;var i=!1;return function(){if(!i){if(e("throwDeprecation"))throw new Error(r);e("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return t.apply(this,arguments)}},browser$d}function require_stream_writable$1(){if(hasRequired_stream_writable$1)return _stream_writable$1;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var i=e.entry;e.entry=null;for(;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}var t;hasRequired_stream_writable$1=1,_stream_writable$1=_,_.WritableState=w;var r={deprecate:requireBrowser$d()},i=requireStreamBrowser$1(),n=requireDist().Buffer,o=(void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,a=requireDestroy$1(),u=requireState().getHighWaterMark,h=requireErrorsBrowser().codes,f=h.ERR_INVALID_ARG_TYPE,l=h.ERR_METHOD_NOT_IMPLEMENTED,c=h.ERR_MULTIPLE_CALLBACK,d=h.ERR_STREAM_CANNOT_PIPE,p=h.ERR_STREAM_DESTROYED,m=h.ERR_STREAM_NULL_VALUES,g=h.ERR_STREAM_WRITE_AFTER_END,y=h.ERR_UNKNOWN_ENCODING,b=a.errorOrDestroy;function v(){}function w(r,i,n){t=t||require_stream_duplex$1(),r=r||{},"boolean"!=typeof n&&(n=i instanceof t),this.objectMode=!!r.objectMode,n&&(this.objectMode=this.objectMode||!!r.writableObjectMode),this.highWaterMark=u(this,r,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===r.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=r.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if("function"!=typeof n)throw new c;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,n){--t.pendingcb,r?(process$1.nextTick(n,i),process$1.nextTick(A,e,t),e._writableState.errorEmitted=!0,b(e,i)):(n(i),e._writableState.errorEmitted=!0,b(e,i),A(e,t))}(e,r,i,t,n);else{var o=R(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||E(e,r),i?process$1.nextTick(S,e,r,o,n):S(e,r,o,n)}}(i,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==r.emitClose,this.autoDestroy=!!r.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function _(e){var r=this instanceof(t=t||require_stream_duplex$1());if(!r&&!s.call(_,this))return new _(e);this._writableState=new w(e,this,r),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),i.call(this)}function M(e,t,r,i,n,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new p("write")):r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function S(e,t,r,i){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),A(e,t)}function E(t,r){r.bufferProcessing=!0;var i=r.bufferedRequest;if(t._writev&&i&&i.next){var n=r.bufferedRequestCount,o=new Array(n),s=r.corkedRequestsFree;s.entry=i;for(var a=0,u=!0;i;)o[a]=i,i.isBuf||(u=!1),i=i.next,a+=1;o.allBuffers=u,M(t,r,!0,r.length,o,"",s.finish),r.pendingcb++,r.lastBufferedRequest=null,s.next?(r.corkedRequestsFree=s.next,s.next=null):r.corkedRequestsFree=new e(r),r.bufferedRequestCount=0}else{for(;i;){var h=i.chunk,f=i.encoding,l=i.callback;if(M(t,r,!1,r.objectMode?1:h.length,h,f,l),i=i.next,r.bufferedRequestCount--,r.writing)break}null===i&&(r.lastBufferedRequest=null)}r.bufferedRequest=i,r.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function q(e,t){e._final((function(r){t.pendingcb--,r&&b(e,r),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var r=R(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process$1.nextTick(q,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}return requireInherits_browser()(_,i),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:r.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===_&&(e&&e._writableState instanceof w)}})):s=function(e){return e instanceof this},_.prototype.pipe=function(){b(this,new d)},_.prototype.write=function(e,t,r){var i,s=this._writableState,a=!1,u=!s.objectMode&&(i=e,n.isBuffer(i)||i instanceof o);return u&&!n.isBuffer(e)&&(e=function(e){return n.from(e)}(e)),"function"==typeof t&&(r=t,t=null),u?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=v),s.ending?function(e,t){var r=new g;b(e,r),process$1.nextTick(t,r)}(this,r):(u||function(e,t,r,i){var n;return null===r?n=new m:"string"==typeof r||t.objectMode||(n=new f("chunk",["string","Buffer"],r)),!n||(b(e,n),process$1.nextTick(i,n),!1)}(this,s,e,r))&&(s.pendingcb++,a=function(e,t,r,i,o,s){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=n.from(t,r));return t}(t,i,o);i!==a&&(r=!0,o="buffer",i=a)}var u=t.objectMode?1:i.length;t.length+=u;var h=t.length<t.highWaterMark;h||(t.needDrain=!0);if(t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:o,isBuf:r,callback:s,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else M(e,t,!1,u,i,o,s);return h}(this,s,u,e,t,r)),a},_.prototype.cork=function(){this._writableState.corked++},_.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||E(this,e))},_.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new y(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(_.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),_.prototype._write=function(e,t,r){r(new l("_write()"))},_.prototype._writev=null,_.prototype.end=function(e,t,r){var i=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,A(e,t),r&&(t.finished?process$1.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(_.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),_.prototype.destroy=a.destroy,_.prototype._undestroy=a.undestroy,_.prototype._destroy=function(e,t){t(e)},_stream_writable$1}function require_stream_duplex$1(){if(hasRequired_stream_duplex$1)return _stream_duplex$1;hasRequired_stream_duplex$1=1;var e=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};_stream_duplex$1=s;var t=require_stream_readable$1(),r=require_stream_writable$1();requireInherits_browser()(s,t);for(var i=e(r.prototype),n=0;n<i.length;n++){var o=i[n];s.prototype[o]||(s.prototype[o]=r.prototype[o])}function s(e){if(!(this instanceof s))return new s(e);t.call(this,e),r.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",a)))}function a(){this._writableState.ended||process$1.nextTick(u,this)}function u(e){e.end()}return Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),_stream_duplex$1}var string_decoder={},safeBuffer$7={exports:{}},hasRequiredSafeBuffer$7,hasRequiredString_decoder,endOfStream,hasRequiredEndOfStream,async_iterator,hasRequiredAsync_iterator,fromBrowser,hasRequiredFromBrowser,_stream_readable$1,hasRequired_stream_readable$1,_stream_transform$1,hasRequired_stream_transform$1,_stream_passthrough$1,hasRequired_stream_passthrough$1,pipeline_1,hasRequiredPipeline,hasRequiredReadableBrowser$1,hasRequiredResponse,hasRequiredRequest,immutable,hasRequiredImmutable,browser$c,hasRequiredBrowser$c;function requireSafeBuffer$7(){return hasRequiredSafeBuffer$7||(hasRequiredSafeBuffer$7=1,function(e,t){var r=requireDist(),i=r.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),n(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(safeBuffer$7,safeBuffer$7.exports)),safeBuffer$7.exports}function requireString_decoder(){if(hasRequiredString_decoder)return string_decoder;hasRequiredString_decoder=1;var e=requireSafeBuffer$7().Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(r){var i;switch(this.encoding=function(r){var i=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(r);if("string"!=typeof i&&(e.isEncoding===t||!t(r)))throw new Error("Unknown encoding: "+r);return i||r}(r),this.encoding){case"utf16le":this.text=o,this.end=s,i=4;break;case"utf8":this.fillLast=n,i=4;break;case"base64":this.text=a,this.end=u,i=3;break;default:return this.write=h,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(i)}function i(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function n(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function a(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function u(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}return string_decoder.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},r.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=i(t[n]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(o=i(t[n]),o>=0)return o>0&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(o=i(t[n]),o>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},string_decoder}function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var e=requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;function t(){}return endOfStream=function r(i,n,o){if("function"==typeof n)return r(i,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}(o||t);var s=n.readable||!1!==n.readable&&i.readable,a=n.writable||!1!==n.writable&&i.writable,u=function(){i.writable||f()},h=i._writableState&&i._writableState.finished,f=function(){a=!1,h=!0,s||o.call(i)},l=i._readableState&&i._readableState.endEmitted,c=function(){s=!1,l=!0,a||o.call(i)},d=function(e){o.call(i,e)},p=function(){var t;return s&&!l?(i._readableState&&i._readableState.ended||(t=new e),o.call(i,t)):a&&!h?(i._writableState&&i._writableState.ended||(t=new e),o.call(i,t)):void 0},m=function(){i.req.on("finish",f)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(i)?a&&!i._writableState&&(i.on("end",u),i.on("close",u)):(i.on("complete",f),i.on("abort",p),i.req?m():i.on("request",m)),i.on("end",c),i.on("finish",f),!1!==n.error&&i.on("error",d),i.on("close",p),function(){i.removeListener("complete",f),i.removeListener("abort",p),i.removeListener("request",m),i.req&&i.req.removeListener("finish",f),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",f),i.removeListener("end",c),i.removeListener("error",d),i.removeListener("close",p)}},endOfStream}function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;var e;function t(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}hasRequiredAsync_iterator=1;var r=requireEndOfStream(),i=Symbol("lastResolve"),n=Symbol("lastReject"),o=Symbol("error"),s=Symbol("ended"),a=Symbol("lastPromise"),u=Symbol("handlePromise"),h=Symbol("stream");function f(e,t){return{value:e,done:t}}function l(e){var t=e[i];if(null!==t){var r=e[h].read();null!==r&&(e[a]=null,e[i]=null,e[n]=null,t(f(r,!1)))}}function c(e){process$1.nextTick(l,e)}var d=Object.getPrototypeOf((function(){})),p=Object.setPrototypeOf((t(e={get stream(){return this[h]},next:function(){var e=this,t=this[o];if(null!==t)return Promise.reject(t);if(this[s])return Promise.resolve(f(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){process$1.nextTick((function(){e[o]?r(e[o]):t(f(void 0,!0))}))}));var r,i=this[a];if(i)r=new Promise(function(e,t){return function(r,i){e.then((function(){t[s]?r(f(void 0,!0)):t[u](r,i)}),i)}}(i,this));else{var n=this[h].read();if(null!==n)return Promise.resolve(f(n,!1));r=new Promise(this[u])}return this[a]=r,r}},Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(f(void 0,!0))}))}))})),e),d);return async_iterator=function(e){var l,d=Object.create(p,(t(l={},h,{value:e,writable:!0}),t(l,i,{value:null,writable:!0}),t(l,n,{value:null,writable:!0}),t(l,o,{value:null,writable:!0}),t(l,s,{value:e._readableState.endEmitted,writable:!0}),t(l,u,{value:function(e,t){var r=d[h].read();r?(d[a]=null,d[i]=null,d[n]=null,e(f(r,!1))):(d[i]=e,d[n]=t)},writable:!0}),l));return d[a]=null,r(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=d[n];return null!==t&&(d[a]=null,d[i]=null,d[n]=null,t(e)),void(d[o]=e)}var r=d[i];null!==r&&(d[a]=null,d[i]=null,d[n]=null,r(f(void 0,!0))),d[s]=!0})),e.on("readable",c.bind(null,d)),d}}function requireFromBrowser(){return hasRequiredFromBrowser?fromBrowser:(hasRequiredFromBrowser=1,fromBrowser=function(){throw new Error("Readable.from is not available in the browser")})}function require_stream_readable$1(){if(hasRequired_stream_readable$1)return _stream_readable$1;var e;hasRequired_stream_readable$1=1,_stream_readable$1=_,_.ReadableState=w,requireEvents().EventEmitter;var t=function(e,t){return e.listeners(t).length},r=requireStreamBrowser$1(),i=requireDist().Buffer,n=(void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var o,s=requireUtil$1();o=s&&s.debuglog?s.debuglog("stream"):function(){};var a,u,h,f=requireBuffer_list(),l=requireDestroy$1(),c=requireState().getHighWaterMark,d=requireErrorsBrowser().codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_STREAM_PUSH_AFTER_EOF,g=d.ERR_METHOD_NOT_IMPLEMENTED,y=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;requireInherits_browser()(_,r);var b=l.errorOrDestroy,v=["error","close","destroy","pause","resume"];function w(t,r,i){e=e||require_stream_duplex$1(),t=t||{},"boolean"!=typeof i&&(i=r instanceof e),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=c(this,t,"readableHighWaterMark",i),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(a||(a=requireString_decoder().StringDecoder),this.decoder=new a(t.encoding),this.encoding=t.encoding)}function _(t){if(e=e||require_stream_duplex$1(),!(this instanceof _))return new _(t);var i=this instanceof e;this._readableState=new w(t,this,i),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),r.call(this)}function M(e,t,r,s,a){o("readableAddChunk",t);var u,h=e._readableState;if(null===t)h.reading=!1,function(e,t){if(o("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?q(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,A(e)))}(e,h);else if(a||(u=function(e,t){var r;o=t,i.isBuffer(o)||o instanceof n||"string"==typeof t||void 0===t||e.objectMode||(r=new p("chunk",["string","Buffer","Uint8Array"],t));var o;return r}(h,t)),u)b(e,u);else if(h.objectMode||t&&t.length>0)if("string"==typeof t||h.objectMode||Object.getPrototypeOf(t)===i.prototype||(t=function(e){return i.from(e)}(t)),s)h.endEmitted?b(e,new y):S(e,h,t,!0);else if(h.ended)b(e,new m);else{if(h.destroyed)return!1;h.reading=!1,h.decoder&&!r?(t=h.decoder.write(t),h.objectMode||0!==t.length?S(e,h,t,!1):C(e,h)):S(e,h,t,!1)}else s||(h.reading=!1,C(e,h));return!h.ended&&(h.length<h.highWaterMark||0===h.length)}function S(e,t,r,i){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&q(e)),C(e,t)}Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=l.destroy,_.prototype._undestroy=l.undestroy,_.prototype._destroy=function(e,t){t(e)},_.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=i.from(e,t),t=""),r=!0),M(this,e,t,!1,r)},_.prototype.unshift=function(e){return M(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){a||(a=requireString_decoder().StringDecoder);var t=new a(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var E=1073741824;function R(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=E?e=E:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function q(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,process$1.nextTick(A,e))}function A(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,k(e)}function C(e,t){t.readingMore||(t.readingMore=!0,process$1.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(o("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function I(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function O(e){o("readable nexttick read 0"),e.read(0)}function B(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),k(e),t.flowing&&!t.reading&&e.read(0)}function k(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function T(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function x(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process$1.nextTick(N,t,e))}function N(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function j(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}return _.prototype.read=function(e){o("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?x(this):q(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&x(this),null;var i,n=t.needReadable;return o("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&o("length less than watermark",n=!0),t.ended||t.reading?o("reading or ended",n=!1):n&&(o("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(r,t))),null===(i=e>0?T(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&x(this)),null!==i&&this.emit("data",i),i},_.prototype._read=function(e){b(this,new g("_read()"))},_.prototype.pipe=function(e,r){var i=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,r);var s=(!r||!1!==r.end)&&e!==process$1.stdout&&e!==process$1.stderr?u:m;function a(t,r){o("onunpipe"),t===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,o("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",h),e.removeListener("error",c),e.removeListener("unpipe",a),i.removeListener("end",u),i.removeListener("end",m),i.removeListener("data",l),f=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){o("onend"),e.end()}n.endEmitted?process$1.nextTick(s):i.once("end",s),e.on("unpipe",a);var h=function(e){return function(){var r=e._readableState;o("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,0===r.awaitDrain&&t(e,"data")&&(r.flowing=!0,k(e))}}(i);e.on("drain",h);var f=!1;function l(t){o("ondata");var r=e.write(t);o("dest.write",r),!1===r&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==j(n.pipes,e))&&!f&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),i.pause())}function c(r){o("onerror",r),m(),e.removeListener("error",c),0===t(e,"error")&&b(e,r)}function d(){e.removeListener("finish",p),m()}function p(){o("onfinish"),e.removeListener("close",d),m()}function m(){o("unpipe"),i.unpipe(e)}return i.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",c),e.once("close",d),e.once("finish",p),e.emit("pipe",i),n.flowing||(o("pipe resume"),i.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=j(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},_.prototype.on=function(e,t){var i=r.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?q(this):n.reading||process$1.nextTick(O,this))),i},_.prototype.addListener=_.prototype.on,_.prototype.removeListener=function(e,t){var i=r.prototype.removeListener.call(this,e,t);return"readable"===e&&process$1.nextTick(I,this),i},_.prototype.removeAllListeners=function(e){var t=r.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process$1.nextTick(I,this),t},_.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process$1.nextTick(B,e,t))}(this,e)),e.paused=!1,this},_.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},_.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var n in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(o("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(t.push(n)||(i=!0,e.pause()))})),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var s=0;s<v.length;s++)e.on(v[s],this.emit.bind(this,v[s]));return this._read=function(t){o("wrapped _read",t),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(_.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=requireAsync_iterator()),u(this)}),Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(_.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(_.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),_._fromList=T,Object.defineProperty(_.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(_.from=function(e,t){return void 0===h&&(h=requireFromBrowser()),h(_,e,t)}),_stream_readable$1}function require_stream_transform$1(){if(hasRequired_stream_transform$1)return _stream_transform$1;hasRequired_stream_transform$1=1,_stream_transform$1=a;var e=requireErrorsBrowser().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,r=e.ERR_MULTIPLE_CALLBACK,i=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=e.ERR_TRANSFORM_WITH_LENGTH_0,o=require_stream_duplex$1();function s(e,t){var i=this._transformState;i.transforming=!1;var n=i.writecb;if(null===n)return this.emit("error",new r);i.writechunk=null,i.writecb=null,null!=t&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);o.call(this,e),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",u)}function u(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new n;if(e._transformState.transforming)throw new i;return e.push(null)}return requireInherits_browser()(a,o),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,o.prototype.push.call(this,e,t)},a.prototype._transform=function(e,r,i){i(new t("_transform()"))},a.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},a.prototype._destroy=function(e,t){o.prototype._destroy.call(this,e,(function(e){t(e)}))},_stream_transform$1}function require_stream_passthrough$1(){if(hasRequired_stream_passthrough$1)return _stream_passthrough$1;hasRequired_stream_passthrough$1=1,_stream_passthrough$1=t;var e=require_stream_transform$1();function t(r){if(!(this instanceof t))return new t(r);e.call(this,r)}return requireInherits_browser()(t,e),t.prototype._transform=function(e,t,r){r(null,e)},_stream_passthrough$1}function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;var e;hasRequiredPipeline=1;var t=requireErrorsBrowser().codes,r=t.ERR_MISSING_ARGS,i=t.ERR_STREAM_DESTROYED;function n(e){if(e)throw e}function o(e){e()}function s(e,t){return e.pipe(t)}return pipeline_1=function(){for(var t=arguments.length,a=new Array(t),u=0;u<t;u++)a[u]=arguments[u];var h,f=function(e){return e.length?"function"!=typeof e[e.length-1]?n:e.pop():n}(a);if(Array.isArray(a[0])&&(a=a[0]),a.length<2)throw new r("streams");var l=a.map((function(t,r){var n=r<a.length-1;return function(t,r,n,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===e&&(e=requireEndOfStream()),e(t,{readable:r,writable:n},(function(e){if(e)return o(e);s=!0,o()}));var a=!1;return function(e){if(!s&&!a)return a=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new i("pipe"))}}(t,n,r>0,(function(e){h||(h=e),e&&l.forEach(o),n||(l.forEach(o),f(h))}))}));return a.reduce(s)},pipeline_1}function requireReadableBrowser$1(){return hasRequiredReadableBrowser$1||(hasRequiredReadableBrowser$1=1,e=readableBrowser$1,t=readableBrowser$1.exports,(t=e.exports=require_stream_readable$1()).Stream=t,t.Readable=t,t.Writable=require_stream_writable$1(),t.Duplex=require_stream_duplex$1(),t.Transform=require_stream_transform$1(),t.PassThrough=require_stream_passthrough$1(),t.finished=requireEndOfStream(),t.pipeline=requirePipeline()),readableBrowser$1.exports;var e,t}function requireResponse(){if(hasRequiredResponse)return response;hasRequiredResponse=1;var e=requireCapability(),t=requireInherits_browser(),r=requireReadableBrowser$1(),i=response.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=response.IncomingMessage=function(t,i,n,o){var s=this;if(r.Readable.call(s),s._mode=n,s.headers={},s.rawHeaders=[],s.trailers={},s.rawTrailers=[],s.on("end",(function(){process$1.nextTick((function(){s.emit("close")}))})),"fetch"===n){let t=function(){u.read().then((function(e){s._destroyed||(o(e.done),e.done?s.push(null):(s.push(Buffer.from(e.value)),t()))})).catch((function(e){o(!0),s._destroyed||s.emit("error",e)}))};if(s._fetchResponse=i,s.url=i.url,s.statusCode=i.status,s.statusMessage=i.statusText,i.headers.forEach((function(e,t){s.headers[t.toLowerCase()]=e,s.rawHeaders.push(t,e)})),e.writableStream){var a=new WritableStream({write:function(e){return o(!1),new Promise((function(t,r){s._destroyed?r():s.push(Buffer.from(e))?t():s._resumeFetch=t}))},close:function(){o(!0),s._destroyed||s.push(null)},abort:function(e){o(!0),s._destroyed||s.emit("error",e)}});try{return void i.body.pipeTo(a).catch((function(e){o(!0),s._destroyed||s.emit("error",e)}))}catch(e){}}var u=i.body.getReader();t()}else{if(s._xhr=t,s._pos=0,s.url=t.responseURL,s.statusCode=t.status,s.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===s.headers[r]&&(s.headers[r]=[]),s.headers[r].push(t[2])):void 0!==s.headers[r]?s.headers[r]+=", "+t[2]:s.headers[r]=t[2],s.rawHeaders.push(t[1],t[2])}})),s._charset="x-user-defined",!e.overrideMimeType){var h=s.rawHeaders["mime-type"];if(h){var f=h.match(/;\s*charset=([^;])(;|$)/);f&&(s._charset=f[1].toLowerCase())}s._charset||(s._charset="utf-8")}}};return t(n,r.Readable),n.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},n.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,n=null;switch(t._mode){case"text":if((n=r.responseText).length>t._pos){var o=n.substr(t._pos);if("x-user-defined"===t._charset){for(var s=Buffer.alloc(o.length),a=0;a<o.length;a++)s[a]=255&o.charCodeAt(a);t.push(s)}else t.push(o,t._charset);t._pos=n.length}break;case"arraybuffer":if(r.readyState!==i.DONE||!r.response)break;n=r.response,t.push(Buffer.from(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=r.response,r.readyState!==i.LOADING||!n)break;t.push(Buffer.from(new Uint8Array(n)));break;case"ms-stream":if(n=r.response,r.readyState!==i.LOADING)break;var u=new commonjsGlobal.MSStreamReader;u.onprogress=function(){u.result.byteLength>t._pos&&(t.push(Buffer.from(new Uint8Array(u.result.slice(t._pos)))),t._pos=u.result.byteLength)},u.onload=function(){e(!0),t.push(null)},u.readAsArrayBuffer(n)}t._xhr.readyState===i.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))},response}function requireRequest(){if(hasRequiredRequest)return request.exports;hasRequiredRequest=1;var e=requireCapability(),t=requireInherits_browser(),r=requireResponse(),i=requireReadableBrowser$1(),n=r.IncomingMessage,o=r.readyStates;var s=request.exports=function(t){var r,n=this;i.Writable.call(n),n._opts=t,n._body=[],n._headers={},t.auth&&n.setHeader("Authorization","Basic "+Buffer.from(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){n.setHeader(e,t.headers[e])}));var o=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!e.abortController)o=!1,r=!0;else if("prefer-streaming"===t.mode)r=!1;else if("allow-wrong-content-type"===t.mode)r=!e.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");r=!0}n._mode=function(t,r){return e.fetch&&r?"fetch":e.mozchunkedarraybuffer?"moz-chunked-arraybuffer":e.msstream?"ms-stream":e.arraybuffer&&t?"arraybuffer":"text"}(r,o),n._fetchTimer=null,n._socketTimeout=null,n._socketTimer=null,n.on("finish",(function(){n._onFinish()}))};t(s,i.Writable),s.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===a.indexOf(r)&&(this._headers[r]={name:e,value:t})},s.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},s.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},s.prototype._onFinish=function(){var t=this;if(!t._destroyed){var r=t._opts;"timeout"in r&&0!==r.timeout&&t.setTimeout(r.timeout);var i=t._headers,n=null;"GET"!==r.method&&"HEAD"!==r.method&&(n=new Blob(t._body,{type:(i["content-type"]||{}).value||""}));var s=[];if(Object.keys(i).forEach((function(e){var t=i[e].name,r=i[e].value;Array.isArray(r)?r.forEach((function(e){s.push([t,e])})):s.push([t,r])})),"fetch"===t._mode){var a=null;if(e.abortController){var u=new AbortController;a=u.signal,t._fetchAbortController=u,"requestTimeout"in r&&0!==r.requestTimeout&&(t._fetchTimer=commonjsGlobal.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),r.requestTimeout))}commonjsGlobal.fetch(t._opts.url,{method:t._opts.method,headers:s,body:n||void 0,mode:"cors",credentials:r.withCredentials?"include":"same-origin",signal:a}).then((function(e){t._fetchResponse=e,t._resetTimers(!1),t._connect()}),(function(e){t._resetTimers(!0),t._destroyed||t.emit("error",e)}))}else{var h=t._xhr=new commonjsGlobal.XMLHttpRequest;try{h.open(t._opts.method,t._opts.url,!0)}catch(e){return void process$1.nextTick((function(){t.emit("error",e)}))}"responseType"in h&&(h.responseType=t._mode),"withCredentials"in h&&(h.withCredentials=!!r.withCredentials),"text"===t._mode&&"overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in r&&(h.timeout=r.requestTimeout,h.ontimeout=function(){t.emit("requestTimeout")}),s.forEach((function(e){h.setRequestHeader(e[0],e[1])})),t._response=null,h.onreadystatechange=function(){switch(h.readyState){case o.LOADING:case o.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(h.onprogress=function(){t._onXHRProgress()}),h.onerror=function(){t._destroyed||(t._resetTimers(!0),t.emit("error",new Error("XHR error")))};try{h.send(n)}catch(e){return void process$1.nextTick((function(){t.emit("error",e)}))}}}},s.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},s.prototype._connect=function(){var e=this;e._destroyed||(e._response=new n(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},s.prototype._write=function(e,t,r){this._body.push(e),r()},s.prototype._resetTimers=function(e){var t=this;commonjsGlobal.clearTimeout(t._socketTimer),t._socketTimer=null,e?(commonjsGlobal.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=commonjsGlobal.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},s.prototype.abort=s.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},s.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),i.Writable.prototype.end.call(this,e,t,r)},s.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},s.prototype.flushHeaders=function(){},s.prototype.setNoDelay=function(){},s.prototype.setSocketKeepAlive=function(){};var a=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"];return request.exports}function requireImmutable(){if(hasRequiredImmutable)return immutable;hasRequiredImmutable=1,immutable=function(){for(var t={},r=0;r<arguments.length;r++){var i=arguments[r];for(var n in i)e.call(i,n)&&(t[n]=i[n])}return t};var e=Object.prototype.hasOwnProperty;return immutable}function requireBrowser$c(){return hasRequiredBrowser$c?browser$c:(hasRequiredBrowser$c=1,browser$c={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"})}var url={exports:{}},punycode$1={exports:{}},punycode=punycode$1.exports,hasRequiredPunycode,utils$4,hasRequiredUtils$4,formats,hasRequiredFormats,stringify_1,hasRequiredStringify,parse,hasRequiredParse,lib,hasRequiredLib,hasRequiredUrl,hasRequiredStreamHttp,hasRequiredHttpsBrowserify;function requirePunycode(){return hasRequiredPunycode||(hasRequiredPunycode=1,e=punycode$1,t=punycode$1.exports,function(r){var i=t&&!t.nodeType&&t,n=e&&!e.nodeType&&e,o="object"==typeof commonjsGlobal&&commonjsGlobal;o.global!==o&&o.window!==o&&o.self!==o||(r=o);var s,a,u=2147483647,h=36,f=/^xn--/,l=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,m=String.fromCharCode;function g(e){throw new RangeError(d[e])}function y(e,t){for(var r=e.length,i=[];r--;)i[r]=t(e[r]);return i}function b(e,t){var r=e.split("@"),i="";return r.length>1&&(i=r[0]+"@",e=r[1]),i+y((e=e.replace(c,".")).split("."),t).join(".")}function v(e){for(var t,r,i=[],n=0,o=e.length;n<o;)(t=e.charCodeAt(n++))>=55296&&t<=56319&&n<o?56320==(64512&(r=e.charCodeAt(n++)))?i.push(((1023&t)<<10)+(1023&r)+65536):(i.push(t),n--):i.push(t);return i}function w(e){return y(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)})).join("")}function _(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function M(e,t,r){var i=0;for(e=r?p(e/700):e>>1,e+=p(e/t);e>455;i+=h)e=p(e/35);return p(i+36*e/(e+38))}function S(e){var t,r,i,n,o,s,a,f,l,c,d,m=[],y=e.length,b=0,v=128,_=72;for((r=e.lastIndexOf("-"))<0&&(r=0),i=0;i<r;++i)e.charCodeAt(i)>=128&&g("not-basic"),m.push(e.charCodeAt(i));for(n=r>0?r+1:0;n<y;){for(o=b,s=1,a=h;n>=y&&g("invalid-input"),((f=(d=e.charCodeAt(n++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:h)>=h||f>p((u-b)/s))&&g("overflow"),b+=f*s,!(f<(l=a<=_?1:a>=_+26?26:a-_));a+=h)s>p(u/(c=h-l))&&g("overflow"),s*=c;_=M(b-o,t=m.length+1,0==o),p(b/t)>u-v&&g("overflow"),v+=p(b/t),b%=t,m.splice(b++,0,v)}return w(m)}function E(e){var t,r,i,n,o,s,a,f,l,c,d,y,b,w,S,E=[];for(y=(e=v(e)).length,t=128,r=0,o=72,s=0;s<y;++s)(d=e[s])<128&&E.push(m(d));for(i=n=E.length,n&&E.push("-");i<y;){for(a=u,s=0;s<y;++s)(d=e[s])>=t&&d<a&&(a=d);for(a-t>p((u-r)/(b=i+1))&&g("overflow"),r+=(a-t)*b,t=a,s=0;s<y;++s)if((d=e[s])<t&&++r>u&&g("overflow"),d==t){for(f=r,l=h;!(f<(c=l<=o?1:l>=o+26?26:l-o));l+=h)S=f-c,w=h-c,E.push(m(_(c+S%w,0))),f=p(S/w);E.push(m(_(f,0))),o=M(r,b,i==n),r=0,++i}++r,++t}return E.join("")}if(s={version:"1.4.1",ucs2:{decode:v,encode:w},decode:S,encode:E,toASCII:function(e){return b(e,(function(e){return l.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){return b(e,(function(e){return f.test(e)?S(e.slice(4).toLowerCase()):e}))}},i&&n)if(e.exports==i)n.exports=s;else for(a in s)s.hasOwnProperty(a)&&(i[a]=s[a]);else r.punycode=s}(punycode)),punycode$1.exports;var e,t}function requireUtils$4(){if(hasRequiredUtils$4)return utils$4;hasRequiredUtils$4=1;var e=Object.prototype.hasOwnProperty,t=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),r=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)void 0!==e[i]&&(r[i]=e[i]);return r};return utils$4={arrayToObject:r,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],i=0;i<t.length;++i)for(var n=t[i],o=n.obj[n.prop],s=Object.keys(o),a=0;a<s.length;++a){var u=s[a],h=o[u];"object"==typeof h&&null!==h&&-1===r.indexOf(h)&&(t.push({obj:o,prop:u}),r.push(h))}return function(e){for(var t;e.length;){var r=e.pop();if(t=r.obj[r.prop],Array.isArray(t)){for(var i=[],n=0;n<t.length;++n)void 0!==t[n]&&i.push(t[n]);r.obj[r.prop]=i}}return t}(t)},decode:function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},encode:function(e){if(0===e.length)return e;for(var r="string"==typeof e?e:String(e),i="",n=0;n<r.length;++n){var o=r.charCodeAt(n);45===o||46===o||95===o||126===o||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?i+=r.charAt(n):o<128?i+=t[o]:o<2048?i+=t[192|o>>6]+t[128|63&o]:o<55296||o>=57344?i+=t[224|o>>12]+t[128|o>>6&63]+t[128|63&o]:(n+=1,o=65536+((1023&o)<<10|1023&r.charCodeAt(n)),i+=t[240|o>>18]+t[128|o>>12&63]+t[128|o>>6&63]+t[128|63&o])}return i},isBuffer:function(e){return null!=e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function t(i,n,o){if(!n)return i;if("object"!=typeof n){if(Array.isArray(i))i.push(n);else{if(!i||"object"!=typeof i)return[i,n];(o&&(o.plainObjects||o.allowPrototypes)||!e.call(Object.prototype,n))&&(i[n]=!0)}return i}if(!i||"object"!=typeof i)return[i].concat(n);var s=i;return Array.isArray(i)&&!Array.isArray(n)&&(s=r(i,o)),Array.isArray(i)&&Array.isArray(n)?(n.forEach((function(r,n){if(e.call(i,n)){var s=i[n];s&&"object"==typeof s&&r&&"object"==typeof r?i[n]=t(s,r,o):i.push(r)}else i[n]=r})),i):Object.keys(n).reduce((function(r,i){var s=n[i];return e.call(r,i)?r[i]=t(r[i],s,o):r[i]=s,r}),s)}}}function requireFormats(){if(hasRequiredFormats)return formats;hasRequiredFormats=1;var e=String.prototype.replace,t=/%20/g;return formats={default:"RFC3986",formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:"RFC3986"}}function requireStringify(){if(hasRequiredStringify)return stringify_1;hasRequiredStringify=1;var e=requireUtils$4(),t=requireFormats(),r={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},i=Array.isArray,n=Array.prototype.push,o=function(e,t){n.apply(e,i(t)?t:[t])},s=Date.prototype.toISOString,a={delimiter:"&",encode:!0,encoder:e.encode,encodeValuesOnly:!1,serializeDate:function(e){return s.call(e)},skipNulls:!1,strictNullHandling:!1},u=function t(r,n,s,u,h,f,l,c,d,p,m,g){var y=r;if("function"==typeof l?y=l(n,y):y instanceof Date&&(y=p(y)),null===y){if(u)return f&&!g?f(n,a.encoder):n;y=""}if("string"==typeof y||"number"==typeof y||"boolean"==typeof y||e.isBuffer(y))return f?[m(g?n:f(n,a.encoder))+"="+m(f(y,a.encoder))]:[m(n)+"="+m(String(y))];var b,v=[];if(void 0===y)return v;if(i(l))b=l;else{var w=Object.keys(y);b=c?w.sort(c):w}for(var _=0;_<b.length;++_){var M=b[_];h&&null===y[M]||(i(y)?o(v,t(y[M],s(n,M),s,u,h,f,l,c,d,p,m,g)):o(v,t(y[M],n+(d?"."+M:"["+M+"]"),s,u,h,f,l,c,d,p,m,g)))}return v};return stringify_1=function(n,s){var h=n,f=s?e.assign({},s):{};if(null!==f.encoder&&void 0!==f.encoder&&"function"!=typeof f.encoder)throw new TypeError("Encoder has to be a function.");var l=void 0===f.delimiter?a.delimiter:f.delimiter,c="boolean"==typeof f.strictNullHandling?f.strictNullHandling:a.strictNullHandling,d="boolean"==typeof f.skipNulls?f.skipNulls:a.skipNulls,p="boolean"==typeof f.encode?f.encode:a.encode,m="function"==typeof f.encoder?f.encoder:a.encoder,g="function"==typeof f.sort?f.sort:null,y=void 0!==f.allowDots&&f.allowDots,b="function"==typeof f.serializeDate?f.serializeDate:a.serializeDate,v="boolean"==typeof f.encodeValuesOnly?f.encodeValuesOnly:a.encodeValuesOnly;if(void 0===f.format)f.format=t.default;else if(!Object.prototype.hasOwnProperty.call(t.formatters,f.format))throw new TypeError("Unknown format option provided.");var w,_,M=t.formatters[f.format];"function"==typeof f.filter?h=(_=f.filter)("",h):i(f.filter)&&(w=_=f.filter);var S,E=[];if("object"!=typeof h||null===h)return"";S=f.arrayFormat in r?f.arrayFormat:"indices"in f?f.indices?"indices":"repeat":"indices";var R=r[S];w||(w=Object.keys(h)),g&&w.sort(g);for(var q=0;q<w.length;++q){var A=w[q];d&&null===h[A]||o(E,u(h[A],A,R,c,d,p?m:null,_,g,y,b,M,v))}var C=E.join(l),P=!0===f.addQueryPrefix?"?":"";return C.length>0?P+C:""}}function requireParse(){if(hasRequiredParse)return parse;hasRequiredParse=1;var e=requireUtils$4(),t=Object.prototype.hasOwnProperty,r={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:e.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},i=function(e,r,i){if(e){var n=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,s=/(\[[^[\]]*])/.exec(n),a=s?n.slice(0,s.index):n,u=[];if(a){if(!i.plainObjects&&t.call(Object.prototype,a)&&!i.allowPrototypes)return;u.push(a)}for(var h=0;null!==(s=o.exec(n))&&h<i.depth;){if(h+=1,!i.plainObjects&&t.call(Object.prototype,s[1].slice(1,-1))&&!i.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+n.slice(s.index)+"]"),function(e,t,r){for(var i=t,n=e.length-1;n>=0;--n){var o,s=e[n];if("[]"===s&&r.parseArrays)o=[].concat(i);else{o=r.plainObjects?Object.create(null):{};var a="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(a,10);r.parseArrays||""!==a?!isNaN(u)&&s!==a&&String(u)===a&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(o=[])[u]=i:"__proto__"!==a&&(o[a]=i):o={0:i}}i=o}return i}(u,r,i)}};return parse=function(n,o){var s=o?e.assign({},o):{};if(null!==s.decoder&&void 0!==s.decoder&&"function"!=typeof s.decoder)throw new TypeError("Decoder has to be a function.");if(s.ignoreQueryPrefix=!0===s.ignoreQueryPrefix,s.delimiter="string"==typeof s.delimiter||e.isRegExp(s.delimiter)?s.delimiter:r.delimiter,s.depth="number"==typeof s.depth?s.depth:r.depth,s.arrayLimit="number"==typeof s.arrayLimit?s.arrayLimit:r.arrayLimit,s.parseArrays=!1!==s.parseArrays,s.decoder="function"==typeof s.decoder?s.decoder:r.decoder,s.allowDots="boolean"==typeof s.allowDots?s.allowDots:r.allowDots,s.plainObjects="boolean"==typeof s.plainObjects?s.plainObjects:r.plainObjects,s.allowPrototypes="boolean"==typeof s.allowPrototypes?s.allowPrototypes:r.allowPrototypes,s.parameterLimit="number"==typeof s.parameterLimit?s.parameterLimit:r.parameterLimit,s.strictNullHandling="boolean"==typeof s.strictNullHandling?s.strictNullHandling:r.strictNullHandling,""===n||null==n)return s.plainObjects?Object.create(null):{};for(var a="string"==typeof n?function(e,i){for(var n={},o=i.ignoreQueryPrefix?e.replace(/^\?/,""):e,s=i.parameterLimit===1/0?void 0:i.parameterLimit,a=o.split(i.delimiter,s),u=0;u<a.length;++u){var h,f,l=a[u],c=l.indexOf("]="),d=-1===c?l.indexOf("="):c+1;-1===d?(h=i.decoder(l,r.decoder),f=i.strictNullHandling?null:""):(h=i.decoder(l.slice(0,d),r.decoder),f=i.decoder(l.slice(d+1),r.decoder)),t.call(n,h)?n[h]=[].concat(n[h]).concat(f):n[h]=f}return n}(n,s):n,u=s.plainObjects?Object.create(null):{},h=Object.keys(a),f=0;f<h.length;++f){var l=h[f],c=i(l,a[l],s);u=e.merge(u,c,s)}return e.compact(u)}}function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var e=requireStringify(),t=requireParse(),r=requireFormats();return lib={formats:r,parse:t,stringify:e}}function requireUrl(){return hasRequiredUrl||(hasRequiredUrl=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=requirePunycode(),i=requireLib();function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(r),s=n(i),a=o.default;function u(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var h=/^([a-z0-9.+-]+:)/i,f=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),d=["'"].concat(c),p=["%","/","?",";","#"].concat(d),m=["/","?","#"],g=/^[+a-z0-9A-Z_-]{0,63}$/,y=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},w={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=s.default;function M(e,t,r){if(e&&"object"==typeof e&&e instanceof u)return e;var i=new u;return i.parse(e,t,r),i}u.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),n=-1!==i&&i<e.indexOf("#")?"?":"#",o=e.split(n);o[0]=o[0].replace(/\\/g,"/");var s=e=o.join(n);if(s=s.trim(),!r&&1===e.split("#").length){var u=l.exec(s);if(u)return this.path=s,this.href=s,this.pathname=u[1],u[2]?(this.search=u[2],this.query=t?_.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var f=h.exec(s);if(f){var c=(f=f[0]).toLowerCase();this.protocol=c,s=s.substr(f.length)}if(r||f||s.match(/^\/\/[^@/]+@[^@/]+/)){var M="//"===s.substr(0,2);!M||f&&v[f]||(s=s.substr(2),this.slashes=!0)}if(!v[f]&&(M||f&&!w[f])){for(var S,E,R=-1,q=0;q<m.length;q++){-1!==(A=s.indexOf(m[q]))&&(-1===R||A<R)&&(R=A)}-1!==(E=-1===R?s.lastIndexOf("@"):s.lastIndexOf("@",R))&&(S=s.slice(0,E),s=s.slice(E+1),this.auth=decodeURIComponent(S)),R=-1;for(q=0;q<p.length;q++){var A;-1!==(A=s.indexOf(p[q]))&&(-1===R||A<R)&&(R=A)}-1===R&&(R=s.length),this.host=s.slice(0,R),s=s.slice(R),this.parseHost(),this.hostname=this.hostname||"";var C="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!C)for(var P=this.hostname.split(/\./),I=(q=0,P.length);q<I;q++){var O=P[q];if(O&&!O.match(g)){for(var B="",k=0,T=O.length;k<T;k++)O.charCodeAt(k)>127?B+="x":B+=O[k];if(!B.match(g)){var x=P.slice(0,q),N=P.slice(q+1),j=O.match(y);j&&(x.push(j[1]),N.unshift(j[2])),N.length&&(s="/"+N.join(".")+s),this.hostname=x.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=a.toASCII(this.hostname));var $=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+$,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!b[c])for(q=0,I=d.length;q<I;q++){var U=d[q];if(-1!==s.indexOf(U)){var L=encodeURIComponent(U);L===U&&(L=escape(U)),s=s.split(U).join(L)}}var F=s.indexOf("#");-1!==F&&(this.hash=s.substr(F),s=s.slice(0,F));var z=s.indexOf("?");if(-1!==z?(this.search=s.substr(z),this.query=s.substr(z+1),t&&(this.query=_.parse(this.query)),s=s.slice(0,z)):t&&(this.search="",this.query={}),s&&(this.pathname=s),w[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){$=this.pathname||"";var H=this.search||"";this.path=$+H}return this.href=this.format(),this},u.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",i=this.hash||"",n=!1,o="";this.host?n=e+this.host:this.hostname&&(n=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(o=_.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||w[t])&&!1!==n?(n="//"+(n||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):n||(n=""),i&&"#"!==i.charAt(0)&&(i="#"+i),s&&"?"!==s.charAt(0)&&(s="?"+s),t+n+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+i},u.prototype.resolve=function(e){return this.resolveObject(M(e,!1,!0)).format()},u.prototype.resolveObject=function(e){if("string"==typeof e){var t=new u;t.parse(e,!1,!0),e=t}for(var r=new u,i=Object.keys(this),n=0;n<i.length;n++){var o=i[n];r[o]=this[o]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),a=0;a<s.length;a++){var h=s[a];"protocol"!==h&&(r[h]=e[h])}return w[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!w[e.protocol]){for(var f=Object.keys(e),l=0;l<f.length;l++){var c=f[l];r[c]=e[c]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||v[e.protocol])r.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var p=r.pathname||"",m=r.search||"";r.path=p+m}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var g=r.pathname&&"/"===r.pathname.charAt(0),y=e.host||e.pathname&&"/"===e.pathname.charAt(0),b=y||g||r.host&&e.pathname,_=b,M=r.pathname&&r.pathname.split("/")||[],S=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!w[r.protocol]);if(S&&(r.hostname="",r.port=null,r.host&&(""===M[0]?M[0]=r.host:M.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),b=b&&(""===d[0]||""===M[0])),y)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,M=d;else if(d.length)M||(M=[]),M.pop(),M=M.concat(d),r.search=e.search,r.query=e.query;else if(null!=e.search){if(S)r.host=M.shift(),r.hostname=r.host,(C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=C.shift(),r.hostname=C.shift(),r.host=r.hostname);return r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!M.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=M.slice(-1)[0],R=(r.host||e.host||M.length>1)&&("."===E||".."===E)||""===E,q=0,A=M.length;A>=0;A--)"."===(E=M[A])?M.splice(A,1):".."===E?(M.splice(A,1),q++):q&&(M.splice(A,1),q--);if(!b&&!_)for(;q--;q)M.unshift("..");!b||""===M[0]||M[0]&&"/"===M[0].charAt(0)||M.unshift(""),R&&"/"!==M.join("/").substr(-1)&&M.push("");var C,P=""===M[0]||M[0]&&"/"===M[0].charAt(0);S&&(r.hostname=P?"":M.length?M.shift():"",r.host=r.hostname,(C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=C.shift(),r.hostname=C.shift(),r.host=r.hostname));return(b=b||r.host&&M.length)&&!P&&M.unshift(""),M.length>0?r.pathname=M.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},u.prototype.parseHost=function(){var e=this.host,t=f.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var S=M,E=function(e,t){return M(e,!1,!0).resolve(t)},R=function(e,t){return e?M(e,!1,!0).resolveObject(t):t},q=function(e){return"string"==typeof e&&(e=M(e)),e instanceof u?e.format():u.prototype.format.call(e)},A=u;var C=function(e){function t(){var t=this||self;return delete e.prototype.__magic__,t}return"object"==typeof globalThis?globalThis:this?t():(e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:t}),__magic__)}(Object),P=q,I=S,O=E,B=A,k=C.URL,T=C.URLSearchParams,x=/%/g,N=/\\/g,j=/\n/g,$=/\r/g,D=/\t/g;var U=function(e){if(void 0===e)throw new TypeError('The "domain" argument must be specified');return new k("http://"+e).hostname},L=function(e){if(void 0===e)throw new TypeError('The "domain" argument must be specified');return new k("http://"+e).hostname},F=function(e){var t=new k("file://"),r=function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:"/";if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");i&&(e=i+"/"+e,t="/"===i.charAt(0))}return e=function(e,t){for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}(function(e,t){if(e.filter)return e.filter(t);for(var r=[],i=0;i<e.length;i++)t(e[i],i,e)&&r.push(e[i]);return r}(e.split("/"),(function(e){return!!e})),!t).join("/"),(t?"/":"")+e||"."}(e);return 47===e.charCodeAt(e.length-1)&&"/"!==r[r.length-1]&&(r+="/"),t.pathname=function(e){return e.includes("%")&&(e=e.replace(x,"%25")),e.includes("\\")&&(e=e.replace(N,"%5C")),e.includes("\n")&&(e=e.replace(j,"%0A")),e.includes("\r")&&(e=e.replace($,"%0D")),e.includes("\t")&&(e=e.replace(D,"%09")),e}(r),t},z=function(e){if(!function(e){var t=null!=e?e:null;return Boolean(null!==t&&(null==t?void 0:t.href)&&(null==t?void 0:t.origin))}(e)&&"string"!=typeof e)throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type '+typeof e+" ("+e+")");var t=new k(e);if("file:"!==t.protocol)throw new TypeError("The URL must be of scheme file");return function(e){if(""!==e.hostname)throw new TypeError('File URL host must be "localhost" or empty on browser');for(var t=e.pathname,r=0;r<t.length;r++)if("%"===t[r]){var i=32|t.codePointAt(r+2);if("2"===t[r+1]&&102===i)throw new TypeError("File URL path must not include encoded / characters")}return decodeURIComponent(t)}(t)},H=function(e,t){var r,i,n;if(void 0===t&&(t={}),!(e instanceof k))return P(e);if("object"!=typeof t||null===t)throw new TypeError('The "options" argument must be of type object.');var o=null==(r=t.auth)||r,s=null==(i=t.fragment)||i,a=null==(n=t.search)||n;t.unicode;var u=new k(e.toString());return o||(u.username="",u.password=""),s||(u.hash=""),a||(u.search=""),u.toString()},K={format:H,parse:I,resolve:O,resolveObject:R,Url:B,URL:k,URLSearchParams:T,domainToASCII:U,domainToUnicode:L,pathToFileURL:F,fileURLToPath:z};t.URL=k,t.URLSearchParams=T,t.Url=B,t.default=K,t.domainToASCII=U,t.domainToUnicode=L,t.fileURLToPath=z,t.format=H,t.parse=I,t.pathToFileURL=F,t.resolve=O,t.resolveObject=R,t=e.exports=K}(url,url.exports)),url.exports}function requireStreamHttp(){return hasRequiredStreamHttp||(hasRequiredStreamHttp=1,e=streamHttp,t=requireRequest(),r=requireResponse(),i=requireImmutable(),n=requireBrowser$c(),o=requireUrl(),(s=e).request=function(e,r){e="string"==typeof e?o.parse(e):i(e);var n=-1===commonjsGlobal.location.protocol.search(/^https?:$/)?"http:":"",s=e.protocol||n,a=e.hostname||e.host,u=e.port,h=e.path||"/";a&&-1!==a.indexOf(":")&&(a="["+a+"]"),e.url=(a?s+"//"+a:"")+(u?":"+u:"")+h,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new t(e);return r&&f.on("response",r),f},s.get=function(e,t){var r=s.request(e,t);return r.end(),r},s.ClientRequest=t,s.IncomingMessage=r.IncomingMessage,s.Agent=function(){},s.Agent.defaultMaxSockets=4,s.globalAgent=new s.Agent,s.STATUS_CODES=n,s.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]),streamHttp;var e,t,r,i,n,o,s}function requireHttpsBrowserify(){return hasRequiredHttpsBrowserify||(hasRequiredHttpsBrowserify=1,function(e){var t=requireStreamHttp(),r=requireUrl(),i=e.exports;for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);function o(e){if("string"==typeof e&&(e=r.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}i.request=function(e,r){return e=o(e),t.request.call(this,e,r)},i.get=function(e,r){return e=o(e),t.get.call(this,e,r)}}(httpsBrowserify)),httpsBrowserify.exports}requireHttpsBrowserify(),requireStreamHttp();const _ParseError=class extends Error{constructor(e,t){super(t),this.code=e;let r=t;CoreManager.get("PARSE_ERRORS").forEach((t=>{t.code===e&&t.code&&(r=t.message)})),Object.defineProperty(this,"message",{enumerable:!0,value:r})}toString(){return"ParseError: "+this.code+" "+this.message}};_ParseError.OTHER_CAUSE=-1,_ParseError.INTERNAL_SERVER_ERROR=1,_ParseError.CONNECTION_FAILED=100,_ParseError.OBJECT_NOT_FOUND=101,_ParseError.INVALID_QUERY=102,_ParseError.INVALID_CLASS_NAME=103,_ParseError.MISSING_OBJECT_ID=104,_ParseError.INVALID_KEY_NAME=105,_ParseError.INVALID_POINTER=106,_ParseError.INVALID_JSON=107,_ParseError.COMMAND_UNAVAILABLE=108,_ParseError.NOT_INITIALIZED=109,_ParseError.INCORRECT_TYPE=111,_ParseError.INVALID_CHANNEL_NAME=112,_ParseError.PUSH_MISCONFIGURED=115,_ParseError.OBJECT_TOO_LARGE=116,_ParseError.OPERATION_FORBIDDEN=119,_ParseError.CACHE_MISS=120,_ParseError.INVALID_NESTED_KEY=121,_ParseError.INVALID_FILE_NAME=122,_ParseError.INVALID_ACL=123,_ParseError.TIMEOUT=124,_ParseError.INVALID_EMAIL_ADDRESS=125,_ParseError.MISSING_CONTENT_TYPE=126,_ParseError.MISSING_CONTENT_LENGTH=127,_ParseError.INVALID_CONTENT_LENGTH=128,_ParseError.FILE_TOO_LARGE=129,_ParseError.FILE_SAVE_ERROR=130,_ParseError.DUPLICATE_VALUE=137,_ParseError.INVALID_ROLE_NAME=139,_ParseError.EXCEEDED_QUOTA=140,_ParseError.SCRIPT_FAILED=141,_ParseError.VALIDATION_ERROR=142,_ParseError.INVALID_IMAGE_DATA=143,_ParseError.UNSAVED_FILE_ERROR=151,_ParseError.INVALID_PUSH_TIME_ERROR=152,_ParseError.FILE_DELETE_ERROR=153,_ParseError.FILE_DELETE_UNNAMED_ERROR=161,_ParseError.REQUEST_LIMIT_EXCEEDED=155,_ParseError.DUPLICATE_REQUEST=159,_ParseError.INVALID_EVENT_NAME=160,_ParseError.INVALID_VALUE=162,_ParseError.USERNAME_MISSING=200,_ParseError.PASSWORD_MISSING=201,_ParseError.USERNAME_TAKEN=202,_ParseError.EMAIL_TAKEN=203,_ParseError.EMAIL_MISSING=204,_ParseError.EMAIL_NOT_FOUND=205,_ParseError.SESSION_MISSING=206,_ParseError.MUST_CREATE_USER_THROUGH_SIGNUP=207,_ParseError.ACCOUNT_ALREADY_LINKED=208,_ParseError.INVALID_SESSION_TOKEN=209,_ParseError.MFA_ERROR=210,_ParseError.MFA_TOKEN_REQUIRED=211,_ParseError.LINKED_ID_MISSING=250,_ParseError.INVALID_LINKED_SESSION=251,_ParseError.UNSUPPORTED_SERVICE=252,_ParseError.INVALID_SCHEMA_OPERATION=255,_ParseError.AGGREGATE_ERROR=600,_ParseError.FILE_READ_ERROR=601,_ParseError.X_DOMAIN_REQUEST=602;let ParseError=_ParseError,XHR$1=null;function b64Digit(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.")}"undefined"!=typeof XMLHttpRequest&&(XHR$1=XMLHttpRequest);class ParseFile{constructor(e,t,r,i,n){const o=r||"";if(this._name=e,this._metadata=i||{},this._tags=n||{},void 0!==t)if(Array.isArray(t)||t instanceof Uint8Array)this._data=ParseFile.encodeBase64(t),this._source={format:"base64",base64:this._data,type:o};else if("undefined"!=typeof Blob&&t instanceof Blob)this._source={format:"file",file:t,type:o};else if(t&&"string"==typeof t.uri&&void 0!==t.uri)this._source={format:"uri",uri:t.uri,type:o};else{if(!t||"string"!=typeof t.base64)throw new TypeError("Cannot create a Parse.File with that data.");{const e=t.base64.split(",").slice(-1)[0],r=o||t.base64.split(";").slice(0,1)[0].split(":").slice(1,2)[0]||"text/plain";this._data=e,this._source={format:"base64",base64:e,type:r}}}}async getData(){if(this._data)return this._data;if(!this._url)throw new Error("Cannot retrieve data for unsaved ParseFile.");const e={requestTask:e=>this._requestTask=e},t=CoreManager.getFileController(),r=await t.download(this._url,e);return this._data=r.base64,this._data}name(){return this._name}url(e){if(e=e||{},this._url)return e.forceSecure?this._url.replace(/^http:\/\//i,"https://"):this._url}metadata(){return this._metadata}tags(){return this._tags}save(e){(e=e||{}).requestTask=e=>this._requestTask=e,e.metadata=this._metadata,e.tags=this._tags;const t=CoreManager.getFileController();if(this._previousSave||("file"===this._source.format?this._previousSave=t.saveFile(this._name,this._source,e).then((e=>(this._name=e.name,this._url=e.url,this._data=null,this._requestTask=null,this))):"uri"===this._source.format?this._previousSave=t.download(this._source.uri,e).then((r=>{if(!r||!r.base64)return{};const i={format:"base64",base64:r.base64,type:r.contentType};return this._data=r.base64,this._requestTask=null,t.saveBase64(this._name,i,e)})).then((e=>(this._name=e.name,this._url=e.url,this._requestTask=null,this))):this._previousSave=t.saveBase64(this._name,this._source,e).then((e=>(this._name=e.name,this._url=e.url,this._requestTask=null,this)))),this._previousSave)return this._previousSave}cancel(){this._requestTask&&"function"==typeof this._requestTask.abort&&(this._requestTask._aborted=!0,this._requestTask.abort()),this._requestTask=null}destroy(e={}){if(!this._name)throw new ParseError(ParseError.FILE_DELETE_UNNAMED_ERROR,"Cannot delete an unnamed file.");const t={useMasterKey:!0};Object.hasOwn(e,"useMasterKey")&&(t.useMasterKey=!!e.useMasterKey);return CoreManager.getFileController().deleteFile(this._name,t).then((()=>(this._data=void 0,this._requestTask=null,this)))}toJSON(){return{__type:"File",name:this._name,url:this._url}}equals(e){return this===e||e instanceof ParseFile&&this.name()===e.name()&&this.url()===e.url()&&void 0!==this.url()}setMetadata(e){e&&"object"==typeof e&&Object.keys(e).forEach((t=>{this.addMetadata(t,e[t])}))}addMetadata(e,t){"string"==typeof e&&(this._metadata[e]=t)}setTags(e){e&&"object"==typeof e&&Object.keys(e).forEach((t=>{this.addTag(t,e[t])}))}addTag(e,t){"string"==typeof e&&(this._tags[e]=t)}static fromJSON(e){if("File"!==e.__type)throw new TypeError("JSON object does not represent a ParseFile");const t=new ParseFile(e.name);return t._url=e.url,t}static encodeBase64(e){const t=[];t.length=Math.ceil(e.length/3);for(let r=0;r<t.length;r++){const i=e[3*r],n=e[3*r+1]||0,o=e[3*r+2]||0,s=3*r+1<e.length,a=3*r+2<e.length;t[r]=[b64Digit(i>>2&63),b64Digit(i<<4&48|n>>4&15),s?b64Digit(n<<2&60|o>>6&3):"=",a?b64Digit(63&o):"="].join("")}return t.join("")}}const DefaultController$a={saveFile:async function(e,t,r){if("file"!==t.format)throw new Error("saveFile can only be used with File-type sources.");const i=await new Promise(((e,r)=>{const i=new FileReader;i.onload=()=>e(i.result),i.onerror=e=>r(e),i.readAsDataURL(t.file)})),[n,o]=i.split(","),s={format:"base64",base64:o||n,type:t.type||(t.file?t.file.type:void 0)};return await DefaultController$a.saveBase64(e,s,r)},saveBase64:function(e,t,r={}){if("base64"!==t.format)throw new Error("saveBase64 can only be used with Base64-type sources.");const i={base64:t.base64,fileData:{metadata:{...r.metadata},tags:{...r.tags}}};delete r.metadata,delete r.tags,t.type&&(i._ContentType=t.type);const n="files/"+e;return CoreManager.getRESTController().request("POST",n,i,r)},download:function(e,t){return XHR$1?this.downloadAjax(e,t):Promise.reject("Cannot make a request: No definition of XMLHttpRequest was found.")},downloadAjax:function(e,t){return new Promise(((r,i)=>{const n=new XHR$1;n.open("GET",e,!0),n.responseType="arraybuffer",n.onerror=function(e){i(e)},n.onreadystatechange=function(){if(n.readyState!==n.DONE)return;if(!this.response)return r({});const e=new Uint8Array(this.response);r({base64:ParseFile.encodeBase64(e),contentType:n.getResponseHeader("content-type")})},t.requestTask(n),n.send()}))},deleteFile:function(e,t){const r={"X-Parse-Application-ID":CoreManager.get("APPLICATION_ID")};t.useMasterKey&&(r["X-Parse-Master-Key"]=CoreManager.get("MASTER_KEY"));let i=CoreManager.get("SERVER_URL");return"/"!==i[i.length-1]&&(i+="/"),i+="files/"+e,CoreManager.getRESTController().ajax("DELETE",i,"",r).catch((e=>e&&"SyntaxError: Unexpected end of JSON input"!==e?CoreManager.getRESTController().handleError(e):Promise.resolve()))},_setXHR(e){XHR$1=e},_getXHR:()=>XHR$1};CoreManager.setFileController(DefaultController$a);class ParseGeoPoint{constructor(e,t){Array.isArray(e)?(ParseGeoPoint._validate(e[0],e[1]),this._latitude=e[0],this._longitude=e[1]):"object"==typeof e?(ParseGeoPoint._validate(e.latitude,e.longitude),this._latitude=e.latitude,this._longitude=e.longitude):void 0!==e&&void 0!==t?(ParseGeoPoint._validate(e,t),this._latitude=e,this._longitude=t):(this._latitude=0,this._longitude=0)}get latitude(){return this._latitude}set latitude(e){ParseGeoPoint._validate(e,this.longitude),this._latitude=e}get longitude(){return this._longitude}set longitude(e){ParseGeoPoint._validate(this.latitude,e),this._longitude=e}toJSON(){return ParseGeoPoint._validate(this._latitude,this._longitude),{__type:"GeoPoint",latitude:this._latitude,longitude:this._longitude}}equals(e){return e instanceof ParseGeoPoint&&this.latitude===e.latitude&&this.longitude===e.longitude}radiansTo(e){const t=Math.PI/180,r=this.latitude*t,i=this.longitude*t,n=e.latitude*t,o=r-n,s=i-e.longitude*t,a=Math.sin(o/2),u=Math.sin(s/2);let h=a*a+Math.cos(r)*Math.cos(n)*u*u;return h=Math.min(1,h),2*Math.asin(Math.sqrt(h))}kilometersTo(e){return 6371*this.radiansTo(e)}milesTo(e){return 3958.8*this.radiansTo(e)}static _validate(e,t){if(isNaN(e)||isNaN(t)||"number"!=typeof e||"number"!=typeof 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.")}static current(e){return new Promise(((t,r)=>{navigator.geolocation.getCurrentPosition((e=>{t(new ParseGeoPoint(e.coords.latitude,e.coords.longitude))}),r,e)}))}}class ParsePolygon{constructor(e){this._coordinates=ParsePolygon._validate(e)}get coordinates(){return this._coordinates}set coordinates(e){this._coordinates=ParsePolygon._validate(e)}toJSON(){return ParsePolygon._validate(this._coordinates),{__type:"Polygon",coordinates:this._coordinates}}equals(e){if(!(e instanceof ParsePolygon)||this.coordinates.length!==e.coordinates.length)return!1;let t=!0;for(let r=1;r<this._coordinates.length;r+=1)if(this._coordinates[r][0]!=e.coordinates[r][0]||this._coordinates[r][1]!=e.coordinates[r][1]){t=!1;break}return t}containsPoint(e){let t=this._coordinates[0][0],r=this._coordinates[0][0],i=this._coordinates[0][1],n=this._coordinates[0][1];for(let e=1;e<this._coordinates.length;e+=1){const o=this._coordinates[e];t=Math.min(o[0],t),r=Math.max(o[0],r),i=Math.min(o[1],i),n=Math.max(o[1],n)}if(e.latitude<t||e.latitude>r||e.longitude<i||e.longitude>n)return!1;let o=!1;for(let t=0,r=this._coordinates.length-1;t<this._coordinates.length;r=t++){const i=this._coordinates[t][0],n=this._coordinates[t][1],s=this._coordinates[r][0],a=this._coordinates[r][1];n>e.longitude!=a>e.longitude&&e.latitude<(s-i)*(e.longitude-n)/(a-n)+i&&(o=!o)}return o}static _validate(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");const t=[];for(let r=0;r<e.length;r+=1){const i=e[r];let n;if(i instanceof ParseGeoPoint)n=i;else{if(!Array.isArray(i)||2!==i.length)throw new TypeError("Coordinates must be an Array of GeoPoints or Points");n=new ParseGeoPoint(i[0],i[1])}t.push([n.latitude,n.longitude])}return t}}class ParseRelation{constructor(e,t){this.parent=e,this.key=t,this.targetClassName=null}_ensureParentAndKey(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}add(e){Array.isArray(e)||(e=[e]);const{RelationOp:t}=CoreManager.getParseOp(),r=new t(e,[]),i=this.parent;if(!i)throw new Error("Cannot add to a Relation without a parent");return 0===e.length||(i.set(this.key,r),this.targetClassName=r._targetClassName),i}remove(e){Array.isArray(e)||(e=[e]);const{RelationOp:t}=CoreManager.getParseOp(),r=new t([],e);if(!this.parent)throw new Error("Cannot remove from a Relation without a parent");0!==e.length&&(this.parent.set(this.key,r),this.targetClassName=r._targetClassName)}toJSON(){return{__type:"Relation",className:this.targetClassName}}query(){let e;const t=this.parent;if(!t)throw new Error("Cannot construct a query for a Relation without a parent");const r=CoreManager.getParseQuery();return this.targetClassName?e=new r(this.targetClassName):(e=new r(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}}function decode(e){if(null===e||"object"!=typeof e||e instanceof Date)return e;if(Array.isArray(e)){const t=[];return e.forEach(((e,r)=>{t[r]=decode(e)})),t}if("string"==typeof e.__op){const{opFromJSON:t}=CoreManager.getParseOp();return t(e)}const t=CoreManager.getParseObject();if("Pointer"===e.__type&&e.className)return t.fromJSON(e);if("Object"===e.__type&&e.className)return t.fromJSON(e);if("Relation"===e.__type){const t=new ParseRelation(null,null);return t.targetClassName=e.className,t}if("Date"===e.__type)return new Date(e.iso);if("File"===e.__type)return ParseFile.fromJSON(e);if("GeoPoint"===e.__type)return new ParseGeoPoint({latitude:e.latitude,longitude:e.longitude});if("Polygon"===e.__type)return new ParsePolygon(e.coordinates);const r={};for(const t in e)r[t]=decode(e[t]);return r}const PUBLIC_KEY$1="*";class ParseACL{constructor(e){if(this.permissionsById={},e&&"object"==typeof e){if(e instanceof CoreManager.getParseUser())this.setReadAccess(e,!0),this.setWriteAccess(e,!0);else for(const t in e){const r=e[t];this.permissionsById[t]={};for(const e in r){const i=r[e];if("read"!==e&&"write"!==e)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[t][e]=i}}}else if("function"==typeof e)throw new TypeError("ParseACL constructed with a function. Did you forget ()?")}toJSON(){const e={};for(const t in this.permissionsById)e[t]=this.permissionsById[t];return e}equals(e){if(!(e instanceof ParseACL))return!1;const t=Object.keys(this.permissionsById),r=Object.keys(e.permissionsById);if(t.length!==r.length)return!1;for(const t in this.permissionsById){if(!e.permissionsById[t])return!1;if(this.permissionsById[t].read!==e.permissionsById[t].read)return!1;if(this.permissionsById[t].write!==e.permissionsById[t].write)return!1}return!0}_setAccess(e,t,r){const i=CoreManager.getParseRole();if(t instanceof CoreManager.getParseUser())t=t.id;else if(t instanceof i){const e=t.getName();if(!e)throw new TypeError("Role must have a name");t="role:"+e}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.");let n=this.permissionsById[t];if(!n){if(!r)return;n={},this.permissionsById[t]=n}r?this.permissionsById[t][e]=!0:(delete n[e],0===Object.keys(n).length&&delete this.permissionsById[t])}_getAccess(e,t){const r=CoreManager.getParseRole();if(t instanceof CoreManager.getParseUser()){if(!(t=t.id))throw new Error("Cannot get access for a ParseUser without an ID")}else if(t instanceof r){const e=t.getName();if(!e)throw new TypeError("Role must have a name");t="role:"+e}const i=this.permissionsById[t];return!!i&&!!i[e]}setReadAccess(e,t){this._setAccess("read",e,t)}getReadAccess(e){return this._getAccess("read",e)}setWriteAccess(e,t){this._setAccess("write",e,t)}getWriteAccess(e){return this._getAccess("write",e)}setPublicReadAccess(e){this.setReadAccess(PUBLIC_KEY$1,e)}getPublicReadAccess(){return this.getReadAccess(PUBLIC_KEY$1)}setPublicWriteAccess(e){this.setWriteAccess(PUBLIC_KEY$1,e)}getPublicWriteAccess(){return this.getWriteAccess(PUBLIC_KEY$1)}getRoleReadAccess(e){if(e instanceof CoreManager.getParseRole()&&(e=e.getName()),"string"!=typeof e)throw new TypeError("role must be a ParseRole or a String");return this.getReadAccess("role:"+e)}getRoleWriteAccess(e){if(e instanceof CoreManager.getParseRole()&&(e=e.getName()),"string"!=typeof e)throw new TypeError("role must be a ParseRole or a String");return this.getWriteAccess("role:"+e)}setRoleReadAccess(e,t){if(e instanceof CoreManager.getParseRole()&&(e=e.getName()),"string"!=typeof e)throw new TypeError("role must be a ParseRole or a String");this.setReadAccess("role:"+e,t)}setRoleWriteAccess(e,t){if(e instanceof CoreManager.getParseRole()&&(e=e.getName()),"string"!=typeof e)throw new TypeError("role must be a ParseRole or a String");this.setWriteAccess("role:"+e,t)}}function encode(e,t,r,i,n){if(e instanceof CoreManager.getParseObject()){if(t)throw new Error("Parse Objects not allowed here");const o=e.id?e.className+":"+e.id:e;return r||!i||i.indexOf(o)>-1||e.dirty()||Object.keys(e._getServerData()).length<1?n&&e._getId().startsWith("local")?e.toOfflinePointer():e.toPointer():(i=i.concat(o),e._toFullJSON(i,n))}const{Op:o}=CoreManager.getParseOp();if(e instanceof o||e instanceof ParseACL||e instanceof ParseGeoPoint||e instanceof ParsePolygon||e instanceof ParseRelation)return e.toJSON();if(e instanceof ParseFile){if(!e.url())throw new Error("Tried to encode an unsaved file.");return e.toJSON()}if("[object Date]"===Object.prototype.toString.call(e)){if(isNaN(e))throw new Error("Tried to encode an invalid date.");return{__type:"Date",iso:e.toJSON()}}if("[object RegExp]"===Object.prototype.toString.call(e)&&"string"==typeof e.source)return e.source;if(Array.isArray(e))return e.map((e=>encode(e,t,r,i,n)));if(e&&"object"==typeof e){const o={};for(const s in e)o[s]=encode(e[s],t,r,i,n);return o}return e}function encode$1(e,t,r,i,n){return encode(e,!!t,!!r,i||[],n)}var CryptoJS_1,hasRequiredCryptoJS;function requireCryptoJS(){if(hasRequiredCryptoJS)return CryptoJS_1;hasRequiredCryptoJS=1;let e=function(e){var t={},r=t.lib={},i=function(){},n=r.Base={extend:function(e){i.prototype=this;var t=new i;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=r.WordArray=n.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||a).stringify(this)},concat:function(e){var t=this.words,r=e.words,i=this.sigBytes;if(e=e.sigBytes,this.clamp(),i%4)for(var n=0;n<e;n++)t[i+n>>>2]|=(r[n>>>2]>>>24-n%4*8&255)<<24-(i+n)%4*8;else if(65535<r.length)for(n=0;n<e;n+=4)t[i+n>>>2]=r[n>>>2];else t.push.apply(t,r);return this.sigBytes+=e,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=n.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r=[],i=0;i<t;i+=4)r.push(4294967296*e.random()|0);return new o.init(r,t)}}),s=t.enc={},a=s.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],i=0;i<e;i++){var n=t[i>>>2]>>>24-i%4*8&255;r.push((n>>>4).toString(16)),r.push((15&n).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i<t;i+=2)r[i>>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new o.init(r,t/2)}},u=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],i=0;i<e;i++)r.push(String.fromCharCode(t[i>>>2]>>>24-i%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i<t;i++)r[i>>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new o.init(r,t)}},h=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},f=r.BufferedBlockAlgorithm=n.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,i=r.words,n=r.sigBytes,s=this.blockSize,a=n/(4*s);if(t=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,n=e.min(4*t,n),t){for(var u=0;u<t;u+=s)this._doProcessBlock(i,u);u=i.splice(0,t),r.sigBytes-=n}return new o.init(u,n)},clone:function(){var e=n.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});r.Hasher=f.extend({cfg:n.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new l.HMAC.init(e,r).finalize(t)}}});var l=t.algo={};return t}(Math);var t,r;return r=(t=e).lib.WordArray,t.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,i=this._map;e.clamp(),e=[];for(var n=0;n<r;n+=3)for(var o=(t[n>>>2]>>>24-n%4*8&255)<<16|(t[n+1>>>2]>>>24-(n+1)%4*8&255)<<8|t[n+2>>>2]>>>24-(n+2)%4*8&255,s=0;4>s&&n+.75*s<r;s++)e.push(i.charAt(o>>>6*(3-s)&63));if(t=i.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var t=e.length,i=this._map;(n=i.charAt(64))&&-1!=(n=e.indexOf(n))&&(t=n);for(var n=[],o=0,s=0;s<t;s++)if(s%4){var a=i.indexOf(e.charAt(s-1))<<s%4*2,u=i.indexOf(e.charAt(s))>>>6-s%4*2;n[o>>>2]|=(a|u)<<24-o%4*8,o++}return r.create(n,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(t){function r(e,t,r,i,n,o,s){return((e=e+(t&r|~t&i)+n+s)<<o|e>>>32-o)+t}function i(e,t,r,i,n,o,s){return((e=e+(t&i|r&~i)+n+s)<<o|e>>>32-o)+t}function n(e,t,r,i,n,o,s){return((e=e+(t^r^i)+n+s)<<o|e>>>32-o)+t}function o(e,t,r,i,n,o,s){return((e=e+(r^(t|~i))+n+s)<<o|e>>>32-o)+t}for(var s=e,a=(h=s.lib).WordArray,u=h.Hasher,h=s.algo,f=[],l=0;64>l;l++)f[l]=4294967296*t.abs(t.sin(l+1))|0;h=h.MD5=u.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var s=0;16>s;s++){var a=e[u=t+s];e[u]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}s=this._hash.words;var u=e[t+0],h=(a=e[t+1],e[t+2]),l=e[t+3],c=e[t+4],d=e[t+5],p=e[t+6],m=e[t+7],g=e[t+8],y=e[t+9],b=e[t+10],v=e[t+11],w=e[t+12],_=e[t+13],M=e[t+14],S=e[t+15],E=r(E=s[0],A=s[1],q=s[2],R=s[3],u,7,f[0]),R=r(R,E,A,q,a,12,f[1]),q=r(q,R,E,A,h,17,f[2]),A=r(A,q,R,E,l,22,f[3]);E=r(E,A,q,R,c,7,f[4]),R=r(R,E,A,q,d,12,f[5]),q=r(q,R,E,A,p,17,f[6]),A=r(A,q,R,E,m,22,f[7]),E=r(E,A,q,R,g,7,f[8]),R=r(R,E,A,q,y,12,f[9]),q=r(q,R,E,A,b,17,f[10]),A=r(A,q,R,E,v,22,f[11]),E=r(E,A,q,R,w,7,f[12]),R=r(R,E,A,q,_,12,f[13]),q=r(q,R,E,A,M,17,f[14]),E=i(E,A=r(A,q,R,E,S,22,f[15]),q,R,a,5,f[16]),R=i(R,E,A,q,p,9,f[17]),q=i(q,R,E,A,v,14,f[18]),A=i(A,q,R,E,u,20,f[19]),E=i(E,A,q,R,d,5,f[20]),R=i(R,E,A,q,b,9,f[21]),q=i(q,R,E,A,S,14,f[22]),A=i(A,q,R,E,c,20,f[23]),E=i(E,A,q,R,y,5,f[24]),R=i(R,E,A,q,M,9,f[25]),q=i(q,R,E,A,l,14,f[26]),A=i(A,q,R,E,g,20,f[27]),E=i(E,A,q,R,_,5,f[28]),R=i(R,E,A,q,h,9,f[29]),q=i(q,R,E,A,m,14,f[30]),E=n(E,A=i(A,q,R,E,w,20,f[31]),q,R,d,4,f[32]),R=n(R,E,A,q,g,11,f[33]),q=n(q,R,E,A,v,16,f[34]),A=n(A,q,R,E,M,23,f[35]),E=n(E,A,q,R,a,4,f[36]),R=n(R,E,A,q,c,11,f[37]),q=n(q,R,E,A,m,16,f[38]),A=n(A,q,R,E,b,23,f[39]),E=n(E,A,q,R,_,4,f[40]),R=n(R,E,A,q,u,11,f[41]),q=n(q,R,E,A,l,16,f[42]),A=n(A,q,R,E,p,23,f[43]),E=n(E,A,q,R,y,4,f[44]),R=n(R,E,A,q,w,11,f[45]),q=n(q,R,E,A,S,16,f[46]),E=o(E,A=n(A,q,R,E,h,23,f[47]),q,R,u,6,f[48]),R=o(R,E,A,q,m,10,f[49]),q=o(q,R,E,A,M,15,f[50]),A=o(A,q,R,E,d,21,f[51]),E=o(E,A,q,R,w,6,f[52]),R=o(R,E,A,q,l,10,f[53]),q=o(q,R,E,A,b,15,f[54]),A=o(A,q,R,E,a,21,f[55]),E=o(E,A,q,R,g,6,f[56]),R=o(R,E,A,q,S,10,f[57]),q=o(q,R,E,A,p,15,f[58]),A=o(A,q,R,E,_,21,f[59]),E=o(E,A,q,R,c,6,f[60]),R=o(R,E,A,q,v,10,f[61]),q=o(q,R,E,A,h,15,f[62]),A=o(A,q,R,E,y,21,f[63]);s[0]=s[0]+E|0,s[1]=s[1]+A|0,s[2]=s[2]+q|0,s[3]=s[3]+R|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;r[n>>>5]|=128<<24-n%32;var o=t.floor(i/4294967296);for(r[15+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(n+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),e.sigBytes=4*(r.length+1),this._process(),r=(e=this._hash).words,i=0;4>i;i++)n=r[i],r[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8);return e},clone:function(){var e=u.clone.call(this);return e._hash=this._hash.clone(),e}}),s.MD5=u._createHelper(h),s.HmacMD5=u._createHmacHelper(h)}(Math),function(){var t,r=e,i=(t=r.lib).Base,n=t.WordArray,o=(t=r.algo).EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:t.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=(a=this.cfg).hasher.create(),i=n.create(),o=i.words,s=a.keySize,a=a.iterations;o.length<s;){u&&r.update(u);var u=r.update(e).finalize(t);r.reset();for(var h=1;h<a;h++)u=r.finalize(u),r.reset();i.concat(u)}return i.sigBytes=4*s,i}});r.EvpKDF=function(e,t,r){return o.create(r).compute(e,t)}}(),e.lib.Cipher||function(){var t=(d=e).lib,r=t.Base,i=t.WordArray,n=t.BufferedBlockAlgorithm,o=d.enc.Base64,s=d.algo.EvpKDF,a=t.Cipher=n.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){n.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(t,r,i){return("string"==typeof r?p:c).encrypt(e,t,r,i)},decrypt:function(t,r,i){return("string"==typeof r?p:c).decrypt(e,t,r,i)}}}});t.StreamCipher=a.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var u=d.mode={},h=function(e,t,r){var i=this._iv;i?this._iv=undefined:i=this._prevBlock;for(var n=0;n<r;n++)e[t+n]^=i[n]},f=(t.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}})).extend();f.Encryptor=f.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;h.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),f.Decryptor=f.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,n=e.slice(t,t+i);r.decryptBlock(e,t),h.call(this,e,t,i),this._prevBlock=n}}),u=u.CBC=f,f=(d.pad={}).Pkcs7={pad:function(e,t){for(var r,n=(r=(r=4*t)-e.sigBytes%r)<<24|r<<16|r<<8|r,o=[],s=0;s<r;s+=4)o.push(n);r=i.create(o,r),e.concat(r)},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},t.BlockCipher=a.extend({cfg:a.cfg.extend({mode:u,padding:f}),reset:function(){a.reset.call(this);var e=(t=this.cfg).iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=t.createEncryptor;else r=t.createDecryptor,this._minBufferSize=1;this._mode=r.call(t,this,e&&e.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var l=t.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),c=(u=(d.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return((e=e.salt)?i.create([1398893684,1701076831]).concat(e).concat(t):t).toString(o)},parse:function(e){var t=(e=o.parse(e)).words;if(1398893684==t[0]&&1701076831==t[1]){var r=i.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return l.create({ciphertext:e,salt:r})}},t.SerializableCipher=r.extend({cfg:r.extend({format:u}),encrypt:function(e,t,r,i){i=this.cfg.extend(i);var n=e.createEncryptor(r,i);return t=n.finalize(t),n=n.cfg,l.create({ciphertext:t,key:r,iv:n.iv,algorithm:e,mode:n.mode,padding:n.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,r,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),e.createDecryptor(r,i).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}})),d=(d.kdf={}).OpenSSL={execute:function(e,t,r,n){return n||(n=i.random(8)),e=s.create({keySize:t+r}).compute(e,n),r=i.create(e.words.slice(t),4*r),e.sigBytes=4*t,l.create({key:e,iv:r,salt:n})}},p=t.PasswordBasedCipher=c.extend({cfg:c.cfg.extend({kdf:d}),encrypt:function(e,t,r,i){return r=(i=this.cfg.extend(i)).kdf.execute(r,e.keySize,e.ivSize),i.iv=r.iv,(e=c.encrypt.call(this,e,t,r.key,i)).mixIn(r),e},decrypt:function(e,t,r,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),r=i.kdf.execute(r,e.keySize,e.ivSize,t.salt),i.iv=r.iv,c.decrypt.call(this,e,t,r.key,i)}})}(),function(){for(var t=e,r=t.lib.BlockCipher,i=t.algo,n=[],o=[],s=[],a=[],u=[],h=[],f=[],l=[],c=[],d=[],p=[],m=0;256>m;m++)p[m]=128>m?m<<1:m<<1^283;var g=0,y=0;for(m=0;256>m;m++){var b=(b=y^y<<1^y<<2^y<<3^y<<4)>>>8^255&b^99;n[g]=b,o[b]=g;var v=p[g],w=p[v],_=p[w],M=257*p[b]^16843008*b;s[g]=M<<24|M>>>8,a[g]=M<<16|M>>>16,u[g]=M<<8|M>>>24,h[g]=M,M=16843009*_^65537*w^257*v^16843008*g,f[b]=M<<24|M>>>8,l[b]=M<<16|M>>>16,c[b]=M<<8|M>>>24,d[b]=M,g?(g=v^p[p[p[_^v]]],y^=p[p[y]]):g=y=1}var S=[0,1,2,4,8,16,32,64,128,27,54];i=i.AES=r.extend({_doReset:function(){for(var e=(r=this._key).words,t=r.sigBytes/4,r=4*((this._nRounds=t+6)+1),i=this._keySchedule=[],o=0;o<r;o++)if(o<t)i[o]=e[o];else{var s=i[o-1];o%t?6<t&&4==o%t&&(s=n[s>>>24]<<24|n[s>>>16&255]<<16|n[s>>>8&255]<<8|n[255&s]):(s=n[(s=s<<8|s>>>24)>>>24]<<24|n[s>>>16&255]<<16|n[s>>>8&255]<<8|n[255&s],s^=S[o/t|0]<<24),i[o]=i[o-t]^s}for(e=this._invKeySchedule=[],t=0;t<r;t++)o=r-t,s=t%4?i[o]:i[o-4],e[t]=4>t||4>=o?s:f[n[s>>>24]]^l[n[s>>>16&255]]^c[n[s>>>8&255]]^d[n[255&s]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,h,n)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,f,l,c,d,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,i,n,o,s,a){for(var u=this._nRounds,h=e[t]^r[0],f=e[t+1]^r[1],l=e[t+2]^r[2],c=e[t+3]^r[3],d=4,p=1;p<u;p++){var m=i[h>>>24]^n[f>>>16&255]^o[l>>>8&255]^s[255&c]^r[d++],g=i[f>>>24]^n[l>>>16&255]^o[c>>>8&255]^s[255&h]^r[d++],y=i[l>>>24]^n[c>>>16&255]^o[h>>>8&255]^s[255&f]^r[d++];c=i[c>>>24]^n[h>>>16&255]^o[f>>>8&255]^s[255&l]^r[d++],h=m,f=g,l=y}m=(a[h>>>24]<<24|a[f>>>16&255]<<16|a[l>>>8&255]<<8|a[255&c])^r[d++],g=(a[f>>>24]<<24|a[l>>>16&255]<<16|a[c>>>8&255]<<8|a[255&h])^r[d++],y=(a[l>>>24]<<24|a[c>>>16&255]<<16|a[h>>>8&255]<<8|a[255&f])^r[d++],c=(a[c>>>24]<<24|a[h>>>16&255]<<16|a[f>>>8&255]<<8|a[255&l])^r[d++],e[t]=m,e[t+1]=g,e[t+2]=y,e[t+3]=c},keySize:8});t.AES=r._createHelper(i)}(),CryptoJS_1=e}requireCryptoJS();var aes$3={exports:{}};function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var core$1={exports:{}},cryptoBrowserify={},browser$b={exports:{}},safeBuffer$6={exports:{}},hasRequiredSafeBuffer$6,hasRequiredBrowser$b;function requireSafeBuffer$6(){return hasRequiredSafeBuffer$6||(hasRequiredSafeBuffer$6=1,function(e,t){var r=requireDist(),i=r.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=o),n(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(safeBuffer$6,safeBuffer$6.exports)),safeBuffer$6.exports}function requireBrowser$b(){if(hasRequiredBrowser$b)return browser$b.exports;hasRequiredBrowser$b=1;var e=65536,t=4294967295;var r=requireSafeBuffer$6().Buffer,i=commonjsGlobal.crypto||commonjsGlobal.msCrypto;return i&&i.getRandomValues?browser$b.exports=function(n,o){if(n>t)throw new RangeError("requested too many random bytes");var s=r.allocUnsafe(n);if(n>0)if(n>e)for(var a=0;a<n;a+=e)i.getRandomValues(s.slice(a,a+e));else i.getRandomValues(s);if("function"==typeof o)return process$1.nextTick((function(){o(null,s)}));return s}:browser$b.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")},browser$b.exports}var safeBuffer$5={exports:{}},hasRequiredSafeBuffer$5,streamBrowserify,hasRequiredStreamBrowserify,hashBase,hasRequiredHashBase,md5_js,hasRequiredMd5_js,ripemd160,hasRequiredRipemd160;function requireSafeBuffer$5(){return hasRequiredSafeBuffer$5||(hasRequiredSafeBuffer$5=1,function(e,t){var r=requireDist(),i=r.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),n(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(safeBuffer$5,safeBuffer$5.exports)),safeBuffer$5.exports}function requireStreamBrowserify(){if(hasRequiredStreamBrowserify)return streamBrowserify;hasRequiredStreamBrowserify=1,streamBrowserify=t;var e=requireEvents().EventEmitter;function t(){e.call(this)}return requireInherits_browser()(t,e),t.Readable=require_stream_readable$1(),t.Writable=require_stream_writable$1(),t.Duplex=require_stream_duplex$1(),t.Transform=require_stream_transform$1(),t.PassThrough=require_stream_passthrough$1(),t.finished=requireEndOfStream(),t.pipeline=requirePipeline(),t.Stream=t,t.prototype.pipe=function(t,r){var i=this;function n(e){t.writable&&!1===t.write(e)&&i.pause&&i.pause()}function o(){i.readable&&i.resume&&i.resume()}i.on("data",n),t.on("drain",o),t._isStdio||r&&!1===r.end||(i.on("end",a),i.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function h(t){if(f(),0===e.listenerCount(this,"error"))throw t}function f(){i.removeListener("data",n),t.removeListener("drain",o),i.removeListener("end",a),i.removeListener("close",u),i.removeListener("error",h),t.removeListener("error",h),i.removeListener("end",f),i.removeListener("close",f),t.removeListener("close",f)}return i.on("error",h),t.on("error",h),i.on("end",f),i.on("close",f),t.on("close",f),t.emit("pipe",i),t},streamBrowserify}function requireHashBase(){if(hasRequiredHashBase)return hashBase;hasRequiredHashBase=1;var e=requireSafeBuffer$5().Buffer,t=requireStreamBrowserify().Transform;function r(r){t.call(this),this._block=e.allocUnsafe(r),this._blockSize=r,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}requireInherits_browser()(r,t),r.prototype._transform=function(e,t,r){var i=null;try{this.update(e,t)}catch(e){i=e}r(i)},r.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)};var i="undefined"!=typeof Uint8Array,n="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&ArrayBuffer.isView&&(e.prototype instanceof Uint8Array||e.TYPED_ARRAY_SUPPORT);return r.prototype.update=function(t,r){if(this._finalized)throw new Error("Digest already called");t=function(t,r){if(t instanceof e)return t;if("string"==typeof t)return e.from(t,r);if(n&&ArrayBuffer.isView(t)){if(0===t.byteLength)return e.alloc(0);var o=e.from(t.buffer,t.byteOffset,t.byteLength);if(o.byteLength===t.byteLength)return o}if(i&&t instanceof Uint8Array)return e.from(t);if(e.isBuffer(t)&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return e.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}(t,r);for(var o=this._block,s=0;this._blockOffset+t.length-s>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)o[a++]=t[s++];this._update(),this._blockOffset=0}for(;s<t.length;)o[this._blockOffset++]=t[s++];for(var u=0,h=8*t.length;h>0;++u)this._length[u]+=h,(h=this._length[u]/4294967296|0)>0&&(this._length[u]-=4294967296*h);return this},r.prototype._update=function(){throw new Error("_update is not implemented")},r.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},r.prototype._digest=function(){throw new Error("_digest is not implemented")},hashBase=r}function requireMd5_js(){if(hasRequiredMd5_js)return md5_js;hasRequiredMd5_js=1;var e=requireInherits_browser(),t=requireHashBase(),r=requireSafeBuffer$6().Buffer,i=new Array(16);function n(){t.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function o(e,t){return e<<t|e>>>32-t}function s(e,t,r,i,n,s,a){return o(e+(t&r|~t&i)+n+s|0,a)+t|0}function a(e,t,r,i,n,s,a){return o(e+(t&i|r&~i)+n+s|0,a)+t|0}function u(e,t,r,i,n,s,a){return o(e+(t^r^i)+n+s|0,a)+t|0}function h(e,t,r,i,n,s,a){return o(e+(r^(t|~i))+n+s|0,a)+t|0}return e(n,t),n.prototype._update=function(){for(var e=i,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,o=this._c,f=this._d;r=s(r,n,o,f,e[0],3614090360,7),f=s(f,r,n,o,e[1],3905402710,12),o=s(o,f,r,n,e[2],606105819,17),n=s(n,o,f,r,e[3],3250441966,22),r=s(r,n,o,f,e[4],4118548399,7),f=s(f,r,n,o,e[5],1200080426,12),o=s(o,f,r,n,e[6],2821735955,17),n=s(n,o,f,r,e[7],4249261313,22),r=s(r,n,o,f,e[8],1770035416,7),f=s(f,r,n,o,e[9],2336552879,12),o=s(o,f,r,n,e[10],4294925233,17),n=s(n,o,f,r,e[11],2304563134,22),r=s(r,n,o,f,e[12],1804603682,7),f=s(f,r,n,o,e[13],4254626195,12),o=s(o,f,r,n,e[14],2792965006,17),r=a(r,n=s(n,o,f,r,e[15],1236535329,22),o,f,e[1],4129170786,5),f=a(f,r,n,o,e[6],3225465664,9),o=a(o,f,r,n,e[11],643717713,14),n=a(n,o,f,r,e[0],3921069994,20),r=a(r,n,o,f,e[5],3593408605,5),f=a(f,r,n,o,e[10],38016083,9),o=a(o,f,r,n,e[15],3634488961,14),n=a(n,o,f,r,e[4],3889429448,20),r=a(r,n,o,f,e[9],568446438,5),f=a(f,r,n,o,e[14],3275163606,9),o=a(o,f,r,n,e[3],4107603335,14),n=a(n,o,f,r,e[8],1163531501,20),r=a(r,n,o,f,e[13],2850285829,5),f=a(f,r,n,o,e[2],4243563512,9),o=a(o,f,r,n,e[7],1735328473,14),r=u(r,n=a(n,o,f,r,e[12],2368359562,20),o,f,e[5],4294588738,4),f=u(f,r,n,o,e[8],2272392833,11),o=u(o,f,r,n,e[11],1839030562,16),n=u(n,o,f,r,e[14],4259657740,23),r=u(r,n,o,f,e[1],2763975236,4),f=u(f,r,n,o,e[4],1272893353,11),o=u(o,f,r,n,e[7],4139469664,16),n=u(n,o,f,r,e[10],3200236656,23),r=u(r,n,o,f,e[13],681279174,4),f=u(f,r,n,o,e[0],3936430074,11),o=u(o,f,r,n,e[3],3572445317,16),n=u(n,o,f,r,e[6],76029189,23),r=u(r,n,o,f,e[9],3654602809,4),f=u(f,r,n,o,e[12],3873151461,11),o=u(o,f,r,n,e[15],530742520,16),r=h(r,n=u(n,o,f,r,e[2],3299628645,23),o,f,e[0],4096336452,6),f=h(f,r,n,o,e[7],1126891415,10),o=h(o,f,r,n,e[14],2878612391,15),n=h(n,o,f,r,e[5],4237533241,21),r=h(r,n,o,f,e[12],1700485571,6),f=h(f,r,n,o,e[3],2399980690,10),o=h(o,f,r,n,e[10],4293915773,15),n=h(n,o,f,r,e[1],2240044497,21),r=h(r,n,o,f,e[8],1873313359,6),f=h(f,r,n,o,e[15],4264355552,10),o=h(o,f,r,n,e[6],2734768916,15),n=h(n,o,f,r,e[13],1309151649,21),r=h(r,n,o,f,e[4],4149444226,6),f=h(f,r,n,o,e[11],3174756917,10),o=h(o,f,r,n,e[2],718787259,15),n=h(n,o,f,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+o|0,this._d=this._d+f|0},n.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},md5_js=n}function requireRipemd160(){if(hasRequiredRipemd160)return ripemd160;hasRequiredRipemd160=1;var e=requireDist().Buffer,t=requireInherits_browser(),r=requireHashBase(),i=new Array(16),n=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],o=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],s=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],a=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],u=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function f(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function l(e,t){return e<<t|e>>>32-t}function c(e,t,r,i,n,o,s,a){return l(e+(t^r^i)+o+s|0,a)+n|0}function d(e,t,r,i,n,o,s,a){return l(e+(t&r|~t&i)+o+s|0,a)+n|0}function p(e,t,r,i,n,o,s,a){return l(e+((t|~r)^i)+o+s|0,a)+n|0}function m(e,t,r,i,n,o,s,a){return l(e+(t&i|r&~i)+o+s|0,a)+n|0}function g(e,t,r,i,n,o,s,a){return l(e+(t^(r|~i))+o+s|0,a)+n|0}return t(f,r),f.prototype._update=function(){for(var e=i,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,f=0|this._b,y=0|this._c,b=0|this._d,v=0|this._e,w=0|this._a,_=0|this._b,M=0|this._c,S=0|this._d,E=0|this._e,R=0;R<80;R+=1){var q,A;R<16?(q=c(r,f,y,b,v,e[n[R]],u[0],s[R]),A=g(w,_,M,S,E,e[o[R]],h[0],a[R])):R<32?(q=d(r,f,y,b,v,e[n[R]],u[1],s[R]),A=m(w,_,M,S,E,e[o[R]],h[1],a[R])):R<48?(q=p(r,f,y,b,v,e[n[R]],u[2],s[R]),A=p(w,_,M,S,E,e[o[R]],h[2],a[R])):R<64?(q=m(r,f,y,b,v,e[n[R]],u[3],s[R]),A=d(w,_,M,S,E,e[o[R]],h[3],a[R])):(q=g(r,f,y,b,v,e[n[R]],u[4],s[R]),A=c(w,_,M,S,E,e[o[R]],h[4],a[R])),r=v,v=b,b=l(y,10),y=f,f=q,w=E,E=S,S=l(M,10),M=_,_=A}var C=this._b+y+S|0;this._b=this._c+b+E|0,this._c=this._d+v+w|0,this._d=this._e+r+_|0,this._e=this._a+f+M|0,this._a=C},f.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=e.alloc?e.alloc(20):new e(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},ripemd160=f}var sha_js={exports:{}},hash$1,hasRequiredHash$1,sha$1,hasRequiredSha$1,sha1$2,hasRequiredSha1$1,sha256$1,hasRequiredSha256,sha224$1,hasRequiredSha224,sha512$1,hasRequiredSha512,sha384$1,hasRequiredSha384,hasRequiredSha_js;function requireHash$1(){if(hasRequiredHash$1)return hash$1;hasRequiredHash$1=1;var e=requireSafeBuffer$6().Buffer;function t(t,r){this._block=e.alloc(t),this._finalSize=r,this._blockSize=t,this._len=0}return t.prototype.update=function(t,r){"string"==typeof t&&(r=r||"utf8",t=e.from(t,r));for(var i=this._block,n=this._blockSize,o=t.length,s=this._len,a=0;a<o;){for(var u=s%n,h=Math.min(o-a,n-u),f=0;f<h;f++)i[u+f]=t[a+f];a+=h,(s+=h)%n==0&&this._update(i)}return this._len+=o,this},t.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(4294967295&r)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},t.prototype._update=function(){throw new Error("_update must be implemented by subclass")},hash$1=t}function requireSha$1(){if(hasRequiredSha$1)return sha$1;hasRequiredSha$1=1;var e=requireInherits_browser(),t=requireHash$1(),r=requireSafeBuffer$6().Buffer,i=[1518500249,1859775393,-1894007588,-899497514],n=new Array(80);function o(){this.init(),this._w=n,t.call(this,64,56)}function s(e){return e<<30|e>>>2}function a(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}return e(o,t),o.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},o.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,u=0|this._c,h=0|this._d,f=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=r[l-3]^r[l-8]^r[l-14]^r[l-16];for(var c=0;c<80;++c){var d=~~(c/20),p=0|((t=n)<<5|t>>>27)+a(d,o,u,h)+f+r[c]+i[d];f=h,h=u,u=s(o),o=n,n=p}this._a=n+this._a|0,this._b=o+this._b|0,this._c=u+this._c|0,this._d=h+this._d|0,this._e=f+this._e|0},o.prototype._hash=function(){var e=r.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},sha$1=o}function requireSha1$1(){if(hasRequiredSha1$1)return sha1$2;hasRequiredSha1$1=1;var e=requireInherits_browser(),t=requireHash$1(),r=requireSafeBuffer$6().Buffer,i=[1518500249,1859775393,-1894007588,-899497514],n=new Array(80);function o(){this.init(),this._w=n,t.call(this,64,56)}function s(e){return e<<5|e>>>27}function a(e){return e<<30|e>>>2}function u(e,t,r,i){return 0===e?t&r|~t&i:2===e?t&r|t&i|r&i:t^r^i}return e(o,t),o.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},o.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,h=0|this._c,f=0|this._d,l=0|this._e,c=0;c<16;++c)r[c]=e.readInt32BE(4*c);for(;c<80;++c)r[c]=(t=r[c-3]^r[c-8]^r[c-14]^r[c-16])<<1|t>>>31;for(var d=0;d<80;++d){var p=~~(d/20),m=s(n)+u(p,o,h,f)+l+r[d]+i[p]|0;l=f,f=h,h=a(o),o=n,n=m}this._a=n+this._a|0,this._b=o+this._b|0,this._c=h+this._c|0,this._d=f+this._d|0,this._e=l+this._e|0},o.prototype._hash=function(){var e=r.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},sha1$2=o}function requireSha256(){if(hasRequiredSha256)return sha256$1;hasRequiredSha256=1;var e=requireInherits_browser(),t=requireHash$1(),r=requireSafeBuffer$6().Buffer,i=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],n=new Array(64);function o(){this.init(),this._w=n,t.call(this,64,56)}function s(e,t,r){return r^e&(t^r)}function a(e,t,r){return e&t|r&(e|t)}function u(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function f(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}return e(o,t),o.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},o.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,l=0|this._c,c=0|this._d,d=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,y=0;y<16;++y)r[y]=e.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((t=r[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[y-7]+f(r[y-15])+r[y-16];for(var b=0;b<64;++b){var v=g+h(d)+s(d,p,m)+i[b]+r[b]|0,w=u(n)+a(n,o,l)|0;g=m,m=p,p=d,d=c+v|0,c=l,l=o,o=n,n=v+w|0}this._a=n+this._a|0,this._b=o+this._b|0,this._c=l+this._c|0,this._d=c+this._d|0,this._e=d+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},o.prototype._hash=function(){var e=r.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},sha256$1=o}function requireSha224(){if(hasRequiredSha224)return sha224$1;hasRequiredSha224=1;var e=requireInherits_browser(),t=requireSha256(),r=requireHash$1(),i=requireSafeBuffer$6().Buffer,n=new Array(64);function o(){this.init(),this._w=n,r.call(this,64,56)}return e(o,t),o.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},o.prototype._hash=function(){var e=i.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},sha224$1=o}function requireSha512(){if(hasRequiredSha512)return sha512$1;hasRequiredSha512=1;var e=requireInherits_browser(),t=requireHash$1(),r=requireSafeBuffer$6().Buffer,i=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],n=new Array(160);function o(){this.init(),this._w=n,t.call(this,128,112)}function s(e,t,r){return r^e&(t^r)}function a(e,t,r){return e&t|r&(e|t)}function u(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function f(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function l(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function c(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function d(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function p(e,t){return e>>>0<t>>>0?1:0}return e(o,t),o.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},o.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,o=0|this._ch,m=0|this._dh,g=0|this._eh,y=0|this._fh,b=0|this._gh,v=0|this._hh,w=0|this._al,_=0|this._bl,M=0|this._cl,S=0|this._dl,E=0|this._el,R=0|this._fl,q=0|this._gl,A=0|this._hl,C=0;C<32;C+=2)t[C]=e.readInt32BE(4*C),t[C+1]=e.readInt32BE(4*C+4);for(;C<160;C+=2){var P=t[C-30],I=t[C-30+1],O=f(P,I),B=l(I,P),k=c(P=t[C-4],I=t[C-4+1]),T=d(I,P),x=t[C-14],N=t[C-14+1],j=t[C-32],$=t[C-32+1],D=B+N|0,U=O+x+p(D,B)|0;U=(U=U+k+p(D=D+T|0,T)|0)+j+p(D=D+$|0,$)|0,t[C]=U,t[C+1]=D}for(var L=0;L<160;L+=2){U=t[L],D=t[L+1];var F=a(r,n,o),z=a(w,_,M),H=u(r,w),K=u(w,r),W=h(g,E),G=h(E,g),V=i[L],J=i[L+1],Q=s(g,y,b),Z=s(E,R,q),Y=A+G|0,X=v+W+p(Y,A)|0;X=(X=(X=X+Q+p(Y=Y+Z|0,Z)|0)+V+p(Y=Y+J|0,J)|0)+U+p(Y=Y+D|0,D)|0;var ee=K+z|0,te=H+F+p(ee,K)|0;v=b,A=q,b=y,q=R,y=g,R=E,g=m+X+p(E=S+Y|0,S)|0,m=o,S=M,o=n,M=_,n=r,_=w,r=X+te+p(w=Y+ee|0,Y)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+M|0,this._dl=this._dl+S|0,this._el=this._el+E|0,this._fl=this._fl+R|0,this._gl=this._gl+q|0,this._hl=this._hl+A|0,this._ah=this._ah+r+p(this._al,w)|0,this._bh=this._bh+n+p(this._bl,_)|0,this._ch=this._ch+o+p(this._cl,M)|0,this._dh=this._dh+m+p(this._dl,S)|0,this._eh=this._eh+g+p(this._el,E)|0,this._fh=this._fh+y+p(this._fl,R)|0,this._gh=this._gh+b+p(this._gl,q)|0,this._hh=this._hh+v+p(this._hl,A)|0},o.prototype._hash=function(){var e=r.allocUnsafe(64);function t(t,r,i){e.writeInt32BE(t,i),e.writeInt32BE(r,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},sha512$1=o}function requireSha384(){if(hasRequiredSha384)return sha384$1;hasRequiredSha384=1;var e=requireInherits_browser(),t=requireSha512(),r=requireHash$1(),i=requireSafeBuffer$6().Buffer,n=new Array(160);function o(){this.init(),this._w=n,r.call(this,128,112)}return e(o,t),o.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},o.prototype._hash=function(){var e=i.allocUnsafe(48);function t(t,r,i){e.writeInt32BE(t,i),e.writeInt32BE(r,i+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},sha384$1=o}function requireSha_js(){if(hasRequiredSha_js)return sha_js.exports;hasRequiredSha_js=1;var e=sha_js.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r};return e.sha=requireSha$1(),e.sha1=requireSha1$1(),e.sha224=requireSha224(),e.sha256=requireSha256(),e.sha384=requireSha384(),e.sha512=requireSha512(),sha_js.exports}var safeBuffer$4={exports:{}},hasRequiredSafeBuffer$4,cipherBase,hasRequiredCipherBase,browser$a,hasRequiredBrowser$a,legacy,hasRequiredLegacy,md5$2,hasRequiredMd5$1,browser$9,hasRequiredBrowser$9;function requireSafeBuffer$4(){return hasRequiredSafeBuffer$4||(hasRequiredSafeBuffer$4=1,function(e,t){var r=requireDist(),i=r.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),n(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(safeBuffer$4,safeBuffer$4.exports)),safeBuffer$4.exports}function requireCipherBase(){if(hasRequiredCipherBase)return cipherBase;hasRequiredCipherBase=1;var e=requireSafeBuffer$4().Buffer,t=requireStreamBrowserify().Transform,r=requireString_decoder().StringDecoder;function i(e){t.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}requireInherits_browser()(i,t);var n="undefined"!=typeof Uint8Array,o="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&ArrayBuffer.isView&&(e.prototype instanceof Uint8Array||e.TYPED_ARRAY_SUPPORT);return i.prototype.update=function(t,r,i){var s=function(t,r){if(t instanceof e)return t;if("string"==typeof t)return e.from(t,r);if(o&&ArrayBuffer.isView(t)){if(0===t.byteLength)return e.alloc(0);var i=e.from(t.buffer,t.byteOffset,t.byteLength);if(i.byteLength===t.byteLength)return i}if(n&&t instanceof Uint8Array)return e.from(t);if(e.isBuffer(t)&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return e.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}(t,r),a=this._update(s);return this.hashMode?this:(i&&(a=this._toString(a,i)),a)},i.prototype.setAutoPadding=function(){},i.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},i.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},i.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},i.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){i=e}finally{r(i)}},i.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},i.prototype._finalOrDigest=function(t){var r=this.__final()||e.alloc(0);return t&&(r=this._toString(r,t,!0)),r},i.prototype._toString=function(e,t,i){if(this._decoder||(this._decoder=new r(t),this._encoding=t),this._encoding!==t)throw new Error("can’t switch encodings");var n=this._decoder.write(e);return i&&(n+=this._decoder.end()),n},cipherBase=i}function requireBrowser$a(){if(hasRequiredBrowser$a)return browser$a;hasRequiredBrowser$a=1;var e=requireInherits_browser(),t=requireMd5_js(),r=requireRipemd160(),i=requireSha_js(),n=requireCipherBase();function o(e){n.call(this,"digest"),this._hash=e}return e(o,n),o.prototype._update=function(e){this._hash.update(e)},o.prototype._final=function(){return this._hash.digest()},browser$a=function(e){return"md5"===(e=e.toLowerCase())?new t:"rmd160"===e||"ripemd160"===e?new r:new o(i(e))}}function requireLegacy(){if(hasRequiredLegacy)return legacy;hasRequiredLegacy=1;var e=requireInherits_browser(),t=requireSafeBuffer$6().Buffer,r=requireCipherBase(),i=t.alloc(128),n=64;function o(e,o){r.call(this,"digest"),"string"==typeof o&&(o=t.from(o)),this._alg=e,this._key=o,o.length>n?o=e(o):o.length<n&&(o=t.concat([o,i],n));for(var s=this._ipad=t.allocUnsafe(n),a=this._opad=t.allocUnsafe(n),u=0;u<n;u++)s[u]=54^o[u],a[u]=92^o[u];this._hash=[s]}return e(o,r),o.prototype._update=function(e){this._hash.push(e)},o.prototype._final=function(){var e=this._alg(t.concat(this._hash));return this._alg(t.concat([this._opad,e]))},legacy=o}function requireMd5$1(){if(hasRequiredMd5$1)return md5$2;hasRequiredMd5$1=1;var e=requireMd5_js();return md5$2=function(t){return(new e).update(t).digest()}}function requireBrowser$9(){if(hasRequiredBrowser$9)return browser$9;hasRequiredBrowser$9=1;var e=requireInherits_browser(),t=requireLegacy(),r=requireCipherBase(),i=requireSafeBuffer$6().Buffer,n=requireMd5$1(),o=requireRipemd160(),s=requireSha_js(),a=i.alloc(128);function u(e,t){r.call(this,"digest"),"string"==typeof t&&(t=i.from(t));var n="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>n)?t=("rmd160"===e?new o:s(e)).update(t).digest():t.length<n&&(t=i.concat([t,a],n));for(var u=this._ipad=i.allocUnsafe(n),h=this._opad=i.allocUnsafe(n),f=0;f<n;f++)u[f]=54^t[f],h[f]=92^t[f];this._hash="rmd160"===e?new o:s(e),this._hash.update(u)}return e(u,r),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new o:s(this._alg)).update(this._opad).update(e).digest()},browser$9=function(e,r){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new u("rmd160",r):"md5"===e?new t(n,r):new u(e,r)}}const sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},sha256={sign:"ecdsa",hash:"sha256",id:""},sha224={sign:"ecdsa",hash:"sha224",id:""},sha384={sign:"ecdsa",hash:"sha384",id:""},sha512={sign:"ecdsa",hash:"sha512",id:""},DSA={sign:"dsa",hash:"sha1",id:""},ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption={sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},require$$6={sha224WithRSAEncryption:sha224WithRSAEncryption,"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:sha256WithRSAEncryption,"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:sha384WithRSAEncryption,"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:sha512WithRSAEncryption,"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:sha256,sha224:sha224,sha384:sha384,sha512:sha512,"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:DSA,"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:ripemd160WithRSA,"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:md5WithRSAEncryption,"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}};var algos,hasRequiredAlgos;function requireAlgos(){return hasRequiredAlgos?algos:(hasRequiredAlgos=1,algos=require$$6)}var browser$8={},precondition,hasRequiredPrecondition,defaultEncoding_1,hasRequiredDefaultEncoding,toBuffer,hasRequiredToBuffer,syncBrowser,hasRequiredSyncBrowser,async,hasRequiredAsync,hasRequiredBrowser$8;function requirePrecondition(){if(hasRequiredPrecondition)return precondition;hasRequiredPrecondition=1;var e=Math.pow(2,30)-1;return precondition=function(t,r){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>e||r!=r)throw new TypeError("Bad key length")}}function requireDefaultEncoding(){if(hasRequiredDefaultEncoding)return defaultEncoding_1;var e;if(hasRequiredDefaultEncoding=1,commonjsGlobal.process&&commonjsGlobal.process.browser)e="utf-8";else if(commonjsGlobal.process&&commonjsGlobal.process.version){e=parseInt(process$1.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else e="utf-8";return defaultEncoding_1=e}function requireToBuffer(){if(hasRequiredToBuffer)return toBuffer;hasRequiredToBuffer=1;var e=requireSafeBuffer$6().Buffer;return toBuffer=function(t,r,i){if(e.isBuffer(t))return t;if("string"==typeof t)return e.from(t,r);if(ArrayBuffer.isView(t))return e.from(t.buffer);throw new TypeError(i+" must be a string, a Buffer, a typed array or a DataView")}}function requireSyncBrowser(){if(hasRequiredSyncBrowser)return syncBrowser;hasRequiredSyncBrowser=1;var e=requireMd5$1(),t=requireRipemd160(),r=requireSha_js(),i=requireSafeBuffer$6().Buffer,n=requirePrecondition(),o=requireDefaultEncoding(),s=requireToBuffer(),a=i.alloc(128),u={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(n,o,s){var h=function(i){function n(e){return r(i).update(e).digest()}function o(e){return(new t).update(e).digest()}return"rmd160"===i||"ripemd160"===i?o:"md5"===i?e:n}(n),f="sha512"===n||"sha384"===n?128:64;o.length>f?o=h(o):o.length<f&&(o=i.concat([o,a],f));for(var l=i.allocUnsafe(f+u[n]),c=i.allocUnsafe(f+u[n]),d=0;d<f;d++)l[d]=54^o[d],c[d]=92^o[d];var p=i.allocUnsafe(f+s+4);l.copy(p,0,0,f),this.ipad1=p,this.ipad2=l,this.opad=c,this.alg=n,this.blocksize=f,this.hash=h,this.size=u[n]}return h.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},syncBrowser=function(e,t,r,a,f){n(r,a);var l=new h(f=f||"sha1",e=s(e,o,"Password"),(t=s(t,o,"Salt")).length),c=i.allocUnsafe(a),d=i.allocUnsafe(t.length+4);t.copy(d,0,0,t.length);for(var p=0,m=u[f],g=Math.ceil(a/m),y=1;y<=g;y++){d.writeUInt32BE(y,t.length);for(var b=l.run(d,l.ipad1),v=b,w=1;w<r;w++){v=l.run(v,l.ipad2);for(var _=0;_<m;_++)b[_]^=v[_]}b.copy(c,p),p+=m}return c}}function requireAsync(){if(hasRequiredAsync)return async;hasRequiredAsync=1;var e,t,r=requireSafeBuffer$6().Buffer,i=requirePrecondition(),n=requireDefaultEncoding(),o=requireSyncBrowser(),s=requireToBuffer(),a=commonjsGlobal.crypto&&commonjsGlobal.crypto.subtle,u={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function f(){return t||(t=commonjsGlobal.process&&commonjsGlobal.process.nextTick?commonjsGlobal.process.nextTick:commonjsGlobal.queueMicrotask?commonjsGlobal.queueMicrotask:commonjsGlobal.setImmediate?commonjsGlobal.setImmediate:commonjsGlobal.setTimeout)}function l(e,t,i,n,o){return a.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return a.deriveBits({name:"PBKDF2",salt:t,iterations:i,hash:{name:o}},e,n<<3)})).then((function(e){return r.from(e)}))}return async=function(t,c,d,p,m,g){"function"==typeof m&&(g=m,m=void 0);var y=u[(m=m||"sha1").toLowerCase()];if(y&&"function"==typeof commonjsGlobal.Promise){if(i(d,p),t=s(t,n,"Password"),c=s(c,n,"Salt"),"function"!=typeof g)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){f()((function(){t(null,e)}))}),(function(e){f()((function(){t(e)}))}))}(function(t){if(commonjsGlobal.process&&!commonjsGlobal.process.browser)return Promise.resolve(!1);if(!a||!a.importKey||!a.deriveBits)return Promise.resolve(!1);if(void 0!==h[t])return h[t];var i=l(e=e||r.alloc(8),e,10,128,t).then((function(){return!0})).catch((function(){return!1}));return h[t]=i,i}(y).then((function(e){return e?l(t,c,d,p,y):o(t,c,d,p,m)})),g)}else f()((function(){var e;try{e=o(t,c,d,p,m)}catch(e){return g(e)}g(null,e)}))}}function requireBrowser$8(){return hasRequiredBrowser$8||(hasRequiredBrowser$8=1,browser$8.pbkdf2=requireAsync(),browser$8.pbkdf2Sync=requireSyncBrowser()),browser$8}var browser$7={},des$1={},utils$3={},hasRequiredUtils$3,minimalisticAssert,hasRequiredMinimalisticAssert,cipher,hasRequiredCipher,des,hasRequiredDes$1;function requireUtils$3(){if(hasRequiredUtils$3)return utils$3;hasRequiredUtils$3=1,utils$3.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},utils$3.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},utils$3.ip=function(e,t,r,i){for(var n=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)n<<=1,n|=t>>>a+s&1;for(a=0;a<=24;a+=8)n<<=1,n|=e>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1}r[i+0]=n>>>0,r[i+1]=o>>>0},utils$3.rip=function(e,t,r,i){for(var n=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)n<<=1,n|=t>>>a+s&1,n<<=1,n|=e>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=t>>>a+s&1,o<<=1,o|=e>>>a+s&1;r[i+0]=n>>>0,r[i+1]=o>>>0},utils$3.pc1=function(e,t,r,i){for(var n=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)n<<=1,n|=t>>a+s&1;for(a=0;a<=24;a+=8)n<<=1,n|=e>>a+s&1}for(a=0;a<=24;a+=8)n<<=1,n|=t>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;r[i+0]=n>>>0,r[i+1]=o>>>0},utils$3.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var e=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];utils$3.pc2=function(t,r,i,n){for(var o=0,s=0,a=e.length>>>1,u=0;u<a;u++)o<<=1,o|=t>>>e[u]&1;for(u=a;u<e.length;u++)s<<=1,s|=r>>>e[u]&1;i[n+0]=o>>>0,i[n+1]=s>>>0},utils$3.expand=function(e,t,r){var i=0,n=0;i=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)i<<=6,i|=e>>>o&63;for(o=11;o>=3;o-=4)n|=e>>>o&63,n<<=6;n|=(31&e)<<1|e>>>31,t[r+0]=i>>>0,t[r+1]=n>>>0};var t=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];utils$3.substitute=function(e,r){for(var i=0,n=0;n<4;n++){i<<=4,i|=t[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){i<<=4,i|=t[256+64*n+(r>>>18-6*n&63)]}return i>>>0};var r=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];return utils$3.permute=function(e){for(var t=0,i=0;i<r.length;i++)t<<=1,t|=e>>>r[i]&1;return t>>>0},utils$3.padSplit=function(e,t,r){for(var i=e.toString(2);i.length<t;)i="0"+i;for(var n=[],o=0;o<t;o+=r)n.push(i.slice(o,o+r));return n.join(" ")},utils$3}function requireMinimalisticAssert(){if(hasRequiredMinimalisticAssert)return minimalisticAssert;function e(e,t){if(!e)throw new Error(t||"Assertion failed")}return hasRequiredMinimalisticAssert=1,minimalisticAssert=e,e.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)},minimalisticAssert}function requireCipher(){if(hasRequiredCipher)return cipher;hasRequiredCipher=1;var e=requireMinimalisticAssert();function t(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==e.padding}return cipher=t,t.prototype._init=function(){},t.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},t.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),i=0;i<r;i++)this.buffer[this.bufferOff+i]=e[t+i];return this.bufferOff+=r,r},t.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},t.prototype._updateEncrypt=function(e){var t=0,r=0,i=(this.bufferOff+e.length)/this.blockSize|0,n=new Array(i*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(n,r)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,n,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return n},t.prototype._updateDecrypt=function(e){for(var t=0,r=0,i=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,n=new Array(i*this.blockSize);i>0;i--)t+=this._buffer(e,t),r+=this._flushBuffer(n,r);return t+=this._buffer(e,t),n},t.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},t.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},t.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},t.prototype._unpad=function(e){return e},t.prototype._finalDecrypt=function(){e.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)},cipher}function requireDes$1(){if(hasRequiredDes$1)return des;hasRequiredDes$1=1;var e=requireMinimalisticAssert(),t=requireInherits_browser(),r=requireUtils$3(),i=requireCipher();function n(){this.tmp=new Array(2),this.keys=null}function o(e){i.call(this,e);var t=new n;this._desState=t,this.deriveKeys(t,e.key)}t(o,i),des=o,o.create=function(e){return new o(e)};var s=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];return o.prototype.deriveKeys=function(t,i){t.keys=new Array(32),e.equal(i.length,this.blockSize,"Invalid key length");var n=r.readUInt32BE(i,0),o=r.readUInt32BE(i,4);r.pc1(n,o,t.tmp,0),n=t.tmp[0],o=t.tmp[1];for(var a=0;a<t.keys.length;a+=2){var u=s[a>>>1];n=r.r28shl(n,u),o=r.r28shl(o,u),r.pc2(n,o,t.keys,a)}},o.prototype._update=function(e,t,i,n){var o=this._desState,s=r.readUInt32BE(e,t),a=r.readUInt32BE(e,t+4);r.ip(s,a,o.tmp,0),s=o.tmp[0],a=o.tmp[1],"encrypt"===this.type?this._encrypt(o,s,a,o.tmp,0):this._decrypt(o,s,a,o.tmp,0),s=o.tmp[0],a=o.tmp[1],r.writeUInt32BE(i,s,n),r.writeUInt32BE(i,a,n+4)},o.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var r=e.length-t,i=t;i<e.length;i++)e[i]=r;return!0},o.prototype._unpad=function(t){if(!1===this.padding)return t;for(var r=t[t.length-1],i=t.length-r;i<t.length;i++)e.equal(t[i],r);return t.slice(0,t.length-r)},o.prototype._encrypt=function(e,t,i,n,o){for(var s=t,a=i,u=0;u<e.keys.length;u+=2){var h=e.keys[u],f=e.keys[u+1];r.expand(a,e.tmp,0),h^=e.tmp[0],f^=e.tmp[1];var l=r.substitute(h,f),c=a;a=(s^r.permute(l))>>>0,s=c}r.rip(a,s,n,o)},o.prototype._decrypt=function(e,t,i,n,o){for(var s=i,a=t,u=e.keys.length-2;u>=0;u-=2){var h=e.keys[u],f=e.keys[u+1];r.expand(s,e.tmp,0),h^=e.tmp[0],f^=e.tmp[1];var l=r.substitute(h,f),c=s;s=(a^r.permute(l))>>>0,a=c}r.rip(s,a,n,o)},des}var cbc$1={},hasRequiredCbc$1,ede,hasRequiredEde,hasRequiredDes,browserifyDes,hasRequiredBrowserifyDes;function requireCbc$1(){if(hasRequiredCbc$1)return cbc$1;hasRequiredCbc$1=1;var e=requireMinimalisticAssert(),t=requireInherits_browser(),r={};function i(t){e.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var r=0;r<this.iv.length;r++)this.iv[r]=t[r]}return cbc$1.instantiate=function(e){function i(t){e.call(this,t),this._cbcInit()}t(i,e);for(var n=Object.keys(r),o=0;o<n.length;o++){var s=n[o];i.prototype[s]=r[s]}return i.create=function(e){return new i(e)},i},r._cbcInit=function(){var e=new i(this.options.iv);this._cbcState=e},r._update=function(e,t,r,i){var n=this._cbcState,o=this.constructor.super_.prototype,s=n.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)s[a]^=e[t+a];o._update.call(this,s,0,r,i);for(a=0;a<this.blockSize;a++)s[a]=r[i+a]}else{o._update.call(this,e,t,r,i);for(a=0;a<this.blockSize;a++)r[i+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=e[t+a]}},cbc$1}function requireEde(){if(hasRequiredEde)return ede;hasRequiredEde=1;var e=requireMinimalisticAssert(),t=requireInherits_browser(),r=requireCipher(),i=requireDes$1();function n(t,r){e.equal(r.length,24,"Invalid key length");var n=r.slice(0,8),o=r.slice(8,16),s=r.slice(16,24);this.ciphers="encrypt"===t?[i.create({type:"encrypt",key:n}),i.create({type:"decrypt",key:o}),i.create({type:"encrypt",key:s})]:[i.create({type:"decrypt",key:s}),i.create({type:"encrypt",key:o}),i.create({type:"decrypt",key:n})]}function o(e){r.call(this,e);var t=new n(this.type,this.options.key);this._edeState=t}return t(o,r),ede=o,o.create=function(e){return new o(e)},o.prototype._update=function(e,t,r,i){var n=this._edeState;n.ciphers[0]._update(e,t,r,i),n.ciphers[1]._update(r,i,r,i),n.ciphers[2]._update(r,i,r,i)},o.prototype._pad=i.prototype._pad,o.prototype._unpad=i.prototype._unpad,ede}function requireDes(){return hasRequiredDes||(hasRequiredDes=1,des$1.utils=requireUtils$3(),des$1.Cipher=requireCipher(),des$1.DES=requireDes$1(),des$1.CBC=requireCbc$1(),des$1.EDE=requireEde()),des$1}function requireBrowserifyDes(){if(hasRequiredBrowserifyDes)return browserifyDes;hasRequiredBrowserifyDes=1;var e=requireCipherBase(),t=requireDes(),r=requireInherits_browser(),i=requireSafeBuffer$6().Buffer,n={"des-ede3-cbc":t.CBC.instantiate(t.EDE),"des-ede3":t.EDE,"des-ede-cbc":t.CBC.instantiate(t.EDE),"des-ede":t.EDE,"des-cbc":t.CBC.instantiate(t.DES),"des-ecb":t.DES};function o(t){e.call(this);var r,o=t.mode.toLowerCase(),s=n[o];r=t.decrypt?"decrypt":"encrypt";var a=t.key;i.isBuffer(a)||(a=i.from(a)),"des-ede"!==o&&"des-ede-cbc"!==o||(a=i.concat([a,a.slice(0,8)]));var u=t.iv;i.isBuffer(u)||(u=i.from(u)),this._des=s.create({key:a,iv:u,type:r})}return n.des=n["des-cbc"],n.des3=n["des-ede3-cbc"],browserifyDes=o,r(o,e),o.prototype._update=function(e){return i.from(this._des.update(e))},o.prototype._final=function(){return i.from(this._des.final())},browserifyDes}var browser$6={},encrypter={},ecb={},hasRequiredEcb;function requireEcb(){return hasRequiredEcb||(hasRequiredEcb=1,ecb.encrypt=function(e,t){return e._cipher.encryptBlock(t)},ecb.decrypt=function(e,t){return e._cipher.decryptBlock(t)}),ecb}var cbc={},bufferXor,hasRequiredBufferXor,hasRequiredCbc;function requireBufferXor(){return hasRequiredBufferXor?bufferXor:(hasRequiredBufferXor=1,bufferXor=function(e,t){for(var r=Math.min(e.length,t.length),i=new Buffer(r),n=0;n<r;++n)i[n]=e[n]^t[n];return i})}function requireCbc(){if(hasRequiredCbc)return cbc;hasRequiredCbc=1;var e=requireBufferXor();return cbc.encrypt=function(t,r){var i=e(r,t._prev);return t._prev=t._cipher.encryptBlock(i),t._prev},cbc.decrypt=function(t,r){var i=t._prev;t._prev=r;var n=t._cipher.decryptBlock(r);return e(n,i)},cbc}var cfb={},hasRequiredCfb;function requireCfb(){if(hasRequiredCfb)return cfb;hasRequiredCfb=1;var e=requireSafeBuffer$6().Buffer,t=requireBufferXor();function r(r,i,n){var o=i.length,s=t(i,r._cache);return r._cache=r._cache.slice(o),r._prev=e.concat([r._prev,n?i:s]),s}return cfb.encrypt=function(t,i,n){for(var o,s=e.allocUnsafe(0);i.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=e.allocUnsafe(0)),!(t._cache.length<=i.length)){s=e.concat([s,r(t,i,n)]);break}o=t._cache.length,s=e.concat([s,r(t,i.slice(0,o),n)]),i=i.slice(o)}return s},cfb}var cfb8={},hasRequiredCfb8;function requireCfb8(){if(hasRequiredCfb8)return cfb8;hasRequiredCfb8=1;var e=requireSafeBuffer$6().Buffer;function t(t,r,i){var n=t._cipher.encryptBlock(t._prev)[0]^r;return t._prev=e.concat([t._prev.slice(1),e.from([i?r:n])]),n}return cfb8.encrypt=function(r,i,n){for(var o=i.length,s=e.allocUnsafe(o),a=-1;++a<o;)s[a]=t(r,i[a],n);return s},cfb8}var cfb1={},hasRequiredCfb1;function requireCfb1(){if(hasRequiredCfb1)return cfb1;hasRequiredCfb1=1;var e=requireSafeBuffer$6().Buffer;function t(e,t,i){for(var n,o,s=-1,a=0;++s<8;)n=t&1<<7-s?128:0,a+=(128&(o=e._cipher.encryptBlock(e._prev)[0]^n))>>s%8,e._prev=r(e._prev,i?n:o);return a}function r(t,r){var i=t.length,n=-1,o=e.allocUnsafe(t.length);for(t=e.concat([t,e.from([r])]);++n<i;)o[n]=t[n]<<1|t[n+1]>>7;return o}return cfb1.encrypt=function(r,i,n){for(var o=i.length,s=e.allocUnsafe(o),a=-1;++a<o;)s[a]=t(r,i[a],n);return s},cfb1}var ofb={},hasRequiredOfb;function requireOfb(){if(hasRequiredOfb)return ofb;hasRequiredOfb=1;var e=requireBufferXor();function t(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}return ofb.encrypt=function(r,i){for(;r._cache.length<i.length;)r._cache=Buffer.concat([r._cache,t(r)]);var n=r._cache.slice(0,i.length);return r._cache=r._cache.slice(i.length),e(i,n)},ofb}var ctr={},incr32_1,hasRequiredIncr32,hasRequiredCtr;function requireIncr32(){if(hasRequiredIncr32)return incr32_1;return hasRequiredIncr32=1,incr32_1=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}}function requireCtr(){if(hasRequiredCtr)return ctr;hasRequiredCtr=1;var e=requireBufferXor(),t=requireSafeBuffer$6().Buffer,r=requireIncr32();function i(e){var t=e._cipher.encryptBlockRaw(e._prev);return r(e._prev),t}return ctr.encrypt=function(r,n){var o=Math.ceil(n.length/16),s=r._cache.length;r._cache=t.concat([r._cache,t.allocUnsafe(16*o)]);for(var a=0;a<o;a++){var u=i(r),h=s+16*a;r._cache.writeUInt32BE(u[0],h+0),r._cache.writeUInt32BE(u[1],h+4),r._cache.writeUInt32BE(u[2],h+8),r._cache.writeUInt32BE(u[3],h+12)}var f=r._cache.slice(0,n.length);return r._cache=r._cache.slice(n.length),e(n,f)},ctr}const aes128={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},require$$2={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:aes128,aes192:aes192,aes256:aes256,"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}};var modes_1,hasRequiredModes$1;function requireModes$1(){if(hasRequiredModes$1)return modes_1;hasRequiredModes$1=1;var e={ECB:requireEcb(),CBC:requireCbc(),CFB:requireCfb(),CFB8:requireCfb8(),CFB1:requireCfb1(),OFB:requireOfb(),CTR:requireCtr(),GCM:requireCtr()},t=require$$2;for(var r in t)t[r].module=e[t[r].mode];return modes_1=t}var aes$2={},hasRequiredAes$1,ghash,hasRequiredGhash,authCipher,hasRequiredAuthCipher,streamCipher,hasRequiredStreamCipher,evp_bytestokey,hasRequiredEvp_bytestokey,hasRequiredEncrypter;function requireAes$1(){if(hasRequiredAes$1)return aes$2;hasRequiredAes$1=1;var e=requireSafeBuffer$6().Buffer;function t(t){e.isBuffer(t)||(t=e.from(t));for(var r=t.length/4|0,i=new Array(r),n=0;n<r;n++)i[n]=t.readUInt32BE(4*n);return i}function r(e){for(;0<e.length;e++)e[0]=0}function i(e,t,r,i,n){for(var o,s,a,u,h=r[0],f=r[1],l=r[2],c=r[3],d=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],g=e[3]^t[3],y=4,b=1;b<n;b++)o=h[d>>>24]^f[p>>>16&255]^l[m>>>8&255]^c[255&g]^t[y++],s=h[p>>>24]^f[m>>>16&255]^l[g>>>8&255]^c[255&d]^t[y++],a=h[m>>>24]^f[g>>>16&255]^l[d>>>8&255]^c[255&p]^t[y++],u=h[g>>>24]^f[d>>>16&255]^l[p>>>8&255]^c[255&m]^t[y++],d=o,p=s,m=a,g=u;return o=(i[d>>>24]<<24|i[p>>>16&255]<<16|i[m>>>8&255]<<8|i[255&g])^t[y++],s=(i[p>>>24]<<24|i[m>>>16&255]<<16|i[g>>>8&255]<<8|i[255&d])^t[y++],a=(i[m>>>24]<<24|i[g>>>16&255]<<16|i[d>>>8&255]<<8|i[255&p])^t[y++],u=(i[g>>>24]<<24|i[d>>>16&255]<<16|i[p>>>8&255]<<8|i[255&m])^t[y++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var n=[0,1,2,4,8,16,32,64,128,27,54],o=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],i=[],n=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var h=a^a<<1^a<<2^a<<3^a<<4;h=h>>>8^255&h^99,r[s]=h,i[h]=s;var f=e[s],l=e[f],c=e[l],d=257*e[h]^16843008*h;n[0][s]=d<<24|d>>>8,n[1][s]=d<<16|d>>>16,n[2][s]=d<<8|d>>>24,n[3][s]=d,d=16843009*c^65537*l^257*f^16843008*s,o[0][h]=d<<24|d>>>8,o[1][h]=d<<16|d>>>16,o[2][h]=d<<8|d>>>24,o[3][h]=d,0===s?s=a=1:(s=f^e[e[e[c^f]]],a^=e[e[a]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:o}}();function s(e){this._key=t(e),this._reset()}return s.blockSize=16,s.keySize=32,s.prototype.blockSize=s.blockSize,s.prototype.keySize=s.keySize,s.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,i=4*(r+1),s=[],a=0;a<t;a++)s[a]=e[a];for(a=t;a<i;a++){var u=s[a-1];a%t==0?(u=u<<8|u>>>24,u=o.SBOX[u>>>24]<<24|o.SBOX[u>>>16&255]<<16|o.SBOX[u>>>8&255]<<8|o.SBOX[255&u],u^=n[a/t|0]<<24):t>6&&a%t==4&&(u=o.SBOX[u>>>24]<<24|o.SBOX[u>>>16&255]<<16|o.SBOX[u>>>8&255]<<8|o.SBOX[255&u]),s[a]=s[a-t]^u}for(var h=[],f=0;f<i;f++){var l=i-f,c=s[l-(f%4?0:4)];h[f]=f<4||l<=4?c:o.INV_SUB_MIX[0][o.SBOX[c>>>24]]^o.INV_SUB_MIX[1][o.SBOX[c>>>16&255]]^o.INV_SUB_MIX[2][o.SBOX[c>>>8&255]]^o.INV_SUB_MIX[3][o.SBOX[255&c]]}this._nRounds=r,this._keySchedule=s,this._invKeySchedule=h},s.prototype.encryptBlockRaw=function(e){return i(e=t(e),this._keySchedule,o.SUB_MIX,o.SBOX,this._nRounds)},s.prototype.encryptBlock=function(t){var r=this.encryptBlockRaw(t),i=e.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[1],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[3],12),i},s.prototype.decryptBlock=function(r){var n=(r=t(r))[1];r[1]=r[3],r[3]=n;var s=i(r,this._invKeySchedule,o.INV_SUB_MIX,o.INV_SBOX,this._nRounds),a=e.allocUnsafe(16);return a.writeUInt32BE(s[0],0),a.writeUInt32BE(s[3],4),a.writeUInt32BE(s[2],8),a.writeUInt32BE(s[1],12),a},s.prototype.scrub=function(){r(this._keySchedule),r(this._invKeySchedule),r(this._key)},aes$2.AES=s,aes$2}function requireGhash(){if(hasRequiredGhash)return ghash;hasRequiredGhash=1;var e=requireSafeBuffer$6().Buffer,t=e.alloc(16,0);function r(t){var r=e.allocUnsafe(16);return r.writeUInt32BE(t[0]>>>0,0),r.writeUInt32BE(t[1]>>>0,4),r.writeUInt32BE(t[2]>>>0,8),r.writeUInt32BE(t[3]>>>0,12),r}function i(t){this.h=t,this.state=e.alloc(16,0),this.cache=e.allocUnsafe(0)}return i.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},i.prototype._multiply=function(){for(var e,t,i,n=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],o=[0,0,0,0],s=-1;++s<128;){for(!!(this.state[~~(s/8)]&1<<7-s%8)&&(o[0]^=n[0],o[1]^=n[1],o[2]^=n[2],o[3]^=n[3]),i=!!(1&n[3]),t=3;t>0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,i&&(n[0]=n[0]^225<<24)}this.state=r(o)},i.prototype.update=function(t){var r;for(this.cache=e.concat([this.cache,t]);this.cache.length>=16;)r=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(r)},i.prototype.final=function(i,n){return this.cache.length&&this.ghash(e.concat([this.cache,t],16)),this.ghash(r([0,i,0,n])),this.state},ghash=i}function requireAuthCipher(){if(hasRequiredAuthCipher)return authCipher;hasRequiredAuthCipher=1;var e=requireAes$1(),t=requireSafeBuffer$6().Buffer,r=requireCipherBase(),i=requireInherits_browser(),n=requireGhash(),o=requireBufferXor(),s=requireIncr32();function a(i,o,a,u){r.call(this);var h=t.alloc(4,0);this._cipher=new e.AES(o);var f=this._cipher.encryptBlock(h);this._ghash=new n(f),a=function(e,r,i){if(12===r.length)return e._finID=t.concat([r,t.from([0,0,0,1])]),t.concat([r,t.from([0,0,0,2])]);var o=new n(i),a=r.length,u=a%16;o.update(r),u&&(u=16-u,o.update(t.alloc(u,0))),o.update(t.alloc(8,0));var h=8*a,f=t.alloc(8);f.writeUIntBE(h,0,8),o.update(f),e._finID=o.state;var l=t.from(e._finID);return s(l),l}(this,a,f),this._prev=t.from(a),this._cache=t.allocUnsafe(0),this._secCache=t.allocUnsafe(0),this._decrypt=u,this._alen=0,this._len=0,this._mode=i,this._authTag=null,this._called=!1}return i(a,r),a.prototype._update=function(e){if(!this._called&&this._alen){var r=16-this._alen%16;r<16&&(r=t.alloc(r,0),this._ghash.update(r))}this._called=!0;var i=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(i),this._len+=e.length,i},a.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=o(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var i=Math.min(e.length,t.length),n=0;n<i;++n)r+=e[n]^t[n];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},a.prototype.getAuthTag=function(){if(this._decrypt||!t.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},a.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},a.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},authCipher=a}function requireStreamCipher(){if(hasRequiredStreamCipher)return streamCipher;hasRequiredStreamCipher=1;var e=requireAes$1(),t=requireSafeBuffer$6().Buffer,r=requireCipherBase();function i(i,n,o,s){r.call(this),this._cipher=new e.AES(n),this._prev=t.from(o),this._cache=t.allocUnsafe(0),this._secCache=t.allocUnsafe(0),this._decrypt=s,this._mode=i}return requireInherits_browser()(i,r),i.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},i.prototype._final=function(){this._cipher.scrub()},streamCipher=i}function requireEvp_bytestokey(){if(hasRequiredEvp_bytestokey)return evp_bytestokey;hasRequiredEvp_bytestokey=1;var e=requireSafeBuffer$6().Buffer,t=requireMd5_js();return evp_bytestokey=function(r,i,n,o){if(e.isBuffer(r)||(r=e.from(r,"binary")),i&&(e.isBuffer(i)||(i=e.from(i,"binary")),8!==i.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=n/8,a=e.alloc(s),u=e.alloc(o||0),h=e.alloc(0);s>0||o>0;){var f=new t;f.update(h),f.update(r),i&&f.update(i),h=f.digest();var l=0;if(s>0){var c=a.length-s;l=Math.min(s,h.length),h.copy(a,c,0,l),s-=l}if(l<h.length&&o>0){var d=u.length-o,p=Math.min(o,h.length-l);h.copy(u,d,l,l+p),o-=p}}return h.fill(0),{key:a,iv:u}}}function requireEncrypter(){if(hasRequiredEncrypter)return encrypter;hasRequiredEncrypter=1;var e=requireModes$1(),t=requireAuthCipher(),r=requireSafeBuffer$6().Buffer,i=requireStreamCipher(),n=requireCipherBase(),o=requireAes$1(),s=requireEvp_bytestokey();function a(e,t,i){n.call(this),this._cache=new h,this._cipher=new o.AES(t),this._prev=r.from(i),this._mode=e,this._autopadding=!0}requireInherits_browser()(a,n),a.prototype._update=function(e){var t,i;this._cache.add(e);for(var n=[];t=this._cache.get();)i=this._mode.encrypt(this,t),n.push(i);return r.concat(n)};var u=r.alloc(16,16);function h(){this.cache=r.allocUnsafe(0)}function f(n,o,s){var u=e[n.toLowerCase()];if(!u)throw new TypeError("invalid suite type");if("string"==typeof o&&(o=r.from(o)),o.length!==u.key/8)throw new TypeError("invalid key length "+o.length);if("string"==typeof s&&(s=r.from(s)),"GCM"!==u.mode&&s.length!==u.iv)throw new TypeError("invalid iv length "+s.length);return"stream"===u.type?new i(u.module,o,s):"auth"===u.type?new t(u.module,o,s):new a(u.module,o,s)}return a.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(u))throw this._cipher.scrub(),new Error("data not multiple of block length")},a.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=r.concat([this.cache,e])},h.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},h.prototype.flush=function(){for(var e=16-this.cache.length,t=r.allocUnsafe(e),i=-1;++i<e;)t.writeUInt8(e,i);return r.concat([this.cache,t])},encrypter.createCipheriv=f,encrypter.createCipher=function(t,r){var i=e[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var n=s(r,!1,i.key,i.iv);return f(t,n.key,n.iv)},encrypter}var decrypter={},hasRequiredDecrypter,hasRequiredBrowser$7;function requireDecrypter(){if(hasRequiredDecrypter)return decrypter;hasRequiredDecrypter=1;var e=requireAuthCipher(),t=requireSafeBuffer$6().Buffer,r=requireModes$1(),i=requireStreamCipher(),n=requireCipherBase(),o=requireAes$1(),s=requireEvp_bytestokey();function a(e,r,i){n.call(this),this._cache=new u,this._last=void 0,this._cipher=new o.AES(r),this._prev=t.from(i),this._mode=e,this._autopadding=!0}function u(){this.cache=t.allocUnsafe(0)}function h(n,o,s){var u=r[n.toLowerCase()];if(!u)throw new TypeError("invalid suite type");if("string"==typeof s&&(s=t.from(s)),"GCM"!==u.mode&&s.length!==u.iv)throw new TypeError("invalid iv length "+s.length);if("string"==typeof o&&(o=t.from(o)),o.length!==u.key/8)throw new TypeError("invalid key length "+o.length);return"stream"===u.type?new i(u.module,o,s,!0):"auth"===u.type?new e(u.module,o,s,!0):new a(u.module,o,s)}return requireInherits_browser()(a,n),a.prototype._update=function(e){var r,i;this._cache.add(e);for(var n=[];r=this._cache.get(this._autopadding);)i=this._mode.decrypt(this,r),n.push(i);return t.concat(n)},a.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var r=-1;for(;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},a.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},u.prototype.add=function(e){this.cache=t.concat([this.cache,e])},u.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},u.prototype.flush=function(){if(this.cache.length)return this.cache},decrypter.createDecipher=function(e,t){var i=r[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var n=s(t,!1,i.key,i.iv);return h(e,n.key,n.iv)},decrypter.createDecipheriv=h,decrypter}function requireBrowser$7(){if(hasRequiredBrowser$7)return browser$6;hasRequiredBrowser$7=1;var e=requireEncrypter(),t=requireDecrypter(),r=require$$2;return browser$6.createCipher=browser$6.Cipher=e.createCipher,browser$6.createCipheriv=browser$6.Cipheriv=e.createCipheriv,browser$6.createDecipher=browser$6.Decipher=t.createDecipher,browser$6.createDecipheriv=browser$6.Decipheriv=t.createDecipheriv,browser$6.listCiphers=browser$6.getCiphers=function(){return Object.keys(r)},browser$6}var modes={},hasRequiredModes,hasRequiredBrowser$6;function requireModes(){return hasRequiredModes||(hasRequiredModes=1,(e=modes)["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}),modes;var e}function requireBrowser$6(){if(hasRequiredBrowser$6)return browser$7;hasRequiredBrowser$6=1;var e=requireBrowserifyDes(),t=requireBrowser$7(),r=requireModes$1(),i=requireModes(),n=requireEvp_bytestokey();function o(n,o,s){if(n=n.toLowerCase(),r[n])return t.createCipheriv(n,o,s);if(i[n])return new e({key:o,iv:s,mode:n});throw new TypeError("invalid suite type")}function s(n,o,s){if(n=n.toLowerCase(),r[n])return t.createDecipheriv(n,o,s);if(i[n])return new e({key:o,iv:s,mode:n,decrypt:!0});throw new TypeError("invalid suite type")}return browser$7.createCipher=browser$7.Cipher=function(e,t){var s,a;if(e=e.toLowerCase(),r[e])s=r[e].key,a=r[e].iv;else{if(!i[e])throw new TypeError("invalid suite type");s=8*i[e].key,a=i[e].iv}var u=n(t,!1,s,a);return o(e,u.key,u.iv)},browser$7.createCipheriv=browser$7.Cipheriv=o,browser$7.createDecipher=browser$7.Decipher=function(e,t){var o,a;if(e=e.toLowerCase(),r[e])o=r[e].key,a=r[e].iv;else{if(!i[e])throw new TypeError("invalid suite type");o=8*i[e].key,a=i[e].iv}var u=n(t,!1,o,a);return s(e,u.key,u.iv)},browser$7.createDecipheriv=browser$7.Decipheriv=s,browser$7.listCiphers=browser$7.getCiphers=function(){return Object.keys(i).concat(t.getCiphers())},browser$7}var browser$5={},bn$d={exports:{}},bn$c=bn$d.exports,hasRequiredBn$6;function requireBn$6(){return hasRequiredBn$6||(hasRequiredBn$6=1,function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function n(e,t,r){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:requireDist().Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(e,t,r){var i=s(e,r);return r-1>=t&&(i|=s(e,r-1)<<4),i}function u(e,t,r,i){for(var n=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;n*=i,n+=a>=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(e){return e instanceof n||null!==e&&"object"==typeof e&&e.constructor.wordSize===n.wordSize&&Array.isArray(e.words)},n.max=function(e,t){return e.cmp(t)>0?e:t},n.min=function(e,t){return e.cmp(t)<0?e:t},n.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,i):(this._parseBase(e,t,n),"le"===i&&this._initArray(this.toArray(),t,i)))},n.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},n.prototype._initArray=function(e,t,i){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===i)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,s=o%i,a=Math.min(o,o-s)+r,h=0,f=r;f<a;f+=i)h=u(e,f,f+i,t),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(e,f,e.length,t),f=0;f<s;f++)l*=t;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},n.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},n.prototype.clone=function(){var e=new n(null);return this.copy(e),e},n.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h<i;h++){for(var f=u>>>26,l=67108863&u,c=Math.min(h,t.length-1),d=Math.max(0,h-e.length+1);d<=c;d++){var p=h-d|0;f+=(s=(n=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}n.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<n|o)).toString(16);o=a>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),i=0!==o||s!==this.length-1?h[6-u.length]+u+i:u+i}for(0!==o&&(i=o.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],d=l[e];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e);i=(p=p.idivn(d)).isZero()?m+i:h[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},n.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},n.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,h=new e(o),f=this.clone();if(u){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-n;a++)h[a]=0;for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),h[o-a-1]=s}return h},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},n.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},n.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},n.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},n.prototype.ior=function(e){return r(!(this.negative|e.negative)),this.iuor(e)},n.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},n.prototype.iand=function(e){return r(!(this.negative|e.negative)),this.iuand(e)},n.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},n.prototype.ixor=function(e){return r(!(this.negative|e.negative)),this.iuxor(e)},n.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},n.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},n.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++)o=(t=(0|r.words[s])-(0|i.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(e){return this.clone().isub(e)};var d=function(e,t,r){var i,n,o,s=e.words,a=t.words,u=r.words,h=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,R=0|s[5],q=8191&R,A=R>>>13,C=0|s[6],P=8191&C,I=C>>>13,O=0|s[7],B=8191&O,k=O>>>13,T=0|s[8],x=8191&T,N=T>>>13,j=0|s[9],$=8191&j,D=j>>>13,U=0|a[0],L=8191&U,F=U>>>13,z=0|a[1],H=8191&z,K=z>>>13,W=0|a[2],G=8191&W,V=W>>>13,J=0|a[3],Q=8191&J,Z=J>>>13,Y=0|a[4],X=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ie=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],ue=8191&ae,he=ae>>>13,fe=0|a[8],le=8191&fe,ce=fe>>>13,de=0|a[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(h+(i=Math.imul(l,L))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(c,L)|0))<<13)|0;h=((o=Math.imul(c,F))+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(p,L),n=(n=Math.imul(p,F))+Math.imul(m,L)|0,o=Math.imul(m,F);var ye=(h+(i=i+Math.imul(l,H)|0)|0)+((8191&(n=(n=n+Math.imul(l,K)|0)+Math.imul(c,H)|0))<<13)|0;h=((o=o+Math.imul(c,K)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(y,L),n=(n=Math.imul(y,F))+Math.imul(b,L)|0,o=Math.imul(b,F),i=i+Math.imul(p,H)|0,n=(n=n+Math.imul(p,K)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,K)|0;var be=(h+(i=i+Math.imul(l,G)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,G)|0))<<13)|0;h=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(w,L),n=(n=Math.imul(w,F))+Math.imul(_,L)|0,o=Math.imul(_,F),i=i+Math.imul(y,H)|0,n=(n=n+Math.imul(y,K)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,K)|0,i=i+Math.imul(p,G)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,V)|0;var ve=(h+(i=i+Math.imul(l,Q)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(c,Q)|0))<<13)|0;h=((o=o+Math.imul(c,Z)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(S,L),n=(n=Math.imul(S,F))+Math.imul(E,L)|0,o=Math.imul(E,F),i=i+Math.imul(w,H)|0,n=(n=n+Math.imul(w,K)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,K)|0,i=i+Math.imul(y,G)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0;var we=(h+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,ee)|0)+Math.imul(c,X)|0))<<13)|0;h=((o=o+Math.imul(c,ee)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(q,L),n=(n=Math.imul(q,F))+Math.imul(A,L)|0,o=Math.imul(A,F),i=i+Math.imul(S,H)|0,n=(n=n+Math.imul(S,K)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,K)|0,i=i+Math.imul(w,G)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,Q)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,Z)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(h+(i=i+Math.imul(l,re)|0)|0)+((8191&(n=(n=n+Math.imul(l,ie)|0)+Math.imul(c,re)|0))<<13)|0;h=((o=o+Math.imul(c,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(P,L),n=(n=Math.imul(P,F))+Math.imul(I,L)|0,o=Math.imul(I,F),i=i+Math.imul(q,H)|0,n=(n=n+Math.imul(q,K)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,K)|0,i=i+Math.imul(S,G)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Z)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,ee)|0,i=i+Math.imul(p,re)|0,n=(n=n+Math.imul(p,ie)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0;var Me=(h+(i=i+Math.imul(l,oe)|0)|0)+((8191&(n=(n=n+Math.imul(l,se)|0)+Math.imul(c,oe)|0))<<13)|0;h=((o=o+Math.imul(c,se)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(B,L),n=(n=Math.imul(B,F))+Math.imul(k,L)|0,o=Math.imul(k,F),i=i+Math.imul(P,H)|0,n=(n=n+Math.imul(P,K)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,K)|0,i=i+Math.imul(q,G)|0,n=(n=n+Math.imul(q,V)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(S,Q)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Z)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(y,re)|0,n=(n=n+Math.imul(y,ie)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ie)|0,i=i+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(h+(i=i+Math.imul(l,ue)|0)|0)+((8191&(n=(n=n+Math.imul(l,he)|0)+Math.imul(c,ue)|0))<<13)|0;h=((o=o+Math.imul(c,he)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(x,L),n=(n=Math.imul(x,F))+Math.imul(N,L)|0,o=Math.imul(N,F),i=i+Math.imul(B,H)|0,n=(n=n+Math.imul(B,K)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,K)|0,i=i+Math.imul(P,G)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,V)|0,i=i+Math.imul(q,Q)|0,n=(n=n+Math.imul(q,Z)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Z)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,ee)|0,i=i+Math.imul(w,re)|0,n=(n=n+Math.imul(w,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(y,oe)|0,n=(n=n+Math.imul(y,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,i=i+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,he)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,he)|0;var Ee=(h+(i=i+Math.imul(l,le)|0)|0)+((8191&(n=(n=n+Math.imul(l,ce)|0)+Math.imul(c,le)|0))<<13)|0;h=((o=o+Math.imul(c,ce)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul($,L),n=(n=Math.imul($,F))+Math.imul(D,L)|0,o=Math.imul(D,F),i=i+Math.imul(x,H)|0,n=(n=n+Math.imul(x,K)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,K)|0,i=i+Math.imul(B,G)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Z)|0,i=i+Math.imul(q,X)|0,n=(n=n+Math.imul(q,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ie)|0,i=i+Math.imul(w,oe)|0,n=(n=n+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,i=i+Math.imul(y,ue)|0,n=(n=n+Math.imul(y,he)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,he)|0,i=i+Math.imul(p,le)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ce)|0;var Re=(h+(i=i+Math.imul(l,pe)|0)|0)+((8191&(n=(n=n+Math.imul(l,me)|0)+Math.imul(c,pe)|0))<<13)|0;h=((o=o+Math.imul(c,me)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,i=Math.imul($,H),n=(n=Math.imul($,K))+Math.imul(D,H)|0,o=Math.imul(D,K),i=i+Math.imul(x,G)|0,n=(n=n+Math.imul(x,V)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,V)|0,i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,Z)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,Z)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,i=i+Math.imul(q,re)|0,n=(n=n+Math.imul(q,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,i=i+Math.imul(w,ue)|0,n=(n=n+Math.imul(w,he)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,he)|0,i=i+Math.imul(y,le)|0,n=(n=n+Math.imul(y,ce)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,ce)|0;var qe=(h+(i=i+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;h=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(qe>>>26)|0,qe&=67108863,i=Math.imul($,G),n=(n=Math.imul($,V))+Math.imul(D,G)|0,o=Math.imul(D,V),i=i+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,Z)|0,i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ie)|0,i=i+Math.imul(q,oe)|0,n=(n=n+Math.imul(q,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,he)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,he)|0,i=i+Math.imul(w,le)|0,n=(n=n+Math.imul(w,ce)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ce)|0;var Ae=(h+(i=i+Math.imul(y,pe)|0)|0)+((8191&(n=(n=n+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;h=((o=o+Math.imul(b,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul($,Q),n=(n=Math.imul($,Z))+Math.imul(D,Q)|0,o=Math.imul(D,Z),i=i+Math.imul(x,X)|0,n=(n=n+Math.imul(x,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,i=i+Math.imul(B,re)|0,n=(n=n+Math.imul(B,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,se)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,se)|0,i=i+Math.imul(q,ue)|0,n=(n=n+Math.imul(q,he)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,he)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,ce)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,ce)|0;var Ce=(h+(i=i+Math.imul(w,pe)|0)|0)+((8191&(n=(n=n+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;h=((o=o+Math.imul(_,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul($,X),n=(n=Math.imul($,ee))+Math.imul(D,X)|0,o=Math.imul(D,ee),i=i+Math.imul(x,re)|0,n=(n=n+Math.imul(x,ie)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ie)|0,i=i+Math.imul(B,oe)|0,n=(n=n+Math.imul(B,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,he)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,he)|0,i=i+Math.imul(q,le)|0,n=(n=n+Math.imul(q,ce)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ce)|0;var Pe=(h+(i=i+Math.imul(S,pe)|0)|0)+((8191&(n=(n=n+Math.imul(S,me)|0)+Math.imul(E,pe)|0))<<13)|0;h=((o=o+Math.imul(E,me)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,i=Math.imul($,re),n=(n=Math.imul($,ie))+Math.imul(D,re)|0,o=Math.imul(D,ie),i=i+Math.imul(x,oe)|0,n=(n=n+Math.imul(x,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,i=i+Math.imul(B,ue)|0,n=(n=n+Math.imul(B,he)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,he)|0,i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,ce)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,ce)|0;var Ie=(h+(i=i+Math.imul(q,pe)|0)|0)+((8191&(n=(n=n+Math.imul(q,me)|0)+Math.imul(A,pe)|0))<<13)|0;h=((o=o+Math.imul(A,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul($,oe),n=(n=Math.imul($,se))+Math.imul(D,oe)|0,o=Math.imul(D,se),i=i+Math.imul(x,ue)|0,n=(n=n+Math.imul(x,he)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,he)|0,i=i+Math.imul(B,le)|0,n=(n=n+Math.imul(B,ce)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,ce)|0;var Oe=(h+(i=i+Math.imul(P,pe)|0)|0)+((8191&(n=(n=n+Math.imul(P,me)|0)+Math.imul(I,pe)|0))<<13)|0;h=((o=o+Math.imul(I,me)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,i=Math.imul($,ue),n=(n=Math.imul($,he))+Math.imul(D,ue)|0,o=Math.imul(D,he),i=i+Math.imul(x,le)|0,n=(n=n+Math.imul(x,ce)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ce)|0;var Be=(h+(i=i+Math.imul(B,pe)|0)|0)+((8191&(n=(n=n+Math.imul(B,me)|0)+Math.imul(k,pe)|0))<<13)|0;h=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul($,le),n=(n=Math.imul($,ce))+Math.imul(D,le)|0,o=Math.imul(D,ce);var ke=(h+(i=i+Math.imul(x,pe)|0)|0)+((8191&(n=(n=n+Math.imul(x,me)|0)+Math.imul(N,pe)|0))<<13)|0;h=((o=o+Math.imul(N,me)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863;var Te=(h+(i=Math.imul($,pe))|0)+((8191&(n=(n=Math.imul($,me))+Math.imul(D,pe)|0))<<13)|0;return h=((o=Math.imul(D,me))+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,u[0]=ge,u[1]=ye,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Me,u[7]=Se,u[8]=Ee,u[9]=Re,u[10]=qe,u[11]=Ae,u[12]=Ce,u[13]=Pe,u[14]=Ie,u[15]=Oe,u[16]=Be,u[17]=ke,u[18]=Te,0!==h&&(u[19]=h,r.length++),r};function p(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(d=c),n.prototype.mulTo=function(e,t){var r,i=this.length+e.length;return r=10===this.length&&10===e.length?d(this,e,t):i<63?c(this,e,t):i<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var a=67108863&i,u=Math.min(o,t.length-1),h=Math.max(0,o-e.length+1);h<=u;h++){var f=o-h,l=(0|e.words[f])*(0|t.words[h]),c=67108863&l;a=67108863&(c=c+a|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,e,t):p(this,e,t),r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=n.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},m.prototype.permute=function(e,t,r,i,n,o){for(var s=0;s<o;s++)i[s]=t[e[s]],n[s]=r[e[s]]},m.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),f=0;f<n;f+=a)for(var l=u,c=h,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],b=l*g-c*y;y=l*y+c*g,g=b,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==a&&(b=u*l-h*c,c=u*c+h*l,l=b)}},m.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},m.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},m.prototype.convert13b=function(e,t,i,n){for(var o=0,s=0;s<t;s++)o+=0|e[s],i[2*s]=8191&o,o>>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<n;++s)i[s]=0;r(0===o),r(!(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),s=new Array(i),a=new Array(i),u=new Array(i),h=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(e.words,e.length,s,i),this.convert13b(t.words,t.length,h,i),this.transform(s,o,a,u,i,n),this.transform(h,o,f,l,i,n);for(var d=0;d<i;d++){var p=a[d]*f[d]-u[d]*l[d];u[d]=a[d]*l[d]+u[d]*f[d],a[d]=p}return this.conjugate(a,u,i),this.transform(a,u,c,o,i,n),this.conjugate(c,o,i),this.normalize13b(c,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},n.prototype.mul=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},n.prototype.mulf=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),p(this,e,t)},n.prototype.imul=function(e){return this.clone().mulTo(e,this)},n.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,i=0;i<this.length;i++){var n=(0|this.words[i])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[i]=67108863&o}return 0!==t&&(this.words[i]=t,this.length++),this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}(e);if(0===t.length)return new n(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var o=r.sqr();i<t.length;i++,o=o.sqr())0!==t[i]&&(r=r.mul(o));return r},n.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,i=e%26,n=(e-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<i;this.words[t]=u|s,s=a>>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},n.prototype.iushrn=function(e,t,i){var n;r("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=i;if(n-=s,n=Math.max(0,n),u){for(var h=0;h<s;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var f=0;for(h=this.length-1;h>=0&&(0!==f||h>=n);h--){var l=0|this.words[h];this.words[h]=f<<26-o|l>>>o,f=l&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<<t;return!(this.length<=i||!(this.words[i]&n))},n.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(e){return this.clone().imaskn(e)},n.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},n.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},n.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},n.prototype.addn=function(e){return this.clone().iaddn(e)},n.prototype.subn=function(e){return this.clone().isubn(e)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(e,t,i){var n,o,s=e.length+i;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+i])+a;var u=(0|e.words[n])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)a=(o=(0|this.words[n+i])+a)>>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new n(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var f=i.clone()._ishlnsubmul(o,1,u);0===f.negative&&(i=f,a&&(a.words[u]=1));for(var l=u-1;l>=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new n(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},n.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,i=0,n=this.length-1;n>=0;n--)i=(t*i+(0|this.words[n]))%e;return i},n.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new n(1),s=new n(0),a=new n(0),u=new n(1),h=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++h;for(var f=i.clone(),l=t.clone();!t.isZero();){for(var c=0,d=1;!(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(l)),a.iushrn(1),u.iushrn(1);t.cmp(i)>=0?(t.isub(i),o.isub(a),s.isub(u)):(i.isub(t),a.isub(o),u.isub(s))}return{a:a,b:u,gcd:i.iushln(h)}},n.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new n(1),a=new n(0),u=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var h=0,f=1;!(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,c=1;!(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(a)):(i.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},n.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},n.prototype.invm=function(e){return this.egcd(e).a.umod(e)},n.prototype.isEven=function(){return!(1&this.words[0])},n.prototype.isOdd=function(){return!(1&~this.words[0])},n.prototype.andln=function(e){return this.words[0]&e},n.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,s=i;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},n.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},n.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},n.prototype.gtn=function(e){return 1===this.cmpn(e)},n.prototype.gt=function(e){return 1===this.cmp(e)},n.prototype.gten=function(e){return this.cmpn(e)>=0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.ltn=function(e){return-1===this.cmpn(e)},n.prototype.lt=function(e){return-1===this.cmp(e)},n.prototype.lten=function(e){return this.cmpn(e)<=0},n.prototype.lte=function(e){return this.cmp(e)<=0},n.prototype.eqn=function(e){return 0===this.cmpn(e)},n.prototype.eq=function(e){return 0===this.cmp(e)},n.red=function(e){return new M(e)},n.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(e){return this.red=e,this},n.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},n.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},n.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},n.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},n.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},n.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},n.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},n.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new n(t,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=n._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new n(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(b,y),b.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(v,y),i(w,y),i(_,y),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},n._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return g[e]=t,t},M.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){r(!(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new n(1)).iushrn(2);return this.pow(e,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,o),c=this.pow(e,o.addn(1).iushrn(1)),d=this.pow(e,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var y=this.pow(l,new n(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},M.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},M.prototype.pow=function(e,t){if(t.isZero())return new n(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new n(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var o=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),i=t.length-1;i>=0;i--){for(var h=t.words[i],f=u-1;f>=0;f--){var l=h>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}u=26}return o},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},n.mont=function(e){return new S(e)},i(S,M),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new n(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(bn$d,bn$c)),bn$d.exports}var bn$b={exports:{}},bn$a=bn$b.exports,hasRequiredBn$5;function requireBn$5(){return hasRequiredBn$5||(hasRequiredBn$5=1,function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function n(e,t,r){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:requireDist().Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(e,t,r){var i=s(e,r);return r-1>=t&&(i|=s(e,r-1)<<4),i}function u(e,t,r,i){for(var n=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;n*=i,n+=a>=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(e){return e instanceof n||null!==e&&"object"==typeof e&&e.constructor.wordSize===n.wordSize&&Array.isArray(e.words)},n.max=function(e,t){return e.cmp(t)>0?e:t},n.min=function(e,t){return e.cmp(t)<0?e:t},n.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,i):(this._parseBase(e,t,n),"le"===i&&this._initArray(this.toArray(),t,i)))},n.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},n.prototype._initArray=function(e,t,i){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===i)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,s=o%i,a=Math.min(o,o-s)+r,h=0,f=r;f<a;f+=i)h=u(e,f,f+i,t),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(e,f,e.length,t),f=0;f<s;f++)l*=t;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},n.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},n.prototype.clone=function(){var e=new n(null);return this.copy(e),e},n.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h<i;h++){for(var f=u>>>26,l=67108863&u,c=Math.min(h,t.length-1),d=Math.max(0,h-e.length+1);d<=c;d++){var p=h-d|0;f+=(s=(n=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}n.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<n|o)).toString(16);o=a>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),i=0!==o||s!==this.length-1?h[6-u.length]+u+i:u+i}for(0!==o&&(i=o.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],d=l[e];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e);i=(p=p.idivn(d)).isZero()?m+i:h[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},n.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},n.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,h=new e(o),f=this.clone();if(u){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-n;a++)h[a]=0;for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),h[o-a-1]=s}return h},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},n.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},n.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},n.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},n.prototype.ior=function(e){return r(!(this.negative|e.negative)),this.iuor(e)},n.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},n.prototype.iand=function(e){return r(!(this.negative|e.negative)),this.iuand(e)},n.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},n.prototype.ixor=function(e){return r(!(this.negative|e.negative)),this.iuxor(e)},n.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},n.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},n.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++)o=(t=(0|r.words[s])-(0|i.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(e){return this.clone().isub(e)};var d=function(e,t,r){var i,n,o,s=e.words,a=t.words,u=r.words,h=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,R=0|s[5],q=8191&R,A=R>>>13,C=0|s[6],P=8191&C,I=C>>>13,O=0|s[7],B=8191&O,k=O>>>13,T=0|s[8],x=8191&T,N=T>>>13,j=0|s[9],$=8191&j,D=j>>>13,U=0|a[0],L=8191&U,F=U>>>13,z=0|a[1],H=8191&z,K=z>>>13,W=0|a[2],G=8191&W,V=W>>>13,J=0|a[3],Q=8191&J,Z=J>>>13,Y=0|a[4],X=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ie=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],ue=8191&ae,he=ae>>>13,fe=0|a[8],le=8191&fe,ce=fe>>>13,de=0|a[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(h+(i=Math.imul(l,L))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(c,L)|0))<<13)|0;h=((o=Math.imul(c,F))+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(p,L),n=(n=Math.imul(p,F))+Math.imul(m,L)|0,o=Math.imul(m,F);var ye=(h+(i=i+Math.imul(l,H)|0)|0)+((8191&(n=(n=n+Math.imul(l,K)|0)+Math.imul(c,H)|0))<<13)|0;h=((o=o+Math.imul(c,K)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(y,L),n=(n=Math.imul(y,F))+Math.imul(b,L)|0,o=Math.imul(b,F),i=i+Math.imul(p,H)|0,n=(n=n+Math.imul(p,K)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,K)|0;var be=(h+(i=i+Math.imul(l,G)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,G)|0))<<13)|0;h=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(w,L),n=(n=Math.imul(w,F))+Math.imul(_,L)|0,o=Math.imul(_,F),i=i+Math.imul(y,H)|0,n=(n=n+Math.imul(y,K)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,K)|0,i=i+Math.imul(p,G)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,V)|0;var ve=(h+(i=i+Math.imul(l,Q)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(c,Q)|0))<<13)|0;h=((o=o+Math.imul(c,Z)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(S,L),n=(n=Math.imul(S,F))+Math.imul(E,L)|0,o=Math.imul(E,F),i=i+Math.imul(w,H)|0,n=(n=n+Math.imul(w,K)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,K)|0,i=i+Math.imul(y,G)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0;var we=(h+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,ee)|0)+Math.imul(c,X)|0))<<13)|0;h=((o=o+Math.imul(c,ee)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(q,L),n=(n=Math.imul(q,F))+Math.imul(A,L)|0,o=Math.imul(A,F),i=i+Math.imul(S,H)|0,n=(n=n+Math.imul(S,K)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,K)|0,i=i+Math.imul(w,G)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,Q)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,Z)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(h+(i=i+Math.imul(l,re)|0)|0)+((8191&(n=(n=n+Math.imul(l,ie)|0)+Math.imul(c,re)|0))<<13)|0;h=((o=o+Math.imul(c,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(P,L),n=(n=Math.imul(P,F))+Math.imul(I,L)|0,o=Math.imul(I,F),i=i+Math.imul(q,H)|0,n=(n=n+Math.imul(q,K)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,K)|0,i=i+Math.imul(S,G)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Z)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,ee)|0,i=i+Math.imul(p,re)|0,n=(n=n+Math.imul(p,ie)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0;var Me=(h+(i=i+Math.imul(l,oe)|0)|0)+((8191&(n=(n=n+Math.imul(l,se)|0)+Math.imul(c,oe)|0))<<13)|0;h=((o=o+Math.imul(c,se)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(B,L),n=(n=Math.imul(B,F))+Math.imul(k,L)|0,o=Math.imul(k,F),i=i+Math.imul(P,H)|0,n=(n=n+Math.imul(P,K)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,K)|0,i=i+Math.imul(q,G)|0,n=(n=n+Math.imul(q,V)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(S,Q)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Z)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(y,re)|0,n=(n=n+Math.imul(y,ie)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ie)|0,i=i+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(h+(i=i+Math.imul(l,ue)|0)|0)+((8191&(n=(n=n+Math.imul(l,he)|0)+Math.imul(c,ue)|0))<<13)|0;h=((o=o+Math.imul(c,he)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(x,L),n=(n=Math.imul(x,F))+Math.imul(N,L)|0,o=Math.imul(N,F),i=i+Math.imul(B,H)|0,n=(n=n+Math.imul(B,K)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,K)|0,i=i+Math.imul(P,G)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,V)|0,i=i+Math.imul(q,Q)|0,n=(n=n+Math.imul(q,Z)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Z)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,ee)|0,i=i+Math.imul(w,re)|0,n=(n=n+Math.imul(w,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(y,oe)|0,n=(n=n+Math.imul(y,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,i=i+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,he)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,he)|0;var Ee=(h+(i=i+Math.imul(l,le)|0)|0)+((8191&(n=(n=n+Math.imul(l,ce)|0)+Math.imul(c,le)|0))<<13)|0;h=((o=o+Math.imul(c,ce)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul($,L),n=(n=Math.imul($,F))+Math.imul(D,L)|0,o=Math.imul(D,F),i=i+Math.imul(x,H)|0,n=(n=n+Math.imul(x,K)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,K)|0,i=i+Math.imul(B,G)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Z)|0,i=i+Math.imul(q,X)|0,n=(n=n+Math.imul(q,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ie)|0,i=i+Math.imul(w,oe)|0,n=(n=n+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,i=i+Math.imul(y,ue)|0,n=(n=n+Math.imul(y,he)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,he)|0,i=i+Math.imul(p,le)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ce)|0;var Re=(h+(i=i+Math.imul(l,pe)|0)|0)+((8191&(n=(n=n+Math.imul(l,me)|0)+Math.imul(c,pe)|0))<<13)|0;h=((o=o+Math.imul(c,me)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,i=Math.imul($,H),n=(n=Math.imul($,K))+Math.imul(D,H)|0,o=Math.imul(D,K),i=i+Math.imul(x,G)|0,n=(n=n+Math.imul(x,V)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,V)|0,i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,Z)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,Z)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,i=i+Math.imul(q,re)|0,n=(n=n+Math.imul(q,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,i=i+Math.imul(w,ue)|0,n=(n=n+Math.imul(w,he)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,he)|0,i=i+Math.imul(y,le)|0,n=(n=n+Math.imul(y,ce)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,ce)|0;var qe=(h+(i=i+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;h=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(qe>>>26)|0,qe&=67108863,i=Math.imul($,G),n=(n=Math.imul($,V))+Math.imul(D,G)|0,o=Math.imul(D,V),i=i+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,Z)|0,i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ie)|0,i=i+Math.imul(q,oe)|0,n=(n=n+Math.imul(q,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,he)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,he)|0,i=i+Math.imul(w,le)|0,n=(n=n+Math.imul(w,ce)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ce)|0;var Ae=(h+(i=i+Math.imul(y,pe)|0)|0)+((8191&(n=(n=n+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;h=((o=o+Math.imul(b,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul($,Q),n=(n=Math.imul($,Z))+Math.imul(D,Q)|0,o=Math.imul(D,Z),i=i+Math.imul(x,X)|0,n=(n=n+Math.imul(x,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,i=i+Math.imul(B,re)|0,n=(n=n+Math.imul(B,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,se)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,se)|0,i=i+Math.imul(q,ue)|0,n=(n=n+Math.imul(q,he)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,he)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,ce)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,ce)|0;var Ce=(h+(i=i+Math.imul(w,pe)|0)|0)+((8191&(n=(n=n+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;h=((o=o+Math.imul(_,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul($,X),n=(n=Math.imul($,ee))+Math.imul(D,X)|0,o=Math.imul(D,ee),i=i+Math.imul(x,re)|0,n=(n=n+Math.imul(x,ie)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ie)|0,i=i+Math.imul(B,oe)|0,n=(n=n+Math.imul(B,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,he)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,he)|0,i=i+Math.imul(q,le)|0,n=(n=n+Math.imul(q,ce)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ce)|0;var Pe=(h+(i=i+Math.imul(S,pe)|0)|0)+((8191&(n=(n=n+Math.imul(S,me)|0)+Math.imul(E,pe)|0))<<13)|0;h=((o=o+Math.imul(E,me)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,i=Math.imul($,re),n=(n=Math.imul($,ie))+Math.imul(D,re)|0,o=Math.imul(D,ie),i=i+Math.imul(x,oe)|0,n=(n=n+Math.imul(x,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,i=i+Math.imul(B,ue)|0,n=(n=n+Math.imul(B,he)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,he)|0,i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,ce)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,ce)|0;var Ie=(h+(i=i+Math.imul(q,pe)|0)|0)+((8191&(n=(n=n+Math.imul(q,me)|0)+Math.imul(A,pe)|0))<<13)|0;h=((o=o+Math.imul(A,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul($,oe),n=(n=Math.imul($,se))+Math.imul(D,oe)|0,o=Math.imul(D,se),i=i+Math.imul(x,ue)|0,n=(n=n+Math.imul(x,he)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,he)|0,i=i+Math.imul(B,le)|0,n=(n=n+Math.imul(B,ce)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,ce)|0;var Oe=(h+(i=i+Math.imul(P,pe)|0)|0)+((8191&(n=(n=n+Math.imul(P,me)|0)+Math.imul(I,pe)|0))<<13)|0;h=((o=o+Math.imul(I,me)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,i=Math.imul($,ue),n=(n=Math.imul($,he))+Math.imul(D,ue)|0,o=Math.imul(D,he),i=i+Math.imul(x,le)|0,n=(n=n+Math.imul(x,ce)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ce)|0;var Be=(h+(i=i+Math.imul(B,pe)|0)|0)+((8191&(n=(n=n+Math.imul(B,me)|0)+Math.imul(k,pe)|0))<<13)|0;h=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul($,le),n=(n=Math.imul($,ce))+Math.imul(D,le)|0,o=Math.imul(D,ce);var ke=(h+(i=i+Math.imul(x,pe)|0)|0)+((8191&(n=(n=n+Math.imul(x,me)|0)+Math.imul(N,pe)|0))<<13)|0;h=((o=o+Math.imul(N,me)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863;var Te=(h+(i=Math.imul($,pe))|0)+((8191&(n=(n=Math.imul($,me))+Math.imul(D,pe)|0))<<13)|0;return h=((o=Math.imul(D,me))+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,u[0]=ge,u[1]=ye,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Me,u[7]=Se,u[8]=Ee,u[9]=Re,u[10]=qe,u[11]=Ae,u[12]=Ce,u[13]=Pe,u[14]=Ie,u[15]=Oe,u[16]=Be,u[17]=ke,u[18]=Te,0!==h&&(u[19]=h,r.length++),r};function p(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(d=c),n.prototype.mulTo=function(e,t){var r,i=this.length+e.length;return r=10===this.length&&10===e.length?d(this,e,t):i<63?c(this,e,t):i<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var a=67108863&i,u=Math.min(o,t.length-1),h=Math.max(0,o-e.length+1);h<=u;h++){var f=o-h,l=(0|e.words[f])*(0|t.words[h]),c=67108863&l;a=67108863&(c=c+a|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,e,t):p(this,e,t),r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=n.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},m.prototype.permute=function(e,t,r,i,n,o){for(var s=0;s<o;s++)i[s]=t[e[s]],n[s]=r[e[s]]},m.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),f=0;f<n;f+=a)for(var l=u,c=h,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],b=l*g-c*y;y=l*y+c*g,g=b,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==a&&(b=u*l-h*c,c=u*c+h*l,l=b)}},m.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},m.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},m.prototype.convert13b=function(e,t,i,n){for(var o=0,s=0;s<t;s++)o+=0|e[s],i[2*s]=8191&o,o>>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<n;++s)i[s]=0;r(0===o),r(!(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),s=new Array(i),a=new Array(i),u=new Array(i),h=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(e.words,e.length,s,i),this.convert13b(t.words,t.length,h,i),this.transform(s,o,a,u,i,n),this.transform(h,o,f,l,i,n);for(var d=0;d<i;d++){var p=a[d]*f[d]-u[d]*l[d];u[d]=a[d]*l[d]+u[d]*f[d],a[d]=p}return this.conjugate(a,u,i),this.transform(a,u,c,o,i,n),this.conjugate(c,o,i),this.normalize13b(c,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},n.prototype.mul=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},n.prototype.mulf=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),p(this,e,t)},n.prototype.imul=function(e){return this.clone().mulTo(e,this)},n.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,i=0;i<this.length;i++){var n=(0|this.words[i])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[i]=67108863&o}return 0!==t&&(this.words[i]=t,this.length++),this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}(e);if(0===t.length)return new n(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var o=r.sqr();i<t.length;i++,o=o.sqr())0!==t[i]&&(r=r.mul(o));return r},n.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,i=e%26,n=(e-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<i;this.words[t]=u|s,s=a>>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},n.prototype.iushrn=function(e,t,i){var n;r("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=i;if(n-=s,n=Math.max(0,n),u){for(var h=0;h<s;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var f=0;for(h=this.length-1;h>=0&&(0!==f||h>=n);h--){var l=0|this.words[h];this.words[h]=f<<26-o|l>>>o,f=l&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<<t;return!(this.length<=i||!(this.words[i]&n))},n.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(e){return this.clone().imaskn(e)},n.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},n.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},n.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},n.prototype.addn=function(e){return this.clone().iaddn(e)},n.prototype.subn=function(e){return this.clone().isubn(e)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(e,t,i){var n,o,s=e.length+i;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+i])+a;var u=(0|e.words[n])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)a=(o=(0|this.words[n+i])+a)>>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new n(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var f=i.clone()._ishlnsubmul(o,1,u);0===f.negative&&(i=f,a&&(a.words[u]=1));for(var l=u-1;l>=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new n(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},n.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,i=0,n=this.length-1;n>=0;n--)i=(t*i+(0|this.words[n]))%e;return i},n.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new n(1),s=new n(0),a=new n(0),u=new n(1),h=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++h;for(var f=i.clone(),l=t.clone();!t.isZero();){for(var c=0,d=1;!(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(l)),a.iushrn(1),u.iushrn(1);t.cmp(i)>=0?(t.isub(i),o.isub(a),s.isub(u)):(i.isub(t),a.isub(o),u.isub(s))}return{a:a,b:u,gcd:i.iushln(h)}},n.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new n(1),a=new n(0),u=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var h=0,f=1;!(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,c=1;!(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(a)):(i.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},n.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},n.prototype.invm=function(e){return this.egcd(e).a.umod(e)},n.prototype.isEven=function(){return!(1&this.words[0])},n.prototype.isOdd=function(){return!(1&~this.words[0])},n.prototype.andln=function(e){return this.words[0]&e},n.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,s=i;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},n.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},n.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},n.prototype.gtn=function(e){return 1===this.cmpn(e)},n.prototype.gt=function(e){return 1===this.cmp(e)},n.prototype.gten=function(e){return this.cmpn(e)>=0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.ltn=function(e){return-1===this.cmpn(e)},n.prototype.lt=function(e){return-1===this.cmp(e)},n.prototype.lten=function(e){return this.cmpn(e)<=0},n.prototype.lte=function(e){return this.cmp(e)<=0},n.prototype.eqn=function(e){return 0===this.cmpn(e)},n.prototype.eq=function(e){return 0===this.cmp(e)},n.red=function(e){return new M(e)},n.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(e){return this.red=e,this},n.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},n.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},n.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},n.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},n.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},n.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},n.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},n.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new n(t,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=n._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new n(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(b,y),b.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(v,y),i(w,y),i(_,y),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},n._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return g[e]=t,t},M.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){r(!(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new n(1)).iushrn(2);return this.pow(e,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,o),c=this.pow(e,o.addn(1).iushrn(1)),d=this.pow(e,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var y=this.pow(l,new n(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},M.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},M.prototype.pow=function(e,t){if(t.isZero())return new n(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new n(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var o=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),i=t.length-1;i>=0;i--){for(var h=t.words[i],f=u-1;f>=0;f--){var l=h>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}u=26}return o},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},n.mont=function(e){return new S(e)},i(S,M),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new n(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(bn$b,bn$a)),bn$b.exports}var brorand={exports:{}},hasRequiredBrorand,mr,hasRequiredMr,generatePrime,hasRequiredGeneratePrime;function requireBrorand(){if(hasRequiredBrorand)return brorand.exports;var e;function t(e){this.rand=e}if(hasRequiredBrorand=1,brorand.exports=function(r){return e||(e=new t(null)),e.generate(r)},brorand.exports.Rand=t,t.prototype.generate=function(e){return this._rand(e)},t.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(t.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var r=requireCryptoBrowserify();if("function"!=typeof r.randomBytes)throw new Error("Not supported");t.prototype._rand=function(e){return r.randomBytes(e)}}catch(e){}return brorand.exports}function requireMr(){if(hasRequiredMr)return mr;hasRequiredMr=1;var e=requireBn$5(),t=requireBrorand();function r(e){this.rand=e||new t.Rand}return mr=r,r.create=function(e){return new r(e)},r.prototype._randbelow=function(t){var r=t.bitLength(),i=Math.ceil(r/8);do{var n=new e(this.rand.generate(i))}while(n.cmp(t)>=0);return n},r.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},r.prototype.test=function(t,r,i){var n=t.bitLength(),o=e.mont(t),s=new e(1).toRed(o);r||(r=Math.max(1,n/48|0));for(var a=t.subn(1),u=0;!a.testn(u);u++);for(var h=t.shrn(u),f=a.toRed(o);r>0;r--){var l=this._randrange(new e(2),a);i&&i(l);var c=l.toRed(o).redPow(h);if(0!==c.cmp(s)&&0!==c.cmp(f)){for(var d=1;d<u;d++){if(0===(c=c.redSqr()).cmp(s))return!1;if(0===c.cmp(f))break}if(d===u)return!1}}return!0},r.prototype.getDivisor=function(t,r){var i=t.bitLength(),n=e.mont(t),o=new e(1).toRed(n);r||(r=Math.max(1,i/48|0));for(var s=t.subn(1),a=0;!s.testn(a);a++);for(var u=t.shrn(a),h=s.toRed(n);r>0;r--){var f=this._randrange(new e(2),s),l=t.gcd(f);if(0!==l.cmpn(1))return l;var c=f.toRed(n).redPow(u);if(0!==c.cmp(o)&&0!==c.cmp(h)){for(var d=1;d<a;d++){if(0===(c=c.redSqr()).cmp(o))return c.fromRed().subn(1).gcd(t);if(0===c.cmp(h))break}if(d===a)return(c=c.redSqr()).fromRed().subn(1).gcd(t)}}return!1},mr}function requireGeneratePrime(){if(hasRequiredGeneratePrime)return generatePrime;hasRequiredGeneratePrime=1;var e=requireBrowser$b();generatePrime=p,p.simpleSieve=c,p.fermatTest=d;var t=requireBn$6(),r=new t(24),i=new(requireMr()),n=new t(1),o=new t(2),s=new t(5);new t(16),new t(8);var a=new t(10),u=new t(3);new t(7);var h=new t(11),f=new t(4);new t(12);var l=null;function c(e){for(var t=function(){if(null!==l)return l;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var i=Math.ceil(Math.sqrt(r)),n=0;n<t&&e[n]<=i&&r%e[n]!=0;n++);t!==n&&e[n]<=i||(e[t++]=r)}return l=e,e}(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function d(e){var r=t.mont(e);return 0===o.toRed(r).redPow(e.subn(1)).fromRed().cmpn(1)}function p(l,p){if(l<16)return new t(2===p||5===p?[140,123]:[140,39]);var m,g;for(p=new t(p);;){for(m=new t(e(Math.ceil(l/8)));m.bitLength()>l;)m.ishrn(1);if(m.isEven()&&m.iadd(n),m.testn(1)||m.iadd(o),p.cmp(o)){if(!p.cmp(s))for(;m.mod(a).cmp(u);)m.iadd(f)}else for(;m.mod(r).cmp(h);)m.iadd(f);if(c(g=m.shrn(1))&&c(m)&&d(g)&&d(m)&&i.test(g)&&i.test(m))return m}}return generatePrime}const modp1={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18={gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"},require$$1$1={modp1:modp1,modp2:modp2,modp5:modp5,modp14:modp14,modp15:modp15,modp16:modp16,modp17:modp17,modp18:modp18};var dh,hasRequiredDh,hasRequiredBrowser$5;function requireDh(){if(hasRequiredDh)return dh;hasRequiredDh=1;var e=requireBn$6(),t=new(requireMr()),r=new e(24),i=new e(11),n=new e(10),o=new e(3),s=new e(7),a=requireGeneratePrime(),u=requireBrowser$b();function h(t,r){return r=r||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,r)),this._pub=new e(t),this}function f(t,r){return r=r||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,r)),this._priv=new e(t),this}dh=c;var l={};function c(t,r,i){this.setGenerator(r),this.__prime=new e(t),this._prime=e.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,i?(this.setPublicKey=h,this.setPrivateKey=f):this._primeCode=8}function d(e,t){var r=new Buffer(e.toArray());return t?r.toString(t):r}return Object.defineProperty(c.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,u){var h=u.toString("hex"),f=[h,e.toString(16)].join("_");if(f in l)return l[f];var c,d=0;if(e.isEven()||!a.simpleSieve||!a.fermatTest(e)||!t.test(e))return d+=1,d+="02"===h||"05"===h?8:4,l[f]=d,d;switch(t.test(e.shrn(1))||(d+=2),h){case"02":e.mod(r).cmp(i)&&(d+=8);break;case"05":(c=e.mod(n)).cmp(o)&&c.cmp(s)&&(d+=8);break;default:d+=4}return l[f]=d,d}(this.__prime,this.__gen)),this._primeCode}}),c.prototype.generateKeys=function(){return this._priv||(this._priv=new e(u(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},c.prototype.computeSecret=function(t){var r=(t=(t=new e(t)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new Buffer(r.toArray()),n=this.getPrime();if(i.length<n.length){var o=new Buffer(n.length-i.length);o.fill(0),i=Buffer.concat([o,i])}return i},c.prototype.getPublicKey=function(e){return d(this._pub,e)},c.prototype.getPrivateKey=function(e){return d(this._priv,e)},c.prototype.getPrime=function(e){return d(this.__prime,e)},c.prototype.getGenerator=function(e){return d(this._gen,e)},c.prototype.setGenerator=function(t,r){return r=r||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,r)),this.__gen=t,this._gen=new e(t),this},dh}function requireBrowser$5(){if(hasRequiredBrowser$5)return browser$5;hasRequiredBrowser$5=1;var e=requireGeneratePrime(),t=require$$1$1,r=requireDh();var i={binary:!0,hex:!0,base64:!0};return browser$5.DiffieHellmanGroup=browser$5.createDiffieHellmanGroup=browser$5.getDiffieHellman=function(e){var i=new Buffer(t[e].prime,"hex"),n=new Buffer(t[e].gen,"hex");return new r(i,n)},browser$5.createDiffieHellman=browser$5.DiffieHellman=function t(n,o,s,a){return Buffer.isBuffer(o)||void 0===i[o]?t(n,"binary",o,s):(o=o||"binary",a=a||"binary",s=s||new Buffer([2]),Buffer.isBuffer(s)||(s=new Buffer(s,a)),"number"==typeof n?new r(e(n,s),s,!0):(Buffer.isBuffer(n)||(n=new Buffer(n,o)),new r(n,s,!0)))},browser$5}var safeBuffer$3={exports:{}},hasRequiredSafeBuffer$3;function requireSafeBuffer$3(){return hasRequiredSafeBuffer$3||(hasRequiredSafeBuffer$3=1,function(e,t){var r=requireDist(),i=r.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),n(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(safeBuffer$3,safeBuffer$3.exports)),safeBuffer$3.exports}var readableBrowser={exports:{}},processNextickArgs={exports:{}},hasRequiredProcessNextickArgs,isarray,hasRequiredIsarray,streamBrowser,hasRequiredStreamBrowser;function requireProcessNextickArgs(){if(hasRequiredProcessNextickArgs)return processNextickArgs.exports;return hasRequiredProcessNextickArgs=1,void 0===process$1||!process$1.version||0===process$1.version.indexOf("v0.")||0===process$1.version.indexOf("v1.")&&0!==process$1.version.indexOf("v1.8.")?processNextickArgs.exports={nextTick:function(e,t,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var n,o,s=arguments.length;switch(s){case 0:case 1:return process$1.nextTick(e);case 2:return process$1.nextTick((function(){e.call(null,t)}));case 3:return process$1.nextTick((function(){e.call(null,t,r)}));case 4:return process$1.nextTick((function(){e.call(null,t,r,i)}));default:for(n=new Array(s-1),o=0;o<n.length;)n[o++]=arguments[o];return process$1.nextTick((function(){e.apply(null,n)}))}}}:processNextickArgs.exports=process$1,processNextickArgs.exports}function requireIsarray(){if(hasRequiredIsarray)return isarray;hasRequiredIsarray=1;var e={}.toString;return isarray=Array.isArray||function(t){return"[object Array]"==e.call(t)}}function requireStreamBrowser(){return hasRequiredStreamBrowser?streamBrowser:(hasRequiredStreamBrowser=1,streamBrowser=requireEvents().EventEmitter)}var safeBuffer$2={exports:{}},hasRequiredSafeBuffer$2;function requireSafeBuffer$2(){return hasRequiredSafeBuffer$2||(hasRequiredSafeBuffer$2=1,function(e,t){var r=requireDist(),i=r.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=o),n(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(safeBuffer$2,safeBuffer$2.exports)),safeBuffer$2.exports}var util={},hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util;function e(e){return Object.prototype.toString.call(e)}return hasRequiredUtil=1,util.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},util.isBoolean=function(e){return"boolean"==typeof e},util.isNull=function(e){return null===e},util.isNullOrUndefined=function(e){return null==e},util.isNumber=function(e){return"number"==typeof e},util.isString=function(e){return"string"==typeof e},util.isSymbol=function(e){return"symbol"==typeof e},util.isUndefined=function(e){return void 0===e},util.isRegExp=function(t){return"[object RegExp]"===e(t)},util.isObject=function(e){return"object"==typeof e&&null!==e},util.isDate=function(t){return"[object Date]"===e(t)},util.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},util.isFunction=function(e){return"function"==typeof e},util.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},util.isBuffer=requireDist().Buffer.isBuffer,util}var BufferList={exports:{}},hasRequiredBufferList,destroy_1,hasRequiredDestroy,_stream_writable,hasRequired_stream_writable,_stream_duplex,hasRequired_stream_duplex,_stream_readable,hasRequired_stream_readable,_stream_transform,hasRequired_stream_transform,_stream_passthrough,hasRequired_stream_passthrough,hasRequiredReadableBrowser;function requireBufferList(){return hasRequiredBufferList||(hasRequiredBufferList=1,e=BufferList,t=requireSafeBuffer$2().Buffer,r=requireUtil$1(),e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return t.alloc(0);for(var r,i,n,o=t.allocUnsafe(e>>>0),s=this.head,a=0;s;)r=s.data,i=o,n=a,r.copy(i,n),a+=s.data.length,s=s.next;return o},e}(),r&&r.inspect&&r.inspect.custom&&(e.exports.prototype[r.inspect.custom]=function(){var e=r.inspect({length:this.length});return this.constructor.name+" "+e})),BufferList.exports;var e,t,r}function requireDestroy(){if(hasRequiredDestroy)return destroy_1;hasRequiredDestroy=1;var e=requireProcessNextickArgs();function t(e,t){e.emit("error",t)}return destroy_1={destroy:function(r,i){var n=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(i?i(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(t,this,r)):e.nextTick(t,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,(function(r){!i&&r?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,e.nextTick(t,n,r)):e.nextTick(t,n,r):i&&i(r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}function require_stream_writable(){if(hasRequired_stream_writable)return _stream_writable;hasRequired_stream_writable=1;var e=requireProcessNextickArgs();function t(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var i=e.entry;e.entry=null;for(;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}_stream_writable=d;var r,i=!process$1.browser&&["v0.10","v0.9."].indexOf(process$1.version.slice(0,5))>-1?setImmediate:e.nextTick;d.WritableState=c;var n=Object.create(requireUtil());n.inherits=requireInherits_browser();var o={deprecate:requireBrowser$d()},s=requireStreamBrowser(),a=requireSafeBuffer$2().Buffer,u=(void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var h,f=requireDestroy();function l(){}function c(n,o){r=r||require_stream_duplex(),n=n||{};var s=o instanceof r;this.objectMode=!!n.objectMode,s&&(this.objectMode=this.objectMode||!!n.writableObjectMode);var a=n.highWaterMark,u=n.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:s&&(u||0===u)?u:h,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===n.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=n.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,r){var n=t._writableState,o=n.sync,s=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),r)!function(t,r,i,n,o){--r.pendingcb,i?(e.nextTick(o,n),e.nextTick(v,t,r),t._writableState.errorEmitted=!0,t.emit("error",n)):(o(n),t._writableState.errorEmitted=!0,t.emit("error",n),v(t,r))}(t,n,o,r,s);else{var a=y(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||g(t,n),o?i(m,t,n,a,s):m(t,n,a,s)}}(o,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}function d(e){if(r=r||require_stream_duplex(),!(h.call(d,this)||this instanceof r))return new d(e);this._writableState=new c(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function p(e,t,r,i,n,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function m(e,t,r,i){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),v(e,t)}function g(e,r){r.bufferProcessing=!0;var i=r.bufferedRequest;if(e._writev&&i&&i.next){var n=r.bufferedRequestCount,o=new Array(n),s=r.corkedRequestsFree;s.entry=i;for(var a=0,u=!0;i;)o[a]=i,i.isBuf||(u=!1),i=i.next,a+=1;o.allBuffers=u,p(e,r,!0,r.length,o,"",s.finish),r.pendingcb++,r.lastBufferedRequest=null,s.next?(r.corkedRequestsFree=s.next,s.next=null):r.corkedRequestsFree=new t(r),r.bufferedRequestCount=0}else{for(;i;){var h=i.chunk,f=i.encoding,l=i.callback;if(p(e,r,!1,r.objectMode?1:h.length,h,f,l),i=i.next,r.bufferedRequestCount--,r.writing)break}null===i&&(r.lastBufferedRequest=null)}r.bufferedRequest=i,r.bufferProcessing=!1}function y(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function b(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),v(e,t)}))}function v(t,r){var i=y(r);return i&&(!function(t,r){r.prefinished||r.finalCalled||("function"==typeof t._final?(r.pendingcb++,r.finalCalled=!0,e.nextTick(b,t,r)):(r.prefinished=!0,t.emit("prefinish")))}(t,r),0===r.pendingcb&&(r.finished=!0,t.emit("finish"))),i}return n.inherits(d,s),c.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(c.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(d,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===d&&(e&&e._writableState instanceof c)}})):h=function(e){return e instanceof this},d.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},d.prototype.write=function(t,r,i){var n,o=this._writableState,s=!1,h=!o.objectMode&&(n=t,a.isBuffer(n)||n instanceof u);return h&&!a.isBuffer(t)&&(t=function(e){return a.from(e)}(t)),"function"==typeof r&&(i=r,r=null),h?r="buffer":r||(r=o.defaultEncoding),"function"!=typeof i&&(i=l),o.ended?function(t,r){var i=new Error("write after end");t.emit("error",i),e.nextTick(r,i)}(this,i):(h||function(t,r,i,n){var o=!0,s=!1;return null===i?s=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||r.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),e.nextTick(n,s),o=!1),o}(this,o,t,i))&&(o.pendingcb++,s=function(e,t,r,i,n,o){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=a.from(t,r));return t}(t,i,n);i!==s&&(r=!0,n="buffer",i=s)}var u=t.objectMode?1:i.length;t.length+=u;var h=t.length<t.highWaterMark;h||(t.needDrain=!0);if(t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else p(e,t,!1,u,i,n,o);return h}(this,o,h,t,r,i)),s},d.prototype.cork=function(){this._writableState.corked++},d.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||g(this,e))},d.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),d.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},d.prototype._writev=null,d.prototype.end=function(t,r,i){var n=this._writableState;"function"==typeof t?(i=t,t=null,r=null):"function"==typeof r&&(i=r,r=null),null!=t&&this.write(t,r),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,r,i){r.ending=!0,v(t,r),i&&(r.finished?e.nextTick(i):t.once("finish",i));r.ended=!0,t.writable=!1}(this,n,i)},Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),d.prototype.destroy=f.destroy,d.prototype._undestroy=f.undestroy,d.prototype._destroy=function(e,t){this.end(),t(e)},_stream_writable}function require_stream_duplex(){if(hasRequired_stream_duplex)return _stream_duplex;hasRequired_stream_duplex=1;var e=requireProcessNextickArgs(),t=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};_stream_duplex=u;var r=Object.create(requireUtil());r.inherits=requireInherits_browser();var i=require_stream_readable(),n=require_stream_writable();r.inherits(u,i);for(var o=t(n.prototype),s=0;s<o.length;s++){var a=o[s];u.prototype[a]||(u.prototype[a]=n.prototype[a])}function u(e){if(!(this instanceof u))return new u(e);i.call(this,e),n.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||e.nextTick(f,this)}function f(e){e.end()}return Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),u.prototype._destroy=function(t,r){this.push(null),this.end(),e.nextTick(r,t)},_stream_duplex}function require_stream_readable(){if(hasRequired_stream_readable)return _stream_readable;hasRequired_stream_readable=1;var e=requireProcessNextickArgs();_stream_readable=m;var t,r=requireIsarray();m.ReadableState=p,requireEvents().EventEmitter;var i=function(e,t){return e.listeners(t).length},n=requireStreamBrowser(),o=requireSafeBuffer$2().Buffer,s=(void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var a=Object.create(requireUtil());a.inherits=requireInherits_browser();var u=requireUtil$1(),h=void 0;h=u&&u.debuglog?u.debuglog("stream"):function(){};var f,l=requireBufferList(),c=requireDestroy();a.inherits(m,n);var d=["error","close","destroy","pause","resume"];function p(e,r){e=e||{};var i=r instanceof(t=t||require_stream_duplex());this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,o=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=requireString_decoder().StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function m(e){if(t=t||require_stream_duplex(),!(this instanceof m))return new m(e);this._readableState=new p(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),n.call(this)}function g(e,t,r,i,n){var a,u=e._readableState;null===t?(u.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,w(e)}(e,u)):(n||(a=function(e,t){var r;i=t,o.isBuffer(i)||i instanceof s||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var i;return r}(u,t)),a?e.emit("error",a):u.objectMode||t&&t.length>0?("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),i?u.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):y(e,u,t,!0):u.ended?e.emit("error",new Error("stream.push() after EOF")):(u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?y(e,u,t,!1):M(e,u)):y(e,u,t,!1))):i||(u.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(u)}function y(e,t,r,i){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&w(e)),M(e,t)}Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),m.prototype.destroy=c.destroy,m.prototype._undestroy=c.undestroy,m.prototype._destroy=function(e,t){this.push(null),t(e)},m.prototype.push=function(e,t){var r,i=this._readableState;return i.objectMode?r=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=o.from(e,t),t=""),r=!0),g(this,e,t,!1,r)},m.prototype.unshift=function(e){return g(this,e,null,!0,!1)},m.prototype.isPaused=function(){return!1===this._readableState.flowing},m.prototype.setEncoding=function(e){return f||(f=requireString_decoder().StringDecoder),this._readableState.decoder=new f(e),this._readableState.encoding=e,this};var b=8388608;function v(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=b?e=b:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function w(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(h("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(_,t):_(t))}function _(e){h("emit readable"),e.emit("readable"),q(e)}function M(t,r){r.readingMore||(r.readingMore=!0,e.nextTick(S,t,r))}function S(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function E(e){h("readable nexttick read 0"),e.read(0)}function R(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),q(e),t.flowing&&!t.reading&&e.read(0)}function q(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function A(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var i;e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):i=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,i=1,n=r.data;e-=n.length;for(;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(s===o.length?n+=o:n+=o.slice(0,e),0===(e-=s)){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}(e,t):function(e,t){var r=o.allocUnsafe(e),i=t.head,n=1;i.data.copy(r),e-=i.data.length;for(;i=i.next;){var s=i.data,a=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,a),0===(e-=a)){a===s.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=s.slice(a));break}++n}return t.length-=n,r}(e,t);return i}(e,t.buffer,t.decoder),r);var r}function C(t){var r=t._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,e.nextTick(P,r,t))}function P(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function I(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}return m.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?C(this):w(this),null;if(0===(e=v(e,t))&&t.ended)return 0===t.length&&C(this),null;var i,n=t.needReadable;return h("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",n=!0),t.ended||t.reading?h("reading or ended",n=!1):n&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=v(r,t))),null===(i=e>0?A(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&C(this)),null!==i&&this.emit("data",i),i},m.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(t,n){var o=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=t;break;case 1:s.pipes=[s.pipes,t];break;default:s.pipes.push(t)}s.pipesCount+=1,h("pipe count=%d opts=%j",s.pipesCount,n);var a=(!n||!1!==n.end)&&t!==process$1.stdout&&t!==process$1.stderr?f:b;function u(e,r){h("onunpipe"),e===o&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,h("cleanup"),t.removeListener("close",g),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",m),t.removeListener("unpipe",u),o.removeListener("end",f),o.removeListener("end",b),o.removeListener("data",p),c=!0,!s.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function f(){h("onend"),t.end()}s.endEmitted?e.nextTick(a):o.once("end",a),t.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,q(e))}}(o);t.on("drain",l);var c=!1;var d=!1;function p(e){h("ondata"),d=!1,!1!==t.write(e)||d||((1===s.pipesCount&&s.pipes===t||s.pipesCount>1&&-1!==I(s.pipes,t))&&!c&&(h("false write response, pause",s.awaitDrain),s.awaitDrain++,d=!0),o.pause())}function m(e){h("onerror",e),b(),t.removeListener("error",m),0===i(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",y),b()}function y(){h("onfinish"),t.removeListener("close",g),b()}function b(){h("unpipe"),o.unpipe(t)}return o.on("data",p),function(e,t,i){if("function"==typeof e.prependListener)return e.prependListener(t,i);e._events&&e._events[t]?r(e._events[t])?e._events[t].unshift(i):e._events[t]=[i,e._events[t]]:e.on(t,i)}(t,"error",m),t.once("close",g),t.once("finish",y),t.emit("pipe",o),s.flowing||(h("pipe resume"),o.resume()),t},m.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=I(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},m.prototype.on=function(t,r){var i=n.prototype.on.call(this,t,r);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var o=this._readableState;o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.emittedReadable=!1,o.reading?o.length&&w(this):e.nextTick(E,this))}return i},m.prototype.addListener=m.prototype.on,m.prototype.resume=function(){var t=this._readableState;return t.flowing||(h("resume"),t.flowing=!0,function(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(R,t,r))}(this,t)),this},m.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},m.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var n in e.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(h("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(t.push(n)||(i=!0,e.pause()))})),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var o=0;o<d.length;o++)e.on(d[o],this.emit.bind(this,d[o]));return this._read=function(t){h("wrapped _read",t),i&&(i=!1,e.resume())},this},Object.defineProperty(m.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),m._fromList=A,_stream_readable}function require_stream_transform(){if(hasRequired_stream_transform)return _stream_transform;hasRequired_stream_transform=1,_stream_transform=i;var e=require_stream_duplex(),t=Object.create(requireUtil());function r(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function i(t){if(!(this instanceof i))return new i(t);e.call(this,t),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",n)}function n(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){o(e,t,r)})):o(this,null,null)}function o(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}return t.inherits=requireInherits_browser(),t.inherits(i,e),i.prototype.push=function(t,r){return this._transformState.needTransform=!1,e.prototype.push.call(this,t,r)},i.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},i.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},i.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},i.prototype._destroy=function(t,r){var i=this;e.prototype._destroy.call(this,t,(function(e){r(e),i.emit("close")}))},_stream_transform}function require_stream_passthrough(){if(hasRequired_stream_passthrough)return _stream_passthrough;hasRequired_stream_passthrough=1,_stream_passthrough=r;var e=require_stream_transform(),t=Object.create(requireUtil());function r(t){if(!(this instanceof r))return new r(t);e.call(this,t)}return t.inherits=requireInherits_browser(),t.inherits(r,e),r.prototype._transform=function(e,t,r){r(null,e)},_stream_passthrough}function requireReadableBrowser(){return hasRequiredReadableBrowser||(hasRequiredReadableBrowser=1,e=readableBrowser,t=readableBrowser.exports,(t=e.exports=require_stream_readable()).Stream=t,t.Readable=t,t.Writable=require_stream_writable(),t.Duplex=require_stream_duplex(),t.Transform=require_stream_transform(),t.PassThrough=require_stream_passthrough()),readableBrowser.exports;var e,t}var sign={exports:{}},bn$9={exports:{}},bn$8=bn$9.exports,hasRequiredBn$4;function requireBn$4(){return hasRequiredBn$4||(hasRequiredBn$4=1,function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function n(e,t,r){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:requireDist().Buffer}catch(e){}function s(e,t){var i=e.charCodeAt(t);return i>=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void r(!1,"Invalid character in "+e)}function a(e,t,r){var i=s(e,r);return r-1>=t&&(i|=s(e,r-1)<<4),i}function u(e,t,i,n){for(var o=0,s=0,a=Math.min(e.length,i),u=t;u<a;u++){var h=e.charCodeAt(u)-48;o*=n,s=h>=49?h-49+10:h>=17?h-17+10:h,r(h>=0&&s<n,"Invalid character"),o+=s}return o}function h(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(n.isBN=function(e){return e instanceof n||null!==e&&"object"==typeof e&&e.constructor.wordSize===n.wordSize&&Array.isArray(e.words)},n.max=function(e,t){return e.cmp(t)>0?e:t},n.min=function(e,t){return e.cmp(t)<0?e:t},n.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,i):(this._parseBase(e,t,n),"le"===i&&this._initArray(this.toArray(),t,i)))},n.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},n.prototype._initArray=function(e,t,i){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===i)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},n.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},n.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,s=o%i,a=Math.min(o,o-s)+r,h=0,f=r;f<a;f+=i)h=u(e,f,f+i,t),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(e,f,e.length,t),f=0;f<s;f++)l*=t;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this._strip()},n.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},n.prototype._move=function(e){h(e,this)},n.prototype.clone=function(){var e=new n(null);return this.copy(e),e},n.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(e){n.prototype.inspect=f}else n.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h<i;h++){for(var f=u>>>26,l=67108863&u,c=Math.min(h,t.length-1),d=Math.max(0,h-e.length+1);d<=c;d++){var p=h-d|0;f+=(s=(n=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r._strip()}n.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<n|o)).toString(16);o=a>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),i=0!==o||s!==this.length-1?l[6-u.length]+u+i:u+i}for(0!==o&&(i=o.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var h=c[e],f=d[e];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(f).toString(e);i=(p=p.idivn(f)).isZero()?m+i:l[h-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16,2)},o&&(n.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),n.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},n.prototype.toArrayLike=function(e,t,i){this._strip();var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,n),s},n.prototype._toArrayLikeLE=function(e,t){for(var r=0,i=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|i;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),i=0,o=0):(i=s>>>24,o+=2)}if(r<e.length)for(e[r++]=i;r<e.length;)e[r++]=0},n.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,i=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|i;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),i=0,o=0):(i=s>>>24,o+=2)}if(r>=0)for(e[r--]=i;r>=0;)e[r--]=0},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},n.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},n.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},n.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},n.prototype.ior=function(e){return r(!(this.negative|e.negative)),this.iuor(e)},n.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},n.prototype.iand=function(e){return r(!(this.negative|e.negative)),this.iuand(e)},n.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this._strip()},n.prototype.ixor=function(e){return r(!(this.negative|e.negative)),this.iuxor(e)},n.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<n:this.words[i]&~(1<<n),this._strip()},n.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},n.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++)o=(t=(0|r.words[s])-(0|i.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var i,n,o,s=e.words,a=t.words,u=r.words,h=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,R=0|s[5],q=8191&R,A=R>>>13,C=0|s[6],P=8191&C,I=C>>>13,O=0|s[7],B=8191&O,k=O>>>13,T=0|s[8],x=8191&T,N=T>>>13,j=0|s[9],$=8191&j,D=j>>>13,U=0|a[0],L=8191&U,F=U>>>13,z=0|a[1],H=8191&z,K=z>>>13,W=0|a[2],G=8191&W,V=W>>>13,J=0|a[3],Q=8191&J,Z=J>>>13,Y=0|a[4],X=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ie=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],ue=8191&ae,he=ae>>>13,fe=0|a[8],le=8191&fe,ce=fe>>>13,de=0|a[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(h+(i=Math.imul(l,L))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(c,L)|0))<<13)|0;h=((o=Math.imul(c,F))+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(p,L),n=(n=Math.imul(p,F))+Math.imul(m,L)|0,o=Math.imul(m,F);var ye=(h+(i=i+Math.imul(l,H)|0)|0)+((8191&(n=(n=n+Math.imul(l,K)|0)+Math.imul(c,H)|0))<<13)|0;h=((o=o+Math.imul(c,K)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(y,L),n=(n=Math.imul(y,F))+Math.imul(b,L)|0,o=Math.imul(b,F),i=i+Math.imul(p,H)|0,n=(n=n+Math.imul(p,K)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,K)|0;var be=(h+(i=i+Math.imul(l,G)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,G)|0))<<13)|0;h=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(w,L),n=(n=Math.imul(w,F))+Math.imul(_,L)|0,o=Math.imul(_,F),i=i+Math.imul(y,H)|0,n=(n=n+Math.imul(y,K)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,K)|0,i=i+Math.imul(p,G)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,V)|0;var ve=(h+(i=i+Math.imul(l,Q)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(c,Q)|0))<<13)|0;h=((o=o+Math.imul(c,Z)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(S,L),n=(n=Math.imul(S,F))+Math.imul(E,L)|0,o=Math.imul(E,F),i=i+Math.imul(w,H)|0,n=(n=n+Math.imul(w,K)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,K)|0,i=i+Math.imul(y,G)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0;var we=(h+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,ee)|0)+Math.imul(c,X)|0))<<13)|0;h=((o=o+Math.imul(c,ee)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(q,L),n=(n=Math.imul(q,F))+Math.imul(A,L)|0,o=Math.imul(A,F),i=i+Math.imul(S,H)|0,n=(n=n+Math.imul(S,K)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,K)|0,i=i+Math.imul(w,G)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,Q)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,Z)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(h+(i=i+Math.imul(l,re)|0)|0)+((8191&(n=(n=n+Math.imul(l,ie)|0)+Math.imul(c,re)|0))<<13)|0;h=((o=o+Math.imul(c,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(P,L),n=(n=Math.imul(P,F))+Math.imul(I,L)|0,o=Math.imul(I,F),i=i+Math.imul(q,H)|0,n=(n=n+Math.imul(q,K)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,K)|0,i=i+Math.imul(S,G)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Z)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,ee)|0,i=i+Math.imul(p,re)|0,n=(n=n+Math.imul(p,ie)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0;var Me=(h+(i=i+Math.imul(l,oe)|0)|0)+((8191&(n=(n=n+Math.imul(l,se)|0)+Math.imul(c,oe)|0))<<13)|0;h=((o=o+Math.imul(c,se)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(B,L),n=(n=Math.imul(B,F))+Math.imul(k,L)|0,o=Math.imul(k,F),i=i+Math.imul(P,H)|0,n=(n=n+Math.imul(P,K)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,K)|0,i=i+Math.imul(q,G)|0,n=(n=n+Math.imul(q,V)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(S,Q)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Z)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(y,re)|0,n=(n=n+Math.imul(y,ie)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ie)|0,i=i+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(h+(i=i+Math.imul(l,ue)|0)|0)+((8191&(n=(n=n+Math.imul(l,he)|0)+Math.imul(c,ue)|0))<<13)|0;h=((o=o+Math.imul(c,he)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(x,L),n=(n=Math.imul(x,F))+Math.imul(N,L)|0,o=Math.imul(N,F),i=i+Math.imul(B,H)|0,n=(n=n+Math.imul(B,K)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,K)|0,i=i+Math.imul(P,G)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,V)|0,i=i+Math.imul(q,Q)|0,n=(n=n+Math.imul(q,Z)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Z)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,ee)|0,i=i+Math.imul(w,re)|0,n=(n=n+Math.imul(w,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(y,oe)|0,n=(n=n+Math.imul(y,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,i=i+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,he)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,he)|0;var Ee=(h+(i=i+Math.imul(l,le)|0)|0)+((8191&(n=(n=n+Math.imul(l,ce)|0)+Math.imul(c,le)|0))<<13)|0;h=((o=o+Math.imul(c,ce)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul($,L),n=(n=Math.imul($,F))+Math.imul(D,L)|0,o=Math.imul(D,F),i=i+Math.imul(x,H)|0,n=(n=n+Math.imul(x,K)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,K)|0,i=i+Math.imul(B,G)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Z)|0,i=i+Math.imul(q,X)|0,n=(n=n+Math.imul(q,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ie)|0,i=i+Math.imul(w,oe)|0,n=(n=n+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,i=i+Math.imul(y,ue)|0,n=(n=n+Math.imul(y,he)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,he)|0,i=i+Math.imul(p,le)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ce)|0;var Re=(h+(i=i+Math.imul(l,pe)|0)|0)+((8191&(n=(n=n+Math.imul(l,me)|0)+Math.imul(c,pe)|0))<<13)|0;h=((o=o+Math.imul(c,me)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,i=Math.imul($,H),n=(n=Math.imul($,K))+Math.imul(D,H)|0,o=Math.imul(D,K),i=i+Math.imul(x,G)|0,n=(n=n+Math.imul(x,V)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,V)|0,i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,Z)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,Z)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,i=i+Math.imul(q,re)|0,n=(n=n+Math.imul(q,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,i=i+Math.imul(w,ue)|0,n=(n=n+Math.imul(w,he)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,he)|0,i=i+Math.imul(y,le)|0,n=(n=n+Math.imul(y,ce)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,ce)|0;var qe=(h+(i=i+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;h=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(qe>>>26)|0,qe&=67108863,i=Math.imul($,G),n=(n=Math.imul($,V))+Math.imul(D,G)|0,o=Math.imul(D,V),i=i+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,Z)|0,i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ie)|0,i=i+Math.imul(q,oe)|0,n=(n=n+Math.imul(q,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,he)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,he)|0,i=i+Math.imul(w,le)|0,n=(n=n+Math.imul(w,ce)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ce)|0;var Ae=(h+(i=i+Math.imul(y,pe)|0)|0)+((8191&(n=(n=n+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;h=((o=o+Math.imul(b,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul($,Q),n=(n=Math.imul($,Z))+Math.imul(D,Q)|0,o=Math.imul(D,Z),i=i+Math.imul(x,X)|0,n=(n=n+Math.imul(x,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,i=i+Math.imul(B,re)|0,n=(n=n+Math.imul(B,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,se)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,se)|0,i=i+Math.imul(q,ue)|0,n=(n=n+Math.imul(q,he)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,he)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,ce)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,ce)|0;var Ce=(h+(i=i+Math.imul(w,pe)|0)|0)+((8191&(n=(n=n+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;h=((o=o+Math.imul(_,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul($,X),n=(n=Math.imul($,ee))+Math.imul(D,X)|0,o=Math.imul(D,ee),i=i+Math.imul(x,re)|0,n=(n=n+Math.imul(x,ie)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ie)|0,i=i+Math.imul(B,oe)|0,n=(n=n+Math.imul(B,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,he)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,he)|0,i=i+Math.imul(q,le)|0,n=(n=n+Math.imul(q,ce)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ce)|0;var Pe=(h+(i=i+Math.imul(S,pe)|0)|0)+((8191&(n=(n=n+Math.imul(S,me)|0)+Math.imul(E,pe)|0))<<13)|0;h=((o=o+Math.imul(E,me)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,i=Math.imul($,re),n=(n=Math.imul($,ie))+Math.imul(D,re)|0,o=Math.imul(D,ie),i=i+Math.imul(x,oe)|0,n=(n=n+Math.imul(x,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,i=i+Math.imul(B,ue)|0,n=(n=n+Math.imul(B,he)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,he)|0,i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,ce)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,ce)|0;var Ie=(h+(i=i+Math.imul(q,pe)|0)|0)+((8191&(n=(n=n+Math.imul(q,me)|0)+Math.imul(A,pe)|0))<<13)|0;h=((o=o+Math.imul(A,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul($,oe),n=(n=Math.imul($,se))+Math.imul(D,oe)|0,o=Math.imul(D,se),i=i+Math.imul(x,ue)|0,n=(n=n+Math.imul(x,he)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,he)|0,i=i+Math.imul(B,le)|0,n=(n=n+Math.imul(B,ce)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,ce)|0;var Oe=(h+(i=i+Math.imul(P,pe)|0)|0)+((8191&(n=(n=n+Math.imul(P,me)|0)+Math.imul(I,pe)|0))<<13)|0;h=((o=o+Math.imul(I,me)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,i=Math.imul($,ue),n=(n=Math.imul($,he))+Math.imul(D,ue)|0,o=Math.imul(D,he),i=i+Math.imul(x,le)|0,n=(n=n+Math.imul(x,ce)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ce)|0;var Be=(h+(i=i+Math.imul(B,pe)|0)|0)+((8191&(n=(n=n+Math.imul(B,me)|0)+Math.imul(k,pe)|0))<<13)|0;h=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul($,le),n=(n=Math.imul($,ce))+Math.imul(D,le)|0,o=Math.imul(D,ce);var ke=(h+(i=i+Math.imul(x,pe)|0)|0)+((8191&(n=(n=n+Math.imul(x,me)|0)+Math.imul(N,pe)|0))<<13)|0;h=((o=o+Math.imul(N,me)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863;var Te=(h+(i=Math.imul($,pe))|0)+((8191&(n=(n=Math.imul($,me))+Math.imul(D,pe)|0))<<13)|0;return h=((o=Math.imul(D,me))+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,u[0]=ge,u[1]=ye,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Me,u[7]=Se,u[8]=Ee,u[9]=Re,u[10]=qe,u[11]=Ae,u[12]=Ce,u[13]=Pe,u[14]=Ie,u[15]=Oe,u[16]=Be,u[17]=ke,u[18]=Te,0!==h&&(u[19]=h,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var a=67108863&i,u=Math.min(o,t.length-1),h=Math.max(0,o-e.length+1);h<=u;h++){var f=o-h,l=(0|e.words[f])*(0|t.words[h]),c=67108863&l;a=67108863&(c=c+a|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r._strip()}function y(e,t,r){return g(e,t,r)}Math.imul||(m=p),n.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?p(this,e,t):r<1024?g(this,e,t):y(this,e,t)},n.prototype.mul=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},n.prototype.mulf=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),y(this,e,t)},n.prototype.imul=function(e){return this.clone().mulTo(e,this)},n.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var i=0,n=0;n<this.length;n++){var o=(0|this.words[n])*e,s=(67108863&o)+(67108863&i);i>>=26,i+=o/67108864|0,i+=s>>>26,this.words[n]=67108863&s}return 0!==i&&(this.words[n]=i,this.length++),t?this.ineg():this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=e.words[i]>>>n&1}return t}(e);if(0===t.length)return new n(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var o=r.sqr();i<t.length;i++,o=o.sqr())0!==t[i]&&(r=r.mul(o));return r},n.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,i=e%26,n=(e-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<i;this.words[t]=u|s,s=a>>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this._strip()},n.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},n.prototype.iushrn=function(e,t,i){var n;r("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=i;if(n-=s,n=Math.max(0,n),u){for(var h=0;h<s;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var f=0;for(h=this.length-1;h>=0&&(0!==f||h>=n);h--){var l=0|this.words[h];this.words[h]=f<<26-o|l>>>o,f=l&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<<t;return!(this.length<=i||!(this.words[i]&n))},n.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this._strip()},n.prototype.maskn=function(e){return this.clone().imaskn(e)},n.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},n.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},n.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},n.prototype.addn=function(e){return this.clone().iaddn(e)},n.prototype.subn=function(e){return this.clone().isubn(e)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(e,t,i){var n,o,s=e.length+i;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+i])+a;var u=(0|e.words[n])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)a=(o=(0|this.words[n+i])+a)>>26,this.words[n+i]=67108863&o;if(0===a)return this._strip();for(r(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},n.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new n(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var f=i.clone()._ishlnsubmul(o,1,u);0===f.negative&&(i=f,a&&(a.words[u]=1));for(var l=u-1;l>=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a._strip(),i._strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new n(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},n.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(i*n+(0|this.words[o]))%e;return t?-n:n},n.prototype.modn=function(e){return this.modrn(e)},n.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*i;this.words[n]=o/e|0,i=o%e}return this._strip(),t?this.ineg():this},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new n(1),s=new n(0),a=new n(0),u=new n(1),h=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++h;for(var f=i.clone(),l=t.clone();!t.isZero();){for(var c=0,d=1;!(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(l)),a.iushrn(1),u.iushrn(1);t.cmp(i)>=0?(t.isub(i),o.isub(a),s.isub(u)):(i.isub(t),a.isub(o),u.isub(s))}return{a:a,b:u,gcd:i.iushln(h)}},n.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new n(1),a=new n(0),u=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var h=0,f=1;!(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,c=1;!(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(a)):(i.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},n.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},n.prototype.invm=function(e){return this.egcd(e).a.umod(e)},n.prototype.isEven=function(){return!(1&this.words[0])},n.prototype.isOdd=function(){return!(1&~this.words[0])},n.prototype.andln=function(e){return this.words[0]&e},n.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,s=i;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},n.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},n.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},n.prototype.gtn=function(e){return 1===this.cmpn(e)},n.prototype.gt=function(e){return 1===this.cmp(e)},n.prototype.gten=function(e){return this.cmpn(e)>=0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.ltn=function(e){return-1===this.cmpn(e)},n.prototype.lt=function(e){return-1===this.cmp(e)},n.prototype.lten=function(e){return this.cmpn(e)<=0},n.prototype.lte=function(e){return this.cmp(e)<=0},n.prototype.eqn=function(e){return 0===this.cmpn(e)},n.prototype.eq=function(e){return 0===this.cmp(e)},n.red=function(e){return new E(e)},n.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(e){return this.red=e,this},n.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},n.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},n.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},n.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},n.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},n.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},n.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},n.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new n(t,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=n._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function R(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new n(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(w,v),w.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(_,v),i(M,v),i(S,v),S.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},n._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new _;else if("p192"===e)t=new M;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return b[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(!(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(h(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new n(1)).iushrn(2);return this.pow(e,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,o),c=this.pow(e,o.addn(1).iushrn(1)),d=this.pow(e,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var y=this.pow(l,new n(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new n(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new n(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var o=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),i=t.length-1;i>=0;i--){for(var h=t.words[i],f=u-1;f>=0;f--){var l=h>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}u=26}return o},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},n.mont=function(e){return new R(e)},i(R,E),R.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},R.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},R.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},R.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new n(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},R.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(bn$9,bn$8)),bn$9.exports}var safeBuffer$1={exports:{}},hasRequiredSafeBuffer$1,browserifyRsa,hasRequiredBrowserifyRsa;function requireSafeBuffer$1(){return hasRequiredSafeBuffer$1||(hasRequiredSafeBuffer$1=1,function(e,t){var r=requireDist(),i=r.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),n(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(safeBuffer$1,safeBuffer$1.exports)),safeBuffer$1.exports}function requireBrowserifyRsa(){if(hasRequiredBrowserifyRsa)return browserifyRsa;hasRequiredBrowserifyRsa=1;var e=requireBn$4(),t=requireBrowser$b(),r=requireSafeBuffer$1().Buffer;function i(r){var i,n=r.modulus.byteLength();do{i=new e(t(n))}while(i.cmp(r.modulus)>=0||!i.umod(r.prime1)||!i.umod(r.prime2));return i}function n(t,n){var o=function(t){var r=i(t);return{blinder:r.toRed(e.mont(t.modulus)).redPow(new e(t.publicExponent)).fromRed(),unblinder:r.invm(t.modulus)}}(n),s=n.modulus.byteLength(),a=new e(t).mul(o.blinder).umod(n.modulus),u=a.toRed(e.mont(n.prime1)),h=a.toRed(e.mont(n.prime2)),f=n.coefficient,l=n.prime1,c=n.prime2,d=u.redPow(n.exponent1).fromRed(),p=h.redPow(n.exponent2).fromRed(),m=d.isub(p).imul(f).umod(l).imul(c);return p.iadd(m).imul(o.unblinder).umod(n.modulus).toArrayLike(r,"be",s)}return n.getr=i,browserifyRsa=n}var elliptic={};const version="6.6.1",require$$0={version:version};var utils$2={},bn$7={exports:{}},bn$6=bn$7.exports,hasRequiredBn$3;function requireBn$3(){return hasRequiredBn$3||(hasRequiredBn$3=1,function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function n(e,t,r){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:requireDist().Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(e,t,r){var i=s(e,r);return r-1>=t&&(i|=s(e,r-1)<<4),i}function u(e,t,r,i){for(var n=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;n*=i,n+=a>=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(e){return e instanceof n||null!==e&&"object"==typeof e&&e.constructor.wordSize===n.wordSize&&Array.isArray(e.words)},n.max=function(e,t){return e.cmp(t)>0?e:t},n.min=function(e,t){return e.cmp(t)<0?e:t},n.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,i):(this._parseBase(e,t,n),"le"===i&&this._initArray(this.toArray(),t,i)))},n.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},n.prototype._initArray=function(e,t,i){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===i)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,s=o%i,a=Math.min(o,o-s)+r,h=0,f=r;f<a;f+=i)h=u(e,f,f+i,t),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(e,f,e.length,t),f=0;f<s;f++)l*=t;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},n.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},n.prototype.clone=function(){var e=new n(null);return this.copy(e),e},n.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h<i;h++){for(var f=u>>>26,l=67108863&u,c=Math.min(h,t.length-1),d=Math.max(0,h-e.length+1);d<=c;d++){var p=h-d|0;f+=(s=(n=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}n.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<n|o)).toString(16);o=a>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),i=0!==o||s!==this.length-1?h[6-u.length]+u+i:u+i}for(0!==o&&(i=o.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],d=l[e];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e);i=(p=p.idivn(d)).isZero()?m+i:h[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},n.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},n.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,h=new e(o),f=this.clone();if(u){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-n;a++)h[a]=0;for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),h[o-a-1]=s}return h},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},n.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},n.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},n.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},n.prototype.ior=function(e){return r(!(this.negative|e.negative)),this.iuor(e)},n.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},n.prototype.iand=function(e){return r(!(this.negative|e.negative)),this.iuand(e)},n.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},n.prototype.ixor=function(e){return r(!(this.negative|e.negative)),this.iuxor(e)},n.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},n.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},n.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++)o=(t=(0|r.words[s])-(0|i.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(e){return this.clone().isub(e)};var d=function(e,t,r){var i,n,o,s=e.words,a=t.words,u=r.words,h=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,R=0|s[5],q=8191&R,A=R>>>13,C=0|s[6],P=8191&C,I=C>>>13,O=0|s[7],B=8191&O,k=O>>>13,T=0|s[8],x=8191&T,N=T>>>13,j=0|s[9],$=8191&j,D=j>>>13,U=0|a[0],L=8191&U,F=U>>>13,z=0|a[1],H=8191&z,K=z>>>13,W=0|a[2],G=8191&W,V=W>>>13,J=0|a[3],Q=8191&J,Z=J>>>13,Y=0|a[4],X=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ie=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],ue=8191&ae,he=ae>>>13,fe=0|a[8],le=8191&fe,ce=fe>>>13,de=0|a[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(h+(i=Math.imul(l,L))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(c,L)|0))<<13)|0;h=((o=Math.imul(c,F))+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(p,L),n=(n=Math.imul(p,F))+Math.imul(m,L)|0,o=Math.imul(m,F);var ye=(h+(i=i+Math.imul(l,H)|0)|0)+((8191&(n=(n=n+Math.imul(l,K)|0)+Math.imul(c,H)|0))<<13)|0;h=((o=o+Math.imul(c,K)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(y,L),n=(n=Math.imul(y,F))+Math.imul(b,L)|0,o=Math.imul(b,F),i=i+Math.imul(p,H)|0,n=(n=n+Math.imul(p,K)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,K)|0;var be=(h+(i=i+Math.imul(l,G)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,G)|0))<<13)|0;h=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(w,L),n=(n=Math.imul(w,F))+Math.imul(_,L)|0,o=Math.imul(_,F),i=i+Math.imul(y,H)|0,n=(n=n+Math.imul(y,K)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,K)|0,i=i+Math.imul(p,G)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,V)|0;var ve=(h+(i=i+Math.imul(l,Q)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(c,Q)|0))<<13)|0;h=((o=o+Math.imul(c,Z)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(S,L),n=(n=Math.imul(S,F))+Math.imul(E,L)|0,o=Math.imul(E,F),i=i+Math.imul(w,H)|0,n=(n=n+Math.imul(w,K)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,K)|0,i=i+Math.imul(y,G)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0;var we=(h+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,ee)|0)+Math.imul(c,X)|0))<<13)|0;h=((o=o+Math.imul(c,ee)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(q,L),n=(n=Math.imul(q,F))+Math.imul(A,L)|0,o=Math.imul(A,F),i=i+Math.imul(S,H)|0,n=(n=n+Math.imul(S,K)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,K)|0,i=i+Math.imul(w,G)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,Q)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,Z)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(h+(i=i+Math.imul(l,re)|0)|0)+((8191&(n=(n=n+Math.imul(l,ie)|0)+Math.imul(c,re)|0))<<13)|0;h=((o=o+Math.imul(c,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(P,L),n=(n=Math.imul(P,F))+Math.imul(I,L)|0,o=Math.imul(I,F),i=i+Math.imul(q,H)|0,n=(n=n+Math.imul(q,K)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,K)|0,i=i+Math.imul(S,G)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Z)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,ee)|0,i=i+Math.imul(p,re)|0,n=(n=n+Math.imul(p,ie)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0;var Me=(h+(i=i+Math.imul(l,oe)|0)|0)+((8191&(n=(n=n+Math.imul(l,se)|0)+Math.imul(c,oe)|0))<<13)|0;h=((o=o+Math.imul(c,se)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(B,L),n=(n=Math.imul(B,F))+Math.imul(k,L)|0,o=Math.imul(k,F),i=i+Math.imul(P,H)|0,n=(n=n+Math.imul(P,K)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,K)|0,i=i+Math.imul(q,G)|0,n=(n=n+Math.imul(q,V)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(S,Q)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Z)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(y,re)|0,n=(n=n+Math.imul(y,ie)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ie)|0,i=i+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(h+(i=i+Math.imul(l,ue)|0)|0)+((8191&(n=(n=n+Math.imul(l,he)|0)+Math.imul(c,ue)|0))<<13)|0;h=((o=o+Math.imul(c,he)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(x,L),n=(n=Math.imul(x,F))+Math.imul(N,L)|0,o=Math.imul(N,F),i=i+Math.imul(B,H)|0,n=(n=n+Math.imul(B,K)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,K)|0,i=i+Math.imul(P,G)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,V)|0,i=i+Math.imul(q,Q)|0,n=(n=n+Math.imul(q,Z)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Z)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,ee)|0,i=i+Math.imul(w,re)|0,n=(n=n+Math.imul(w,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(y,oe)|0,n=(n=n+Math.imul(y,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,i=i+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,he)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,he)|0;var Ee=(h+(i=i+Math.imul(l,le)|0)|0)+((8191&(n=(n=n+Math.imul(l,ce)|0)+Math.imul(c,le)|0))<<13)|0;h=((o=o+Math.imul(c,ce)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul($,L),n=(n=Math.imul($,F))+Math.imul(D,L)|0,o=Math.imul(D,F),i=i+Math.imul(x,H)|0,n=(n=n+Math.imul(x,K)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,K)|0,i=i+Math.imul(B,G)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Z)|0,i=i+Math.imul(q,X)|0,n=(n=n+Math.imul(q,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ie)|0,i=i+Math.imul(w,oe)|0,n=(n=n+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,i=i+Math.imul(y,ue)|0,n=(n=n+Math.imul(y,he)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,he)|0,i=i+Math.imul(p,le)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ce)|0;var Re=(h+(i=i+Math.imul(l,pe)|0)|0)+((8191&(n=(n=n+Math.imul(l,me)|0)+Math.imul(c,pe)|0))<<13)|0;h=((o=o+Math.imul(c,me)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,i=Math.imul($,H),n=(n=Math.imul($,K))+Math.imul(D,H)|0,o=Math.imul(D,K),i=i+Math.imul(x,G)|0,n=(n=n+Math.imul(x,V)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,V)|0,i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,Z)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,Z)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,i=i+Math.imul(q,re)|0,n=(n=n+Math.imul(q,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,i=i+Math.imul(w,ue)|0,n=(n=n+Math.imul(w,he)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,he)|0,i=i+Math.imul(y,le)|0,n=(n=n+Math.imul(y,ce)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,ce)|0;var qe=(h+(i=i+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;h=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(qe>>>26)|0,qe&=67108863,i=Math.imul($,G),n=(n=Math.imul($,V))+Math.imul(D,G)|0,o=Math.imul(D,V),i=i+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,Z)|0,i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ie)|0,i=i+Math.imul(q,oe)|0,n=(n=n+Math.imul(q,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,he)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,he)|0,i=i+Math.imul(w,le)|0,n=(n=n+Math.imul(w,ce)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ce)|0;var Ae=(h+(i=i+Math.imul(y,pe)|0)|0)+((8191&(n=(n=n+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;h=((o=o+Math.imul(b,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul($,Q),n=(n=Math.imul($,Z))+Math.imul(D,Q)|0,o=Math.imul(D,Z),i=i+Math.imul(x,X)|0,n=(n=n+Math.imul(x,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,i=i+Math.imul(B,re)|0,n=(n=n+Math.imul(B,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,se)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,se)|0,i=i+Math.imul(q,ue)|0,n=(n=n+Math.imul(q,he)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,he)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,ce)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,ce)|0;var Ce=(h+(i=i+Math.imul(w,pe)|0)|0)+((8191&(n=(n=n+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;h=((o=o+Math.imul(_,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul($,X),n=(n=Math.imul($,ee))+Math.imul(D,X)|0,o=Math.imul(D,ee),i=i+Math.imul(x,re)|0,n=(n=n+Math.imul(x,ie)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ie)|0,i=i+Math.imul(B,oe)|0,n=(n=n+Math.imul(B,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,he)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,he)|0,i=i+Math.imul(q,le)|0,n=(n=n+Math.imul(q,ce)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ce)|0;var Pe=(h+(i=i+Math.imul(S,pe)|0)|0)+((8191&(n=(n=n+Math.imul(S,me)|0)+Math.imul(E,pe)|0))<<13)|0;h=((o=o+Math.imul(E,me)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,i=Math.imul($,re),n=(n=Math.imul($,ie))+Math.imul(D,re)|0,o=Math.imul(D,ie),i=i+Math.imul(x,oe)|0,n=(n=n+Math.imul(x,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,i=i+Math.imul(B,ue)|0,n=(n=n+Math.imul(B,he)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,he)|0,i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,ce)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,ce)|0;var Ie=(h+(i=i+Math.imul(q,pe)|0)|0)+((8191&(n=(n=n+Math.imul(q,me)|0)+Math.imul(A,pe)|0))<<13)|0;h=((o=o+Math.imul(A,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul($,oe),n=(n=Math.imul($,se))+Math.imul(D,oe)|0,o=Math.imul(D,se),i=i+Math.imul(x,ue)|0,n=(n=n+Math.imul(x,he)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,he)|0,i=i+Math.imul(B,le)|0,n=(n=n+Math.imul(B,ce)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,ce)|0;var Oe=(h+(i=i+Math.imul(P,pe)|0)|0)+((8191&(n=(n=n+Math.imul(P,me)|0)+Math.imul(I,pe)|0))<<13)|0;h=((o=o+Math.imul(I,me)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,i=Math.imul($,ue),n=(n=Math.imul($,he))+Math.imul(D,ue)|0,o=Math.imul(D,he),i=i+Math.imul(x,le)|0,n=(n=n+Math.imul(x,ce)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ce)|0;var Be=(h+(i=i+Math.imul(B,pe)|0)|0)+((8191&(n=(n=n+Math.imul(B,me)|0)+Math.imul(k,pe)|0))<<13)|0;h=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul($,le),n=(n=Math.imul($,ce))+Math.imul(D,le)|0,o=Math.imul(D,ce);var ke=(h+(i=i+Math.imul(x,pe)|0)|0)+((8191&(n=(n=n+Math.imul(x,me)|0)+Math.imul(N,pe)|0))<<13)|0;h=((o=o+Math.imul(N,me)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863;var Te=(h+(i=Math.imul($,pe))|0)+((8191&(n=(n=Math.imul($,me))+Math.imul(D,pe)|0))<<13)|0;return h=((o=Math.imul(D,me))+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,u[0]=ge,u[1]=ye,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Me,u[7]=Se,u[8]=Ee,u[9]=Re,u[10]=qe,u[11]=Ae,u[12]=Ce,u[13]=Pe,u[14]=Ie,u[15]=Oe,u[16]=Be,u[17]=ke,u[18]=Te,0!==h&&(u[19]=h,r.length++),r};function p(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(d=c),n.prototype.mulTo=function(e,t){var r,i=this.length+e.length;return r=10===this.length&&10===e.length?d(this,e,t):i<63?c(this,e,t):i<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var a=67108863&i,u=Math.min(o,t.length-1),h=Math.max(0,o-e.length+1);h<=u;h++){var f=o-h,l=(0|e.words[f])*(0|t.words[h]),c=67108863&l;a=67108863&(c=c+a|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,e,t):p(this,e,t),r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=n.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},m.prototype.permute=function(e,t,r,i,n,o){for(var s=0;s<o;s++)i[s]=t[e[s]],n[s]=r[e[s]]},m.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),f=0;f<n;f+=a)for(var l=u,c=h,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],b=l*g-c*y;y=l*y+c*g,g=b,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==a&&(b=u*l-h*c,c=u*c+h*l,l=b)}},m.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},m.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},m.prototype.convert13b=function(e,t,i,n){for(var o=0,s=0;s<t;s++)o+=0|e[s],i[2*s]=8191&o,o>>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<n;++s)i[s]=0;r(0===o),r(!(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),s=new Array(i),a=new Array(i),u=new Array(i),h=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(e.words,e.length,s,i),this.convert13b(t.words,t.length,h,i),this.transform(s,o,a,u,i,n),this.transform(h,o,f,l,i,n);for(var d=0;d<i;d++){var p=a[d]*f[d]-u[d]*l[d];u[d]=a[d]*l[d]+u[d]*f[d],a[d]=p}return this.conjugate(a,u,i),this.transform(a,u,c,o,i,n),this.conjugate(c,o,i),this.normalize13b(c,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},n.prototype.mul=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},n.prototype.mulf=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),p(this,e,t)},n.prototype.imul=function(e){return this.clone().mulTo(e,this)},n.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,i=0;i<this.length;i++){var n=(0|this.words[i])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[i]=67108863&o}return 0!==t&&(this.words[i]=t,this.length++),this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}(e);if(0===t.length)return new n(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var o=r.sqr();i<t.length;i++,o=o.sqr())0!==t[i]&&(r=r.mul(o));return r},n.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,i=e%26,n=(e-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<i;this.words[t]=u|s,s=a>>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},n.prototype.iushrn=function(e,t,i){var n;r("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=i;if(n-=s,n=Math.max(0,n),u){for(var h=0;h<s;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var f=0;for(h=this.length-1;h>=0&&(0!==f||h>=n);h--){var l=0|this.words[h];this.words[h]=f<<26-o|l>>>o,f=l&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<<t;return!(this.length<=i||!(this.words[i]&n))},n.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(e){return this.clone().imaskn(e)},n.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},n.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},n.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},n.prototype.addn=function(e){return this.clone().iaddn(e)},n.prototype.subn=function(e){return this.clone().isubn(e)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(e,t,i){var n,o,s=e.length+i;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+i])+a;var u=(0|e.words[n])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)a=(o=(0|this.words[n+i])+a)>>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new n(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var f=i.clone()._ishlnsubmul(o,1,u);0===f.negative&&(i=f,a&&(a.words[u]=1));for(var l=u-1;l>=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new n(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},n.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,i=0,n=this.length-1;n>=0;n--)i=(t*i+(0|this.words[n]))%e;return i},n.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new n(1),s=new n(0),a=new n(0),u=new n(1),h=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++h;for(var f=i.clone(),l=t.clone();!t.isZero();){for(var c=0,d=1;!(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(l)),a.iushrn(1),u.iushrn(1);t.cmp(i)>=0?(t.isub(i),o.isub(a),s.isub(u)):(i.isub(t),a.isub(o),u.isub(s))}return{a:a,b:u,gcd:i.iushln(h)}},n.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new n(1),a=new n(0),u=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var h=0,f=1;!(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,c=1;!(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(a)):(i.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},n.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},n.prototype.invm=function(e){return this.egcd(e).a.umod(e)},n.prototype.isEven=function(){return!(1&this.words[0])},n.prototype.isOdd=function(){return!(1&~this.words[0])},n.prototype.andln=function(e){return this.words[0]&e},n.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,s=i;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},n.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},n.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},n.prototype.gtn=function(e){return 1===this.cmpn(e)},n.prototype.gt=function(e){return 1===this.cmp(e)},n.prototype.gten=function(e){return this.cmpn(e)>=0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.ltn=function(e){return-1===this.cmpn(e)},n.prototype.lt=function(e){return-1===this.cmp(e)},n.prototype.lten=function(e){return this.cmpn(e)<=0},n.prototype.lte=function(e){return this.cmp(e)<=0},n.prototype.eqn=function(e){return 0===this.cmpn(e)},n.prototype.eq=function(e){return 0===this.cmp(e)},n.red=function(e){return new M(e)},n.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(e){return this.red=e,this},n.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},n.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},n.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},n.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},n.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},n.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},n.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},n.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new n(t,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=n._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new n(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(b,y),b.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(v,y),i(w,y),i(_,y),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},n._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return g[e]=t,t},M.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){r(!(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new n(1)).iushrn(2);return this.pow(e,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,o),c=this.pow(e,o.addn(1).iushrn(1)),d=this.pow(e,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var y=this.pow(l,new n(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},M.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},M.prototype.pow=function(e,t){if(t.isZero())return new n(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new n(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var o=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),i=t.length-1;i>=0;i--){for(var h=t.words[i],f=u-1;f>=0;f--){var l=h>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}u=26}return o},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},n.mont=function(e){return new S(e)},i(S,M),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new n(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(bn$7,bn$6)),bn$7.exports}var utils$1={},hasRequiredUtils$2,hasRequiredUtils$1;function requireUtils$2(){return hasRequiredUtils$2||(hasRequiredUtils$2=1,function(e){var t=e;function r(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",i=0;i<e.length;i++)t+=r(e[i].toString(16));return t}t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var i=0;i<e.length;i++)r[i]=0|e[i];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(i=0;i<e.length;i++){var n=e.charCodeAt(i),o=n>>8,s=255&n;o?r.push(o,s):r.push(s)}return r},t.zero2=r,t.toHex=i,t.encode=function(e,t){return"hex"===t?i(e):e}}(utils$1)),utils$1}function requireUtils$1(){return hasRequiredUtils$1||(hasRequiredUtils$1=1,e=utils$2,t=requireBn$3(),r=requireMinimalisticAssert(),i=requireUtils$2(),e.assert=r,e.toArray=i.toArray,e.zero2=i.zero2,e.toHex=i.toHex,e.encode=i.encode,e.getNAF=function(e,t,r){var i,n=new Array(Math.max(e.bitLength(),r)+1);for(i=0;i<n.length;i+=1)n[i]=0;var o=1<<t+1,s=e.clone();for(i=0;i<n.length;i++){var a,u=s.andln(o-1);s.isOdd()?(a=u>(o>>1)-1?(o>>1)-u:u,s.isubn(a)):a=0,n[i]=a,s.iushrn(1)}return n},e.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var i,n=0,o=0;e.cmpn(-n)>0||t.cmpn(-o)>0;){var s,a,u=e.andln(3)+n&3,h=t.andln(3)+o&3;3===u&&(u=-1),3===h&&(h=-1),s=1&u?3!=(i=e.andln(7)+n&7)&&5!==i||2!==h?u:-u:0,r[0].push(s),a=1&h?3!=(i=t.andln(7)+o&7)&&5!==i||2!==u?h:-h:0,r[1].push(a),2*n===s+1&&(n=1-n),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},e.cachedProperty=function(e,t,r){var i="_"+t;e.prototype[t]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(e){return new t(e,"hex","le")}),utils$2;var e,t,r,i}var curve={},base$1,hasRequiredBase$1,short,hasRequiredShort,mont,hasRequiredMont,edwards,hasRequiredEdwards,hasRequiredCurve;function requireBase$1(){if(hasRequiredBase$1)return base$1;hasRequiredBase$1=1;var e=requireBn$3(),t=requireUtils$1(),r=t.getNAF,i=t.getJSF,n=t.assert;function o(t,r){this.type=t,this.p=new e(r.p,16),this.red=r.prime?e.red(r.prime):e.mont(this.p),this.zero=new e(0).toRed(this.red),this.one=new e(1).toRed(this.red),this.two=new e(2).toRed(this.red),this.n=r.n&&new e(r.n,16),this.g=r.g&&this.pointFromJSON(r.g,r.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function s(e,t){this.curve=e,this.type=t,this.precomputed=null}return base$1=o,o.prototype.point=function(){throw new Error("Not implemented")},o.prototype.validate=function(){throw new Error("Not implemented")},o.prototype._fixedNafMul=function(e,t){n(e.precomputed);var i=e._getDoubles(),o=r(t,1,this._bitLength),s=(1<<i.step+1)-(i.step%2==0?2:1);s/=3;var a,u,h=[];for(a=0;a<o.length;a+=i.step){u=0;for(var f=a+i.step-1;f>=a;f--)u=(u<<1)+o[f];h.push(u)}for(var l=this.jpoint(null,null,null),c=this.jpoint(null,null,null),d=s;d>0;d--){for(a=0;a<h.length;a++)(u=h[a])===d?c=c.mixedAdd(i.points[a]):u===-d&&(c=c.mixedAdd(i.points[a].neg()));l=l.add(c)}return l.toP()},o.prototype._wnafMul=function(e,t){var i=4,o=e._getNAFPoints(i);i=o.wnd;for(var s=o.points,a=r(t,i,this._bitLength),u=this.jpoint(null,null,null),h=a.length-1;h>=0;h--){for(var f=0;h>=0&&0===a[h];h--)f++;if(h>=0&&f++,u=u.dblp(f),h<0)break;var l=a[h];n(0!==l),u="affine"===e.type?l>0?u.mixedAdd(s[l-1>>1]):u.mixedAdd(s[-l-1>>1].neg()):l>0?u.add(s[l-1>>1]):u.add(s[-l-1>>1].neg())}return"affine"===e.type?u.toP():u},o.prototype._wnafMulAdd=function(e,t,n,o,s){var a,u,h,f=this._wnafT1,l=this._wnafT2,c=this._wnafT3,d=0;for(a=0;a<o;a++){var p=(h=t[a])._getNAFPoints(e);f[a]=p.wnd,l[a]=p.points}for(a=o-1;a>=1;a-=2){var m=a-1,g=a;if(1===f[m]&&1===f[g]){var y=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(y[1]=t[m].add(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].add(t[g].neg())):(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=i(n[m],n[g]);for(d=Math.max(v[0].length,d),c[m]=new Array(d),c[g]=new Array(d),u=0;u<d;u++){var w=0|v[0][u],_=0|v[1][u];c[m][u]=b[3*(w+1)+(_+1)],c[g][u]=0,l[m]=y}}else c[m]=r(n[m],f[m],this._bitLength),c[g]=r(n[g],f[g],this._bitLength),d=Math.max(c[m].length,d),d=Math.max(c[g].length,d)}var M=this.jpoint(null,null,null),S=this._wnafT4;for(a=d;a>=0;a--){for(var E=0;a>=0;){var R=!0;for(u=0;u<o;u++)S[u]=0|c[u][a],0!==S[u]&&(R=!1);if(!R)break;E++,a--}if(a>=0&&E++,M=M.dblp(E),a<0)break;for(u=0;u<o;u++){var q=S[u];0!==q&&(q>0?h=l[u][q-1>>1]:q<0&&(h=l[u][-q-1>>1].neg()),M="affine"===h.type?M.mixedAdd(h):M.add(h))}}for(a=0;a<o;a++)l[a]=null;return s?M:M.toP()},o.BasePoint=s,s.prototype.eq=function(){throw new Error("Not implemented")},s.prototype.validate=function(){return this.curve.validate(this)},o.prototype.decodePoint=function(e,r){e=t.toArray(e,r);var i=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*i)return 6===e[0]?n(e[e.length-1]%2==0):7===e[0]&&n(e[e.length-1]%2==1),this.point(e.slice(1,1+i),e.slice(1+i,1+2*i));if((2===e[0]||3===e[0])&&e.length-1===i)return this.pointFromX(e.slice(1,1+i),3===e[0]);throw new Error("Unknown point format")},s.prototype.encodeCompressed=function(e){return this.encode(e,!0)},s.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},s.prototype.encode=function(e,r){return t.encode(this._encode(r),e)},s.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},s.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},s.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n<t;n+=e){for(var o=0;o<e;o++)i=i.dbl();r.push(i)}return{step:e,points:r}},s.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,i=1===r?null:this.dbl(),n=1;n<r;n++)t[n]=t[n-1].add(i);return{wnd:e,points:t}},s.prototype._getBeta=function(){return null},s.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t},base$1}function requireShort(){if(hasRequiredShort)return short;hasRequiredShort=1;var e=requireUtils$1(),t=requireBn$3(),r=requireInherits_browser(),i=requireBase$1(),n=e.assert;function o(e){i.call(this,"short",e),this.a=new t(e.a,16).toRed(this.red),this.b=new t(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function s(e,r,n,o){i.BasePoint.call(this,e,"affine"),null===r&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new t(r,16),this.y=new t(n,16),o&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function a(e,r,n,o){i.BasePoint.call(this,e,"jacobian"),null===r&&null===n&&null===o?(this.x=this.curve.one,this.y=this.curve.one,this.z=new t(0)):(this.x=new t(r,16),this.y=new t(n,16),this.z=new t(o,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}return r(o,i),short=o,o.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var r,i;if(e.beta)r=new t(e.beta,16).toRed(this.red);else{var o=this._getEndoRoots(this.p);r=(r=o[0].cmp(o[1])<0?o[0]:o[1]).toRed(this.red)}if(e.lambda)i=new t(e.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(r))?i=s[0]:(i=s[1],n(0===this.g.mul(i).x.cmp(this.g.x.redMul(r))))}return{beta:r,lambda:i,basis:e.basis?e.basis.map((function(e){return{a:new t(e.a,16),b:new t(e.b,16)}})):this._getEndoBasis(i)}}},o.prototype._getEndoRoots=function(e){var r=e===this.p?this.red:t.mont(e),i=new t(2).toRed(r).redInvm(),n=i.redNeg(),o=new t(3).toRed(r).redNeg().redSqrt().redMul(i);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},o.prototype._getEndoBasis=function(e){for(var r,i,n,o,s,a,u,h,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),c=e,d=this.n.clone(),p=new t(1),m=new t(0),g=new t(0),y=new t(1),b=0;0!==c.cmpn(0);){var v=d.div(c);h=d.sub(v.mul(c)),f=g.sub(v.mul(p));var w=y.sub(v.mul(m));if(!n&&h.cmp(l)<0)r=u.neg(),i=p,n=h.neg(),o=f;else if(n&&2==++b)break;u=h,d=c,c=h,g=p,p=f,y=m,m=w}s=h.neg(),a=f;var _=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=r,a=i),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},o.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],i=t[1],n=i.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),s=n.mul(r.a),a=o.mul(i.a),u=n.mul(r.b),h=o.mul(i.b);return{k1:e.sub(s).sub(a),k2:u.add(h).neg()}},o.prototype.pointFromX=function(e,r){(e=new t(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=i.redSqrt();if(0!==n.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(r&&!o||!r&&o)&&(n=n.redNeg()),this.point(e,n)},o.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,i=this.a.redMul(t),n=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},o.prototype._endoWnafMulAdd=function(e,t,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,o=0;o<e.length;o++){var s=this._endoSplit(t[o]),a=e[o],u=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),i[2*o]=a,i[2*o+1]=u,n[2*o]=s.k1,n[2*o+1]=s.k2}for(var h=this._wnafMulAdd(1,i,n,2*o,r),f=0;f<2*o;f++)i[f]=null,n[f]=null;return h},r(s,i.BasePoint),o.prototype.point=function(e,t,r){return new s(this,e,t,r)},o.prototype.pointFromJSON=function(e,t){return s.fromJSON(this,e,t)},s.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,i=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return t}},s.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},s.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var i=e.point(t[0],t[1],r);if(!t[2])return i;function n(t){return e.point(t[0],t[1],r)}var o=t[2];return i.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[i].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[i].concat(o.naf.points.map(n))}},i},s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},s.prototype.isInfinity=function(){return this.inf},s.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},s.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),i=e.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(i),o=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},s.prototype.getX=function(){return this.x.fromRed()},s.prototype.getY=function(){return this.y.fromRed()},s.prototype.mul=function(e){return e=new t(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},s.prototype.mulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},s.prototype.jmulAdd=function(e,t,r){var i=[this,t],n=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},s.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},s.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,i=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return t},s.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},r(a,i.BasePoint),o.prototype.jpoint=function(e,t,r){return new a(this,e,t,r)},a.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(r,i)},a.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},a.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(t),n=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=i.redSub(n),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=a.redSqr(),f=h.redMul(a),l=i.redMul(h),c=u.redSqr().redIAdd(f).redISub(l).redISub(l),d=u.redMul(l.redISub(c)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(c,d,p)},a.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,i=e.x.redMul(t),n=this.y,o=e.y.redMul(t).redMul(this.z),s=r.redSub(i),a=n.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),h=u.redMul(s),f=r.redMul(u),l=a.redSqr().redIAdd(h).redISub(f).redISub(f),c=a.redMul(f.redISub(l)).redISub(n.redMul(h)),d=this.z.redMul(s);return this.curve.jpoint(l,c,d)},a.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var i=this.curve.a,n=this.curve.tinv,o=this.x,s=this.y,a=this.z,u=a.redSqr().redSqr(),h=s.redAdd(s);for(t=0;t<e;t++){var f=o.redSqr(),l=h.redSqr(),c=l.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(i.redMul(u)),p=o.redMul(l),m=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=d.redMul(g);y=y.redIAdd(y).redISub(c);var b=h.redMul(a);t+1<e&&(u=u.redMul(c)),o=m,a=b,h=y}return this.curve.jpoint(o,h.redMul(n),a)},a.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},a.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(i).redISub(o);s=s.redIAdd(s);var a=i.redAdd(i).redIAdd(i),u=a.redSqr().redISub(s).redISub(s),h=o.redIAdd(o);h=(h=h.redIAdd(h)).redIAdd(h),e=u,t=a.redMul(s.redISub(u)).redISub(h),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),c=l.redSqr(),d=this.x.redAdd(l).redSqr().redISub(f).redISub(c);d=d.redIAdd(d);var p=f.redAdd(f).redIAdd(f),m=p.redSqr(),g=c.redIAdd(c);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(d).redISub(d),t=p.redMul(d.redISub(e)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},a.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(i).redISub(o);s=s.redIAdd(s);var a=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),u=a.redSqr().redISub(s).redISub(s);e=u;var h=o.redIAdd(o);h=(h=h.redIAdd(h)).redIAdd(h),t=a.redMul(s.redISub(u)).redISub(h),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),c=this.x.redMul(l),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var p=c.redIAdd(c),m=(p=p.redIAdd(p)).redAdd(p);e=d.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var g=l.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=d.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,r)},a.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,i=this.z,n=i.redSqr().redSqr(),o=t.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(n)),u=t.redAdd(t),h=(u=u.redIAdd(u)).redMul(s),f=a.redSqr().redISub(h.redAdd(h)),l=h.redISub(f),c=s.redSqr();c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var d=a.redMul(l).redISub(c),p=r.redAdd(r).redMul(i);return this.curve.jpoint(f,d,p)},a.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),i=t.redSqr(),n=e.redAdd(e).redIAdd(e),o=n.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(i),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),u=i.redIAdd(i);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var h=n.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),f=t.redMul(h);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(a).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var c=this.y.redMul(h.redMul(u.redISub(h)).redISub(s.redMul(a)));c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var d=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(l,c,d)},a.prototype.mul=function(e,r){return e=new t(e,r),this.curve._wnafMul(this,e)},a.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var i=t.redMul(this.z),n=r.redMul(e.z);return 0===this.y.redMul(n).redISub(e.y.redMul(i)).cmpn(0)},a.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var i=e.clone(),n=this.curve.redN.redMul(t);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},a.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},a.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},short}function requireMont(){if(hasRequiredMont)return mont;hasRequiredMont=1;var e=requireBn$3(),t=requireInherits_browser(),r=requireBase$1(),i=requireUtils$1();function n(t){r.call(this,"mont",t),this.a=new e(t.a,16).toRed(this.red),this.b=new e(t.b,16).toRed(this.red),this.i4=new e(4).toRed(this.red).redInvm(),this.two=new e(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function o(t,i,n){r.BasePoint.call(this,t,"projective"),null===i&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new e(i,16),this.z=new e(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return t(n,r),mont=n,n.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),i=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===i.redSqrt().redSqr().cmp(i)},t(o,r.BasePoint),n.prototype.decodePoint=function(e,t){return this.point(i.toArray(e,t),1)},n.prototype.point=function(e,t){return new o(this,e,t)},n.prototype.pointFromJSON=function(e){return o.fromJSON(this,e)},o.prototype.precompute=function(){},o.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},o.fromJSON=function(e,t){return new o(e,t[0],t[1]||e.one)},o.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},o.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),i=e.redMul(t),n=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(i,n)},o.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},o.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),s=n.redMul(i),a=t.z.redMul(o.redAdd(s).redSqr()),u=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,u)},o.prototype.mul=function(e){for(var t=e.clone(),r=this,i=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var o=n.length-1;o>=0;o--)0===n[o]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},o.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},o.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},o.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},o.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},o.prototype.getX=function(){return this.normalize(),this.x.fromRed()},mont}function requireEdwards(){if(hasRequiredEdwards)return edwards;hasRequiredEdwards=1;var e=requireUtils$1(),t=requireBn$3(),r=requireInherits_browser(),i=requireBase$1(),n=e.assert;function o(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,i.call(this,"edwards",e),this.a=new t(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new t(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new t(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),n(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function s(e,r,n,o,s){i.BasePoint.call(this,e,"projective"),null===r&&null===n&&null===o?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new t(r,16),this.y=new t(n,16),this.z=o?new t(o,16):this.curve.one,this.t=s&&new t(s,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}return r(o,i),edwards=o,o.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},o.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},o.prototype.jpoint=function(e,t,r,i){return this.point(e,t,r,i)},o.prototype.pointFromX=function(e,r){(e=new t(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr(),n=this.c2.redSub(this.a.redMul(i)),o=this.one.redSub(this.c2.redMul(this.d).redMul(i)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=a.fromRed().isOdd();return(r&&!u||!r&&u)&&(a=a.redNeg()),this.point(e,a)},o.prototype.pointFromY=function(e,r){(e=new t(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr(),n=i.redSub(this.c2),o=i.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==r&&(a=a.redNeg()),this.point(a,e)},o.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),i=t.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===i.cmp(n)},r(s,i.BasePoint),o.prototype.pointFromJSON=function(e){return s.fromJSON(this,e)},o.prototype.point=function(e,t,r,i){return new s(this,e,t,r,i)},s.fromJSON=function(e,t){return new s(e,t[0],t[1],t[2])},s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},s.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},s.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=i.redAdd(t),s=o.redSub(r),a=i.redSub(t),u=n.redMul(s),h=o.redMul(a),f=n.redMul(a),l=s.redMul(o);return this.curve.point(u,h,l,f)},s.prototype._projDbl=function(){var e,t,r,i,n,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var h=(i=this.curve._mulA(a)).redAdd(u);this.zOne?(e=s.redSub(a).redSub(u).redMul(h.redSub(this.curve.two)),t=h.redMul(i.redSub(u)),r=h.redSqr().redSub(h).redSub(h)):(n=this.z.redSqr(),o=h.redSub(n).redISub(n),e=s.redSub(a).redISub(u).redMul(o),t=h.redMul(i.redSub(u)),r=h.redMul(o))}else i=a.redAdd(u),n=this.curve._mulC(this.z).redSqr(),o=i.redSub(n).redSub(n),e=this.curve._mulC(s.redISub(i)).redMul(o),t=this.curve._mulC(i).redMul(a.redISub(u)),r=i.redMul(o);return this.curve.point(e,t,r)},s.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},s.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),s=n.redSub(i),a=n.redAdd(i),u=r.redAdd(t),h=o.redMul(s),f=a.redMul(u),l=o.redMul(u),c=s.redMul(a);return this.curve.point(h,f,c,l)},s.prototype._projAdd=function(e){var t,r,i=this.z.redMul(e.z),n=i.redSqr(),o=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(s),u=n.redSub(a),h=n.redAdd(a),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(s),l=i.redMul(u).redMul(f);return this.curve.twisted?(t=i.redMul(h).redMul(s.redSub(this.curve._mulA(o))),r=u.redMul(h)):(t=i.redMul(h).redMul(s.redSub(o)),r=this.curve._mulC(u).redMul(h)),this.curve.point(l,t,r)},s.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},s.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},s.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},s.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},s.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},s.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()},s.prototype.getY=function(){return this.normalize(),this.y.fromRed()},s.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},s.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}},s.prototype.toP=s.prototype.normalize,s.prototype.mixedAdd=s.prototype.add,edwards}function requireCurve(){return hasRequiredCurve||(hasRequiredCurve=1,(e=curve).base=requireBase$1(),e.short=requireShort(),e.mont=requireMont(),e.edwards=requireEdwards()),curve;var e}var curves={},hash={},utils={},hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1;var e=requireMinimalisticAssert(),t=requireInherits_browser();function r(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function i(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function n(e){return 1===e.length?"0"+e:e}function o(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}return utils.inherits=t,utils.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)i.push(parseInt(e[o]+e[o+1],16))}else for(var n=0,o=0;o<e.length;o++){var s=e.charCodeAt(o);s<128?i[n++]=s:s<2048?(i[n++]=s>>6|192,i[n++]=63&s|128):r(e,o)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++o)),i[n++]=s>>18|240,i[n++]=s>>12&63|128,i[n++]=s>>6&63|128,i[n++]=63&s|128):(i[n++]=s>>12|224,i[n++]=s>>6&63|128,i[n++]=63&s|128)}else for(o=0;o<e.length;o++)i[o]=0|e[o];return i},utils.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t},utils.htonl=i,utils.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];"little"===t&&(s=i(s)),r+=o(s.toString(16))}return r},utils.zero2=n,utils.zero8=o,utils.join32=function(t,r,i,n){var o=i-r;e(o%4==0);for(var s=new Array(o/4),a=0,u=r;a<s.length;a++,u+=4){var h;h="big"===n?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],s[a]=h>>>0}return s},utils.split32=function(e,t){for(var r=new Array(4*e.length),i=0,n=0;i<e.length;i++,n+=4){var o=e[i];"big"===t?(r[n]=o>>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=255&o):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=255&o)}return r},utils.rotr32=function(e,t){return e>>>t|e<<32-t},utils.rotl32=function(e,t){return e<<t|e>>>32-t},utils.sum32=function(e,t){return e+t>>>0},utils.sum32_3=function(e,t,r){return e+t+r>>>0},utils.sum32_4=function(e,t,r,i){return e+t+r+i>>>0},utils.sum32_5=function(e,t,r,i,n){return e+t+r+i+n>>>0},utils.sum64=function(e,t,r,i){var n=e[t],o=i+e[t+1]>>>0,s=(o<i?1:0)+r+n;e[t]=s>>>0,e[t+1]=o},utils.sum64_hi=function(e,t,r,i){return(t+i>>>0<t?1:0)+e+r>>>0},utils.sum64_lo=function(e,t,r,i){return t+i>>>0},utils.sum64_4_hi=function(e,t,r,i,n,o,s,a){var u=0,h=t;return u+=(h=h+i>>>0)<t?1:0,u+=(h=h+o>>>0)<o?1:0,e+r+n+s+(u+=(h=h+a>>>0)<a?1:0)>>>0},utils.sum64_4_lo=function(e,t,r,i,n,o,s,a){return t+i+o+a>>>0},utils.sum64_5_hi=function(e,t,r,i,n,o,s,a,u,h){var f=0,l=t;return f+=(l=l+i>>>0)<t?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+a>>>0)<a?1:0,e+r+n+s+u+(f+=(l=l+h>>>0)<h?1:0)>>>0},utils.sum64_5_lo=function(e,t,r,i,n,o,s,a,u,h){return t+i+o+a+h>>>0},utils.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},utils.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},utils.shr64_hi=function(e,t,r){return e>>>r},utils.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},utils}var common$1={},hasRequiredCommon$1;function requireCommon$1(){if(hasRequiredCommon$1)return common$1;hasRequiredCommon$1=1;var e=requireUtils(),t=requireMinimalisticAssert();function r(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return common$1.BlockHash=r,r.prototype.update=function(t,r){if(t=e.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var i=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-i,t.length),0===this.pending.length&&(this.pending=null),t=e.join32(t,0,t.length-i,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this},r.prototype.digest=function(e){return this.update(this._pad()),t(null===this.pending),this._digest(e)},r.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,i=new Array(r+this.padLength);i[0]=128;for(var n=1;n<r;n++)i[n]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)i[n++]=0;i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=e>>>24&255,i[n++]=e>>>16&255,i[n++]=e>>>8&255,i[n++]=255&e}else for(i[n++]=255&e,i[n++]=e>>>8&255,i[n++]=e>>>16&255,i[n++]=e>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,o=8;o<this.padLength;o++)i[n++]=0;return i},common$1}var sha={},common={},hasRequiredCommon,_1,hasRequired_1,_256,hasRequired_256,_224,hasRequired_224,_512,hasRequired_512,_384,hasRequired_384,hasRequiredSha;function requireCommon(){if(hasRequiredCommon)return common;hasRequiredCommon=1;var e=requireUtils().rotr32;function t(e,t,r){return e&t^~e&r}function r(e,t,r){return e&t^e&r^t&r}function i(e,t,r){return e^t^r}return common.ft_1=function(e,n,o,s){return 0===e?t(n,o,s):1===e||3===e?i(n,o,s):2===e?r(n,o,s):void 0},common.ch32=t,common.maj32=r,common.p32=i,common.s0_256=function(t){return e(t,2)^e(t,13)^e(t,22)},common.s1_256=function(t){return e(t,6)^e(t,11)^e(t,25)},common.g0_256=function(t){return e(t,7)^e(t,18)^t>>>3},common.g1_256=function(t){return e(t,17)^e(t,19)^t>>>10},common}function require_1(){if(hasRequired_1)return _1;hasRequired_1=1;var e=requireUtils(),t=requireCommon$1(),r=requireCommon(),i=e.rotl32,n=e.sum32,o=e.sum32_5,s=r.ft_1,a=t.BlockHash,u=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;a.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return e.inherits(h,a),_1=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(e,t){for(var r=this.W,a=0;a<16;a++)r[a]=e[t+a];for(;a<r.length;a++)r[a]=i(r[a-3]^r[a-8]^r[a-14]^r[a-16],1);var h=this.h[0],f=this.h[1],l=this.h[2],c=this.h[3],d=this.h[4];for(a=0;a<r.length;a++){var p=~~(a/20),m=o(i(h,5),s(p,f,l,c),d,r[a],u[p]);d=c,c=l,l=i(f,30),f=h,h=m}this.h[0]=n(this.h[0],h),this.h[1]=n(this.h[1],f),this.h[2]=n(this.h[2],l),this.h[3]=n(this.h[3],c),this.h[4]=n(this.h[4],d)},h.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},_1}function require_256(){if(hasRequired_256)return _256;hasRequired_256=1;var e=requireUtils(),t=requireCommon$1(),r=requireCommon(),i=requireMinimalisticAssert(),n=e.sum32,o=e.sum32_4,s=e.sum32_5,a=r.ch32,u=r.maj32,h=r.s0_256,f=r.s1_256,l=r.g0_256,c=r.g1_256,d=t.BlockHash,p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function m(){if(!(this instanceof m))return new m;d.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=p,this.W=new Array(64)}return e.inherits(m,d),_256=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var r=this.W,d=0;d<16;d++)r[d]=e[t+d];for(;d<r.length;d++)r[d]=o(c(r[d-2]),r[d-7],l(r[d-15]),r[d-16]);var p=this.h[0],m=this.h[1],g=this.h[2],y=this.h[3],b=this.h[4],v=this.h[5],w=this.h[6],_=this.h[7];for(i(this.k.length===r.length),d=0;d<r.length;d++){var M=s(_,f(b),a(b,v,w),this.k[d],r[d]),S=n(h(p),u(p,m,g));_=w,w=v,v=b,b=n(y,M),y=g,g=m,m=p,p=n(M,S)}this.h[0]=n(this.h[0],p),this.h[1]=n(this.h[1],m),this.h[2]=n(this.h[2],g),this.h[3]=n(this.h[3],y),this.h[4]=n(this.h[4],b),this.h[5]=n(this.h[5],v),this.h[6]=n(this.h[6],w),this.h[7]=n(this.h[7],_)},m.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},_256}function require_224(){if(hasRequired_224)return _224;hasRequired_224=1;var e=requireUtils(),t=require_256();function r(){if(!(this instanceof r))return new r;t.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return e.inherits(r,t),_224=r,r.blockSize=512,r.outSize=224,r.hmacStrength=192,r.padLength=64,r.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,7),"big"):e.split32(this.h.slice(0,7),"big")},_224}function require_512(){if(hasRequired_512)return _512;hasRequired_512=1;var e=requireUtils(),t=requireCommon$1(),r=requireMinimalisticAssert(),i=e.rotr64_hi,n=e.rotr64_lo,o=e.shr64_hi,s=e.shr64_lo,a=e.sum64,u=e.sum64_hi,h=e.sum64_lo,f=e.sum64_4_hi,l=e.sum64_4_lo,c=e.sum64_5_hi,d=e.sum64_5_lo,p=t.BlockHash,m=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function g(){if(!(this instanceof g))return new g;p.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}function y(e,t,r,i,n){var o=e&r^~e&n;return o<0&&(o+=4294967296),o}function b(e,t,r,i,n,o){var s=t&i^~t&o;return s<0&&(s+=4294967296),s}function v(e,t,r,i,n){var o=e&r^e&n^r&n;return o<0&&(o+=4294967296),o}function w(e,t,r,i,n,o){var s=t&i^t&o^i&o;return s<0&&(s+=4294967296),s}function _(e,t){var r=i(e,t,28)^i(t,e,2)^i(t,e,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=n(e,t,28)^n(t,e,2)^n(t,e,7);return r<0&&(r+=4294967296),r}function S(e,t){var r=i(e,t,14)^i(e,t,18)^i(t,e,9);return r<0&&(r+=4294967296),r}function E(e,t){var r=n(e,t,14)^n(e,t,18)^n(t,e,9);return r<0&&(r+=4294967296),r}function R(e,t){var r=i(e,t,1)^i(e,t,8)^o(e,t,7);return r<0&&(r+=4294967296),r}function q(e,t){var r=n(e,t,1)^n(e,t,8)^s(e,t,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=i(e,t,19)^i(t,e,29)^o(e,t,6);return r<0&&(r+=4294967296),r}function C(e,t){var r=n(e,t,19)^n(t,e,29)^s(e,t,6);return r<0&&(r+=4294967296),r}return e.inherits(g,p),_512=g,g.blockSize=1024,g.outSize=512,g.hmacStrength=192,g.padLength=128,g.prototype._prepareBlock=function(e,t){for(var r=this.W,i=0;i<32;i++)r[i]=e[t+i];for(;i<r.length;i+=2){var n=A(r[i-4],r[i-3]),o=C(r[i-4],r[i-3]),s=r[i-14],a=r[i-13],u=R(r[i-30],r[i-29]),h=q(r[i-30],r[i-29]),c=r[i-32],d=r[i-31];r[i]=f(n,o,s,a,u,h,c,d),r[i+1]=l(n,o,s,a,u,h,c,d)}},g.prototype._update=function(e,t){this._prepareBlock(e,t);var i=this.W,n=this.h[0],o=this.h[1],s=this.h[2],f=this.h[3],l=this.h[4],p=this.h[5],m=this.h[6],g=this.h[7],R=this.h[8],q=this.h[9],A=this.h[10],C=this.h[11],P=this.h[12],I=this.h[13],O=this.h[14],B=this.h[15];r(this.k.length===i.length);for(var k=0;k<i.length;k+=2){var T=O,x=B,N=S(R,q),j=E(R,q),$=y(R,q,A,C,P),D=b(R,q,A,C,P,I),U=this.k[k],L=this.k[k+1],F=i[k],z=i[k+1],H=c(T,x,N,j,$,D,U,L,F,z),K=d(T,x,N,j,$,D,U,L,F,z);T=_(n,o),x=M(n,o),N=v(n,o,s,f,l),j=w(n,o,s,f,l,p);var W=u(T,x,N,j),G=h(T,x,N,j);O=P,B=I,P=A,I=C,A=R,C=q,R=u(m,g,H,K),q=h(g,g,H,K),m=l,g=p,l=s,p=f,s=n,f=o,n=u(H,K,W,G),o=h(H,K,W,G)}a(this.h,0,n,o),a(this.h,2,s,f),a(this.h,4,l,p),a(this.h,6,m,g),a(this.h,8,R,q),a(this.h,10,A,C),a(this.h,12,P,I),a(this.h,14,O,B)},g.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},_512}function require_384(){if(hasRequired_384)return _384;hasRequired_384=1;var e=requireUtils(),t=require_512();function r(){if(!(this instanceof r))return new r;t.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return e.inherits(r,t),_384=r,r.blockSize=1024,r.outSize=384,r.hmacStrength=192,r.padLength=128,r.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,12),"big"):e.split32(this.h.slice(0,12),"big")},_384}function requireSha(){return hasRequiredSha||(hasRequiredSha=1,sha.sha1=require_1(),sha.sha224=require_224(),sha.sha256=require_256(),sha.sha384=require_384(),sha.sha512=require_512()),sha}var ripemd={},hasRequiredRipemd,hmac$2,hasRequiredHmac$1,hasRequiredHash,secp256k1,hasRequiredSecp256k1,hasRequiredCurves,hmacDrbg,hasRequiredHmacDrbg,key$1,hasRequiredKey$1,signature$1,hasRequiredSignature$1,ec,hasRequiredEc,key,hasRequiredKey,signature,hasRequiredSignature,eddsa,hasRequiredEddsa,hasRequiredElliptic;function requireRipemd(){if(hasRequiredRipemd)return ripemd;hasRequiredRipemd=1;var e=requireUtils(),t=requireCommon$1(),r=e.rotl32,i=e.sum32,n=e.sum32_3,o=e.sum32_4,s=t.BlockHash;function a(){if(!(this instanceof a))return new a;s.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function u(e,t,r,i){return e<=15?t^r^i:e<=31?t&r|~t&i:e<=47?(t|~r)^i:e<=63?t&i|r&~i:t^(r|~i)}function h(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function f(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}e.inherits(a,s),ripemd.ripemd160=a,a.blockSize=512,a.outSize=160,a.hmacStrength=192,a.padLength=64,a.prototype._update=function(e,t){for(var s=this.h[0],a=this.h[1],m=this.h[2],g=this.h[3],y=this.h[4],b=s,v=a,w=m,_=g,M=y,S=0;S<80;S++){var E=i(r(o(s,u(S,a,m,g),e[l[S]+t],h(S)),d[S]),y);s=y,y=g,g=r(m,10),m=a,a=E,E=i(r(o(b,u(79-S,v,w,_),e[c[S]+t],f(S)),p[S]),M),b=M,M=_,_=r(w,10),w=v,v=E}E=n(this.h[1],m,_),this.h[1]=n(this.h[2],g,M),this.h[2]=n(this.h[3],y,b),this.h[3]=n(this.h[4],s,v),this.h[4]=n(this.h[0],a,w),this.h[0]=E},a.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"little"):e.split32(this.h,"little")};var l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],p=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return ripemd}function requireHmac$1(){if(hasRequiredHmac$1)return hmac$2;hasRequiredHmac$1=1;var e=requireUtils(),t=requireMinimalisticAssert();function r(t,i,n){if(!(this instanceof r))return new r(t,i,n);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(e.toArray(i,n))}return hmac$2=r,r.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),t(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=(new this.Hash).update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=(new this.Hash).update(e)},r.prototype.update=function(e,t){return this.inner.update(e,t),this},r.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},hmac$2}function requireHash(){return hasRequiredHash||(hasRequiredHash=1,(e=hash).utils=requireUtils(),e.common=requireCommon$1(),e.sha=requireSha(),e.ripemd=requireRipemd(),e.hmac=requireHmac$1(),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160),hash;var e}function requireSecp256k1(){return hasRequiredSecp256k1?secp256k1:(hasRequiredSecp256k1=1,secp256k1={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}function requireCurves(){return hasRequiredCurves||(hasRequiredCurves=1,function(e){var t,r=e,i=requireHash(),n=requireCurve(),o=requireUtils$1().assert;function s(e){"short"===e.type?this.curve=new n.short(e):"edwards"===e.type?this.curve=new n.edwards(e):this.curve=new n.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function a(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var i=new s(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:i}),i}})}r.PresetCurve=s,a("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:i.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),a("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:i.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),a("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{t=requireSecp256k1()}catch(e){t=void 0}a("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",t]})}(curves)),curves}function requireHmacDrbg(){if(hasRequiredHmacDrbg)return hmacDrbg;hasRequiredHmacDrbg=1;var e=requireHash(),t=requireUtils$2(),r=requireMinimalisticAssert();function i(e){if(!(this instanceof i))return new i(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var n=t.toArray(e.entropy,e.entropyEnc||"hex"),o=t.toArray(e.nonce,e.nonceEnc||"hex"),s=t.toArray(e.pers,e.persEnc||"hex");r(n.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(n,o,s)}return hmacDrbg=i,i.prototype._init=function(e,t,r){var i=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},i.prototype._hmac=function(){return new e.hmac(this.hash,this.K)},i.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},i.prototype.reseed=function(e,i,n,o){"string"!=typeof i&&(o=n,n=i,i=null),e=t.toArray(e,i),n=t.toArray(n,o),r(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},i.prototype.generate=function(e,r,i,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof r&&(n=i,i=r,r=null),i&&(i=t.toArray(i,n||"hex"),this._update(i));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,e);return this._update(i),this._reseed++,t.encode(s,r)},hmacDrbg}function requireKey$1(){if(hasRequiredKey$1)return key$1;hasRequiredKey$1=1;var e=requireBn$3(),t=requireUtils$1().assert;function r(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}return key$1=r,r.fromPublic=function(e,t,i){return t instanceof r?t:new r(e,{pub:t,pubEnc:i})},r.fromPrivate=function(e,t,i){return t instanceof r?t:new r(e,{priv:t,privEnc:i})},r.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},r.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},r.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},r.prototype._importPrivate=function(t,r){this.priv=new e(t,r||16),this.priv=this.priv.umod(this.ec.curve.n)},r.prototype._importPublic=function(e,r){if(e.x||e.y)return"mont"===this.ec.curve.type?t(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||t(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,r)},r.prototype.derive=function(e){return e.validate()||t(e.validate(),"public point not validated"),e.mul(this.priv).getX()},r.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},r.prototype.verify=function(e,t,r){return this.ec.verify(e,t,this,void 0,r)},r.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},key$1}function requireSignature$1(){if(hasRequiredSignature$1)return signature$1;hasRequiredSignature$1=1;var e=requireBn$3(),t=requireUtils$1(),r=t.assert;function i(t,n){if(t instanceof i)return t;this._importDER(t,n)||(r(t.r&&t.s,"Signature without r or s"),this.r=new e(t.r,16),this.s=new e(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function n(){this.place=0}function o(e,t){var r=e[t.place++];if(!(128&r))return r;var i=15&r;if(0===i||i>4)return!1;if(0===e[t.place])return!1;for(var n=0,o=0,s=t.place;o<i;o++,s++)n<<=8,n|=e[s],n>>>=0;return!(n<=127)&&(t.place=s,n)}function s(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function a(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}return signature$1=i,i.prototype._importDER=function(r,i){r=t.toArray(r,i);var s=new n;if(48!==r[s.place++])return!1;var a=o(r,s);if(!1===a)return!1;if(a+s.place!==r.length)return!1;if(2!==r[s.place++])return!1;var u=o(r,s);if(!1===u)return!1;if(128&r[s.place])return!1;var h=r.slice(s.place,u+s.place);if(s.place+=u,2!==r[s.place++])return!1;var f=o(r,s);if(!1===f)return!1;if(r.length!==f+s.place)return!1;if(128&r[s.place])return!1;var l=r.slice(s.place,f+s.place);if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new e(h),this.s=new e(l),this.recoveryParam=null,!0},i.prototype.toDER=function(e){var r=this.r.toArray(),i=this.s.toArray();for(128&r[0]&&(r=[0].concat(r)),128&i[0]&&(i=[0].concat(i)),r=s(r),i=s(i);!(i[0]||128&i[1]);)i=i.slice(1);var n=[2];a(n,r.length),(n=n.concat(r)).push(2),a(n,i.length);var o=n.concat(i),u=[48];return a(u,o.length),u=u.concat(o),t.encode(u,e)},signature$1}function requireEc(){if(hasRequiredEc)return ec;hasRequiredEc=1;var e=requireBn$3(),t=requireHmacDrbg(),r=requireUtils$1(),i=requireCurves(),n=requireBrorand(),o=r.assert,s=requireKey$1(),a=requireSignature$1();function u(e){if(!(this instanceof u))return new u(e);"string"==typeof e&&(o(Object.prototype.hasOwnProperty.call(i,e),"Unknown curve "+e),e=i[e]),e instanceof i.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}return ec=u,u.prototype.keyPair=function(e){return new s(this,e)},u.prototype.keyFromPrivate=function(e,t){return s.fromPrivate(this,e,t)},u.prototype.keyFromPublic=function(e,t){return s.fromPublic(this,e,t)},u.prototype.genKeyPair=function(r){r||(r={});for(var i=new t({hash:this.hash,pers:r.pers,persEnc:r.persEnc||"utf8",entropy:r.entropy||n(this.hash.hmacStrength),entropyEnc:r.entropy&&r.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),s=this.n.sub(new e(2));;){var a=new e(i.generate(o));if(!(a.cmp(s)>0))return a.iaddn(1),this.keyFromPrivate(a)}},u.prototype._truncateToN=function(t,r,i){var n;if(e.isBN(t)||"number"==typeof t)n=(t=new e(t,16)).byteLength();else if("object"==typeof t)n=t.length,t=new e(t,16);else{var o=t.toString();n=o.length+1>>>1,t=new e(o,16)}"number"!=typeof i&&(i=8*n);var s=i-this.n.bitLength();return s>0&&(t=t.ushrn(s)),!r&&t.cmp(this.n)>=0?t.sub(this.n):t},u.prototype.sign=function(r,i,n,s){if("object"==typeof n&&(s=n,n=null),s||(s={}),"string"!=typeof r&&"number"!=typeof r&&!e.isBN(r)){o("object"==typeof r&&r&&"number"==typeof r.length,"Expected message to be an array-like, a hex string, or a BN instance"),o(r.length>>>0===r.length);for(var u=0;u<r.length;u++)o((255&r[u])===r[u])}i=this.keyFromPrivate(i,n),r=this._truncateToN(r,!1,s.msgBitLength),o(!r.isNeg(),"Can not sign a negative message");var h=this.n.byteLength(),f=i.getPrivate().toArray("be",h),l=r.toArray("be",h);o(new e(l).eq(r),"Can not sign message");for(var c=new t({hash:this.hash,entropy:f,nonce:l,pers:s.pers,persEnc:s.persEnc||"utf8"}),d=this.n.sub(new e(1)),p=0;;p++){var m=s.k?s.k(p):new e(c.generate(this.n.byteLength()));if(!((m=this._truncateToN(m,!0)).cmpn(1)<=0||m.cmp(d)>=0)){var g=this.g.mul(m);if(!g.isInfinity()){var y=g.getX(),b=y.umod(this.n);if(0!==b.cmpn(0)){var v=m.invm(this.n).mul(b.mul(i.getPrivate()).iadd(r));if(0!==(v=v.umod(this.n)).cmpn(0)){var w=(g.getY().isOdd()?1:0)|(0!==y.cmp(b)?2:0);return s.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),w^=1),new a({r:b,s:v,recoveryParam:w})}}}}}},u.prototype.verify=function(e,t,r,i,n){n||(n={}),e=this._truncateToN(e,!1,n.msgBitLength),r=this.keyFromPublic(r,i);var o=(t=new a(t,"hex")).r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var u,h=s.invm(this.n),f=h.mul(e).umod(this.n),l=h.mul(o).umod(this.n);return this.curve._maxwellTrick?!(u=this.g.jmulAdd(f,r.getPublic(),l)).isInfinity()&&u.eqXToP(o):!(u=this.g.mulAdd(f,r.getPublic(),l)).isInfinity()&&0===u.getX().umod(this.n).cmp(o)},u.prototype.recoverPubKey=function(t,r,i,n){o((3&i)===i,"The recovery param is more than two bits"),r=new a(r,n);var s=this.n,u=new e(t),h=r.r,f=r.s,l=1&i,c=i>>1;if(h.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");h=c?this.curve.pointFromX(h.add(this.curve.n),l):this.curve.pointFromX(h,l);var d=r.r.invm(s),p=s.sub(u).mul(d).umod(s),m=f.mul(d).umod(s);return this.g.mulAdd(p,h,m)},u.prototype.getKeyRecoveryParam=function(e,t,r,i){if(null!==(t=new a(t,i)).recoveryParam)return t.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(e,t,n)}catch(e){continue}if(o.eq(r))return n}throw new Error("Unable to find valid recovery factor")},ec}function requireKey(){if(hasRequiredKey)return key;hasRequiredKey=1;var e=requireUtils$1(),t=e.assert,r=e.parseBytes,i=e.cachedProperty;function n(e,t){this.eddsa=e,this._secret=r(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=r(t.pub)}return n.fromPublic=function(e,t){return t instanceof n?t:new n(e,{pub:t})},n.fromSecret=function(e,t){return t instanceof n?t:new n(e,{secret:t})},n.prototype.secret=function(){return this._secret},i(n,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),i(n,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),i(n,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,i=t.slice(0,e.encodingLength);return i[0]&=248,i[r]&=127,i[r]|=64,i})),i(n,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),i(n,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),i(n,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),n.prototype.sign=function(e){return t(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},n.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},n.prototype.getSecret=function(r){return t(this._secret,"KeyPair is public only"),e.encode(this.secret(),r)},n.prototype.getPublic=function(t){return e.encode(this.pubBytes(),t)},key=n}function requireSignature(){if(hasRequiredSignature)return signature;hasRequiredSignature=1;var e=requireBn$3(),t=requireUtils$1(),r=t.assert,i=t.cachedProperty,n=t.parseBytes;function o(t,i){this.eddsa=t,"object"!=typeof i&&(i=n(i)),Array.isArray(i)&&(r(i.length===2*t.encodingLength,"Signature has invalid size"),i={R:i.slice(0,t.encodingLength),S:i.slice(t.encodingLength)}),r(i.R&&i.S,"Signature without R or S"),t.isPoint(i.R)&&(this._R=i.R),i.S instanceof e&&(this._S=i.S),this._Rencoded=Array.isArray(i.R)?i.R:i.Rencoded,this._Sencoded=Array.isArray(i.S)?i.S:i.Sencoded}return i(o,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),i(o,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),i(o,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),i(o,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),o.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},o.prototype.toHex=function(){return t.encode(this.toBytes(),"hex").toUpperCase()},signature=o}function requireEddsa(){if(hasRequiredEddsa)return eddsa;hasRequiredEddsa=1;var e=requireHash(),t=requireCurves(),r=requireUtils$1(),i=r.assert,n=r.parseBytes,o=requireKey(),s=requireSignature();function a(r){if(i("ed25519"===r,"only tested with ed25519 so far"),!(this instanceof a))return new a(r);r=t[r].curve,this.curve=r,this.g=r.g,this.g.precompute(r.n.bitLength()+1),this.pointClass=r.point().constructor,this.encodingLength=Math.ceil(r.n.bitLength()/8),this.hash=e.sha512}return eddsa=a,a.prototype.sign=function(e,t){e=n(e);var r=this.keyFromSecret(t),i=this.hashInt(r.messagePrefix(),e),o=this.g.mul(i),s=this.encodePoint(o),a=this.hashInt(s,r.pubBytes(),e).mul(r.priv()),u=i.add(a).umod(this.curve.n);return this.makeSignature({R:o,S:u,Rencoded:s})},a.prototype.verify=function(e,t,r){if(e=n(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var i=this.keyFromPublic(r),o=this.hashInt(t.Rencoded(),i.pubBytes(),e),s=this.g.mul(t.S());return t.R().add(i.pub().mul(o)).eq(s)},a.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return r.intFromLE(e.digest()).umod(this.curve.n)},a.prototype.keyFromPublic=function(e){return o.fromPublic(this,e)},a.prototype.keyFromSecret=function(e){return o.fromSecret(this,e)},a.prototype.makeSignature=function(e){return e instanceof s?e:new s(this,e)},a.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},a.prototype.decodePoint=function(e){var t=(e=r.parseBytes(e)).length-1,i=e.slice(0,t).concat(-129&e[t]),n=!!(128&e[t]),o=r.intFromLE(i);return this.curve.pointFromY(o,n)},a.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},a.prototype.decodeInt=function(e){return r.intFromLE(e)},a.prototype.isPoint=function(e){return e instanceof this.pointClass},eddsa}function requireElliptic(){return hasRequiredElliptic||(hasRequiredElliptic=1,(e=elliptic).version=require$$0.version,e.utils=requireUtils$1(),e.rand=requireBrorand(),e.curve=requireCurve(),e.curves=requireCurves(),e.ec=requireEc(),e.eddsa=requireEddsa()),elliptic;var e}var asn1$1={},asn1={},bn$5={exports:{}},bn$4=bn$5.exports,hasRequiredBn$2;function requireBn$2(){return hasRequiredBn$2||(hasRequiredBn$2=1,function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function n(e,t,r){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:requireDist().Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(e,t,r){var i=s(e,r);return r-1>=t&&(i|=s(e,r-1)<<4),i}function u(e,t,r,i){for(var n=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;n*=i,n+=a>=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(e){return e instanceof n||null!==e&&"object"==typeof e&&e.constructor.wordSize===n.wordSize&&Array.isArray(e.words)},n.max=function(e,t){return e.cmp(t)>0?e:t},n.min=function(e,t){return e.cmp(t)<0?e:t},n.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,i):(this._parseBase(e,t,n),"le"===i&&this._initArray(this.toArray(),t,i)))},n.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},n.prototype._initArray=function(e,t,i){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===i)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,s=o%i,a=Math.min(o,o-s)+r,h=0,f=r;f<a;f+=i)h=u(e,f,f+i,t),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(e,f,e.length,t),f=0;f<s;f++)l*=t;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},n.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},n.prototype.clone=function(){var e=new n(null);return this.copy(e),e},n.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h<i;h++){for(var f=u>>>26,l=67108863&u,c=Math.min(h,t.length-1),d=Math.max(0,h-e.length+1);d<=c;d++){var p=h-d|0;f+=(s=(n=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}n.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<n|o)).toString(16);o=a>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),i=0!==o||s!==this.length-1?h[6-u.length]+u+i:u+i}for(0!==o&&(i=o.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],d=l[e];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e);i=(p=p.idivn(d)).isZero()?m+i:h[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},n.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},n.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,h=new e(o),f=this.clone();if(u){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-n;a++)h[a]=0;for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),h[o-a-1]=s}return h},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},n.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},n.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},n.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},n.prototype.ior=function(e){return r(!(this.negative|e.negative)),this.iuor(e)},n.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},n.prototype.iand=function(e){return r(!(this.negative|e.negative)),this.iuand(e)},n.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},n.prototype.ixor=function(e){return r(!(this.negative|e.negative)),this.iuxor(e)},n.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},n.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},n.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++)o=(t=(0|r.words[s])-(0|i.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(e){return this.clone().isub(e)};var d=function(e,t,r){var i,n,o,s=e.words,a=t.words,u=r.words,h=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,R=0|s[5],q=8191&R,A=R>>>13,C=0|s[6],P=8191&C,I=C>>>13,O=0|s[7],B=8191&O,k=O>>>13,T=0|s[8],x=8191&T,N=T>>>13,j=0|s[9],$=8191&j,D=j>>>13,U=0|a[0],L=8191&U,F=U>>>13,z=0|a[1],H=8191&z,K=z>>>13,W=0|a[2],G=8191&W,V=W>>>13,J=0|a[3],Q=8191&J,Z=J>>>13,Y=0|a[4],X=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ie=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],ue=8191&ae,he=ae>>>13,fe=0|a[8],le=8191&fe,ce=fe>>>13,de=0|a[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(h+(i=Math.imul(l,L))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(c,L)|0))<<13)|0;h=((o=Math.imul(c,F))+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(p,L),n=(n=Math.imul(p,F))+Math.imul(m,L)|0,o=Math.imul(m,F);var ye=(h+(i=i+Math.imul(l,H)|0)|0)+((8191&(n=(n=n+Math.imul(l,K)|0)+Math.imul(c,H)|0))<<13)|0;h=((o=o+Math.imul(c,K)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(y,L),n=(n=Math.imul(y,F))+Math.imul(b,L)|0,o=Math.imul(b,F),i=i+Math.imul(p,H)|0,n=(n=n+Math.imul(p,K)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,K)|0;var be=(h+(i=i+Math.imul(l,G)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,G)|0))<<13)|0;h=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(w,L),n=(n=Math.imul(w,F))+Math.imul(_,L)|0,o=Math.imul(_,F),i=i+Math.imul(y,H)|0,n=(n=n+Math.imul(y,K)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,K)|0,i=i+Math.imul(p,G)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,V)|0;var ve=(h+(i=i+Math.imul(l,Q)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(c,Q)|0))<<13)|0;h=((o=o+Math.imul(c,Z)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(S,L),n=(n=Math.imul(S,F))+Math.imul(E,L)|0,o=Math.imul(E,F),i=i+Math.imul(w,H)|0,n=(n=n+Math.imul(w,K)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,K)|0,i=i+Math.imul(y,G)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0;var we=(h+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,ee)|0)+Math.imul(c,X)|0))<<13)|0;h=((o=o+Math.imul(c,ee)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(q,L),n=(n=Math.imul(q,F))+Math.imul(A,L)|0,o=Math.imul(A,F),i=i+Math.imul(S,H)|0,n=(n=n+Math.imul(S,K)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,K)|0,i=i+Math.imul(w,G)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,Q)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,Z)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(h+(i=i+Math.imul(l,re)|0)|0)+((8191&(n=(n=n+Math.imul(l,ie)|0)+Math.imul(c,re)|0))<<13)|0;h=((o=o+Math.imul(c,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(P,L),n=(n=Math.imul(P,F))+Math.imul(I,L)|0,o=Math.imul(I,F),i=i+Math.imul(q,H)|0,n=(n=n+Math.imul(q,K)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,K)|0,i=i+Math.imul(S,G)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Z)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,ee)|0,i=i+Math.imul(p,re)|0,n=(n=n+Math.imul(p,ie)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0;var Me=(h+(i=i+Math.imul(l,oe)|0)|0)+((8191&(n=(n=n+Math.imul(l,se)|0)+Math.imul(c,oe)|0))<<13)|0;h=((o=o+Math.imul(c,se)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(B,L),n=(n=Math.imul(B,F))+Math.imul(k,L)|0,o=Math.imul(k,F),i=i+Math.imul(P,H)|0,n=(n=n+Math.imul(P,K)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,K)|0,i=i+Math.imul(q,G)|0,n=(n=n+Math.imul(q,V)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(S,Q)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Z)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(y,re)|0,n=(n=n+Math.imul(y,ie)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ie)|0,i=i+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(h+(i=i+Math.imul(l,ue)|0)|0)+((8191&(n=(n=n+Math.imul(l,he)|0)+Math.imul(c,ue)|0))<<13)|0;h=((o=o+Math.imul(c,he)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(x,L),n=(n=Math.imul(x,F))+Math.imul(N,L)|0,o=Math.imul(N,F),i=i+Math.imul(B,H)|0,n=(n=n+Math.imul(B,K)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,K)|0,i=i+Math.imul(P,G)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,V)|0,i=i+Math.imul(q,Q)|0,n=(n=n+Math.imul(q,Z)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Z)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,ee)|0,i=i+Math.imul(w,re)|0,n=(n=n+Math.imul(w,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(y,oe)|0,n=(n=n+Math.imul(y,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,i=i+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,he)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,he)|0;var Ee=(h+(i=i+Math.imul(l,le)|0)|0)+((8191&(n=(n=n+Math.imul(l,ce)|0)+Math.imul(c,le)|0))<<13)|0;h=((o=o+Math.imul(c,ce)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul($,L),n=(n=Math.imul($,F))+Math.imul(D,L)|0,o=Math.imul(D,F),i=i+Math.imul(x,H)|0,n=(n=n+Math.imul(x,K)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,K)|0,i=i+Math.imul(B,G)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Z)|0,i=i+Math.imul(q,X)|0,n=(n=n+Math.imul(q,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ie)|0,i=i+Math.imul(w,oe)|0,n=(n=n+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,i=i+Math.imul(y,ue)|0,n=(n=n+Math.imul(y,he)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,he)|0,i=i+Math.imul(p,le)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ce)|0;var Re=(h+(i=i+Math.imul(l,pe)|0)|0)+((8191&(n=(n=n+Math.imul(l,me)|0)+Math.imul(c,pe)|0))<<13)|0;h=((o=o+Math.imul(c,me)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,i=Math.imul($,H),n=(n=Math.imul($,K))+Math.imul(D,H)|0,o=Math.imul(D,K),i=i+Math.imul(x,G)|0,n=(n=n+Math.imul(x,V)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,V)|0,i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,Z)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,Z)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,i=i+Math.imul(q,re)|0,n=(n=n+Math.imul(q,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,i=i+Math.imul(w,ue)|0,n=(n=n+Math.imul(w,he)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,he)|0,i=i+Math.imul(y,le)|0,n=(n=n+Math.imul(y,ce)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,ce)|0;var qe=(h+(i=i+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;h=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(qe>>>26)|0,qe&=67108863,i=Math.imul($,G),n=(n=Math.imul($,V))+Math.imul(D,G)|0,o=Math.imul(D,V),i=i+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,Z)|0,i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ie)|0,i=i+Math.imul(q,oe)|0,n=(n=n+Math.imul(q,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,he)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,he)|0,i=i+Math.imul(w,le)|0,n=(n=n+Math.imul(w,ce)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ce)|0;var Ae=(h+(i=i+Math.imul(y,pe)|0)|0)+((8191&(n=(n=n+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;h=((o=o+Math.imul(b,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul($,Q),n=(n=Math.imul($,Z))+Math.imul(D,Q)|0,o=Math.imul(D,Z),i=i+Math.imul(x,X)|0,n=(n=n+Math.imul(x,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,i=i+Math.imul(B,re)|0,n=(n=n+Math.imul(B,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,se)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,se)|0,i=i+Math.imul(q,ue)|0,n=(n=n+Math.imul(q,he)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,he)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,ce)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,ce)|0;var Ce=(h+(i=i+Math.imul(w,pe)|0)|0)+((8191&(n=(n=n+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;h=((o=o+Math.imul(_,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul($,X),n=(n=Math.imul($,ee))+Math.imul(D,X)|0,o=Math.imul(D,ee),i=i+Math.imul(x,re)|0,n=(n=n+Math.imul(x,ie)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ie)|0,i=i+Math.imul(B,oe)|0,n=(n=n+Math.imul(B,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,he)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,he)|0,i=i+Math.imul(q,le)|0,n=(n=n+Math.imul(q,ce)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ce)|0;var Pe=(h+(i=i+Math.imul(S,pe)|0)|0)+((8191&(n=(n=n+Math.imul(S,me)|0)+Math.imul(E,pe)|0))<<13)|0;h=((o=o+Math.imul(E,me)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,i=Math.imul($,re),n=(n=Math.imul($,ie))+Math.imul(D,re)|0,o=Math.imul(D,ie),i=i+Math.imul(x,oe)|0,n=(n=n+Math.imul(x,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,i=i+Math.imul(B,ue)|0,n=(n=n+Math.imul(B,he)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,he)|0,i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,ce)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,ce)|0;var Ie=(h+(i=i+Math.imul(q,pe)|0)|0)+((8191&(n=(n=n+Math.imul(q,me)|0)+Math.imul(A,pe)|0))<<13)|0;h=((o=o+Math.imul(A,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul($,oe),n=(n=Math.imul($,se))+Math.imul(D,oe)|0,o=Math.imul(D,se),i=i+Math.imul(x,ue)|0,n=(n=n+Math.imul(x,he)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,he)|0,i=i+Math.imul(B,le)|0,n=(n=n+Math.imul(B,ce)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,ce)|0;var Oe=(h+(i=i+Math.imul(P,pe)|0)|0)+((8191&(n=(n=n+Math.imul(P,me)|0)+Math.imul(I,pe)|0))<<13)|0;h=((o=o+Math.imul(I,me)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,i=Math.imul($,ue),n=(n=Math.imul($,he))+Math.imul(D,ue)|0,o=Math.imul(D,he),i=i+Math.imul(x,le)|0,n=(n=n+Math.imul(x,ce)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ce)|0;var Be=(h+(i=i+Math.imul(B,pe)|0)|0)+((8191&(n=(n=n+Math.imul(B,me)|0)+Math.imul(k,pe)|0))<<13)|0;h=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul($,le),n=(n=Math.imul($,ce))+Math.imul(D,le)|0,o=Math.imul(D,ce);var ke=(h+(i=i+Math.imul(x,pe)|0)|0)+((8191&(n=(n=n+Math.imul(x,me)|0)+Math.imul(N,pe)|0))<<13)|0;h=((o=o+Math.imul(N,me)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863;var Te=(h+(i=Math.imul($,pe))|0)+((8191&(n=(n=Math.imul($,me))+Math.imul(D,pe)|0))<<13)|0;return h=((o=Math.imul(D,me))+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,u[0]=ge,u[1]=ye,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Me,u[7]=Se,u[8]=Ee,u[9]=Re,u[10]=qe,u[11]=Ae,u[12]=Ce,u[13]=Pe,u[14]=Ie,u[15]=Oe,u[16]=Be,u[17]=ke,u[18]=Te,0!==h&&(u[19]=h,r.length++),r};function p(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(d=c),n.prototype.mulTo=function(e,t){var r,i=this.length+e.length;return r=10===this.length&&10===e.length?d(this,e,t):i<63?c(this,e,t):i<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var a=67108863&i,u=Math.min(o,t.length-1),h=Math.max(0,o-e.length+1);h<=u;h++){var f=o-h,l=(0|e.words[f])*(0|t.words[h]),c=67108863&l;a=67108863&(c=c+a|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,e,t):p(this,e,t),r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=n.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},m.prototype.permute=function(e,t,r,i,n,o){for(var s=0;s<o;s++)i[s]=t[e[s]],n[s]=r[e[s]]},m.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),f=0;f<n;f+=a)for(var l=u,c=h,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],b=l*g-c*y;y=l*y+c*g,g=b,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==a&&(b=u*l-h*c,c=u*c+h*l,l=b)}},m.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},m.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},m.prototype.convert13b=function(e,t,i,n){for(var o=0,s=0;s<t;s++)o+=0|e[s],i[2*s]=8191&o,o>>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<n;++s)i[s]=0;r(0===o),r(!(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),s=new Array(i),a=new Array(i),u=new Array(i),h=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(e.words,e.length,s,i),this.convert13b(t.words,t.length,h,i),this.transform(s,o,a,u,i,n),this.transform(h,o,f,l,i,n);for(var d=0;d<i;d++){var p=a[d]*f[d]-u[d]*l[d];u[d]=a[d]*l[d]+u[d]*f[d],a[d]=p}return this.conjugate(a,u,i),this.transform(a,u,c,o,i,n),this.conjugate(c,o,i),this.normalize13b(c,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},n.prototype.mul=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},n.prototype.mulf=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),p(this,e,t)},n.prototype.imul=function(e){return this.clone().mulTo(e,this)},n.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,i=0;i<this.length;i++){var n=(0|this.words[i])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[i]=67108863&o}return 0!==t&&(this.words[i]=t,this.length++),this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}(e);if(0===t.length)return new n(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var o=r.sqr();i<t.length;i++,o=o.sqr())0!==t[i]&&(r=r.mul(o));return r},n.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,i=e%26,n=(e-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<i;this.words[t]=u|s,s=a>>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},n.prototype.iushrn=function(e,t,i){var n;r("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=i;if(n-=s,n=Math.max(0,n),u){for(var h=0;h<s;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var f=0;for(h=this.length-1;h>=0&&(0!==f||h>=n);h--){var l=0|this.words[h];this.words[h]=f<<26-o|l>>>o,f=l&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<<t;return!(this.length<=i||!(this.words[i]&n))},n.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(e){return this.clone().imaskn(e)},n.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},n.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},n.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},n.prototype.addn=function(e){return this.clone().iaddn(e)},n.prototype.subn=function(e){return this.clone().isubn(e)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(e,t,i){var n,o,s=e.length+i;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+i])+a;var u=(0|e.words[n])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)a=(o=(0|this.words[n+i])+a)>>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new n(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var f=i.clone()._ishlnsubmul(o,1,u);0===f.negative&&(i=f,a&&(a.words[u]=1));for(var l=u-1;l>=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new n(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},n.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,i=0,n=this.length-1;n>=0;n--)i=(t*i+(0|this.words[n]))%e;return i},n.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new n(1),s=new n(0),a=new n(0),u=new n(1),h=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++h;for(var f=i.clone(),l=t.clone();!t.isZero();){for(var c=0,d=1;!(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(l)),a.iushrn(1),u.iushrn(1);t.cmp(i)>=0?(t.isub(i),o.isub(a),s.isub(u)):(i.isub(t),a.isub(o),u.isub(s))}return{a:a,b:u,gcd:i.iushln(h)}},n.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new n(1),a=new n(0),u=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var h=0,f=1;!(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,c=1;!(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(a)):(i.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},n.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},n.prototype.invm=function(e){return this.egcd(e).a.umod(e)},n.prototype.isEven=function(){return!(1&this.words[0])},n.prototype.isOdd=function(){return!(1&~this.words[0])},n.prototype.andln=function(e){return this.words[0]&e},n.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,s=i;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},n.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},n.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},n.prototype.gtn=function(e){return 1===this.cmpn(e)},n.prototype.gt=function(e){return 1===this.cmp(e)},n.prototype.gten=function(e){return this.cmpn(e)>=0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.ltn=function(e){return-1===this.cmpn(e)},n.prototype.lt=function(e){return-1===this.cmp(e)},n.prototype.lten=function(e){return this.cmpn(e)<=0},n.prototype.lte=function(e){return this.cmp(e)<=0},n.prototype.eqn=function(e){return 0===this.cmpn(e)},n.prototype.eq=function(e){return 0===this.cmp(e)},n.red=function(e){return new M(e)},n.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(e){return this.red=e,this},n.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},n.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},n.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},n.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},n.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},n.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},n.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},n.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new n(t,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=n._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new n(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(b,y),b.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(v,y),i(w,y),i(_,y),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},n._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return g[e]=t,t},M.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){r(!(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new n(1)).iushrn(2);return this.pow(e,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,o),c=this.pow(e,o.addn(1).iushrn(1)),d=this.pow(e,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var y=this.pow(l,new n(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},M.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},M.prototype.pow=function(e,t){if(t.isZero())return new n(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new n(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var o=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),i=t.length-1;i>=0;i--){for(var h=t.words[i],f=u-1;f>=0;f--){var l=h>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}u=26}return o},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},n.mont=function(e){return new S(e)},i(S,M),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new n(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(bn$5,bn$4)),bn$5.exports}var api={},vmBrowserify={},hasRequiredVmBrowserify,hasRequiredApi;function requireVmBrowserify(){return hasRequiredVmBrowserify||(hasRequiredVmBrowserify=1,function(exports){var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(e){return function(e,t,r){e[t]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var r=t.contentWindow,i=r.eval,n=r.execScript;!i&&n&&(n.call(r,"null"),i=r.eval),forEach(Object_keys(e),(function(t){r[t]=e[t]})),forEach(globals,(function(t){e[t]&&(r[t]=e[t])}));var o=Object_keys(r),s=i.call(r,this.code);return forEach(Object_keys(r),(function(t){(t in e||-1===indexOf(o,t))&&(e[t]=r[t])})),forEach(globals,(function(t){t in e||defineProp(e,t,r[t])})),document.body.removeChild(t),s},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),r=this.runInContext(t);return e&&forEach(Object_keys(t),(function(r){e[r]=t[r]})),r},forEach(Object_keys(Script.prototype),(function(e){exports[e]=Script[e]=function(t){var r=Script(t);return r[e].apply(r,[].slice.call(arguments,1))}})),exports.isContext=function(e){return e instanceof Context},exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),(function(r){t[r]=e[r]})),t}}(vmBrowserify)),vmBrowserify}function requireApi(){return hasRequiredApi||(hasRequiredApi=1,function(e){var t=requireAsn1$1(),r=requireInherits_browser();function i(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}e.define=function(e,t){return new i(e,t)},i.prototype._createNamed=function(e){var t;try{t=requireVmBrowserify().runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return r(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},i.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(t.decoders[e])),this.decoders[e]},i.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},i.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(t.encoders[e])),this.encoders[e]},i.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}}(api)),api}var base={},reporter={},hasRequiredReporter;function requireReporter(){if(hasRequiredReporter)return reporter;hasRequiredReporter=1;var e=requireInherits_browser();function t(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function r(e,t){this.path=e,this.rethrow(t)}return reporter.Reporter=t,t.prototype.isError=function(e){return e instanceof r},t.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},t.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},t.prototype.enterKey=function(e){return this._reporterState.path.push(e)},t.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},t.prototype.leaveKey=function(e,t,r){var i=this._reporterState;this.exitKey(e),null!==i.obj&&(i.obj[t]=r)},t.prototype.path=function(){return this._reporterState.path.join("/")},t.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},t.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},t.prototype.error=function(e){var t,i=this._reporterState,n=e instanceof r;if(t=n?e:new r(i.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!i.options.partial)throw t;return n||i.errors.push(t),t},t.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},e(r,Error),r.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,r),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this},reporter}var buffer={},hasRequiredBuffer,node,hasRequiredNode,hasRequiredBase;function requireBuffer(){if(hasRequiredBuffer)return buffer;hasRequiredBuffer=1;var e=requireInherits_browser(),t=requireBase().Reporter,r=requireDist().Buffer;function i(e,i){t.call(this,i),r.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function n(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof n||(e=new n(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=r.byteLength(e);else{if(!r.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}return e(i,t),buffer.DecoderBuffer=i,i.prototype.save=function(){return{offset:this.offset,reporter:t.prototype.save.call(this)}},i.prototype.restore=function(e){var r=new i(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,t.prototype.restore.call(this,e.reporter),r},i.prototype.isEmpty=function(){return this.offset===this.length},i.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},i.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new i(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},i.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},buffer.EncoderBuffer=n,n.prototype.join=function(e,t){return e||(e=new r(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):r.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e},buffer}function requireNode(){if(hasRequiredNode)return node;hasRequiredNode=1;var e=requireBase().Reporter,t=requireBase().EncoderBuffer,r=requireBase().DecoderBuffer,i=requireMinimalisticAssert(),n=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],o=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(n);function s(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}node=s;var a=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return s.prototype.clone=function(){var e=this._baseState,t={};a.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);return r._baseState=t,r},s.prototype._wrap=function(){var e=this._baseState;o.forEach((function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},s.prototype._init=function(e){var t=this._baseState;i(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),i.equal(t.children.length,1,"Root node can have only one child")},s.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(i(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(i(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);var i=e[r];t[i]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){s.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),n.forEach((function(e){s.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return i(null===t.tag),t.tag=e,this._useArgs(r),this}})),s.prototype.use=function(e){i(e);var t=this._baseState;return i(null===t.use),t.use=e,this},s.prototype.optional=function(){return this._baseState.optional=!0,this},s.prototype.def=function(e){var t=this._baseState;return i(null===t.default),t.default=e,t.optional=!0,this},s.prototype.explicit=function(e){var t=this._baseState;return i(null===t.explicit&&null===t.implicit),t.explicit=e,this},s.prototype.implicit=function(e){var t=this._baseState;return i(null===t.explicit&&null===t.implicit),t.implicit=e,this},s.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},s.prototype.key=function(e){var t=this._baseState;return i(null===t.key),t.key=e,this},s.prototype.any=function(){return this._baseState.any=!0,this},s.prototype.choice=function(e){var t=this._baseState;return i(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},s.prototype.contains=function(e){var t=this._baseState;return i(null===t.use),t.contains=e,this},s.prototype._decode=function(e,t){var i=this._baseState;if(null===i.parent)return e.wrapResult(i.children[0]._decode(e,t));var n,o=i.default,s=!0,a=null;if(null!==i.key&&(a=e.enterKey(i.key)),i.optional){var u=null;if(null!==i.explicit?u=i.explicit:null!==i.implicit?u=i.implicit:null!==i.tag&&(u=i.tag),null!==u||i.any){if(s=this._peekTag(e,u,i.any),e.isError(s))return s}else{var h=e.save();try{null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(h)}}if(i.obj&&s&&(n=e.enterObject()),s){if(null!==i.explicit){var f=this._decodeTag(e,i.explicit);if(e.isError(f))return f;e=f}var l=e.offset;if(null===i.use&&null===i.choice){if(i.any)h=e.save();var c=this._decodeTag(e,null!==i.implicit?i.implicit:i.tag,i.any);if(e.isError(c))return c;i.any?o=e.raw(h):e=c}if(t&&t.track&&null!==i.tag&&t.track(e.path(),l,e.length,"tagged"),t&&t.track&&null!==i.tag&&t.track(e.path(),e.offset,e.length,"content"),i.any||(o=null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t)),e.isError(o))return o;if(i.any||null!==i.choice||null===i.children||i.children.forEach((function(r){r._decode(e,t)})),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){var d=new r(o);o=this._getUse(i.contains,e._reporterState.obj)._decode(d,t)}}return i.obj&&s&&(o=e.leaveObject(n)),null===i.key||null===o&&!0!==s?null!==a&&e.exitKey(a):e.leaveKey(a,i.key,o),o},s.prototype._decodeGeneric=function(e,t,r){var i=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,i.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&i.args?this._decodeObjid(t,i.args[0],i.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,i.args&&i.args[0],r):null!==i.use?this._getUse(i.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},s.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),i(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},s.prototype._decodeChoice=function(e,t){var r=this._baseState,i=null,n=!1;return Object.keys(r.choice).some((function(o){var s=e.save(),a=r.choice[o];try{var u=a._decode(e,t);if(e.isError(u))return!1;i={type:o,value:u},n=!0}catch(t){return e.restore(s),!1}return!0}),this),n?i:e.error("Choice not matched")},s.prototype._createEncoderBuffer=function(e){return new t(e,this.reporter)},s.prototype._encode=function(e,t,r){var i=this._baseState;if(null===i.default||i.default!==e){var n=this._encodeValue(e,t,r);if(void 0!==n&&!this._skipDefault(n,t,r))return n}},s.prototype._encodeValue=function(t,r,i){var n=this._baseState;if(null===n.parent)return n.children[0]._encode(t,r||new e);var o=null;if(this.reporter=r,n.optional&&void 0===t){if(null===n.default)return;t=n.default}var s=null,a=!1;if(n.any)o=this._createEncoderBuffer(t);else if(n.choice)o=this._encodeChoice(t,r);else if(n.contains)s=this._getUse(n.contains,i)._encode(t,r),a=!0;else if(n.children)s=n.children.map((function(e){if("null_"===e._baseState.tag)return e._encode(null,r,t);if(null===e._baseState.key)return r.error("Child should have a key");var i=r.enterKey(e._baseState.key);if("object"!=typeof t)return r.error("Child expected, but input is not object");var n=e._encode(t[e._baseState.key],r,t);return r.leaveKey(i),n}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return r.error("Too many args for : "+n.tag);if(!Array.isArray(t))return r.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,s=this._createEncoderBuffer(t.map((function(e){var i=this._baseState;return this._getUse(i.args[0],t)._encode(e,r)}),u))}else null!==n.use?o=this._getUse(n.use,i)._encode(t,r):(s=this._encodePrimitive(n.tag,t),a=!0);if(!n.any&&null===n.choice){var h=null!==n.implicit?n.implicit:n.tag,f=null===n.implicit?"universal":"context";null===h?null===n.use&&r.error("Tag could be omitted only for .use()"):null===n.use&&(o=this._encodeComposite(h,a,f,s))}return null!==n.explicit&&(o=this._encodeComposite(n.explicit,!1,"context",o)),o},s.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||i(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},s.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},s.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},s.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)},node}function requireBase(){return hasRequiredBase||(hasRequiredBase=1,(e=base).Reporter=requireReporter().Reporter,e.DecoderBuffer=requireBuffer().DecoderBuffer,e.EncoderBuffer=requireBuffer().EncoderBuffer,e.Node=requireNode()),base;var e}var constants={},der={},hasRequiredDer$2,hasRequiredConstants;function requireDer$2(){return hasRequiredDer$2||(hasRequiredDer$2=1,e=der,t=requireConstants(),e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=t._reverse(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=t._reverse(e.tag)),der;var e,t}function requireConstants(){return hasRequiredConstants||(hasRequiredConstants=1,(e=constants)._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var i=e[r];t[i]=r})),t},e.der=requireDer$2()),constants;var e}var decoders={},der_1$1,hasRequiredDer$1,pem$1,hasRequiredPem$1,hasRequiredDecoders;function requireDer$1(){if(hasRequiredDer$1)return der_1$1;hasRequiredDer$1=1;var e=requireInherits_browser(),t=requireAsn1$1(),r=t.base,i=t.bignum,n=t.constants.der;function o(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new s,this.tree._init(e.body)}function s(e){r.Node.call(this,"der",e)}function a(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var i=n.tagClass[r>>6],o=!(32&r);if(31&~r)r&=31;else{var s=r;for(r=0;!(128&~s);){if(s=e.readUInt8(t),e.isError(s))return s;r<<=7,r|=127&s}}return{cls:i,primitive:o,tag:r,tagStr:n.tag[r]}}function u(e,t,r){var i=e.readUInt8(r);if(e.isError(i))return i;if(!t&&128===i)return null;if(!(128&i))return i;var n=127&i;if(n>4)return e.error("length octect is too long");i=0;for(var o=0;o<n;o++){i<<=8;var s=e.readUInt8(r);if(e.isError(s))return s;i|=s}return i}return der_1$1=o,o.prototype.decode=function(e,t){return e instanceof r.DecoderBuffer||(e=new r.DecoderBuffer(e,t)),this.tree._decode(e,t)},e(s,r.Node),s.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;var i=e.save(),n=a(e,'Failed to peek tag: "'+t+'"');return e.isError(n)?n:(e.restore(i),n.tag===t||n.tagStr===t||n.tagStr+"of"===t||r)},s.prototype._decodeTag=function(e,t,r){var i=a(e,'Failed to decode tag of "'+t+'"');if(e.isError(i))return i;var n=u(e,i.primitive,'Failed to get length of "'+t+'"');if(e.isError(n))return n;if(!r&&i.tag!==t&&i.tagStr!==t&&i.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(i.primitive||null!==n)return e.skip(n,'Failed to match body of: "'+t+'"');var o=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(n=e.offset-o.offset,e.restore(o),e.skip(n,'Failed to match body of: "'+t+'"'))},s.prototype._skipUntilEnd=function(e,t){for(;;){var r=a(e,t);if(e.isError(r))return r;var i,n=u(e,r.primitive,t);if(e.isError(n))return n;if(i=r.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===r.tagStr)break}},s.prototype._decodeList=function(e,t,r,i){for(var n=[];!e.isEmpty();){var o=this._peekTag(e,"end");if(e.isError(o))return o;var s=r.decode(e,"der",i);if(e.isError(s)&&o)break;n.push(s)}return n},s.prototype._decodeStr=function(e,t){if("bitstr"===t){var r=e.readUInt8();return e.isError(r)?r:{unused:r,data:e.raw()}}if("bmpstr"===t){var i=e.raw();if(i.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var n="",o=0;o<i.length/2;o++)n+=String.fromCharCode(i.readUInt16BE(2*o));return n}if("numstr"===t){var s=e.raw().toString("ascii");return this._isNumstr(s)?s:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var a=e.raw().toString("ascii");return this._isPrintstr(a)?a:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},s.prototype._decodeObjid=function(e,t,r){for(var i,n=[],o=0;!e.isEmpty();){var s=e.readUInt8();o<<=7,o|=127&s,128&s||(n.push(o),o=0)}128&s&&n.push(o);var a=n[0]/40|0,u=n[0]%40;if(i=r?n:[a,u].concat(n.slice(1)),t){var h=t[i.join(" ")];void 0===h&&(h=t[i.join(".")]),void 0!==h&&(i=h)}return i},s.prototype._decodeTime=function(e,t){var r=e.raw().toString();if("gentime"===t)var i=0|r.slice(0,4),n=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),a=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");i=0|r.slice(0,2),n=0|r.slice(2,4),o=0|r.slice(4,6),s=0|r.slice(6,8),a=0|r.slice(8,10),u=0|r.slice(10,12);i=i<70?2e3+i:1900+i}return Date.UTC(i,n-1,o,s,a,u,0)},s.prototype._decodeNull=function(e){return null},s.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},s.prototype._decodeInt=function(e,t){var r=e.raw(),n=new i(r);return t&&(n=t[n.toString(10)]||n),n},s.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree},der_1$1}function requirePem$1(){if(hasRequiredPem$1)return pem$1;hasRequiredPem$1=1;var e=requireInherits_browser(),t=requireDist().Buffer,r=requireDer$1();function i(e){r.call(this,e),this.enc="pem"}return e(i,r),pem$1=i,i.prototype.decode=function(e,i){for(var n=e.toString().split(/[\r\n]+/g),o=i.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,u=-1,h=0;h<n.length;h++){var f=n[h].match(s);if(null!==f&&f[2]===o){if(-1!==a){if("END"!==f[1])break;u=h;break}if("BEGIN"!==f[1])break;a=h}}if(-1===a||-1===u)throw new Error("PEM section not found for: "+o);var l=n.slice(a+1,u).join("");l.replace(/[^a-z0-9\+\/=]+/gi,"");var c=new t(l,"base64");return r.prototype.decode.call(this,c,i)},pem$1}function requireDecoders(){return hasRequiredDecoders||(hasRequiredDecoders=1,(e=decoders).der=requireDer$1(),e.pem=requirePem$1()),decoders;var e}var encoders={},der_1,hasRequiredDer,pem,hasRequiredPem,hasRequiredEncoders,hasRequiredAsn1$1,certificate,hasRequiredCertificate,hasRequiredAsn1;function requireDer(){if(hasRequiredDer)return der_1;hasRequiredDer=1;var e=requireInherits_browser(),t=requireDist().Buffer,r=requireAsn1$1(),i=r.base,n=r.constants.der;function o(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new s,this.tree._init(e.body)}function s(e){i.Node.call(this,"der",e)}function a(e){return e<10?"0"+e:e}return der_1=o,o.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},e(s,i.Node),s.prototype._encodeComposite=function(e,r,i,o){var s,a=function(e,t,r,i){var o;"seqof"===e?e="seq":"setof"===e&&(e="set");if(n.tagByName.hasOwnProperty(e))o=n.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return i.error("Unknown tag: "+e);o=e}if(o>=31)return i.error("Multi-octet tag encoding unsupported");t||(o|=32);return o|=n.tagClassByName[r||"universal"]<<6,o}(e,r,i,this.reporter);if(o.length<128)return(s=new t(2))[0]=a,s[1]=o.length,this._createEncoderBuffer([s,o]);for(var u=1,h=o.length;h>=256;h>>=8)u++;(s=new t(2+u))[0]=a,s[1]=128|u;h=1+u;for(var f=o.length;f>0;h--,f>>=8)s[h]=255&f;return this._createEncoderBuffer([s,o])},s.prototype._encodeStr=function(e,r){if("bitstr"===r)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===r){for(var i=new t(2*e.length),n=0;n<e.length;n++)i.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(i)}return"numstr"===r?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===r?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(r)||"objDesc"===r?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+r+" unsupported")},s.prototype._encodeObjid=function(e,r,i){if("string"==typeof e){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=r[e].split(/[\s\.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e)){e=e.slice();for(n=0;n<e.length;n++)e[n]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!i){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(n=0;n<e.length;n++){var s=e[n];for(o++;s>=128;s>>=7)o++}var a=new t(o),u=a.length-1;for(n=e.length-1;n>=0;n--){s=e[n];for(a[u--]=127&s;(s>>=7)>0;)a[u--]=128|127&s}return this._createEncoderBuffer(a)},s.prototype._encodeTime=function(e,t){var r,i=new Date(e);return"gentime"===t?r=[a(i.getFullYear()),a(i.getUTCMonth()+1),a(i.getUTCDate()),a(i.getUTCHours()),a(i.getUTCMinutes()),a(i.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[a(i.getFullYear()%100),a(i.getUTCMonth()+1),a(i.getUTCDate()),a(i.getUTCHours()),a(i.getUTCMinutes()),a(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},s.prototype._encodeNull=function(){return this._createEncoderBuffer("")},s.prototype._encodeInt=function(e,r){if("string"==typeof e){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=r[e]}if("number"!=typeof e&&!t.isBuffer(e)){var i=e.toArray();!e.sign&&128&i[0]&&i.unshift(0),e=new t(i)}if(t.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=new t(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var s=e;s>=256;s>>=8)n++;for(s=(o=new Array(n)).length-1;s>=0;s--)o[s]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new t(o))},s.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},s.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},s.prototype._skipDefault=function(e,t,r){var i,n=this._baseState;if(null===n.default)return!1;var o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==n.defaultBuffer[i])return!1;return!0},der_1}function requirePem(){if(hasRequiredPem)return pem;hasRequiredPem=1;var e=requireInherits_browser(),t=requireDer();function r(e){t.call(this,e),this.enc="pem"}return e(r,t),pem=r,r.prototype.encode=function(e,r){for(var i=t.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+r.label+"-----"],o=0;o<i.length;o+=64)n.push(i.slice(o,o+64));return n.push("-----END "+r.label+"-----"),n.join("\n")},pem}function requireEncoders(){return hasRequiredEncoders||(hasRequiredEncoders=1,(e=encoders).der=requireDer(),e.pem=requirePem()),encoders;var e}function requireAsn1$1(){return hasRequiredAsn1$1||(hasRequiredAsn1$1=1,(e=asn1).bignum=requireBn$2(),e.define=requireApi().define,e.base=requireBase(),e.constants=requireConstants(),e.decoders=requireDecoders(),e.encoders=requireEncoders()),asn1;var e}function requireCertificate(){if(hasRequiredCertificate)return certificate;hasRequiredCertificate=1;var e=requireAsn1$1(),t=e.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),r=e.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),i=e.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),n=e.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(i),this.key("subjectPublicKey").bitstr())})),o=e.define("RelativeDistinguishedName",(function(){this.setof(r)})),s=e.define("RDNSequence",(function(){this.seqof(o)})),a=e.define("Name",(function(){this.choice({rdnSequence:this.use(s)})})),u=e.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(t),this.key("notAfter").use(t))})),h=e.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),f=e.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(i),this.key("issuer").use(a),this.key("validity").use(u),this.key("subject").use(a),this.key("subjectPublicKeyInfo").use(n),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())})),l=e.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(f),this.key("signatureAlgorithm").use(i),this.key("signatureValue").bitstr())}));return certificate=l}function requireAsn1(){if(hasRequiredAsn1)return asn1$1;hasRequiredAsn1=1;var e=requireAsn1$1();asn1$1.certificate=requireCertificate();var t=e.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));asn1$1.RSAPrivateKey=t;var r=e.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));asn1$1.RSAPublicKey=r;var i=e.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),n=e.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(i),this.key("subjectPublicKey").bitstr())}));asn1$1.PublicKey=n;var o=e.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(i),this.key("subjectPrivateKey").octstr())}));asn1$1.PrivateKey=o;var s=e.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));asn1$1.EncryptedPrivateKey=s;var a=e.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));asn1$1.DSAPrivateKey=a,asn1$1.DSAparam=e.define("DSAparam",(function(){this.int()}));var u=e.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),h=e.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(u),this.key("publicKey").optional().explicit(1).bitstr())}));return asn1$1.ECPrivateKey=h,asn1$1.signature=e.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())})),asn1$1}const require$$1={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"};var safeBuffer={exports:{}},hasRequiredSafeBuffer,fixProc,hasRequiredFixProc,parseAsn1,hasRequiredParseAsn1;function requireSafeBuffer(){return hasRequiredSafeBuffer||(hasRequiredSafeBuffer=1,function(e,t){var r=requireDist(),i=r.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),n(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(safeBuffer,safeBuffer.exports)),safeBuffer.exports}function requireFixProc(){if(hasRequiredFixProc)return fixProc;hasRequiredFixProc=1;var e=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,t=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,i=requireEvp_bytestokey(),n=requireBrowser$7(),o=requireSafeBuffer().Buffer;return fixProc=function(s,a){var u,h=s.toString(),f=h.match(e);if(f){var l="aes"+f[1],c=o.from(f[2],"hex"),d=o.from(f[3].replace(/[\r\n]/g,""),"base64"),p=i(a,c.slice(0,8),parseInt(f[1],10)).key,m=[],g=n.createDecipheriv(l,p,c);m.push(g.update(d)),m.push(g.final()),u=o.concat(m)}else{var y=h.match(r);u=o.from(y[2].replace(/[\r\n]/g,""),"base64")}return{tag:h.match(t)[1],data:u}}}function requireParseAsn1(){if(hasRequiredParseAsn1)return parseAsn1;hasRequiredParseAsn1=1;var e=requireAsn1(),t=require$$1,r=requireFixProc(),i=requireBrowser$7(),n=requireBrowser$8(),o=requireSafeBuffer().Buffer;function s(s){var a;"object"!=typeof s||o.isBuffer(s)||(a=s.passphrase,s=s.key),"string"==typeof s&&(s=o.from(s));var u,h,f=r(s,a),l=f.tag,c=f.data;switch(l){case"CERTIFICATE":h=e.certificate.decode(c,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(h||(h=e.PublicKey.decode(c,"der")),u=h.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return e.RSAPublicKey.decode(h.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return h.subjectPrivateKey=h.subjectPublicKey,{type:"ec",data:h};case"1.2.840.10040.4.1":return h.algorithm.params.pub_key=e.DSAparam.decode(h.subjectPublicKey.data,"der"),{type:"dsa",data:h.algorithm.params};default:throw new Error("unknown key id "+u)}case"ENCRYPTED PRIVATE KEY":c=function(e,r){var s=e.algorithm.decrypt.kde.kdeparams.salt,a=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),u=t[e.algorithm.decrypt.cipher.algo.join(".")],h=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,l=parseInt(u.split("-")[1],10)/8,c=n.pbkdf2Sync(r,s,a,l,"sha1"),d=i.createDecipheriv(u,c,h),p=[];return p.push(d.update(f)),p.push(d.final()),o.concat(p)}(c=e.EncryptedPrivateKey.decode(c,"der"),a);case"PRIVATE KEY":switch(u=(h=e.PrivateKey.decode(c,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return e.RSAPrivateKey.decode(h.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:h.algorithm.curve,privateKey:e.ECPrivateKey.decode(h.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return h.algorithm.params.priv_key=e.DSAparam.decode(h.subjectPrivateKey,"der"),{type:"dsa",params:h.algorithm.params};default:throw new Error("unknown key id "+u)}case"RSA PUBLIC KEY":return e.RSAPublicKey.decode(c,"der");case"RSA PRIVATE KEY":return e.RSAPrivateKey.decode(c,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:e.DSAPrivateKey.decode(c,"der")};case"EC PRIVATE KEY":return{curve:(c=e.ECPrivateKey.decode(c,"der")).parameters.value,privateKey:c.privateKey};default:throw new Error("unknown key type "+l)}}return s.signature=e.signature,parseAsn1=s}const require$$4={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"};var hasRequiredSign,verify_1,hasRequiredVerify,browser$4,hasRequiredBrowser$4;function requireSign(){if(hasRequiredSign)return sign.exports;hasRequiredSign=1;var e=requireSafeBuffer$3().Buffer,t=requireBrowser$9(),r=requireBrowserifyRsa(),i=requireElliptic().ec,n=requireBn$4(),o=requireParseAsn1(),s=require$$4;function a(r,i,n,o){if((r=e.from(r.toArray())).length<i.byteLength()){var s=e.alloc(i.byteLength()-r.length);r=e.concat([s,r])}var a=n.length,h=function(t,r){t=u(t,r),t=t.mod(r);var i=e.from(t.toArray());if(i.length<r.byteLength()){var n=e.alloc(r.byteLength()-i.length);i=e.concat([n,i])}return i}(n,i),f=e.alloc(a);f.fill(1);var l=e.alloc(a);return l=t(o,l).update(f).update(e.from([0])).update(r).update(h).digest(),f=t(o,l).update(f).digest(),{k:l=t(o,l).update(f).update(e.from([1])).update(r).update(h).digest(),v:f=t(o,l).update(f).digest()}}function u(e,t){var r=new n(e),i=(e.length<<3)-t.bitLength();return i>0&&r.ishrn(i),r}function h(r,i,n){var o,s;do{for(o=e.alloc(0);8*o.length<r.bitLength();)i.v=t(n,i.k).update(i.v).digest(),o=e.concat([o,i.v]);s=u(o,r),i.k=t(n,i.k).update(i.v).update(e.from([0])).digest(),i.v=t(n,i.k).update(i.v).digest()}while(-1!==s.cmp(r));return s}function f(e,t,r,i){return e.toRed(n.mont(r)).redPow(t).fromRed().mod(i)}return sign.exports=function(t,l,c,d,p){var m=o(l);if(m.curve){if("ecdsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");return function(t,r){var n=s[r.curve.join(".")];if(!n)throw new Error("unknown curve "+r.curve.join("."));var o=new i(n).keyFromPrivate(r.privateKey),a=o.sign(t);return e.from(a.toDER())}(t,m)}if("dsa"===m.type){if("dsa"!==d)throw new Error("wrong private key type");return function(t,r,i){var o,s=r.params.priv_key,l=r.params.p,c=r.params.q,d=r.params.g,p=new n(0),m=u(t,c).mod(c),g=!1,y=a(s,c,t,i);for(;!1===g;)p=f(d,o=h(c,y,i),l,c),0===(g=o.invm(c).imul(m.add(s.mul(p))).mod(c)).cmpn(0)&&(g=!1,p=new n(0));return function(t,r){t=t.toArray(),r=r.toArray(),128&t[0]&&(t=[0].concat(t));128&r[0]&&(r=[0].concat(r));var i=t.length+r.length+4,n=[48,i,2,t.length];return n=n.concat(t,[2,r.length],r),e.from(n)}(p,g)}(t,m,c)}if("rsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");if(void 0!==l.padding&&1!==l.padding)throw new Error("illegal or unsupported padding mode");t=e.concat([p,t]);for(var g=m.modulus.byteLength(),y=[0,1];t.length+y.length+1<g;)y.push(255);y.push(0);for(var b=-1;++b<t.length;)y.push(t[b]);return r(y,m)},sign.exports.getKey=a,sign.exports.makeKey=h,sign.exports}function requireVerify(){if(hasRequiredVerify)return verify_1;hasRequiredVerify=1;var e=requireSafeBuffer$3().Buffer,t=requireBn$4(),r=requireElliptic().ec,i=requireParseAsn1(),n=require$$4;function o(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=0)throw new Error("invalid sig")}return verify_1=function(s,a,u,h,f){var l=i(u);if("ec"===l.type){if("ecdsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong public key type");return function(e,t,i){var o=n[i.data.algorithm.curve.join(".")];if(!o)throw new Error("unknown curve "+i.data.algorithm.curve.join("."));var s=new r(o),a=i.data.subjectPrivateKey.data;return s.verify(t,e,a)}(s,a,l)}if("dsa"===l.type){if("dsa"!==h)throw new Error("wrong public key type");return function(e,r,n){var s=n.data.p,a=n.data.q,u=n.data.g,h=n.data.pub_key,f=i.signature.decode(e,"der"),l=f.s,c=f.r;o(l,a),o(c,a);var d=t.mont(s),p=l.invm(a),m=u.toRed(d).redPow(new t(r).mul(p).mod(a)).fromRed().mul(h.toRed(d).redPow(c.mul(p).mod(a)).fromRed()).mod(s).mod(a);return 0===m.cmp(c)}(s,a,l)}if("rsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong public key type");a=e.concat([f,a]);for(var c=l.modulus.byteLength(),d=[1],p=0;a.length+d.length+2<c;)d.push(255),p+=1;d.push(0);for(var m=-1;++m<a.length;)d.push(a[m]);d=e.from(d);var g=t.mont(l.modulus);s=(s=new t(s).toRed(g)).redPow(new t(l.publicExponent)),s=e.from(s.fromRed().toArray());var y=p<8?1:0;for(c=Math.min(s.length,d.length),s.length!==d.length&&(y=1),m=-1;++m<c;)y|=s[m]^d[m];return 0===y}}function requireBrowser$4(){if(hasRequiredBrowser$4)return browser$4;hasRequiredBrowser$4=1;var e=requireSafeBuffer$3().Buffer,t=requireBrowser$a(),r=requireReadableBrowser(),i=requireInherits_browser(),n=requireSign(),o=requireVerify(),s=require$$6;function a(e){r.Writable.call(this);var i=s[e];if(!i)throw new Error("Unknown message digest");this._hashType=i.hash,this._hash=t(i.hash),this._tag=i.id,this._signType=i.sign}function u(e){r.Writable.call(this);var i=s[e];if(!i)throw new Error("Unknown message digest");this._hash=t(i.hash),this._tag=i.id,this._signType=i.sign}function h(e){return new a(e)}function f(e){return new u(e)}return Object.keys(s).forEach((function(t){s[t].id=e.from(s[t].id,"hex"),s[t.toLowerCase()]=s[t]})),i(a,r.Writable),a.prototype._write=function(e,t,r){this._hash.update(e),r()},a.prototype.update=function(t,r){return this._hash.update("string"==typeof t?e.from(t,r):t),this},a.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),i=n(r,e,this._hashType,this._signType,this._tag);return t?i.toString(t):i},i(u,r.Writable),u.prototype._write=function(e,t,r){this._hash.update(e),r()},u.prototype.update=function(t,r){return this._hash.update("string"==typeof t?e.from(t,r):t),this},u.prototype.verify=function(t,r,i){var n="string"==typeof r?e.from(r,i):r;this.end();var s=this._hash.digest();return o(n,s,t,this._signType,this._tag)},browser$4={Sign:h,Verify:f,createSign:h,createVerify:f}}var bn$3={exports:{}},bn$2=bn$3.exports,hasRequiredBn$1,browser$3,hasRequiredBrowser$3;function requireBn$1(){return hasRequiredBn$1||(hasRequiredBn$1=1,function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function n(e,t,r){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:requireDist().Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(e,t,r){var i=s(e,r);return r-1>=t&&(i|=s(e,r-1)<<4),i}function u(e,t,r,i){for(var n=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;n*=i,n+=a>=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(e){return e instanceof n||null!==e&&"object"==typeof e&&e.constructor.wordSize===n.wordSize&&Array.isArray(e.words)},n.max=function(e,t){return e.cmp(t)>0?e:t},n.min=function(e,t){return e.cmp(t)<0?e:t},n.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,i):(this._parseBase(e,t,n),"le"===i&&this._initArray(this.toArray(),t,i)))},n.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},n.prototype._initArray=function(e,t,i){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===i)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,s=o%i,a=Math.min(o,o-s)+r,h=0,f=r;f<a;f+=i)h=u(e,f,f+i,t),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(e,f,e.length,t),f=0;f<s;f++)l*=t;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},n.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},n.prototype.clone=function(){var e=new n(null);return this.copy(e),e},n.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h<i;h++){for(var f=u>>>26,l=67108863&u,c=Math.min(h,t.length-1),d=Math.max(0,h-e.length+1);d<=c;d++){var p=h-d|0;f+=(s=(n=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}n.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<n|o)).toString(16);o=a>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),i=0!==o||s!==this.length-1?h[6-u.length]+u+i:u+i}for(0!==o&&(i=o.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],d=l[e];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e);i=(p=p.idivn(d)).isZero()?m+i:h[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},n.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},n.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,h=new e(o),f=this.clone();if(u){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-n;a++)h[a]=0;for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),h[o-a-1]=s}return h},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},n.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},n.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},n.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},n.prototype.ior=function(e){return r(!(this.negative|e.negative)),this.iuor(e)},n.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},n.prototype.iand=function(e){return r(!(this.negative|e.negative)),this.iuand(e)},n.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},n.prototype.ixor=function(e){return r(!(this.negative|e.negative)),this.iuxor(e)},n.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},n.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},n.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++)o=(t=(0|r.words[s])-(0|i.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(e){return this.clone().isub(e)};var d=function(e,t,r){var i,n,o,s=e.words,a=t.words,u=r.words,h=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,R=0|s[5],q=8191&R,A=R>>>13,C=0|s[6],P=8191&C,I=C>>>13,O=0|s[7],B=8191&O,k=O>>>13,T=0|s[8],x=8191&T,N=T>>>13,j=0|s[9],$=8191&j,D=j>>>13,U=0|a[0],L=8191&U,F=U>>>13,z=0|a[1],H=8191&z,K=z>>>13,W=0|a[2],G=8191&W,V=W>>>13,J=0|a[3],Q=8191&J,Z=J>>>13,Y=0|a[4],X=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ie=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],ue=8191&ae,he=ae>>>13,fe=0|a[8],le=8191&fe,ce=fe>>>13,de=0|a[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(h+(i=Math.imul(l,L))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(c,L)|0))<<13)|0;h=((o=Math.imul(c,F))+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(p,L),n=(n=Math.imul(p,F))+Math.imul(m,L)|0,o=Math.imul(m,F);var ye=(h+(i=i+Math.imul(l,H)|0)|0)+((8191&(n=(n=n+Math.imul(l,K)|0)+Math.imul(c,H)|0))<<13)|0;h=((o=o+Math.imul(c,K)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(y,L),n=(n=Math.imul(y,F))+Math.imul(b,L)|0,o=Math.imul(b,F),i=i+Math.imul(p,H)|0,n=(n=n+Math.imul(p,K)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,K)|0;var be=(h+(i=i+Math.imul(l,G)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,G)|0))<<13)|0;h=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(w,L),n=(n=Math.imul(w,F))+Math.imul(_,L)|0,o=Math.imul(_,F),i=i+Math.imul(y,H)|0,n=(n=n+Math.imul(y,K)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,K)|0,i=i+Math.imul(p,G)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,V)|0;var ve=(h+(i=i+Math.imul(l,Q)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(c,Q)|0))<<13)|0;h=((o=o+Math.imul(c,Z)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(S,L),n=(n=Math.imul(S,F))+Math.imul(E,L)|0,o=Math.imul(E,F),i=i+Math.imul(w,H)|0,n=(n=n+Math.imul(w,K)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,K)|0,i=i+Math.imul(y,G)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0;var we=(h+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,ee)|0)+Math.imul(c,X)|0))<<13)|0;h=((o=o+Math.imul(c,ee)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(q,L),n=(n=Math.imul(q,F))+Math.imul(A,L)|0,o=Math.imul(A,F),i=i+Math.imul(S,H)|0,n=(n=n+Math.imul(S,K)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,K)|0,i=i+Math.imul(w,G)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,Q)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,Z)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(h+(i=i+Math.imul(l,re)|0)|0)+((8191&(n=(n=n+Math.imul(l,ie)|0)+Math.imul(c,re)|0))<<13)|0;h=((o=o+Math.imul(c,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(P,L),n=(n=Math.imul(P,F))+Math.imul(I,L)|0,o=Math.imul(I,F),i=i+Math.imul(q,H)|0,n=(n=n+Math.imul(q,K)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,K)|0,i=i+Math.imul(S,G)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Z)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,ee)|0,i=i+Math.imul(p,re)|0,n=(n=n+Math.imul(p,ie)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0;var Me=(h+(i=i+Math.imul(l,oe)|0)|0)+((8191&(n=(n=n+Math.imul(l,se)|0)+Math.imul(c,oe)|0))<<13)|0;h=((o=o+Math.imul(c,se)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(B,L),n=(n=Math.imul(B,F))+Math.imul(k,L)|0,o=Math.imul(k,F),i=i+Math.imul(P,H)|0,n=(n=n+Math.imul(P,K)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,K)|0,i=i+Math.imul(q,G)|0,n=(n=n+Math.imul(q,V)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(S,Q)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Z)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(y,re)|0,n=(n=n+Math.imul(y,ie)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ie)|0,i=i+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(h+(i=i+Math.imul(l,ue)|0)|0)+((8191&(n=(n=n+Math.imul(l,he)|0)+Math.imul(c,ue)|0))<<13)|0;h=((o=o+Math.imul(c,he)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(x,L),n=(n=Math.imul(x,F))+Math.imul(N,L)|0,o=Math.imul(N,F),i=i+Math.imul(B,H)|0,n=(n=n+Math.imul(B,K)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,K)|0,i=i+Math.imul(P,G)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,V)|0,i=i+Math.imul(q,Q)|0,n=(n=n+Math.imul(q,Z)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Z)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,ee)|0,i=i+Math.imul(w,re)|0,n=(n=n+Math.imul(w,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(y,oe)|0,n=(n=n+Math.imul(y,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,i=i+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,he)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,he)|0;var Ee=(h+(i=i+Math.imul(l,le)|0)|0)+((8191&(n=(n=n+Math.imul(l,ce)|0)+Math.imul(c,le)|0))<<13)|0;h=((o=o+Math.imul(c,ce)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul($,L),n=(n=Math.imul($,F))+Math.imul(D,L)|0,o=Math.imul(D,F),i=i+Math.imul(x,H)|0,n=(n=n+Math.imul(x,K)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,K)|0,i=i+Math.imul(B,G)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Z)|0,i=i+Math.imul(q,X)|0,n=(n=n+Math.imul(q,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ie)|0,i=i+Math.imul(w,oe)|0,n=(n=n+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,i=i+Math.imul(y,ue)|0,n=(n=n+Math.imul(y,he)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,he)|0,i=i+Math.imul(p,le)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ce)|0;var Re=(h+(i=i+Math.imul(l,pe)|0)|0)+((8191&(n=(n=n+Math.imul(l,me)|0)+Math.imul(c,pe)|0))<<13)|0;h=((o=o+Math.imul(c,me)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,i=Math.imul($,H),n=(n=Math.imul($,K))+Math.imul(D,H)|0,o=Math.imul(D,K),i=i+Math.imul(x,G)|0,n=(n=n+Math.imul(x,V)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,V)|0,i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,Z)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,Z)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,i=i+Math.imul(q,re)|0,n=(n=n+Math.imul(q,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,i=i+Math.imul(w,ue)|0,n=(n=n+Math.imul(w,he)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,he)|0,i=i+Math.imul(y,le)|0,n=(n=n+Math.imul(y,ce)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,ce)|0;var qe=(h+(i=i+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;h=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(qe>>>26)|0,qe&=67108863,i=Math.imul($,G),n=(n=Math.imul($,V))+Math.imul(D,G)|0,o=Math.imul(D,V),i=i+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,Z)|0,i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ie)|0,i=i+Math.imul(q,oe)|0,n=(n=n+Math.imul(q,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,he)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,he)|0,i=i+Math.imul(w,le)|0,n=(n=n+Math.imul(w,ce)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ce)|0;var Ae=(h+(i=i+Math.imul(y,pe)|0)|0)+((8191&(n=(n=n+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;h=((o=o+Math.imul(b,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul($,Q),n=(n=Math.imul($,Z))+Math.imul(D,Q)|0,o=Math.imul(D,Z),i=i+Math.imul(x,X)|0,n=(n=n+Math.imul(x,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,i=i+Math.imul(B,re)|0,n=(n=n+Math.imul(B,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,se)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,se)|0,i=i+Math.imul(q,ue)|0,n=(n=n+Math.imul(q,he)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,he)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,ce)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,ce)|0;var Ce=(h+(i=i+Math.imul(w,pe)|0)|0)+((8191&(n=(n=n+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;h=((o=o+Math.imul(_,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul($,X),n=(n=Math.imul($,ee))+Math.imul(D,X)|0,o=Math.imul(D,ee),i=i+Math.imul(x,re)|0,n=(n=n+Math.imul(x,ie)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ie)|0,i=i+Math.imul(B,oe)|0,n=(n=n+Math.imul(B,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,he)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,he)|0,i=i+Math.imul(q,le)|0,n=(n=n+Math.imul(q,ce)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ce)|0;var Pe=(h+(i=i+Math.imul(S,pe)|0)|0)+((8191&(n=(n=n+Math.imul(S,me)|0)+Math.imul(E,pe)|0))<<13)|0;h=((o=o+Math.imul(E,me)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,i=Math.imul($,re),n=(n=Math.imul($,ie))+Math.imul(D,re)|0,o=Math.imul(D,ie),i=i+Math.imul(x,oe)|0,n=(n=n+Math.imul(x,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,i=i+Math.imul(B,ue)|0,n=(n=n+Math.imul(B,he)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,he)|0,i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,ce)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,ce)|0;var Ie=(h+(i=i+Math.imul(q,pe)|0)|0)+((8191&(n=(n=n+Math.imul(q,me)|0)+Math.imul(A,pe)|0))<<13)|0;h=((o=o+Math.imul(A,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul($,oe),n=(n=Math.imul($,se))+Math.imul(D,oe)|0,o=Math.imul(D,se),i=i+Math.imul(x,ue)|0,n=(n=n+Math.imul(x,he)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,he)|0,i=i+Math.imul(B,le)|0,n=(n=n+Math.imul(B,ce)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,ce)|0;var Oe=(h+(i=i+Math.imul(P,pe)|0)|0)+((8191&(n=(n=n+Math.imul(P,me)|0)+Math.imul(I,pe)|0))<<13)|0;h=((o=o+Math.imul(I,me)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,i=Math.imul($,ue),n=(n=Math.imul($,he))+Math.imul(D,ue)|0,o=Math.imul(D,he),i=i+Math.imul(x,le)|0,n=(n=n+Math.imul(x,ce)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ce)|0;var Be=(h+(i=i+Math.imul(B,pe)|0)|0)+((8191&(n=(n=n+Math.imul(B,me)|0)+Math.imul(k,pe)|0))<<13)|0;h=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul($,le),n=(n=Math.imul($,ce))+Math.imul(D,le)|0,o=Math.imul(D,ce);var ke=(h+(i=i+Math.imul(x,pe)|0)|0)+((8191&(n=(n=n+Math.imul(x,me)|0)+Math.imul(N,pe)|0))<<13)|0;h=((o=o+Math.imul(N,me)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863;var Te=(h+(i=Math.imul($,pe))|0)+((8191&(n=(n=Math.imul($,me))+Math.imul(D,pe)|0))<<13)|0;return h=((o=Math.imul(D,me))+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,u[0]=ge,u[1]=ye,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Me,u[7]=Se,u[8]=Ee,u[9]=Re,u[10]=qe,u[11]=Ae,u[12]=Ce,u[13]=Pe,u[14]=Ie,u[15]=Oe,u[16]=Be,u[17]=ke,u[18]=Te,0!==h&&(u[19]=h,r.length++),r};function p(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(d=c),n.prototype.mulTo=function(e,t){var r,i=this.length+e.length;return r=10===this.length&&10===e.length?d(this,e,t):i<63?c(this,e,t):i<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var a=67108863&i,u=Math.min(o,t.length-1),h=Math.max(0,o-e.length+1);h<=u;h++){var f=o-h,l=(0|e.words[f])*(0|t.words[h]),c=67108863&l;a=67108863&(c=c+a|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,e,t):p(this,e,t),r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=n.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},m.prototype.permute=function(e,t,r,i,n,o){for(var s=0;s<o;s++)i[s]=t[e[s]],n[s]=r[e[s]]},m.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),f=0;f<n;f+=a)for(var l=u,c=h,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],b=l*g-c*y;y=l*y+c*g,g=b,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==a&&(b=u*l-h*c,c=u*c+h*l,l=b)}},m.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},m.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},m.prototype.convert13b=function(e,t,i,n){for(var o=0,s=0;s<t;s++)o+=0|e[s],i[2*s]=8191&o,o>>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<n;++s)i[s]=0;r(0===o),r(!(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),s=new Array(i),a=new Array(i),u=new Array(i),h=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(e.words,e.length,s,i),this.convert13b(t.words,t.length,h,i),this.transform(s,o,a,u,i,n),this.transform(h,o,f,l,i,n);for(var d=0;d<i;d++){var p=a[d]*f[d]-u[d]*l[d];u[d]=a[d]*l[d]+u[d]*f[d],a[d]=p}return this.conjugate(a,u,i),this.transform(a,u,c,o,i,n),this.conjugate(c,o,i),this.normalize13b(c,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},n.prototype.mul=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},n.prototype.mulf=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),p(this,e,t)},n.prototype.imul=function(e){return this.clone().mulTo(e,this)},n.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,i=0;i<this.length;i++){var n=(0|this.words[i])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[i]=67108863&o}return 0!==t&&(this.words[i]=t,this.length++),this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}(e);if(0===t.length)return new n(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var o=r.sqr();i<t.length;i++,o=o.sqr())0!==t[i]&&(r=r.mul(o));return r},n.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,i=e%26,n=(e-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<i;this.words[t]=u|s,s=a>>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},n.prototype.iushrn=function(e,t,i){var n;r("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=i;if(n-=s,n=Math.max(0,n),u){for(var h=0;h<s;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var f=0;for(h=this.length-1;h>=0&&(0!==f||h>=n);h--){var l=0|this.words[h];this.words[h]=f<<26-o|l>>>o,f=l&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<<t;return!(this.length<=i||!(this.words[i]&n))},n.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(e){return this.clone().imaskn(e)},n.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},n.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},n.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},n.prototype.addn=function(e){return this.clone().iaddn(e)},n.prototype.subn=function(e){return this.clone().isubn(e)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(e,t,i){var n,o,s=e.length+i;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+i])+a;var u=(0|e.words[n])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)a=(o=(0|this.words[n+i])+a)>>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new n(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var f=i.clone()._ishlnsubmul(o,1,u);0===f.negative&&(i=f,a&&(a.words[u]=1));for(var l=u-1;l>=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new n(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},n.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,i=0,n=this.length-1;n>=0;n--)i=(t*i+(0|this.words[n]))%e;return i},n.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new n(1),s=new n(0),a=new n(0),u=new n(1),h=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++h;for(var f=i.clone(),l=t.clone();!t.isZero();){for(var c=0,d=1;!(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(l)),a.iushrn(1),u.iushrn(1);t.cmp(i)>=0?(t.isub(i),o.isub(a),s.isub(u)):(i.isub(t),a.isub(o),u.isub(s))}return{a:a,b:u,gcd:i.iushln(h)}},n.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new n(1),a=new n(0),u=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var h=0,f=1;!(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,c=1;!(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(a)):(i.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},n.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},n.prototype.invm=function(e){return this.egcd(e).a.umod(e)},n.prototype.isEven=function(){return!(1&this.words[0])},n.prototype.isOdd=function(){return!(1&~this.words[0])},n.prototype.andln=function(e){return this.words[0]&e},n.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,s=i;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},n.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},n.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},n.prototype.gtn=function(e){return 1===this.cmpn(e)},n.prototype.gt=function(e){return 1===this.cmp(e)},n.prototype.gten=function(e){return this.cmpn(e)>=0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.ltn=function(e){return-1===this.cmpn(e)},n.prototype.lt=function(e){return-1===this.cmp(e)},n.prototype.lten=function(e){return this.cmpn(e)<=0},n.prototype.lte=function(e){return this.cmp(e)<=0},n.prototype.eqn=function(e){return 0===this.cmpn(e)},n.prototype.eq=function(e){return 0===this.cmp(e)},n.red=function(e){return new M(e)},n.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(e){return this.red=e,this},n.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},n.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},n.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},n.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},n.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},n.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},n.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},n.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new n(t,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=n._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new n(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(b,y),b.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(v,y),i(w,y),i(_,y),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},n._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return g[e]=t,t},M.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){r(!(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new n(1)).iushrn(2);return this.pow(e,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,o),c=this.pow(e,o.addn(1).iushrn(1)),d=this.pow(e,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var y=this.pow(l,new n(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},M.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},M.prototype.pow=function(e,t){if(t.isZero())return new n(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new n(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var o=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),i=t.length-1;i>=0;i--){for(var h=t.words[i],f=u-1;f>=0;f--){var l=h>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}u=26}return o},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},n.mont=function(e){return new S(e)},i(S,M),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new n(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(bn$3,bn$2)),bn$3.exports}function requireBrowser$3(){if(hasRequiredBrowser$3)return browser$3;hasRequiredBrowser$3=1;var e=requireElliptic(),t=requireBn$1();browser$3=function(e){return new i(e)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function i(t){this.curveType=r[t],this.curveType||(this.curveType={name:t}),this.curve=new e.ec(this.curveType.name),this.keys=void 0}function n(e,t,r){Array.isArray(e)||(e=e.toArray());var i=new Buffer(e);if(r&&i.length<r){var n=new Buffer(r-i.length);n.fill(0),i=Buffer.concat([n,i])}return t?i.toString(t):i}return r.p224=r.secp224r1,r.p256=r.secp256r1=r.prime256v1,r.p192=r.secp192r1=r.prime192v1,r.p384=r.secp384r1,r.p521=r.secp521r1,i.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},i.prototype.computeSecret=function(e,t,r){return t=t||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,t)),n(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},i.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),n(r,e)},i.prototype.getPrivateKey=function(e){return n(this.keys.getPrivate(),e)},i.prototype.setPublicKey=function(e,t){return t=t||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,t)),this.keys._importPublic(e),this},i.prototype.setPrivateKey=function(e,r){r=r||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,r));var i=new t(e);return i=i.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(i),this},browser$3}var browser$2={},mgf,hasRequiredMgf,xor,hasRequiredXor;function requireMgf(){if(hasRequiredMgf)return mgf;hasRequiredMgf=1;var e=requireBrowser$a(),t=requireSafeBuffer$6().Buffer;function r(e){var r=t.allocUnsafe(4);return r.writeUInt32BE(e,0),r}return mgf=function(i,n){for(var o,s=t.alloc(0),a=0;s.length<n;)o=r(a++),s=t.concat([s,e("sha1").update(i).update(o).digest()]);return s.slice(0,n)}}function requireXor(){return hasRequiredXor?xor:(hasRequiredXor=1,xor=function(e,t){for(var r=e.length,i=-1;++i<r;)e[i]^=t[i];return e})}var bn$1={exports:{}},bn=bn$1.exports,hasRequiredBn,withPublic_1,hasRequiredWithPublic,publicEncrypt,hasRequiredPublicEncrypt,privateDecrypt,hasRequiredPrivateDecrypt,hasRequiredBrowser$2;function requireBn(){return hasRequiredBn||(hasRequiredBn=1,function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function n(e,t,r){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:requireDist().Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(e,t,r){var i=s(e,r);return r-1>=t&&(i|=s(e,r-1)<<4),i}function u(e,t,r,i){for(var n=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;n*=i,n+=a>=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(e){return e instanceof n||null!==e&&"object"==typeof e&&e.constructor.wordSize===n.wordSize&&Array.isArray(e.words)},n.max=function(e,t){return e.cmp(t)>0?e:t},n.min=function(e,t){return e.cmp(t)<0?e:t},n.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,i):(this._parseBase(e,t,n),"le"===i&&this._initArray(this.toArray(),t,i)))},n.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},n.prototype._initArray=function(e,t,i){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===i)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=t)i++;i--,n=n/t|0;for(var o=e.length-r,s=o%i,a=Math.min(o,o-s)+r,h=0,f=r;f<a;f+=i)h=u(e,f,f+i,t),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(e,f,e.length,t),f=0;f<s;f++)l*=t;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},n.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},n.prototype.clone=function(){var e=new n(null);return this.copy(e),e},n.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var h=1;h<i;h++){for(var f=u>>>26,l=67108863&u,c=Math.min(h,t.length-1),d=Math.max(0,h-e.length+1);d<=c;d++){var p=h-d|0;f+=(s=(n=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|f}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}n.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<n|o)).toString(16);o=a>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),i=0!==o||s!==this.length-1?h[6-u.length]+u+i:u+i}for(0!==o&&(i=o.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],d=l[e];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e);i=(p=p.idivn(d)).isZero()?m+i:h[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(e,t){return r(void 0!==o),this.toArrayLike(o,e,t)},n.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},n.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,h=new e(o),f=this.clone();if(u){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-n;a++)h[a]=0;for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),h[o-a-1]=s}return h},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},n.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},n.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},n.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},n.prototype.ior=function(e){return r(!(this.negative|e.negative)),this.iuor(e)},n.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},n.prototype.iand=function(e){return r(!(this.negative|e.negative)),this.iuand(e)},n.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;i<r.length;i++)this.words[i]=t.words[i]^r.words[i];if(this!==t)for(;i<t.length;i++)this.words[i]=t.words[i];return this.length=t.length,this.strip()},n.prototype.ixor=function(e){return r(!(this.negative|e.negative)),this.iuxor(e)},n.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},n.prototype.iadd=function(e){var t,r,i;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0,o=0;o<i.length;o++)t=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<r.length;o++)t=(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},n.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=e):(r=e,i=this);for(var o=0,s=0;s<i.length;s++)o=(t=(0|r.words[s])-(0|i.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(e){return this.clone().isub(e)};var d=function(e,t,r){var i,n,o,s=e.words,a=t.words,u=r.words,h=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,R=0|s[5],q=8191&R,A=R>>>13,C=0|s[6],P=8191&C,I=C>>>13,O=0|s[7],B=8191&O,k=O>>>13,T=0|s[8],x=8191&T,N=T>>>13,j=0|s[9],$=8191&j,D=j>>>13,U=0|a[0],L=8191&U,F=U>>>13,z=0|a[1],H=8191&z,K=z>>>13,W=0|a[2],G=8191&W,V=W>>>13,J=0|a[3],Q=8191&J,Z=J>>>13,Y=0|a[4],X=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ie=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],ue=8191&ae,he=ae>>>13,fe=0|a[8],le=8191&fe,ce=fe>>>13,de=0|a[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(h+(i=Math.imul(l,L))|0)+((8191&(n=(n=Math.imul(l,F))+Math.imul(c,L)|0))<<13)|0;h=((o=Math.imul(c,F))+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(p,L),n=(n=Math.imul(p,F))+Math.imul(m,L)|0,o=Math.imul(m,F);var ye=(h+(i=i+Math.imul(l,H)|0)|0)+((8191&(n=(n=n+Math.imul(l,K)|0)+Math.imul(c,H)|0))<<13)|0;h=((o=o+Math.imul(c,K)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(y,L),n=(n=Math.imul(y,F))+Math.imul(b,L)|0,o=Math.imul(b,F),i=i+Math.imul(p,H)|0,n=(n=n+Math.imul(p,K)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,K)|0;var be=(h+(i=i+Math.imul(l,G)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,G)|0))<<13)|0;h=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(w,L),n=(n=Math.imul(w,F))+Math.imul(_,L)|0,o=Math.imul(_,F),i=i+Math.imul(y,H)|0,n=(n=n+Math.imul(y,K)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,K)|0,i=i+Math.imul(p,G)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,V)|0;var ve=(h+(i=i+Math.imul(l,Q)|0)|0)+((8191&(n=(n=n+Math.imul(l,Z)|0)+Math.imul(c,Q)|0))<<13)|0;h=((o=o+Math.imul(c,Z)|0)+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(S,L),n=(n=Math.imul(S,F))+Math.imul(E,L)|0,o=Math.imul(E,F),i=i+Math.imul(w,H)|0,n=(n=n+Math.imul(w,K)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,K)|0,i=i+Math.imul(y,G)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0;var we=(h+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,ee)|0)+Math.imul(c,X)|0))<<13)|0;h=((o=o+Math.imul(c,ee)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(q,L),n=(n=Math.imul(q,F))+Math.imul(A,L)|0,o=Math.imul(A,F),i=i+Math.imul(S,H)|0,n=(n=n+Math.imul(S,K)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,K)|0,i=i+Math.imul(w,G)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,Q)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,Z)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(h+(i=i+Math.imul(l,re)|0)|0)+((8191&(n=(n=n+Math.imul(l,ie)|0)+Math.imul(c,re)|0))<<13)|0;h=((o=o+Math.imul(c,ie)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(P,L),n=(n=Math.imul(P,F))+Math.imul(I,L)|0,o=Math.imul(I,F),i=i+Math.imul(q,H)|0,n=(n=n+Math.imul(q,K)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,K)|0,i=i+Math.imul(S,G)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,Q)|0,n=(n=n+Math.imul(w,Z)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,Z)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,ee)|0,i=i+Math.imul(p,re)|0,n=(n=n+Math.imul(p,ie)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ie)|0;var Me=(h+(i=i+Math.imul(l,oe)|0)|0)+((8191&(n=(n=n+Math.imul(l,se)|0)+Math.imul(c,oe)|0))<<13)|0;h=((o=o+Math.imul(c,se)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(B,L),n=(n=Math.imul(B,F))+Math.imul(k,L)|0,o=Math.imul(k,F),i=i+Math.imul(P,H)|0,n=(n=n+Math.imul(P,K)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,K)|0,i=i+Math.imul(q,G)|0,n=(n=n+Math.imul(q,V)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,V)|0,i=i+Math.imul(S,Q)|0,n=(n=n+Math.imul(S,Z)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Z)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,i=i+Math.imul(y,re)|0,n=(n=n+Math.imul(y,ie)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ie)|0,i=i+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Se=(h+(i=i+Math.imul(l,ue)|0)|0)+((8191&(n=(n=n+Math.imul(l,he)|0)+Math.imul(c,ue)|0))<<13)|0;h=((o=o+Math.imul(c,he)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(x,L),n=(n=Math.imul(x,F))+Math.imul(N,L)|0,o=Math.imul(N,F),i=i+Math.imul(B,H)|0,n=(n=n+Math.imul(B,K)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,K)|0,i=i+Math.imul(P,G)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,V)|0,i=i+Math.imul(q,Q)|0,n=(n=n+Math.imul(q,Z)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Z)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,ee)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,ee)|0,i=i+Math.imul(w,re)|0,n=(n=n+Math.imul(w,ie)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ie)|0,i=i+Math.imul(y,oe)|0,n=(n=n+Math.imul(y,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,i=i+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,he)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,he)|0;var Ee=(h+(i=i+Math.imul(l,le)|0)|0)+((8191&(n=(n=n+Math.imul(l,ce)|0)+Math.imul(c,le)|0))<<13)|0;h=((o=o+Math.imul(c,ce)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul($,L),n=(n=Math.imul($,F))+Math.imul(D,L)|0,o=Math.imul(D,F),i=i+Math.imul(x,H)|0,n=(n=n+Math.imul(x,K)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,K)|0,i=i+Math.imul(B,G)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,V)|0,i=i+Math.imul(P,Q)|0,n=(n=n+Math.imul(P,Z)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,Z)|0,i=i+Math.imul(q,X)|0,n=(n=n+Math.imul(q,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(S,re)|0,n=(n=n+Math.imul(S,ie)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ie)|0,i=i+Math.imul(w,oe)|0,n=(n=n+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,i=i+Math.imul(y,ue)|0,n=(n=n+Math.imul(y,he)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,he)|0,i=i+Math.imul(p,le)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ce)|0;var Re=(h+(i=i+Math.imul(l,pe)|0)|0)+((8191&(n=(n=n+Math.imul(l,me)|0)+Math.imul(c,pe)|0))<<13)|0;h=((o=o+Math.imul(c,me)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,i=Math.imul($,H),n=(n=Math.imul($,K))+Math.imul(D,H)|0,o=Math.imul(D,K),i=i+Math.imul(x,G)|0,n=(n=n+Math.imul(x,V)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,V)|0,i=i+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,Z)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,Z)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,ee)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,ee)|0,i=i+Math.imul(q,re)|0,n=(n=n+Math.imul(q,ie)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(S,oe)|0,n=(n=n+Math.imul(S,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,i=i+Math.imul(w,ue)|0,n=(n=n+Math.imul(w,he)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,he)|0,i=i+Math.imul(y,le)|0,n=(n=n+Math.imul(y,ce)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,ce)|0;var qe=(h+(i=i+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;h=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(qe>>>26)|0,qe&=67108863,i=Math.imul($,G),n=(n=Math.imul($,V))+Math.imul(D,G)|0,o=Math.imul(D,V),i=i+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,Z)|0,i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,i=i+Math.imul(P,re)|0,n=(n=n+Math.imul(P,ie)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ie)|0,i=i+Math.imul(q,oe)|0,n=(n=n+Math.imul(q,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,i=i+Math.imul(S,ue)|0,n=(n=n+Math.imul(S,he)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,he)|0,i=i+Math.imul(w,le)|0,n=(n=n+Math.imul(w,ce)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,ce)|0;var Ae=(h+(i=i+Math.imul(y,pe)|0)|0)+((8191&(n=(n=n+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;h=((o=o+Math.imul(b,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul($,Q),n=(n=Math.imul($,Z))+Math.imul(D,Q)|0,o=Math.imul(D,Z),i=i+Math.imul(x,X)|0,n=(n=n+Math.imul(x,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,i=i+Math.imul(B,re)|0,n=(n=n+Math.imul(B,ie)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ie)|0,i=i+Math.imul(P,oe)|0,n=(n=n+Math.imul(P,se)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,se)|0,i=i+Math.imul(q,ue)|0,n=(n=n+Math.imul(q,he)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,he)|0,i=i+Math.imul(S,le)|0,n=(n=n+Math.imul(S,ce)|0)+Math.imul(E,le)|0,o=o+Math.imul(E,ce)|0;var Ce=(h+(i=i+Math.imul(w,pe)|0)|0)+((8191&(n=(n=n+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;h=((o=o+Math.imul(_,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul($,X),n=(n=Math.imul($,ee))+Math.imul(D,X)|0,o=Math.imul(D,ee),i=i+Math.imul(x,re)|0,n=(n=n+Math.imul(x,ie)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ie)|0,i=i+Math.imul(B,oe)|0,n=(n=n+Math.imul(B,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,i=i+Math.imul(P,ue)|0,n=(n=n+Math.imul(P,he)|0)+Math.imul(I,ue)|0,o=o+Math.imul(I,he)|0,i=i+Math.imul(q,le)|0,n=(n=n+Math.imul(q,ce)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ce)|0;var Pe=(h+(i=i+Math.imul(S,pe)|0)|0)+((8191&(n=(n=n+Math.imul(S,me)|0)+Math.imul(E,pe)|0))<<13)|0;h=((o=o+Math.imul(E,me)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,i=Math.imul($,re),n=(n=Math.imul($,ie))+Math.imul(D,re)|0,o=Math.imul(D,ie),i=i+Math.imul(x,oe)|0,n=(n=n+Math.imul(x,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,i=i+Math.imul(B,ue)|0,n=(n=n+Math.imul(B,he)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,he)|0,i=i+Math.imul(P,le)|0,n=(n=n+Math.imul(P,ce)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,ce)|0;var Ie=(h+(i=i+Math.imul(q,pe)|0)|0)+((8191&(n=(n=n+Math.imul(q,me)|0)+Math.imul(A,pe)|0))<<13)|0;h=((o=o+Math.imul(A,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul($,oe),n=(n=Math.imul($,se))+Math.imul(D,oe)|0,o=Math.imul(D,se),i=i+Math.imul(x,ue)|0,n=(n=n+Math.imul(x,he)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,he)|0,i=i+Math.imul(B,le)|0,n=(n=n+Math.imul(B,ce)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,ce)|0;var Oe=(h+(i=i+Math.imul(P,pe)|0)|0)+((8191&(n=(n=n+Math.imul(P,me)|0)+Math.imul(I,pe)|0))<<13)|0;h=((o=o+Math.imul(I,me)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,i=Math.imul($,ue),n=(n=Math.imul($,he))+Math.imul(D,ue)|0,o=Math.imul(D,he),i=i+Math.imul(x,le)|0,n=(n=n+Math.imul(x,ce)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ce)|0;var Be=(h+(i=i+Math.imul(B,pe)|0)|0)+((8191&(n=(n=n+Math.imul(B,me)|0)+Math.imul(k,pe)|0))<<13)|0;h=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Be>>>26)|0,Be&=67108863,i=Math.imul($,le),n=(n=Math.imul($,ce))+Math.imul(D,le)|0,o=Math.imul(D,ce);var ke=(h+(i=i+Math.imul(x,pe)|0)|0)+((8191&(n=(n=n+Math.imul(x,me)|0)+Math.imul(N,pe)|0))<<13)|0;h=((o=o+Math.imul(N,me)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863;var Te=(h+(i=Math.imul($,pe))|0)+((8191&(n=(n=Math.imul($,me))+Math.imul(D,pe)|0))<<13)|0;return h=((o=Math.imul(D,me))+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,u[0]=ge,u[1]=ye,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Me,u[7]=Se,u[8]=Ee,u[9]=Re,u[10]=qe,u[11]=Ae,u[12]=Ce,u[13]=Pe,u[14]=Ie,u[15]=Oe,u[16]=Be,u[17]=ke,u[18]=Te,0!==h&&(u[19]=h,r.length++),r};function p(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(d=c),n.prototype.mulTo=function(e,t){var r,i=this.length+e.length;return r=10===this.length&&10===e.length?d(this,e,t):i<63?c(this,e,t):i<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var a=67108863&i,u=Math.min(o,t.length-1),h=Math.max(0,o-e.length+1);h<=u;h++){var f=o-h,l=(0|e.words[f])*(0|t.words[h]),c=67108863&l;a=67108863&(c=c+a|0),n+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,e,t):p(this,e,t),r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=n.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var i=0,n=0;n<t;n++)i|=(1&e)<<t-n-1,e>>=1;return i},m.prototype.permute=function(e,t,r,i,n,o){for(var s=0;s<o;s++)i[s]=t[e[s]],n[s]=r[e[s]]},m.prototype.transform=function(e,t,r,i,n,o){this.permute(o,e,t,r,i,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),f=0;f<n;f+=a)for(var l=u,c=h,d=0;d<s;d++){var p=r[f+d],m=i[f+d],g=r[f+d+s],y=i[f+d+s],b=l*g-c*y;y=l*y+c*g,g=b,r[f+d]=p+g,i[f+d]=m+y,r[f+d+s]=p-g,i[f+d+s]=m-y,d!==a&&(b=u*l-h*c,c=u*c+h*l,l=b)}},m.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1],e[r-i-1]=n,n=t[i],t[i]=-t[r-i-1],t[r-i-1]=-n}},m.prototype.normalize13b=function(e,t){for(var r=0,i=0;i<t/2;i++){var n=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+r;e[i]=67108863&n,r=n<67108864?0:n/67108864|0}return e},m.prototype.convert13b=function(e,t,i,n){for(var o=0,s=0;s<t;s++)o+=0|e[s],i[2*s]=8191&o,o>>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<n;++s)i[s]=0;r(0===o),r(!(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var i=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(i),o=this.stub(i),s=new Array(i),a=new Array(i),u=new Array(i),h=new Array(i),f=new Array(i),l=new Array(i),c=r.words;c.length=i,this.convert13b(e.words,e.length,s,i),this.convert13b(t.words,t.length,h,i),this.transform(s,o,a,u,i,n),this.transform(h,o,f,l,i,n);for(var d=0;d<i;d++){var p=a[d]*f[d]-u[d]*l[d];u[d]=a[d]*l[d]+u[d]*f[d],a[d]=p}return this.conjugate(a,u,i),this.transform(a,u,c,o,i,n),this.conjugate(c,o,i),this.normalize13b(c,i),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},n.prototype.mul=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},n.prototype.mulf=function(e){var t=new n(null);return t.words=new Array(this.length+e.length),p(this,e,t)},n.prototype.imul=function(e){return this.clone().mulTo(e,this)},n.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,i=0;i<this.length;i++){var n=(0|this.words[i])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[i]=67108863&o}return 0!==t&&(this.words[i]=t,this.length++),this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var i=r/26|0,n=r%26;t[r]=(e.words[i]&1<<n)>>>n}return t}(e);if(0===t.length)return new n(1);for(var r=this,i=0;i<t.length&&0===t[i];i++,r=r.sqr());if(++i<t.length)for(var o=r.sqr();i<t.length;i++,o=o.sqr())0!==t[i]&&(r=r.mul(o));return r},n.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,i=e%26,n=(e-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<i;this.words[t]=u|s,s=a>>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},n.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},n.prototype.iushrn=function(e,t,i){var n;r("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=i;if(n-=s,n=Math.max(0,n),u){for(var h=0;h<s;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var f=0;for(h=this.length-1;h>=0&&(0!==f||h>=n);h--){var l=0|this.words[h];this.words[h]=f<<26-o|l>>>o,f=l&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<<t;return!(this.length<=i||!(this.words[i]&n))},n.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},n.prototype.maskn=function(e){return this.clone().imaskn(e)},n.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},n.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},n.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},n.prototype.addn=function(e){return this.clone().iaddn(e)},n.prototype.subn=function(e){return this.clone().isubn(e)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(e,t,i){var n,o,s=e.length+i;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+i])+a;var u=(0|e.words[n])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)a=(o=(0|this.words[n+i])+a)>>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(e,t){var r=(this.length,e.length),i=this.clone(),o=e,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,u=i.length-o.length;if("mod"!==t){(a=new n(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var f=i.clone()._ishlnsubmul(o,1,u);0===f.negative&&(i=f,a&&(a.words[u]=1));for(var l=u-1;l>=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new n(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},n.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,i=0,n=this.length-1;n>=0;n--)i=(t*i+(0|this.words[n]))%e;return i},n.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new n(1),s=new n(0),a=new n(0),u=new n(1),h=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++h;for(var f=i.clone(),l=t.clone();!t.isZero();){for(var c=0,d=1;!(t.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(t.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;!(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(l)),a.iushrn(1),u.iushrn(1);t.cmp(i)>=0?(t.isub(i),o.isub(a),s.isub(u)):(i.isub(t),a.isub(o),u.isub(s))}return{a:a,b:u,gcd:i.iushln(h)}},n.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new n(1),a=new n(0),u=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var h=0,f=1;!(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,c=1;!(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(a)):(i.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},n.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var o=t;t=r,r=o}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},n.prototype.invm=function(e){return this.egcd(e).a.umod(e)},n.prototype.isEven=function(){return!(1&this.words[0])},n.prototype.isOdd=function(){return!(1&~this.words[0])},n.prototype.andln=function(e){return this.words[0]&e},n.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,s=i;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},n.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},n.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){i<n?t=-1:i>n&&(t=1);break}}return t},n.prototype.gtn=function(e){return 1===this.cmpn(e)},n.prototype.gt=function(e){return 1===this.cmp(e)},n.prototype.gten=function(e){return this.cmpn(e)>=0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.ltn=function(e){return-1===this.cmpn(e)},n.prototype.lt=function(e){return-1===this.cmp(e)},n.prototype.lten=function(e){return this.cmpn(e)<=0},n.prototype.lte=function(e){return this.cmp(e)<=0},n.prototype.eqn=function(e){return 0===this.cmpn(e)},n.prototype.eq=function(e){return 0===this.cmp(e)},n.red=function(e){return new M(e)},n.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(e){return this.red=e,this},n.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},n.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},n.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},n.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},n.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},n.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},n.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},n.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new n(t,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=n._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new n(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t<this.n?-1:r.ucmp(this.p);return 0===i?(r.words[0]=0,r.length=1):i>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(b,y),b.prototype.split=function(e,t){for(var r=4194303,i=Math.min(e.length,9),n=0;n<i;n++)t.words[n]=e.words[n];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[n-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var i=0|e.words[r];t+=977*i,e.words[r]=67108863&t,t=64*i+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(v,y),i(w,y),i(_,y),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var i=19*(0|e.words[r])+t,n=67108863&i;i>>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},n._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return g[e]=t,t},M.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){r(!(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new n(1)).iushrn(2);return this.pow(e,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,h).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,o),c=this.pow(e,o.addn(1).iushrn(1)),d=this.pow(e,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var y=this.pow(l,new n(1).iushln(p-g-1));c=c.redMul(y),l=y.redSqr(),d=d.redMul(l),p=g}return c},M.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},M.prototype.pow=function(e,t){if(t.isZero())return new n(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new n(1).toRed(this),r[1]=e;for(var i=2;i<r.length;i++)r[i]=this.mul(r[i-1],e);var o=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),i=t.length-1;i>=0;i--){for(var h=t.words[i],f=u-1;f>=0;f--){var l=h>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}u=26}return o},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},n.mont=function(e){return new S(e)},i(S,M),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new n(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(bn$1,bn)),bn$1.exports}function requireWithPublic(){if(hasRequiredWithPublic)return withPublic_1;hasRequiredWithPublic=1;var e=requireBn(),t=requireSafeBuffer$6().Buffer;return withPublic_1=function(r,i){return t.from(r.toRed(e.mont(i.modulus)).redPow(new e(i.publicExponent)).fromRed().toArray())}}function requirePublicEncrypt(){if(hasRequiredPublicEncrypt)return publicEncrypt;hasRequiredPublicEncrypt=1;var e=requireParseAsn1(),t=requireBrowser$b(),r=requireBrowser$a(),i=requireMgf(),n=requireXor(),o=requireBn(),s=requireWithPublic(),a=requireBrowserifyRsa(),u=requireSafeBuffer$6().Buffer;return publicEncrypt=function(h,f,l){var c;c=h.padding?h.padding:l?1:4;var d,p=e(h);if(4===c)d=function(e,s){var a=e.modulus.byteLength(),h=s.length,f=r("sha1").update(u.alloc(0)).digest(),l=f.length,c=2*l;if(h>a-c-2)throw new Error("message too long");var d=u.alloc(a-h-c-2),p=a-l-1,m=t(l),g=n(u.concat([f,d,u.alloc(1,1),s],p),i(m,p)),y=n(m,i(g,l));return new o(u.concat([u.alloc(1),y,g],a))}(p,f);else if(1===c)d=function(e,r,i){var n,s=r.length,a=e.modulus.byteLength();if(s>a-11)throw new Error("message too long");n=i?u.alloc(a-s-3,255):function(e){var r,i=u.allocUnsafe(e),n=0,o=t(2*e),s=0;for(;n<e;)s===o.length&&(o=t(2*e),s=0),(r=o[s++])&&(i[n++]=r);return i}(a-s-3);return new o(u.concat([u.from([0,i?1:2]),n,u.alloc(1),r],a))}(p,f,l);else{if(3!==c)throw new Error("unknown padding");if((d=new o(f)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return l?a(d,p):s(d,p)}}function requirePrivateDecrypt(){if(hasRequiredPrivateDecrypt)return privateDecrypt;hasRequiredPrivateDecrypt=1;var e=requireParseAsn1(),t=requireMgf(),r=requireXor(),i=requireBn(),n=requireBrowserifyRsa(),o=requireBrowser$a(),s=requireWithPublic(),a=requireSafeBuffer$6().Buffer;return privateDecrypt=function(u,h,f){var l;l=u.padding?u.padding:f?1:4;var c,d=e(u),p=d.modulus.byteLength();if(h.length>p||new i(h).cmp(d.modulus)>=0)throw new Error("decryption error");c=f?s(new i(h),d):n(h,d);var m=a.alloc(p-c.length);if(c=a.concat([m,c],p),4===l)return function(e,i){var n=e.modulus.byteLength(),s=o("sha1").update(a.alloc(0)).digest(),u=s.length;if(0!==i[0])throw new Error("decryption error");var h=i.slice(1,u+1),f=i.slice(u+1),l=r(h,t(f,u)),c=r(f,t(l,n-u-1));if(function(e,t){e=a.from(e),t=a.from(t);var r=0,i=e.length;e.length!==t.length&&(r++,i=Math.min(e.length,t.length));var n=-1;for(;++n<i;)r+=e[n]^t[n];return r}(s,c.slice(0,u)))throw new Error("decryption error");var d=u;for(;0===c[d];)d++;if(1!==c[d++])throw new Error("decryption error");return c.slice(d)}(d,c);if(1===l)return function(e,t,r){var i=t.slice(0,2),n=2,o=0;for(;0!==t[n++];)if(n>=t.length){o++;break}var s=t.slice(2,n-1);("0002"!==i.toString("hex")&&!r||"0001"!==i.toString("hex")&&r)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(n)}(0,c,f);if(3===l)return c;throw new Error("unknown padding")}}function requireBrowser$2(){return hasRequiredBrowser$2||(hasRequiredBrowser$2=1,(e=browser$2).publicEncrypt=requirePublicEncrypt(),e.privateDecrypt=requirePrivateDecrypt(),e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}),browser$2;var e}var browser$1={},hasRequiredBrowser$1,hasRequiredCryptoBrowserify;function requireBrowser$1(){if(hasRequiredBrowser$1)return browser$1;function e(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}hasRequiredBrowser$1=1;var t=requireSafeBuffer$6(),r=requireBrowser$b(),i=t.Buffer,n=t.kMaxLength,o=commonjsGlobal.crypto||commonjsGlobal.msCrypto,s=Math.pow(2,32)-1;function a(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>s||e<0)throw new TypeError("offset must be a uint32");if(e>n||e>t)throw new RangeError("offset out of range")}function u(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>s||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>n)throw new RangeError("buffer too small")}function h(e,t,i,n){if(process$1.browser){var s=e.buffer,a=new Uint8Array(s,t,i);return o.getRandomValues(a),n?void process$1.nextTick((function(){n(null,e)})):e}if(!n)return r(i).copy(e,t),e;r(i,(function(r,i){if(r)return n(r);i.copy(e,t),n(null,e)}))}return o&&o.getRandomValues||!process$1.browser?(browser$1.randomFill=function(e,t,r,n){if(!(i.isBuffer(e)||e instanceof commonjsGlobal.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)n=t,t=0,r=e.length;else if("function"==typeof r)n=r,r=e.length-t;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return a(t,e.length),u(r,t,e.length),h(e,t,r,n)},browser$1.randomFillSync=function(e,t,r){void 0===t&&(t=0);if(!(i.isBuffer(e)||e instanceof commonjsGlobal.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');a(t,e.length),void 0===r&&(r=e.length-t);return u(r,t,e.length),h(e,t,r)}):(browser$1.randomFill=e,browser$1.randomFillSync=e),browser$1}function requireCryptoBrowserify(){if(hasRequiredCryptoBrowserify)return cryptoBrowserify;hasRequiredCryptoBrowserify=1,cryptoBrowserify.randomBytes=cryptoBrowserify.rng=cryptoBrowserify.pseudoRandomBytes=cryptoBrowserify.prng=requireBrowser$b(),cryptoBrowserify.createHash=cryptoBrowserify.Hash=requireBrowser$a(),cryptoBrowserify.createHmac=cryptoBrowserify.Hmac=requireBrowser$9();var e=requireAlgos(),t=Object.keys(e),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(t);cryptoBrowserify.getHashes=function(){return r};var i=requireBrowser$8();cryptoBrowserify.pbkdf2=i.pbkdf2,cryptoBrowserify.pbkdf2Sync=i.pbkdf2Sync;var n=requireBrowser$6();cryptoBrowserify.Cipher=n.Cipher,cryptoBrowserify.createCipher=n.createCipher,cryptoBrowserify.Cipheriv=n.Cipheriv,cryptoBrowserify.createCipheriv=n.createCipheriv,cryptoBrowserify.Decipher=n.Decipher,cryptoBrowserify.createDecipher=n.createDecipher,cryptoBrowserify.Decipheriv=n.Decipheriv,cryptoBrowserify.createDecipheriv=n.createDecipheriv,cryptoBrowserify.getCiphers=n.getCiphers,cryptoBrowserify.listCiphers=n.listCiphers;var o=requireBrowser$5();cryptoBrowserify.DiffieHellmanGroup=o.DiffieHellmanGroup,cryptoBrowserify.createDiffieHellmanGroup=o.createDiffieHellmanGroup,cryptoBrowserify.getDiffieHellman=o.getDiffieHellman,cryptoBrowserify.createDiffieHellman=o.createDiffieHellman,cryptoBrowserify.DiffieHellman=o.DiffieHellman;var s=requireBrowser$4();cryptoBrowserify.createSign=s.createSign,cryptoBrowserify.Sign=s.Sign,cryptoBrowserify.createVerify=s.createVerify,cryptoBrowserify.Verify=s.Verify,cryptoBrowserify.createECDH=requireBrowser$3();var a=requireBrowser$2();cryptoBrowserify.publicEncrypt=a.publicEncrypt,cryptoBrowserify.privateEncrypt=a.privateEncrypt,cryptoBrowserify.publicDecrypt=a.publicDecrypt,cryptoBrowserify.privateDecrypt=a.privateDecrypt;var u=requireBrowser$1();return cryptoBrowserify.randomFill=u.randomFill,cryptoBrowserify.randomFillSync=u.randomFillSync,cryptoBrowserify.createCredentials=function(){throw new Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/browserify/crypto-browserify")},cryptoBrowserify.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},cryptoBrowserify}var core=core$1.exports,hasRequiredCore;function requireCore(){return hasRequiredCore||(hasRequiredCore=1,core$1.exports=(e=e||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==commonjsGlobal&&commonjsGlobal.crypto&&(r=commonjsGlobal.crypto),!r&&"function"==typeof commonjsRequire)try{r=requireCryptoBrowserify()}catch(e){}var i=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},s=o.lib={},a=s.Base=function(){return{extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),u=s.WordArray=a.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,r=e.words,i=this.sigBytes,n=e.sigBytes;if(this.clamp(),i%4)for(var o=0;o<n;o++){var s=r[o>>>2]>>>24-o%4*8&255;t[i+o>>>2]|=s<<24-(i+o)%4*8}else for(var a=0;a<n;a+=4)t[i+a>>>2]=r[a>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(i());return new u.init(t,e)}}),h=o.enc={},f=h.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],n=0;n<r;n++){var o=t[n>>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i<t;i+=2)r[i>>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new u.init(r,t/2)}},l=h.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],n=0;n<r;n++){var o=t[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i<t;i++)r[i>>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new u.init(r,t)}},c=h.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,i=this._data,n=i.words,o=i.sigBytes,s=this.blockSize,a=o/(4*s),h=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,f=e.min(4*h,o);if(h){for(var l=0;l<h;l+=s)this._doProcessBlock(n,l);r=n.splice(0,h),i.sigBytes-=f}return new u.init(r,f)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=d.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new p.HMAC.init(e,r).finalize(t)}}});var p=o.algo={};return o}(Math),e)),core$1.exports;var e}var encBase64$1={exports:{}},encBase64=encBase64$1.exports,hasRequiredEncBase64;function requireEncBase64(){return hasRequiredEncBase64||(hasRequiredEncBase64=1,encBase64$1.exports=(e=requireCore(),function(){var t=e,r=t.lib.WordArray;function i(e,t,i){for(var n=[],o=0,s=0;s<t;s++)if(s%4){var a=i[e.charCodeAt(s-1)]<<s%4*2|i[e.charCodeAt(s)]>>>6-s%4*2;n[o>>>2]|=a<<24-o%4*8,o++}return r.create(n,o)}t.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,i=this._map;e.clamp();for(var n=[],o=0;o<r;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<r;a++)n.push(i.charAt(s>>>6*(3-a)&63));var u=i.charAt(64);if(u)for(;n.length%4;)n.push(u);return n.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o<r.length;o++)n[r.charCodeAt(o)]=o}var s=r.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return i(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64)),encBase64$1.exports;var e}var md5$1={exports:{}},md5=md5$1.exports,hasRequiredMd5;function requireMd5(){return hasRequiredMd5||(hasRequiredMd5=1,md5$1.exports=(e=requireCore(),function(t){var r=e,i=r.lib,n=i.WordArray,o=i.Hasher,s=r.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var i=t+r,n=e[i];e[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o=this._hash.words,s=e[t+0],u=e[t+1],d=e[t+2],p=e[t+3],m=e[t+4],g=e[t+5],y=e[t+6],b=e[t+7],v=e[t+8],w=e[t+9],_=e[t+10],M=e[t+11],S=e[t+12],E=e[t+13],R=e[t+14],q=e[t+15],A=o[0],C=o[1],P=o[2],I=o[3];A=h(A,C,P,I,s,7,a[0]),I=h(I,A,C,P,u,12,a[1]),P=h(P,I,A,C,d,17,a[2]),C=h(C,P,I,A,p,22,a[3]),A=h(A,C,P,I,m,7,a[4]),I=h(I,A,C,P,g,12,a[5]),P=h(P,I,A,C,y,17,a[6]),C=h(C,P,I,A,b,22,a[7]),A=h(A,C,P,I,v,7,a[8]),I=h(I,A,C,P,w,12,a[9]),P=h(P,I,A,C,_,17,a[10]),C=h(C,P,I,A,M,22,a[11]),A=h(A,C,P,I,S,7,a[12]),I=h(I,A,C,P,E,12,a[13]),P=h(P,I,A,C,R,17,a[14]),A=f(A,C=h(C,P,I,A,q,22,a[15]),P,I,u,5,a[16]),I=f(I,A,C,P,y,9,a[17]),P=f(P,I,A,C,M,14,a[18]),C=f(C,P,I,A,s,20,a[19]),A=f(A,C,P,I,g,5,a[20]),I=f(I,A,C,P,_,9,a[21]),P=f(P,I,A,C,q,14,a[22]),C=f(C,P,I,A,m,20,a[23]),A=f(A,C,P,I,w,5,a[24]),I=f(I,A,C,P,R,9,a[25]),P=f(P,I,A,C,p,14,a[26]),C=f(C,P,I,A,v,20,a[27]),A=f(A,C,P,I,E,5,a[28]),I=f(I,A,C,P,d,9,a[29]),P=f(P,I,A,C,b,14,a[30]),A=l(A,C=f(C,P,I,A,S,20,a[31]),P,I,g,4,a[32]),I=l(I,A,C,P,v,11,a[33]),P=l(P,I,A,C,M,16,a[34]),C=l(C,P,I,A,R,23,a[35]),A=l(A,C,P,I,u,4,a[36]),I=l(I,A,C,P,m,11,a[37]),P=l(P,I,A,C,b,16,a[38]),C=l(C,P,I,A,_,23,a[39]),A=l(A,C,P,I,E,4,a[40]),I=l(I,A,C,P,s,11,a[41]),P=l(P,I,A,C,p,16,a[42]),C=l(C,P,I,A,y,23,a[43]),A=l(A,C,P,I,w,4,a[44]),I=l(I,A,C,P,S,11,a[45]),P=l(P,I,A,C,q,16,a[46]),A=c(A,C=l(C,P,I,A,d,23,a[47]),P,I,s,6,a[48]),I=c(I,A,C,P,b,10,a[49]),P=c(P,I,A,C,R,15,a[50]),C=c(C,P,I,A,g,21,a[51]),A=c(A,C,P,I,S,6,a[52]),I=c(I,A,C,P,p,10,a[53]),P=c(P,I,A,C,_,15,a[54]),C=c(C,P,I,A,u,21,a[55]),A=c(A,C,P,I,v,6,a[56]),I=c(I,A,C,P,q,10,a[57]),P=c(P,I,A,C,y,15,a[58]),C=c(C,P,I,A,E,21,a[59]),A=c(A,C,P,I,m,6,a[60]),I=c(I,A,C,P,M,10,a[61]),P=c(P,I,A,C,d,15,a[62]),C=c(C,P,I,A,w,21,a[63]),o[0]=o[0]+A|0,o[1]=o[1]+C|0,o[2]=o[2]+P|0,o[3]=o[3]+I|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;r[n>>>5]|=128<<24-n%32;var o=t.floor(i/4294967296),s=i;r[15+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(n+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,u=a.words,h=0;h<4;h++){var f=u[h];u[h]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,r,i,n,o,s){var a=e+(t&r|~t&i)+n+s;return(a<<o|a>>>32-o)+t}function f(e,t,r,i,n,o,s){var a=e+(t&i|r&~i)+n+s;return(a<<o|a>>>32-o)+t}function l(e,t,r,i,n,o,s){var a=e+(t^r^i)+n+s;return(a<<o|a>>>32-o)+t}function c(e,t,r,i,n,o,s){var a=e+(r^(t|~i))+n+s;return(a<<o|a>>>32-o)+t}r.MD5=o._createHelper(u),r.HmacMD5=o._createHmacHelper(u)}(Math),e.MD5)),md5$1.exports;var e}var evpkdf$1={exports:{}},sha1$1={exports:{}},sha1=sha1$1.exports,hasRequiredSha1;function requireSha1(){return hasRequiredSha1||(hasRequiredSha1=1,sha1$1.exports=(a=requireCore(),t=(e=a).lib,r=t.WordArray,i=t.Hasher,n=e.algo,o=[],s=n.SHA1=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,i=r[0],n=r[1],s=r[2],a=r[3],u=r[4],h=0;h<80;h++){if(h<16)o[h]=0|e[t+h];else{var f=o[h-3]^o[h-8]^o[h-14]^o[h-16];o[h]=f<<1|f>>>31}var l=(i<<5|i>>>27)+u+o[h];l+=h<20?1518500249+(n&s|~n&a):h<40?1859775393+(n^s^a):h<60?(n&s|n&a|s&a)-1894007588:(n^s^a)-899497514,u=a,a=s,s=n<<30|n>>>2,n=i,i=l}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+s|0,r[3]=r[3]+a|0,r[4]=r[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(i+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),e.SHA1=i._createHelper(s),e.HmacSHA1=i._createHmacHelper(s),a.SHA1)),sha1$1.exports;var e,t,r,i,n,o,s,a}var hmac$1={exports:{}},hmac=hmac$1.exports,hasRequiredHmac;function requireHmac(){return hasRequiredHmac||(hasRequiredHmac=1,hmac$1.exports=(e=requireCore(),r=(t=e).lib.Base,i=t.enc.Utf8,void(t.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=i.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),s=this._iKey=t.clone(),a=o.words,u=s.words,h=0;h<r;h++)a[h]^=1549556828,u[h]^=909522486;o.sigBytes=s.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})))),hmac$1.exports;var e,t,r,i}var evpkdf=evpkdf$1.exports,hasRequiredEvpkdf;function requireEvpkdf(){return hasRequiredEvpkdf||(hasRequiredEvpkdf=1,evpkdf$1.exports=(a=requireCore(),requireSha1(),requireHmac(),t=(e=a).lib,r=t.Base,i=t.WordArray,n=e.algo,o=n.MD5,s=n.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:o,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,o=n.hasher.create(),s=i.create(),a=s.words,u=n.keySize,h=n.iterations;a.length<u;){r&&o.update(r),r=o.update(e).finalize(t),o.reset();for(var f=1;f<h;f++)r=o.finalize(r),o.reset();s.concat(r)}return s.sigBytes=4*u,s}}),e.EvpKDF=function(e,t,r){return s.create(r).compute(e,t)},a.EvpKDF)),evpkdf$1.exports;var e,t,r,i,n,o,s,a}var cipherCore$1={exports:{}},cipherCore=cipherCore$1.exports,hasRequiredCipherCore;function requireCipherCore(){return hasRequiredCipherCore||(hasRequiredCipherCore=1,cipherCore$1.exports=(e=requireCore(),requireEvpkdf(),void(e.lib.Cipher||function(t){var r=e,i=r.lib,n=i.Base,o=i.WordArray,s=i.BufferedBlockAlgorithm,a=r.enc;a.Utf8;var u=a.Base64,h=r.algo.EvpKDF,f=i.Cipher=s.extend({cfg:n.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?v:y}return function(t){return{encrypt:function(r,i,n){return e(i).encrypt(t,r,i,n)},decrypt:function(r,i,n){return e(i).decrypt(t,r,i,n)}}}}()});i.StreamCipher=f.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=r.mode={},c=i.BlockCipherMode=n.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),d=l.CBC=function(){var e=c.extend();function r(e,r,i){var n,o=this._iv;o?(n=o,this._iv=t):n=this._prevBlock;for(var s=0;s<i;s++)e[r+s]^=n[s]}return e.Encryptor=e.extend({processBlock:function(e,t){var i=this._cipher,n=i.blockSize;r.call(this,e,t,n),i.encryptBlock(e,t),this._prevBlock=e.slice(t,t+n)}}),e.Decryptor=e.extend({processBlock:function(e,t){var i=this._cipher,n=i.blockSize,o=e.slice(t,t+n);i.decryptBlock(e,t),r.call(this,e,t,n),this._prevBlock=o}}),e}(),p=(r.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,i=r-e.sigBytes%r,n=i<<24|i<<16|i<<8|i,s=[],a=0;a<i;a+=4)s.push(n);var u=o.create(s,i);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};i.BlockCipher=f.extend({cfg:f.cfg.extend({mode:d,padding:p}),reset:function(){var e;f.reset.call(this);var t=this.cfg,r=t.iv,i=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=i.createEncryptor:(e=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(i,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var m=i.CipherParams=n.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(r.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?o.create([1398893684,1701076831]).concat(r).concat(t):t).toString(u)},parse:function(e){var t,r=u.parse(e),i=r.words;return 1398893684==i[0]&&1701076831==i[1]&&(t=o.create(i.slice(2,4)),i.splice(0,4),r.sigBytes-=16),m.create({ciphertext:r,salt:t})}},y=i.SerializableCipher=n.extend({cfg:n.extend({format:g}),encrypt:function(e,t,r,i){i=this.cfg.extend(i);var n=e.createEncryptor(r,i),o=n.finalize(t),s=n.cfg;return m.create({ciphertext:o,key:r,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,r,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),e.createDecryptor(r,i).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),b=(r.kdf={}).OpenSSL={execute:function(e,t,r,i,n){if(i||(i=o.random(8)),n)s=h.create({keySize:t+r,hasher:n}).compute(e,i);else var s=h.create({keySize:t+r}).compute(e,i);var a=o.create(s.words.slice(t),4*r);return s.sigBytes=4*t,m.create({key:s,iv:a,salt:i})}},v=i.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:b}),encrypt:function(e,t,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,e.keySize,e.ivSize,i.salt,i.hasher);i.iv=n.iv;var o=y.encrypt.call(this,e,t,n.key,i);return o.mixIn(n),o},decrypt:function(e,t,r,i){i=this.cfg.extend(i),t=this._parse(t,i.format);var n=i.kdf.execute(r,e.keySize,e.ivSize,t.salt,i.hasher);return i.iv=n.iv,y.decrypt.call(this,e,t,n.key,i)}})}()))),cipherCore$1.exports;var e}var aes$1=aes$3.exports,hasRequiredAes;function requireAes(){return hasRequiredAes||(hasRequiredAes=1,aes$3.exports=(e=requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore(),function(){var t=e,r=t.lib.BlockCipher,i=t.algo,n=[],o=[],s=[],a=[],u=[],h=[],f=[],l=[],c=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,i=0;for(t=0;t<256;t++){var p=i^i<<1^i<<2^i<<3^i<<4;p=p>>>8^255&p^99,n[r]=p,o[p]=r;var m=e[r],g=e[m],y=e[g],b=257*e[p]^16843008*p;s[r]=b<<24|b>>>8,a[r]=b<<16|b>>>16,u[r]=b<<8|b>>>24,h[r]=b,b=16843009*y^65537*g^257*m^16843008*r,f[p]=b<<24|b>>>8,l[p]=b<<16|b>>>16,c[p]=b<<8|b>>>24,d[p]=b,r?(r=m^e[e[e[y^m]]],i^=e[e[i]]):r=i=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=i.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,i=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],s=0;s<i;s++)s<r?o[s]=t[s]:(h=o[s-1],s%r?r>6&&s%r==4&&(h=n[h>>>24]<<24|n[h>>>16&255]<<16|n[h>>>8&255]<<8|n[255&h]):(h=n[(h=h<<8|h>>>24)>>>24]<<24|n[h>>>16&255]<<16|n[h>>>8&255]<<8|n[255&h],h^=p[s/r|0]<<24),o[s]=o[s-r]^h);for(var a=this._invKeySchedule=[],u=0;u<i;u++){if(s=i-u,u%4)var h=o[s];else h=o[s-4];a[u]=u<4||s<=4?h:f[n[h>>>24]]^l[n[h>>>16&255]]^c[n[h>>>8&255]]^d[n[255&h]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,h,n)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,f,l,c,d,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,i,n,o,s,a){for(var u=this._nRounds,h=e[t]^r[0],f=e[t+1]^r[1],l=e[t+2]^r[2],c=e[t+3]^r[3],d=4,p=1;p<u;p++){var m=i[h>>>24]^n[f>>>16&255]^o[l>>>8&255]^s[255&c]^r[d++],g=i[f>>>24]^n[l>>>16&255]^o[c>>>8&255]^s[255&h]^r[d++],y=i[l>>>24]^n[c>>>16&255]^o[h>>>8&255]^s[255&f]^r[d++],b=i[c>>>24]^n[h>>>16&255]^o[f>>>8&255]^s[255&l]^r[d++];h=m,f=g,l=y,c=b}m=(a[h>>>24]<<24|a[f>>>16&255]<<16|a[l>>>8&255]<<8|a[255&c])^r[d++],g=(a[f>>>24]<<24|a[l>>>16&255]<<16|a[c>>>8&255]<<8|a[255&h])^r[d++],y=(a[l>>>24]<<24|a[c>>>16&255]<<16|a[h>>>8&255]<<8|a[255&f])^r[d++],b=(a[c>>>24]<<24|a[h>>>16&255]<<16|a[f>>>8&255]<<8|a[255&l])^r[d++],e[t]=m,e[t+1]=g,e[t+2]=y,e[t+3]=b},keySize:8});t.AES=r._createHelper(m)}(),e.AES)),aes$3.exports;var e}var aesExports=requireAes();const aes=getDefaultExportFromCjs(aesExports),__CJS__import__1__$1=_mergeNamespaces({__proto__:null,default:aes},[aesExports]);var encUtf8$2={exports:{}},encUtf8$1=encUtf8$2.exports,hasRequiredEncUtf8;function requireEncUtf8(){return hasRequiredEncUtf8||(hasRequiredEncUtf8=1,encUtf8$2.exports=requireCore().enc.Utf8),encUtf8$2.exports}var encUtf8Exports=requireEncUtf8();const encUtf8=getDefaultExportFromCjs(encUtf8Exports),__CJS__import__2__=_mergeNamespaces({__proto__:null,default:encUtf8},[encUtf8Exports]);let AES,ENC;AES=aes||__CJS__import__1__$1,ENC=encUtf8||__CJS__import__2__;const CryptoController={encrypt:(e,t)=>AES.encrypt(JSON.stringify(e),t).toString(),decrypt:(e,t)=>AES.decrypt(e,t).toString(ENC)};function canBeSerialized(e){if(!(e instanceof CoreManager.getParseObject()))return!0;const t=e.attributes;for(const e in t){if(!canBeSerializedHelper(t[e]))return!1}return!0}function canBeSerializedHelper(e){if("object"!=typeof e)return!0;if(e instanceof ParseRelation)return!0;if(e instanceof CoreManager.getParseObject())return!!e.id;if(e instanceof ParseFile)return!!e.url();if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(!canBeSerializedHelper(e[t]))return!1;return!0}for(const t in e)if(!canBeSerializedHelper(e[t]))return!1;return!0}const encoded={"&":"&","<":"<",">":">","/":"/","'":"'",'"':"""};function escape$1(e){return e.replace(/[&<>\/'"]/g,(function(e){return encoded[e]}))}function parseDate(e){const t=new RegExp("^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2})T([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})(.([0-9]+))?Z$").exec(e);if(!t)return null;const r=parseInt(t[1])||0,i=(parseInt(t[2])||1)-1,n=parseInt(t[3])||0,o=parseInt(t[4])||0,s=parseInt(t[5])||0,a=parseInt(t[6])||0,u=parseInt(t[8])||0;return new Date(Date.UTC(r,i,n,o,s,a,u))}function resolvingPromise(){let e,t;const r=new Promise(((r,i)=>{e=r,t=i}));return r.resolve=e,r.reject=t,r}function when(e){let t;const r=Array.isArray(e);t=r?e:arguments;let i=t.length,n=!1;const o=[],s=r?[o]:o,a=[];if(o.length=t.length,a.length=t.length,0===i)return Promise.resolve(s);const u=resolvingPromise(),h=function(){i--,i<=0&&(n?u.reject(a):u.resolve(s))},f=function(e,t){e&&"function"==typeof e.then?e.then((function(e){o[t]=e,h()}),(function(e){a[t]=e,n=!0,h()})):(o[t]=e,h())};for(let e=0;e<t.length;e++)f(t[e],e);return u}function continueWhile(e,t){return e()?t().then((()=>continueWhile(e,t))):Promise.resolve()}const DEFAULT_PIN="_default",PIN_PREFIX="parsePin_",OBJECT_PREFIX="Parse_LDS_";function isLocalDatastoreKey(e){return!(!e||e!==DEFAULT_PIN&&!e.startsWith(PIN_PREFIX)&&!e.startsWith(OBJECT_PREFIX))}for(var byteToHex=[],i=0,getRandomValues;i<256;++i)byteToHex.push((i+256).toString(16).slice(1));function unsafeStringify(e,t=0){return(byteToHex[e[t+0]]+byteToHex[e[t+1]]+byteToHex[e[t+2]]+byteToHex[e[t+3]]+"-"+byteToHex[e[t+4]]+byteToHex[e[t+5]]+"-"+byteToHex[e[t+6]]+byteToHex[e[t+7]]+"-"+byteToHex[e[t+8]]+byteToHex[e[t+9]]+"-"+byteToHex[e[t+10]]+byteToHex[e[t+11]]+byteToHex[e[t+12]]+byteToHex[e[t+13]]+byteToHex[e[t+14]]+byteToHex[e[t+15]]).toLowerCase()}var rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&!(getRandomValues="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}var randomUUID="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const native={randomUUID:randomUUID};function v4(e,t,r){if(native.randomUUID&&!t&&!e)return native.randomUUID();var i=(e=e||{}).random||(e.rng||rng)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=i[n];return t}return unsafeStringify(i)}let uuid;uuid=v4;const uuidv4=uuid;function arrayContainsObject(e,t){if(e.indexOf(t)>-1)return!0;const r=CoreManager.getParseObject();for(let i=0;i<e.length;i++)if(e[i]instanceof r&&e[i].className===t.className&&e[i]._getId()===t._getId())return!0;return!1}function unique(e){const t=[];return e.forEach((e=>{e instanceof CoreManager.getParseObject()?arrayContainsObject(t,e)||t.push(e):t.indexOf(e)<0&&t.push(e)})),t}function opFromJSON(e){if(!e||!e.__op)return null;switch(e.__op){case"Delete":return new UnsetOp;case"Increment":return new IncrementOp(e.amount);case"Add":return new AddOp(decode(e.objects));case"AddUnique":return new AddUniqueOp(decode(e.objects));case"Remove":return new RemoveOp(decode(e.objects));case"AddRelation":{const t=decode(e.objects);return Array.isArray(t)?new RelationOp(t,[]):new RelationOp([],[])}case"RemoveRelation":{const t=decode(e.objects);return Array.isArray(t)?new RelationOp([],t):new RelationOp([],[])}case"Batch":{let t=[],r=[];for(let i=0;i<e.ops.length;i++)"AddRelation"===e.ops[i].__op?t=t.concat(decode(e.ops[i].objects)):"RemoveRelation"===e.ops[i].__op&&(r=r.concat(decode(e.ops[i].objects)));return new RelationOp(t,r)}}return null}class Op{applyTo(e){}mergeWith(e){}toJSON(e){}}class SetOp extends Op{constructor(e){super(),this._value=e}applyTo(){return this._value}mergeWith(){return new SetOp(this._value)}toJSON(e){return encode$1(this._value,!1,!0,void 0,e)}}class UnsetOp extends Op{applyTo(){}mergeWith(){return new UnsetOp}toJSON(){return{__op:"Delete"}}}class IncrementOp extends Op{constructor(e){if(super(),"number"!=typeof e)throw new TypeError("Increment Op must be initialized with a numeric amount.");this._amount=e}applyTo(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}mergeWith(e){if(!e)return this;if(e instanceof SetOp)return new SetOp(this.applyTo(e._value));if(e instanceof UnsetOp)return new SetOp(this._amount);if(e instanceof IncrementOp)return new IncrementOp(this.applyTo(e._amount));throw new Error("Cannot merge Increment Op with the previous Op")}toJSON(){return{__op:"Increment",amount:this._amount}}}class AddOp extends Op{constructor(e){super(),this._value=Array.isArray(e)?e:[e]}applyTo(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")}mergeWith(e){if(!e)return this;if(e instanceof SetOp)return new SetOp(this.applyTo(e._value));if(e instanceof UnsetOp)return new SetOp(this._value);if(e instanceof AddOp)return new AddOp(this.applyTo(e._value));throw new Error("Cannot merge Add Op with the previous Op")}toJSON(){return{__op:"Add",objects:encode$1(this._value,!1,!0)}}}class AddUniqueOp extends Op{constructor(e){super(),this._value=unique(Array.isArray(e)?e:[e])}applyTo(e){if(null==e)return this._value||[];if(Array.isArray(e)){const t=CoreManager.getParseObject(),r=[];return this._value.forEach((i=>{i instanceof t?arrayContainsObject(e,i)||r.push(i):e.indexOf(i)<0&&r.push(i)})),e.concat(r)}throw new Error("Cannot add elements to a non-array value")}mergeWith(e){if(!e)return this;if(e instanceof SetOp)return new SetOp(this.applyTo(e._value));if(e instanceof UnsetOp)return new SetOp(this._value);if(e instanceof AddUniqueOp)return new AddUniqueOp(this.applyTo(e._value));throw new Error("Cannot merge AddUnique Op with the previous Op")}toJSON(){return{__op:"AddUnique",objects:encode$1(this._value,!1,!0)}}}class RemoveOp extends Op{constructor(e){super(),this._value=unique(Array.isArray(e)?e:[e])}applyTo(e){if(null==e)return[];if(Array.isArray(e)){const t=CoreManager.getParseObject(),r=e.concat([]);for(let e=0;e<this._value.length;e++){let i=r.indexOf(this._value[e]);for(;i>-1;)r.splice(i,1),i=r.indexOf(this._value[e]);if(this._value[e]instanceof t&&this._value[e].id)for(let i=0;i<r.length;i++)r[i]instanceof t&&this._value[e].id===r[i].id&&(r.splice(i,1),i--)}return r}throw new Error("Cannot remove elements from a non-array value")}mergeWith(e){if(!e)return this;if(e instanceof SetOp)return new SetOp(this.applyTo(e._value));if(e instanceof UnsetOp)return new UnsetOp;if(e instanceof RemoveOp){const t=CoreManager.getParseObject(),r=e._value.concat([]);for(let e=0;e<this._value.length;e++)this._value[e]instanceof t?arrayContainsObject(r,this._value[e])||r.push(this._value[e]):r.indexOf(this._value[e])<0&&r.push(this._value[e]);return new RemoveOp(r)}throw new Error("Cannot merge Remove Op with the previous Op")}toJSON(){return{__op:"Remove",objects:encode$1(this._value,!1,!0)}}}class RelationOp extends Op{constructor(e,t){super(),this._targetClassName=null,Array.isArray(e)&&(this.relationsToAdd=unique(e.map(this._extractId,this))),Array.isArray(t)&&(this.relationsToRemove=unique(t.map(this._extractId,this)))}_extractId(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}applyTo(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");const e=new ParseRelation(t,r);return e.targetClassName=this._targetClassName,e}if(e instanceof ParseRelation){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")}mergeWith(e){if(!e)return this;if(e instanceof UnsetOp)throw new Error("You cannot modify a relation after deleting it.");if(e instanceof SetOp&&e._value instanceof ParseRelation)return this;if(e instanceof RelationOp){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.");const t=e.relationsToAdd.concat([]);this.relationsToRemove.forEach((e=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)})),this.relationsToAdd.forEach((e=>{t.indexOf(e)<0&&t.push(e)}));const r=e.relationsToRemove.concat([]);this.relationsToAdd.forEach((e=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)})),this.relationsToRemove.forEach((e=>{r.indexOf(e)<0&&r.push(e)}));const i=new RelationOp(t,r);return i._targetClassName=this._targetClassName,i}throw new Error("Cannot merge Relation Op with the previous Op")}toJSON(){const e=e=>({__type:"Pointer",className:this._targetClassName,objectId:e});let t=null,r=null,i=null;return this.relationsToAdd.length>0&&(t=this.relationsToAdd.map(e),r={__op:"AddRelation",objects:t}),this.relationsToRemove.length>0&&(t=this.relationsToRemove.map(e),i={__op:"RemoveRelation",objects:t}),r&&i?{__op:"Batch",ops:[r,i]}:r||i||{}}}CoreManager.setParseOp({Op:Op,opFromJSON:opFromJSON,SetOp:SetOp,UnsetOp:UnsetOp,IncrementOp:IncrementOp,AddOp:AddOp,RelationOp:RelationOp,RemoveOp:RemoveOp,AddUniqueOp:AddUniqueOp});class TaskQueue{constructor(){this.queue=[]}enqueue(e){const t=resolvingPromise();return this.queue.push({task:e,_completion:t}),1===this.queue.length&&e().then((()=>{this._dequeue(),t.resolve()}),(e=>{this._dequeue(),t.reject(e)})),t}_dequeue(){if(this.queue.shift(),this.queue.length){const e=this.queue[0];e.task().then((()=>{this._dequeue(),e._completion.resolve()}),(t=>{this._dequeue(),e._completion.reject(t)}))}}}function defaultState(){return{serverData:{},pendingOps:[{}],objectCache:{},tasks:new TaskQueue,existed:!1}}function setServerData$2(e,t){for(const r in t)void 0!==t[r]?e[r]=t[r]:delete e[r]}function setPendingOp$2(e,t,r){const i=e.length-1;r?e[i][t]=r:delete e[i][t]}function pushPendingState$2(e){e.push({})}function popPendingState$2(e){const t=e.shift();return e.length||(e[0]={}),t}function mergeFirstPendingState$2(e){const t=popPendingState$2(e),r=e[0];for(const e in t)if(r[e]&&t[e]){const i=r[e].mergeWith(t[e]);i&&(r[e]=i)}else r[e]=t[e]}function estimateAttribute$2(e,t,r,i){let n=e[i];for(let e=0;e<t.length;e++)t[e][i]&&(t[e][i]instanceof RelationOp?r.id&&(n=t[e][i].applyTo(n,r,i)):n=t[e][i].applyTo(n));return n}function estimateAttributes$2(e,t,r){const i={};let n;for(n in e)i[n]=e[n];for(let e=0;e<t.length;e++)for(n in t[e])if(t[e][n]instanceof RelationOp)r.id&&(i[n]=t[e][n].applyTo(i[n],r,n));else if(n.includes(".")){const r=n.split("."),o=r[r.length-1];let s=i;for(let e=0;e<r.length-1;e++){const t=r[e];if(t in s)Array.isArray(s[t])?s[t]=[...s[t]]:s[t]={...s[t]};else{const i=r[e+1];isNaN(i)?s[t]={}:s[t]=[]}s=s[t]}s[o]=t[e][n].applyTo(s[o])}else i[n]=t[e][n].applyTo(i[n]);return i}function nestedSet(e,t,r){const i=t.split(".");for(let t=0;t<i.length-1;t++){const r=i[t];if(!(r in e)){const n=i[t+1];isNaN(n)?e[r]={}:e[r]=[]}e=e[r]}void 0===r?delete e[i[i.length-1]]:e[i[i.length-1]]=r}function commitServerChanges$2(e,t,r){const i=CoreManager.getParseObject();for(const n in r){const o=r[n];if(nestedSet(e,n,o),o&&"object"==typeof o&&!(o instanceof i)&&!(o instanceof ParseFile)&&!(o instanceof ParseRelation)){const e=encode$1(o,!1,!0);t[n]=JSON.stringify(e)}}}let objectState$1={};function getState$1(e){const t=objectState$1[e.className];return t&&t[e.id]||null}function initializeState$1(e,t){let r=getState$1(e);return r||(objectState$1[e.className]||(objectState$1[e.className]={}),t||(t=defaultState()),r=objectState$1[e.className][e.id]=t,r)}function removeState$1(e){const t=getState$1(e);return null===t?null:(delete objectState$1[e.className][e.id],t)}function getServerData$1(e){const t=getState$1(e);return t?t.serverData:{}}function setServerData$1(e,t){setServerData$2(initializeState$1(e).serverData,t)}function getPendingOps$1(e){const t=getState$1(e);return t?t.pendingOps:[{}]}function setPendingOp$1(e,t,r){setPendingOp$2(initializeState$1(e).pendingOps,t,r)}function pushPendingState$1(e){pushPendingState$2(initializeState$1(e).pendingOps)}function popPendingState$1(e){return popPendingState$2(initializeState$1(e).pendingOps)}function mergeFirstPendingState$1(e){mergeFirstPendingState$2(getPendingOps$1(e))}function getObjectCache$1(e){const t=getState$1(e);return t?t.objectCache:{}}function estimateAttribute$1(e,t){return estimateAttribute$2(getServerData$1(e),getPendingOps$1(e),e,t)}function estimateAttributes$1(e){return estimateAttributes$2(getServerData$1(e),getPendingOps$1(e),e)}function commitServerChanges$1(e,t){const r=initializeState$1(e);commitServerChanges$2(r.serverData,r.objectCache,t)}function enqueueTask$1(e,t){return initializeState$1(e).tasks.enqueue(t)}function clearAllState$1(){objectState$1={}}function duplicateState$1(e,t){t.id=e.id}const SingleInstanceStateController=Object.freeze(Object.defineProperty({__proto__:null,clearAllState:clearAllState$1,commitServerChanges:commitServerChanges$1,duplicateState:duplicateState$1,enqueueTask:enqueueTask$1,estimateAttribute:estimateAttribute$1,estimateAttributes:estimateAttributes$1,getObjectCache:getObjectCache$1,getPendingOps:getPendingOps$1,getServerData:getServerData$1,getState:getState$1,initializeState:initializeState$1,mergeFirstPendingState:mergeFirstPendingState$1,popPendingState:popPendingState$1,pushPendingState:pushPendingState$1,removeState:removeState$1,setPendingOp:setPendingOp$1,setServerData:setServerData$1},Symbol.toStringTag,{value:"Module"}));let objectState=new WeakMap;function getState(e){return objectState.get(e)||null}function initializeState(e,t){let r=getState(e);return r||(t||(t={serverData:{},pendingOps:[{}],objectCache:{},tasks:new TaskQueue,existed:!1}),r=t,objectState.set(e,r),r)}function removeState(e){const t=getState(e);return null===t?null:(objectState.delete(e),t)}function getServerData(e){const t=getState(e);return t?t.serverData:{}}function setServerData(e,t){setServerData$2(initializeState(e).serverData,t)}function getPendingOps(e){const t=getState(e);return t?t.pendingOps:[{}]}function setPendingOp(e,t,r){setPendingOp$2(initializeState(e).pendingOps,t,r)}function pushPendingState(e){pushPendingState$2(initializeState(e).pendingOps)}function popPendingState(e){return popPendingState$2(initializeState(e).pendingOps)}function mergeFirstPendingState(e){mergeFirstPendingState$2(getPendingOps(e))}function getObjectCache(e){const t=getState(e);return t?t.objectCache:{}}function estimateAttribute(e,t){return estimateAttribute$2(getServerData(e),getPendingOps(e),e,t)}function estimateAttributes(e){return estimateAttributes$2(getServerData(e),getPendingOps(e),e)}function commitServerChanges(e,t){const r=initializeState(e);commitServerChanges$2(r.serverData,r.objectCache,t)}function enqueueTask(e,t){return initializeState(e).tasks.enqueue(t)}function duplicateState(e,t){const r=initializeState(e),i=initializeState(t);for(const e in r.serverData)i.serverData[e]=r.serverData[e];for(let e=0;e<r.pendingOps.length;e++)for(const t in r.pendingOps[e])i.pendingOps[e][t]=r.pendingOps[e][t];for(const e in r.objectCache)i.objectCache[e]=r.objectCache[e];i.existed=r.existed}function clearAllState(){objectState=new WeakMap}const UniqueInstanceStateController=Object.freeze(Object.defineProperty({__proto__:null,clearAllState:clearAllState,commitServerChanges:commitServerChanges,duplicateState:duplicateState,enqueueTask:enqueueTask,estimateAttribute:estimateAttribute,estimateAttributes:estimateAttributes,getObjectCache:getObjectCache,getPendingOps:getPendingOps,getServerData:getServerData,getState:getState,initializeState:initializeState,mergeFirstPendingState:mergeFirstPendingState,popPendingState:popPendingState,pushPendingState:pushPendingState,removeState:removeState,setPendingOp:setPendingOp,setServerData:setServerData},Symbol.toStringTag,{value:"Module"}));function unsavedChildren(e,t){const r={objects:{},files:[]},i=e.className+":"+e._getId();r.objects[i]=!e.dirty()||e;const n=e.attributes;for(const e in n)"object"==typeof n[e]&&traverse(n[e],r,!1,!!t);const o=[];for(const e in r.objects)e!==i&&!0!==r.objects[e]&&o.push(r.objects[e]);return o.concat(r.files)}function traverse(e,t,r,i){if(e instanceof CoreManager.getParseObject()){if(!e.id&&r)throw new Error("Cannot create a pointer to an unsaved Object.");const n=e.className+":"+e._getId();if(!t.objects[n]){t.objects[n]=!e.dirty()||e;const r=e.attributes;for(const e in r)"object"==typeof r[e]&&traverse(r[e],t,!i,i)}}else if(e instanceof ParseFile)!e.url()&&t.files.indexOf(e)<0&&t.files.push(e);else if(!(e instanceof ParseRelation)){Array.isArray(e)&&e.forEach((e=>{"object"==typeof e&&traverse(e,t,r,i)}));for(const n in e)"object"==typeof e[n]&&traverse(e[n],t,r,i)}}const classMap={};let objectCount=0,singleInstance=!CoreManager.get("IS_NODE");function getServerUrlPath(){let e=CoreManager.get("SERVER_URL");"/"!==e[e.length-1]&&(e+="/");const t=e.replace(/https?:\/\//,"");return t.substr(t.indexOf("/"))}singleInstance?CoreManager.setObjectStateController(SingleInstanceStateController):CoreManager.setObjectStateController(UniqueInstanceStateController);class ParseObject{constructor(e,t,r){"function"==typeof this.initialize&&this.initialize.apply(this,arguments);let i=null;if(this._objCount=objectCount++,"string"==typeof e)this.className=e,t&&"object"==typeof t&&(i=t);else if(e&&"object"==typeof e){this.className=e.className,i={};for(const t in e)"className"!==t&&(i[t]=e[t]);t&&"object"==typeof t&&(r=t)}if(i)try{this.set(i,r)}catch(e){throw new Error("Can't create an invalid Parse Object")}}get attributes(){const e=CoreManager.getObjectStateController();return Object.freeze(e.estimateAttributes(this._getStateIdentifier()))}get createdAt(){return this._getServerData().createdAt}get updatedAt(){return this._getServerData().updatedAt}_getId(){if("string"==typeof this.id)return this.id;if("string"==typeof this._localId)return this._localId;const e="local"+uuidv4();return this._localId=e,e}_getStateIdentifier(){if(singleInstance){let e=this.id;return e||(e=this._getId()),{id:e,className:this.className}}return this}_getServerData(){return CoreManager.getObjectStateController().getServerData(this._getStateIdentifier())}_clearServerData(){const e=this._getServerData(),t={};for(const r in e)t[r]=void 0;CoreManager.getObjectStateController().setServerData(this._getStateIdentifier(),t)}_getPendingOps(){return CoreManager.getObjectStateController().getPendingOps(this._getStateIdentifier())}_clearPendingOps(e){const t=this._getPendingOps(),r=t[t.length-1];(e||Object.keys(r)).forEach((e=>{delete r[e]}))}_getDirtyObjectAttributes(){const e=this.attributes,t=CoreManager.getObjectStateController().getObjectCache(this._getStateIdentifier()),r={};for(const i in e){const n=e[i];if(n&&"object"==typeof n&&!(n instanceof ParseObject)&&!(n instanceof ParseFile)&&!(n instanceof ParseRelation))try{const e=encode$1(n,!1,!0),o=JSON.stringify(e);t[i]!==o&&(r[i]=n)}catch(e){r[i]=n}}return r}_toFullJSON(e,t){const r=this.toJSON(e,t);return r.__type="Object",r.className=this.className,r}_getSaveJSON(){const e=this._getPendingOps(),t=this._getDirtyObjectAttributes(),r={};let i;for(i in t){let n=!1;for(let t=0;t<e.length;t+=1)for(const r in e[t])if(r.includes(".")){if(r.split(".")[0]===i){n=!0;break}}n||(r[i]=new SetOp(t[i]).toJSON())}for(i in e[0])r[i]=e[0][i].toJSON();return r}_getSaveParams(){let e=this.id?"PUT":"POST";const t=this._getSaveJSON();let r="classes/"+this.className;return CoreManager.get("ALLOW_CUSTOM_OBJECT_ID")?this.createdAt?(e="PUT",r+="/"+this.id):(e="POST",t.objectId=this.id):this.id?r+="/"+this.id:"_User"===this.className&&(r="users"),{method:e,body:t,path:r}}_finishFetch(e){!this.id&&e.objectId&&(this.id=e.objectId);const t=CoreManager.getObjectStateController();t.initializeState(this._getStateIdentifier());const r={};for(const t in e)"ACL"===t?r[t]=new ParseACL(e[t]):"objectId"!==t&&(r[t]=decode(e[t]),r[t]instanceof ParseRelation&&r[t]._ensureParentAndKey(this,t));r.createdAt&&"string"==typeof r.createdAt&&(r.createdAt=parseDate(r.createdAt)),r.updatedAt&&"string"==typeof r.updatedAt&&(r.updatedAt=parseDate(r.updatedAt)),!r.updatedAt&&r.createdAt&&(r.updatedAt=r.createdAt),t.commitServerChanges(this._getStateIdentifier(),r)}_setExisted(e){const t=CoreManager.getObjectStateController().getState(this._getStateIdentifier());t&&(t.existed=e)}_migrateId(e){if(this._localId&&e)if(singleInstance){const t=CoreManager.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}_handleSaveResponse(e,t){const r={};let i;const n=CoreManager.getObjectStateController(),o=n.popPendingState(this._getStateIdentifier());for(i in o)o[i]instanceof RelationOp?r[i]=o[i].applyTo(void 0,this,i):i in e||(r[i]=o[i].applyTo(void 0));for(i in e)if("createdAt"!==i&&"updatedAt"!==i||"string"!=typeof e[i]){if("ACL"===i)r[i]=new ParseACL(e[i]);else if("objectId"!==i){const t=decode(e[i]);t&&Object.getPrototypeOf(t)===Object.prototype?r[i]={...this.attributes[i],...t}:r[i]=t,r[i]instanceof UnsetOp&&(r[i]=void 0)}}else r[i]=parseDate(e[i]);r.createdAt&&!r.updatedAt&&(r.updatedAt=r.createdAt),this._migrateId(e.objectId),201!==t&&this._setExisted(!0),n.commitServerChanges(this._getStateIdentifier(),r)}_handleSaveError(){CoreManager.getObjectStateController().mergeFirstPendingState(this._getStateIdentifier())}static _getClassMap(){return classMap}static _getRequestOptions(e={}){const t={},{hasOwn:r}=Object;return r(e,"useMasterKey")&&(t.useMasterKey=!!e.useMasterKey),r(e,"useMaintenanceKey")&&(t.useMaintenanceKey=!!e.useMaintenanceKey),r(e,"sessionToken")&&"string"==typeof e.sessionToken&&(t.sessionToken=e.sessionToken),r(e,"installationId")&&"string"==typeof e.installationId&&(t.installationId=e.installationId),r(e,"transaction")&&"boolean"==typeof e.transaction&&(t.transaction=e.transaction),r(e,"batchSize")&&"number"==typeof e.batchSize&&(t.batchSize=e.batchSize),r(e,"context")&&"object"==typeof e.context&&(t.context=e.context),r(e,"include")&&(t.include=ParseObject.handleIncludeOptions(e)),r(e,"usePost")&&(t.usePost=e.usePost),r(e,"json")&&(t.json=e.json),t}initialize(){}toJSON(e,t){const r=this.id?this.className+":"+this.id:this;e=e||[r];const i={},n=this.attributes;for(const r in n)"createdAt"!==r&&"updatedAt"!==r||!n[r].toJSON?i[r]=encode$1(n[r],!1,!1,e,t):i[r]=n[r].toJSON();const o=this._getPendingOps();for(const e in o[0])e.indexOf(".")<0&&(i[e]=o[0][e].toJSON(t));return this.id&&(i.objectId=this.id),i}equals(e){return this===e||e instanceof ParseObject&&this.className===e.className&&this.id===e.id&&void 0!==this.id}dirty(e){if(!this.id)return!0;const t=this._getPendingOps(),r=this._getDirtyObjectAttributes();if(e){if(Object.hasOwn(r,e))return!0;for(let r=0;r<t.length;r++)if(Object.hasOwn(t[r],e))return!0;return!1}return 0!==Object.keys(t[0]).length||0!==Object.keys(r).length}dirtyKeys(){const e=this._getPendingOps(),t={};for(let r=0;r<e.length;r++)for(const i in e[r])t[i]=!0;const r=this._getDirtyObjectAttributes();for(const e in r)t[e]=!0;return Object.keys(t)}isDataAvailable(){const e=this._getServerData();return!!Object.keys(e).length}toPointer(){if(!this.id)throw new Error("Cannot create a pointer to an unsaved ParseObject");return{__type:"Pointer",className:this.className,objectId:this.id}}toOfflinePointer(){if(!this._localId)throw new Error("Cannot create a offline pointer to a saved ParseObject");return{__type:"Object",className:this.className,_localId:this._localId}}get(e){return this.attributes[e]}relation(e){const t=this.get(e);if(t){if(!(t instanceof ParseRelation))throw new Error("Called relation() on non-relation field "+e);return t._ensureParentAndKey(this,e),t}return new ParseRelation(this,e)}escape(e){let t=this.attributes[e];if(null==t)return"";if("string"!=typeof t){if("function"!=typeof t.toString)return"";t=t.toString()}return escape$1(t)}has(e){const t=this.attributes;return!!Object.hasOwn(t,e)&&null!=t[e]}set(e,t,r){let i={};const n={};if(e&&"object"==typeof e)i=e,r=t;else{if("string"!=typeof e)return this;i[e]=t}r=r||{};let o=[];"function"==typeof this.constructor.readOnlyAttributes&&(o=o.concat(this.constructor.readOnlyAttributes()));for(const e in i)if("createdAt"!==e&&"updatedAt"!==e){if(o.indexOf(e)>-1)throw new Error("Cannot modify readonly attribute: "+e);if(r.unset)n[e]=new UnsetOp;else if(i[e]instanceof Op)n[e]=i[e];else if(i[e]&&"object"==typeof i[e]&&"string"==typeof i[e].__op)n[e]=opFromJSON(i[e]);else if("objectId"===e||"id"===e)"string"==typeof i[e]&&(this.id=i[e]);else if("ACL"!==e||"object"!=typeof i[e]||i[e]instanceof ParseACL)if(i[e]instanceof ParseRelation){const t=new ParseRelation(this,e);t.targetClassName=i[e].targetClassName,n[e]=new SetOp(t)}else n[e]=new SetOp(i[e]);else n[e]=new SetOp(new ParseACL(i[e]))}const s=this.attributes,a={};for(const e in n)n[e]instanceof RelationOp?a[e]=n[e].applyTo(s[e],this,e):n[e]instanceof UnsetOp||(a[e]=n[e].applyTo(s[e]));if(!r.ignoreValidation){const e=this.validate(a);if(e)throw e}const u=this._getPendingOps(),h=u.length-1,f=CoreManager.getObjectStateController();for(const e in n){const t=n[e].mergeWith(u[h][e]);f.setPendingOp(this._getStateIdentifier(),e,t)}return this}unset(e,t){return(t=t||{}).unset=!0,this.set(e,null,t)}increment(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 IncrementOp(t))}decrement(e,t){if(void 0===t&&(t=1),"number"!=typeof t)throw new Error("Cannot decrement by a non-numeric amount.");return this.set(e,new IncrementOp(-1*t))}add(e,t){return this.set(e,new AddOp([t]))}addAll(e,t){return this.set(e,new AddOp(t))}addUnique(e,t){return this.set(e,new AddUniqueOp([t]))}addAllUnique(e,t){return this.set(e,new AddUniqueOp(t))}remove(e,t){return this.set(e,new RemoveOp([t]))}removeAll(e,t){return this.set(e,new RemoveOp(t))}op(e){const t=this._getPendingOps();for(let r=0;r<t.length;r+=1)if(t[r][e])return t[r][e]}clone(){const e=new this.constructor(this.className);let t=this.attributes;if("function"==typeof this.constructor.readOnlyAttributes){const e=this.constructor.readOnlyAttributes()||[],r={};for(const i in t)e.indexOf(i)<0&&(r[i]=t[i]);t=r}return e.set&&e.set(t),e}newInstance(){const e=new this.constructor(this.className);if(e.id=this.id,singleInstance)return e;const t=CoreManager.getObjectStateController();return t&&t.duplicateState(this._getStateIdentifier(),e._getStateIdentifier()),e}isNew(){return!this.id}existed(){if(!this.id)return!1;const e=CoreManager.getObjectStateController().getState(this._getStateIdentifier());return!!e&&e.existed}async exists(e){if(!this.id)return!1;try{const t=new(CoreManager.getParseQuery())(this.className);return await t.get(this.id,e),!0}catch(e){if(e.code===ParseError.OBJECT_NOT_FOUND)return!1;throw e}}isValid(){return!this.validate(this.attributes)}validate(e){if(Object.hasOwn(e,"ACL")&&!(e.ACL instanceof ParseACL))return new ParseError(ParseError.OTHER_CAUSE,"ACL must be a Parse ACL.");for(const t in e)if(!/^[A-Za-z_][0-9A-Za-z_.]*$/.test(t))return new ParseError(ParseError.INVALID_KEY_NAME,`Invalid key name: ${t}`);return!1}getACL(){const e=this.get("ACL");return e instanceof ParseACL?e:null}setACL(e,t){return this.set("ACL",e,t)}revert(...e){let t;if(e.length){t=[];for(const r of e){if("string"!=typeof r)throw new Error("Parse.Object#revert expects either no, or a list of string, arguments.");t.push(r)}}this._clearPendingOps(t)}clear(){const e=this.attributes,t={};let r=["createdAt","updatedAt"];"function"==typeof this.constructor.readOnlyAttributes&&(r=r.concat(this.constructor.readOnlyAttributes()));for(const i in e)r.indexOf(i)<0&&(t[i]=!0);return this.set(t,{unset:!0})}fetch(e){const t=ParseObject._getRequestOptions(e);return CoreManager.getObjectController().fetch(this,!0,t)}fetchWithInclude(e,t){return(t=t||{}).include=e,this.fetch(t)}async saveEventually(e){try{await this.save(null,e)}catch(t){t.code===ParseError.CONNECTION_FAILED&&(await CoreManager.getEventuallyQueue().save(this,e),CoreManager.getEventuallyQueue().poll())}return this}async save(e,t,r){let i,n;"object"==typeof e||void 0===e?(i=e,"object"==typeof t&&(n=t)):(i={},i[e]=t,n=r),n=n||{},i&&this.set(i,n);const o=ParseObject._getRequestOptions(n),s=CoreManager.getObjectController(),a=!1!==n.cascadeSave?unsavedChildren(this):null;if(a&&a.length&&!0===n.transaction&&a.some((e=>e instanceof ParseObject))){const e=[],t=[];a.forEach((r=>{r instanceof ParseFile?e.push(r):t.push(r)})),t.push(this);return(e.length?s.save(e,o):Promise.resolve()).then((()=>s.save(t,o))).then((e=>e.pop()))}return await s.save(a,o),s.save(this,o)}async destroyEventually(e){try{await this.destroy(e)}catch(t){t.code===ParseError.CONNECTION_FAILED&&(await CoreManager.getEventuallyQueue().destroy(this,e),CoreManager.getEventuallyQueue().poll())}return this}destroy(e){if(!this.id)return Promise.resolve(void 0);const t=ParseObject._getRequestOptions(e);return CoreManager.getObjectController().destroy(this,t)}pin(){return ParseObject.pinAllWithName(DEFAULT_PIN,[this])}unPin(){return ParseObject.unPinAllWithName(DEFAULT_PIN,[this])}async isPinned(){const e=CoreManager.getLocalDatastore();if(!e.isEnabled)return Promise.reject("Parse.enableLocalDatastore() must be called first");const t=e.getKeyForObject(this);return(await e.fromPinWithName(t)).length>0}pinWithName(e){return ParseObject.pinAllWithName(e,[this])}unPinWithName(e){return ParseObject.unPinAllWithName(e,[this])}async fetchFromLocalDatastore(){const e=CoreManager.getLocalDatastore();if(!e.isEnabled)throw new Error("Parse.enableLocalDatastore() must be called first");const t=e.getKeyForObject(this),r=await e._serializeObject(t);if(!r)throw new Error("Cannot fetch an unsaved ParseObject");const i=ParseObject.fromJSON(r);return this._finishFetch(i.toJSON()),this}static _clearAllState(){CoreManager.getObjectStateController().clearAllState()}static fetchAll(e,t){const r=ParseObject._getRequestOptions(t);return CoreManager.getObjectController().fetch(e,!0,r)}static fetchAllWithInclude(e,t,r){return(r=r||{}).include=t,ParseObject.fetchAll(e,r)}static fetchAllIfNeededWithInclude(e,t,r){return(r=r||{}).include=t,ParseObject.fetchAllIfNeeded(e,r)}static fetchAllIfNeeded(e,t){const r=ParseObject._getRequestOptions(t);return CoreManager.getObjectController().fetch(e,!1,r)}static handleIncludeOptions(e){let t=[];return Array.isArray(e.include)?e.include.forEach((e=>{Array.isArray(e)?t=t.concat(e):t.push(e)})):t.push(e.include),t}static destroyAll(e,t){const r=ParseObject._getRequestOptions(t);return CoreManager.getObjectController().destroy(e,r)}static saveAll(e,t){const r=ParseObject._getRequestOptions(t);return CoreManager.getObjectController().save(e,r)}static createWithoutData(e){const t=new this;return t.id=e,t}static fromJSON(e,t,r){if(!e.className)throw new Error("Cannot create an object without a className");const i=classMap[e.className],n=i?new i(e.className):new ParseObject(e.className),o={};for(const t in e)"className"!==t&&"__type"!==t&&(o[t]=e[t],r&&n.set(t,e[t]));if(t){o.objectId&&(n.id=o.objectId);let e=null;"function"==typeof n._preserveFieldsOnFetch&&(e=n._preserveFieldsOnFetch()),n._clearServerData(),e&&n._finishFetch(e)}return n._finishFetch(o),e.objectId&&n._setExisted(!0),n}static registerSubclass(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?");classMap[e]=t,t.className||(t.className=e)}static unregisterSubclass(e){if("string"!=typeof e)throw new TypeError("The first argument must be a valid class name.");delete classMap[e]}static extend(e,t,r){if("string"!=typeof e){if(e&&"string"==typeof e.className)return ParseObject.extend(e.className,e,t);throw new Error("Parse.Object.extend's first argument should be the className.")}let i=e;"User"===i&&CoreManager.get("PERFORM_USER_REWRITE")&&(i="_User");let n=ParseObject.prototype;Object.hasOwn(this,"__super__")&&this.__super__&&(n=this.prototype);let o=function(e,t){if(this.className=i,this._objCount=objectCount++,"function"==typeof this.initialize&&this.initialize.apply(this,arguments),this._initializers)for(const e of this._initializers)e.apply(this,arguments);if(e&&"object"==typeof e)try{this.set(e||{},t)}catch(e){throw new Error("Can't create an invalid Parse Object")}};if(classMap[i]?o=classMap[i]:(o.extend=function(e,t,r){return"string"==typeof e?ParseObject.extend.call(o,e,t,r):ParseObject.extend.call(o,i,e,t)},o.createWithoutData=ParseObject.createWithoutData,o.className=i,o.__super__=n,o.prototype=Object.create(n,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}})),t)for(const e in t)"initialize"!==e?"className"!==e&&Object.defineProperty(o.prototype,e,{value:t[e],enumerable:!1,writable:!0,configurable:!0}):Object.defineProperty(o.prototype,"_initializers",{value:[...o.prototype._initializers||[],t[e]],enumerable:!1,writable:!0,configurable:!0});if(r)for(const e in r)"className"!==e&&Object.defineProperty(o,e,{value:r[e],enumerable:!1,writable:!0,configurable:!0});return classMap[i]=o,o}static enableSingleInstance(){singleInstance=!0,CoreManager.setObjectStateController(SingleInstanceStateController)}static disableSingleInstance(){singleInstance=!1,CoreManager.setObjectStateController(UniqueInstanceStateController)}static pinAll(e){return CoreManager.getLocalDatastore().isEnabled?ParseObject.pinAllWithName(DEFAULT_PIN,e):Promise.reject("Parse.enableLocalDatastore() must be called first")}static pinAllWithName(e,t){const r=CoreManager.getLocalDatastore();return r.isEnabled?r._handlePinAllWithName(e,t):Promise.reject("Parse.enableLocalDatastore() must be called first")}static unPinAll(e){return CoreManager.getLocalDatastore().isEnabled?ParseObject.unPinAllWithName(DEFAULT_PIN,e):Promise.reject("Parse.enableLocalDatastore() must be called first")}static unPinAllWithName(e,t){const r=CoreManager.getLocalDatastore();return r.isEnabled?r._handleUnPinAllWithName(e,t):Promise.reject("Parse.enableLocalDatastore() must be called first")}static unPinAllObjects(){const e=CoreManager.getLocalDatastore();return e.isEnabled?e.unPinWithName(DEFAULT_PIN):Promise.reject("Parse.enableLocalDatastore() must be called first")}static unPinAllObjectsWithName(e){const t=CoreManager.getLocalDatastore();return t.isEnabled?t.unPinWithName(PIN_PREFIX+e):Promise.reject("Parse.enableLocalDatastore() must be called first")}}const DefaultController$9={fetch(e,t,r){const i=CoreManager.getLocalDatastore();if(Array.isArray(e)){if(e.length<1)return Promise.resolve([]);const n=[],o=[];let s=null;const a=[];let u=null;if(e.forEach((e=>{u||(s||(s=e.className),s!==e.className&&(u=new ParseError(ParseError.INVALID_CLASS_NAME,"All objects should be of the same class")),e.id||(u=new ParseError(ParseError.MISSING_OBJECT_ID,"All objects must have an ID")),!t&&e.isDataAvailable()||(o.push(e.id),n.push(e)),a.push(e))})),u)return Promise.reject(u);const h=new(CoreManager.getParseQuery())(s);return h.containedIn("objectId",o),r&&r.include&&h.include(r.include),h._limit=o.length,h.find(r).then((async e=>{const r={};e.forEach((e=>{r[e.id]=e}));for(let e=0;e<n.length;e++){const i=n[e];if((!i||!i.id||!r[i.id])&&t)return Promise.reject(new ParseError(ParseError.OBJECT_NOT_FOUND,"All objects must exist on the server."))}if(!singleInstance)for(let e=0;e<a.length;e++){const t=a[e];if(t&&t.id&&r[t.id]){const i=t.id;t._finishFetch(r[i].toJSON()),a[e]=r[i]}}for(const e of a)await i._updateObjectIfPinned(e);return Promise.resolve(a)}))}if(e instanceof ParseObject){if(!e.id)return Promise.reject(new ParseError(ParseError.MISSING_OBJECT_ID,"Object does not have an ID"));const t=CoreManager.getRESTController(),n={};return r&&r.include&&(n.include=r.include.join()),t.request("GET","classes/"+e.className+"/"+e._getId(),n,r).then((async t=>(e._clearPendingOps(),e._clearServerData(),e._finishFetch(t),await i._updateObjectIfPinned(e),e)))}return Promise.resolve(void 0)},async destroy(e,t){if(t&&t.batchSize&&t.transaction)throw new ParseError(ParseError.OTHER_CAUSE,"You cannot use both transaction and batchSize options simultaneously.");let r=t&&t.batchSize?t.batchSize:CoreManager.get("REQUEST_BATCH_SIZE");const i=CoreManager.getLocalDatastore(),n=CoreManager.getRESTController();if(Array.isArray(e)){if(t&&t.transaction&&e.length>1&&(r=e.length),e.length<1)return Promise.resolve([]);const o=[[]];e.forEach((e=>{e.id&&(o[o.length-1].push(e),o[o.length-1].length>=r&&o.push([]))})),0===o[o.length-1].length&&o.pop();let s=Promise.resolve();const a=[];return o.forEach((e=>{const r=e.map((e=>({method:"DELETE",path:getServerUrlPath()+"classes/"+e.className+"/"+e._getId(),body:{}}))),i=t&&t.transaction&&r.length>1?{requests:r,transaction:!0}:{requests:r};s=s.then((()=>n.request("POST","batch",i,t).then((t=>{for(let r=0;r<t.length;r++)if(t[r]&&Object.hasOwn(t[r],"error")){const i=new ParseError(t[r].error.code,t[r].error.error);i.object=e[r],a.push(i)}}))))})),s.then((async()=>{if(a.length){const e=new ParseError(ParseError.AGGREGATE_ERROR);return e.errors=a,Promise.reject(e)}for(const t of e)await i._destroyObjectIfPinned(t);return Promise.resolve(e)}))}return e instanceof ParseObject?n.request("DELETE","classes/"+e.className+"/"+e._getId(),{},t).then((async()=>(await i._destroyObjectIfPinned(e),Promise.resolve(e)))):Promise.resolve(e)},save(e,t){if(t&&t.batchSize&&t.transaction)return Promise.reject(new ParseError(ParseError.OTHER_CAUSE,"You cannot use both transaction and batchSize options simultaneously."));let r=t&&t.batchSize?t.batchSize:CoreManager.get("REQUEST_BATCH_SIZE");const i=CoreManager.getLocalDatastore(),n={},o=CoreManager.getRESTController(),s=CoreManager.getObjectStateController(),a=CoreManager.get("ALLOW_CUSTOM_OBJECT_ID");if((t=t||{}).returnStatus=t.returnStatus||!0,Array.isArray(e)){if(e.length<1)return Promise.resolve([]);let u=e.concat();for(let t=0;t<e.length;t++){const r=e[t];r instanceof ParseObject&&(u=u.concat(unsavedChildren(r,!0)))}u=unique(u);const h=[];let f=[];if(u.forEach((e=>{e instanceof ParseFile?h.push(e.save(t)):e instanceof ParseObject&&f.push(e)})),t&&t.transaction&&f.length>1){if(f.some((e=>!canBeSerialized(e))))return Promise.reject(new ParseError(ParseError.OTHER_CAUSE,"Tried to save a transactional batch containing an object with unserializable attributes."));r=f.length}return Promise.all(h).then((()=>{let u=null;return continueWhile((()=>f.length>0),(()=>{const e=[],i=[];if(f.forEach((t=>{if(a&&Object.hasOwn(t,"id")&&!t.id)throw new ParseError(ParseError.MISSING_OBJECT_ID,"objectId must not be empty or null");e.length<r&&canBeSerialized(t)?e.push(t):i.push(t)})),f=i,e.length<1)return Promise.reject(new ParseError(ParseError.OTHER_CAUSE,"Tried to save a batch with a cycle."));const h=resolvingPromise(),l=[],c=[];return e.forEach(((e,t)=>{const r=resolvingPromise();l.push(r);s.pushPendingState(e._getStateIdentifier()),c.push(s.enqueueTask(e._getStateIdentifier(),(function(){return r.resolve(),h.then((r=>{if(Object.hasOwn(r[t],"success")){const i=r[t].success.objectId,o=r[t]._status;delete r[t]._status,delete r[t]._headers,delete r[t]._xhr,n[i]=e._localId,e._handleSaveResponse(r[t].success,o)}else{if(!u&&Object.hasOwn(r[t],"error")){const e=r[t].error;u=new ParseError(e.code,e.error),f=[]}e._handleSaveError()}}))})))})),when(l).then((()=>{const r=e.map((e=>{const t=e._getSaveParams();return t.path=getServerUrlPath()+t.path,t})),i=t&&t.transaction&&r.length>1?{requests:r,transaction:!0}:{requests:r};return o.request("POST","batch",i,t)})).then(h.resolve,(e=>{h.reject(new ParseError(ParseError.INCORRECT_TYPE,e.message))})),when(c)})).then((async()=>{if(u)return Promise.reject(u);for(const t of e)t instanceof ParseObject&&(await i._updateLocalIdForObject(n[t.id],t),await i._updateObjectIfPinned(t));return Promise.resolve(e)}))}))}if(e instanceof ParseObject){if(a&&Object.hasOwn(e,"id")&&!e.id)throw new ParseError(ParseError.MISSING_OBJECT_ID,"objectId must not be empty or null");e._getId();const r=e._localId,n=e,u=function(){const e=n._getSaveParams();return o.request(e.method,e.path,e.body,t).then((e=>{const t=e._status;delete e._status,delete e._headers,delete e._xhr,n._handleSaveResponse(e,t)}),(e=>(n._handleSaveError(),Promise.reject(e))))};return s.pushPendingState(e._getStateIdentifier()),s.enqueueTask(e._getStateIdentifier(),u).then((async()=>(await i._updateLocalIdForObject(r,e),await i._updateObjectIfPinned(e),e)),(e=>Promise.reject(e)))}return Promise.resolve(void 0)}};function equals(e,t){const r=Object.prototype.toString;if("[object Date]"===r.call(e)||"[object Date]"===r.call(t)){return+new Date(e)==+new Date(t)}if(typeof e!=typeof t)return!1;if(!e||"object"!=typeof 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(let r=0;r<e.length;r+=1)if(!equals(e[r],t[r]))return!1;return!0}const i=CoreManager.getParseObject();if(e instanceof ParseACL||e instanceof ParseFile||e instanceof ParseGeoPoint||e instanceof i)return e.equals(t);if(t instanceof i&&("Object"===e.__type||"Pointer"===e.__type))return e.objectId===t.id&&e.className===t.className;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(!equals(e[r],t[r]))return!1;return!0}function contains(e,t){if(t&&t.__type&&("Pointer"===t.__type||"Object"===t.__type)){for(const r in e){const i=e[r];if("string"==typeof i&&i===t.objectId)return!0;if(i.className===t.className&&i.objectId===t.objectId)return!0}return!1}if(Array.isArray(t))for(const r of t)if(contains(e,r))return!0;return e.indexOf(t)>-1}function transformObject(e){return e._toFullJSON?e._toFullJSON():e}function matchesQuery(e,t,r,i){if(t.className!==e)return!1;let n=t,o=i;t.toJSON&&(n=t.toJSON()),i.toJSON&&(o=i.toJSON().where),n.className=e;for(const t in o)if(!matchesKeyConstraints(e,n,r,t,o[t]))return!1;return!0}function equalObjectsGeneric(e,t,r){if(Array.isArray(e)){for(let i=0;i<e.length;i++)if(r(e[i],t))return!0;return!1}return r(e,t)}function relativeTimeToDate(e,t=new Date){let r=(e=e.toLowerCase()).split(" ");r=r.filter((e=>""!==e));const i="in"===r[0],n="ago"===r[r.length-1];if(!i&&!n&&"now"!==e)return{status:"error",info:"Time should either start with 'in' or end with 'ago'"};if(i&&n)return{status:"error",info:"Time cannot have both 'in' and 'ago'"};if(r=i?r.slice(1):r.slice(0,r.length-1),r.length%2!=0&&"now"!==e)return{status:"error",info:"Invalid time string. Dangling unit or number."};const o=[];for(;r.length;)o.push([r.shift(),r.shift()]);let s=0;for(const[e,t]of o){const r=Number(e);if(!Number.isInteger(r))return{status:"error",info:`'${e}' is not an integer.`};switch(t){case"yr":case"yrs":case"year":case"years":s+=31536e3*r;break;case"wk":case"wks":case"week":case"weeks":s+=604800*r;break;case"d":case"day":case"days":s+=86400*r;break;case"hr":case"hrs":case"hour":case"hours":s+=3600*r;break;case"min":case"mins":case"minute":case"minutes":s+=60*r;break;case"sec":case"secs":case"second":case"seconds":s+=r;break;default:return{status:"error",info:`Invalid interval: '${t}'`}}}const a=1e3*s;return i?{status:"success",info:"future",result:new Date(t.valueOf()+a)}:n?{status:"success",info:"past",result:new Date(t.valueOf()-a)}:{status:"success",info:"present",result:new Date(t.valueOf())}}function matchesKeyConstraints(e,t,r,i,n){if(null===n)return!1;if(i.indexOf(".")>=0){const o=i.split("."),s=o[0],a=o.slice(1).join(".");return matchesKeyConstraints(e,t[s]||{},r,a,n)}let o,s;if("$or"===i){for(o=0;o<n.length;o++)if(matchesQuery(e,t,r,n[o]))return!0;return!1}if("$and"===i){for(o=0;o<n.length;o++)if(!matchesQuery(e,t,r,n[o]))return!1;return!0}if("$nor"===i){for(o=0;o<n.length;o++)if(matchesQuery(e,t,r,n[o]))return!1;return!0}if("$relatedTo"===i)return!1;if(!/^[A-Za-z][0-9A-Za-z_]*$/.test(i))throw new ParseError(ParseError.INVALID_KEY_NAME,`Invalid Key: ${i}`);if("object"!=typeof n)return Array.isArray(t[i])?t[i].indexOf(n)>-1:t[i]===n;if(n.__type)return"Pointer"===n.__type?equalObjectsGeneric(t[i],n,(function(e,t){return void 0!==e&&t.className===e.className&&t.objectId===e.objectId})):equalObjectsGeneric(decode(t[i]),decode(n),equals);for(const e in n){if(s=n[e],(null==s?void 0:s.__type)&&(s=decode(s)),null==s?void 0:s.$relativeTime){const e=relativeTimeToDate(s.$relativeTime);if("success"!==e.status)throw new ParseError(ParseError.INVALID_JSON,`bad $relativeTime (${i}) value. ${e.info}`);s=e.result}switch(("[object Date]"===toString.call(s)||"string"==typeof s&&"Invalid Date"!==new Date(s).toString())&&(t[i]=new Date(t[i].iso?t[i].iso:t[i])),e){case"$lt":if(t[i]>=s)return!1;break;case"$lte":if(t[i]>s)return!1;break;case"$gt":if(t[i]<=s)return!1;break;case"$gte":if(t[i]<s)return!1;break;case"$ne":if(equals(t[i],s))return!1;break;case"$in":if(!contains(s,t[i]))return!1;break;case"$nin":if(contains(s,t[i]))return!1;break;case"$all":for(o=0;o<s.length;o++)if(t[i].indexOf(s[o])<0)return!1;break;case"$exists":{const e=void 0!==t[i],r=n.$exists;if("boolean"!=typeof n.$exists)break;if(!e&&r||e&&!r)return!1;break}case"$regex":{if("object"==typeof s)return s.test(t[i]);let e="",r=-2,o=s.indexOf("\\Q");for(;o>-1;)e+=s.substring(r+2,o),r=s.indexOf("\\E",o),r>-1&&(e+=s.substring(o+2,r).replace(/\\\\\\\\E/g,"\\E").replace(/\W/g,"\\$&")),o=s.indexOf("\\Q",r);e+=s.substring(Math.max(o,r+2));let a=n.$options||"";a=a.replace("x","").replace("s","");if(!new RegExp(e,a).test(t[i]))return!1;break}case"$nearSphere":if(!s||!t[i])return!1;return s.radiansTo(t[i])<=(n.$maxDistance||1/0);case"$within":{if(!s||!t[i])return!1;const e=s.$box[0],r=s.$box[1];return!(e.latitude>r.latitude||e.longitude>r.longitude)&&(t[i].latitude>e.latitude&&t[i].latitude<r.latitude&&t[i].longitude>e.longitude&&t[i].longitude<r.longitude)}case"$options":case"$maxDistance":break;case"$select":{const e=r.filter(((e,t,r)=>matchesQuery(s.query.className,e,r,s.query.where)));for(let r=0;r<e.length;r+=1){const n=transformObject(e[r]);return equals(t[i],n[s.key])}return!1}case"$dontSelect":{const e=r.filter(((e,t,r)=>matchesQuery(s.query.className,e,r,s.query.where)));for(let r=0;r<e.length;r+=1){const n=transformObject(e[r]);return!equals(t[i],n[s.key])}return!1}case"$inQuery":{const e=r.filter(((e,t,r)=>matchesQuery(s.className,e,r,s.where)));for(let r=0;r<e.length;r+=1){const n=transformObject(e[r]);if(t[i].className===n.className&&t[i].objectId===n.objectId)return!0}return!1}case"$notInQuery":{const e=r.filter(((e,t,r)=>matchesQuery(s.className,e,r,s.where)));for(let r=0;r<e.length;r+=1){const n=transformObject(e[r]);if(t[i].className===n.className&&t[i].objectId===n.objectId)return!1}return!0}case"$containedBy":for(const e of t[i])if(!contains(s,e))return!1;return!0;case"$geoWithin":if(s.$polygon){const e=s.$polygon.map((e=>[e.latitude,e.longitude]));return new ParsePolygon(e).containsPoint(t[i])}if(s.$centerSphere){const[e,r]=s.$centerSphere,n=new ParseGeoPoint({latitude:e[1],longitude:e[0]});return new ParseGeoPoint(t[i]).radiansTo(n)<=r}return!1;case"$geoIntersects":{const e=new ParsePolygon(t[i].coordinates),r=new ParseGeoPoint(s.$point);return e.containsPoint(r)}default:return!1}}return!0}function validateQuery(e){let t=e;e.toJSON&&(t=e.toJSON().where);const r=["$and","$or","$nor","_rperm","_wperm","_perishable_token","_email_verify_token","_email_verify_token_expires_at","_account_lockout_expires_at","_failed_login_count"];Object.keys(t).forEach((e=>{if(t&&t[e]&&t[e].$regex&&"string"==typeof t[e].$options&&!t[e].$options.match(/^[imxs]+$/))throw new ParseError(ParseError.INVALID_QUERY,`Bad $options value for query: ${t[e].$options}`);if(r.indexOf(e)<0&&!e.match(/^[a-zA-Z][a-zA-Z0-9_\.]*$/))throw new ParseError(ParseError.INVALID_KEY_NAME,`Invalid key name: ${e}`)}))}CoreManager.setParseObject(ParseObject),CoreManager.setObjectController(DefaultController$9);const OfflineQuery={matchesQuery:matchesQuery,validateQuery:validateQuery};function quote(e){return"\\Q"+e.replace("\\E","\\E\\\\E\\Q")+"\\E"}function _getClassNameFromQueries(e){let t=null;return e.forEach((e=>{if(t||(t=e.className),t!==e.className)throw new Error("All queries must be for the same class.")})),t}function handleSelectResult(e,t){const r={};if(t.forEach((t=>{const i=-1!==t.indexOf(".");if(i||Object.hasOwn(e,t)){if(i){const i=t.split(".");let n=e,o=r;i.forEach(((e,t,r)=>{n&&!Object.hasOwn(n,e)&&(n[e]=void 0),n&&"object"==typeof n&&(n=n[e]),t<r.length-1&&(o[e]||(o[e]={}),o=o[e])}))}}else e[t]=void 0})),Object.keys(r).length>0){copyMissingDataWithMask(CoreManager.getObjectStateController().getServerData({id:e.objectId,className:e.className}),e,r,!1)}}function copyMissingDataWithMask(e,t,r,i){if(i)for(const r in e)Object.hasOwn(e,r)&&!Object.hasOwn(t,r)&&(t[r]=e[r]);for(const i in r)void 0!==t[i]&&null!==t[i]&&null!=e&©MissingDataWithMask(e[i],t[i],r[i],!0)}function handleOfflineSort(e,t,r){let i=r[0];const n="-"===i.slice(0,1);if(n&&(i=i.substring(1)),"_created_at"===i&&(i="createdAt"),"_updated_at"===i&&(i="updatedAt"),!/^[A-Za-z][0-9A-Za-z_]*$/.test(i)||"password"===i)throw new ParseError(ParseError.INVALID_KEY_NAME,`Invalid Key: ${i}`);const o=e.get(i),s=t.get(i);if(o<s)return n?1:-1;if(o>s)return n?-1:1;if(r.length>1){return handleOfflineSort(e,t,r.slice(1))}return 0}class ParseQuery{constructor(e){if("string"==typeof e)"User"===e&&CoreManager.get("PERFORM_USER_REWRITE")?this.className="_User":this.className=e;else if(e instanceof ParseObject)this.className=e.className;else{if("function"!=typeof e)throw new TypeError("A ParseQuery must be constructed with a ParseObject or class name.");{const t=e;if("string"==typeof t.className)this.className=t.className;else{const e=new t;this.className=e.className}}}this._where={},this._watch=[],this._include=[],this._exclude=[],this._count=!1,this._limit=-1,this._skip=0,this._readPreference=null,this._includeReadPreference=null,this._subqueryReadPreference=null,this._queriesLocalDatastore=!1,this._localDatastorePinName=null,this._extraOptions={},this._xhrRequest={task:null,onchange:()=>{}},this._comment=null}_orQuery(e){const t=e.map((e=>e.toJSON().where));return this._where.$or=t,this}_andQuery(e){const t=e.map((e=>e.toJSON().where));return this._where.$and=t,this}_norQuery(e){const t=e.map((e=>e.toJSON().where));return this._where.$nor=t,this}_addCondition(e,t,r){return this._where[e]&&"string"!=typeof this._where[e]||(this._where[e]={}),this._where[e][t]=encode$1(r,!1,!0),this}_regexStartWith(e){return"^"+quote(e)}async _handleOfflineQuery(e){OfflineQuery.validateQuery(this);const t=CoreManager.getLocalDatastore();let r,i=(await t._serializeObjectsFromPinName(this._localDatastorePinName)).map(((e,t,r)=>{const i=ParseObject.fromJSON(e,!1);return e._localId&&!e.objectId&&(i._localId=e._localId),OfflineQuery.matchesQuery(this.className,i,r,this)?i:null})).filter((e=>null!==e));if(e.keys){let t=e.keys.split(",");const r=["className","objectId","createdAt","updatedAt","ACL"];t=t.concat(r),i=i.map((e=>{const r=e._toFullJSON();return Object.keys(r).forEach((e=>{t.includes(e)||delete r[e]})),ParseObject.fromJSON(r,!1)}))}if(e.order){const t=e.order.split(",");i.sort(((e,r)=>handleOfflineSort(e,r,t)))}e.count&&(r=i.length),e.skip&&(i=e.skip>=i.length?[]:i.splice(e.skip,i.length));let n=i.length;return 0!==e.limit&&e.limit<i.length&&(n=e.limit),i=i.splice(0,n),"number"==typeof r?{results:i,count:r}:i}toJSON(){const e={where:this._where};this._watch.length&&(e.watch=this._watch.join(",")),this._include.length&&(e.include=this._include.join(",")),this._exclude.length&&(e.excludeKeys=this._exclude.join(",")),this._select&&(e.keys=this._select.join(",")),this._count&&(e.count=1),this._limit>=0&&(e.limit=this._limit),this._skip>0&&(e.skip=this._skip),this._order&&(e.order=this._order.join(",")),this._readPreference&&(e.readPreference=this._readPreference),this._includeReadPreference&&(e.includeReadPreference=this._includeReadPreference),this._subqueryReadPreference&&(e.subqueryReadPreference=this._subqueryReadPreference),this._hint&&(e.hint=this._hint),this._explain&&(e.explain=!0),this._comment&&(e.comment=this._comment);for(const t in this._extraOptions)e[t]=this._extraOptions[t];return e}withJSON(e){e.where&&(this._where=e.where),e.watch&&(this._watch=e.watch.split(",")),e.include&&(this._include=e.include.split(",")),e.keys&&(this._select=e.keys.split(",")),e.excludeKeys&&(this._exclude=e.excludeKeys.split(",")),e.count&&(this._count=1===e.count),e.limit&&(this._limit=e.limit),e.skip&&(this._skip=e.skip),e.order&&(this._order=e.order.split(",")),e.readPreference&&(this._readPreference=e.readPreference),e.includeReadPreference&&(this._includeReadPreference=e.includeReadPreference),e.subqueryReadPreference&&(this._subqueryReadPreference=e.subqueryReadPreference),e.hint&&(this._hint=e.hint),e.explain&&(this._explain=!!e.explain),e.comment&&(this._comment=e.comment);for(const t in e)Object.hasOwn(e,t)&&-1===["where","include","keys","count","limit","skip","order","readPreference","includeReadPreference","subqueryReadPreference","hint","explain","comment"].indexOf(t)&&(this._extraOptions[t]=e[t]);return this}static fromJSON(e,t){return new ParseQuery(e).withJSON(t)}get(e,t){this.equalTo("objectId",e);const r=ParseObject._getRequestOptions(t);return this.first(r).then((e=>{if(e)return e;const t=new ParseError(ParseError.OBJECT_NOT_FOUND,"Object not found.");return Promise.reject(t)}))}find(e){const t=ParseObject._getRequestOptions(e);this._setRequestTask(t);const r=CoreManager.getQueryController(),i=this._select;return this._queriesLocalDatastore?this._handleOfflineQuery(this.toJSON()):r.find(this.className,this.toJSON(),t).then((e=>{var r;if(this._explain)return e.results;const n=null==(r=e.results)?void 0:r.map((r=>{const n=e.className||this.className;return r.className||(r.className=n),i&&handleSelectResult(r,i),t.json?r:ParseObject.fromJSON(r,!i)})),o=e.count;return"number"==typeof o?{results:n,count:o}:n}))}async findAll(e){let t=[];return await this.eachBatch((e=>{t=[...t,...e]}),e),t}count(e){e=e||{};const t=ParseObject._getRequestOptions(e);this._setRequestTask(t);const r=CoreManager.getQueryController(),i=this.toJSON();return i.limit=0,i.count=1,r.find(this.className,i,t).then((e=>e.count))}distinct(e){const t={useMasterKey:!0};this._setRequestTask(t);const r={distinct:e,where:this._where,hint:this._hint};return CoreManager.getQueryController().aggregate(this.className,r,t).then((e=>e.results))}aggregate(e){if(!Array.isArray(e)&&"object"!=typeof e)throw new Error("Invalid pipeline must be Array or Object");Object.keys(this._where||{}).length&&(Array.isArray(e)||(e=[e]),e.unshift({$match:this._where}));const t={pipeline:e,hint:this._hint,explain:this._explain,readPreference:this._readPreference},r={useMasterKey:!0};this._setRequestTask(r);return CoreManager.getQueryController().aggregate(this.className,t,r).then((e=>e.results))}first(e={}){const t=ParseObject._getRequestOptions(e);this._setRequestTask(t);const r=CoreManager.getQueryController(),i=this.toJSON();i.limit=1;const n=this._select;return this._queriesLocalDatastore?this._handleOfflineQuery(i).then((e=>{if(e[0])return e[0]})):r.find(this.className,i,t).then((e=>{const r=e.results;if(r[0])return r[0].className||(r[0].className=this.className),n&&handleSelectResult(r[0],n),t.json?r[0]:ParseObject.fromJSON(r[0],!n)}))}eachBatch(e,t){if(t=t||{},this._order||this._skip||this._limit>=0){const e="Cannot iterate on a query with sort, skip, or limit.";return Promise.reject(e)}const r=ParseQuery.fromJSON(this.className,this.toJSON());r.ascending("objectId"),r._limit=t.batchSize||100;const i=ParseObject._getRequestOptions(t);let n=!1,o=[];return continueWhile((()=>!n),(async()=>{const[t]=await Promise.all([r.find(i),Promise.resolve(o.length>0&&e(o))]);t.length>=r._limit?(i.json?r.greaterThan("objectId",t[t.length-1].objectId):r.greaterThan("objectId",t[t.length-1].id),o=t):t.length>0?(await Promise.resolve(e(t)),n=!0):n=!0}))}each(e,t){return this.eachBatch((t=>{let r=Promise.resolve();return t.forEach((t=>{r=r.then((()=>e(t)))})),r}),t)}hint(e){return void 0===e&&delete this._hint,this._hint=e,this}explain(e=!0){if("boolean"!=typeof e)throw new Error("You can only set explain to a boolean value");return this._explain=e,this}async map(e,t){const r=[];let i=0;return await this.each((t=>Promise.resolve(e(t,i,this)).then((e=>{r.push(e),i+=1}))),t),r}async reduce(e,t,r){let i=t,n=0;if(await this.each((r=>0===n&&void 0===t?(i=r,void(n+=1)):Promise.resolve(e(i,r,n)).then((e=>{i=e,n+=1}))),r),0===n&&void 0===t)throw new TypeError("Reducing empty query result set with no initial value");return i}async filter(e,t){const r=[];let i=0;return await this.each((t=>Promise.resolve(e(t,i,this)).then((e=>{e&&r.push(t),i+=1}))),t),r}equalTo(e,t){return e&&"object"==typeof e?(Object.entries(e).forEach((([e,t])=>this.equalTo(e,t))),this):void 0===t?this.doesNotExist(e):(this._where[e]=encode$1(t,!1,!0),this)}notEqualTo(e,t){return e&&"object"==typeof e?(Object.entries(e).forEach((([e,t])=>this.notEqualTo(e,t))),this):this._addCondition(e,"$ne",t)}lessThan(e,t){return this._addCondition(e,"$lt",t)}greaterThan(e,t){return this._addCondition(e,"$gt",t)}lessThanOrEqualTo(e,t){return this._addCondition(e,"$lte",t)}greaterThanOrEqualTo(e,t){return this._addCondition(e,"$gte",t)}containedIn(e,t){return this._addCondition(e,"$in",t)}notContainedIn(e,t){return this._addCondition(e,"$nin",t)}containedBy(e,t){return this._addCondition(e,"$containedBy",t)}containsAll(e,t){return this._addCondition(e,"$all",t)}containsAllStartingWith(e,t){Array.isArray(t)||(t=[t]);const r=t.map((e=>({$regex:this._regexStartWith(e)})));return this.containsAll(e,r)}exists(e){return this._addCondition(e,"$exists",!0)}doesNotExist(e){return this._addCondition(e,"$exists",!1)}matches(e,t,r){return this._addCondition(e,"$regex",t),r||(r=""),"string"!=typeof t&&(t.ignoreCase&&(r+="i"),t.multiline&&(r+="m")),r.length&&this._addCondition(e,"$options",r),this}matchesQuery(e,t){const r=t.toJSON();return r.className=t.className,this._addCondition(e,"$inQuery",r)}doesNotMatchQuery(e,t){const r=t.toJSON();return r.className=t.className,this._addCondition(e,"$notInQuery",r)}matchesKeyInQuery(e,t,r){const i=r.toJSON();return i.className=r.className,this._addCondition(e,"$select",{key:t,query:i})}doesNotMatchKeyInQuery(e,t,r){const i=r.toJSON();return i.className=r.className,this._addCondition(e,"$dontSelect",{key:t,query:i})}contains(e,t){if("string"!=typeof t)throw new Error("The value being searched for must be a string.");return this._addCondition(e,"$regex",quote(t))}fullText(e,t,r){if(r=r||{},!e)throw new Error("A key is required.");if(!t)throw new Error("A search term is required");if("string"!=typeof t)throw new Error("The value being searched for must be a string.");const i={};i.$term=t;for(const e in r)switch(e){case"language":i.$language=r[e];break;case"caseSensitive":i.$caseSensitive=r[e];break;case"diacriticSensitive":i.$diacriticSensitive=r[e];break;default:throw new Error(`Unknown option: ${e}`)}return this._addCondition(e,"$text",{$search:i})}sortByTextScore(){return this.ascending("$score"),this.select(["$score"]),this}startsWith(e,t,r){if("string"!=typeof t)throw new Error("The value being searched for must be a string.");return this.matches(e,this._regexStartWith(t),r)}endsWith(e,t,r){if("string"!=typeof t)throw new Error("The value being searched for must be a string.");return this.matches(e,quote(t)+"$",r)}near(e,t){return t instanceof ParseGeoPoint||(t=new ParseGeoPoint(t)),this._addCondition(e,"$nearSphere",t)}withinRadians(e,t,r,i){return i||void 0===i?(this.near(e,t),this._addCondition(e,"$maxDistance",r)):this._addCondition(e,"$geoWithin",{$centerSphere:[[t.longitude,t.latitude],r]})}withinMiles(e,t,r,i){return this.withinRadians(e,t,r/3958.8,i)}withinKilometers(e,t,r,i){return this.withinRadians(e,t,r/6371,i)}withinGeoBox(e,t,r){return t instanceof ParseGeoPoint||(t=new ParseGeoPoint(t)),r instanceof ParseGeoPoint||(r=new ParseGeoPoint(r)),this._addCondition(e,"$within",{$box:[t,r]}),this}withinPolygon(e,t){return this._addCondition(e,"$geoWithin",{$polygon:t})}polygonContains(e,t){return this._addCondition(e,"$geoIntersects",{$point:t})}ascending(...e){return this._order=[],this.addAscending.apply(this,e)}addAscending(...e){return this._order||(this._order=[]),e.forEach((e=>{Array.isArray(e)&&(e=e.join()),this._order=this._order.concat(e.replace(/\s/g,"").split(","))})),this}descending(...e){return this._order=[],this.addDescending.apply(this,e)}addDescending(...e){return this._order||(this._order=[]),e.forEach((e=>{Array.isArray(e)&&(e=e.join()),this._order=this._order.concat(e.replace(/\s/g,"").split(",").map((e=>"-"+e)))})),this}skip(e){if("number"!=typeof e||e<0)throw new Error("You can only skip by a positive number");return this._skip=e,this}limit(e){if("number"!=typeof e)throw new Error("You can only set the limit to a numeric value");return this._limit=e,this}withCount(e=!0){if("boolean"!=typeof e)throw new Error("You can only set withCount to a boolean value");return this._count=e,this}include(...e){return e.forEach((e=>{Array.isArray(e)?this._include=this._include.concat(e):this._include.push(e)})),this}includeAll(){return this.include("*")}select(...e){return this._select||(this._select=[]),e.forEach((e=>{Array.isArray(e)?this._select=this._select.concat(e):this._select.push(e)})),this}exclude(...e){return e.forEach((e=>{Array.isArray(e)?this._exclude=this._exclude.concat(e):this._exclude.push(e)})),this}watch(...e){return e.forEach((e=>{Array.isArray(e)?this._watch=this._watch.concat(e):this._watch.push(e)})),this}readPreference(e,t,r){return this._readPreference=e,this._includeReadPreference=t||null,this._subqueryReadPreference=r||null,this}async subscribe(e){const t=await CoreManager.getUserController().currentUserAsync();e||(e=t&&t.getSessionToken()||void 0);const r=await CoreManager.getLiveQueryController().getDefaultLiveQueryClient();r.shouldOpen()&&r.open();const i=r.subscribe(this,e);return i.subscribePromise.then((()=>i))}static or(...e){const t=_getClassNameFromQueries(e),r=new ParseQuery(t);return r._orQuery(e),r}static and(...e){const t=_getClassNameFromQueries(e),r=new ParseQuery(t);return r._andQuery(e),r}static nor(...e){const t=_getClassNameFromQueries(e),r=new ParseQuery(t);return r._norQuery(e),r}fromNetwork(){return this._queriesLocalDatastore=!1,this._localDatastorePinName=null,this}fromLocalDatastore(){return this.fromPinWithName(null)}fromPin(){return this.fromPinWithName(DEFAULT_PIN)}fromPinWithName(e){return CoreManager.getLocalDatastore().checkIfEnabled()&&(this._queriesLocalDatastore=!0,this._localDatastorePinName=e),this}cancel(){return this._xhrRequest.task&&"function"==typeof this._xhrRequest.task.abort?(this._xhrRequest.task._aborted=!0,this._xhrRequest.task.abort(),this._xhrRequest.task=null,this._xhrRequest.onchange=()=>{},this):(this._xhrRequest.onchange=()=>this.cancel(),this)}_setRequestTask(e){e.requestTask=e=>{this._xhrRequest.task=e,this._xhrRequest.onchange()}}comment(e){if(null==e)return delete this._comment,this;if("string"!=typeof e)throw new Error("The value of a comment to be sent with this query must be a string.");return this._comment=e,this}}const DefaultController$8={find:(e,t,r)=>CoreManager.getRESTController().request("GET","classes/"+e,t,r),aggregate:(e,t,r)=>CoreManager.getRESTController().request("GET","aggregate/"+e,t,r)};CoreManager.setParseQuery(ParseQuery),CoreManager.setQueryController(DefaultController$8);const Storage={async:()=>!!CoreManager.getStorageController().async,getItem(e){const t=CoreManager.getStorageController();if(1===t.async)throw new Error("Synchronous storage is not supported by the current storage controller");return t.getItem(e)},getItemAsync(e){const t=CoreManager.getStorageController();return 1===t.async?t.getItemAsync(e):Promise.resolve(t.getItem(e))},setItem(e,t){const r=CoreManager.getStorageController();if(1===r.async)throw new Error("Synchronous storage is not supported by the current storage controller");return r.setItem(e,t)},setItemAsync(e,t){const r=CoreManager.getStorageController();return 1===r.async?r.setItemAsync(e,t):Promise.resolve(r.setItem(e,t))},removeItem(e){const t=CoreManager.getStorageController();if(1===t.async)throw new Error("Synchronous storage is not supported by the current storage controller");return t.removeItem(e)},removeItemAsync(e){const t=CoreManager.getStorageController();return 1===t.async?t.removeItemAsync(e):Promise.resolve(t.removeItem(e))},getAllKeys(){const e=CoreManager.getStorageController();if(1===e.async)throw new Error("Synchronous storage is not supported by the current storage controller");return e.getAllKeys()},getAllKeysAsync(){const e=CoreManager.getStorageController();return 1===e.async?e.getAllKeysAsync():Promise.resolve(e.getAllKeys())},generatePath(e){if(!CoreManager.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/"+CoreManager.get("APPLICATION_ID")+"/"+e},_clear(){const e=CoreManager.getStorageController();Object.hasOwn(e,"clear")&&e.clear()}},QUEUE_KEY="Parse/Eventually/Queue";let queueCache=[],dirtyCache=!0,polling;const EventuallyQueue={save(e,t){return this.enqueue("save",e,t)},destroy(e,t){return this.enqueue("destroy",e,t)},generateQueueId(e,t){t._getId();const{className:r,id:i,_localId:n}=t;return[e,r,i,t.get("hash")||n].join("_")},async enqueue(e,t,r){const i=await this.getQueue(),n=this.generateQueueId(e,t);let o=this.queueItemExists(i,n);if(o>-1)for(const e in i[o].object)void 0===t.get(e)&&t.set(e,i[o].object[e]);else o=i.length;return i[o]={queueId:n,action:e,object:t.toJSON(),serverOptions:r||{},id:t.id,className:t.className,hash:t.get("hash"),createdAt:new Date},this.setQueue(i)},store:e=>Storage.setItemAsync(QUEUE_KEY,JSON.stringify(e)),load:()=>Storage.getItemAsync(QUEUE_KEY),async getQueue(){return dirtyCache&&(queueCache=JSON.parse(await this.load()||"[]"),dirtyCache=!1),queueCache},setQueue(e){return queueCache=e,this.store(queueCache)},async remove(e){const t=await this.getQueue(),r=this.queueItemExists(t,e);r>-1&&(t.splice(r,1),await this.setQueue(t))},clear(){return queueCache=[],this.store([])},queueItemExists:(e,t)=>e.findIndex((e=>e.queueId===t)),async length(){return(await this.getQueue()).length},async sendQueue(){const e=[...await this.getQueue()];if(0===e.length)return!1;for(let t=0;t<e.length;t+=1){const r=e[t],{id:i,hash:n,className:o}=r,s=ParseObject.extend(o);i?await this.process.byId(s,r):n?await this.process.byHash(s,r):await this.process.create(s,r)}return!0},async sendQueueCallback(e,t){if(!e)return this.remove(t.queueId);switch(t.action){case"save":if(void 0!==e.updatedAt&&e.updatedAt>new Date(t.object.createdAt))return this.remove(t.queueId);try{await e.save(t.object,t.serverOptions),await this.remove(t.queueId)}catch(e){e.code!==ParseError.CONNECTION_FAILED&&await this.remove(t.queueId)}break;case"destroy":try{await e.destroy(t.serverOptions),await this.remove(t.queueId)}catch(e){e.code!==ParseError.CONNECTION_FAILED&&await this.remove(t.queueId)}}},poll(e){polling||(polling=setInterval((()=>{CoreManager.getRESTController().request("GET","health").then((({status:e})=>{if("ok"===e)return this.stopPoll(),this.sendQueue()})).catch((e=>e))}),e||2e3))},stopPoll(){clearInterval(polling),polling=void 0},isPolling:()=>!!polling,_setPolling(e){polling=e},process:{create(e,t){const r=new e;return EventuallyQueue.sendQueueCallback(r,t)},async byId(e,t){const{sessionToken:r}=t.serverOptions,i=new ParseQuery(e);i.equalTo("objectId",t.id);const n=await i.find({sessionToken:r});return EventuallyQueue.sendQueueCallback(n[0],t)},async byHash(e,t){const{sessionToken:r}=t.serverOptions,i=new ParseQuery(e);i.equalTo("hash",t.hash);const n=await i.find({sessionToken:r});return n.length>0?EventuallyQueue.sendQueueCallback(n[0],t):EventuallyQueue.process.create(e,t)}}};function promisifyRequest(e){return new Promise(((t,r)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)}))}function createStore(e,t){const r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(t);const i=promisifyRequest(r);return(e,r)=>i.then((i=>r(i.transaction(t,e).objectStore(t))))}let defaultGetStoreFunc,IndexedDBStorageController;function defaultGetStore(){return defaultGetStoreFunc||(defaultGetStoreFunc=createStore("keyval-store","keyval")),defaultGetStoreFunc}function get(e,t=defaultGetStore()){return t("readonly",(t=>promisifyRequest(t.get(e))))}function set(e,t,r=defaultGetStore()){return r("readwrite",(r=>(r.put(t,e),promisifyRequest(r.transaction))))}function del(e,t=defaultGetStore()){return t("readwrite",(t=>(t.delete(e),promisifyRequest(t.transaction))))}function clear(e=defaultGetStore()){return e("readwrite",(e=>(e.clear(),promisifyRequest(e.transaction))))}function eachCursor(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},promisifyRequest(e.transaction)}function keys(e=defaultGetStore()){return e("readonly",(e=>{if(e.getAllKeys)return promisifyRequest(e.getAllKeys());const t=[];return eachCursor(e,(e=>t.push(e.key))).then((()=>t))}))}if("undefined"!=typeof window&&window.indexedDB)try{const e=createStore("parseDB","parseStore");IndexedDBStorageController={async:1,getItemAsync:t=>get(t,e),setItemAsync:(t,r)=>set(t,r,e),removeItemAsync:t=>del(t,e),getAllKeysAsync:()=>keys(e),clear:()=>clear(e)}}catch(e){IndexedDBStorageController=void 0}else IndexedDBStorageController=void 0;const IndexedDBStorageController$1=IndexedDBStorageController,DEVICE_TYPES={IOS:"ios",MACOS:"macos",TVOS:"tvos",FCM:"fcm",ANDROID:"android",WEB:"web"};class ParseInstallation extends ParseObject{constructor(e){if(super("_Installation"),e&&"object"==typeof e)try{this.set(e||{})}catch(e){throw new Error("Can't create an invalid Installation")}}get appIdentifier(){return this.get("appIdentifier")}get appVersion(){return this.get("appVersion")}get appName(){return this.get("appName")}get badge(){return this.get("badge")}get channels(){return this.get("channels")}get deviceToken(){return this.get("deviceToken")}get deviceType(){return this.get("deviceType")}get GCMSenderId(){return this.get("GCMSenderId")}get installationId(){return this.get("installationId")}get localeIdentifier(){return this.get("localeIdentifier")}get parseVersion(){return this.get("parseVersion")}get pushType(){return this.get("pushType")}get timeZone(){return this.get("timeZone")}static get DEVICE_TYPES(){return DEVICE_TYPES}async fetch(...e){try{await super.fetch.apply(this,e)}catch(t){if(t.code!==ParseError.OBJECT_NOT_FOUND)throw t;delete this.id,this._getId(),this._markAllFieldsDirty(),await super.save.apply(this,e)}return await CoreManager.getInstallationController().updateInstallationOnDisk(this),this}async save(...e){try{await super.save.apply(this,e)}catch(t){if(t.code!==ParseError.OBJECT_NOT_FOUND)throw t;delete this.id,this._getId(),this._markAllFieldsDirty(),await super.save.apply(this,e)}return await CoreManager.getInstallationController().updateInstallationOnDisk(this),this}_markAllFieldsDirty(){for(const[e,t]of Object.entries(this.attributes))this.set(e,t)}static currentInstallation(){return CoreManager.getInstallationController().currentInstallation()}}ParseObject.registerSubclass("_Installation",ParseInstallation);const CURRENT_INSTALLATION_KEY="currentInstallation",CURRENT_INSTALLATION_ID_KEY="currentInstallationId";let iidCache=null,currentInstallationCache=null,currentInstallationCacheMatchesDisk=!1;const InstallationController={async updateInstallationOnDisk(e){const t=Storage.generatePath(CURRENT_INSTALLATION_KEY);await Storage.setItemAsync(t,JSON.stringify(e.toJSON())),this._setCurrentInstallationCache(e)},async currentInstallationId(){if("string"==typeof iidCache)return iidCache;const e=Storage.generatePath(CURRENT_INSTALLATION_ID_KEY);let t=await Storage.getItemAsync(e);return t?(iidCache=t,t):(t=uuidv4(),Storage.setItemAsync(e,t).then((()=>(iidCache=t,t))))},async currentInstallation(){if(currentInstallationCache)return currentInstallationCache;if(currentInstallationCacheMatchesDisk)return null;const e=Storage.generatePath(CURRENT_INSTALLATION_KEY);let t=await Storage.getItemAsync(e);if(currentInstallationCacheMatchesDisk=!0,t){t=JSON.parse(t),t.className="_Installation";const e=ParseInstallation.fromJSON(t);return currentInstallationCache=e,e}const r=await this.currentInstallationId(),i=new ParseInstallation;return i.set("deviceType",ParseInstallation.DEVICE_TYPES.WEB),i.set("installationId",r),i.set("parseVersion",CoreManager.get("VERSION")),currentInstallationCache=i,await Storage.setItemAsync(e,JSON.stringify(i.toJSON())),i},_clearCache(){iidCache=null,currentInstallationCache=null,currentInstallationCacheMatchesDisk=!1},_setInstallationIdCache(e){iidCache=e},_setCurrentInstallationCache(e,t=!0){currentInstallationCache=e,currentInstallationCacheMatchesDisk=t}};let XHR=null;"undefined"!=typeof XMLHttpRequest&&(XHR=XMLHttpRequest);let useXDomainRequest=!1;function ajaxIE9(e,t,r,i,n){return new Promise(((i,o)=>{const s=new XDomainRequest;s.onload=function(){let e;try{e=JSON.parse(s.responseText)}catch(e){o(e)}e&&i({response:e})},s.onerror=s.ontimeout=function(){const e={responseText:JSON.stringify({code:ParseError.X_DOMAIN_REQUEST,error:"IE's XDomainRequest does not supply error info."})};o(e)},s.onprogress=function(){n&&"function"==typeof n.progress&&n.progress(s.responseText)},s.open(e,t),s.send(r),n&&"function"==typeof n.requestTask&&n.requestTask(s)}))}"undefined"==typeof XDomainRequest||"withCredentials"in new XMLHttpRequest||(useXDomainRequest=!0);const RESTController={ajax(e,t,r,i,n){if(useXDomainRequest)return ajaxIE9(e,t,r,i,n);const o=resolvingPromise(),s=CoreManager.get("IDEMPOTENCY")&&["POST","PUT"].includes(e),a=s?uuidv4():"";let u=0;const h=function(){if(null==XHR)throw new Error("Cannot make a request: No definition of XMLHttpRequest was found.");let f=!1;const l=new XHR;l.onreadystatechange=function(){if(4===l.readyState&&!f&&!l._aborted)if(f=!0,l.status>=200&&l.status<300){let e;try{e=JSON.parse(l.responseText);const t="function"==typeof l.getAllResponseHeaders?l.getAllResponseHeaders():"";if(i={},"function"==typeof l.getResponseHeader&&(null==t?void 0:t.indexOf("access-control-expose-headers"))>=0){l.getResponseHeader("access-control-expose-headers").split(", ").forEach((e=>{t.indexOf(e.toLowerCase())>=0&&(i[e]=l.getResponseHeader(e.toLowerCase()))}))}}catch(e){o.reject(e.toString())}e&&o.resolve({response:e,headers:i,status:l.status,xhr:l})}else if(l.status>=500||0===l.status)if(++u<CoreManager.get("REQUEST_ATTEMPT_LIMIT")){const e=Math.round(125*Math.random()*Math.pow(2,u));setTimeout(h,e)}else 0===l.status?o.reject("Unable to connect to the Parse API"):o.reject(l);else o.reject(l)},"string"!=typeof(i=i||{})["Content-Type"]&&(i["Content-Type"]="text/plain"),CoreManager.get("IS_NODE")&&(i["User-Agent"]="Parse/"+CoreManager.get("VERSION")+" (NodeJS "+process$1.versions.node+")"),s&&(i["X-Parse-Request-Id"]=a),CoreManager.get("SERVER_AUTH_TYPE")&&CoreManager.get("SERVER_AUTH_TOKEN")&&(i.Authorization=CoreManager.get("SERVER_AUTH_TYPE")+" "+CoreManager.get("SERVER_AUTH_TOKEN"));const c=CoreManager.get("REQUEST_HEADERS");for(const e in c)i[e]=c[e];if(n&&"function"==typeof n.progress){const e=function(e,t){t.lengthComputable?n.progress(t.loaded/t.total,t.loaded,t.total,{type:e}):n.progress(null,null,null,{type:e})};l.onprogress=t=>{e("download",t)},l.upload&&(l.upload.onprogress=t=>{e("upload",t)})}l.open(e,t,!0);for(const e in i)l.setRequestHeader(e,i[e]);l.onabort=function(){o.resolve({response:{results:[]},status:0,xhr:l})},l.send(r),n&&"function"==typeof n.requestTask&&n.requestTask(l)};return h(),o},request(e,t,r,i){i=i||{};let n=CoreManager.get("SERVER_URL");"/"!==n[n.length-1]&&(n+="/"),n+=t;const o={};if(r&&"object"==typeof r)for(const e in r)o[e]=r[e];const s=i.context;void 0!==s&&(o._context=s),"POST"!==e&&(o._method=e,e="POST"),o._ApplicationId=CoreManager.get("APPLICATION_ID");const a=CoreManager.get("JAVASCRIPT_KEY");a&&(o._JavaScriptKey=a),o._ClientVersion=CoreManager.get("VERSION");let u=i.useMasterKey;if(void 0===u&&(u=CoreManager.get("USE_MASTER_KEY")),u){if(!CoreManager.get("MASTER_KEY"))throw new Error("Cannot use the Master Key, it has not been provided.");delete o._JavaScriptKey,o._MasterKey=CoreManager.get("MASTER_KEY")}i.useMaintenanceKey&&(o._MaintenanceKey=CoreManager.get("MAINTENANCE_KEY")),CoreManager.get("FORCE_REVOCABLE_SESSION")&&(o._RevocableSession="1");const h=i.installationId;let f;if(h&&"string"==typeof h)f=Promise.resolve(h);else{f=CoreManager.getInstallationController().currentInstallationId()}return f.then((e=>{o._InstallationId=e;const t=CoreManager.getUserController();return i&&"string"==typeof i.sessionToken?Promise.resolve(i.sessionToken):t?t.currentUserAsync().then((e=>e?Promise.resolve(e.getSessionToken()):Promise.resolve(null))):Promise.resolve(null)})).then((t=>{t&&(o._SessionToken=t);const r=JSON.stringify(o);return RESTController.ajax(e,n,r,{},i).then((({response:e,status:t,headers:r,xhr:n})=>i.returnStatus?{...e,_status:t,_headers:r,_xhr:n}:e))})).catch(RESTController.handleError)},handleError(e){let t;if(e&&e.responseText)try{const r=JSON.parse(e.responseText);t=new ParseError(r.code,r.error||r.message)}catch(r){t=new ParseError(ParseError.INVALID_JSON,"Received an error with invalid JSON from Parse: "+e.responseText)}else{const r=e.message?e.message:e;t=new ParseError(ParseError.CONNECTION_FAILED,"XMLHttpRequest failed: "+JSON.stringify(r))}return Promise.reject(t)},_setXHR(e){XHR=e},_getXHR:()=>XHR};function track(e,t){if(0===(e=(e=(e=e||"").replace(/^\s*/,"")).replace(/\s*$/,"")).length)throw new TypeError("A name for the custom event must be provided");for(const e in t)if("string"!=typeof e||"string"!=typeof t[e])throw new TypeError('track() dimensions expects keys and values of type "string".');return CoreManager.getAnalyticsController().track(e,t)}const DefaultController$7={track(e,t){const r="events/"+e;return CoreManager.getRESTController().request("POST",r,{dimensions:t})}};CoreManager.setAnalyticsController(DefaultController$7);const Analytics=Object.freeze(Object.defineProperty({__proto__:null,track:track},Symbol.toStringTag,{value:"Module"}));function isRevocableSession(e){return e.indexOf("r:")>-1}const CURRENT_USER_KEY="currentUser";let canUseCurrentUser=!CoreManager.get("IS_NODE"),currentUserCacheMatchesDisk=!1,currentUserCache=null;const authProviders={};class ParseUser extends ParseObject{constructor(e){if(super("_User"),e&&"object"==typeof e)try{this.set(e||{})}catch(e){throw new Error("Can't create an invalid Parse User")}}_upgradeToRevocableSession(e){const t=ParseObject._getRequestOptions(e);return CoreManager.getUserController().upgradeToRevocableSession(this,t)}linkWith(e,t,r={}){let i;if(r.sessionToken=r.sessionToken||this.getSessionToken()||"","string"==typeof e)if(i=e,authProviders[e])e=authProviders[e];else{const t={restoreAuthentication:()=>!0,getAuthType:()=>i};authProviders[t.getAuthType()]=t,e=t}else i=e.getAuthType();if(t&&Object.hasOwn(t,"authData")){const e=this.get("authData")||{};if("object"!=typeof e)throw new Error("Invalid type: authData field should be an object");e[i]=t.authData;const n=e.anonymous;this.stripAnonymity();return CoreManager.getUserController().linkWith(this,e,r).catch((t=>{throw delete e[i],this.restoreAnonimity(n),t}))}return new Promise(((t,i)=>{e.authenticate({success:(e,n)=>{const o={};o.authData=n,this.linkWith(e,o,r).then((()=>{t(this)}),(e=>{i(e)}))},error:(e,t)=>{i(t)}})}))}_linkWith(e,t,r={}){return this.linkWith(e,t,r)}_synchronizeAuthData(e){if(!this.isCurrent()||!e)return;let t;"string"==typeof e?(t=e,e=authProviders[t]):t=e.getAuthType();const r=this.get("authData");if(!e||!r||"object"!=typeof r)return;e.restoreAuthentication(r[t])||this._unlinkFrom(e)}_synchronizeAllAuthData(){const e=this.get("authData");if("object"==typeof e)for(const t in e)this._synchronizeAuthData(t)}_cleanupAuthData(){if(!this.isCurrent())return;const e=this.get("authData");if("object"==typeof e)for(const t in e)e[t]||delete e[t]}_unlinkFrom(e,t){return this.linkWith(e,{authData:null},t).then((()=>(this._synchronizeAuthData(e),Promise.resolve(this))))}_isLinked(e){let t;t="string"==typeof e?e:e.getAuthType();const r=this.get("authData")||{};return"object"==typeof r&&!!r[t]}_logOutWithAll(){const e=this.get("authData");if("object"==typeof e)for(const t in e)this._logOutWith(t)}_logOutWith(e){this.isCurrent()&&("string"==typeof e&&(e=authProviders[e]),e&&e.deauthenticate&&e.deauthenticate())}_preserveFieldsOnFetch(){return{sessionToken:this.get("sessionToken")}}isCurrent(){const e=ParseUser.current();return!!e&&e.id===this.id}async isCurrentAsync(){const e=await ParseUser.currentAsync();return!!e&&e.id===this.id}stripAnonymity(){const e=this.get("authData");e&&"object"==typeof e&&Object.hasOwn(e,"anonymous")&&(e.anonymous=null)}restoreAnonimity(e){if(e){this.get("authData").anonymous=e}}getUsername(){const e=this.get("username");return null==e||"string"==typeof e?e:""}setUsername(e){this.stripAnonymity(),this.set("username",e)}setPassword(e){this.set("password",e)}getEmail(){const e=this.get("email");return null==e||"string"==typeof e?e:""}setEmail(e){return this.set("email",e)}getSessionToken(){const e=this.get("sessionToken");return null==e||"string"==typeof e?e:""}authenticated(){const e=ParseUser.current();return!!this.get("sessionToken")&&!!e&&e.id===this.id}signUp(e,t){const r=ParseObject._getRequestOptions(t);return CoreManager.getUserController().signUp(this,e,r)}logIn(e={}){const t=ParseObject._getRequestOptions(e);Object.hasOwn(t,"usePost")||(t.usePost=!0);return CoreManager.getUserController().logIn(this,t)}async save(...e){await super.save.apply(this,e);return await this.isCurrentAsync()?CoreManager.getUserController().updateUserOnDisk(this):this}async destroy(...e){await super.destroy.apply(this,e);return await this.isCurrentAsync()?CoreManager.getUserController().removeUserFromDisk():this}async fetch(...e){await super.fetch.apply(this,e);return await this.isCurrentAsync()?CoreManager.getUserController().updateUserOnDisk(this):this}async fetchWithInclude(...e){await super.fetchWithInclude.apply(this,e);return await this.isCurrentAsync()?CoreManager.getUserController().updateUserOnDisk(this):this}verifyPassword(e,t){const r=this.getUsername()||"";return ParseUser.verifyPassword(r,e,t)}static readOnlyAttributes(){return["sessionToken"]}static extend(e,t){if(e)for(const t in e)"className"!==t&&Object.defineProperty(ParseUser.prototype,t,{value:e[t],enumerable:!1,writable:!0,configurable:!0});if(t)for(const e in t)"className"!==e&&Object.defineProperty(ParseUser,e,{value:t[e],enumerable:!1,writable:!0,configurable:!0});return ParseUser}static current(){if(!canUseCurrentUser)return null;return CoreManager.getUserController().currentUser()}static currentAsync(){if(!canUseCurrentUser)return Promise.resolve(null);return CoreManager.getUserController().currentUserAsync()}static signUp(e,t,r,i){(r=r||{}).username=e,r.password=t;return new this(r).signUp({},i)}static logIn(e,t,r){if("string"!=typeof e)return Promise.reject(new ParseError(ParseError.OTHER_CAUSE,"Username must be a string."));if("string"!=typeof t)return Promise.reject(new ParseError(ParseError.OTHER_CAUSE,"Password must be a string."));const i=new this;return i._finishFetch({username:e,password:t}),i.logIn(r)}static logInWithAdditionalAuth(e,t,r,i){if("string"!=typeof e)return Promise.reject(new ParseError(ParseError.OTHER_CAUSE,"Username must be a string."));if("string"!=typeof t)return Promise.reject(new ParseError(ParseError.OTHER_CAUSE,"Password must be a string."));if("[object Object]"!==Object.prototype.toString.call(r))return Promise.reject(new ParseError(ParseError.OTHER_CAUSE,"Auth must be an object."));const n=new this;return n._finishFetch({username:e,password:t,authData:r}),n.logIn(i)}static loginAs(e){if(!e)throw new ParseError(ParseError.USERNAME_MISSING,"Cannot log in as user with an empty user id");const t=CoreManager.getUserController(),r=new this;return t.loginAs(r,e)}static become(e,t){if(!canUseCurrentUser)throw new Error("It is not memory-safe to become a user in a server environment");const r=ParseObject._getRequestOptions(t);r.sessionToken=e;const i=CoreManager.getUserController(),n=new this;return i.become(n,r)}static me(e,t){const r=CoreManager.getUserController(),i=ParseObject._getRequestOptions(t);i.sessionToken=e;const n=new this;return r.me(n,i)}static hydrate(e){const t=CoreManager.getUserController(),r=new this;return t.hydrate(r,e)}static logInWith(e,t,r){return(new this).linkWith(e,t,r)}static logOut(e){return CoreManager.getUserController().logOut(e)}static requestPasswordReset(e,t){const r=ParseObject._getRequestOptions(t);return CoreManager.getUserController().requestPasswordReset(e,r)}static requestEmailVerification(e,t){const r=ParseObject._getRequestOptions(t);return CoreManager.getUserController().requestEmailVerification(e,r)}static verifyPassword(e,t,r){if("string"!=typeof e)return Promise.reject(new ParseError(ParseError.OTHER_CAUSE,"Username must be a string."));if("string"!=typeof t)return Promise.reject(new ParseError(ParseError.OTHER_CAUSE,"Password must be a string."));return CoreManager.getUserController().verifyPassword(e,t,r||{})}static allowCustomUserClass(e){CoreManager.set("PERFORM_USER_REWRITE",!e)}static enableRevocableSession(e){if(e=e||{},CoreManager.set("FORCE_REVOCABLE_SESSION",!0),canUseCurrentUser){const t=ParseUser.current();if(t)return t._upgradeToRevocableSession(e)}return Promise.resolve()}static enableUnsafeCurrentUser(){canUseCurrentUser=!0}static disableUnsafeCurrentUser(){canUseCurrentUser=!1}static _registerAuthenticationProvider(e){authProviders[e.getAuthType()]=e,ParseUser.currentAsync().then((t=>{t&&t._synchronizeAuthData(e.getAuthType())}))}static _logInWith(e,t,r){return(new this).linkWith(e,t,r)}static _clearCache(){currentUserCache=null,currentUserCacheMatchesDisk=!1}static _setCurrentUserCache(e){currentUserCache=e}}ParseObject.registerSubclass("_User",ParseUser);const DefaultController$6={updateUserOnDisk(e){const t=Storage.generatePath(CURRENT_USER_KEY),r=e.toJSON();delete r.password,r.className="_User";let i=JSON.stringify(r);if(CoreManager.get("ENCRYPTED_USER")){i=CoreManager.getCryptoController().encrypt(r,CoreManager.get("ENCRYPTED_KEY"))}return Storage.setItemAsync(t,i).then((()=>e))},removeUserFromDisk(){const e=Storage.generatePath(CURRENT_USER_KEY);return currentUserCacheMatchesDisk=!0,currentUserCache=null,Storage.removeItemAsync(e)},setCurrentUser:e=>(currentUserCache=e,e._cleanupAuthData(),e._synchronizeAllAuthData(),DefaultController$6.updateUserOnDisk(e)),currentUser(){if(currentUserCache)return currentUserCache;if(currentUserCacheMatchesDisk)return null;if(Storage.async())throw new Error("Cannot call currentUser() when using a platform with an async storage system. Call currentUserAsync() instead.");const e=Storage.generatePath(CURRENT_USER_KEY);let t=Storage.getItem(e);if(currentUserCacheMatchesDisk=!0,!t)return currentUserCache=null,null;if(CoreManager.get("ENCRYPTED_USER")){t=CoreManager.getCryptoController().decrypt(t,CoreManager.get("ENCRYPTED_KEY"))}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);const r=ParseObject.fromJSON(t);return currentUserCache=r,r._synchronizeAllAuthData(),r},currentUserAsync(){if(currentUserCache)return Promise.resolve(currentUserCache);if(currentUserCacheMatchesDisk)return Promise.resolve(null);const e=Storage.generatePath(CURRENT_USER_KEY);return Storage.getItemAsync(e).then((e=>{if(currentUserCacheMatchesDisk=!0,!e)return currentUserCache=null,Promise.resolve(null);if(CoreManager.get("ENCRYPTED_USER")){e=CoreManager.getCryptoController().decrypt(e.toString(),CoreManager.get("ENCRYPTED_KEY"))}(e=JSON.parse(e)).className||(e.className="_User"),e._id&&(e.objectId!==e._id&&(e.objectId=e._id),delete e._id),e._sessionToken&&(e.sessionToken=e._sessionToken,delete e._sessionToken);const t=ParseObject.fromJSON(e);return currentUserCache=t,t._synchronizeAllAuthData(),Promise.resolve(t)}))},signUp(e,t,r){const i=t&&t.username||e.get("username"),n=t&&t.password||e.get("password");return i&&i.length?n&&n.length?e.save(t,r).then((()=>(e._finishFetch({password:void 0}),canUseCurrentUser?DefaultController$6.setCurrentUser(e):e))):Promise.reject(new ParseError(ParseError.OTHER_CAUSE,"Cannot sign up user with an empty password.")):Promise.reject(new ParseError(ParseError.OTHER_CAUSE,"Cannot sign up user with an empty username."))},logIn(e,t){const r=CoreManager.getRESTController(),i=CoreManager.getObjectStateController(),n={username:e.get("username"),password:e.get("password"),authData:e.get("authData")};return r.request(t.usePost?"POST":"GET","login",n,t).then((t=>(e._migrateId(t.objectId),e._setExisted(!0),i.setPendingOp(e._getStateIdentifier(),"username",void 0),i.setPendingOp(e._getStateIdentifier(),"password",void 0),t.password=void 0,e._finishFetch(t),canUseCurrentUser?DefaultController$6.setCurrentUser(e):Promise.resolve(e))))},loginAs:(e,t)=>CoreManager.getRESTController().request("POST","loginAs",{userId:t},{useMasterKey:!0}).then((t=>(e._finishFetch(t),e._setExisted(!0),canUseCurrentUser?DefaultController$6.setCurrentUser(e):Promise.resolve(e)))),become:(e,t)=>CoreManager.getRESTController().request("GET","users/me",{},t).then((t=>(e._finishFetch(t),e._setExisted(!0),DefaultController$6.setCurrentUser(e)))),hydrate:(e,t)=>(e._finishFetch(t),e._setExisted(!0),t.sessionToken&&canUseCurrentUser?DefaultController$6.setCurrentUser(e):Promise.resolve(e)),me:(e,t)=>CoreManager.getRESTController().request("GET","users/me",{},t).then((t=>(e._finishFetch(t),e._setExisted(!0),e))),logOut(e){const t=CoreManager.getRESTController();return(null==e?void 0:e.sessionToken)?t.request("POST","logout",{},e):DefaultController$6.currentUserAsync().then((e=>{const r=Storage.generatePath(CURRENT_USER_KEY);let i=Storage.removeItemAsync(r);if(null!==e){const r=e.getSessionToken();r&&isRevocableSession(r)&&(i=i.then((()=>t.request("POST","logout",{},{sessionToken:r})))),e._logOutWithAll(),e._finishFetch({sessionToken:void 0})}return currentUserCacheMatchesDisk=!0,currentUserCache=null,i}))},requestPasswordReset:(e,t)=>CoreManager.getRESTController().request("POST","requestPasswordReset",{email:e},t),async upgradeToRevocableSession(e,t){const r=e.getSessionToken();if(!r)return Promise.reject(new ParseError(ParseError.SESSION_MISSING,"Cannot upgrade a user with no session token"));t.sessionToken=r;const i=CoreManager.getRESTController(),n=await i.request("POST","upgradeToRevocableSession",{},t);e._finishFetch({sessionToken:(null==n?void 0:n.sessionToken)||""});return await e.isCurrentAsync()?DefaultController$6.setCurrentUser(e):Promise.resolve(e)},linkWith:(e,t,r)=>e.save({authData:t},r).then((()=>canUseCurrentUser?DefaultController$6.setCurrentUser(e):e)),verifyPassword(e,t,r){const i=CoreManager.getRESTController(),n={username:e,password:t,...void 0!==r.ignoreEmailVerification&&{ignoreEmailVerification:r.ignoreEmailVerification}};return i.request("GET","verifyPassword",n,r)},requestEmailVerification:(e,t)=>CoreManager.getRESTController().request("POST","verificationEmailRequest",{email:e},t)};CoreManager.setParseUser(ParseUser),CoreManager.setUserController(DefaultController$6);let registered=!1;const AnonymousUtils={isLinked(e){const t=this._getAuthProvider();return e._isLinked(t.getAuthType())},logIn(e){const t=this._getAuthProvider();return ParseUser.logInWith(t.getAuthType(),t.getAuthData(),e)},link(e,t){const r=this._getAuthProvider();return e.linkWith(r.getAuthType(),r.getAuthData(),t)},isRegistered:()=>registered,_getAuthProvider(){const e={restoreAuthentication:()=>!0,getAuthType:()=>"anonymous",getAuthData:()=>({authData:{id:uuidv4()}})};return registered||(ParseUser._registerAuthenticationProvider(e),registered=!0),e}};function run(e,t,r){if("string"!=typeof e||0===e.length)throw new TypeError("Cloud function name must be a string.");const i=ParseObject._getRequestOptions(r);return CoreManager.getCloudController().run(e,t,i)}function getJobsData(){return CoreManager.getCloudController().getJobsData({useMasterKey:!0})}function startJob(e,t){if("string"!=typeof e||0===e.length)throw new TypeError("Cloud job name must be a string.");return CoreManager.getCloudController().startJob(e,t,{useMasterKey:!0})}function getJobStatus(e){return new ParseQuery("_JobStatus").get(e,{useMasterKey:!0})}const DefaultController$5={run(e,t,r){const i=CoreManager.getRESTController(),n=encode$1(t,!0);return i.request("POST","functions/"+e,n,r).then((e=>{if("object"==typeof e&&Object.keys(e).length>0&&!Object.hasOwn(e,"result"))throw new ParseError(ParseError.INVALID_JSON,"The server returned an invalid response.");const t=decode(e);return t&&Object.hasOwn(t,"result")?Promise.resolve(t.result):Promise.resolve(void 0)}))},getJobsData:e=>CoreManager.getRESTController().request("GET","cloud_code/jobs/data",null,e),async startJob(e,t,r){var i;const n=CoreManager.getRESTController(),o=encode$1(t,!0);r.returnStatus=!0;return null==(i=(await n.request("POST","jobs/"+e,o,r))._headers)?void 0:i["X-Parse-Job-Status-Id"]}};CoreManager.setCloudController(DefaultController$5);const Cloud=Object.freeze(Object.defineProperty({__proto__:null,getJobStatus:getJobStatus,getJobsData:getJobsData,run:run,startJob:startJob},Symbol.toStringTag,{value:"Module"}));class ParseRole extends ParseObject{constructor(e,t){super("_Role"),"string"==typeof e&&t instanceof ParseACL&&(this.setName(e),this.setACL(t))}getName(){const e=this.get("name");return null==e||"string"==typeof e?e:""}setName(e,t){return this._validateName(e),this.set("name",e,t)}getUsers(){return this.relation("users")}getRoles(){return this.relation("roles")}_validateName(e){if("string"!=typeof e)throw new ParseError(ParseError.OTHER_CAUSE,"A role's name must be a String.");if(!/^[0-9a-zA-Z\-_ ]+$/.test(e))throw new ParseError(ParseError.OTHER_CAUSE,"A role's name can be only contain alphanumeric characters, _, -, and spaces.")}validate(e,t){const r=super.validate(e,t);if(r)return r;if("name"in e&&e.name!==this.getName()){const t=e.name;if(this.id&&this.id!==e.objectId)return new ParseError(ParseError.OTHER_CAUSE,"A role's name can only be set before it has been saved.");try{this._validateName(t)}catch(e){return e}}return!1}}CoreManager.setParseRole(ParseRole),ParseObject.registerSubclass("_Role",ParseRole);const PUBLIC_KEY="*",VALID_PERMISSIONS=new Map;VALID_PERMISSIONS.set("get",{}),VALID_PERMISSIONS.set("find",{}),VALID_PERMISSIONS.set("count",{}),VALID_PERMISSIONS.set("create",{}),VALID_PERMISSIONS.set("update",{}),VALID_PERMISSIONS.set("delete",{}),VALID_PERMISSIONS.set("addField",{});const VALID_PERMISSIONS_EXTENDED=new Map;VALID_PERMISSIONS_EXTENDED.set("protectedFields",{});class ParseCLP{constructor(e){this.permissionsMap={};for(const[e,t]of VALID_PERMISSIONS.entries()){this.permissionsMap[e]=Object.assign({},t);const r=e.charAt(0).toUpperCase()+e.slice(1);this[`get${r}RequiresAuthentication`]=function(){return this._getAccess(e,"requiresAuthentication")},this[`set${r}RequiresAuthentication`]=function(t){this._setAccess(e,"requiresAuthentication",t)},this[`get${r}PointerFields`]=function(){return this._getAccess(e,"pointerFields",!1)},this[`set${r}PointerFields`]=function(t){this._setArrayAccess(e,"pointerFields",t)},this[`get${r}Access`]=function(t){return this._getAccess(e,t)},this[`set${r}Access`]=function(t,r){this._setAccess(e,t,r)},this[`getPublic${r}Access`]=function(){return this[`get${r}Access`](PUBLIC_KEY)},this[`setPublic${r}Access`]=function(e){this[`set${r}Access`](PUBLIC_KEY,e)},this[`getRole${r}Access`]=function(e){return this[`get${r}Access`](this._getRoleName(e))},this[`setRole${r}Access`]=function(e,t){this[`set${r}Access`](this._getRoleName(e),t)}}for(const[e,t]of VALID_PERMISSIONS_EXTENDED.entries())this.permissionsMap[e]=Object.assign({},t);if(e&&"object"==typeof e)if(e instanceof ParseUser)this.setReadAccess(e,!0),this.setWriteAccess(e,!0);else if(e instanceof ParseRole)this.setRoleReadAccess(e,!0),this.setRoleWriteAccess(e,!0);else for(const t in e){const r=e[t],i=!!VALID_PERMISSIONS.get(t),n=!!VALID_PERMISSIONS_EXTENDED.get(t),o=["readUserFields","writeUserFields"].includes(t);if("string"!=typeof t||!(i||n||o))throw new TypeError("Tried to create an CLP with an invalid permission type.");if(o){if(r.every((e=>"string"==typeof e))){this.permissionsMap[t]=r;continue}throw new TypeError("Tried to create an CLP with an invalid permission value.")}for(const e in r){const i=r[e];if("boolean"!=typeof i&&!n&&"pointerFields"!==e)throw new TypeError("Tried to create an CLP with an invalid permission value.");this.permissionsMap[t][e]=i}}else if("function"==typeof e)throw new TypeError("ParseCLP constructed with a function. Did you forget ()?")}toJSON(){return{...this.permissionsMap}}equals(e){if(!(e instanceof ParseCLP))return!1;const t=Object.keys(this.permissionsMap),r=Object.keys(e.permissionsMap);if(t.length!==r.length)return!1;for(const t in this.permissionsMap){if(!e.permissionsMap[t])return!1;const r=Object.keys(this.permissionsMap[t]),i=Object.keys(e.permissionsMap[t]);if(r.length!==i.length)return!1;for(const r in this.permissionsMap[t]){if(!e.permissionsMap[t][r])return!1;if(this.permissionsMap[t][r]!==e.permissionsMap[t][r])return!1}}return!0}_getRoleName(e){let t=e;if(e instanceof ParseRole&&(t=e.getName()),"string"!=typeof t)throw new TypeError("role must be a Parse.Role or a String");return`role:${t}`}_parseEntity(e){let t=e;if(t instanceof ParseUser){if(t=t.id,!t)throw new Error("Cannot get access for a Parse.User without an id.")}else t instanceof ParseRole&&(t=this._getRoleName(t));if("string"!=typeof t)throw new TypeError("userId must be a string.");return t}_setAccess(e,t,r){if(t=this._parseEntity(t),"boolean"!=typeof r)throw new TypeError("allowed must be either true or false.");if(!this.permissionsMap[e][t]){if(!r)return;this.permissionsMap[e][t]={}}r?this.permissionsMap[e][t]=!0:delete this.permissionsMap[e][t]}_getAccess(e,t,r=!0){t=this._parseEntity(t);const i=this.permissionsMap[e][t];return r?!!i&&!!this.permissionsMap[e][t]:i}_setArrayAccess(e,t,r){t=this._parseEntity(t);if(this.permissionsMap[e][t]||(this.permissionsMap[e][t]=[]),!r||Array.isArray(r)&&0===r.length)delete this.permissionsMap[e][t];else{if(!Array.isArray(r)||!r.every((e=>"string"==typeof e)))throw new TypeError("fields must be an array of strings or undefined.");this.permissionsMap[e][t]=r}}_setGroupPointerPermission(e,t){if(this.permissionsMap[e]||(this.permissionsMap[e]=[]),!t||Array.isArray(t)&&0===t.length)delete this.permissionsMap[e];else{if(!Array.isArray(t)||!t.every((e=>"string"==typeof e)))throw new TypeError(`${e}.pointerFields must be an array of strings or undefined.`);this.permissionsMap[e]=t}}_getGroupPointerPermissions(e){return this.permissionsMap[e]||[]}setReadUserFields(e){this._setGroupPointerPermission("readUserFields",e)}getReadUserFields(){return this._getGroupPointerPermissions("readUserFields")||[]}setWriteUserFields(e){this._setGroupPointerPermission("writeUserFields",e)}getWriteUserFields(){return this._getGroupPointerPermissions("writeUserFields")||[]}setProtectedFields(e,t){this._setArrayAccess("protectedFields",e,t)}getProtectedFields(e){return this._getAccess("protectedFields",e,!1)}setReadAccess(e,t){this._setAccess("find",e,t),this._setAccess("get",e,t),this._setAccess("count",e,t)}getReadAccess(e){return this._getAccess("find",e)&&this._getAccess("get",e)&&this._getAccess("count",e)}setWriteAccess(e,t){this._setAccess("create",e,t),this._setAccess("update",e,t),this._setAccess("delete",e,t),this._setAccess("addField",e,t)}getWriteAccess(e){return this._getAccess("create",e)&&this._getAccess("update",e)&&this._getAccess("delete",e)&&this._getAccess("addField",e)}setPublicReadAccess(e){this.setReadAccess(PUBLIC_KEY,e)}getPublicReadAccess(){return this.getReadAccess(PUBLIC_KEY)}setPublicWriteAccess(e){this.setWriteAccess(PUBLIC_KEY,e)}getPublicWriteAccess(){return this.getWriteAccess(PUBLIC_KEY)}setPublicProtectedFields(e){this.setProtectedFields(PUBLIC_KEY,e)}getPublicProtectedFields(){return this.getProtectedFields(PUBLIC_KEY)}getRoleReadAccess(e){return this.getReadAccess(this._getRoleName(e))}getRoleWriteAccess(e){return this.getWriteAccess(this._getRoleName(e))}setRoleReadAccess(e,t){this.setReadAccess(this._getRoleName(e),t)}setRoleWriteAccess(e,t){this.setWriteAccess(this._getRoleName(e),t)}getRoleProtectedFields(e){return this.getProtectedFields(this._getRoleName(e))}setRoleProtectedFields(e,t){this.setProtectedFields(this._getRoleName(e),t)}}var eventsExports=requireEvents();const events=getDefaultExportFromCjs(eventsExports),__CJS__import__1__=_mergeNamespaces({__proto__:null,default:events},[eventsExports]);let EventEmitter;try{EventEmitter=(events||__CJS__import__1__).EventEmitter}catch(e){}const EventEmitter$1=EventEmitter;class ParseConfig{constructor(){this.attributes={},this._escapedAttributes={}}get(e){return this.attributes[e]}escape(e){const t=this._escapedAttributes[e];if(t)return t;const r=this.attributes[e];let i="";return null!=r&&(i=escape$1(r.toString())),this._escapedAttributes[e]=i,i}static current(){return CoreManager.getConfigController().current()}static get(e){return CoreManager.getConfigController().get(e)}static save(e,t){const r=CoreManager.getConfigController();return r.save(e,t).then((()=>r.get({useMasterKey:!0})),(e=>Promise.reject(e)))}static _clearCache(){currentConfig=null}}let currentConfig=null;const CURRENT_CONFIG_KEY="currentConfig";function decodePayload(e){try{const t=JSON.parse(e);if(t&&"object"==typeof t)return decode(t)}catch(e){return null}}const DefaultController$4={current(){if(currentConfig)return currentConfig;const e=new ParseConfig,t=Storage.generatePath(CURRENT_CONFIG_KEY);if(!Storage.async()){const r=Storage.getItem(t);if(r){const t=decodePayload(r);t&&(e.attributes=t,currentConfig=e)}return e}return Storage.getItemAsync(t).then((t=>{if(t){const r=decodePayload(t);r&&(e.attributes=r,currentConfig=e)}return e}))},get:e=>CoreManager.getRESTController().request("GET","config",{},e).then((e=>{if(!e||!e.params){const e=new ParseError(ParseError.INVALID_JSON,"Config JSON response invalid.");return Promise.reject(e)}const t=new ParseConfig;t.attributes={};for(const r in e.params)t.attributes[r]=decode(e.params[r]);return currentConfig=t,Storage.setItemAsync(Storage.generatePath(CURRENT_CONFIG_KEY),JSON.stringify(e.params)).then((()=>t))})),save(e,t){const r=CoreManager.getRESTController(),i={};for(const t in e)i[t]=encode$1(e[t]);return r.request("PUT","config",{params:i,masterKeyOnly:t},{useMasterKey:!0}).then((e=>{if(e&&e.result)return Promise.resolve();{const e=new ParseError(ParseError.INTERNAL_SERVER_ERROR,"Error occured updating Config.");return Promise.reject(e)}}))}};CoreManager.setConfigController(DefaultController$4);let initialized=!1,requestedPermissions,initOptions;const provider={authenticate(e){"undefined"==typeof FB&&e.error(this,"Facebook SDK not found."),FB.login((t=>{t.authResponse?e.success&&e.success(this,{id:t.authResponse.userID,access_token:t.authResponse.accessToken,expiration_date:new Date(1e3*t.authResponse.expiresIn+(new Date).getTime()).toJSON()}):e.error&&e.error(this,t)}),{scope:requestedPermissions})},restoreAuthentication(e){if(e){const t={};if(initOptions)for(const e in initOptions)t[e]=initOptions[e];t.status=!1;const r=FB.getAuthResponse();r&&r.userID!==e.id&&FB.logout(),FB.init(t)}return!0},getAuthType:()=>"facebook",deauthenticate(){this.restoreAuthentication(null)}},FacebookUtils={init(e){if("undefined"==typeof FB)throw new Error("The Facebook JavaScript SDK must be loaded before calling init.");if(initOptions={},e)for(const t in e)initOptions[t]=e[t];if(initOptions.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.')}initOptions.status=!1,FB.init(initOptions),ParseUser._registerAuthenticationProvider(provider),initialized=!0},isLinked:e=>e._isLinked("facebook"),logIn(e,t){if(!e||"string"==typeof e){if(!initialized)throw new Error("You must initialize FacebookUtils before calling logIn.");return requestedPermissions=e,ParseUser.logInWith("facebook",t)}const r={authData:e};return ParseUser.logInWith("facebook",r,t)},link(e,t,r){if(!t||"string"==typeof t){if(!initialized)throw new Error("You must initialize FacebookUtils before calling link.");return requestedPermissions=t,e.linkWith("facebook",r)}const i={authData:t};return e.linkWith("facebook",i,r)},unlink:function(e,t){if(!initialized)throw new Error("You must initialize FacebookUtils before calling unlink.");return e._unlinkFrom("facebook",t)},_getAuthProvider:()=>provider},DefaultController$3={get(e,t,r){let i="hooks/"+e;return t&&(i+="/"+t,r&&(i+="/"+r)),this.sendRequest("GET",i)},create(e){let t;if(e.functionName&&e.url)t="hooks/functions";else{if(!(e.className&&e.triggerName&&e.url))return Promise.reject({error:"invalid hook declaration",code:143});t="hooks/triggers"}return this.sendRequest("POST",t,e)},remove(e){let t;if(e.functionName)t="hooks/functions/"+e.functionName,delete e.functionName;else{if(!e.className||!e.triggerName)return Promise.reject({error:"invalid hook declaration",code:143});t="hooks/triggers/"+e.className+"/"+e.triggerName,delete e.className,delete e.triggerName}return this.sendRequest("PUT",t,{__op:"Delete"})},update(e){let t;if(e.functionName&&e.url)t="hooks/functions/"+e.functionName,delete e.functionName;else{if(!(e.className&&e.triggerName&&e.url))return Promise.reject({error:"invalid hook declaration",code:143});t="hooks/triggers/"+e.className+"/"+e.triggerName,delete e.className,delete e.triggerName}return this.sendRequest("PUT",t,e)},sendRequest:(e,t,r)=>CoreManager.getRESTController().request(e,t,r,{useMasterKey:!0}).then((e=>{const t=decode(e);return t?Promise.resolve(t):Promise.reject(new ParseError(ParseError.INVALID_JSON,"The server returned an invalid response."))}))};CoreManager.setHooksController(DefaultController$3);const LocalDatastoreController$1={async fromPinWithName(e){const t=await Storage.getItemAsync(e);if(!t)return[];return JSON.parse(t)},pinWithName(e,t){const r=JSON.stringify(t);return Storage.setItemAsync(e,r)},unPinWithName:e=>Storage.removeItemAsync(e),getAllContents:async()=>(await Storage.getAllKeysAsync()).reduce((async(e,t)=>{const r=await e;if(isLocalDatastoreKey(t)){const e=await Storage.getItemAsync(t);try{r[t]=JSON.parse(e)}catch(e){console.error("Error getAllContents: ",e)}}return r}),Promise.resolve({})),getRawStorage:async()=>(await Storage.getAllKeysAsync()).reduce((async(e,t)=>{const r=await e,i=await Storage.getItemAsync(t);return r[t]=i,r}),Promise.resolve({})),async clear(){const e=await Storage.getAllKeysAsync(),t=[];for(const r of e)isLocalDatastoreKey(r)&&t.push(r);const r=t.map(this.unPinWithName);return Promise.all(r)}};let LocalDatastoreController=LocalDatastoreController$1;const LocalDatastore={isEnabled:!1,isSyncing:!1,fromPinWithName:e=>CoreManager.getLocalDatastoreController().fromPinWithName(e),pinWithName:async(e,t)=>CoreManager.getLocalDatastoreController().pinWithName(e,t),unPinWithName:async e=>CoreManager.getLocalDatastoreController().unPinWithName(e),_getAllContents:()=>CoreManager.getLocalDatastoreController().getAllContents(),_getRawStorage:async()=>CoreManager.getLocalDatastoreController().getRawStorage(),_clear:async()=>CoreManager.getLocalDatastoreController().clear(),async _handlePinAllWithName(e,t){const r=this.getPinName(e),i=[],n=[];for(const e of t){const t=this._getChildren(e),r=this.getKeyForObject(e),o=e._toFullJSON(void 0,!0);e._localId&&(o._localId=e._localId),t[r]=o;for(const e in t)n.push(e),i.push(this.pinWithName(e,[t[e]]))}const o=this.fromPinWithName(r),[s]=await Promise.all([o,i]),a=[...new Set([...s||[],...n])];return this.pinWithName(r,a)},async _handleUnPinAllWithName(e,t){const r=await this._getAllContents(),i=this.getPinName(e),n=[];let o=[];for(const e of t){const t=this._getChildren(e),r=this.getKeyForObject(e);o.push(r,...Object.keys(t))}o=[...new Set(o)];let s=r[i]||[];s=s.filter((e=>!o.includes(e))),0==s.length?(n.push(this.unPinWithName(i)),delete r[i]):(n.push(this.pinWithName(i,s)),r[i]=s);for(const e of o){let t=!1;for(const i in r)if(i===DEFAULT_PIN||i.startsWith(PIN_PREFIX)){if((r[i]||[]).includes(e)){t=!0;break}}t||n.push(this.unPinWithName(e))}return Promise.all(n)},_getChildren(e){const t={},r=e._toFullJSON(void 0,!0);for(const e in r)r[e]&&r[e].__type&&"Object"===r[e].__type&&this._traverse(r[e],t);return t},_traverse(e,t){if(e.objectId){{const r=this.getKeyForObject(e);if(t[r])return;t[r]=e}for(const r in e){let i=e[r];e[r]||(i=e),i.__type&&"Object"===i.__type&&this._traverse(i,t)}}},async _serializeObjectsFromPinName(e){const t=await this._getAllContents(),r=[];for(const e in t)e.startsWith(OBJECT_PREFIX)&&r.push(t[e][0]);if(!e)return r;const i=t[this.getPinName(e)];if(!Array.isArray(i))return[];const n=i.map((e=>this.fromPinWithName(e)));let o=await Promise.all(n);return o=[].concat(...o),o.filter((e=>null!=e))},async _serializeObject(e,t){let r=t;if(r||(r=await this._getAllContents()),!r[e]||0===r[e].length)return null;const i=r[e][0],n=[],o={};let s=0;for(o[s]=i,n.push(s);0!==n.length;){const e=o[n.shift()];for(const t in e){const i=e[t];if(i.__type&&"Object"===i.__type){const a=this.getKeyForObject(i);if(r[a]&&r[a].length>0){const i=r[a][0];s++,o[s]=i,e[t]=i,n.push(s)}}}}return i},async _updateObjectIfPinned(e){if(!this.isEnabled)return;const t=this.getKeyForObject(e),r=await this.fromPinWithName(t);return r&&0!==r.length?this.pinWithName(t,[e._toFullJSON()]):void 0},async _destroyObjectIfPinned(e){if(!this.isEnabled)return;const t=await this._getAllContents(),r=this.getKeyForObject(e);if(!t[r])return;const i=[this.unPinWithName(r)];delete t[r];for(const e in t)if(e===DEFAULT_PIN||e.startsWith(PIN_PREFIX)){let n=t[e]||[];n.includes(r)&&(n=n.filter((e=>e!==r)),0==n.length?(i.push(this.unPinWithName(e)),delete t[e]):(i.push(this.pinWithName(e,n)),t[e]=n))}return Promise.all(i)},async _updateLocalIdForObject(e,t){if(!this.isEnabled)return;const r=`${OBJECT_PREFIX}${t.className}_${e}`,i=this.getKeyForObject(t),n=await this.fromPinWithName(r);if(!n||0===n.length)return;const o=[this.unPinWithName(r),this.pinWithName(i,n)],s=await this._getAllContents();for(const e in s)if(e===DEFAULT_PIN||e.startsWith(PIN_PREFIX)){let t=s[e]||[];t.includes(r)&&(t=t.filter((e=>e!==r)),t.push(i),o.push(this.pinWithName(e,t)),s[e]=t)}return Promise.all(o)},async updateFromServer(){if(!this.checkIfEnabled()||this.isSyncing)return;const e=await this._getAllContents(),t=[];for(const r in e)r.startsWith(OBJECT_PREFIX)&&t.push(r);if(0===t.length)return;this.isSyncing=!0;const r={};for(const e of t){let[,,t,i]=e.split("_");5===e.split("_").length&&"User"===e.split("_")[3]&&(t="_User",i=e.split("_")[4]),i.startsWith("local")||(t in r||(r[t]=new Set),r[t].add(i))}const i=Object.keys(r).map((e=>{const t=Array.from(r[e]),i=new ParseQuery(e);return i.limit(t.length),1===t.length?i.equalTo("objectId",t[0]):i.containedIn("objectId",t),i.find()}));try{const e=await Promise.all(i),t=[].concat.apply([],e).map((e=>{const t=this.getKeyForObject(e);return this.pinWithName(t,e._toFullJSON())}));await Promise.all(t),this.isSyncing=!1}catch(e){console.error("Error syncing LocalDatastore: ",e),this.isSyncing=!1}},getKeyForObject(e){const t=e.objectId||e._getId();return`${OBJECT_PREFIX}${e.className}_${t}`},getPinName:e=>e&&e!==DEFAULT_PIN?PIN_PREFIX+e:DEFAULT_PIN,checkIfEnabled(){return this.isEnabled||console.error("Parse.enableLocalDatastore() must be called first"),this.isEnabled}};function send(e,t={}){if(e.where&&e.where instanceof ParseQuery&&(e.where=e.where.toJSON().where),e.push_time&&"object"==typeof e.push_time&&(e.push_time=e.push_time.toJSON()),e.expiration_time&&"object"==typeof 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.");const r={useMasterKey:!0};return Object.hasOwn(t,"useMasterKey")&&(r.useMasterKey=t.useMasterKey),CoreManager.getPushController().send(e,r)}function getPushStatus(e,t={}){const r={useMasterKey:!0};Object.hasOwn(t,"useMasterKey")&&(r.useMasterKey=t.useMasterKey);return new ParseQuery("_PushStatus").get(e,r)}CoreManager.setLocalDatastoreController(LocalDatastoreController),CoreManager.setLocalDatastore(LocalDatastore);const DefaultController$2={async send(e,t){var r;t.returnStatus=!0;return null==(r=(await CoreManager.getRESTController().request("POST","push",e,t))._headers)?void 0:r["X-Parse-Push-Status-Id"]}};CoreManager.setPushController(DefaultController$2);const Push=Object.freeze(Object.defineProperty({__proto__:null,getPushStatus:getPushStatus,send:send},Symbol.toStringTag,{value:"Module"})),FIELD_TYPES=["String","Number","Boolean","Bytes","Date","File","GeoPoint","Polygon","Array","Object","Pointer","Relation"];class ParseSchema{constructor(e){"string"==typeof e&&("User"===e&&CoreManager.get("PERFORM_USER_REWRITE")?this.className="_User":this.className=e),this._fields={},this._indexes={}}static all(){return CoreManager.getSchemaController().get("").then((e=>{if(0===e.results.length)throw new Error("Schema not found.");return e.results}))}get(){this.assertClassName();return CoreManager.getSchemaController().get(this.className).then((e=>{if(!e)throw new Error("Schema not found.");return e}))}save(){this.assertClassName();const e=CoreManager.getSchemaController(),t={className:this.className,fields:this._fields,indexes:this._indexes,classLevelPermissions:this._clp};return e.create(this.className,t)}update(){this.assertClassName();const e=CoreManager.getSchemaController(),t={className:this.className,fields:this._fields,indexes:this._indexes,classLevelPermissions:this._clp};return this._fields={},this._indexes={},e.update(this.className,t)}delete(){this.assertClassName();return CoreManager.getSchemaController().delete(this.className)}purge(){this.assertClassName();return CoreManager.getSchemaController().purge(this.className)}assertClassName(){if(!this.className)throw new Error("You must set a Class Name before making any request.")}setCLP(e){return this._clp=e instanceof ParseCLP?e.toJSON():e,this}addField(e,t,r){if(t=t||"String",r=r||{},!e)throw new Error("field name may not be null.");if(-1===FIELD_TYPES.indexOf(t))throw new Error(`${t} is not a valid type.`);if("Pointer"===t)return this.addPointer(e,r.targetClass,r);if("Relation"===t)return this.addRelation(e,r.targetClass);const i={type:t};return"boolean"==typeof r.required&&(i.required=r.required),void 0!==r.defaultValue&&(i.defaultValue=r.defaultValue),"Date"===t&&r&&r.defaultValue&&(i.defaultValue={__type:"Date",iso:new Date(r.defaultValue)}),"Bytes"===t&&r&&r.defaultValue&&(i.defaultValue={__type:"Bytes",base64:r.defaultValue}),this._fields[e]=i,this}addIndex(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}addString(e,t){return this.addField(e,"String",t)}addNumber(e,t){return this.addField(e,"Number",t)}addBoolean(e,t){return this.addField(e,"Boolean",t)}addBytes(e,t){return this.addField(e,"Bytes",t)}addDate(e,t){return this.addField(e,"Date",t)}addFile(e,t){return this.addField(e,"File",t)}addGeoPoint(e,t){return this.addField(e,"GeoPoint",t)}addPolygon(e,t){return this.addField(e,"Polygon",t)}addArray(e,t){return this.addField(e,"Array",t)}addObject(e,t){return this.addField(e,"Object",t)}addPointer(e,t,r){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.");const i={type:"Pointer",targetClass:t};return"boolean"==typeof(null==r?void 0:r.required)&&(i.required=r.required),void 0!==(null==r?void 0:r.defaultValue)&&(i.defaultValue=r.defaultValue,r.defaultValue instanceof ParseObject&&(i.defaultValue=r.defaultValue.toPointer())),this._fields[e]=i,this}addRelation(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}deleteField(e){return this._fields[e]={__op:"Delete"},this}deleteIndex(e){return this._indexes[e]={__op:"Delete"},this}}const DefaultController$1={send:(e,t,r={})=>CoreManager.getRESTController().request(t,`schemas/${e}`,r,{useMasterKey:!0}),get(e){return this.send(e,"GET")},create(e,t){return this.send(e,"POST",t)},update(e,t){return this.send(e,"PUT",t)},delete(e){return this.send(e,"DELETE")},purge:e=>CoreManager.getRESTController().request("DELETE",`purge/${e}`,{},{useMasterKey:!0})};CoreManager.setSchemaController(DefaultController$1);class ParseSession extends ParseObject{constructor(e){if(super("_Session"),e&&"object"==typeof e)try{this.set(e||{})}catch(e){throw new Error("Can't create an invalid Session")}}getSessionToken(){const e=this.get("sessionToken");return"string"==typeof e?e:""}static readOnlyAttributes(){return["createdWith","expiresAt","installationId","restricted","sessionToken","user"]}static current(e){const t=CoreManager.getSessionController(),r=ParseObject._getRequestOptions(e);return ParseUser.currentAsync().then((e=>e?(r.sessionToken=e.getSessionToken(),t.getSession(r)):Promise.reject("There is no current user.")))}static isCurrentSessionRevocable(){const e=ParseUser.current();return!!e&&isRevocableSession(e.getSessionToken()||"")}}ParseObject.registerSubclass("_Session",ParseSession);const DefaultController={getSession(e){const t=CoreManager.getRESTController(),r=new ParseSession;return t.request("GET","sessions/me",{},e).then((e=>(r._finishFetch(e),r._setExisted(!0),r)))}};CoreManager.setSessionController(DefaultController);class LiveQuerySubscription{constructor(e,t,r){this.id=e,this.query=t,this.sessionToken=r,this.subscribePromise=resolvingPromise(),this.unsubscribePromise=resolvingPromise(),this.subscribed=!1;const i=CoreManager.getEventEmitter();this.emitter=new i,this.on=(e,t)=>this.emitter.on(e,t),this.emit=(e,...t)=>this.emitter.emit(e,...t),this.on("error",(()=>{}))}unsubscribe(){return CoreManager.getLiveQueryController().getDefaultLiveQueryClient().then((e=>(this.emit("close"),e.unsubscribe(this))))}}const CLIENT_STATE={INITIALIZED:"initialized",CONNECTING:"connecting",CONNECTED:"connected",CLOSED:"closed",RECONNECTING:"reconnecting",DISCONNECTED:"disconnected"},OP_TYPES={CONNECT:"connect",SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe"},OP_EVENTS={CONNECTED:"connected",SUBSCRIBED:"subscribed",UNSUBSCRIBED:"unsubscribed",ERROR:"error"},CLIENT_EMMITER_TYPES={CLOSE:"close",ERROR:"error",OPEN:"open"},SUBSCRIPTION_EMMITER_TYPES={OPEN:"open",CLOSE:"close",ERROR:"error"},generateInterval=e=>Math.random()*Math.min(30,Math.pow(2,e)-1)*1e3;class LiveQueryClient{constructor({applicationId:e,serverURL:t,javascriptKey:r,masterKey:i,sessionToken:n,installationId:o}){if(!t||0!==t.indexOf("ws"))throw new Error("You need to set a proper Parse LiveQuery server url before using LiveQueryClient");this.reconnectHandle=null,this.attempts=1,this.id=0,this.requestId=1,this.serverURL=t,this.applicationId=e,this.javascriptKey=r||void 0,this.masterKey=i||void 0,this.sessionToken=n||void 0,this.installationId=o||void 0,this.additionalProperties=!0,this.connectPromise=resolvingPromise(),this.subscriptions=new Map,this.state=CLIENT_STATE.INITIALIZED;const s=CoreManager.getEventEmitter();this.emitter=new s,this.on=(e,t)=>this.emitter.on(e,t),this.emit=(e,...t)=>this.emitter.emit(e,...t),this.on("error",(()=>{}))}shouldOpen(){return this.state===CLIENT_STATE.INITIALIZED||this.state===CLIENT_STATE.DISCONNECTED}subscribe(e,t){var r,i;if(!e)return;const n=e.className,o=e.toJSON(),s=o.where,a=null==(r=o.keys)?void 0:r.split(","),u=null==(i=o.watch)?void 0:i.split(","),h={op:OP_TYPES.SUBSCRIBE,requestId:this.requestId,query:{className:n,where:s,keys:a,watch:u},sessionToken:void 0};t&&(h.sessionToken=t);const f=new LiveQuerySubscription(this.requestId,e,t);return this.subscriptions.set(this.requestId,f),this.requestId+=1,this.connectPromise.then((()=>{this.socket.send(JSON.stringify(h))})).catch((e=>{f.subscribePromise.reject(e)})),f}async unsubscribe(e){if(!e)return;const t={op:OP_TYPES.UNSUBSCRIBE,requestId:e.id};return this.connectPromise.then((()=>this.socket.send(JSON.stringify(t)))).then((()=>e.unsubscribePromise))}open(){const e=CoreManager.getWebSocketController();e?(this.state!==CLIENT_STATE.RECONNECTING&&(this.state=CLIENT_STATE.CONNECTING),this.socket=new e(this.serverURL),this.socket.closingPromise=resolvingPromise(),this.socket.onopen=()=>{this._handleWebSocketOpen()},this.socket.onmessage=e=>{this._handleWebSocketMessage(e)},this.socket.onclose=e=>{var t;null==(t=this.socket.closingPromise)||t.resolve(e),this._handleWebSocketClose()},this.socket.onerror=e=>{this._handleWebSocketError(e)}):this.emit(CLIENT_EMMITER_TYPES.ERROR,"Can not find WebSocket implementation")}resubscribe(){this.subscriptions.forEach(((e,t)=>{var r,i;const n=e.query,o=n.toJSON(),s=o.where,a=null==(r=o.keys)?void 0:r.split(","),u=null==(i=o.watch)?void 0:i.split(","),h=n.className,f=e.sessionToken,l={op:OP_TYPES.SUBSCRIBE,requestId:t,query:{className:h,where:s,keys:a,watch:u},sessionToken:void 0};f&&(l.sessionToken=f),this.connectPromise.then((()=>{this.socket.send(JSON.stringify(l))}))}))}async close(){var e,t;if(this.state!==CLIENT_STATE.INITIALIZED&&this.state!==CLIENT_STATE.DISCONNECTED){this.state=CLIENT_STATE.DISCONNECTED,null==(e=this.socket)||e.close();for(const e of this.subscriptions.values())e.subscribed=!1,e.emit(SUBSCRIPTION_EMMITER_TYPES.CLOSE);return this._handleReset(),this.emit(CLIENT_EMMITER_TYPES.CLOSE),null==(t=this.socket)?void 0:t.closingPromise}}_handleReset(){this.attempts=1,this.id=0,this.requestId=1,this.connectPromise=resolvingPromise(),this.subscriptions=new Map}_handleWebSocketOpen(){const e={op:OP_TYPES.CONNECT,applicationId:this.applicationId,javascriptKey:this.javascriptKey,masterKey:this.masterKey,sessionToken:this.sessionToken,installationId:void 0};this.additionalProperties&&(e.installationId=this.installationId),this.socket.send(JSON.stringify(e))}_handleWebSocketMessage(e){let t=e.data;"string"==typeof t&&(t=JSON.parse(t));let r=null;t.requestId&&(r=this.subscriptions.get(t.requestId)||null);const i={clientId:t.clientId,installationId:t.installationId};switch(t.op){case OP_EVENTS.CONNECTED:this.state===CLIENT_STATE.RECONNECTING&&this.resubscribe(),this.emit(CLIENT_EMMITER_TYPES.OPEN),this.id=t.clientId,this.connectPromise.resolve(),this.state=CLIENT_STATE.CONNECTED;break;case OP_EVENTS.SUBSCRIBED:r&&(this.attempts=1,r.subscribed=!0,r.subscribePromise.resolve(),setTimeout((()=>r.emit(SUBSCRIPTION_EMMITER_TYPES.OPEN,i)),200));break;case OP_EVENTS.ERROR:{const e=new ParseError(t.code,t.error);this.id||(this.connectPromise.reject(e),this.state=CLIENT_STATE.DISCONNECTED),t.requestId?r&&(r.subscribePromise.reject(e),setTimeout((()=>r.emit(SUBSCRIPTION_EMMITER_TYPES.ERROR,t.error)),200)):this.emit(CLIENT_EMMITER_TYPES.ERROR,t.error),"Additional properties not allowed"===t.error&&(this.additionalProperties=!1),t.reconnect&&this._handleReconnect();break}case OP_EVENTS.UNSUBSCRIBED:r&&(this.subscriptions.delete(t.requestId),r.subscribed=!1,r.unsubscribePromise.resolve());break;default:{if(!r)break;let e=!1;if(t.original){e=!0,delete t.original.__type;for(const e in t.original)e in t.object||(t.object[e]=void 0);t.original=ParseObject.fromJSON(t.original,!1)}delete t.object.__type;const n=ParseObject.fromJSON(t.object,(!r.query||!r.query._select)&&e);t.original?r.emit(t.op,n,t.original,i):r.emit(t.op,n,i);const o=CoreManager.getLocalDatastore();e&&o.isEnabled&&o._updateObjectIfPinned(n).then((()=>{}))}}}_handleWebSocketClose(){if(this.state!==CLIENT_STATE.DISCONNECTED){this.state=CLIENT_STATE.CLOSED,this.emit(CLIENT_EMMITER_TYPES.CLOSE);for(const e of this.subscriptions.values())e.emit(SUBSCRIPTION_EMMITER_TYPES.CLOSE);this._handleReconnect()}}_handleWebSocketError(e){this.emit(CLIENT_EMMITER_TYPES.ERROR,e);for(const t of this.subscriptions.values())t.emit(SUBSCRIPTION_EMMITER_TYPES.ERROR,e);this._handleReconnect()}_handleReconnect(){if(this.state===CLIENT_STATE.DISCONNECTED)return;this.state=CLIENT_STATE.RECONNECTING;const e=generateInterval(this.attempts);this.reconnectHandle&&clearTimeout(this.reconnectHandle),this.reconnectHandle=setTimeout((()=>{this.attempts++,this.connectPromise=resolvingPromise(),this.open()}).bind(this),e)}}function getLiveQueryClient(){return CoreManager.getLiveQueryController().getDefaultLiveQueryClient()}class LiveQuery{constructor(){const e=CoreManager.getEventEmitter();this.emitter=new e,this.on=(e,t)=>this.emitter.on(e,t),this.emit=(e,...t)=>this.emitter.emit(e,...t),this.on("error",(()=>{}))}async open(){(await getLiveQueryClient()).open()}async close(){(await getLiveQueryClient()).close()}}let defaultLiveQueryClient;const DefaultLiveQueryController={setDefaultLiveQueryClient(e){defaultLiveQueryClient=e},async getDefaultLiveQueryClient(){if(defaultLiveQueryClient)return defaultLiveQueryClient;const[e,t]=await Promise.all([CoreManager.getUserController().currentUserAsync(),CoreManager.getInstallationController().currentInstallationId()]),r=e?e.getSessionToken():void 0;let i=CoreManager.get("LIVEQUERY_SERVER_URL");if(i&&0!==i.indexOf("ws"))throw new Error("You need to set a proper Parse LiveQuery server url before using LiveQueryClient");if(!i){const e=CoreManager.get("SERVER_URL");i=(0===e.indexOf("https")?"wss://":"ws://")+e.replace(/^https?:\/\//,""),CoreManager.set("LIVEQUERY_SERVER_URL",i)}const n=CoreManager.get("APPLICATION_ID"),o=CoreManager.get("JAVASCRIPT_KEY"),s=CoreManager.get("MASTER_KEY");defaultLiveQueryClient=new LiveQueryClient({applicationId:n,serverURL:i,javascriptKey:o,masterKey:s,sessionToken:r,installationId:t});const a=CoreManager.getLiveQuery();return defaultLiveQueryClient.on("error",(e=>{a.emit("error",e)})),defaultLiveQueryClient.on("open",(()=>{a.emit("open")})),defaultLiveQueryClient.on("close",(()=>{a.emit("close")})),defaultLiveQueryClient},_clearCachedDefaultClient(){defaultLiveQueryClient=null}};CoreManager.setLiveQueryController(DefaultLiveQueryController);const StorageController$3={async:0,getItem:e=>localStorage.getItem(e),setItem(e,t){try{localStorage.setItem(e,t)}catch(e){console.log(e.message)}},removeItem(e){localStorage.removeItem(e)},getAllKeys(){const e=[];for(let t=0;t<localStorage.length;t+=1)e.push(localStorage.key(t));return e},clear(){localStorage.clear()}},memMap={},StorageController$2={async:0,getItem:e=>Object.hasOwn(memMap,e)?memMap[e]:null,setItem(e,t){memMap[e]=String(t)},removeItem(e){delete memMap[e]},getAllKeys:()=>Object.keys(memMap),clear(){for(const e in memMap)Object.hasOwn(memMap,e)&&delete memMap[e]}};let StorageController=StorageController$2;StorageController=StorageController$3;const StorageController$1=StorageController;var browser,hasRequiredBrowser;function requireBrowser(){return hasRequiredBrowser?browser:(hasRequiredBrowser=1,browser=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")})}var browserExports=requireBrowser();const ws=getDefaultExportFromCjs(browserExports);class SocketWeapp{constructor(e){this.onopen=()=>{},this.onmessage=()=>{},this.onclose=()=>{},this.onerror=()=>{},wx.onSocketOpen((()=>{this.onopen()})),wx.onSocketMessage((e=>{this.onmessage(e)})),wx.onSocketClose((e=>{this.onclose(e)})),wx.onSocketError((e=>{this.onerror(e)})),wx.connectSocket({url:e})}send(e){wx.sendSocketMessage({data:e})}close(){wx.closeSocket()}}let WebSocketController;try{WebSocketController="function"==typeof WebSocket||"object"==typeof WebSocket?WebSocket:null}catch(e){}const WebSocketController$1=WebSocketController;var define_process_env_default={};const Parse={ACL:ParseACL,Analytics:Analytics,AnonymousUtils:AnonymousUtils,Cloud:Cloud,CLP:ParseCLP,CoreManager:CoreManager,Config:ParseConfig,Error:ParseError,FacebookUtils:FacebookUtils,File:ParseFile,GeoPoint:ParseGeoPoint,Polygon:ParsePolygon,Installation:ParseInstallation,LocalDatastore:LocalDatastore,Object:ParseObject,Op:{Set:SetOp,Unset:UnsetOp,Increment:IncrementOp,Add:AddOp,Remove:RemoveOp,AddUnique:AddUniqueOp,Relation:RelationOp},Push:Push,Query:ParseQuery,Relation:ParseRelation,Role:ParseRole,Schema:ParseSchema,Session:ParseSession,Storage:Storage,User:ParseUser,LiveQueryClient:LiveQueryClient,IndexedDB:void 0,Hooks:void 0,Parse:void 0,set EventuallyQueue(e){CoreManager.setEventuallyQueue(e)},get EventuallyQueue(){return CoreManager.getEventuallyQueue()},initialize(e,t){CoreManager.get("IS_NODE")&&!define_process_env_default.SERVER_RENDERING&&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."),Parse._initialize(e,t)},_initialize(e,t,r,i){CoreManager.set("APPLICATION_ID",e),CoreManager.set("JAVASCRIPT_KEY",t),CoreManager.set("MAINTENANCE_KEY",i),CoreManager.set("MASTER_KEY",r),CoreManager.set("USE_MASTER_KEY",!1),CoreManager.setIfNeeded("EventEmitter",EventEmitter$1),CoreManager.setIfNeeded("LiveQuery",new LiveQuery),CoreManager.setIfNeeded("CryptoController",CryptoController),CoreManager.setIfNeeded("EventuallyQueue",EventuallyQueue),CoreManager.setIfNeeded("InstallationController",InstallationController),CoreManager.setIfNeeded("LocalDatastoreController",LocalDatastoreController),CoreManager.setIfNeeded("StorageController",StorageController$1),CoreManager.setIfNeeded("WebSocketController",WebSocketController$1),Parse.IndexedDB=CoreManager.setIfNeeded("IndexedDBStorageController",IndexedDBStorageController$1)},setAsyncStorage(e){CoreManager.setAsyncStorage(e)},setLocalDatastoreController(e){CoreManager.setLocalDatastoreController(e)},getServerHealth:()=>CoreManager.getRESTController().request("GET","health"),set applicationId(e){CoreManager.set("APPLICATION_ID",e)},get applicationId(){return CoreManager.get("APPLICATION_ID")},set javaScriptKey(e){CoreManager.set("JAVASCRIPT_KEY",e)},get javaScriptKey(){return CoreManager.get("JAVASCRIPT_KEY")},set masterKey(e){CoreManager.set("MASTER_KEY",e)},get masterKey(){return CoreManager.get("MASTER_KEY")},set maintenanceKey(e){CoreManager.set("MAINTENANCE_KEY",e)},get maintenanceKey(){return CoreManager.get("MAINTENANCE_KEY")},set serverURL(e){CoreManager.set("SERVER_URL",e)},get serverURL(){return CoreManager.get("SERVER_URL")},set serverAuthToken(e){CoreManager.set("SERVER_AUTH_TOKEN",e)},get serverAuthToken(){return CoreManager.get("SERVER_AUTH_TOKEN")},set serverAuthType(e){CoreManager.set("SERVER_AUTH_TYPE",e)},get serverAuthType(){return CoreManager.get("SERVER_AUTH_TYPE")},set LiveQuery(e){CoreManager.setLiveQuery(e)},get LiveQuery(){return CoreManager.getLiveQuery()},set liveQueryServerURL(e){CoreManager.set("LIVEQUERY_SERVER_URL",e)},get liveQueryServerURL(){return CoreManager.get("LIVEQUERY_SERVER_URL")},set encryptedUser(e){CoreManager.set("ENCRYPTED_USER",e)},get encryptedUser(){return CoreManager.get("ENCRYPTED_USER")},set secret(e){CoreManager.set("ENCRYPTED_KEY",e)},get secret(){return CoreManager.get("ENCRYPTED_KEY")},set idempotency(e){CoreManager.set("IDEMPOTENCY",e)},get idempotency(){return CoreManager.get("IDEMPOTENCY")},set allowCustomObjectId(e){CoreManager.set("ALLOW_CUSTOM_OBJECT_ID",e)},get allowCustomObjectId(){return CoreManager.get("ALLOW_CUSTOM_OBJECT_ID")},_request:(...e)=>CoreManager.getRESTController().request.apply(null,e),_ajax:(...e)=>CoreManager.getRESTController().ajax.apply(null,e),_decode:(e,t)=>decode(t),_encode:(e,t,r)=>encode$1(e,r),_getInstallationId:()=>CoreManager.getInstallationController().currentInstallationId(),enableLocalDatastore(e,t){this.applicationId?this.LocalDatastore.isEnabled||(this.LocalDatastore.isEnabled=!0,(e||void 0===e)&&CoreManager.getEventuallyQueue().poll(t||2e3)):console.log("'enableLocalDataStore' must be called after 'initialize'")},isLocalDatastoreEnabled(){return this.LocalDatastore.isEnabled},dumpLocalDatastore(){return this.LocalDatastore.isEnabled?Parse.LocalDatastore._getAllContents():(console.log("Parse.enableLocalDatastore() must be called first"),Promise.resolve({}))},enableEncryptedUser(){this.encryptedUser=!0},isEncryptedUserEnabled(){return this.encryptedUser}};CoreManager.setRESTController(RESTController),globalThis.Parse=Parse,Parse.Parse=Parse}));
|