react-native-global-state-hooks 8.0.2 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GlobalStore.d.ts +1 -0
- package/GlobalStore.js +1 -1
- package/GlobalStoreAbstract.d.ts +1 -0
- package/GlobalStoreAbstract.js +1 -1
- package/README.md +216 -407
- package/asyncStorageWrapper.d.ts +1 -1
- package/asyncStorageWrapper.js +1 -1
- package/bundle.js +1 -1
- package/createContext.d.ts +1 -1
- package/createContext.js +1 -1
- package/createCustomGlobalState.d.ts +1 -0
- package/createCustomGlobalState.js +1 -1
- package/createGlobalState.d.ts +1 -0
- package/createGlobalState.js +1 -1
- package/debounce.d.ts +1 -1
- package/debounce.js +1 -1
- package/getAsyncStorageItem.d.ts +1 -0
- package/getAsyncStorageItem.js +1 -1
- package/index.d.ts +1 -3
- package/isRecord.d.ts +1 -1
- package/isRecord.js +1 -1
- package/package.json +3 -13
- package/setAsyncStorageItem.d.ts +1 -0
- package/setAsyncStorageItem.js +1 -1
- package/shallowCompare.d.ts +1 -1
- package/shallowCompare.js +1 -1
- package/throwWrongKeyOnActionCollectionConfig.d.ts +1 -1
- package/throwWrongKeyOnActionCollectionConfig.js +1 -1
- package/uniqueId.d.ts +1 -1
- package/uniqueId.js +1 -1
- package/uniqueSymbol.d.ts +1 -1
- package/uniqueSymbol.js +1 -1
- package/useStableState.d.ts +1 -0
- package/useStableState.js +1 -0
- package/webpack.config.js +1 -3
- package/combineRetrieverAsynchronously.d.ts +0 -1
- package/combineRetrieverAsynchronously.js +0 -1
- package/combineRetrieverEmitterAsynchronously.d.ts +0 -1
- package/combineRetrieverEmitterAsynchronously.js +0 -1
- package/useConstantValueRef.d.ts +0 -1
- package/useConstantValueRef.js +0 -1
package/GlobalStore.d.ts
CHANGED
|
@@ -27,3 +27,4 @@ export declare class GlobalStore<State, Metadata extends BaseMetadata | unknown,
|
|
|
27
27
|
protected onInit: (parameters: StoreTools<State, StateMeta<Metadata>>) => void;
|
|
28
28
|
protected onStateChanged: (args: StoreTools<State, StateMeta<Metadata>> & StateChanges<State>) => void;
|
|
29
29
|
}
|
|
30
|
+
export default GlobalStore;
|
package/GlobalStore.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@react-native-async-storage/async-storage"),require("react")):"function"==typeof define&&define.amd?define(["@react-native-async-storage/async-storage","react"],e):"object"==typeof exports?exports["react-native-global-state-hooks"]=e(require("@react-native-async-storage/async-storage"),require("react")):t["react-native-global-state-hooks"]=e(t["@react-native-async-storage/async-storage"],t.react)}(this,((t,e)=>(()=>{var r={118:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),u=new M(n||[]);return a(i,"_invoke",{value:L(t,r,u)}),i}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var v="suspendedStart",h="suspendedYield",d="executing",b="completed",m={};function g(){}function S(){}function w(){}var O={};f(O,c,(function(){return this}));var j=Object.getPrototypeOf,x=j&&j(j(N([])));x&&x!==r&&i.call(x,c)&&(O=x);var _=w.prototype=g.prototype=Object.create(O);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,a,u,c){var s=y(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):e.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return r("throw",t,u,c)}))}c(s.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function L(e,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=y(e,r,n);if("normal"===s.type){if(o=n.done?b:h,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=y(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return S.prototype=w,a(_,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:S,configurable:!0}),S.displayName=f(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===S||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},E(P.prototype),f(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new P(p(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(_),f(_,l,"Generator"),f(_,c,(function(){return this})),f(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}var i=Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]},a=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return a(e,t),e},c=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.asyncStorageWrapper=void 0,e.asyncStorageWrapper=function(){var t,e="pending",n=null;c(void 0,void 0,void 0,o().mark((function i(){var a,c,s,l,f;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,a=Promise.resolve().then((function(){return u(r(878))})),t=a,o.next=5,a;case 5:c=o.sent,s=c.default,l=s.getItem,f=s.setItem,l.bind(s),f.bind(s),n={getItem:l,setItem:f},e="resolved",o.next=18;break;case 14:o.prev=14,o.t0=o.catch(0),e="rejected";case 18:return o.prev=18,t=null,o.finish(18);case 21:case"end":return o.stop()}}),i,null,[[0,14,18,21]])})));var i=function(){throw new Error("[AsyncStorageManager Not Found] \n\n Please install the react-native-async-storage/async-storage to be use as the default async storage manager or\n add an AsyncStorageManager using the asyncStorageWrapper.addAsyncStorageManager method before attempting to get or set items.")},a=function(){return c(void 0,void 0,void 0,o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("pending"!==e||!t){r.next=2;break}return r.abrupt("return",t);case 2:if("rejected"!==e){r.next=4;break}return r.abrupt("return",t.catch((function(t){throw t})));case 4:return n||i(),r.abrupt("return",n);case 6:case"end":return r.stop()}}),r)})))};return{getItem:function(t){return c(void 0,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a();case 2:return e.abrupt("return",n.getItem(t));case 3:case"end":return e.stop()}}),e)})))},setItem:function(t,e){return c(void 0,void 0,void 0,o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,a();case 2:return r.abrupt("return",n.setItem(t,e));case 3:case"end":return r.stop()}}),r)})))},addAsyncStorageManager:function(r){return c(void 0,void 0,void 0,o().mark((function i(){var a;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,"pending"!==e||!t){o.next=4;break}return o.next=4,t.catch((function(){}));case 4:return e="pending",a=r(),t=a,o.next=9,a;case 9:n=o.sent,e="resolved",o.next=18;break;case 13:throw o.prev=13,o.t0=o.catch(0),t=null,e="rejected",o.t0;case 18:case"end":return o.stop()}}),i,null,[[0,13]])})))}}}()},600:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),u=new M(n||[]);return a(i,"_invoke",{value:L(t,r,u)}),i}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var v="suspendedStart",h="suspendedYield",d="executing",b="completed",m={};function g(){}function S(){}function w(){}var O={};f(O,c,(function(){return this}));var j=Object.getPrototypeOf,x=j&&j(j(N([])));x&&x!==r&&i.call(x,c)&&(O=x);var _=w.prototype=g.prototype=Object.create(O);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,a,u,c){var s=y(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):e.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return r("throw",t,u,c)}))}c(s.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function L(e,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=y(e,r,n);if("normal"===s.type){if(o=n.done?b:h,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=y(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return S.prototype=w,a(_,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:S,configurable:!0}),S.displayName=f(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===S||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},E(P.prototype),f(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new P(p(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(_),f(_,l,"Generator"),f(_,c,(function(){return this})),f(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}var i=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.getAsyncStorageItem=void 0;var a=r(118),u=r(129);e.getAsyncStorageItem=function(t){return i(void 0,void 0,void 0,o().mark((function e(){var r,n,i,c,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.key){e.next=3;break}return e.abrupt("return",null);case 3:return n="function"==typeof r?r():r,e.next=6,a.asyncStorageWrapper.getItem(n);case 6:if(null!==(i=e.sent)){e.next=9;break}return e.abrupt("return",null);case 9:return c=t.decrypt||t.encrypt?"function"==typeof t.decrypt?t.decrypt(i):atob(i):i,s=(0,u.formatFromStore)(c,{jsonParse:!0}),e.abrupt("return",s);case 12:case"end":return e.stop()}}),e)})))}},305:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setAsyncStorageItem=void 0;var n=r(75),o=r(118);e.setAsyncStorageItem=function(t,e){var r=e.key;if(r){var i="function"==typeof r?r():r,a=(0,n.formatToStore)(t,{stringify:!0,excludeTypes:["function"]}),u=e.encrypt?"function"==typeof e.encrypt?e.encrypt(a):btoa(a):a;o.asyncStorageWrapper.setItem(i,u)}}},129:function(t){t.exports=(()=>{"use strict";var t={333:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}Object.defineProperty(e,"__esModule",{value:!0}),e.clone=void 0;var i=r(646),a=r(346),u=r(473);e.clone=function(t){var r,c=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shallow;if((0,u.isPrimitive)(t)||(0,i.isDate)(t))return t;if(Array.isArray(t))return c?function(t){if(Array.isArray(t))return o(t)}(r=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}():t.map((function(t){return(0,e.clone)(t)}));if(t instanceof Map){var s=Array.from(t.entries());return c?new Map(s):new Map(s.map((function(t){return(0,e.clone)(t)})))}if(t instanceof Set){var l=Array.from(t.values());return c?new Set(l):new Set(l.map((function(t){return(0,e.clone)(t)})))}return t instanceof RegExp?new RegExp(t.toString()):(0,a.isFunction)(t)?c?t:Object.create(t):c?Object.assign({},t):t instanceof Error?new Error(t.message):Object.keys(t).reduce((function(r,o){var i=t[o];return Object.assign(Object.assign({},r),function(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},o,(0,e.clone)(i)))}),{})}},944:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}Object.defineProperty(e,"__esModule",{value:!0}),e.formatFromStore=void 0;var i=r(333),a=r(346),u=r(473);e.formatFromStore=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=r.jsonParse,s=r.sortKeys;return function(t){var r,i,c;if((0,u.isPrimitive)(t))return t;if("date"===(null==t?void 0:t.$t))return new Date(t.$v);if("map"===(null==t?void 0:t.$t)){var l=(null!==(r=t.$v)&&void 0!==r?r:[]).map((function(t){var r,n,i=(n=2,function(t){if(Array.isArray(t))return t}(r=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(r,n)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(r,n)||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.")}()),a=i[0],u=i[1];return[a,(0,e.formatFromStore)(u)]}));return new Map(l)}if("set"===(null==t?void 0:t.$t)){var f=null!==(i=t.$v)&&void 0!==i?i:[].map((function(t){return(0,e.formatFromStore)(t)}));return new Set(f)}return"regex"===(null==t?void 0:t.$t)?new RegExp(t.$v):"error"===(null==t?void 0:t.$t)?new Error(t.$v):Array.isArray(t)?t.map((function(t){return(0,e.formatFromStore)(t)})):"function"===(null==t?void 0:t.$t)?Function("(".concat(t.$v,")(...arguments)")):(c=Object.keys(t),s?(0,a.isFunction)(s)?c.sort(s):c.sort((function(t,e){return(null!=t?t:"").localeCompare(e)})):c).reduce((function(r,o){var i,a,u,c=t[o];return Object.assign(Object.assign({},r),(i={},a=o,u=(0,e.formatFromStore)(c),(a=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(a))in i?Object.defineProperty(i,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[a]=u,i))}),{})}(c?JSON.parse(t):(0,i.clone)(t))}},112:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isBoolean=void 0,e.isBoolean=function(t){return"boolean"==typeof t}},646:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isDate=void 0,e.isDate=function(t){return t instanceof Date}},346:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0,e.isFunction=function(t){return"function"==typeof t||t instanceof Function}},243:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNil=void 0,e.isNil=function(t){return null==t}},11:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNumber=void 0,e.isNumber=function(t){return"number"==typeof t}},473:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isPrimitive=void 0;var o=r(112),i=r(243),a=r(11),u=r(671);e.isPrimitive=function(t){return(0,i.isNil)(t)||(0,a.isNumber)(t)||(0,o.isBoolean)(t)||(0,u.isString)(t)||"symbol"===n(t)}},671:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isString=void 0,e.isString=function(t){return"string"==typeof t}}},e={};return function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}(944)})()},75:function(t){t.exports=(()=>{"use strict";var t={333:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}Object.defineProperty(e,"__esModule",{value:!0}),e.clone=void 0;var i=r(646),a=r(346),u=r(473);e.clone=function(t){var r,c=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shallow;if((0,u.isPrimitive)(t)||(0,i.isDate)(t))return t;if(Array.isArray(t))return c?function(t){if(Array.isArray(t))return o(t)}(r=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}():t.map((function(t){return(0,e.clone)(t)}));if(t instanceof Map){var s=Array.from(t.entries());return c?new Map(s):new Map(s.map((function(t){return(0,e.clone)(t)})))}if(t instanceof Set){var l=Array.from(t.values());return c?new Set(l):new Set(l.map((function(t){return(0,e.clone)(t)})))}return t instanceof RegExp?new RegExp(t.toString()):(0,a.isFunction)(t)?c?t:Object.create(t):c?Object.assign({},t):t instanceof Error?new Error(t.message):Object.keys(t).reduce((function(r,o){var i=t[o];return Object.assign(Object.assign({},r),function(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},o,(0,e.clone)(i)))}),{})}},112:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isBoolean=void 0,e.isBoolean=function(t){return"boolean"==typeof t}},646:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isDate=void 0,e.isDate=function(t){return t instanceof Date}},346:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0,e.isFunction=function(t){return"function"==typeof t||t instanceof Function}},243:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNil=void 0,e.isNil=function(t){return null==t}},11:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNumber=void 0,e.isNumber=function(t){return"number"==typeof t}},473:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isPrimitive=void 0;var o=r(112),i=r(243),a=r(11),u=r(671);e.isPrimitive=function(t){return(0,i.isNil)(t)||(0,a.isNumber)(t)||(0,o.isBoolean)(t)||(0,u.isString)(t)||"symbol"===n(t)}},43:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isRegex=void 0,e.isRegex=function(t){return t instanceof RegExp}},671:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isString=void 0,e.isString=function(t){return"string"==typeof t}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}var n={};return(()=>{var t=n;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.formatToStore=void 0;var o=r(333),i=r(646),a=r(346),u=r(473),c=r(43);t.formatToStore=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{stringify:!1},n=r.stringify,s=r.validator,l=r.excludeTypes,f=r.excludeKeys,p=r.sortKeys,y=new Set(null!=l?l:[]),v=new Set(null!=f?f:[]),h=y.size||v.size,d=null!=s?s:function(t){var r=t.key,n=t.value;if(!h)return!0;var o=v.has(r),i=y.has(e(n));return!o&&!i},b=function(t){if((0,u.isPrimitive)(t))return t;var r;if(Array.isArray(t))return t.map((function(t){return b(t)}));if(t instanceof Map)return{$t:"map",$v:Array.from(t.entries()).map((function(t){return b(t)}))};if(t instanceof Set)return{$t:"set",$v:Array.from(t.values()).map((function(t){return b(t)}))};if((0,i.isDate)(t))return{$t:"date",$v:t.toISOString()};if((0,c.isRegex)(t))return{$t:"regex",$v:t.toString()};if((0,a.isFunction)(t)){var n;try{n={$t:"function",$v:t.toString()}}catch(t){n={$t:"error",$v:"Error: Could not serialize function"}}return n}return t instanceof Error?{$t:"error",$v:t.message}:(r=Object.keys(t),p?(0,a.isFunction)(p)?r.sort(p):r.sort((function(t,e){return(null!=t?t:"").localeCompare(e)})):r).reduce((function(r,n){var o,i,a,u=t[n],c=b(u);return d({obj:t,key:n,value:c})?Object.assign(Object.assign({},r),(o={},i=n,a=b(u),(i=function(t){var r=function(t){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(r)?r:r+""}(i))in o?Object.defineProperty(o,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[i]=a,o)):r}),{})},m=b((0,o.clone)(t));return n?JSON.stringify(m):m}})(),n})()},297:function(t,e,r){var n;n=t=>(()=>{var e={774:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,e)||i(t,e)||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 i(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(){u=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new P(n||[]);return o(a,"_invoke",{value:j(t,r,u)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var y={};function v(){}function h(){}function d(){}var b={};l(b,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(L([])));g&&g!==e&&r.call(g,a)&&(b=g);var S=d.prototype=v.prototype=Object.create(b);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function i(o,a,u,c){var s=p(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,u,c)}),(function(t){i("throw",t,u,c)})):e.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return i("throw",t,u,c)}))}c(s.arg)}var a;o(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function j(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=x(a,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=p(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function x(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=p(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,y;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,y):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,y)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function L(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=d,o(S,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:h,configurable:!0}),h.displayName=l(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},w(O.prototype),l(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(S),l(S,s,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=L,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),y}},t}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function s(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,"string");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===n(e)?e:String(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalStore=void 0;var l=r(156),f=r(244),p=r(125),y=r(281),v=r(143),h=r(561),d=r(400),b=r(157),m=r(605),g=r(383),S=function(){function t(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{metadata:{}};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.actionsConfig=null,this.callbacks=null,this.actions=null,this.subscribers=new Map,this.initialize=function(){return function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))}(r,void 0,void 0,u().mark((function t(){var e,r,n,o,i,a;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Object.keys(null!==(e=this.actionsConfig)&&void 0!==e?e:{}).length>0&&(this.actions=this.getStoreActionsMap()),n=this.onInit,o=null!==(r=this.callbacks)&&void 0!==r?r:{},i=o.onInit,n||i){t.next=6;break}return t.abrupt("return");case 6:a=this.getConfigCallbackParam(),null==n||n(a),(0,p.isNil)(i)||null==i||i(a);case 9:case"end":return t.stop()}}),t,this)})))},this.executeSetStateForSubscriber=function(t,e){var n,o,i=t.selector,a=t.callback,u=t.currentState,c=t.config;if(!e.forceUpdate&&(null!==(n=null==c?void 0:c.isEqualRoot)&&void 0!==n?n:function(t,e){return t===e})(e.currentRootState,e.newRootState))return{didUpdate:!1};var s=i?i(e.newRootState):e.newRootState;return!e.forceUpdate&&(null!==(o=null==c?void 0:c.isEqual)&&void 0!==o?o:function(t,e){return t===e})(u,s)?{didUpdate:!1}:(r.partialUpdateSubscription(t.subscriptionId,{currentState:s}),a({state:s},{identifier:e.identifier}),{didUpdate:!0})},this.setState=function(t,e){var n=t.state,o=e.forceUpdate,a=e.identifier,u=r.stateWrapper.state;if(o||u!==n){r.stateWrapper={state:n};var c,s={forceUpdate:o,newRootState:n,currentRootState:u,identifier:a},l=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(r.subscribers.values());try{for(l.s();!(c=l.n()).done;){var f=c.value;r.executeSetStateForSubscriber(f,s)}}catch(t){l.e(t)}finally{l.f()}}},this.setMetadata=function(t){var e=(0,f.isFunction)(t)?t(r.metadata):t;r.metadata=e},this.getMetadata=function(){return r.metadata},this.getState=function(t,e,n){var o;if(!t)return r.stateWrapper.state;var i=(0,f.isFunction)(e),a=i?t:void 0,u=i?e:t,c=null!==(o=i?n:e)&&void 0!==o?o:void 0,s=a?a(r.stateWrapper.state):r.stateWrapper.state;(null==c?void 0:c.skipFirst)||u(s);var l=(0,b.uniqueId)("gs:");return r.setOrUpdateSubscription({subscriptionId:l,selector:a,config:c,currentState:s,callback:function(t){var e=t.state;return u(e)},isSetStateCallback:!1}),function(){r.subscribers.delete(l)}},this.getConfigCallbackParam=function(){var t=r.setMetadata,e=r.getMetadata,n=r.getState,o=r.actions;return{setMetadata:t,getMetadata:e,getState:n,setState:r.setStateWrapper,actions:o}},this.lastSubscriptionId=null,this.setOrUpdateSubscription=function(t){var e=t.subscriptionId;if(!e)return{isNewSubscription:!1};var n=r.subscribers.get(e);return(0,v.isRecord)(n)?(Object.assign(n,t),{isNewSubscription:!1}):(r.executeOnSubscribed(),r.subscribers.set(e,t),r.lastSubscriptionId=e,{isNewSubscription:!0})},this.partialUpdateSubscription=function(t,e){var n=r.subscribers.get(t);(0,v.isRecord)(n)&&Object.assign(n,e)},this.executeOnSubscribed=function(){var t,e=r.onSubscribed,n=null===(t=r.callbacks)||void 0===t?void 0:t.onSubscribed;if(e||n){var o=r.getConfigCallbackParam();null==e||e(o),null==n||n(o)}},this.getHook=function(){var t=function(t){var e,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=(0,g.useConstantValueRef)((function(){return{subscriptionId:null,tempInitialRootState:r.stateWrapper.state}})),u=function(){return t?{state:t(r.stateWrapper.state)}:r.stateWrapper},c=o((0,l.useState)(u),2),s=c[0],f=c[1];(0,l.useEffect)((function(){if(!(0,p.isNil)(a.current)){(0,p.isNil)(a.current.subscriptionId)&&(a.current.subscriptionId=(0,b.uniqueId)("ss:"));var e=a.current.subscriptionId,n={subscriptionId:e,currentState:s.state,selector:t,config:i,callback:f,isSetStateCallback:!0};return r.setOrUpdateSubscription(n).isNewSubscription&&(r.executeSetStateForSubscriber(n,{forceUpdate:!1,newRootState:r.stateWrapper.state,currentRootState:a.current.tempInitialRootState,identifier:"on mount state update"}),a.current.tempInitialRootState=m.uniqueSymbol),function(){r.subscribers.delete(e)}}}),[]);var v=(0,y.isString)(null===(e=a.current)||void 0===e?void 0:e.subscriptionId)?a.current.subscriptionId:"",h=r.subscribers.get(v),d=(null!==(n=null==h?void 0:h.config)&&void 0!==n?n:{dependencies:i.dependencies}).dependencies;return r.partialUpdateSubscription(v,{currentState:s.state,selector:t,config:i,callback:f}),[r.computeSelectedState({selector:t,subscriptionId:v,config:i,currentDependencies:d,computeChildState:u,stateWrapperRef:s}),r.getStateOrchestrator(),r.metadata]};return t.stateControls=r.stateControls,t.createSelectorHook=r.createSelectorHook,t.createObservable=r.createObservable,t},this.computeSelectedState=function(t){var e=t.selector,n=t.subscriptionId,o=t.config,i=t.currentDependencies,a=t.computeChildState,u=t.stateWrapperRef;if(!e||!n)return u.state;var c=o.dependencies;if(i===c)return u.state;if((null==i?void 0:i.length)===(null==c?void 0:c.length)&&(0,h.shallowCompare)(i,c))return u.state;var s=a().state;return r.partialUpdateSubscription(n,{currentState:s}),u.state=s,s},this.createSelectorHook=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.isEqualRoot,a=n.isEqual,u=n.name,c=o(r.stateControls(),3),s=c[0],l=c[1],p=c[2],y=s(),v=(null!=e?e:function(t){return t})(y),h=new t(v,{name:null!=u?u:(0,b.uniqueId)("sh:")}),d=o(h.stateControls(),2),m=d[0],g=d[1];s((function(t){if(!(null!=i?i:Object.is)(y,t)){y=t;var r=e(t);(null!=a?a:Object.is)(v,r)||(v=r,g(r))}}),{skipFirst:!0});var S=h.getHook(),w=function(t,e){return[o((0,f.isFunction)(t)?S(t,e):S(),1)[0],l,p]};return w.stateControls=function(){return[m,l,p]},w.createSelectorHook=r.createSelectorHook.bind(w),w.createObservable=r.createObservable.bind(w),w},this.stateControls=function(){var t=r.getStateOrchestrator(),e=r.getMetadata;return[r.getState,t,e]},this.getStateOrchestrator=function(){return r.actions?r.actions:r.setStateWrapper},this.setStateWrapper=function(t){var e,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.forceUpdate,a=o.identifier,u=r.stateWrapper.state,c=(0,f.isFunction)(t)?t(u):t;if(i||r.stateWrapper.state!==c){var s=r.setMetadata,l=r.getMetadata,p=r.getState,y=r.actions,v={setMetadata:s,getMetadata:l,setState:r.setState,getState:p,actions:y,previousState:u,state:c,identifier:a},h=r.computePreventStateChange,d=null===(e=r.callbacks)||void 0===e?void 0:e.computePreventStateChange;if((h||d)&&((null==h?void 0:h(v))||(null==d?void 0:d(v))))return;r.setState({state:c},{forceUpdate:i,identifier:a});var b=r.onStateChanged,m=null===(n=r.callbacks)||void 0===n?void 0:n.onStateChanged;(b||m)&&(null==b||b(v),null==m||m(v))}},this.getStoreActionsMap=function(){if(!(0,v.isRecord)(r.actionsConfig))return null;var t=r.actionsConfig,e=r.setMetadata,n=r.setStateWrapper,o=r.getState,i=r.getMetadata,a=Object.keys(t).reduce((function(r,u){var c,l,f;return Object.assign(r,(c={},f=function(){for(var r=t[u],c=arguments.length,s=new Array(c),l=0;l<c;l++)s[l]=arguments[l];var f=r.apply(a,s);return"function"!=typeof f&&(0,d.throwWrongKeyOnActionCollectionConfig)(u),f.call(a,{setState:n,getState:o,setMetadata:e,getMetadata:i,actions:a})},(l=s(l=u))in c?Object.defineProperty(c,l,{value:f,enumerable:!0,configurable:!0,writable:!0}):c[l]=f,c)),r}),{});return a};var a=n.metadata,c=n.callbacks,S=n.actions,w=n.name;this.stateWrapper={state:e},this._name=null!=w?w:(0,b.uniqueId)("gs:"),this.metadata=null!=a?a:{},this.callbacks=null!=c?c:null,this.actionsConfig=null!=S?S:null,(null===globalThis||void 0===globalThis?void 0:globalThis.REACT_GLOBAL_STATE_HOOK_DEBUG)&&globalThis.REACT_GLOBAL_STATE_HOOK_DEBUG(this),this.constructor!==t||this.initialize()}var e,r;return e=t,r=[{key:"createObservable",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.isEqualRoot,n=e.isEqual,i=e.name,a=o(this.stateControls(),1)[0],u=[],c=a(),s=(null!=t?t:function(t){return t})(a());a((function(e){if(!(null!=r?r:Object.is)(c,e)){c=e;var o=t(e);(null!=n?n:Object.is)(s,o)||(s=o,u.forEach((function(t){return t()})))}}),{skipFirst:!0});var l=function(t,e,r){var n;if(!t)return s;var o=(0,f.isFunction)(e),i=o?t:void 0,a=o?e:t,c=null!==(n=o?r:e)&&void 0!==n?n:void 0,l=function(){return a(i?i(s):s)};(null==c?void 0:c.skipFirst)||l();var p=function(){l()};return u.push(p),function(){u.splice(u.indexOf(p),1)}};return l._name=null!=i?i:(0,b.uniqueId)("ob:"),l.createObservable=this.createObservable.bind(l),l.stateControls=function(){return[l]},l}}],r&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.GlobalStore=S},143:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isRecord=void 0;var o=r(125);e.isRecord=function(t){return!(0,o.isNil)(t)&&"object"===n(t)}},561:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,e)||i(t,e)||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 o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function i(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.shallowCompare=void 0;var c=r(416),s=r(231),l=r(125),f=r(143);e.shallowCompare=function(t,e){if(t===e)return!0;var r=u(t),i=u(e);if(r!==i)return!1;if((0,l.isNil)(t)||(0,l.isNil)(e)||(0,c.isPrimitive)(t)&&(0,c.isPrimitive)(e)||(0,s.isDate)(t)&&(0,s.isDate)(e)||"function"===r&&"function"===i)return t===e;if(Array.isArray(t)){var a=t,p=e;if(a.length!==p.length)return!1;for(var y=0;y<a.length;y++)if(a[y]!==p[y])return!1}if(t instanceof Map){var v=t,h=e;if(v.size!==h.size)return!1;var d,b=o(v);try{for(b.s();!(d=b.n()).done;){var m=n(d.value,2),g=m[0];if(m[1]!==h.get(g))return!1}}catch(t){b.e(t)}finally{b.f()}}if(t instanceof Set){var S=t,w=e;if(S.size!==w.size)return!1;var O,j=o(S);try{for(j.s();!(O=j.n()).done;){var x=O.value;if(!w.has(x))return!1}}catch(t){j.e(t)}finally{j.f()}}if(!(0,f.isRecord)(t)||!(0,f.isRecord)(e))return t===e;var _=Object.keys(t),E=Object.keys(e);if(_.length!==E.length)return!1;for(var P=0,L=_;P<L.length;P++){var k=L[P];if(t[k]!==e[k])return!1}return!0}},400:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throwWrongKeyOnActionCollectionConfig=void 0,e.throwWrongKeyOnActionCollectionConfig=function(t){throw new Error("[WRONG CONFIGURATION!]: Every key inside the storeActionsConfig must be a higher order function that returns a function \n[".concat(t,"]: key is not a valid function, try something like this: \n{\n\n ").concat(t,": (param) => ({ setState, getState, setMetadata, getMetadata, actions }) => {\n\n setState((state) => ({ ...state, ...param }))\n\n }\n\n}\n"))}},157:(t,e)=>{"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueId=void 0,e.uniqueId=(r=0,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r===Number.MAX_SAFE_INTEGER&&(r=0),t+Date.now().toString(36)+(r++).toString(36)})},605:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueSymbol=void 0,e.uniqueSymbol=Symbol("unique")},383:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useConstantValueRef=void 0;var n=r(156),o=r(605);e.useConstantValueRef=function(t){var e=(0,n.useRef)(o.uniqueSymbol);return e.current===o.uniqueSymbol&&(e.current=t()),e}},231:function(t){t.exports=(()=>{"use strict";var t={};return(()=>{var e=t;Object.defineProperty(e,"__esModule",{value:!0}),e.isDate=void 0,e.isDate=function(t){return t instanceof Date}})(),t})()},244:function(t){t.exports=(()=>{"use strict";var t={};return(()=>{var e=t;Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0,e.isFunction=function(t){return"function"==typeof t||t instanceof Function}})(),t})()},125:function(t){t.exports=(()=>{"use strict";var t={};return(()=>{var e=t;Object.defineProperty(e,"__esModule",{value:!0}),e.isNil=void 0,e.isNil=function(t){return null==t}})(),t})()},416:function(t){t.exports=(()=>{"use strict";var t={112:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isBoolean=void 0,e.isBoolean=function(t){return"boolean"==typeof t}},243:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNil=void 0,e.isNil=function(t){return null==t}},11:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNumber=void 0,e.isNumber=function(t){return"number"==typeof t}},671:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isString=void 0,e.isString=function(t){return"string"==typeof t}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}var n={};return(()=>{var t=n;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPrimitive=void 0;var o=r(112),i=r(243),a=r(11),u=r(671);t.isPrimitive=function(t){return(0,i.isNil)(t)||(0,a.isNumber)(t)||(0,o.isBoolean)(t)||(0,u.isString)(t)||"symbol"===e(t)}})(),n})()},281:function(t){t.exports=(()=>{"use strict";var t={};return(()=>{var e=t;Object.defineProperty(e,"__esModule",{value:!0}),e.isString=void 0,e.isString=function(t){return"string"==typeof t}})(),t})()},156:e=>{"use strict";e.exports=t}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return e[t].call(i.exports,i,i.exports,n),i.exports}var o={};return(()=>{"use strict";var t=o;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}function i(t){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=a(t);if(r){var i=a(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return function(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalStoreAbstract=void 0;var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)}(o,t);var e,n=i(o);function o(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.apply(this,arguments)).onInit=function(e){t.onInitialize(e)},t.onStateChanged=function(e){t.onChange(e)},t}return e=o,Object.defineProperty(e,"prototype",{writable:!1}),e}(n(774).GlobalStore);t.GlobalStoreAbstract=u})(),o})(),t.exports=n(r(156))},878:e=>{"use strict";e.exports=t},156:t=>{"use strict";t.exports=e}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return r[t].call(i.exports,i,i.exports,o),i.exports}var i={};return(()=>{"use strict";var t=i;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(){r=function(){return n};var t,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),u=new M(n||[]);return a(i,"_invoke",{value:L(t,r,u)}),i}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var v="suspendedStart",h="suspendedYield",d="executing",b="completed",m={};function g(){}function S(){}function w(){}var O={};f(O,c,(function(){return this}));var j=Object.getPrototypeOf,x=j&&j(j(N([])));x&&x!==o&&i.call(x,c)&&(O=x);var _=w.prototype=g.prototype=Object.create(O);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,r){function n(o,a,u,c){var s=y(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==e(f)&&i.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):r.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return n("throw",t,u,c)}))}c(s.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(i,i):i()}})}function L(e,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=y(e,r,n);if("normal"===s.type){if(o=n.done?b:h,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=y(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function N(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(i.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(e(r)+" is not iterable")}return S.prototype=w,a(_,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:S,configurable:!0}),S.displayName=f(w,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===S||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},n.awrap=function(t){return{__await:t}},E(P.prototype),f(P.prototype,s,(function(){return this})),n.AsyncIterator=P,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new P(p(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(_),f(_,l,"Generator"),f(_,c,(function(){return this})),f(_,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=N,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},n}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function a(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:String(r)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var p=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalStore=void 0;var y=o(297),v=o(600),h=o(305),d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(f,t);var e,o,i,a=c(f);function f(t){var e,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{metadata:{}};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),(e=a.call(this,t,o)).asyncStorage=null,e.getMetadata=function(){var t,r;return(null===(t=e.asyncStorage)||void 0===t?void 0:t.key)?Object.assign({isAsyncStorageReady:!1,asyncStorageKey:e.asyncStorage.key},null!==(r=e.metadata)&&void 0!==r?r:{}):e.metadata},e._onInitialize=function(t){var n=t.setState,o=t.getState,i=t.setMetadata;return p(l(e),void 0,void 0,r().mark((function t(){var e;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(f.isAsyncStorageAvailable(this.asyncStorage)){t.next=2;break}return t.abrupt("return");case 2:return i((function(t){return Object.assign(Object.assign({},null!=t?t:{}),{isAsyncStorageReady:!1})})),t.next=5,(0,v.getAsyncStorageItem)(this.asyncStorage);case 5:e=t.sent,i((function(t){return Object.assign(Object.assign({},null!=t?t:{}),{isAsyncStorageReady:!0})})),null===e&&(e=o(),(0,h.setAsyncStorageItem)(e,this.asyncStorage)),n(e,{forceUpdate:!0});case 9:case"end":return t.stop()}}),t,this)})))},e._onChange=function(t){var r=t.getState;f.isAsyncStorageAvailable(e.asyncStorage)&&(0,h.setAsyncStorageItem)(r(),e.asyncStorage)},e.onInitialize=null,e.onChange=null,e.onInit=function(t){var r;null===(r=e._onInitialize)||void 0===r||r.call(l(e),t)},e.onStateChanged=function(t){var r;null===(r=e._onChange)||void 0===r||r.call(l(e),t)},e.asyncStorage=null!==(n=o.asyncStorage)&&void 0!==n?n:null,e.setMetadata((function(t){var r,n;return Object.assign(Object.assign({},null!=t?t:{}),{isAsyncStorageReady:!1,asyncStorageKey:null!==(n=null===(r=e.asyncStorage)||void 0===r?void 0:r.key)&&void 0!==n?n:null})})),e.constructor!==f?s(e):(e.initialize(),e)}return e=f,o&&n(e.prototype,o),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}(y.GlobalStoreAbstract);t.GlobalStore=d,d.isAsyncStorageAvailable=function(t){return Boolean(null==t?void 0:t.key)}})(),i})()));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@react-native-async-storage/async-storage"),require("react")):"function"==typeof define&&define.amd?define(["@react-native-async-storage/async-storage","react"],e):"object"==typeof exports?exports["react-native-global-state-hooks"]=e(require("@react-native-async-storage/async-storage"),require("react")):t["react-native-global-state-hooks"]=e(t["@react-native-async-storage/async-storage"],t.react)}(this,((t,e)=>(()=>{var r={118:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),u=new M(n||[]);return a(i,"_invoke",{value:L(t,r,u)}),i}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var v="suspendedStart",h="suspendedYield",d="executing",b="completed",m={};function g(){}function S(){}function w(){}var O={};f(O,c,(function(){return this}));var _=Object.getPrototypeOf,j=_&&_(_(I([])));j&&j!==r&&i.call(j,c)&&(O=j);var x=w.prototype=g.prototype=Object.create(O);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,a,u,c){var s=y(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):e.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return r("throw",t,u,c)}))}c(s.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function L(e,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=A(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=y(e,r,n);if("normal"===s.type){if(o=n.done?b:h,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=y(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return S.prototype=w,a(x,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:S,configurable:!0}),S.displayName=f(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===S||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},E(P.prototype),f(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new P(p(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(x),f(x,l,"Generator"),f(x,c,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}var i=Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]},a=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return a(e,t),e},c=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.asyncStorageWrapper=void 0,e.asyncStorageWrapper=function(){var t,e="pending",n=null;c(void 0,void 0,void 0,o().mark((function i(){var a,c,s,l,f;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,a=Promise.resolve().then((function(){return u(r(878))})),t=a,o.next=5,a;case 5:c=o.sent,s=c.default,l=s.getItem,f=s.setItem,l.bind(s),f.bind(s),n={getItem:l,setItem:f},e="resolved",o.next=18;break;case 14:o.prev=14,o.t0=o.catch(0),e="rejected";case 18:return o.prev=18,t=null,o.finish(18);case 21:case"end":return o.stop()}}),i,null,[[0,14,18,21]])})));var i=function(){throw new Error("[AsyncStorageManager Not Found] \n\n Please install the react-native-async-storage/async-storage to be use as the default async storage manager or\n add an AsyncStorageManager using the asyncStorageWrapper.addAsyncStorageManager method before attempting to get or set items.")},a=function(){return c(void 0,void 0,void 0,o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("pending"!==e||!t){r.next=2;break}return r.abrupt("return",t);case 2:if("rejected"!==e){r.next=4;break}return r.abrupt("return",t.catch((function(t){throw t})));case 4:return n||i(),r.abrupt("return",n);case 6:case"end":return r.stop()}}),r)})))};return{getItem:function(t){return c(void 0,void 0,void 0,o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a();case 2:return e.abrupt("return",n.getItem(t));case 3:case"end":return e.stop()}}),e)})))},setItem:function(t,e){return c(void 0,void 0,void 0,o().mark((function r(){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,a();case 2:return r.abrupt("return",n.setItem(t,e));case 3:case"end":return r.stop()}}),r)})))},addAsyncStorageManager:function(r){return c(void 0,void 0,void 0,o().mark((function i(){var a;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,"pending"!==e||!t){o.next=4;break}return o.next=4,t.catch((function(){}));case 4:return e="pending",a=r(),t=a,o.next=9,a;case 9:n=o.sent,e="resolved",o.next=18;break;case 13:throw o.prev=13,o.t0=o.catch(0),t=null,e="rejected",o.t0;case 18:case"end":return o.stop()}}),i,null,[[0,13]])})))}}}(),e.default=e.asyncStorageWrapper},600:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),u=new M(n||[]);return a(i,"_invoke",{value:L(t,r,u)}),i}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var v="suspendedStart",h="suspendedYield",d="executing",b="completed",m={};function g(){}function S(){}function w(){}var O={};f(O,c,(function(){return this}));var _=Object.getPrototypeOf,j=_&&_(_(I([])));j&&j!==r&&i.call(j,c)&&(O=j);var x=w.prototype=g.prototype=Object.create(O);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function r(o,a,u,c){var s=y(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):e.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return r("throw",t,u,c)}))}c(s.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function L(e,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=A(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=y(e,r,n);if("normal"===s.type){if(o=n.done?b:h,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=y(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return S.prototype=w,a(x,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:S,configurable:!0}),S.displayName=f(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===S||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},E(P.prototype),f(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new P(p(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(x),f(x,l,"Generator"),f(x,c,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}var i=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.getAsyncStorageItem=void 0;var a=r(118),u=r(129);e.getAsyncStorageItem=function(t){return i(void 0,void 0,void 0,o().mark((function e(){var r,n,i,c,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.key){e.next=3;break}return e.abrupt("return",null);case 3:return n="function"==typeof r?r():r,e.next=6,a.asyncStorageWrapper.getItem(n);case 6:if(null!==(i=e.sent)){e.next=9;break}return e.abrupt("return",null);case 9:return c=t.decrypt||t.encrypt?"function"==typeof t.decrypt?t.decrypt(i):atob(i):i,s=(0,u.formatFromStore)(c,{jsonParse:!0}),e.abrupt("return",s);case 12:case"end":return e.stop()}}),e)})))},e.default=e.getAsyncStorageItem},305:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setAsyncStorageItem=void 0;var n=r(75),o=r(118);e.setAsyncStorageItem=function(t,e){var r=e.key;if(r){var i="function"==typeof r?r():r,a=(0,n.formatToStore)(t,{stringify:!0,excludeTypes:["function"]}),u=e.encrypt?"function"==typeof e.encrypt?e.encrypt(a):btoa(a):a;o.asyncStorageWrapper.setItem(i,u)}},e.default=e.setAsyncStorageItem},129:function(t){t.exports=(()=>{"use strict";var t={333:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}Object.defineProperty(e,"__esModule",{value:!0}),e.clone=void 0;var u=r(646),c=r(346),s=r(473);e.clone=function(t){var r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shallow;if((0,s.isPrimitive)(t)||(0,u.isDate)(t))return t;if(Array.isArray(t))return r?i(t):t.map((function(t){return(0,e.clone)(t)}));if(t instanceof Map){var n=Array.from(t.entries());return r?new Map(n):new Map(n.map((function(t){return(0,e.clone)(t)})))}if(t instanceof Set){var a=Array.from(t.values());return r?new Set(a):new Set(a.map((function(t){return(0,e.clone)(t)})))}return t instanceof RegExp?new RegExp(t.toString()):(0,c.isFunction)(t)?r?t:Object.create(t):r?Object.assign({},t):t instanceof Error?new Error(t.message):Object.keys(t).reduce((function(r,n){var i=t[n];return Object.assign(Object.assign({},r),o({},n,(0,e.clone)(i)))}),{})}},944:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t,e)||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 a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}Object.defineProperty(e,"__esModule",{value:!0}),e.formatFromStore=void 0;var u=r(333),c=r(346),s=r(473);e.formatFromStore=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.jsonParse,a=r.sortKeys;return function(t){var r,n,u;if((0,s.isPrimitive)(t))return t;if("date"===(null==t?void 0:t.$t))return new Date(t.$v);if("map"===(null==t?void 0:t.$t)){var l=(null!==(r=t.$v)&&void 0!==r?r:[]).map((function(t){var r=i(t,2),n=r[0],o=r[1];return[n,(0,e.formatFromStore)(o)]}));return new Map(l)}if("set"===(null==t?void 0:t.$t)){var f=null!==(n=t.$v)&&void 0!==n?n:[].map((function(t){return(0,e.formatFromStore)(t)}));return new Set(f)}return"regex"===(null==t?void 0:t.$t)?new RegExp(t.$v):"error"===(null==t?void 0:t.$t)?new Error(t.$v):Array.isArray(t)?t.map((function(t){return(0,e.formatFromStore)(t)})):"function"===(null==t?void 0:t.$t)?Function("(".concat(t.$v,")(...arguments)")):(u=Object.keys(t),a?(0,c.isFunction)(a)?u.sort(a):u.sort((function(t,e){return(null!=t?t:"").localeCompare(e)})):u).reduce((function(r,n){var i=t[n];return Object.assign(Object.assign({},r),o({},n,(0,e.formatFromStore)(i)))}),{})}(n?JSON.parse(t):(0,u.clone)(t))}},112:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isBoolean=void 0,e.isBoolean=function(t){return"boolean"==typeof t}},646:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isDate=void 0,e.isDate=function(t){return t instanceof Date}},346:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0,e.isFunction=function(t){return"function"==typeof t||t instanceof Function}},243:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNil=void 0,e.isNil=function(t){return null==t}},11:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNumber=void 0,e.isNumber=function(t){return"number"==typeof t}},473:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isPrimitive=void 0;var o=r(112),i=r(243),a=r(11),u=r(671);e.isPrimitive=function(t){return(0,i.isNil)(t)||(0,a.isNumber)(t)||(0,o.isBoolean)(t)||(0,u.isString)(t)||"symbol"===n(t)}},671:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isString=void 0,e.isString=function(t){return"string"==typeof t}}},e={};return function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}(944)})()},75:function(t){t.exports=(()=>{"use strict";var t={333:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}Object.defineProperty(e,"__esModule",{value:!0}),e.clone=void 0;var u=r(646),c=r(346),s=r(473);e.clone=function(t){var r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shallow;if((0,s.isPrimitive)(t)||(0,u.isDate)(t))return t;if(Array.isArray(t))return r?i(t):t.map((function(t){return(0,e.clone)(t)}));if(t instanceof Map){var n=Array.from(t.entries());return r?new Map(n):new Map(n.map((function(t){return(0,e.clone)(t)})))}if(t instanceof Set){var a=Array.from(t.values());return r?new Set(a):new Set(a.map((function(t){return(0,e.clone)(t)})))}return t instanceof RegExp?new RegExp(t.toString()):(0,c.isFunction)(t)?r?t:Object.create(t):r?Object.assign({},t):t instanceof Error?new Error(t.message):Object.keys(t).reduce((function(r,n){var i=t[n];return Object.assign(Object.assign({},r),o({},n,(0,e.clone)(i)))}),{})}},112:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isBoolean=void 0,e.isBoolean=function(t){return"boolean"==typeof t}},646:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isDate=void 0,e.isDate=function(t){return t instanceof Date}},346:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0,e.isFunction=function(t){return"function"==typeof t||t instanceof Function}},243:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNil=void 0,e.isNil=function(t){return null==t}},11:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNumber=void 0,e.isNumber=function(t){return"number"==typeof t}},473:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isPrimitive=void 0;var o=r(112),i=r(243),a=r(11),u=r(671);e.isPrimitive=function(t){return(0,i.isNil)(t)||(0,a.isNumber)(t)||(0,o.isBoolean)(t)||(0,u.isString)(t)||"symbol"===n(t)}},43:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isRegex=void 0,e.isRegex=function(t){return t instanceof RegExp}},671:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isString=void 0,e.isString=function(t){return"string"==typeof t}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}var n={};return(()=>{var t=n;function e(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.formatToStore=void 0;var i=r(333),a=r(646),u=r(346),c=r(473),s=r(43);t.formatToStore=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{stringify:!1},n=r.stringify,l=r.validator,f=r.excludeTypes,p=r.excludeKeys,y=r.sortKeys,v=new Set(null!=f?f:[]),h=new Set(null!=p?p:[]),d=v.size||h.size,b=null!=l?l:function(t){var e=t.key,r=t.value;if(!d)return!0;var n=h.has(e),i=v.has(o(r));return!n&&!i},m=function(t){if((0,c.isPrimitive)(t))return t;var r;if(Array.isArray(t))return t.map((function(t){return m(t)}));if(t instanceof Map)return{$t:"map",$v:Array.from(t.entries()).map((function(t){return m(t)}))};if(t instanceof Set)return{$t:"set",$v:Array.from(t.values()).map((function(t){return m(t)}))};if((0,a.isDate)(t))return{$t:"date",$v:t.toISOString()};if((0,s.isRegex)(t))return{$t:"regex",$v:t.toString()};if((0,u.isFunction)(t)){var n;try{n={$t:"function",$v:t.toString()}}catch(t){n={$t:"error",$v:"Error: Could not serialize function"}}return n}return t instanceof Error?{$t:"error",$v:t.message}:(r=Object.keys(t),y?(0,u.isFunction)(y)?r.sort(y):r.sort((function(t,e){return(null!=t?t:"").localeCompare(e)})):r).reduce((function(r,n){var o=t[n],i=m(o);return b({obj:t,key:n,value:i})?Object.assign(Object.assign({},r),e({},n,m(o))):r}),{})},g=m((0,i.clone)(t));return n?JSON.stringify(g):g}})(),n})()},297:function(t,e,r){var n;n=t=>(()=>{var e={774:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,e)||i(t,e)||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 i(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(){u=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new P(n||[]);return o(a,"_invoke",{value:_(t,r,u)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var y={};function v(){}function h(){}function d(){}var b={};l(b,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(L([])));g&&g!==e&&r.call(g,a)&&(b=g);var S=d.prototype=v.prototype=Object.create(b);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function i(o,a,u,c){var s=p(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,u,c)}),(function(t){i("throw",t,u,c)})):e.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return i("throw",t,u,c)}))}c(s.arg)}var a;o(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function _(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=j(a,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=p(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function j(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,j(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=p(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,y;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,y):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,y)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function L(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:A}}function A(){return{value:void 0,done:!0}}return h.prototype=d,o(S,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:h,configurable:!0}),h.displayName=l(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,s,"GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},w(O.prototype),l(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new O(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(S),l(S,s,"Generator"),l(S,a,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=L,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),y}},t}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function s(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,"string");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===n(e)?e:String(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalStore=void 0;var l=r(156),f=r(244),p=r(125),y=r(281),v=r(143),h=r(561),d=r(400),b=r(157),m=r(605),g=r(748),S=globalThis;!function(){if(!S.REACT_GLOBAL_STATE_HOOK_DEBUG&&!(0,p.isNil)(S.sessionStorage)){try{if(!S.sessionStorage.getItem("REACT_GLOBAL_STATE_HOOK_DEBUG"))return}catch(t){return}S.REACT_GLOBAL_STATE_TEMP_HOOKS=new Map,setTimeout((function(){S.REACT_GLOBAL_STATE_TEMP_HOOKS=null}),6e4)}}();var w=function(){function t(e){var r,n=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{metadata:{}};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.wasDisposed=!1,this.actionsConfig=null,this.callbacks=null,this.actions=null,this.subscribers=new Map,this.initialize=function(){return function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))}(n,void 0,void 0,u().mark((function t(){var e,r,n,o,i,a;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Object.keys(null!==(e=this.actionsConfig)&&void 0!==e?e:{}).length>0&&(this.actions=this.getStoreActionsMap()),n=this.onInit,o=null!==(r=this.callbacks)&&void 0!==r?r:{},i=o.onInit,n||i){t.next=6;break}return t.abrupt("return");case 6:a=this.getConfigCallbackParam(),null==n||n(a),(0,p.isNil)(i)||null==i||i(a);case 9:case"end":return t.stop()}}),t,this)})))},this.executeSetStateForSubscriber=function(t,e){var r,o,i=t.selector,a=t.callback,u=t.currentState,c=t.config;if(!e.forceUpdate&&(null!==(r=null==c?void 0:c.isEqualRoot)&&void 0!==r?r:function(t,e){return t===e})(e.currentRootState,e.newRootState))return{didUpdate:!1};var s=i?i(e.newRootState):e.newRootState;return!e.forceUpdate&&(null!==(o=null==c?void 0:c.isEqual)&&void 0!==o?o:function(t,e){return t===e})(u,s)?{didUpdate:!1}:(n.partialUpdateSubscription(t.subscriptionId,{currentState:s}),a({state:s},{identifier:e.identifier}),{didUpdate:!0})},this.setState=function(t,e){var r=t.state,o=e.forceUpdate,a=e.identifier,u=n.stateWrapper.state;if(o||u!==r){n.stateWrapper={state:r};var c,s={forceUpdate:o,newRootState:r,currentRootState:u,identifier:a},l=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(n.subscribers.values());try{for(l.s();!(c=l.n()).done;){var f=c.value;n.executeSetStateForSubscriber(f,s)}}catch(t){l.e(t)}finally{l.f()}}},this.setMetadata=function(t){var e=(0,f.isFunction)(t)?t(n.metadata):t;n.metadata=e},this.getMetadata=function(){return n.metadata},this.getState=function(t,e,r){var o;if(!t)return n.stateWrapper.state;var i=(0,f.isFunction)(e),a=i?t:void 0,u=i?e:t,c=null!==(o=i?r:e)&&void 0!==o?o:void 0,s=a?a(n.stateWrapper.state):n.stateWrapper.state;(null==c?void 0:c.skipFirst)||u(s);var l=(0,b.uniqueId)("gs:");return n.setOrUpdateSubscription({subscriptionId:l,selector:a,config:c,currentState:s,callback:function(t){var e=t.state;return u(e)},isSetStateCallback:!1}),function(){n.subscribers.delete(l)}},this.getConfigCallbackParam=function(){var t=n.setMetadata,e=n.getMetadata,r=n.getState,o=n.actions;return{setMetadata:t,getMetadata:e,getState:r,setState:n.setStateWrapper,actions:o}},this.lastSubscriptionId=null,this.setOrUpdateSubscription=function(t){var e=t.subscriptionId;if(!e)return{isNewSubscription:!1};var r=n.subscribers.get(e);return(0,v.isRecord)(r)?(Object.assign(r,t),{isNewSubscription:!1}):(n.executeOnSubscribed(),n.subscribers.set(e,t),n.lastSubscriptionId=e,{isNewSubscription:!0})},this.partialUpdateSubscription=function(t,e){var r=n.subscribers.get(t);(0,v.isRecord)(r)&&Object.assign(r,e)},this.executeOnSubscribed=function(){var t,e=n.onSubscribed,r=null===(t=n.callbacks)||void 0===t?void 0:t.onSubscribed;if(e||r){var o=n.getConfigCallbackParam();null==e||e(o),null==r||r(o)}},this.getHook=function(){var t=function(t){var e,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(n.wasDisposed)throw new Error("The global state was disposed");var a=Array.isArray(i)?{dependencies:i}:null!=i?i:{},u=(0,l.useRef)({subscriptionId:null,tempInitialRootState:n.stateWrapper.state}),c=function(){return t?{state:t(n.stateWrapper.state)}:n.stateWrapper},s=o((0,l.useState)(c),2),f=s[0],v=s[1];(0,l.useEffect)((function(){if(!(0,p.isNil)(u.current)){(0,p.isNil)(u.current.subscriptionId)&&(u.current.subscriptionId=(0,b.uniqueId)("ss:"));var e=u.current.subscriptionId,r={subscriptionId:e,currentState:f.state,selector:t,config:a,callback:v,isSetStateCallback:!0};return n.setOrUpdateSubscription(r).isNewSubscription&&(n.executeSetStateForSubscriber(r,{forceUpdate:!1,newRootState:n.stateWrapper.state,currentRootState:u.current.tempInitialRootState===m.uniqueSymbol?n.stateWrapper.state:u.current.tempInitialRootState,identifier:"on mount state update"}),u.current.tempInitialRootState=m.uniqueSymbol),function(){n.subscribers.delete(e)}}}),[]);var h=(0,y.isString)(null===(e=u.current)||void 0===e?void 0:e.subscriptionId)?u.current.subscriptionId:"",d=n.subscribers.get(h),g=(null!==(r=null==d?void 0:d.config)&&void 0!==r?r:{dependencies:a.dependencies}).dependencies;return n.partialUpdateSubscription(h,{currentState:f.state,selector:t,config:a,callback:v}),[n.computeSelectedState({selector:t,subscriptionId:h,config:a,currentDependencies:g,computeChildState:c,stateWrapperRef:f}),n.getStateOrchestrator(),n.metadata]};return t.stateControls=n.stateControls,t.createSelectorHook=n.createSelectorHook,t.createObservable=n.createObservable,t.removeSubscriptions=n.removeSubscriptions,t.dispose=n.dispose,t},this.computeSelectedState=function(t){var e=t.selector,r=t.subscriptionId,o=t.config,i=t.currentDependencies,a=t.computeChildState,u=t.stateWrapperRef;if(!e||!r)return u.state;var c=o.dependencies;if(i===c)return u.state;if((null==i?void 0:i.length)===(null==c?void 0:c.length)&&(0,h.shallowCompare)(i,c))return u.state;var s=a().state;return n.partialUpdateSubscription(r,{currentState:s}),u.state=s,s},this.createSelectorHook=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.isEqualRoot,a=r.isEqual,u=r.name,c=o(n.stateControls(),3),s=c[0],l=c[1],p=c[2],y=s(),v=(null!=e?e:function(t){return t})(y),h=new t(v,{name:null!=u?u:(0,b.uniqueId)("sh:")}),d=o(h.stateControls(),2),m=d[0],g=d[1],S=s((function(t){if(!(null!=i?i:Object.is)(y,t)){y=t;var r=e(t);(null!=a?a:Object.is)(v,r)||(v=r,g(r))}}),{skipFirst:!0}),w=h.getHook(),O=function(t,e){return[o((0,f.isFunction)(t)?w(t,e):w(),1)[0],l,p]};return O.stateControls=function(){return[m,l,p]},O.createSelectorHook=n.createSelectorHook.bind(O),O.createObservable=n.createObservable.bind(O),O.removeSubscriptions=function(){S(),h.removeSubscriptions()},O.dispose=function(){O.removeSubscriptions(),h.dispose()},O},this.stateControls=function(){var t=n.getStateOrchestrator(),e=n.getMetadata;return[n.getState,t,e]},this.getStateOrchestrator=function(){return n.actions?n.actions:n.setStateWrapper},this.setStateWrapper=function(t){var e,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.forceUpdate,a=o.identifier,u=n.stateWrapper.state,c=(0,f.isFunction)(t)?t(u):t;if(i||n.stateWrapper.state!==c){var s=n.setMetadata,l=n.getMetadata,p=n.getState,y=n.actions,v={setMetadata:s,getMetadata:l,setState:n.setState,getState:p,actions:y,previousState:u,state:c,identifier:a},h=n.computePreventStateChange,d=null===(e=n.callbacks)||void 0===e?void 0:e.computePreventStateChange;if((h||d)&&((null==h?void 0:h(v))||(null==d?void 0:d(v))))return;n.setState({state:c},{forceUpdate:i,identifier:a});var b=n.onStateChanged,m=null===(r=n.callbacks)||void 0===r?void 0:r.onStateChanged;(b||m)&&(null==b||b(v),null==m||m(v))}},this.getStoreActionsMap=function(){if(!(0,v.isRecord)(n.actionsConfig))return null;var t=n.actionsConfig,e=n.setMetadata,r=n.setStateWrapper,o=n.getState,i=n.getMetadata,a=Object.keys(t).reduce((function(n,u){var c,l,f;return Object.assign(n,(c={},f=function(){for(var n=t[u],c=arguments.length,s=new Array(c),l=0;l<c;l++)s[l]=arguments[l];var f=n.apply(a,s);return"function"!=typeof f&&(0,d.throwWrongKeyOnActionCollectionConfig)(u),f.call(a,{setState:r,getState:o,setMetadata:e,getMetadata:i,actions:a})},(l=s(l=u))in c?Object.defineProperty(c,l,{value:f,enumerable:!0,configurable:!0,writable:!0}):c[l]=f,c)),n}),{});return a},this.removeSubscriptions=function(){n.subscribers.clear()},this.dispose=function(){n.wasDisposed=!0,n.removeSubscriptions(),n._name="",n.actionsConfig=null,n.callbacks=null,n.metadata={},n.actions=null,n.subscribers.clear(),n.stateWrapper={state:null}};var c=a.metadata,w=a.callbacks,O=a.actions,_=a.name;this.stateWrapper={state:e},this._name=null!=_?_:(0,b.uniqueId)("gs:"),this.metadata=null!=c?c:{},this.callbacks=null!=w?w:null,this.actionsConfig=null!=O?O:null;var j="";if((S.REACT_GLOBAL_STATE_HOOK_DEBUG||S.REACT_GLOBAL_STATE_TEMP_HOOKS)&&(j=(0,g.generateStackHash)(null!==(r=(new Error).stack)&&void 0!==r?r:"")),S.REACT_GLOBAL_STATE_HOOK_DEBUG)S.REACT_GLOBAL_STATE_HOOK_DEBUG(this,a,j);else if(S.REACT_GLOBAL_STATE_TEMP_HOOKS){var x=void 0!==globalThis.WeakRef?new globalThis.WeakRef(this):this,E=void 0!==globalThis.WeakRef?new globalThis.WeakRef(a):a;S.REACT_GLOBAL_STATE_TEMP_HOOKS.set(j,[x,E])}this.constructor!==t||this.initialize()}var e,r;return e=t,r=[{key:"createObservable",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.isEqualRoot,n=e.isEqual,i=e.name,a=o(this.stateControls(),1)[0],u=[],c=a(),s=(null!=t?t:function(t){return t})(a()),l=a((function(e){if(!(null!=r?r:Object.is)(c,e)){c=e;var o=t(e);(null!=n?n:Object.is)(s,o)||(s=o,u.forEach((function(t){return t()})))}}),{skipFirst:!0}),p=function(t,e,r){var n;if(!t)return s;var o=(0,f.isFunction)(e),i=o?t:void 0,a=o?e:t,c=null!==(n=o?r:e)&&void 0!==n?n:void 0,l=function(){return a(i?i(s):s)};(null==c?void 0:c.skipFirst)||l();var p=function(){l()};return u.push(p),function(){u.splice(u.indexOf(p),1)}};return p._name=null!=i?i:(0,b.uniqueId)("ob:"),p.createObservable=this.createObservable.bind(p),p.removeSubscriptions=function(){u.forEach((function(t){return t()})),u.length=0,l()},p.stateControls=function(){return[p]},p}}],r&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.GlobalStore=w,e.default=w},748:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateStackHash=void 0,e.generateStackHash=function(t){if(!t.trim())return"unknown";t=t.replace(/\s/g,"");for(var e=2166136261,r=0;r<t.length;r++)e^=t.charCodeAt(r),e*=16777619,e&=4294967295;return function(t){for(var e="";t>0;)e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[t%62]+e,t=Math.floor(t/62);return e||"0"}(e>>>0)},e.default=e.generateStackHash},143:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isRecord=void 0;var o=r(125);e.isRecord=function(t){return!(0,o.isNil)(t)&&"object"===n(t)},e.default=e.isRecord},561:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,e)||i(t,e)||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 o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function i(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.shallowCompare=void 0;var c=r(416),s=r(231),l=r(125),f=r(143);e.shallowCompare=function(t,e){if(t===e)return!0;var r=u(t),i=u(e);if(r!==i)return!1;if((0,l.isNil)(t)||(0,l.isNil)(e)||(0,c.isPrimitive)(t)&&(0,c.isPrimitive)(e)||(0,s.isDate)(t)&&(0,s.isDate)(e)||"function"===r&&"function"===i)return t===e;if(Array.isArray(t)){var a=t,p=e;if(a.length!==p.length)return!1;for(var y=0;y<a.length;y++)if(a[y]!==p[y])return!1}if(t instanceof Map){var v=t,h=e;if(v.size!==h.size)return!1;var d,b=o(v);try{for(b.s();!(d=b.n()).done;){var m=n(d.value,2),g=m[0];if(m[1]!==h.get(g))return!1}}catch(t){b.e(t)}finally{b.f()}}if(t instanceof Set){var S=t,w=e;if(S.size!==w.size)return!1;var O,_=o(S);try{for(_.s();!(O=_.n()).done;){var j=O.value;if(!w.has(j))return!1}}catch(t){_.e(t)}finally{_.f()}}if(!(0,f.isRecord)(t)||!(0,f.isRecord)(e))return t===e;var x=Object.keys(t),E=Object.keys(e);if(x.length!==E.length)return!1;for(var P=0,L=x;P<L.length;P++){var A=L[P];if(t[A]!==e[A])return!1}return!0},e.default=e.shallowCompare},400:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throwWrongKeyOnActionCollectionConfig=void 0,e.throwWrongKeyOnActionCollectionConfig=function(t){throw new Error("[WRONG CONFIGURATION!]: Every key inside the storeActionsConfig must be a higher order function that returns a function \n[".concat(t,"]: key is not a valid function, try something like this: \n{\n\n ").concat(t,": (param) => ({ setState, getState, setMetadata, getMetadata, actions }) => {\n\n setState((state) => ({ ...state, ...param }))\n\n }\n\n}\n"))},e.default=e.throwWrongKeyOnActionCollectionConfig},157:(t,e)=>{"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueId=void 0,e.uniqueId=(r=0,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return r===Number.MAX_SAFE_INTEGER&&(r=0),t+Date.now().toString(36)+(r++).toString(36)}),e.default=e.uniqueId},605:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueSymbol=void 0,e.uniqueSymbol=Symbol("unique"),e.default=e.uniqueSymbol},231:function(t){t.exports=(()=>{"use strict";var t={};return(()=>{var e=t;Object.defineProperty(e,"__esModule",{value:!0}),e.isDate=void 0,e.isDate=function(t){return t instanceof Date}})(),t})()},244:function(t){t.exports=(()=>{"use strict";var t={};return(()=>{var e=t;Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=void 0,e.isFunction=function(t){return"function"==typeof t||t instanceof Function}})(),t})()},125:function(t){t.exports=(()=>{"use strict";var t={};return(()=>{var e=t;Object.defineProperty(e,"__esModule",{value:!0}),e.isNil=void 0,e.isNil=function(t){return null==t}})(),t})()},416:function(t){t.exports=(()=>{"use strict";var t={112:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isBoolean=void 0,e.isBoolean=function(t){return"boolean"==typeof t}},243:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNil=void 0,e.isNil=function(t){return null==t}},11:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNumber=void 0,e.isNumber=function(t){return"number"==typeof t}},671:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isString=void 0,e.isString=function(t){return"string"==typeof t}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}var n={};return(()=>{var t=n;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPrimitive=void 0;var o=r(112),i=r(243),a=r(11),u=r(671);t.isPrimitive=function(t){return(0,i.isNil)(t)||(0,a.isNumber)(t)||(0,o.isBoolean)(t)||(0,u.isString)(t)||"symbol"===e(t)}})(),n})()},281:function(t){t.exports=(()=>{"use strict";var t={};return(()=>{var e=t;Object.defineProperty(e,"__esModule",{value:!0}),e.isString=void 0,e.isString=function(t){return"string"==typeof t}})(),t})()},156:e=>{"use strict";e.exports=t}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return e[t].call(i.exports,i,i.exports,n),i.exports}var o={};return(()=>{"use strict";var t=o;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}function i(t){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=a(t);if(r){var i=a(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return function(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalStoreAbstract=void 0;var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)}(o,t);var e,n=i(o);function o(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.apply(this,arguments)).onInit=function(e){t.onInitialize(e)},t.onStateChanged=function(e){t.onChange(e)},t}return e=o,Object.defineProperty(e,"prototype",{writable:!1}),e}(n(774).GlobalStore);t.GlobalStoreAbstract=u,t.default=u})(),o})(),t.exports=n(r(156))},878:e=>{"use strict";e.exports=t},156:t=>{"use strict";t.exports=e}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return r[t].call(i.exports,i,i.exports,o),i.exports}var i={};return(()=>{"use strict";var t=i;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(){r=function(){return n};var t,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),u=new M(n||[]);return a(i,"_invoke",{value:L(t,r,u)}),i}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var v="suspendedStart",h="suspendedYield",d="executing",b="completed",m={};function g(){}function S(){}function w(){}var O={};f(O,c,(function(){return this}));var _=Object.getPrototypeOf,j=_&&_(_(I([])));j&&j!==o&&i.call(j,c)&&(O=j);var x=w.prototype=g.prototype=Object.create(O);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,r){function n(o,a,u,c){var s=y(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==e(f)&&i.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):r.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return n("throw",t,u,c)}))}c(s.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(i,i):i()}})}function L(e,r,n){var o=v;return function(i,a){if(o===d)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=A(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=y(e,r,n);if("normal"===s.type){if(o=n.done?b:h,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=y(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function I(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(i.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(e(r)+" is not iterable")}return S.prototype=w,a(x,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:S,configurable:!0}),S.displayName=f(w,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===S||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},n.awrap=function(t){return{__await:t}},E(P.prototype),f(P.prototype,s,(function(){return this})),n.AsyncIterator=P,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new P(p(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(x),f(x,l,"Generator"),f(x,c,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=I,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},n}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function a(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:String(r)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var p=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalStore=void 0;var y=o(297),v=o(600),h=o(305),d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(f,t);var e,o,i,a=c(f);function f(t){var e,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{metadata:{}};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),(e=a.call(this,t,o)).asyncStorage=null,e.getMetadata=function(){var t,r;return(null===(t=e.asyncStorage)||void 0===t?void 0:t.key)?Object.assign({isAsyncStorageReady:!1,asyncStorageKey:e.asyncStorage.key},null!==(r=e.metadata)&&void 0!==r?r:{}):e.metadata},e._onInitialize=function(t){var n=t.setState,o=t.getState,i=t.setMetadata;return p(l(e),void 0,void 0,r().mark((function t(){var e;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(f.isAsyncStorageAvailable(this.asyncStorage)){t.next=2;break}return t.abrupt("return");case 2:return i((function(t){return Object.assign(Object.assign({},null!=t?t:{}),{isAsyncStorageReady:!1})})),t.next=5,(0,v.getAsyncStorageItem)(this.asyncStorage);case 5:e=t.sent,i((function(t){return Object.assign(Object.assign({},null!=t?t:{}),{isAsyncStorageReady:!0})})),null===e&&(e=o(),(0,h.setAsyncStorageItem)(e,this.asyncStorage)),n(e,{forceUpdate:!0});case 9:case"end":return t.stop()}}),t,this)})))},e._onChange=function(t){var r=t.getState;f.isAsyncStorageAvailable(e.asyncStorage)&&(0,h.setAsyncStorageItem)(r(),e.asyncStorage)},e.onInitialize=null,e.onChange=null,e.onInit=function(t){var r;null===(r=e._onInitialize)||void 0===r||r.call(l(e),t)},e.onStateChanged=function(t){var r;null===(r=e._onChange)||void 0===r||r.call(l(e),t)},e.asyncStorage=null!==(n=o.asyncStorage)&&void 0!==n?n:null,e.setMetadata((function(t){var r,n;return Object.assign(Object.assign({},null!=t?t:{}),{isAsyncStorageReady:!1,asyncStorageKey:null!==(n=null===(r=e.asyncStorage)||void 0===r?void 0:r.key)&&void 0!==n?n:null})})),e.constructor!==f?s(e):(e.initialize(),e)}return e=f,o&&n(e.prototype,o),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}(y.GlobalStoreAbstract);t.GlobalStore=d,d.isAsyncStorageAvailable=function(t){return Boolean(null==t?void 0:t.key)},t.default=d})(),i})()));
|
package/GlobalStoreAbstract.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export declare abstract class GlobalStoreAbstract<State, Metadata extends BaseMe
|
|
|
7
7
|
protected abstract onInitialize: (args: StoreTools<State, StateMeta<Metadata>>) => void;
|
|
8
8
|
protected abstract onChange: (args: StoreTools<State, StateMeta<Metadata>> & StateChanges<State>) => void;
|
|
9
9
|
}
|
|
10
|
+
export default GlobalStoreAbstract;
|