PageSourceSearch

https://arena.social/_next/static/chunks/1812b2ng4tv17.js

js arena.social collected 2026-09-26 05:05:43 UTC 66,899 bytes, 3 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,755838,(t,e,r)=>{"use strict";var n=t.r(271645),i="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},s=n.useState,o=n.useEffect,a=n.useLayoutEffect,c=n.useDebugValue;function u(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!i(t,r)}catch(t){return!0}}var l="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var r=e(),n=s({inst:{value:r,getSnapshot:e}}),i=n[0].inst,l=n[1];return a(function(){i.value=r,i.getSnapshot=e,u(i)&&l({inst:i})},[t,r,e]),o(function(){return u(i)&&l({inst:i}),t(function(){u(i)&&l({inst:i})})},[t]),c(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},802239,(t,e,r)=>{"use strict";e.exports=t.r(755838)},752822,(t,e,r)=>{"use strict";var n=t.r(271645),i=t.r(802239),s="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},o=i.useSyncExternalStore,a=n.useRef,c=n.useEffect,u=n.useMemo,l=n.useDebugValue;r.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var f=a(null);if(null===f.current){var h={hasValue:!1,value:null};f.current=h}else h=f.current;var d=o(t,(f=u(function(){function t(t){if(!c){if(c=!0,o=t,t=n(t),void 0!==i&&h.hasValue){var e=h.value;if(i(e,t))return a=e}return a=t}if(e=a,s(o,t))return e;var r=n(t);return void 0!==i&&i(e,r)?(o=t,e):(o=t,a=r)}var o,a,c=!1,u=void 0===r?null:r;return[function(){return t(e())},null===u?void 0:function(){return t(u())}]},[e,r,n,i]))[0],f[1]);return c(function(){h.hasValue=!0,h.value=d},[d]),l(d),d}},430224,(t,e,r)=>{"use strict";e.exports=t.r(752822)},290571,t=>{"use strict";var e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,r)};function r(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function i(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)0>e.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function s(t,e,r,n){var i,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,r,o):i(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o}function o(t,e){return function(r,n){e(r,n,t)}}function a(t,e,r,n,i,s){function o(t){if(void 0!==t&&"function"!=typeof t)throw TypeError("Function expected");return t}for(var a,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",l=!e&&t?n.static?t:t.prototype:null,f=e||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),h=!1,d=r.length-1;d>=0;d--){var p={};for(var y in n)p[y]="access"===y?{}:n[y];for(var y in n.access)p.access[y]=n.access[y];p.addInitializer=function(t){if(h)throw TypeError("Cannot add initializers after decoration has completed");s.push(o(t||null))};var v=(0,r[d])("accessor"===c?{get:f.get,set:f.set}:f[u],p);if("accessor"===c){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw TypeError("Object expected");(a=o(v.get))&&(f.get=a),(a=o(v.set))&&(f.set=a),(a=o(v.init))&&i.unshift(a)}else(a=o(v))&&("field"===c?i.unshift(a):f[u]=a)}l&&Object.defineProperty(l,n.name,f),h=!0}function c(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0}function u(t){return"symbol"==typeof t?t:"".concat(t)}function l(t,e,r){return"symbol"==typeof e&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function f(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function h(t,e,r,n){return new(r||(r=Promise))(function(i,s){function o(t){try{c(n.next(t))}catch(t){s(t)}}function a(t){try{c(n.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(o,a)}c((n=n.apply(t,e||[])).next())})}function d(t,e){var r,n,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){var u=[a,c];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,n=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){s=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){s.label=u[1];break}if(6===u[0]&&s.label<i[1]){s.label=i[1],i=u;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(u);break}i[2]&&s.ops.pop(),s.trys.pop();continue}u=e.call(t,s)}catch(t){u=[6,t],n=0}
vendor: 2,007 bytes, line 1
1finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var p=Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]};function y(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||p(e,t,r)}function v(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,s=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function m(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(g(arguments[e]));return t}function _(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function S(t,e,r){if(r||2==arguments.length)for(var n,i=0,s=e.length;i<s;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}function b(t){return this instanceof b?(this.v=t,this):new b(t)}function w(t,e,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(t,e||[]),s=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",function(t){return function(e){return Promise.resolve(e).then(t,u)}}),n[Symbol.asyncIterator]=function(){return this},n;function o(t,e){i[t]&&(n[t]=function(e){return new Promise(function(r,n){
1s.push([t,e,r,n])>1||a(t,e)})},e&&(n[t]=e(n[t])))}function a(t,e){try{var r;(r=i[t](e)).value instanceof b?Promise.resolve(r.value.v).then(c,u):l(s[0][2],r)}catch(t){l(s[0][3],t)}}function c(t){a("next",t)}function u(t){a("throw",t)}function l(t,e){t(e),s.shift(),s.length&&a(s[0][0],s[0][1])}}function E(t){var e,r;return e={},n("next"),n("throw",function(t){throw t}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:b(t[n](e)),done:!1}:i?i(e):e}:i}}function x(t){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=v(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise(function(n,i){var s,o,a;s=n,o=i,a=(e=t[r](e)).done,Promise.resolve(e.value).then(function(t){s({value:t,done:a})},o)})}}}function O(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var A=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},k=function(t){return(k=Object.getOwnPropertyNames||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[e.length]=r);return e})(t)};function T(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r=k(t),n=0;n<r.length;n++)"default"!==r[n]&&p(e,t,r[n]);return A(e,t),e}function P(t){return t&&t.__esModule?t:{default:t}}function I(t,e,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}function j(t,e,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(t,r):i?i.value=r:e.set(t,r),r}function R(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}function D(t,e,r){if(null!=e){var n,i;if("object"!=typeof e&&"function"!=typeof e)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],r&&(i=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}var C="function"==typeof SuppressedError?SuppressedError:function(t,e,r){var n=Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function $(t){function e(e){t.error=t.hasError?new C(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var r,n=0;return function i(){for(;r=t.stack.pop();)try{if(!r.async&&1===n)return n=0,t.stack.push(r),Promise.resolve().then(i);if(r.dispose){var s=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(s).then(i,function(t){return e(t),i()})}else n|=1}catch(t){e(t)}if(1===n)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}function M(t,e){return"string"==typeof t&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(t,r,n,i,s){return r?e?".jsx":".js":!n||i&&s?n+i+"."+s.toLowerCase()+"js":t}):t}let N={__extends:r,__assign:n,__rest:i,__decorate:s,__param:o,__esDecorate:a,__runInitializers:c,__propKey:u,__setFunctionName:l,__metadata:f,__awaiter:h,__generator:d,__createBinding:p,__exportStar:y,__values:v,__read:g,__spread:m,__spreadArrays:_,__spreadArray:S,__await:b,__asyncGenerator:w,__asyncDelegator:E,__asyncValues:x,__makeTemplateOb
1ject:O,__importStar:T,__importDefault:P,__classPrivateFieldGet:I,__classPrivateFieldSet:j,__classPrivateFieldIn:R,__addDisposableResource:D,__disposeResources:$,__rewriteRelativeImportExtension:M};t.s(["__addDisposableResource",0,D,"__assign",()=>n,"__asyncDelegator",0,E,"__asyncGenerator",0,w,"__asyncValues",0,x,"__await",0,b,"__awaiter",0,h,"__classPrivateFieldGet",0,I,"__classPrivateFieldIn",0,R,"__classPrivateFieldSet",0,j,"__createBinding",0,p,"__decorate",0,s,"__disposeResources",0,$,"__esDecorate",0,a,"__exportStar",0,y,"__extends",0,r,"__generator",0,d,"__importDefault",0,P,"__importStar",0,T,"__makeTemplateObject",0,O,"__metadata",0,f,"__param",0,o,"__propKey",0,u,"__read",0,g,"__rest",0,i,"__rewriteRelativeImportExtension",0,M,"__runInitializers",0,c,"__setFunctionName",0,l,"__spread",0,m,"__spreadArray",0,S,"__spreadArrays",0,_,"__values",0,v,"default",0,N])},833776,t=>{"use strict";t.s(["assignRef",0,function(t,e){return"function"==typeof t?t(e):t&&(t.current=e),t}])},246871,t=>{"use strict";var e=t.i(271645);t.s(["useCallbackRef",0,function(t,r){var n=(0,e.useState)(function(){return{value:t,callback:r,facade:{get current(){return n.value},set current(value){var e=n.value;e!==value&&(n.value=value,n.callback(value,e))}}}})[0];return n.callback=r,n.facade}])},232286,t=>{"use strict";var e=t.i(271645),r=t.i(833776),n=t.i(246871),i="u">typeof window?e.useLayoutEffect:e.useEffect,s=new WeakMap;t.s(["useMergeRefs",0,function(t,e){var o=(0,n.useCallbackRef)(e||null,function(e){return t.forEach(function(t){return(0,r.assignRef)(t,e)})});return i(function(){var e=s.get(o);if(e){var n=new Set(e),i=new Set(t),a=o.current;n.forEach(function(t){i.has(t)||(0,r.assignRef)(t,null)}),i.forEach(function(t){n.has(t)||(0,r.assignRef)(t,a)})}s.set(o,t)},[t]),o}])},386252,t=>{"use strict";var e=t.i(290571);function r(t){return t}function n(t,e){void 0===e&&(e=r);var n=[],i=!1;return{read:function(){if(i)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(t){var r=e(t,i);return n.push(r),function(){n=n.filter(function(t){return t!==r})}},assignSyncMedium:function(t){for(i=!0;n.length;){var e=n;n=[],e.forEach(t)}n={push:function(e){return t(e)},filter:function(){return n}}},assignMedium:function(t){i=!0;var e=[];if(n.length){var r=n;n=[],r.forEach(t),e=n}var s=function(){var r=e;e=[],r.forEach(t)},o=function(){return Promise.resolve().then(s)};o(),n={push:function(t){e.push(t),o()},filter:function(t){return e=e.filter(t),n}}}}}t.s(["createMedium",0,function(t,e){return void 0===e&&(e=r),n(t,e)},"createSidecarMedium",0,function(t){void 0===t&&(t={});var r=n(null);return r.options=(0,e.__assign)({async:!0,ssr:!1},t),r}])},84770,(t,e,r)=>{"use strict";e.exports=function(t){for(var e=[],r=t.length,n=0;n<r;n++){var i=t.charCodeAt(n);if(i>=55296&&i<=56319&&r>n+1){var s=t.charCodeAt(n+1);s>=56320&&s<=57343&&(i=(i-55296)*1024+s-56320+65536,n+=1)}if(i<128){e.push(i);continue}if(i<2048){e.push(i>>6|192),e.push(63&i|128);continue}if(i<55296||i>=57344&&i<65536){e.push(i>>12|224),e.push(i>>6&63|128),e.push(63&i|128);continue}if(i>=65536&&i<=1114111){e.push(i>>18|240),e.push(i>>12&63|128),e.push(i>>6&63|128),e.push(63&i|128);continue}e.push(239,191,189)}return new Uint8Array(e).buffer}},245953,(t,e,r)=>{"use strict";var n={single_source_shortest_paths:function(t,e,r){var i,s,o,a,c,u,l,f={},h={};h[e]=0;var d=n.PriorityQueue.make();for(d.push(e,0);!d.empty();)for(o in s=(i=d.pop()).value,a=i.cost,c=t[s]||{})c.hasOwnProperty(o)&&(u=a+c[o],l=h[o],(void 0===h[o]||l>u)&&(h[o]=u,d.push(o,u),f[o]=s));if(void 0!==r&&void 0===h[r])throw Error("Could not find a path from "+e+" to "+r+".");return f},extract_shortest_path_from_predecessor_list:function(t,e){for(var r=[],n=e;n;)r.push(n),t[n],n=t[n];return r.reverse(),r},find_path:function(t,e,r){var i=n.single_source_shortest_paths(t,e,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(t){var e,r=n.PriorityQueue,i={};for(e in t=t||{},r)r.hasOwnProperty(e)&&(i[e]=r[e]);return i.queue=[],i.sorter=t.sorter||r.default_sorter,i},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){this.queue.push({value:t,cost:e}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=n},478492,(t,e,r)=>{"use strict";var n=Object.prototype.hasOwnProperty,i="~";function s(){}function o(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function a(t,e,r,n,s){if("function"!=typeof r)throw TypeError("The listener must be a function");var a=new o(r,n||t,s),c=i?i+e:e;return t._events[c]?t._events[c].fn?t._events[c]=[t._events[c],a]:t._events[c].push(a):(t._events[c]=a,t._eventsCount++),t}function c(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function u(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(i=!1)),u.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)n.call(t,e)&&r.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},u.prototype.listeners=function(t){var e=i?i+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,s=r.length,o=Array(s);n<s;n++)o[n]=r[n].fn;return o},u.prototype.listenerCount=function(t){var e=i?i+t:t,r=this._events[e];return r?r.fn?1:r.length:0},u.prototype.emit=function(t,e,r,n,s,o){var a=i?i+t:t;if(!this._events[a])return!1;var c,u,l=this._events[a],f=arguments.length;
1if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,r),!0;case 4:return l.fn.call(l.context,e,r,n),!0;case 5:return l.fn.call(l.context,e,r,n,s),!0;case 6:return l.fn.call(l.context,e,r,n,s,o),!0}for(u=1,c=Array(f-1);u<f;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var h,d=l.length;for(u=0;u<d;u++)switch(l[u].once&&this.removeListener(t,l[u].fn,void 0,!0),f){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,e);break;case 3:l[u].fn.call(l[u].context,e,r);break;case 4:l[u].fn.call(l[u].context,e,r,n);break;default:if(!c)for(h=1,c=Array(f-1);h<f;h++)c[h-1]=arguments[h];l[u].fn.apply(l[u].context,c)}}return!0},u.prototype.on=function(t,e,r){return a(this,t,e,r,!1)},u.prototype.once=function(t,e,r){return a(this,t,e,r,!0)},u.prototype.removeListener=function(t,e,r,n){var s=i?i+t:t;if(!this._events[s])return this;if(!e)return c(this,s),this;var o=this._events[s];if(o.fn)o.fn!==e||n&&!o.once||r&&o.context!==r||c(this,s);else{for(var a=0,u=[],l=o.length;a<l;a++)(o[a].fn!==e||n&&!o[a].once||r&&o[a].context!==r)&&u.push(o[a]);u.length?this._events[s]=1===u.length?u[0]:u:c(this,s)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&c(this,e)):(this._events=new s,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=i,u.EventEmitter=u,e.exports=u},595932,t=>{"use strict";let e=t.i(478492).default;t.s(["default",0,e])},87246,t=>{"use strict";var e=t.i(478492);t.s(["EventEmitter",()=>e.default])},95187,(t,e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={callServer:function(){return s.callServer},createServerReference:function(){return a.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=t.r(132120),o=t.r(92245),a=t.r(235326)},361521,t=>{"use strict";var e=t.i(95187);let r=(0,e.createServerReference)("0053f7be4512e27f7c4fe78d6620ebae928e73be03",e.callServer,void 0,e.findSourceMapURL,"logout");t.s(["logout",0,r])},595619,t=>{"use strict";t.s(["REFCODE_QUERY_PARAM",0,"refcode","REF_QUERY_PARAM",0,"ref"])},943499,t=>{"use strict";var e=t.i(595619);let r="pendingReferral",n=/^[a-zA-Z0-9_-]{3,24}$/,i=/^[a-zA-Z0-9_-]{1,64}$/;t.s(["capturePendingReferralFromUrl",0,()=>{let t=new URLSearchParams(window.location.search),s=null,o=null,a=t.get(e.REFCODE_QUERY_PARAM);if(a)s="code",o=a;else{let r=t.get(e.REF_QUERY_PARAM);r&&(s="handle",o=r)}if(!s||!o)return;let c=o.trim();if(("code"===s?!n.test(c):!i.test(c))||window.sessionStorage.getItem(r))return;let u={kind:s,value:c,clickedAt:Date.now()};try{window.sessionStorage.setItem(r,JSON.stringify(u))}catch{}},"clearPendingReferral",0,()=>{window.sessionStorage.removeItem(r)},"readPendingReferral",0,()=>{let t=window.sessionStorage.getItem(r);if(!t)return null;try{let e=JSON.parse(t);return e&&"object"==typeof e&&("code"===e.kind||"handle"===e.kind)&&"string"==typeof e.value&&e.value.length>0&&"number"==typeof e.clickedAt&&Number.isFinite(e.clickedAt)?e:null}catch{return null}}])},77607,t=>{"use strict";t.s(["DEFAULT_LOGIN_REDIRECT",0,"/home","DEFAULT_SUSPENDED_REDIRECT",0,"/suspended"])},709922,t=>{"use strict";var e=t.i(271645).useLayoutEffect;t.s(["default",0,e])},847616,t=>{"use strict";t.s(["devToolsAdapter",0,e=>{if("u"<typeof window)return;let r=function(){let e="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:t.g;if(e.__xstate__)return e.__xstate__}();r&&r.register(e)}])},658666,t=>{"use strict";var e,r=t.i(847616);class n{constructor(t){this._process=t,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(t){let e={value:t,next:null};if(this._current){this._last.next=e,this._last=e;return}this._current=e,this._last=e,this._active&&this.flush()}flush(){for(;this._current;){let t=this._current;this._process(t.value),this._current=t.next}this._last=null}}let i="xstate.init",s="xstate.stop";function o(t,e){return{type:`xstate.done.state.${t}`,output:e}}function a(t,e){return{type:`xstate.error.actor.${t}`,error:e,actorId:t}}function c(t){return{type:i,input:t}}function u(t){setTimeout(()=>{throw t})}let l="function"==typeof Symbol&&Symbol.observable||"@@observable";function f(t){if(y(t))return t;let e=[],r="";for(let n=0;n<t.length;n++){switch(t.charCodeAt(n)){case 92:r+=t[n+1],n++;continue;case 46:e.push(r),r="";
1continue}r+=t[n]}return e.push(r),e}function h(t){var e;return(e=t)&&"object"==typeof e&&"machine"in e&&"value"in e?t.value:"string"!=typeof t?t:function(t){if(1===t.length)return t[0];let e={},r=e;for(let e=0;e<t.length-1;e++)if(e===t.length-2)r[t[e]]=t[e+1];else{let n=r;r={},n[t[e]]=r}return e}(f(t))}function d(t){var e;return void 0===t?[]:y(e=t)?e:[e]}function p(t,e,r,n){return"function"==typeof t?t({context:e,event:r,self:n}):t}function y(t){return Array.isArray(t)}function v(t){var e;return(y(e=t)?e:[e]).map(t=>void 0===t||"string"==typeof t?{target:t}:t)}function g(t){if(void 0!==t&&""!==t)return d(t)}function m(t,e,r){let n="object"==typeof t,i=n?t:void 0;return{next:(n?t.next:t)?.bind(i),error:(n?t.error:e)?.bind(i),complete:(n?t.complete:r)?.bind(i)}}function _(t,e){let r=e.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!r)return t.implementations.actors[e];let[,n,i]=r,s=t.getStateNodeById(i).config.invoke;return(Array.isArray(s)?s[n]:s).src}function S(t,e){return`${t.sessionId}.${e}`}let b=0,w=!1,E=((e={})[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped",e),x={clock:{setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)},logger:console.log.bind(console),devTools:!1};class O{constructor(t,e){this.logic=t,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new n(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=E.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this._systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];const r={...x,...e},{clock:i,logger:s,parent:o,syncSnapshot:a,id:c,systemId:l,inspect:f}=r;this.system=o?o.system:function(t,e){let r=new Map,n=new Map,i=new WeakMap,s=new Set,o={},{clock:a,logger:c}=e,u={schedule:(t,e,r,n,i=Math.random().toString(36).slice(2))=>{let s={source:t,target:e,event:r,delay:n,id:i,startedAt:Date.now()},c=S(t,i);l._snapshot._scheduledEvents[c]=s;let u=a.setTimeout(()=>{delete o[c],delete l._snapshot._scheduledEvents[c],l._relay(t,e,r)},n);o[c]=u},cancel:(t,e)=>{let r=S(t,e),n=o[r];delete o[r],delete l._snapshot._scheduledEvents[r],void 0!==n&&a.clearTimeout(n)},cancelAll:t=>{for(let e in l._snapshot._scheduledEvents){let r=l._snapshot._scheduledEvents[e];r.source===t&&u.cancel(t,r.id)}}},l={_snapshot:{_scheduledEvents:(e?.snapshot&&e.snapshot.scheduler)??{}},_bookId:()=>`x:${b++}`,_register:(t,e)=>(r.set(t,e),t),_unregister:t=>{r.delete(t.sessionId);let e=i.get(t);void 0!==e&&(n.delete(e),i.delete(t))},get:t=>n.get(t),_set:(t,e)=>{let r=n.get(t);if(r&&r!==e)throw Error(`Actor with system ID '${t}' already exists.`);n.set(t,e),i.set(e,t)},inspect:t=>{let e=m(t);return s.add(e),{unsubscribe(){s.delete(e)}}},_sendInspectionEvent:e=>{if(!s.size)return;let r={...e,rootId:t.sessionId};s.forEach(t=>t.next?.(r))},_relay:(t,e,r)=>{l._sendInspectionEvent({type:"@xstate.event",sourceRef:t,actorRef:e,event:r}),e._send(r)},scheduler:u,getSnapshot:()=>({_scheduledEvents:{...l._snapshot._scheduledEvents}}),start:()=>{let t=l._snapshot._scheduledEvents;for(let e in l._snapshot._scheduledEvents={},t){let{source:r,target:n,event:i,delay:s,id:o}=t[e];u.schedule(r,n,i,s,o)}},_clock:a,_logger:c};return l}(this,{clock:i,logger:s}),f&&!o&&this.system.inspect(m(f)),this.sessionId=this.system._bookId(),this.id=c??this.sessionId,this.logger=e?.logger??this.system._logger,this.clock=e?.clock??this.system._clock,this._parent=o,this._syncSnapshot=a,this.options=r,this.src=r.src??t,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:t=>{this._deferred.push(t)},system:this.system,stopChild:t=>{if(t._parent!==this)throw Error(`Cannot stop child actor ${t.id} of ${this.id} because it is not a child`);t._stop()},emit:t=>{let e=this.eventListeners.get(t.type),r=this.eventListeners.get("*");if(e||r)for(let n of[...e?e.values():[],...r?r.values():[]])try{n(t)}catch(t){u(t)}},actionExecutor:t=>{let e=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:t.type,params:t.params}}),!t.exec)return;let e=w;try{w=!0,t.exec(t.info,t.params)}finally{w=e}};this._processingStatus===E.Running?e():this._deferred.push(e)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),l&&(this._systemId=l,this.system._set(l,this)),this._initState(e?.snapshot??e?.state),l&&"active"!==this._snapshot.status&&this.system._unregister(this)}_initState(t){try{this._snapshot=t?this.logic.restoreSnapshot?this.logic.restoreSnapshot(t,this._actorScope):t:this.logic.getInitialSnapshot(this._actorScope,this.options?.input)}catch(t){this._snapshot={status:"error",output:void 0,error:t}}}update(t,e){let r;for(this._snapshot=t;r=this._deferred.shift();)try{r()}catch(e){this._deferred.length=0,this._snapshot={...t,status:"error",error:e}}switch(this._snapshot.status){case"active":for(let e of this.observers)try{e.
1next?.(t)}catch(t){u(t)}break;case"done":var n;for(let e of this.observers)try{e.next?.(t)}catch(t){u(t)}this._stopProcedure(),this._complete(),this._doneEvent=(n=this.id,{type:`xstate.done.actor.${n}`,output:this._snapshot.output,actorId:n}),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error)}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:e,snapshot:t})}subscribe(t,e,r){let n=m(t,e,r);if(this._processingStatus!==E.Stopped)this.observers.add(n);else switch(this._snapshot.status){case"done":try{n.complete?.()}catch(t){u(t)}break;case"error":{let t=this._snapshot.error;if(n.error)try{n.error(t)}catch(t){u(t)}else u(t)}}return{unsubscribe:()=>{this.observers.delete(n)}}}on(t,e){let r=this.eventListeners.get(t);r||(r=new Set,this.eventListeners.set(t,r));let n=e.bind(void 0);return r.add(n),{unsubscribe:()=>{r.delete(n)}}}start(){if(this._processingStatus===E.Running)return this;this._syncSnapshot&&this.subscribe({next:t=>{"active"===t.status&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:t})},error:()=>{}}),this.system._register(this.sessionId,this),this._systemId&&this.system._set(this._systemId,this),this._processingStatus=E.Running;let t=c(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:t}),this._snapshot.status){case"done":return this.update(this._snapshot,t),this;case"error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope)}catch(t){return this._snapshot={...this._snapshot,status:"error",error:t},this._error(t),this}return this.update(this._snapshot,t),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(t){let e,r;try{e=this.logic.transition(this._snapshot,t,this._actorScope)}catch(t){r={err:t}}if(r){let{err:t}=r;this._snapshot={...this._snapshot,status:"error",error:t},this._error(t);return}this.update(e,t),t.type===s&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===E.Stopped||((this.mailbox.clear(),this._processingStatus===E.NotStarted)?this._processingStatus=E.Stopped:this.mailbox.enqueue({type:s})),this}stop(){if(this._parent)throw Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(let t of this.observers)try{t.complete?.()}catch(t){u(t)}this.observers.clear()}_reportError(t){if(!this.observers.size){this._parent||u(t);return}let e=!1;for(let r of this.observers){let n=r.error;e||=!n;try{n?.(t)}catch(t){u(t)}}this.observers.clear(),e&&u(t)}_error(t){this._stopProcedure(),this._reportError(t),this._parent&&this.system._relay(this,this._parent,a(this.id,t))}_stopProcedure(){return this._processingStatus!==E.Running||(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new n(this._process.bind(this)),this._processingStatus=E.Stopped,this.system._unregister(this)),this}_send(t){this._processingStatus!==E.Stopped&&this.mailbox.enqueue(t)}send(t){this.system._relay(void 0,this,t)}attachDevTools(){let{devTools:t}=this.options;t&&("function"==typeof t?t:r.devToolsAdapter)(this)}toJSON(){return{xstate$$type:1,id:this.id}}getPersistedSnapshot(t){return this.logic.getPersistedSnapshot(this._snapshot,t)}[l](){return this}getSnapshot(){return this._snapshot}}function A(t,...[e]){return new O(t,e)}function k(t,e,r,n,{sendId:i}){return[e,{sendId:"function"==typeof i?i(r,n):i},void 0]}function T(t,e){t.defer(()=>{t.system.scheduler.cancel(t.self,e.sendId)})}function P(t){function e(t,e){}return e.type="xstate.cancel",e.sendId=t,e.resolve=k,e.execute=T,e}function I(t,e,r,n,{id:i,systemId:s,src:o,input:a,syncSnapshot:c}){let u,l,f="string"==typeof o?_(e.machine,o):o,h="function"==typeof i?i(r):i;return f&&(l="function"==typeof a?a({context:e.context,event:r.event,self:t.self}):a,u=A(f,{id:h,src:o,parent:t.self,syncSnapshot:c,systemId:s,input:l})),[tg(e,{children:{...e.children,[h]:u}}),{id:i,systemId:s,actorRef:u,src:o,input:l},void 0]}function j(t,{actorRef:e}){e&&t.defer(()=>{e._processingStatus!==E.Stopped&&e.start()})}function R(...[t,{id:e,systemId:r,input:n,syncSnapshot:i=!1}={}]){function s(t,e){}return s.type="xstate.spawnChild",s.id=e,s.systemId=r,s.src=t,s.input=n,s.syncSnapshot=i,s.resolve=I,s.execute=j,s}function D(t,e,r,n,{actorRef:i}){let s="function"==typeof i?i(r,n):i,o="string"==typeof s?e.children[s]:s,a=e.children;return o&&(a={...a},delete a[o.id]),[tg(e,{children:a}),o,void 0]}function C(t,e){if(e){if(t.system._unregister(e),e._processingStatus!==E.Running)return void t.stopChild(e);t.defer(()=>{t.stopChild(e)})}}function $(t){function e(t,e){}return e.type="xstate.stopChild",e.actorRef=t,e.resolve=D,e.execute=C,e}function M(t,{context:e,event:r},{guards:n}){return!N(n[0],e,r,t)}function N(t,e,r,n){let{machine:i}=n,s="function"==typeof t,o=s?t:i.implementations.guards["string"==typeof t?t:t.type];if(!s&&!o)throw Error(`Guard '${"string"==typeof t?t:t.type}' is not implemented.'.`);if("function"!=typeof o)return N(o,e,r,n);let a={context:e,event:r},c=s||"string"==typeof t?void 0:"params"in t?"function"==typeof t.params?t.params({context:e,event:r}):t.params:void 0;return"check"in o?o.check(n,a,o):o(a,c)}let U=t=>"atomic"===t.type||"final"===t.type;function L(t){return Object.values(t.states).filter(t=>"history"!==t.type)}function B(t,e){let r=[];if(e===t)return r;let n=t.parent;for(;n&&n!==e;)r.push(n),n=n.parent;return r}function F(t){let e=new Set(t),r=V(e);for(let t of e)if("compound"!==t.type||r.get(t)&&r.get(t).length){if("parallel"===t.type){for(let r of L(t))if("history"!==r.type&&!e.has(r))for(let t of Q(r))e.add(t)}}else Q(t).forEach(t=>e.add(t));for(let t of e){let r=t.parent;for(;r;)e.add(r),r=r.parent}return e}function V(t){let e=new Map;for(let r of t)e.has(r)||e.set(r,[]),r.parent&&(e.has(r.parent)||e.set(r.parent,[]),e.get(r.parent).push(r));return e}function H(t,e){return function t(e,r){let n=r.get(e);if(!n)return{};if("compound"===e.type){let t=n[0];if(!t)return{};if(U(t))return t.key}let i={};for(let e of n)i[e.key]=t(e,r);return i}(t,V(F(e)))}function W(t,e){return"compound"===e.type?L(e).some(e=>"final"===e.type&&t.has(e)):"parallel"===e.type?L(e).every(e=>W(t,e)):"final"===e.type}let G=t=>"#"===t[0];function z(t,e,r){let n=g(r.target),i=r.reenter??!1,s=function(t,e){if(void 0!==e)return e.map(e=>{if("string"!=typeof e)return e;if(G(e))return t.machine.getStateNodeById(e);let r="."===e[0];if(r&&!t.parent)return X(t,e.slice(1));let n=r?t.key+e:e;if(t.parent)try{return X(t.parent,n)}catch(e){throw Error(`Invalid transition definition for state node '${t.id}':
2${e.message}`)}throw Error(`Invalid target: "${e}" is not a valid target from the root node. Did you mean ".${e}"?`)})}(t,n),o={...r,actions:d(r.actions),guard:r.guard,target:s,source:t,reenter
2:i,eventType:e,toJSON:()=>({...o,source:`#${t.id}`,target:s?s.map(t=>`#${t.id}`):void 0})};return o}function J(t){let e=g(t.config.target);return e?{target:e.map(e=>"string"==typeof e?X(t.parent,e):e)}:t.parent.initial}function q(t){return"history"===t.type}function Q(t){let e=K(t);for(let r of e)for(let n of B(r,t))e.add(n);return e}function K(t){let e=new Set;return!function t(r){if(!e.has(r)){if(e.add(r),"compound"===r.type)t(r.initial.target[0]);else if("parallel"===r.type)for(let e of L(r))t(e)}}(t),e}function Y(t,e){if(G(e))return t.machine.getStateNodeById(e);if(!t.states)throw Error(`Unable to retrieve child state '${e}' from '${t.id}'; no child states exist.`);let r=t.states[e];if(!r)throw Error(`Child state '${e}' does not exist on '${t.id}'`);return r}function X(t,e){if("string"==typeof e&&G(e))try{return t.machine.getStateNodeById(e)}catch{}let r=f(e).slice(),n=t;for(;r.length;){let t=r.shift();if(!t.length)break;n=Y(n,t)}return n}function Z(t,e){if("string"==typeof e){let r=t.states[e];if(!r)throw Error(`State '${e}' does not exist on '${t.id}'`);return[t,r]}let r=Object.keys(e),n=r.map(e=>Y(t,e)).filter(Boolean);return[t.machine.root,t].concat(n,r.reduce((r,n)=>{let i=Y(t,n);if(!i)return r;let s=Z(i,e[n]);return r.concat(s)},[]))}function tt(t,e){let r=t;for(;r.parent&&r.parent!==e;)r=r.parent;return r.parent===e}function te(t,e,r){let n=new Set;for(let i of t){let t=!1,s=new Set;for(let o of n)if(function(t,e){let r=new Set(t),n=new Set(e);for(let t of r)if(n.has(t))return!0;for(let t of n)if(r.has(t))return!0;return!1}(ti([i],e,r),ti([o],e,r)))if(tt(i.source,o.source))s.add(o);else{t=!0;break}if(!t){for(let t of s)n.delete(t);n.add(i)}}return Array.from(n)}function tr(t,e){if(!t.target)return[];let r=new Set;for(let n of t.target)if(q(n))if(e[n.id])for(let t of e[n.id])r.add(t);else for(let t of tr(J(n),e))r.add(t);else r.add(n);return[...r]}function tn(t,e){let r=tr(t,e);if(!r)return;if(!t.reenter&&r.every(e=>e===t.source||tt(e,t.source)))return t.source;let n=function(t){let[e,...r]=t;for(let t of B(e,void 0))if(r.every(e=>tt(e,t)))return t}(r.concat(t.source));return n||(t.reenter?void 0:t.source.machine.root)}function ti(t,e,r){let n=new Set;for(let i of t)if(i.target?.length){let t=tn(i,r);for(let r of(i.reenter&&i.source===t&&n.add(t),e))tt(r,t)&&n.add(r)}return[...n]}function ts(t,e,r,n,i,s){if(!t.length)return e;let a=new Set(e._nodes),c=e.historyValue,u=te(t,a,c),l=e;i||([l,c]=function(t,e,r,n,i,s,o,a){let c,u=t,l=ti(n,i,s);for(let t of(l.sort((t,e)=>e.order-t.order),l))for(let e of function(t){return Object.keys(t.states).map(e=>t.states[e]).filter(t=>"history"===t.type)}(t)){let r;r="deep"===e.history?e=>U(e)&&tt(e,t):e=>e.parent===t,(c??={...s})[e.id]=Array.from(i).filter(r)}for(let t of l)u=tc(u,e,r,[...t.exit,...t.invoke.map(t=>$(t.id))],o,void 0),i.delete(t);return[u,c||s]}(l,n,r,u,a,c,s,r.actionExecutor)),l=function(t,e,r,n,i,s,a,c){let u=t,l=new Set,f=new Set;(function(t,e,r,n){for(let i of t){let t=tn(i,e);for(let s of i.target||[])!q(s)&&(i.source!==s||i.source!==t||i.reenter)&&(n.add(s),r.add(s)),to(s,e,r,n);for(let s of tr(i,e)){let o=B(s,t);t?.type==="parallel"&&o.push(t),ta(n,e,r,o,!i.source.parent&&i.reenter?void 0:t)}}})(n,a,f,l),c&&f.add(t.machine.root);let h=new Set;for(let t of[...l].sort((t,e)=>t.order-e.order)){i.add(t);let n=[];for(let e of(n.push(...t.entry),t.invoke))n.push(R(e.src,{...e,syncSnapshot:!!e.onSnapshot}));if(f.has(t)){let e=t.initial.actions;n.push(...e)}if(u=tc(u,e,r,n,s,t.invoke.map(t=>t.id)),"final"===t.type){let n=t.parent,a=n?.type==="parallel"?n:n?.parent,c=a||t;for(n?.type==="compound"&&s.push(o(n.id,void 0!==t.output?p(t.output,u.context,e,r.self):void 0));a?.type==="parallel"&&!h.has(a)&&W(i,a);)h.add(a),s.push(o(a.id)),c=a,a=a.parent;if(a)continue;u=tg(u,{status:"done",output:function(t,e,r,n,i){if(void 0===n.output)return;let s=o(i.id,void 0!==i.output&&i.parent?p(i.output,t.context,e,r.self):void 0);return p(n.output,t.context,s,r.self)}(u,e,r,u.machine.root,c)})}}return u}(l=tc(l,n,r,u.flatMap(t=>t.actions),s,void 0),n,r,u,a,s,c,i);let f=[...a];"done"===l.status&&(l=tc(l,n,r,f.sort((t,e)=>e.order-t.order).flatMap(t=>t.exit),s,void 0));try{if(c===e.historyValue&&function(t,e){if(t.length!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;return!0}(e._nodes,a))return l;return tg(l,{_nodes:f,historyValue:c})}catch(t){throw t}}function to(t,e,r,n){var i,s,o,a;if(q(t))if(e[t.id]){let o=e[t.id];for(let t of o)n.add(t),to(t,e,r,n);for(let a of o){i=a,s=t.parent,ta(n,e,r,B(i,s))}}else{let i=J(t);for(let s of i.target)n.add(s),i===t.parent?.initial&&r.add(t.parent),to(s,e,r,n);for(let s of i.target){o=s,a=t.parent,ta(n,e,r,B(o,a))}}else if("compound"===t.type){let[i]=t.initial.target;q(i)||(n.add(i),r.add(i)),to(i,e,r,n),ta(n,e,r,B(i,t))}else if("parallel"===t.type)for(let i of L(t).filter(t=>!q(t)))[...n].some(t=>tt(t,i))||(q(i)||(n.add(i),r.add(i)),to(i,e,r,n))}function ta(t,e,r,n,i){for(let s of n)if((!i||tt(s,i))&&t.add(s),"parallel"===s.type)for(let n of L(s).filter(t=>!q(t)))[...t].some(t=>tt(t,n))||(t.add(n),to(n,e,r,t))}function tc(t,e,r,n,i,s){let o=s?[]:void 0,a=function t(e,r,n,i,s,o){let{machine:a}=e,c=e;for(let e of i){var u;let i="function"==typeof e,l=i?e:(u="string"==typeof e?e:e.type,a.implementations.actions[u]),f={context:c.context,event:r,self:n.self,system:n.system},h=i||"string"==typeof e?void 0:"params"in e?"function"==typeof e.params?e.params({context:c.context,event:r}):e.params:void 0;if(!l||!("resolve"in l)){n.actionExecutor({type:"string"==typeof e?e:"object"==typeof e?e.type:e.name||"(anonymous)",info:f,params:h,exec:l});continue}let[d,p,y]=l.resolve(n,c,f,h,l,s);c=d,"retryResolve"in l&&o?.push([l,p]),"execute"in l&&n.actionExecutor({type:l.type,info:f,params:p,exec:l.execute.bind(null,n,p)}),y&&(c=t(c,r,n,y,s,o))}return c}(t,e,r,n,{internalQueue:i,deferredActorIds:s},o);return o?.forEach(([t,e])=>{t.retryResolve(r,a,e)}),a}function tu(t,e,r){return tc(t,e,r,Object.values(t.children).map(t=>
2$(t)),[],void 0)}function tl(t,e){return e.machine.getTransitionData(e,t)}let tf=function(t){return function t(e,r){let n=h(e),i=h(r);return"string"==typeof i?"string"==typeof n&&i===n:"string"==typeof n?n in i:Object.keys(n).every(e=>e in i&&t(n[e],i[e]))}(t,this.value)},th=function(t){return this.tags.has(t)},td=function(t){let e=this.machine.getTransitionData(this,t);return!!e?.length&&e.some(t=>void 0!==t.target||t.actions.length)},tp=function(){let{_nodes:t,tags:e,machine:r,getMeta:n,toJSON:i,can:s,hasTag:o,matches:a,...c}=this;return{...c,tags:Array.from(e)}},ty=function(){return this._nodes.reduce((t,e)=>(void 0!==e.meta&&(t[e.id]=e.meta),t),{})};function tv(t,e){return{status:t.status,output:t.output,error:t.error,machine:e,context:t.context,_nodes:t._nodes,value:H(e.root,t._nodes),tags:new Set(t._nodes.flatMap(t=>t.tags)),children:t.children,historyValue:t.historyValue||{},matches:tf,hasTag:th,can:td,getMeta:ty,toJSON:tp}}function tg(t,e={}){return tv({...t,...e},t.machine)}function tm(t,e,r,n,{event:i,id:s,delay:o},{internalQueue:a}){let c,u=e.machine.implementations.delays;if("string"==typeof i)throw Error(`Only event objects may be used with raise; use raise({ type: "${i}" }) instead`);let l="function"==typeof i?i(r,n):i;if("string"==typeof o){let t=u&&u[o];c="function"==typeof t?t(r,n):t}else c="function"==typeof o?o(r,n):o;return"number"!=typeof c&&a.push(l),[e,{event:l,id:s,delay:c},void 0]}function t_(t,e){let{event:r,delay:n,id:i}=e;if("number"==typeof n)return void t.defer(()=>{let e=t.self;t.system.scheduler.schedule(e,e,r,n,i)})}function tS(t,e){function r(t,e){}return r.type="xstate.raise",r.event=t,r.id=e?.id,r.delay=e?.delay,r.resolve=tm,r.execute=t_,r}t.s(["$",0,1,"B",0,function(t,e){return t.transitions.get(e)||[...t.transitions.keys()].filter(t=>{if("*"===t)return!0;if(!t.endsWith(".*"))return!1;let r=t.split("."),n=e.split(".");for(let t=0;t<r.length;t++){let e=r[t],i=n[t];if("*"===e)return t===r.length-1;if(e!==i)return!1}return!0}).sort((t,e)=>e.length-t.length).flatMap(e=>t.transitions.get(e))},"C",0,function(t,e){let r=F(Z(t,e));return H(t,[...r])},"D",0,F,"E",0,tv,"F",0,W,"G",0,function(t,e,r,n){let o=t,a=[];function c(t,e,n){r.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:r.self,event:e,snapshot:t,_transitions:n}),a.push(t)}if(e.type===s)return c(o=tg(tu(o,e,r),{status:"stopped"}),e,[]),{snapshot:o,microstates:a};let u=e;if(u.type!==i){let e=u,i=e.type.startsWith("xstate.error.actor"),s=tl(e,o);if(i&&!s.length)return c(o=tg(t,{status:"error",error:e.error}),e,[]),{snapshot:o,microstates:a};c(o=ts(s,t,r,u,!1,n),e,s)}let l=!0;for(;"active"===o.status;){let t=l?function(t,e){let r=new Set;for(let n of t._nodes.filter(U))t:for(let i of[n].concat(B(n,void 0)))if(i.always){for(let n of i.always)if(void 0===n.guard||N(n.guard,t.context,e,t)){r.add(n);break t}}return te(Array.from(r),new Set(t._nodes),t.historyValue)}(o,u):[],e=t.length?o:void 0;if(!t.length){if(!n.length)break;t=tl(u=n.shift(),o)}l=(o=ts(t,o,r,u,!1,n))!==e,c(o,u,t)}return"active"!==o.status&&tu(o,u,r),{snapshot:o,microstates:a}},"H",0,function t(e,r,n,i){if("string"==typeof r){let t;return(t=Y(e,r).next(n,i))&&t.length?t:e.next(n,i)}if(1===Object.keys(r).length){let s,o;return(o=t(Y(e,(s=Object.keys(r))[0]),r[s[0]],n,i))&&o.length?o:e.next(n,i)}let s=[];for(let o of Object.keys(r)){let a=r[o];if(!a)continue;let c=t(Y(e,o),a,n,i);c&&s.push(...c)}return s.length?s:e.next(n,i)},"I",0,tc,"J",0,c,"K",0,ts,"L",0,K,"M",0,f,"N",0,"","O",0,G,"P",0,X,"Q",0,function(t,e){let{_nodes:r,tags:n,machine:i,children:s,context:o,can:a,hasTag:c,matches:u,getMeta:l,toJSON:f,...h}=t,d={};for(let t in s){let r=s[t];d[t]={snapshot:r.getPersistedSnapshot(e),src:r.src,systemId:r._systemId,syncSnapshot:r._syncSnapshot}}return{...h,context:function t(e){let r;for(let n in e){let i=e[n];if(i&&"object"==typeof i)if("sessionId"in i&&"send"in i&&"ref"in i)(r??=Array.isArray(e)?e.slice():{...e})[n]={xstate$$type:1,id:i.id};else{let s=t(i);s!==i&&((r??=Array.isArray(e)?e.slice():{...e})[n]=s)}}return r??e}(o),children:d,historyValue:function(t){if("object"!=typeof t||null===t)return{};let e={};for(let r in t){let n=t[r];Array.isArray(n)&&(e[r]=n.map(t=>({id:t.id})))}return e}(h.historyValue)}},"R",0,_,"S",0,".","T",0,"xstate.error","U",0,a,"V",0,E,"W",0,tg,"X",0,s,"a",0,P,"b",0,R,"c",0,A,"g",0,Z,"j",0,m,"l",0,function(t,e){let r={},n=Object.keys(t);for(let i=0;i<n.length;i++){let s=n[i];r[s]=e(t[s],s,t,i)}return r},"n",0,function(t){function e(t,e){return!1}return e.check=M,e.guards=[t],e},"q",0,function(t){let e=new Map;if(t.config.on)for(let r of Object.keys(t.config.on)){if(""===r)throw Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');let n=t.config.on[r];
2e.set(r,v(n).map(e=>z(t,r,e)))}if(t.config.onDone){let r=`xstate.done.state.${t.id}`;e.set(r,v(t.config.onDone).map(e=>z(t,r,e)))}for(let r of t.invoke){if(r.onDone){let n=`xstate.done.actor.${r.id}`;e.set(n,v(r.onDone).map(e=>z(t,n,e)))}if(r.onError){let n=`xstate.error.actor.${r.id}`;e.set(n,v(r.onError).map(e=>z(t,n,e)))}if(r.onSnapshot){let n=`xstate.snapshot.${r.id}`;e.set(n,v(r.onSnapshot).map(e=>z(t,n,e)))}}for(let r of t.after){let t=e.get(r.eventType);t||(t=[],e.set(r.eventType,t)),t.push(r)}return e},"r",0,tS,"s",0,$,"t",0,d,"u",0,v,"v",0,z,"w",0,N,"x",0,function(t,e){return`${e}.${t}`},"y",0,function(t){let e=t.config.after;return e?Object.keys(e).flatMap(r=>{var n;let i,s,o=e[r],a=Number.isNaN(+r)?r:+r,c=(n=t.id,s=(i={type:`xstate.after.${a}.${n}`}).type,t.entry.push(tS(i,{id:s,delay:a})),t.exit.push(P(s)),s);return d("string"==typeof o?{target:o}:o).map(t=>({...t,event:c,delay:a}))}).map(e=>{let{delay:r}=e;return{...z(t,e.event,e),delay:r}}):[]},"z",0,function(t,e){let r="string"==typeof e?t.states[e]:e?t.states[e.target]:void 0;if(!r&&e)throw Error(`Initial state node "${e}" not found on parent state node #${t.id}`);let n={source:t,actions:e&&"string"!=typeof e?d(e.actions):[],eventType:null,reenter:!1,target:r?[r]:[],toJSON:()=>({...n,source:`#${t.id}`,target:r?[`#${r.id}`]:[]})};return n}])},260384,t=>{"use strict";var e=t.i(658666);t.s(["toObserver",()=>e.j])},135533,t=>{"use strict";var e=t.i(658666);t.s(["createActor",()=>e.c])},695713,t=>{"use strict";var e=t.i(271645),r=t.i(709922),n=t.i(260384),i=t.i(135533),s=t.i(430224);t.i(802239);let o=(t,e)=>{e(t);let r=t.getSnapshot().children;r&&Object.values(r).forEach(t=>{o(t,e)})};function a(t,e){return t===e}function c(t,r,n=a){let i=(0,e.useCallback)(e=>{if(!t)return()=>{};let{unsubscribe:r}=t.subscribe(e);return r},[t]),o=(0,e.useCallback)(()=>t?.getSnapshot(),[t]);return(0,s.useSyncExternalStoreWithSelector)(i,o,o,r,n)}t.s(["createActorContext",0,function(t,s){let a=e.createContext(null),u=a.Provider;function l({children:a,logic:c=t,machine:f,options:h}){if(f)throw Error('The "machine" prop has been deprecated. Please use "logic" instead.');let d=function(t,...[s,a]){let c=function(t,...[n]){let[[s,o],a]=(0,e.useState)(()=>{let e=(0,i.createActor)(t,n);return[t.config,e]});if(t.config!==s){let e=(0,i.createActor)(t,{...n,snapshot:o.getPersistedSnapshot({__unsafeAllowInlineActors:!0})});a([t.config,e]),o=e}return(0,r.default)(()=>{o.logic.implementations=t.implementations}),o}(t,s);return(0,e.useEffect)(()=>{if(!a)return;let t=c.subscribe((0,n.toObserver)(a));return()=>{t.unsubscribe()}},[a]),(0,e.useEffect)(()=>(c.start(),()=>{let t,e;t=[],o(c,e=>{t.push([e,e.getSnapshot()]),e.observers=new Set}),e=c.system.getSnapshot?.(),c.stop(),c.system._snapshot=e,t.forEach(([t,e])=>{t._processingStatus=0,t._snapshot=e})}),[c]),c}(c,{...s,...h});return e.createElement(u,{value:d,children:a})}function f(){let t=e.useContext(a);if(!t)throw Error(`You used a hook from "${l.displayName}" but it's not inside a <${l.displayName}> component.`);return t}return l.displayName="ActorProvider",{Provider:l,useActorRef:f,useSelector:function(t,e){return c(f(),t,e)}}},"useSelector",0,c])},807574,t=>{"use strict";var e=t.i(658666);let r=new WeakMap,n="xstate.promise.resolve",i="xstate.promise.reject",s=new WeakMap;t.s(["fromCallback",0,function(t){return{config:t,start:(e,n)=>{let{self:i,system:s,emit:o}=n,a={receivers:void 0,dispose:void 0};r.set(i,a),a.dispose=t({input:e.input,system:s,self:i,sendBack:t=>{"stopped"!==i.getSnapshot().status&&i._parent&&s._relay(i,i._parent,t)},receive:t=>{a.receivers??=new Set,a.receivers.add(t)},emit:o})},transition:(t,n,i)=>{let s=r.get(i.self);return n.type===e.X?(t={...t,status:"stopped",error:void 0},s.dispose?.()):s.receivers?.forEach(t=>t(n)),t},getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,input:e}),getPersistedSnapshot:t=>t,restoreSnapshot:t=>t}},"fromPromise",0,function(t){return{config:t,transition:(t,r,o)=>{if("active"!==t.status)return t;switch(r.type){case n:{let e=r.data;return{...t,status:"done",output:e,input:void 0}}case i:return{...t,status:"error",error:r.data,input:void 0};case e.X:return s.get(o.self)?.abort(),{...t,status:"stopped",input:void 0};default:return t}},start:(e,{self:r,system:o,emit:a})=>{if("active"!==e.status)return;let c=new AbortController;s.set(r,c),Promise.resolve(t({input:e.input,system:o,self:r,signal:c.signal,emit:a})).then(t=>{"active"===r.getSnapshot().status&&(s.delete(r),o._relay(r,r,{type:n,data:t}))},t=>{"active"===r.getSnapshot().status&&(s.delete(r),o._relay(r,r,{type:i,data:t}))})},getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,input:e}),getPersistedSnapshot:t=>t,restoreSnapshot:t=>t}}])},973577,t=>{"use strict";var e=t.i(77607);let r=t=>{if(!t)return null;try{let e=t.split(".")[1];if(!e)return null;return JSON.parse(atob(e.replace(/-/g,"+").replace(/_/g,"/")))}catch{return null}};t.s(["isAuthTokenExpired",0,t=>{let e=r(t);return"number"==typeof e?.exp&&Date.now()>=1e3*e.exp},"jwtHasEmbeddedWallet",0,t=>{let e=r(t)?.verified_credentials;return Array.isArray(e)&&e.some(t=>t?.wallet_provider==="embeddedWallet"&&t?.chain==="eip155")},"readUrlParam",0,t=>new URLSearchParams(window.location.search).get(t),"safeCallbackUrl",0,t=>!(!t||"string"!=typeof t||!t.startsWith("/")||t.startsWith("//")||t.includes("\\")||(t=>{for(let e=0;e<t.length;e++){let r=t.charCodeAt(e);if(r<=31||127===r)return!0}return!1})(t))&&1?t:e.DEFAULT_LOGIN_REDIRECT])},996703,t=>{"use strict";var e=t.i(658666);function r(t,n,i,s,{assignment:o}){if(!n.context)throw Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");let a={},c={context:n.context,event:i.event,spawn:function(t,{machine:r,context:n},i,s){return(o,a)=>{let c=((o,a)=>
2{if("string"!=typeof o)return(0,e.c)(o,{id:a?.id,parent:t.self,syncSnapshot:a?.syncSnapshot,input:a?.input,src:o,systemId:a?.systemId});{let c=(0,e.R)(r,o);if(!c)throw Error(`Actor logic '${o}' not implemented in machine '${r.id}'`);let u=(0,e.c)(c,{id:a?.id,parent:t.self,syncSnapshot:a?.syncSnapshot,input:"function"==typeof a?.input?a.input({context:n,event:i,self:t.self}):a?.input,src:o,systemId:a?.systemId});return s[u.id]=u,u}})(o,a);return s[c.id]=c,t.defer(()=>{c._processingStatus!==e.V.Stopped&&c.start()}),c}}(t,n,i.event,a),self:t.self,system:t.system},u={};if("function"==typeof o)u=o(c,s);else for(let t of Object.keys(o)){let e=o[t];u[t]="function"==typeof e?e(c,s):e}let l=Object.assign({},n.context,u);return[(0,e.W)(n,{context:l,children:Object.keys(a).length?{...n.children,...a}:n.children}),void 0,void 0]}t.s(["a",0,function(t){function e(t,e){}return e.type="xstate.assign",e.assignment=t,e.resolve=r,e}])},427143,t=>{"use strict";var e=t.i(996703);t.s(["assign",()=>e.a])},523729,t=>{"use strict";var e=t.i(658666),r=t.i(996703);let n=new WeakMap;function i(t,e,r){let i=n.get(t);return i?e in i||(i[e]=r()):(i={[e]:r()},n.set(t,i)),i[e]}let s={},o=t=>"string"==typeof t?{type:t}:"function"==typeof t?"resolve"in t?{type:t.type}:{type:t.name}:t;class a{constructor(t,r){if(this.config=t,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=r._parent,this.key=r._key,this.machine=r._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join(e.S),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?(0,e.l)(this.config.states,(t,e)=>new a(t,{_parent:this,_key:e,_machine:this.machine})):s,"compound"===this.type&&!this.config.initial)throw Error(`No initial state specified for compound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=!0===this.config.history?"shallow":this.config.history||!1,this.entry=(0,e.t)(this.config.entry).slice(),this.exit=(0,e.t)(this.config.exit).slice(),this.meta=this.config.meta,this.output="final"!==this.type&&this.parent?void 0:this.config.output,this.tags=(0,e.t)(t.tags).slice()}_initialize(){this.transitions=(0,e.q)(this),this.config.always&&(this.always=(0,e.u)(this.config.always).map(t=>(0,e.v)(this,e.N,t))),Object.keys(this.states).forEach(t=>{this.states[t]._initialize()})}get definition(){return{id:this.id,key:this.key,version:this.machine.version,type:this.t
2ype,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(o),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(t=>`#${t.id}`),source:`#${this.id}`,actions:this.initial.actions.map(o),eventType:null})}:void 0,history:this.history,states:(0,e.l)(this.states,t=>t.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(t=>({...t,actions:t.actions.map(o)})),entry:this.entry.map(o),exit:this.exit.map(o),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return i(this,"invoke",()=>(0,e.t)(this.config.invoke).map((t,r)=>{let{src:n,systemId:i}=t,s=t.id??(0,e.x)(this.id,r),o="string"==typeof n?n:`xstate.invoke.${(0,e.x)(this.id,r)}`;return{...t,src:o,id:s,systemId:i,toJSON(){let{onDone:e,onError:r,...n}=t;return{...n,type:"xstate.invoke",src:o,id:s}}}}))}get on(){return i(this,"on",()=>[...this.transitions].flatMap(([t,e])=>e.map(e=>[t,e])).reduce((t,[e,r])=>(t[e]=t[e]||[],t[e].push(r),t),{}))}get after(){return i(this,"delayedTransitions",()=>(0,e.y)(this))}get initial(){return i(this,"initial",()=>(0,e.z)(this,this.config.initial))}next(t,r){let n,s=r.type,o=[];for(let a of i(this,`candidates-${s}`,()=>(0,e.B)(this,s))){let{guard:i}=a,c=t.context,u=!1;try{u=!i||(0,e.w)(i,c,r,t)}catch(e){let t="string"==typeof i?i:"object"==typeof i?i.type:void 0;throw Error(`Unable to evaluate guard ${t?`'${t}' `:""}in transition for event '${s}' in state node '${this.id}':
3${e.message}`)}if(u){o.push(...a.actions),n=a;break}}return n?[n]:void 0}get events(){return i(this,"events",()=>{let{states:t}=this,e=new Set(this.ownEvents);if(t)for(let r of Object.keys(t)){let n=t[r];if(n.states)for(let t of n.events)e.add(`${t}`)}return Array.from(e)})}get ownEvents(){return Array.from(new Set([...this.transitions.keys()].filter(t=>this.transitions.get(t).some(t=>!(!t.target&&!t.actions.length&&!t.reenter)))))}}class c{constructor(t,e){this.config=t,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=t.id||"(machine)",this.implementations={actors:e?.actors??{},actions:e?.actions??{},delays:e?.delays??{},guards:e?.guards??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new a(t,{_key:this.id,_machine:this}),this.root._initialize(),this.states=this.root.states,this.events=this.root.events}provide(t){let{actions:e,guards:r,actors:n,delays:i}=this.implementations;return new c(this.config,{actions:{...e,...t.actions},guards:{...r,...t.guards},actors:{...n,...t.actors},delays:{...i,...t.delays}})}resolveState(t){let r=(0,e.C)(this.root,t.value),n=(0,e.D)((0,e.g)(this.root,r));return(0,e.E)({_nodes:[...n],context:t.context||{},children:{},status:(0,e.F)(n,this.root)?"done":t.status||"active",output:t.output,error:t.error,historyValue:t.historyValue},this)}transition(t,r,n){return(0,e.G)(t,r,n,[]).snapshot}microstep(t,r,n){return(0,e.G)(t,r,n,[]).microstates}getTransitionData(t,r){return(0,e.H)(this.root,t.value,t,r)||[]}getPreInitialState(t,n,i){let{context:s}=this.config,o=(0,e.E)({context:"function"!=typeof s&&s?s:{},_nodes:[this.root],children:{},status:"active"},this);return"function"==typeof s?(0,e.I)(o,n,t,[(0,r.a)(({spawn:t,event:e,self:r})=>s({spawn:t,input:e.input,self:r}))],i,void 0):o}getInitialSnapshot(t,r){let n=(0,e.J)(r),i=[],s=this.getPreInitialState(t,n,i),o=(0,e.K)([{target:[...(0,e.L)(this.root)],source:this.root,reenter:!0,actions:[],eventType:null,toJSON:null}],s,t,n,!0,i),{snapshot:a}=(0,e.G)(o,n,t,i);return a}start(t){Object.values(t.children).forEach(t=>{"active"===t.getSnapshot().status&&t.start()})}getStateNodeById(t){let r=(0,e.M)(t),n=r.slice(1),i=(0,e.O)(r[0])?r[0].slice(1):r[0],s=this.idMap.get(i);if(!s)throw Error(`Child state node '#${i}' does not exist on machine '${this.id}'`);return(0,e.P)(s,n)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(t,r){return(0,e.Q)(t,r)}restoreSnapshot(t,r){let n={},i=t.children;
3Object.keys(i).forEach(t=>{let s=i[t],o=s.snapshot,a=s.src,c="string"==typeof a?(0,e.R)(this,a):a;if(!c)return;let u=(0,e.c)(c,{id:t,parent:r.self,syncSnapshot:s.syncSnapshot,snapshot:o,src:a,systemId:s.systemId});n[t]=u});let s=function(t,e){if(!e||"object"!=typeof e)return{};let r={};for(let n in e)for(let i of e[n]){let e=function(t,e){if(e instanceof a)return e;try{return t.machine.getStateNodeById(e.id)}catch{}}(t,i);e&&(r[n]??=[],r[n].push(e))}return r}(this.root,t.historyValue),o=(0,e.E)({...t,children:n,_nodes:Array.from((0,e.D)((0,e.g)(this.root,t.value))),historyValue:s},this),c=new Set;return!function t(r,n){if(!c.has(r))for(let i in c.add(r),r){let s=r[i];if(s&&"object"==typeof s){if("xstate$$type"in s&&s.xstate$$type===e.$){r[i]=n[s.id];continue}t(s,n)}}}(o.context,n),o}}t.s(["S",0,c])},16797,t=>{"use strict";var e,r=t.i(658666),n=t.i(996703);function i(t,e,r,n,{event:s}){return[e,{event:"function"==typeof s?s(r,n):s},void 0]}function s(t,{event:e}){t.defer(()=>t.emit(e))}function o(t){function e(t,e){}return e.type="xstate.emit",e.event=t,e.resolve=i,e.execute=s,e}let a=((e={}).Parent="#_parent",e.Internal="#_internal",e);function c(t,e,r,n,{to:i,event:s,id:o,delay:u},l){let f,h,d=e.machine.implementations.delays;if("string"==typeof s)throw Error(`Only event objects may be used with sendTo; use sendTo({ type: "${s}" }) instead`);let p="function"==typeof s?s(r,n):s;if("string"==typeof u){let t=d&&d[u];f="function"==typeof t?t(r,n):t}else f="function"==typeof u?u(r,n):u;let y="function"==typeof i?i(r,n):i;if("string"==typeof y){if(!(h=y===a.Parent?t.self._parent:y===a.Internal?t.self:y.startsWith("#_")?e.children[y.slice(2)]:l.deferredActorIds?.includes(y)?y:e.children[y]))throw Error(`Unable to send event to actor '${y}' from machine '${e.machine.id}'.`)}else h=y||t.self;return[e,{to:h,targetId:"string"==typeof y?y:void 0,event:p,id:o,delay:f},void 0]}function u(t,e,r){"string"==typeof r.to&&(r.to=e.children[r.to])}function l(t,e){t.defer(()=>{let{to:n,event:i,delay:s,id:o}=e;"number"==typeof s?t.system.scheduler.schedule(t.self,n,i,s,o):t.system._relay(t.self,n,i.type===r.T?(0,r.U)(t.self.id,i.data):i)})}function f(t,e,r){function n(t,e){}return n.type="xstate.sendTo",n.to=t,n.event=e,n.id=r?.id,n.delay=r?.delay,n.resolve=c,n.retryResolve=u,n.execute=l,n}function h(t,e,i,s,{collect:c}){let u=[],l=function(t){u.push(t)};return l.assign=(...t)=>{u.push((0,n.a)(...t))},l.cancel=(...t)=>{u.push((0,r.a)(...t))},l.raise=(...t)=>{u.push((0,r.r)(...t))},l.sendTo=(...t)=>{u.push(f(...t))},l.sendParent=(...t)=>{u.push(function(t,e){return f(a.Parent,t,e)}(...t))},l.spawnChild=(...t)=>{u.push((0,r.b)(...t))},l.stopChild=(...t)=>{u.push((0,r.s)(...t))},l.emit=(...t)=>{u.push(o(...t))},c({context:i.context,event:i.event,enqueue:l,check:t=>(0,r.w)(t,e.context,i.event,e),self:t.self,system:t.system},s),[e,void 0,u]}function d(t,e,r,n,{value:i,label:s}){return[e,{value:"function"==typeof i?i(r,n):i,label:s},void 0]}function p({logger:t},{value:e,label:r}){r?t(r,e):t(e)}t.s(["a",0,o,"e",0,function(t){function e(t,e){}return e.type="xstate.enqueueActions",e.collect=t,e.resolve=h,e},"l",0,function(t=({context:t,event:e})=>({context:t,event:e}),e){function r(t,e){}return r.type="xstate.log",r.value=t,r.label=e,r.resolve=d,r.execute=p,r},"s",0,f])},509820,t=>{"use strict";t.i(807574);var e=t.i(658666),r=t.i(523729),n=t.i(996703),i=t.i(16797);t.s(["setup",0,function({schemas:t,actors:s,actions:o,guards:a,delays:c}){return{assign:n.a,sendTo:i.s,raise:e.r,log:i.l,cancel:e.a,stopChild:e.s,enqueueActions:i.e,emit:i.a,spawnChild:e.b,createStateConfig:t=>t,createAction:t=>t,createMachine:e=>{var n,i;return n={...e,schemas:t},i={actors:s,actions:o,guards:a,delays:c},new r.S(n,i)}}}])},347095,t=>{"use strict";var e=t.i(95187);
3let r=(0,e.createServerReference)("40f0415c3eb21d9cbe7b7d3e81f19c7420afc8ea2d",e.callServer,void 0,e.findSourceMapURL,"loginDynamic");t.s(["loginDynamic",0,r])},13659,t=>{"use strict";var e=t.i(95187);let r=(0,e.createServerReference)("408b0b54403e334d5132711c26e505ad53607bb359",e.callServer,void 0,e.findSourceMapURL,"loginEmail");t.s(["loginEmail",0,r])},591909,t=>{"use strict";var e,r=((e={})[e.PUBLIC=0]="PUBLIC",e[e.BADGEHOLDERS=1]="BADGEHOLDERS",e[e.FOLLOWERS=2]="FOLLOWERS",e[e.SHAREHOLDERS=3]="SHAREHOLDERS",e[e.SUBSCRIBERS=4]="SUBSCRIBERS",e[e.TOBUY=5]="TOBUY",e);t.s(["ThreadPrivacyTypeEnum",()=>r])},951219,t=>{"use strict";var e,r=((e={})[e.NONE=0]="NONE",e[e.BOT=1]="BOT",e[e.SPAM=2]="SPAM",e[e.SUSPENDED=3]="SUSPENDED",e[e.AI_AGENT=4]="AI_AGENT",e);t.s(["UserFlaggedEnum",()=>r])},493948,t=>{"use strict";t.i(591909),t.i(951219),t.s([])},349300,t=>{"use strict";t.i(650601);var e=t.i(159958),r=t.i(427143),n=t.i(807574),i=t.i(509820),s=t.i(347095),o=t.i(13659),a=t.i(361521),c=t.i(943499),u=t.i(77607);t.i(493948);var l=t.i(951219),f=t.i(973577);let h=(0,i.setup)({types:{context:{},events:{}},actors:{exchange:(0,n.fromPromise)(async({input:t})=>{let r=(0,e.getAuthToken)();if(!r)throw{code:"NO_TOKEN",message:"No Dynamic auth token"};let n=(0,f.readUrlParam)("ref"),i=(0,c.readPendingReferral)(),a="email"===t.method?await (0,o.loginEmail)({token:r,ref:n,pendingReferral:i}):await (0,s.loginDynamic)({token:r,ref:n,pendingReferral:i});if(a.error||!a.data)throw{code:a.errorCode??"EXCHANGE_FAILED",message:a.error??"exchange failed"};return(0,c.clearPendingReferral)(),{user:a.data.user}}),revokeDynamicSession:(0,n.fromPromise)(async()=>{}),clearBackendSession:(0,n.fromPromise)(async()=>{await (0,a.logout)()})},actions:{redirectAfterLogin:({context:t})=>{window.location.href=t.userFlag===l.UserFlaggedEnum.SUSPENDED?u.DEFAULT_LOGIN_REDIRECT:(0,f.safeCallbackUrl)((0,f.readUrlParam)("callbackUrl"))},redirectToSuspended:()=>{window.location.href=u.DEFAULT_SUSPENDED_REDIRECT},captureAuthMethod:(0,r.assign)({authMethod:({event:t})=>"AUTH_STARTED"===t.type?t.method:null}),clearAuthMethod:(0,r.assign)({authMethod:null})},guards:{isAccountDeleted:({event:t})=>t.error?.code==="ACCOUNT_DELETED"}}).createMachine({id:"login",context:{authMethod:null,userFlag:null,error:null},initial:"idle",states:{idle:{on:{AUTH_SUCCESS:"exchanging",AUTH_STARTED:{target:"authenticating",actions:"captureAuthMethod"}}},authenticating:{on:{AUTH_SUCCESS:"exchanging",AUTH_CANCELLED:{target:"idle",actions:"clearAuthMethod"}}},exchanging:{entry:(0,r.assign)({error:null}),invoke:{src:"exchange",input:({context:t})=>({method:t.authMethod}),onDone:{target:"authenticated",actions:(0,r.assign)({userFlag:({event:t})=>t.output.user?.flag??null})},onError:[{guard:"isAccountDeleted",target:"loggingOut"},{target:"failed",actions:(0,r.assign)({error:({event:t})=>t.error??{code:"UNKNOWN",message:"Sign-in failed"}})}]},on:{AUTH_CANCELLED:"idle"}},failed:{on:{AUTH_STARTED:{target:"authenticating",actions:"captureAuthMethod"},AUTH_SUCCESS:"exchanging"}},authenticated:{entry:"redirectAfterLogin"},loggingOut:{invoke:{src:"revokeDynamicSession",onDone:"idle",onError:"idle"}},suspended:{invoke:{src:"clearBackendSession",onDone:{actions:"redirectToSuspended"},onError:{actions:"redirectToSuspended"}}}},on:{SESSION_INVALID:".loggingOut",TO_BE_DELETED:".loggingOut",LOGOUT:".loggingOut",SUSPENDED:".suspended"}});t.s(["loginMachine",0,h])},402495,t=>{"use strict";var e=t.i(843476),r=t.i(271645);t.i(650601);var n=t.i(159958),i=t.i(933765),s=t.i(776555),o=t.i(695713),a=t.i(807574),c=t.i(562164),u=t.i(293700),l=t.i(973577),f=t.i(349300);let h=(0,o.createActorContext)(f.loginMachine);function d({hasBackendToken:t}){let e=h.useActorRef(),o=h.useSelector(t=>t.value),a=(0,s.useIsLoggedIn)(),{primaryWallet:f}=(0,i.useDynamicContext)();return(0,r.useEffect)(()=>((0,u.registerLoginSend)(t=>e.send(t)),()=>(0,u.registerLoginSend)(null)),[e]),(0,r.useEffect)(()=>{if("u"<typeof BroadcastChannel)return;let t=new BroadcastChannel("arena-auth"),r=!1;t.onmessage=t=>{t.data?.type==="logout"&&"loggingOut"!==e.getSnapshot().value&&(r=!0,e.send({type:"LOGOUT"}),r=!1)};let n=!1,i=e.subscribe(e=>{let i="loggingOut"===e.value;!i||n||r||t.postMessage({type:"logout"}),n=i});return()=>{i.unsubscribe(),t.close()}},[e]),(0,r.useEffect)(()=>{"failed"===o&&c.toast.danger("Sign-in failed. Please try again.")},[o]),(0,r.useEffect)(()=>
3{if(!a)return;let r=(0,n.getAuthToken)();(0,l.isAuthTokenExpired)(r)?e.send({type:"SESSION_INVALID"}):!t&&"idle"===o&&(0,l.jwtHasEmbeddedWallet)(r)&&e.send({type:"AUTH_SUCCESS"})},[e,a,t,o,f?.address]),null}t.s(["LoginMachineProvider",0,function({hasBackendToken:t,children:n}){let{handleLogOut:s}=(0,i.useDynamicContext)(),o=(0,r.useMemo)(()=>f.loginMachine.provide({actors:{revokeDynamicSession:(0,a.fromPromise)(async()=>{await s()})}}),[s]);return(0,e.jsxs)(h.Provider,{logic:o,children:[(0,e.jsx)(d,{hasBackendToken:t}),n]})}])}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.