PageSourceSearch

https://ai-form-reader.vercel.app/static/js/main.2c794c77.js

js ai-form-reader.vercel.app collected 2026-10-03 06:12:29 UTC 428,239 bytes, 3 lines download raw bytes

1/*! For license information please see main.2c794c77.js.LICENSE.txt */
2(()=>{var e={43:(e,t,n)=>{"use strict";e.exports=n(202)},99:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var a=s(n(43)),o=s(n(270)),i=["text","onCopy","options","children"];function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){v(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function h(e){var t=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(e){return!1}}();return function(){var n,a=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}(this,n)}}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(l,e);var t,n,r,s=h(l);function l(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return v(p(e=s.call.apply(s,[this].concat(n))),"onClick",function(t){var n=e.props,r=n.text,i=n.onCopy,s=n.children,l=n.options,u=a.default.Children.only(s),c=(0,o.default)(r,l);i&&i(r,c),u&&u.props&&"function"===typeof u.props.onClick&&u.props.onClick(t)}),e}return t=l,(n=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),n=c(e,i),r=a.default.Children.only(t);return a.default.cloneElement(r,u(u({},n),{},{onClick:this.onClick}))}}])&&d(t.prototype,n),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(a.default.PureComponent);t.CopyToClipboard=g,v(g,"defaultProps",{onCopy:void 0,options:void 0})},139:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,o(n)))}return e}function o(e){if("string"===typeof e||"number"===typeof e)return e;if("object"!==typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=i(t,n));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}
2.apply(t,[]))||(e.exports=n)}()},140:(e,t,n)=>{"use strict";Object.defineProperty(t,"m",{enumerable:!0,get:function(){return a.default}});var r,a=(r=n(351))&&r.__esModule?r:{default:r}},153:(e,t,n)=>{"use strict";var r=n(43),a=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,o={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)i.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:a,type:e,key:u,ref:c,props:o,_owner:s.current}}t.Fragment=o,t.jsx=u,t.jsxs=u},173:(e,t,n)=>{e.exports=n(497)()},202:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,v={};function g(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||p}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||p}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=g.prototype;var w=b.prototype=new y;w.constructor=b,m(w,g.prototype),w.isPureReactComponent=!0;var k=Array.isArray,_=Object.prototype.hasOwnProperty,x={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,r){var a,o={},i=null,s=null;if(null!=t)for(a in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)_.call(t,a)&&!S.hasOwnProperty(a)&&(o[a]=t[a]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(a in l=e.defaultProps)void 0===o[a]&&(o[a]=l[a]);return{$$typeof:n,type:e,key:i,ref:s,props:o,_owner:x.current}}function C(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var j=/\/+/g;function P(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function T(e,t,a,o,i){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return i=i(l=e),e=""===o?"."+P(l,0):o,k(i)?(a="",null!=e&&(a=e.replace(j,"$&/")+"/"),T(i,t,a,"",function(e){return e})):null!=i&&(C(i)&&(i=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,a+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(j,"$&/")+"/")+e)),t.push(i)),1;if(l=0,o=""===o?".":o+":",k(e))for(var u=0;u<e.length;u++){var c=o+P(s=e[u],u);l+=T(s,t,a,c,i)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),u=0;!(s=e.next()).done;)l+=T(s=s.value,t,a,c=o+P(s,u++),i);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function R(e,t,n){if(null==e)return e;var r=[],a=0;return T(e,r,"","",function(e){return t.call(n,e,a++)}),r}function O(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var N={current:null},L={transition:null},A={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:L,ReactCurrentOwner:x};function I(){throw Error("act(...) is not supported in production builds of React.")}
2t.Children={map:R,forEach:function(e,t,n){R(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return R(e,function(){t++}),t},toArray:function(e){return R(e,function(e){return e})||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=g,t.Fragment=a,t.Profiler=i,t.PureComponent=b,t.StrictMode=o,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A,t.act=I,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var a=m({},e.props),o=e.key,i=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,s=x.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)_.call(t,u)&&!S.hasOwnProperty(u)&&(a[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)a.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];a.children=l}return{$$typeof:n,type:e.type,key:o,ref:i,props:a,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:O}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=L.transition;L.transition={};try{e()}finally{L.transition=t}},t.unstable_act=I,t.useCallback=function(e,t){return N.current.useCallback(e,t)},t.useContext=function(e){return N.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return N.current.useDeferredValue(e)},t.useEffect=function(e,t){return N.current.useEffect(e,t)},t.useId=function(){return N.current.useId()},t.useImperativeHandle=function(e,t,n){return N.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return N.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return N.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return N.current.useMemo(e,t)},t.useReducer=function(e,t,n){return N.current.useReducer(e,t,n)},t.useRef=function(e){return N.current.useRef(e)},t.useState=function(e){return N.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return N.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return N.current.useTransition()},t.version="18.3.1"},210:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=r(n(829)),o=r(n(736)),i=n(745);class s{constructor(e){let{headers:t={},schema:n,fetch:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.url=e,this.headers=Object.assign(Object.assign({},i.DEFAULT_HEADERS),t),this.schemaName=n,this.fetch=r}from(e){const t=new URL(`${this.url}/${e}`);return new a.default(t,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new s(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{head:r=!1,get:a=!1,count:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=new URL(`${this.url}/rpc/${e}`);let l;r||a?(t=r?"HEAD":"GET",Object.entries(n).filter(e=>{let[t,n]=e;return void 0!==n}).map(e=>{let[t,n]=e;return[t,Array.isArray(n)?`{${n.join(",")}}`:`${n}`]}).forEach(e=>{let[t,n]=e;s.searchParams.append(t,n)})):(t="POST",l=n);const u=Object.assign({},this.headers);return i&&(u.Prefer=`count=${i}`),new o.default({method:t,url:s,headers:u,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}}t.default=s},216:(e,t,n)=>{"use strict";var r;n.d(t,{$3:()=>U,$P:()=>p,AV:()=>de,BV:()=>oe,C5:()=>te,Eu:()=>de,Ew:()=>H,FE:()=>z,Ix:()=>ae,J8:()=>W,KC:()=>_,KP:()=>J,KT:()=>fe,LG:()=>B,P1:()=>x,RQ:()=>y,Ri:()=>m,Rq:()=>l,UX:()=>f,V8:()=>X,Ye:()=>C,Zp:()=>w,bg:()=>pe,cq:()=>M,fS:()=>ee,g:()=>S,jD:()=>ie,jb:()=>c,mP:()=>q,oI:()=>K,ph:()=>j,qh:()=>re,r5:()=>V,sp:()=>s,sv:()=>ne,vL:()=>F,wE:()=>he,wQ:()=>g,x$:()=>E,yN:()=>d,zy:()=>v});var a=n(43),o=n(387);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}const s=a.createContext(null);const l=a.createContext(null);const u=a.createContext(null);const c=a.createContext(null);const d=a.createContext(null);const f=a.createContext({outlet:null,matches:[],isDataRoute:!1});const h=a.createContext(null);function p(e,t){let{relative:n}=void 0===t?{}:t;m()||(0,o.Oi)(!1);let{basename:r,navigator:i}=a.useContext(c),{hash:s,pathname:l,search:u}=E(e,{relative:n}),d=l;return"/"!==r&&(d="/"===l?r:(0,o.HS)([r,l])),i.createHref({pathname:d,search:u,hash:s})}function m(){return null!=a.useContext(d)}function v(){return m()||(0,o.Oi)(!1),a.useContext(d).location}function g(){return a.useContext(d).navigationType}function y(e){m()||(0,o.Oi)(!1);let{pathname:t}=v();return a.useMemo(()=>(0,o.B6)(e,(0,o.RO)(t)),[t,e])}function b(e){a.useContext(c).static||a.useLayoutEffect(e)}function w(){let{isDataRoute:e}=a.useContext(f);return e?function(){let{router:e}=I(L.UseNavigateStable),t=$(A.UseNavigateStable),n=a.useRef(!1);return b(()=>{n.current=!0}),a.useCallback(function(r,a){void 0===a&&(a={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,i({fromRouteId:t},a)))},[e,t])}():function(){m()||(0,o.Oi)(!1);let e=a.useContext(s),{basename:t,future:n,navigator:r}=a.useContext(c),{matches:i}=a.useContext(f),{pathname:l}=v(),u=JSON.stringify((0,o.yD)(i,n.v7_relativeSplatPath)),d=a.useRef(!1);return b(()=>{d.current=!0}),a.useCallback(function(n,a){if(void 0===a&&(a={}),!d.current)return;if("number"===typeof n)return void r.go(n);let i=(0,o.Gh)(n,JSON.parse(u),l,"path"===a.relative);null==e&&"/"!==t&&(i.pathname="/"===i.pathname?t:(0,o.HS)([t,i.pathname])),(a.replace?r.replace:r.push)(i,a.state,a)},[t,r,u,l,e])}()}const k=a.createContext(null);function _(){return a.useContext(k)}function x(e){let t=a.useContext(f).outlet;return t?a.createElement(k.Provider,{value:e},t):t}function S(){let{matches:e}=a.useContext(f),t=e[e.length-1];return t?t.params:{}}function E(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=a.useContext(c),{matches:i}=a.useContext(f),{pathname:s}=v(),l=JSON.stringify((0,o.yD)(i,r.v7_relativeSplatPath));return a.useMemo(()=>(0,o.Gh)(e,JSON.parse(l),s,"path"===n),[e,l,s,n])}function C(e,t){return j(e,t)}function j(e,t,n,r){m()||(0,o.Oi)(!1);let{navigator:s}=a.useContext(c),{matches:l}=a.useContext(f),u=l[l.length-1],h=u?u.params:{},p=(u&&u.pathname,u?u.pathnameBase:"/");u&&u.route;let g,y=v();if(t){var b;let e="string"===typeof t?(0,o.Rr)(t):t;"/"===p||(null==(b=e.pathname)?void 0:b.startsWith(p))||(0,o.Oi)(!1),g=e}else g=y;let w=g.pathname||"/",k=w;if("/"!==p){let e=p.replace(/^\//,"").split("/");k="/"+w.replace(/^\//,"").split("/").slice(e.length).join("/")}let _=(0,o.ue)(e,{pathname:k});let x=N(_&&_.map(e=>Object.assign({},e,{params:Object.assign({},h,e.params),pathname:(0,o.HS)([p,s.encodeLocation?s.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?p:(0,o.HS)([p,s.encodeLocation?s.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),l,n,r);return t&&x?a.createElement(d.Provider,{value:{location:i({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:o.rc.Pop}},x):x}function P(){let e=V(),t=(0,o.pX)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r};return a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application 
2Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},t),n?a.createElement("pre",{style:i},n):null,null)}const T=a.createElement(P,null);class R extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?a.createElement(f.Provider,{value:this.props.routeContext},a.createElement(h.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function O(e){let{routeContext:t,match:n,children:r}=e,o=a.useContext(s);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),a.createElement(f.Provider,{value:t},r)}function N(e,t,n,r){var i;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var s;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(s=r)&&s.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let l=e,u=null==(i=n)?void 0:i.errors;if(null!=u){let e=l.findIndex(e=>e.route.id&&void 0!==(null==u?void 0:u[e.route.id]));e>=0||(0,o.Oi)(!1),l=l.slice(0,Math.min(l.length,e+1))}let c=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let a=0;a<l.length;a++){let e=l[a];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(d=a),e.route.id){let{loaderData:t,errors:r}=n,a=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||a){c=!0,l=d>=0?l.slice(0,d+1):[l[0]];break}}}return l.reduceRight((e,r,o)=>{let i,s=!1,f=null,h=null;var p;n&&(i=u&&r.route.id?u[r.route.id]:void 0,f=r.route.errorElement||T,c&&(d<0&&0===o?(p="route-fallback",!1||Q[p]||(Q[p]=!0),s=!0,h=null):d===o&&(s=!0,h=r.route.hydrateFallbackElement||null)));let m=t.concat(l.slice(0,o+1)),v=()=>{let t;return t=i?f:s?h:r.route.Component?a.createElement(r.route.Component,null):r.route.element?r.route.element:e,a.createElement(O,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?a.createElement(R,{location:n.location,revalidation:n.revalidation,component:f,error:i,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):v()},null)}var L=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(L||{}),A=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(A||{});function I(e){let t=a.useContext(s);return t||(0,o.Oi)(!1),t}function D(e){let t=a.useContext(l);return t||(0,o.Oi)(!1),t}function $(e){let t=function(){let e=a.useContext(f);return e||(0,o.Oi)(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||(0,o.Oi)(!1),n.route.id}function U(){return $(A.UseRouteId)}function M(){return D(A.UseNavigation).navigation}function F(){let e=I(L.UseRevalidator),t=D(A.UseRevalidator);return a.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function z(){let{matches:e,loaderData:t}=D(A.UseMatches);return a.useMemo(()=>e.map(e=>(0,o.ro)(e,t)),[e,t])}function B(){let e=D(A.UseLoaderData),t=$(A.UseLoaderData);if(!e.errors||null==e.errors[t])return e.loaderData[t];console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")")}function H(e){return D(A.UseRouteLoaderData).loaderData[e]}function q(){let e=D(A.UseActionData),t=$(A.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function V(){var e;let t=a.useContext(h),n=D(A.UseRouteError),r=$(A.UseRouteError);return void 0!==t?t:null==(e=n.errors)?void 0:e[r]}function W(){let e=a.useContext(u);return null==e?void 0:e._data}function K(){let e=a.useContext(u);return null==e?void 0:e._error}let G=0;function J(e){let{router:t,basename:n}=I(L.UseBlocker),r=D(A.UseBlocker),[s,l]=a.useState(""),u=a.useCallback(t=>{if("function"!==typeof e)return!!e;if("/"===n)return e(t);let{currentLocation:r,nextLocation:a,historyAction:s}=t;return e({currentLocation:i({},r,{pathname:(0,o.pb)(r.pathname,n)||r.pathname}),nextLocation:i({},a,{pathname:(0,o.pb)(a.pathname,n)||a.pathname}),historyAction:s})},[n,e]);return a.useEffect(()=>{let e=String(++G);return l(e),()=>t.deleteBlocker(e)},[t]),a.useEffect(()=>{""!==s&&t.getBlocker(s,u)},[t,s,u]),s&&r.blockers.has(s)?r.blockers.get(s):o.G3}const Q={};
2const Y=(e,t,n)=>{};function X(e,t){void 0===(null==e?void 0:e.v7_startTransition)&&Y("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),void 0!==(null==e?void 0:e.v7_relativeSplatPath)||t&&void 0!==t.v7_relativeSplatPath||Y("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(void 0===t.v7_fetcherPersist&&Y("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),void 0===t.v7_normalizeFormMethod&&Y("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),void 0===t.v7_partialHydration&&Y("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),void 0===t.v7_skipActionErrorRevalidation&&Y("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}const Z=(r||(r=n.t(a,2))).startTransition;function ee(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:s}=e,l=a.useRef();null==l.current&&(l.current=(0,o.sC)({initialEntries:r,initialIndex:i,v5Compat:!0}));let u=l.current,[c,d]=a.useState({action:u.action,location:u.location}),{v7_startTransition:f}=s||{},h=a.useCallback(e=>{f&&Z?Z(()=>d(e)):d(e)},[d,f]);return a.useLayoutEffect(()=>u.listen(h),[u,h]),a.useEffect(()=>X(s),[s]),a.createElement(ae,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:u,future:s})}function te(e){let{to:t,replace:n,state:r,relative:i}=e;m()||(0,o.Oi)(!1);let{future:s,static:l}=a.useContext(c),{matches:u}=a.useContext(f),{pathname:d}=v(),h=w(),p=(0,o.Gh)(t,(0,o.yD)(u,s.v7_relativeSplatPath),d,"path"===i),g=JSON.stringify(p);return a.useEffect(()=>h(JSON.parse(g),{replace:n,state:r,relative:i}),[h,g,i,n,r]),null}function ne(e){return x(e.context)}function re(e){(0,o.Oi)(!1)}function ae(e){let{basename:t="/",children:n=null,location:r,navigationType:s=o.rc.Pop,navigator:l,static:u=!1,future:f}=e;m()&&(0,o.Oi)(!1);let h=t.replace(/^\/*/,"/"),p=a.useMemo(()=>({basename:h,navigator:l,static:u,future:i({v7_relativeSplatPath:!1},f)}),[h,f,l,u]);"string"===typeof r&&(r=(0,o.Rr)(r));let{pathname:v="/",search:g="",hash:y="",state:b=null,key:w="default"}=r,k=a.useMemo(()=>{let e=(0,o.pb)(v,h);return null==e?null:{location:{pathname:e,search:g,hash:y,state:b,key:w},navigationType:s}},[h,v,g,y,b,w,s]);return null==k?null:a.createElement(c.Provider,{value:p},a.createElement(d.Provider,{children:n,value:k}))}function oe(e){let{children:t,location:n}=e;return C(de(t),n)}function ie(e){let{children:t,errorElement:n,resolve:r}=e;return a.createElement(ue,{resolve:r,errorElement:n},a.createElement(ce,null,t))}var se=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(se||{});const le=new Promise(()=>{});class ue extends a.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:n}=this.props,r=null,i=se.pending;if(n instanceof Promise)if(this.state.error){i=se.error;let e=this.state.error;r=Promise.reject().catch(()=>{}),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_error",{get:()=>e})}else n._tracked?(r=n,i="_error"in r?se.error:"_data"in r?se.success:se.pending):(i=se.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),r=n.then(e=>Object.defineProperty(n,"_data",{get:()=>e}),e=>Object.defineProperty(n,"_error",{get:()=>e})));else i=se.success,r=Promise.resolve(),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_data",{get:()=>n});if(i===se.error&&r._error instanceof o.tH)throw le;if(i===se.error&&!t)throw r._error;if(i===se.error)return a.createElement(u.Provider,{value:r,children:t});if(i===se.success)return a.createElement(u.Provider,{value:r,children:e});throw r}}function ce(e){let{children:t}=e,n=W(),r="function"===typeof t?t(n):t;return a.createElement(a.Fragment,null,r)}function de(e,t){void 0===t&&(t=[]);let n=[];
2return a.Children.forEach(e,(e,r)=>{if(!a.isValidElement(e))return;let i=[...t,r];if(e.type===a.Fragment)return void n.push.apply(n,de(e.props.children,i));e.type!==re&&(0,o.Oi)(!1),e.props.index&&e.props.children&&(0,o.Oi)(!1);let s={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=de(e.props.children,i)),n.push(s)}),n}function fe(e){return N(e)}function he(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:a.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:a.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:a.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function pe(e,t){return(0,o.aE)({basename:null==t?void 0:t.basename,future:i({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,o.sC)({initialEntries:null==t?void 0:t.initialEntries,initialIndex:null==t?void 0:t.initialIndex}),hydrationData:null==t?void 0:t.hydrationData,routes:e,mapRouteProperties:he,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation}).initialize()}},218:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},234:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,a=e[r];if(!(0<o(a,t)))break e;e[r]=t,e[n]=a,n=r}}function r(e){return 0===e.length?null:e[0]}function a(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length,i=a>>>1;r<i;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(0>o(l,n))u<a&&0>o(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<a&&0>o(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],c=[],d=1,f=null,h=3,p=!1,m=!1,v=!1,g="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function w(e){for(var t=r(c);null!==t;){if(null===t.callback)a(c);else{if(!(t.startTime<=e))break;a(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function k(e){if(v=!1,w(e),!m)if(null!==r(u))m=!0,L(_);else{var t=r(c);null!==t&&A(k,t.startTime-e)}}function _(e,n){m=!1,v&&(v=!1,y(C),C=-1),p=!0;var o=h;try{for(w(n),f=r(u);null!==f&&(!(f.expirationTime>n)||e&&!T());){var i=f.callback;if("function"===typeof i){f.callback=null,h=f.priorityLevel;var s=i(f.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?f.callback=s:f===r(u)&&a(u),w(n)}else a(u);f=r(u)}if(null!==f)var l=!0;else{var d=r(c);null!==d&&A(k,d.startTime-n),l=!1}return l}finally{f=null,h=o,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,S=!1,E=null,C=-1,j=5,P=-1;function T(){return!(t.unstable_now()-P<j)}function R(){if(null!==E){var e=t.unstable_now();P=e;var n=!0;try{n=E(!0,e)}finally{n?x():(S=!1,E=null)}}else S=!1}if("function"===typeof b)x=function(){b(R)};else if("undefined"!==typeof MessageChannel){var O=new MessageChannel,N=O.port2;O.port1.onmessage=R,x=function(){N.postMessage(null)}}else x=function(){g(R,0)};function L(e){E=e,S||(S=!0,x())}function A(e,n){C=g(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,L(_))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},t.unstable_scheduleCallback=function(e,a,o){var i=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?i+o:i:o=i,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:a,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>i?(e.sortIndex=o,n(c,e),null===r(u)&&e===r(c)&&(v?(y(C),C=-1):v=!0,A(k,o-i))):(e.sortIndex=s,n(u,e),m||p||(m=!0,L(_))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},270:(e,t,n)=>{"use strict";var r=n(520),a={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,i,s,l,u,c=!1;t||(t={}),n=t.debug||!1;try{if(i=r(),s=document.createRange(),l=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=a[t.format]||a.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))}),document.body.appendChild(u),s.selectNodeContents(u),l.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(s):l.removeAllRanges()),u&&document.body.removeChild(u),i()}return c}},286:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esMo
2dule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=r(n(630)),o=r(n(611));t.default=class{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:"undefined"===typeof fetch?this.fetch=a.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Object.assign({},this.headers),this.headers[e]=t,this}then(e,t){void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),"GET"!==this.method&&"HEAD"!==this.method&&(this.headers["Content-Type"]="application/json");let n=(0,this.fetch)(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async e=>{var t,n,r;let a=null,i=null,s=null,l=e.status,u=e.statusText;if(e.ok){if("HEAD"!==this.method){const t=await e.text();""===t||(i="text/csv"===this.headers.Accept||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?t:JSON.parse(t))}const r=null===(t=this.headers.Prefer)||void 0===t?void 0:t.match(/count=(exact|planned|estimated)/),o=null===(n=e.headers.get("content-range"))||void 0===n?void 0:n.split("/");r&&o&&o.length>1&&(s=parseInt(o[1])),this.isMaybeSingle&&"GET"===this.method&&Array.isArray(i)&&(i.length>1?(a={code:"PGRST116",details:`Results contain ${i.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},i=null,s=null,l=406,u="Not Acceptable"):i=1===i.length?i[0]:null)}else{const t=await e.text();try{a=JSON.parse(t),Array.isArray(a)&&404===e.status&&(i=[],a=null,l=200,u="OK")}catch(c){404===e.status&&""===t?(l=204,u="No Content"):a={message:t}}if(a&&this.isMaybeSingle&&(null===(r=null===a||void 0===a?void 0:a.details)||void 0===r?void 0:r.includes("0 rows"))&&(a=null,l=200,u="OK"),a&&this.shouldThrowOnError)throw new o.default(a)}return{error:a,data:i,count:s,status:l,statusText:u}});return this.shouldThrowOnError||(n=n.catch(e=>{var t,n,r;return{error:{message:`${null!==(t=null===e||void 0===e?void 0:e.name)&&void 0!==t?t:"FetchError"}: ${null===e||void 0===e?void 0:e.message}`,details:`${null!==(n=null===e||void 0===e?void 0:e.stack)&&void 0!==n?n:""}`,hint:"",code:`${null!==(r=null===e||void 0===e?void 0:e.code)&&void 0!==r?r:""}`},data:null,count:null,status:0,statusText:""}})),n.then(e,t)}returns(){return this}overrideTypes(){return this}}},351:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(43)),a=s(n(173)),o=n(475),i=["children","onClick","replace","to","state","activeClassName","className","activeStyle","style","isActive"];function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function f(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var h=function(e){var t=e.children,n=e.onClick,a=e.replace,s=void 0!==a&&a,l=e.to,c=e.state,h=e.activeClassName,p=void 0===h?"active":h,m=e.className,v=e.activeStyle,g=e.style,y=e.isActive,b=f(e,i),w="object"===d(l)?l.pathname||"":l,k=(0,o.useNavigate)(),_=(0,o.useHref)("string"===typeof l?{pathname:l}:l),x=(0,o.useMatch)(w),S=(0,o.useLocation)(),E=r.default.Children.only(t),C=!!(y?"function"===typeof y?y(x,S):y:x);return r.default.cloneElement(E,u(u({},b),{},{className:[m,E.props.className,C?p:null].join(" ").trim(),style:C?u(u({},g),v):g,href:_,onClick:function(e){t.props.onClick&&t.props.onClick(e),n&&n(e),e.defaultPrevented||0!==e.button||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),k(l,{replace:s,state:c}))}}))};h.propTypes={children:a.default.element.isRequired,onClick:a.default.func,replace:a.default.bool,to:a.default.oneOfType([a.default.string,a.default.object]).isRequired,state:a.default.object,className:a.default.string,activeClassName:a.default.string,style:a.default.objectOf(a.default.oneOfType([a.default.string,a.default.number])),activeStyle:a.default.objectOf(a.default.oneOfType([a.default.string,a.default.number])),isActive:a.default.oneOfType([a.default.func,a.default.bool])};var p=h;t.default=p},374:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esMo
2dule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=r(n(286));class o extends a.default{select(e){let t=!1;const n=(null!==e&&void 0!==e?e:"*").split("").map(e=>/\s/.test(e)&&!t?"":('"'===e&&(t=!t),e)).join("");return this.url.searchParams.set("select",n),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e){let{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:a=r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=a?`${a}.order`:"order",i=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${i?`${i},`:""}${e}.${t?"asc":"desc"}${void 0===n?"":n?".nullsfirst":".nullslast"}`),this}limit(e){let{foreignTable:t,referencedTable:n=t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r="undefined"===typeof n?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t){let{foreignTable:n,referencedTable:r=n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a="undefined"===typeof r?"offset":`${r}.offset`,o="undefined"===typeof r?"limit":`${r}.limit`;return this.url.searchParams.set(a,`${e}`),this.url.searchParams.set(o,""+(t-e+1)),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return"GET"===this.method?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain(){let{analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:a=!1,format:o="text"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var i;const s=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,a?"wal":null].filter(Boolean).join("|"),l=null!==(i=this.headers.Accept)&&void 0!==i?i:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${o}; for="${l}"; options=${s};`,this}rollback(){var e;return(null!==(e=this.headers.Prefer)&&void 0!==e?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}t.default=o},387:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}var a;n.d(t,{AO:()=>h,B6:()=>A,G3:()=>ce,Gh:()=>z,HC:()=>Z,HS:()=>B,HW:()=>ue,Oi:()=>u,Pq:()=>W,RO:()=>I,Rr:()=>p,Sk:()=>X,TM:()=>l,V2:()=>Y,VV:()=>ee,aE:()=>pe,o1:()=>$,pX:()=>te,pb:()=>D,rc:()=>a,ro:()=>k,sC:()=>i,tH:()=>K,tW:()=>L,ue:()=>b,v6:()=>Q,yD:()=>F,zR:()=>s}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(a||(a={}));const o="popstate";function i(e){void 0===e&&(e={});let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:o=!1}=e;t=n.map((e,t)=>m(e,"string"===typeof e?null:e.state,0===t?"default":void 0));let i=u(null==r?t.length-1:r),s=a.Pop,l=null;function u(e){return Math.min(Math.max(e,0),t.length-1)}function d(){return t[i]}function m(e,n,r){void 0===n&&(n=null);let a=f(t?d().pathname:"/",e,n,r);return c("/"===a.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),a}function v(e){return"string"===typeof e?e:h(e)}return{get index(){return i},get action(){return s},get location(){return d()},createHref:v,createURL:e=>new URL(v(e),"http://localhost"),encodeLocation(e){let t="string"===typeof e?p(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){s=a.Push;let r=m(e,n);i+=1,t.splice(i,t.length,r),o&&l&&l({action:s,location:r,delta:1})},replace(e,n){s=a.Replace;let r=m(e,n);t[i]=r,o&&l&&l({action:s,location:r,delta:0})},go(e){s=a.Pop;let n=u(i+e),r=t[n];i=n,l&&l({action:s,location:r,delta:e})},listen:e=>(l=e,()=>{l=null})}}function s(e){return void 0===e&&(e={}),m(function(e,t){let{pathname:n,search:r,hash:a}=e.location;return f("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"===typeof t?t:h(t)},null,e)}function l(e){return void 0===e&&(e={}),m(function(e,t){let{pathname:n="/",search:r="",hash:a=""}=p(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),f("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:h(t))},function(e,t){c("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+J
2SON.stringify(t)+")")},e)}function u(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function c(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function d(e,t){return{usr:e.state,key:e.key,idx:t}}function f(e,t,n,a){return void 0===n&&(n=null),r({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?p(t):t,{state:n,key:t&&t.key||a||Math.random().toString(36).substr(2,8)})}function h(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function p(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function m(e,t,n,i){void 0===i&&(i={});let{window:s=document.defaultView,v5Compat:l=!1}=i,c=s.history,p=a.Pop,m=null,v=g();function g(){return(c.state||{idx:null}).idx}function y(){p=a.Pop;let e=g(),t=null==e?null:e-v;v=e,m&&m({action:p,location:w.location,delta:t})}function b(e){let t="null"!==s.location.origin?s.location.origin:s.location.href,n="string"===typeof e?e:h(e);return n=n.replace(/ $/,"%20"),u(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==v&&(v=0,c.replaceState(r({},c.state,{idx:v}),""));let w={get action(){return p},get location(){return e(s,c)},listen(e){if(m)throw new Error("A history only accepts one active listener");return s.addEventListener(o,y),m=e,()=>{s.removeEventListener(o,y),m=null}},createHref:e=>t(s,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){p=a.Push;let r=f(w.location,e,t);n&&n(r,e),v=g()+1;let o=d(r,v),i=w.createHref(r);try{c.pushState(o,"",i)}catch(u){if(u instanceof DOMException&&"DataCloneError"===u.name)throw u;s.location.assign(i)}l&&m&&m({action:p,location:w.location,delta:1})},replace:function(e,t){p=a.Replace;let r=f(w.location,e,t);n&&n(r,e),v=g();let o=d(r,v),i=w.createHref(r);c.replaceState(o,"",i),l&&m&&m({action:p,location:w.location,delta:0})},go:e=>c.go(e)};return w}var v;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(v||(v={}));const g=new Set(["lazy","caseSensitive","path","id","index","children"]);function y(e,t,n,a){return void 0===n&&(n=[]),void 0===a&&(a={}),e.map((e,o)=>{let i=[...n,String(o)],s="string"===typeof e.id?e.id:i.join("-");if(u(!0!==e.index||!e.children,"Cannot specify children on an index route"),u(!a[s],'Found a route id collision on i
vendor: 2,627 bytes, line 2
2d "'+s+"\".  Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let n=r({},e,t(e),{id:s});return a[s]=n,n}{let n=r({},e,t(e),{id:s,children:void 0});return a[s]=n,e.children&&(n.children=y(e.children,t,i,a)),n}})}function b(e,t,n){return void 0===n&&(n="/"),w(e,t,n,!1)}function w(e,t,n,r){let a=D(("string"===typeof t?p(t):t).pathname||"/",n);if(null==a)return null;let o=_(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(o);let i=null;for(let s=0;null==i&&s<o.length;++s){let e=I(a);i=N(o[s],e,r)}return i}function k(e,t){let{route:n,pathname:r,params:a}=e;return{id:n.id,pathname:r,params:a,data:t[n.id],handle:n.handle}}function _(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let a=(e,a,o)=>{let i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(u(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let s=B([r,i.relativePath]),l=n.concat(i);e.children&&e.children.length>0&&(u(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),_(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:O(s,e.index),routesMeta:l})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of x(e.path))a(e,t,r);else a(e,t)}),t}function x(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return a?[o,""]:[o];let i=x(r.join("/")),s=[];return s.push(...i.map(e=>""===e?o:[o,e].join("/"))),a&&s.push(...i),s.map(t=>e.startsWith("/")&&""===t?"/":t)}const S=/^:[\w-]+$/,E=3,C=2,j=1,P=10,T=-2,R=e=>"*"===e;function O(e,t){let n=e.split("/"),r=n.length;return n.some(R)&&(r+=T),t&&(r+=C),n.filter(e=>!R(e)).reduce((e,t)=>e+(S.test(t)?E:""===t?j:P),r)}function N(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,a={},o="/",i=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,u="/"===o?t:t.slice(o.length)||"/",c=A({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},u),d=e.route;if(!c&&l&&n&&!r[r.length-1].route.index&&(c=A({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;
2Object.assign(a,c.params),i.push({params:a,pathname:B([o,c.pathname]),pathnameBase:H(B([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=B([o,c.pathnameBase]))}return i}function L(e,t){void 0===t&&(t={});let n=e;n.endsWith("*")&&"*"!==n&&!n.endsWith("/*")&&(c(!1,'Route path "'+n+'" will be treated as if it were "'+n.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+n.replace(/\*$/,"/*")+'".'),n=n.replace(/\*$/,"/*"));const r=n.startsWith("/")?"/":"",a=e=>null==e?"":"string"===typeof e?e:String(e);return r+n.split(/\/+/).map((e,n,r)=>{if(n===r.length-1&&"*"===e){return a(t["*"])}const o=e.match(/^:([\w-]+)(\??)$/);if(o){const[,e,n]=o;let r=t[e];return u("?"===n||null!=r,'Missing ":'+e+'" param'),a(r)}return e.replace(/\?$/g,"")}).filter(e=>!!e).join("/")}function A(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);c("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"));e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");let o=new RegExp(a,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:r.reduce((e,t,n)=>{let{paramName:r,isOptional:a}=t;if("*"===r){let e=s[n]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=a&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function I(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return c(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function D(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function $(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"===typeof e?p(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:q(r),hash:V(a)}}function U(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function M(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function F(e,t){let n=M(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function z(e,t,n,a){let o;void 0===a&&(a=!1),"string"===typeof e?o=p(e):(o=r({},e),u(!o.pathname||!o.pathname.includes("?"),U("?","pathname","search",o)),u(!o.pathname||!o.pathname.includes("#"),U("#","pathname","hash",o)),u(!o.search||!o.search.includes("#"),U("#","search","hash",o)));let i,s=""===e||""===o.pathname,l=s?"/":o.pathname;if(null==l)i=n;else{let e=t.length-1;if(!a&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let c=$(o,i),d=l&&"/"!==l&&l.endsWith("/"),f=(s||"."===l)&&n.endsWith("/");return c.pathname.endsWith("/")||!d&&!f||(c.pathname+="/"),c}const B=e=>e.join("/").replace(/\/\/+/g,"/"),H=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),q=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",V=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",W=function(e,t){void 0===t&&(t={});let n="number"===typeof t?{status:t}:t,a=new Headers(n.headers);return a.has("Content-Type")||a.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),r({},n,{headers:a}))};
2class K extends Error{}class G{constructor(e,t){let n;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],u(e&&"object"===typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise((e,t)=>n=t),this.controller=new AbortController;let r=()=>n(new K("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",r),this.controller.signal.addEventListener("abort",r),this.data=Object.entries(e).reduce((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:this.trackPromise(n,r)})},{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let n=Promise.race([t,this.abortPromise]).then(t=>this.onSettle(n,e,void 0,t),t=>this.onSettle(n,e,t));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(e,t,n,r){if(this.controller.signal.aborted&&n instanceof K)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===n&&void 0===r){let n=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>n}),this.emit(!1,t),Promise.reject(n)}return void 0===r?(Object.defineProperty(e,"_error",{get:()=>n}),this.emit(!1,t),Promise.reject(n)):(Object.defineProperty(e,"_data",{get:()=>r}),this.emit(!1,t),r)}emit(e,t){this.subscribers.forEach(n=>n(e,t))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((e,t)=>this.pendingKeysSet.delete(t)),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let n=()=>this.cancel();e.addEventListener("abort",n),t=await new Promise(t=>{this.subscribe(r=>{e.removeEventListener("abort",n),(r||this.done)&&t(r)})})}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return u(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:J(r)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function J(e){if(!function(e){return e instanceof Promise&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}const Q=function(e,t){return void 0===t&&(t={}),new G(e,"number"===typeof t?{status:t}:t)},Y=function(e,t){void 0===t&&(t=302);let n=t;"number"===typeof n?n={status:n}:"undefined"===typeof n.status&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",e),new Response(null,r({},n,{headers:a}))},X=(e,t)=>{let n=Y(e,t);return n.headers.set("X-Remix-Reload-Document","true"),n},Z=(e,t)=>{let n=Y(e,t);return n.headers.set("X-Remix-Replace","true"),n};class ee{constructor(e,t,n,r){void 0===r&&(r=!1),this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function te(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const ne=["post","put","patch","delete"],re=new Set(ne),ae=["get",...ne],oe=new Set(ae),ie=new Set([301,302,303,307,308]),se=new Set([307,308]),le={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ue={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ce={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},de=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fe=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),he="remix-router-transitions";function pe(e){const t=e.window?e.window:"undefined"!==typeof window?window:void 0,n="undefined"!==typeof t&&"undefined"!==typeof t.document&&"undefined"!==typeof t.document.createElement,o=!n;let i;if(u(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;i=e=>({hasErrorBoundary:t(e)})}else i=fe;let s,l,d,h={},p=y(e.routes,i,void 0,h),m=e.basename||"/",g=e.dataStrategy||Se,_=e.patchRoutesOnNavigation,x=r({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prepe
vendor: 34,712 bytes, line 2
2ndBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),S=null,E=new Set,C=null,j=null,P=null,T=null!=e.hydrationData,R=b(p,e.history.location,m),O=!1,N=null;if(null==R&&!_){let t=Ue(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=$e(p);R=n,N={[r.id]:t}}if(R&&!e.hydrationData){ct(R,p,e.history.location.pathname).active&&(R=null)}if(R)if(R.some(e=>e.route.lazy))l=!1;else if(R.some(e=>e.route.loader))if(x.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=R.findIndex(e=>void 0!==n[e.route.id]);l=R.slice(0,e+1).every(e=>!be(e.route,t,n))}else l=R.every(e=>!be(e.route,t,n))}else l=null!=e.hydrationData;else l=!0;else if(l=!1,R=[],x.v7_partialHydration){let t=ct(null,p,e.history.location.pathname);t.active&&t.matches&&(O=!0,R=t.matches)}let L,A,I={historyAction:e.history.action,location:e.history.location,matches:R,initialized:l,navigation:le,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||N,fetchers:new Map,blockers:new Map},$=a.Pop,U=!1,M=!1,F=new Map,z=null,B=!1,H=!1,q=[],V=new Set,W=new Map,K=0,G=-1,J=new Map,Q=new Set,Y=new Map,X=new Map,Z=new Set,ee=new Map,ne=new Map;function re(e,t){void 0===t&&(t={}),I=r({},I,e);let n=[],a=[];x.v7_fetcherPersist&&I.fetchers.forEach((e,t)=>{"idle"===e.state&&(Z.has(t)?a.push(t):n.push(t))}),Z.forEach(e=>{I.fetchers.has(e)||W.has(e)||a.push(e)}),[...E].forEach(e=>e(I,{deletedFetchers:a,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),x.v7_fetcherPersist?(n.forEach(e=>I.fetchers.delete(e)),a.forEach(e=>Ne(e))):a.forEach(e=>Z.delete(e))}function ae(t,n,o){var i,l;let u,{flushSync:c}=void 0===o?{}:o,d=null!=I.actionData&&null!=I.navigation.formMethod&&Ge(I.navigation.formMethod)&&"loading"===I.navigation.state&&!0!==(null==(i=t.state)?void 0:i._isRedirect);u=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:d?I.actionData:null;let f=n.loaderData?Ae(I.loaderData,n.loaderData,n.matches||[],n.errors):I.loaderData,h=I.blockers;h.size>0&&(h=new Map(h),h.forEach((e,t)=>h.set(t,ce)));let m,v=!0===U||null!=I.navigation.formMethod&&Ge(I.navigation.formMethod)&&!0!==(null==(l=t.state)?void 0:l._isRedirect);if(s&&(p=s,s=void 0),B||$===a.Pop||($===a.Push?e.history.push(t,t.state):$===a.Replace&&e.history.replace(t,t.state)),$===a.Pop){let e=F.get(I.location.pathname);e&&e.has(t.pathname)?m={currentLocation:I.location,nextLocation:t}:F.has(t.pathname)&&(m={currentLocation:t,nextLocation:I.location})}else if(M){let e=F.get(I.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),F.set(I.location.pathname,e)),m={currentLocation:I.location,nextLocation:t}}re(r({},n,{actionData:u,loaderData:f,historyAction:$,location:t,initialized:!0,navigation:le,revalidation:"idle",restoreScrollPosition:ut(t,n.matches||I.matches),preventScrollReset:v,blockers:h}),{viewTransitionOpts:m,flushSync:!0===c}),$=a.Pop,U=!1,M=!1,B=!1,H=!1,q=[]}async function oe(t,n,o){L&&L.abort(),L=null,$=t,B=!0===(o&&o.startUninterruptedRevalidation),function(e,t){if(C&&P){let n=lt(e,t);C[n]=P()}}(I.location,I.matches),U=!0===(o&&o.preventScrollReset),M=!0===(o&&o.enableViewTransition);let i=s||p,l=o&&o.overrideNavigation,u=null!=o&&o.initialHydration&&I.matches&&I.matches.length>0&&!O?I.matches:b(i,n,m),c=!0===(o&&o.flushSync);if(u&&I.initialized&&!H&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(I.location,n)&&!(o&&o.submission&&Ge(o.submission.formMethod)))return void ae(n,{matches:u},{flushSync:c});let d=ct(u,i,n.pathname);if(d.active&&d.matches&&(u=d.matches),!u){let{error:e,notFoundMatches:t,route:r}=it(n.pathname);return void ae(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:c})}L=new AbortController;let f,h=Te(e.history,n,L.signal,o&&o.submission);if(o&&o.pendingError)f=[De(u).route.id,{type:v.error,error:o.pendingError}];else if(o&&o.submission&&Ge(o.submission.formMethod)){let t=await async function(e,t,n,r,o,i){void 0===i&&(i={});ke();let s,l=function(e,t){let n={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return n}(t,n);if(re({navigation:l},{flushSync:!0===i.flushSync}),o){let n=await dt(r,t.pathname,e.signal);if("aborted"===n.type)return{shortCircuited:!0};if("error"===n.type){let e=De(n.partialMatches).route.id;return{matches:n.partialMatches,pendingActionResult:[e,{type:v.error,error:n.error}]}}if(!n.matches){let{notFoundMatches:e,error:n,route:r}=it(t.pathname);return{matches:e,pendingActionResult:[r.id,{type:v.error,error:n}]}}r=n.matches}let u=Ze(r,t);if(u.route.action||u.route.lazy){if(s=(await ge("action",I,e,[u],r,null))[u.route.id],e.signal.aborted)return{shortCircuited:!0}}else s={type:v.error,error:Ue(405,{method:e.method,pathname:t.pathname,routeId:u.route.id})};if(qe(s)){let t;if(i&&null!=i.replace)t=i.replace;else{t=Pe(s.response.headers.get("Location"),new URL(e.url),m)===I.location.pathname+I.location.search}return await pe(e,s,!0,{submission:n,replace:t}),{shortCircuited:!0}}if(Be(s))throw Ue(400,{type:"defer-action"});if(He(s)){let e=De(r,u.route.id);return!0!==(i&&i.replace)&&($=a.Push),{matches:r,pendingActionResult:[e.route.id,s]}}return{matches:r,pendingActionResult:[u.route.id,s]}}(h,n,o.submission,u,d.active,{replace:o.replace,flushSync:c});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(He(r)&&te(r.error)&&404===r.error.status)return L=null,void ae(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}u=t.matches||u,f=t.pendingActionResult,l=tt(n,o.submission),c=!1,d.active=!1,h=Te(e.history,h.url,h.signal)}let{shortCircuited:g,matches:y,loaderData:w,errors:k}=await async function(t,n,a,o,i,l,u,c,d,f,h){let v=i||tt(n,l),g=l||u||et(v),y=!B&&(!x.v7_partialHydration||!d);if(o){if(y){let e=ie(h);re(r({navigation:v},void 0!==e?{actionData:e}:{}),{flushSync:f})}let e=await dt(a,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=De(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=it(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}a=e.matches}let b=s||p,[w,k]=ye(e.history,I,a,g,n,x.v7_partialHydration&&!0===d,x.v7_skipActionErrorRevalidation,H,q,V,Z,Y,Q,b,m,h);if(st(e=>!(a&&a.some(t=>t.route.id===e))||w&&w.some(t=>t.route.id===e)),G=++K,0===w.length&&0===k.length){let e=We();return ae(n,r({matches:a,loaderData:{},errors:h&&He(h[1])?{[h[0]]:h[1].error}:null},Ie(h),e?{fetchers:new Map(I.fetchers)}:{}),{flushSync:f}),{shortCircuited:!0}}if(y){let e={};if(!o){e.navigation=v;let t=ie(h);void 0!==t&&(e.actionData=t)}k.length>0&&(e.fetchers=function(e){return e.forEach(e=>{let t=I.fetchers.get(e.key),n=nt(void 0,t?t.data:void 0);I.fetchers.set(e.key,n)}),new Map(I.fetchers)}(k)),re(e,{flushSync:f})}k.forEach(e=>{Fe(e.key),e.controller&&W.set(e.key,e.controller)});let _=()=>k.forEach(e=>Fe(e.key));L&&L.signal.addEventListener("abort",_);let{loaderResults:S,fetcherResults:E}=await we(I,a,w,k,t);if(t.signal.aborted)return{shortCircuited:!0};L&&L.signal.removeEventListener("abort",_);k.forEach(e=>W.delete(e.key));let C=Me(S);if(C)return await pe(t,C.result,!0,{replace:c}),{shortCircuited:!0};if(C=Me(E),C)return Q.add(C.key),await pe(t,C.result,!0,{replace:c}),{shortCircuited:!0};let{loaderData:j,errors:P}=Le(I,a,S,h,k,E,ee);ee.forEach((e,t)=>{e.subscribe(n=>{(n||e.done)&&ee.delete(t)})}),x.v7_partialHydration&&d&&I.errors&&(P=r({},I.errors,P));let T=We(),R=Ke(G),O=T||R||k.length>0;return r({matches:a,loaderData:j,errors:P},O?{fetchers:new Map(I.fetchers)}:{})}(h,n,u,d.active,l,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,c,f);g||(L=null,ae(n,r({matches:y||u},Ie(f),{loaderData:w,errors:k})))}function ie(e){return e&&!He(e[1])?{[e[0]]:e[1].data}:I.actionData?0===Object.keys(I.actionData).length?null:I.actionData:void 0}async function pe(o,i,s,l){let{submission:c,fetcherSubmission:d,preventScrollReset:h,replace:p}=void 0===l?{}:l;i.response.headers.has("X-Remix-Revalidate")&&(H=!0);let v=i.response.headers.get("Location");u(v,"Expected a Location header on the redirect Response"),v=Pe(v,new URL(o.url),m);let g=f(I.location,v,{_isRedirect:!0});if(n){let n=!1;if(i.response.headers.has("X-Remix-Reload-Document"))n=!0;else if(de.test(v)){const r=e.history.createURL(v);n=r.origin!==t.location.origin||null==D(r.pathname,m)}if(n)return void(p?t.location.replace(v):t.location.assign(v))}L=null;let y=!0===p||i.response.headers.has("X-Remix-Replace")?a.Replace:a.Push,{formMethod:b,formAction:w,formEncType:k}=I.navigation;!c&&!d&&b&&w&&k&&(c=et(I.navigation));let _=c||d;if(se.has(i.response.status)&&_&&Ge(_.formMethod))await oe(y,g,{submission:r({},_,{formAction:v}),preventScrollReset:h||U,enableViewTransition:s?M:void 0});else{let e=tt(g,c);await oe(y,g,{overrideNavigation:e,fetcherSubmission:d,preventScrollReset:h||U,enableViewTransition:s?M:void 0})}}async function ge(e,t,n,r,a,o){let s,l={};try{s=await Ee(g,e,t,n,r,a,o,h,i)}catch(u){return r.forEach(e=>{l[e.route.id]={type:v.error,error:u}}),l}for(let[i,c]of Object.entries(s))if(ze(c)){let e=c.result;l[i]={type:v.redirect,response:je(e,n,i,a,m,x.v7_relativeSplatPath)}}else l[i]=await Ce(c);return l}async function we(t,n,r,a,o){let i=t.matches,s=ge("loader",t,o,r,n,null),l=Promise.all(a.map(async n=>{if(n.matches&&n.match&&n.controller){let r=(await ge("loader",t,Te(e.history,n.path,n.controller.signal),[n.match],n.matches,n.key))[n.match.route.id];return{[n.key]:r}}return Promise.resolve({[n.key]:{type:v.error,error:Ue(404,{pathname:n.path})}})})),u=await s,c=(await l).reduce((e,t)=>Object.assign(e,t),{});return await Promise.all([Je(n,u,o.signal,i,t.loaderData),Qe(n,c,a)]),{loaderResults:u,fetcherResults:c}}function ke(){H=!0,q.push(...st()),Y.forEach((e,t)=>{W.has(t)&&V.add(t),Fe(t)})}function xe(e,t,n){void 0===n&&(n={}),I.fetchers.set(e,t),re({fetchers:new Map(I.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function Re(e,t,n,r){void 0===r&&(r={});let a=De(I.matches,t);Ne(e),re({errors:{[a.route.id]:n},fetchers:new Map(I.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function Oe(e){return X.set(e,(X.get(e)||0)+1),Z.has(e)&&Z.delete(e),I.fetchers.get(e)||ue}function Ne(e){let t=I.fetchers.get(e);!W.has(e)||t&&"loading"===t.state&&J.has(e)||Fe(e),Y.delete(e),J.delete(e),Q.delete(e),x.v7_fetcherPersist&&Z.delete(e),V.delete(e),I.fetchers.delete(e)}function Fe(e){let t=W.get(e);t&&(t.abort(),W.delete(e))}function Ve(e){for(let t of e){let e=rt(Oe(t).data);I.fetchers.set(t,e)}}function We(){let e=[],t=!1;for(let n of Q){let r=I.fetchers.get(n);u(r,"Expected fetcher: "+n),"loading"===r.state&&(Q.delete(n),e.push(n),t=!0)}return Ve(e),t}function Ke(e){let t=[];for(let[n,r]of J)if(r<e){let e=I.fetchers.get(n);u(e,"Expected fetcher: "+n),"loading"===e.state&&(Fe(n),J.delete(n),t.push(n))}return Ve(t),t.length>0}function Xe(e){I.blockers.delete(e),ne.delete(e)}function at(e,t){let n=I.blockers.get(e)||ce;u("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state);let r=new Map(I.blockers);r.set(e,t),re({blockers:r})}function ot(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(0===ne.size)return;ne.size>1&&c(!1,"A router only supports one blocker at a time");let a=Array.from(ne.entries()),[o,i]=a[a.length-1],s=I.blockers.get(o);return s&&"proceeding"===s.state?void 0:i({currentLocation:t,nextLocation:n,historyAction:r})?o:void 0}function it(e){let t=Ue(404,{pathname:e}),n=s||p,{matches:r,route:a}=$e(n);return st(),{notFoundMatches:r,route:a,error:t}}function st(e){let t=[];return ee.forEach((n,r)=>{e&&!e(r)||(n.cancel(),t.push(r),ee.delete(r))}),t}function lt(e,t){if(j){return j(e,t.map(e=>k(e,I.loaderData)))||e.key}return e.key}function ut(e,t){if(C){let n=lt(e,t),r=C[n];if("number"===typeof r)return r}return null}function ct(e,t,n){if(_){if(!e){return{active:!0,matches:w(t,n,m,!0)||[]}}if(Object.keys(e[0].params).length>0){return{active:!0,matches:w(t,n,m,!0)}}}return{active:!1,matches:null}}async function dt(e,t,n,r){if(!_)return{type:"success",matches:e};let a=e;for(;;){let e=null==s,l=s||p,u=h;try{await _({signal:n,path:t,matches:a,fetcherKey:r,patch:(e,t)=>{n.aborted||_e(e,t,l,u,i)}})}catch(o){return{type:"error",error:o,partialMatches:a}}finally{e&&!n.aborted&&(p=[...p])}if(n.aborted)return{type:"aborted"};let c=b(l,t,m);if(c)return{type:"success",matches:c};let d=w(l,t,m,!0);if(!d||a.length===d.length&&a.every((e,t)=>e.route.id===d[t].route.id))return{type:"success",matches:null};a=d}}return d={get basename(){return m},get future(){return x},get state(){return I},get routes(){return p},get window(){return t},initialize:function(){if(S=e.history.listen(t=>{let{action:n,location:r,delta:a}=t;if(A)return A(),void(A=void 0);c(0===ne.size||null!=a,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=ot({currentLocation:I.location,nextLocation:r,historyAction:n});if(o&&null!=a){let t=new Promise(e=>{A=e});return e.history.go(-1*a),void at(o,{state:"blocked",location:r,proceed(){at(o,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(a))},reset(){let e=new Map(I.blockers);e.set(o,ce),re({blockers:e})}})}return oe(n,r)}),n){!function(e,t){try{let n=e.sessionStorage.getItem(he);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(n){}}(t,F);let e=()=>function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(he,JSON.stringify(r))}catch(n){c(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}(t,F);t.addEventListener("pagehide",e),z=()=>t.removeEventListener("pagehide",e)}return I.initialized||oe(a.Pop,I.location,{initialHydration:!0}),d},subscribe:function(e){return E.add(e),()=>E.delete(e)},enableScrollRestoration:function(e,t,n){if(C=e,P=t,j=n||null,!T&&I.navigation===le){T=!0;let e=ut(I.location,I.matches);null!=e&&re({restoreScrollPosition:e})}return()=>{C=null,P=null,j=null}},navigate:async function t(n,o){if("number"===typeof n)return void e.history.go(n);let i=me(I.location,I.matches,m,x.v7_prependBasename,n,x.v7_relativeSplatPath,null==o?void 0:o.fromRouteId,null==o?void 0:o.relative),{path:s,submission:l,error:u}=ve(x.v7_normalizeFormMethod,!1,i,o),c=I.location,d=f(I.location,s,o&&o.state);d=r({},d,e.history.encodeLocation(d));let h=o&&null!=o.replace?o.replace:void 0,p=a.Push;!0===h?p=a.Replace:!1===h||null!=l&&Ge(l.formMethod)&&l.formAction===I.location.pathname+I.location.search&&(p=a.Replace);let v=o&&"preventScrollReset"in o?!0===o.preventScrollReset:void 0,g=!0===(o&&o.flushSync),y=ot({currentLocation:c,nextLocation:d,historyAction:p});if(!y)return await oe(p,d,{submission:l,pendingError:u,preventScrollReset:v,replace:o&&o.replace,enableViewTransition:o&&o.viewTransition,flushSync:g});at(y,{state:"blocked",location:d,proceed(){at(y,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),t(n,o)},reset(){let e=new Map(I.blockers);e.set(y,ce),re({blockers:e})}})},fetch:function(t,n,r,a){if(o)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Fe(t);let i=!0===(a&&a.flushSync),l=s||p,c=me(I.location,I.matches,m,x.v7_prependBasename,r,x.v7_relativeSplatPath,n,null==a?void 0:a.relative),d=b(l,c,m),f=ct(d,l,c);if(f.active&&f.matches&&(d=f.matches),!d)return void Re(t,n,Ue(404,{pathname:c}),{flushSync:i});let{path:h,submission:v,error:g}=ve(x.v7_normalizeFormMethod,!0,c,a);if(g)return void Re(t,n,g,{flushSync:i});let y=Ze(d,h),w=!0===(a&&a.preventScrollReset);v&&Ge(v.formMethod)?async function(t,n,r,a,o,i,l,c,d){function f(e){if(!e.route.action&&!e.route.lazy){let e=Ue(405,{method:d.formMethod,pathname:r,routeId:n});return Re(t,n,e,{flushSync:l}),!0}return!1}if(ke(),Y.delete(t),!i&&f(a))return;let h=I.fetchers.get(t);xe(t,function(e,t){let n={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0};return n}(d,h),{flushSync:l});let v=new AbortController,g=Te(e.history,r,v.signal,d);if(i){let e=await dt(o,new URL(g.url).pathname,g.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void Re(t,n,e.error,{flushSync:l});if(!e.matches)return void Re(t,n,Ue(404,{pathname:r}),{flushSync:l});if(f(a=Ze(o=e.matches,r)))return}W.set(t,v);let y=K,w=await ge("action",I,g,[a],o,t),k=w[a.route.id];if(g.signal.aborted)return void(W.get(t)===v&&W.delete(t));if(x.v7_fetcherPersist&&Z.has(t)){if(qe(k)||He(k))return void xe(t,rt(void 0))}else{if(qe(k))return W.delete(t),G>y?void xe(t,rt(void 0)):(Q.add(t),xe(t,nt(d)),pe(g,k,!1,{fetcherSubmission:d,preventScrollReset:c}));if(He(k))return void Re(t,n,k.error)}if(Be(k))throw Ue(400,{type:"defer-action"});let _=I.navigation.location||I.location,S=Te(e.history,_,v.signal),E=s||p,C="idle"!==I.navigation.state?b(E,I.navigation.location,m):I.matches;u(C,"Didn't find any matches after fetcher action");let j=++K;J.set(t,j);let P=nt(d,k.data);I.fetchers.set(t,P);let[T,R]=ye(e.history,I,C,d,_,!1,x.v7_skipActionErrorRevalidation,H,q,V,Z,Y,Q,E,m,[a.route.id,k]);R.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=I.fetchers.get(t),r=nt(void 0,n?n.data:void 0);I.fetchers.set(t,r),Fe(t),e.controller&&W.set(t,e.controller)}),re({fetchers:new Map(I.fetchers)});let O=()=>R.forEach(e=>Fe(e.key));v.signal.addEventListener("abort",O);let{loaderResults:N,fetcherResults:A}=await we(I,C,T,R,S);if(v.signal.aborted)return;v.signal.removeEventListener("abort",O),J.delete(t),W.delete(t),R.forEach(e=>W.delete(e.key));let D=Me(N);if(D)return pe(S,D.result,!1,{preventScrollReset:c});if(D=Me(A),D)return Q.add(D.key),pe(S,D.result,!1,{preventScrollReset:c});let{loaderData:U,errors:M}=Le(I,C,N,void 0,R,A,ee);if(I.fetchers.has(t)){let e=rt(k.data);I.fetchers.set(t,e)}Ke(j),"loading"===I.navigation.state&&j>G?(u($,"Expected pending action"),L&&L.abort(),ae(I.navigation.location,{matches:C,loaderData:U,errors:M,fetchers:new Map(I.fetchers)})):(re({errors:M,loaderData:Ae(I.loaderData,U,C,M),fetchers:new Map(I.fetchers)}),H=!1)}(t,n,h,y,d,f.active,i,w,v):(Y.set(t,{routeId:n,path:h}),async function(t,n,r,a,o,i,s,l,c){let d=I.fetchers.get(t);xe(t,nt(c,d?d.data:void 0),{flushSync:s});let f=new AbortController,h=Te(e.history,r,f.signal);if(i){let e=await dt(o,new URL(h.url).pathname,h.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void Re(t,n,e.error,{flushSync:s});if(!e.matches)return void Re(t,n,Ue(404,{pathname:r}),{flushSync:s});a=Ze(o=e.matches,r)}W.set(t,f);let p=K,m=await ge("loader",I,h,[a],o,t),v=m[a.route.id];Be(v)&&(v=await Ye(v,h.signal,!0)||v);W.get(t)===f&&W.delete(t);if(h.signal.aborted)return;if(Z.has(t))return void xe(t,rt(void 0));if(qe(v))return G>p?void xe(t,rt(void 0)):(Q.add(t),void await pe(h,v,!1,{preventScrollReset:l}));if(He(v))return void Re(t,n,v.error);u(!Be(v),"Unhandled fetcher deferred data"),xe(t,rt(v.data))}(t,n,h,y,d,f.active,i,w,v))},revalidate:function(){ke(),re({revalidation:"loading"}),"submitting"!==I.navigation.state&&("idle"!==I.navigation.state?oe($||I.historyAction,I.navigation.location,{overrideNavigation:I.navigation,enableViewTransition:!0===M}):oe(I.historyAction,I.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Oe,deleteFetcher:function(e){let t=(X.get(e)||0)-1;t<=0?(X.delete(e),Z.add(e),x.v7_fetcherPersist||Ne(e)):X.set(e,t),re({fetchers:new Map(I.fetchers)})},dispose:function(){S&&S(),z&&z(),E.clear(),L&&L.abort(),I.fetchers.forEach((e,t)=>Ne(t)),I.blockers.forEach((e,t)=>Xe(t))},getBlocker:function(e,t){let n=I.blockers.get(e)||ce;return ne.get(e)!==t&&ne.set(e,t),n},deleteBlocker:Xe,patchRoutes:function(e,t){let n=null==s;_e(e,t,s||p,h,i),n&&(p=[...p],re({}))},_internalFetchControllers:W,_internalActiveDeferreds:ee,_internalSetRoutes:function(e){h={},s=y(e,i,void 0,h)}},d}Symbol("deferred");function me(e,t,n,r,a,o,i,s){let l,u;if(i){l=[];for(let e of t)if(l.push(e),e.route.id===i){u=e;break}}else l=t,u=t[t.length-1];let c=z(a||".",F(l,o),D(e.pathname,n)||e.pathname,"path"===s);if(null==a&&(c.search=e.search,c.hash=e.hash),(null==a||""===a||"."===a)&&u){let e=Xe(c.search);if(u.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();c.search=n?"?"+n:""}}return r&&"/"!==n&&(c.pathname="/"===c.pathname?n:B([n,c.pathname])),h(c)}function ve(e,t,n,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:n};if(r.formMethod&&!Ke(r.formMethod))return{path:n,error:Ue(405,{method:r.formMethod})};let a,o,i=()=>({path:n,error:Ue(400,{type:"invalid-body"})}),s=r.formMethod||"get",l=e?s.toUpperCase():s.toLowerCase(),c=Fe(n);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!Ge(l))return i();let e="string"===typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,t)=>{let[n,r]=t;return""+e+n+"="+r+"\n"},""):String(r.body);return{path:n,submission:{formMethod:l,formAction:c,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!Ge(l))return i();try{let e="string"===typeof r.body?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:c,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(m){return i()}}}if(u("function"===typeof FormData,"FormData is not available in this environment"),r.formData)a=Re(r.formData),o=r.formData;else if(r.body instanceof FormData)a=Re(r.body),o=r.body;else if(r.body instanceof URLSearchParams)a=r.body,o=Oe(a);else if(null==r.body)a=new URLSearchParams,o=new FormData;else try{a=new URLSearchParams(r.body),o=Oe(a)}catch(m){return i()}let d={formMethod:l,formAction:c,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(Ge(d.formMethod))return{path:n,submission:d};let f=p(n);return t&&f.search&&Xe(f.search)&&a.append("index",""),f.search="?"+a,{path:h(f),submission:d}}function ge(e,t,n){void 0===n&&(n=!1);let r=e.findIndex(e=>e.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function ye(e,t,n,a,o,i,s,l,u,c,d,f,h,p,m,v){let g=v?He(v[1])?v[1].error:v[1].data:void 0,y=e.createURL(t.location),w=e.createURL(o),k=n;i&&t.errors?k=ge(n,Object.keys(t.errors)[0],!0):v&&He(v[1])&&(k=ge(n,v[0]));let _=v?v[1].statusCode:void 0,x=s&&_&&_>=400,S=k.filter((e,n)=>{let{route:o}=e;if(o.lazy)return!0;if(null==o.loader)return!1;if(i)return be(o,t.loaderData,t.errors);if(function(e,t,n){let r=!t||n.route.id!==t.route.id,a=void 0===e[n.route.id];return r||a}(t.loaderData,t.matches[n],e)||u.some(t=>t===e.route.id))return!0;let s=t.matches[n],c=e;return ke(e,r({currentUrl:y,currentParams:s.params,nextUrl:w,nextParams:c.params},a,{actionResult:g,actionStatus:_,defaultShouldRevalidate:!x&&(l||y.pathname+y.search===w.pathname+w.search||y.search!==w.search||we(s,c))}))}),E=[];return f.forEach((e,o)=>{if(i||!n.some(t=>t.route.id===e.routeId)||d.has(o))return;let s=b(p,e.path,m);if(!s)return void E.push({key:o,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let u=t.fetchers.get(o),f=Ze(s,e.path),v=!1;h.has(o)?v=!1:c.has(o)?(c.delete(o),v=!0):v=u&&"idle"!==u.state&&void 0===u.data?l:ke(f,r({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:w,nextParams:n[n.length-1].params},a,{actionResult:g,actionStatus:_,defaultShouldRevalidate:!x&&l})),v&&E.push({key:o,routeId:e.routeId,path:e.path,matches:s,match:f,controller:new AbortController})}),[S,E]}function be(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=null!=t&&void 0!==t[e.id],a=null!=n&&void 0!==n[e.id];return!(!r&&a)&&("function"===typeof e.loader&&!0===e.loader.hydrate||!r&&!a)}function we(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ke(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"===typeof n)return n}return t.defaultShouldRevalidate}function _e(e,t,n,r,a){var o;let i;if(e){let t=r[e];u(t,"No route found to patch children into: routeId = "+e),t.children||(t.children=[]),i=t.children}else i=n;let s=y(t.filter(e=>!i.some(t=>xe(e,t))),a,[e||"_","patch",String((null==(o=i)?void 0:o.length)||"0")],r);i.push(...s)}function xe(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every((e,n)=>{var r;return null==(r=t.children)?void 0:r.some(t=>xe(e,t))}))}async function Se(e){let{matches:t}=e,n=t.filter(e=>e.shouldLoad);return(await Promise.all(n.map(e=>e.resolve()))).reduce((e,t,r)=>Object.assign(e,{[n[r].route.id]:t}),{})}async function Ee(e,t,n,a,o,i,s,l,d,f){let h=i.map(e=>e.route.lazy?async function(e,t,n){if(!e.lazy)return;let a=await e.lazy();if(!e.lazy)return;let o=n[e.id];u(o,"No route found in manifest");let i={};for(let r in a){let e=void 0!==o[r]&&"hasErrorBoundary"!==r;c(!e,'Route "'+o.id+'" has a static property "'+r+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+r+'" will be ignored.'),e||g.has(r)||(i[r]=a[r])}Object.assign(o,i),Object.assign(o,r({},t(o),{lazy:void 0}))}(e.route,d,l):void 0),p=i.map((e,n)=>{let i=h[n],s=o.some(t=>t.route.id===e.route.id);return r({},e,{shouldLoad:s,resolve:async n=>(n&&"GET"===a.method&&(e.route.lazy||e.route.loader)&&(s=!0),s?async function(e,t,n,r,a,o){let i,s,l=r=>{let i,l=new Promise((e,t)=>i=t);s=()=>i(),t.signal.addEventListener("abort",s);let u=a=>"function"!==typeof r?Promise.reject(new Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+n.route.id+"]")):r({request:t,params:n.params,context:o},...void 0!==a?[a]:[]),c=(async()=>{try{return{type:"data",result:await(a?a(e=>u(e)):u())}}catch(e){return{type:"error",result:e}}})();return Promise.race([c,l])};try{let a=n.route[e];if(r)if(a){let e,[t]=await Promise.all([l(a).catch(t=>{e=t}),r]);if(void 0!==e)throw e;i=t}else{if(await r,a=n.route[e],!a){if("action"===e){let e=new URL(t.url),r=e.pathname+e.search;throw Ue(405,{method:t.method,pathname:r,routeId:n.route.id})}return{type:v.data,result:void 0}}i=await l(a)}else{if(!a){let e=new URL(t.url);throw Ue(404,{pathname:e.pathname+e.search})}i=await l(a)}u(void 0!==i.result,"You defined "+("action"===e?"an action":"a loader")+' for route "'+n.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(c){return{type:v.error,result:c}}finally{s&&t.signal.removeEventListener("abort",s)}return i}(t,a,e,i,n,f):Promise.resolve({type:v.data,result:void 0}))})}),m=await e({matches:p,request:a,params:i[0].params,fetcherKey:s,context:f});try{await Promise.all(h)}catch(y){}return m}async function Ce(e){let{result:t,type:n}=e;if(We(t)){let e;try{let n=t.headers.get("Content-Type");e=n&&/\bapplication\/json\b/.test(n)?null==t.body?null:await t.json():await t.text()}catch(d){return{type:v.error,error:d}}return n===v.error?{type:v.error,error:new ee(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:v.data,data:e,statusCode:t.status,headers:t.headers}}var r,a,o,i,s,l,u,c;return n===v.error?Ve(t)?t.data instanceof Error?{type:v.error,error:t.data,statusCode:null==(o=t.init)?void 0:o.status,headers:null!=(i=t.init)&&i.headers?new Headers(t.init.headers):void 0}:{type:v.error,error:new ee((null==(r=t.init)?void 0:r.status)||500,void 0,t.data),statusCode:te(t)?t.status:void 0,headers:null!=(a=t.init)&&a.headers?new Headers(t.init.headers):void 0}:{type:v.error,error:t,statusCode:te(t)?t.status:void 0}:function(e){let t=e;return t&&"object"===typeof t&&"object"===typeof t.data&&"function"===typeof t.subscribe&&"function"===typeof t.cancel&&"function"===typeof t.resolveData}(t)?{type:v.deferred,deferredData:t,statusCode:null==(s=t.init)?void 0:s.status,headers:(null==(l=t.init)?void 0:l.headers)&&new Headers(t.init.headers)}:Ve(t)?{type:v.data,data:t.data,statusCode:null==(u=t.init)?void 0:u.status,headers:null!=(c=t.init)&&c.headers?new Headers(t.init.headers):void 0}:{type:v.data,data:t}}function je(e,t,n,r,a,o){let i=e.headers.get("Location");if(u(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!de.test(i)){let s=r.slice(0,r.findIndex(e=>e.route.id===n)+1);i=me(new URL(t.url),s,a,!0,i,o),e.headers.set("Location",i)}return e}function Pe(e,t,n){if(de.test(e)){let r=e,a=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=null!=D(a.pathname,n);if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}return e}function Te(e,t,n,r){let a=e.createURL(Fe(t)).toString(),o={signal:n};if(r&&Ge(r.formMethod)){let{formMethod:e,formEncType:t}=r;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(r.json)):"text/plain"===t?o.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?o.body=Re(r.formData):o.body=r.formData}return new Request(a,o)}function Re(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"===typeof r?r:r.name);return t}function Oe(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Ne(e,t,n,r,a){let o,i={},s=null,l=!1,c={},d=n&&He(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let f=n.route.id,h=t[f];if(u(!qe(h),"Cannot handle redirect results in processLoaderData"),He(h)){let t=h.error;if(void 0!==d&&(t=d,d=void 0),s=s||{},a)s[f]=t;else{let n=De(e,f);null==s[n.route.id]&&(s[n.route.id]=t)}i[f]=void 0,l||(l=!0,o=te(h.error)?h.error.status:500),h.headers&&(c[f]=h.headers)}else Be(h)?(r.set(f,h.deferredData),i[f]=h.deferredData.data,null==h.statusCode||200===h.statusCode||l||(o=h.statusCode),h.headers&&(c[f]=h.headers)):(i[f]=h.data,h.statusCode&&200!==h.statusCode&&!l&&(o=h.statusCode),h.headers&&(c[f]=h.headers))}),void 0!==d&&n&&(s={[n[0]]:d},i[n[0]]=void 0),{loaderData:i,errors:s,statusCode:o||200,loaderHeaders:c}}function Le(e,t,n,a,o,i,s){let{loaderData:l,errors:c}=Ne(t,n,a,s,!1);return o.forEach(t=>{let{key:n,match:a,controller:o}=t,s=i[n];if(u(s,"Did not find corresponding fetcher result"),!o||!o.signal.aborted)if(He(s)){let t=De(e.matches,null==a?void 0:a.route.id);c&&c[t.route.id]||(c=r({},c,{[t.route.id]:s.error})),e.fetchers.delete(n)}else if(qe(s))u(!1,"Unhandled fetcher revalidation redirect");else if(Be(s))u(!1,"Unhandled fetcher deferred data");else{let t=rt(s.data);e.fetchers.set(n,t)}}),{loaderData:l,errors:c}}function Ae(e,t,n,a){let o=r({},t);for(let r of n){let n=r.route.id;if(t.hasOwnProperty(n)?void 0!==t[n]&&(o[n]=t[n]):void 0!==e[n]&&r.route.loader&&(o[n]=e[n]),a&&a.hasOwnProperty(n))break}return o}function Ie(e){return e?He(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function De(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function $e(e){let t=1===e.length?e[0]:e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ue(e,t){let{pathname:n,routeId:r,method:a,type:o,message:i}=void 0===t?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(s="Bad Request",a&&n&&r?l="You made a "+a+' request to "'+n+'" but did not provide a `loader` for route "'+r+'", so there is no way to handle the request.':"defer-action"===o?l="defer() is not supported in actions":"invalid-body"===o&&(l="Unable to encode submission body")):403===e?(s="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):404===e?(s="Not Found",l='No route matches URL "'+n+'"'):405===e&&(s="Method Not Allowed",a&&n&&r?l="You made a "+a.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+r+'", so there is no way to handle the request.':a&&(l='Invalid request method "'+a.toUpperCase()+'"')),new ee(e||500,s,new Error(l),!0)}function Me(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[e,r]=t[n];if(qe(r))return{key:e,result:r}}}function Fe(e){return h(r({},"string"===typeof e?p(e):e,{hash:""}))}function ze(e){return We(e.result)&&ie.has(e.result.status)}function Be(e){return e.type===v.deferred}function He(e){return e.type===v.error}function qe(e){return(e&&e.type)===v.redirect}function Ve(e){return"object"===typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function We(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"object"===typeof e.headers&&"undefined"!==typeof e.body}function Ke(e){return oe.has(e.toLowerCase())}function Ge(e){return re.has(e.toLowerCase())}async function Je(e,t,n,r,a){let o=Object.entries(t);for(let i=0;i<o.length;i++){let[s,l]=o[i],u=e.find(e=>(null==e?void 0:e.route.id)===s);if(!u)continue;let c=r.find(e=>e.route.id===u.route.id),d=null!=c&&!we(c,u)&&void 0!==(a&&a[u.route.id]);Be(l)&&d&&await Ye(l,n,!1).then(e=>{e&&(t[s]=e)})}}async function Qe(e,t,n){for(let r=0;r<n.length;r++){let{key:a,routeId:o,controller:i}=n[r],s=t[a];e.find(e=>(null==e?void 0:e.route.id)===o)&&(Be(s)&&(u(i,"Expected an AbortController for revalidating fetcher deferred result"),await Ye(s,i.signal,!0).then(e=>{e&&(t[a]=e)})))}}async function Ye(e,t,n){if(void 0===n&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:v.data,data:e.deferredData.unwrappedData}
2}catch(r){return{type:v.error,error:r}}return{type:v.data,data:e.deferredData.data}}}function Xe(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function Ze(e,t){let n="string"===typeof t?p(t).search:t.search;if(e[e.length-1].route.index&&Xe(n||""))return e[e.length-1];let r=M(e);return r[r.length-1]}function et(e){let{formMethod:t,formAction:n,formEncType:r,text:a,formData:o,json:i}=e;if(t&&n&&r)return null!=a?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:a}:null!=o?{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}:void 0}function tt(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function nt(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function rt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}},391:(e,t,n)=>{"use strict";var r=n(950);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},400:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="0.0.0-automated"},440:e=>{"use strict";var t=function(){};e.exports=t},475:(e,t,n)=>{"use strict";var r,a;n.r(t),n.d(t,{AbortedDeferredError:()=>l.tH,Await:()=>s.jD,BrowserRouter:()=>D,Form:()=>H,HashRouter:()=>$,Link:()=>z,MemoryRouter:()=>s.fS,NavLink:()=>B,Navigate:()=>s.C5,NavigationType:()=>l.rc,Outlet:()=>s.sv,Route:()=>s.qh,Router:()=>s.Ix,RouterProvider:()=>L,Routes:()=>s.BV,ScrollRestoration:()=>q,UNSAFE_DataRouterContext:()=>s.sp,UNSAFE_DataRouterStateContext:()=>s.Rq,UNSAFE_ErrorResponseImpl:()=>l.VV,UNSAFE_FetchersContext:()=>j,UNSAFE_LocationContext:()=>s.yN,UNSAFE_NavigationContext:()=>s.jb,UNSAFE_RouteContext:()=>s.UX,UNSAFE_ViewTransitionContext:()=>C,UNSAFE_useRouteId:()=>s.$3,UNSAFE_useScrollRestoration:()=>oe,createBrowserRouter:()=>_,createHashRouter:()=>x,createMemoryRouter:()=>s.bg,createPath:()=>l.AO,createRoutesFromChildren:()=>s.AV,createRoutesFromElements:()=>s.Eu,createSearchParams:()=>p,defer:()=>l.v6,generatePath:()=>l.tW,isRouteErrorResponse:()=>l.pX,json:()=>l.Pq,matchPath:()=>l.B6,matchRoutes:()=>l.ue,parsePath:()=>l.Rr,redirect:()=>l.V2,redirectDocument:()=>l.Sk,renderMatches:()=>s.KT,replace:()=>l.HC,resolvePath:()=>l.o1,unstable_HistoryRouter:()=>U,unstable_usePrompt:()=>se,useActionData:()=>s.mP,useAsyncError:()=>s.oI,useAsyncValue:()=>s.J8,useBeforeUnload:()=>ie,useBlocker:()=>s.KP,useFetcher:()=>te,useFetchers:()=>ne,useFormAction:()=>ee,useHref:()=>s.$P,useInRouterContext:()=>s.Ri,useLinkClickHandler:()=>J,useLoaderData:()=>s.LG,useLocation:()=>s.zy,useMatch:()=>s.RQ,useMatches:()=>s.FE,useNavigate:()=>s.Zp,useNavigation:()=>s.cq,useNavigationType:()=>s.wQ,useOutlet:()=>s.P1,useOutletContext:()=>s.KC,useParams:()=>s.g,useResolvedPath:()=>s.x$,useRevalidator:()=>s.vL,useRouteError:()=>s.r5,useRouteLoaderData:()=>s.Ew,useRoutes:()=>s.Ye,useSearchParams:()=>Q,useSubmit:()=>Z,useViewTransitionState:()=>le});var o=n(43),i=n(950),s=n(216),l=n(387);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}function c(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}const d="get",f="application/x-www-form-urlencoded";function h(e){return null!=e&&"string"===typeof e.tagName}function p(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}let m=null;const v=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function g(e){return null==e||v.has(e)?e:null}function y(e,t){let n,r,a,o,i;if(h(s=e)&&"form"===s.tagName.toLowerCase()){let i=e.getAttribute("action");r=i?(0,l.pb)(i,t):null,n=e.getAttribute("method")||d,a=g(e.getAttribute("enctype"))||f,o=new FormData(e)}else if(function(e){return h(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return h(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||i.getAttribute("action");if(r=s?(0,l.pb)(s,t):null,n=e.getAttribute("formmethod")||i.getAttribute("method")||d,a=g(e.getAttribute("formenctype"))||g(i.getAttribute("enctype"))||f,o=new FormData(i,e),!function(){if(null===m)try{new FormData(document.createElement("form"),0),m=!1}catch(e){m=!0}return m}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?t+".":"";o.append(e+"x","0"),o.append(e+"y","0")}else t&&o.append(t,r)}}else{if(h(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=d,r=null,a=f,i=e}var s;return o&&"text/plain"===a&&(i=o,o=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:o,body:i}}const b=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],w=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],k=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(ue){}function _(e,t){return(0,l.aE)({basename:null==t?void 0:t.basename,future:u({}
2,null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,l.zR)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||S(),routes:e,mapRouteProperties:s.wE,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function x(e,t){return(0,l.aE)({basename:null==t?void 0:t.basename,future:u({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,l.TM)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||S(),routes:e,mapRouteProperties:s.wE,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function S(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=u({},t,{errors:E(t.errors)})),t}function E(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,a]of t)if(a&&"RouteErrorResponse"===a.__type)n[r]=new l.VV(a.status,a.statusText,a.data,!0===a.internal);else if(a&&"Error"===a.__type){if(a.__subType){let e=window[a.__subType];if("function"===typeof e)try{let t=new e(a.message);t.stack="",n[r]=t}catch(ue){}}if(null==n[r]){let e=new Error(a.message);e.stack="",n[r]=e}}else n[r]=a;return n}const C=o.createContext({isTransitioning:!1});const j=o.createContext(new Map);const P=(r||(r=n.t(o,2))).startTransition,T=(a||(a=n.t(i,2))).flushSync,R=(r||(r=n.t(o,2))).useId;function O(e){T?T(e):e()}class N{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}})}}function L(e){let{fallbackElement:t,router:n,future:r}=e,[a,i]=o.useState(n.state),[l,u]=o.useState(),[c,d]=o.useState({isTransitioning:!1}
2),[f,h]=o.useState(),[p,m]=o.useState(),[v,g]=o.useState(),y=o.useRef(new Map),{v7_startTransition:b}=r||{},w=o.useCallback(e=>{b?function(e){P?P(e):e()}(e):e()},[b]),k=o.useCallback((e,t)=>{let{deletedFetchers:r,flushSync:a,viewTransitionOpts:o}=t;e.fetchers.forEach((e,t)=>{void 0!==e.data&&y.current.set(t,e.data)}),r.forEach(e=>y.current.delete(e));let s=null==n.window||null==n.window.document||"function"!==typeof n.window.document.startViewTransition;if(o&&!s){if(a){O(()=>{p&&(f&&f.resolve(),p.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:o.currentLocation,nextLocation:o.nextLocation})});let t=n.window.document.startViewTransition(()=>{O(()=>i(e))});return t.finished.finally(()=>{O(()=>{h(void 0),m(void 0),u(void 0),d({isTransitioning:!1})})}),void O(()=>m(t))}p?(f&&f.resolve(),p.skipTransition(),g({state:e,currentLocation:o.currentLocation,nextLocation:o.nextLocation})):(u(e),d({isTransitioning:!0,flushSync:!1,currentLocation:o.currentLocation,nextLocation:o.nextLocation}))}else a?O(()=>i(e)):w(()=>i(e))},[n.window,p,f,y,w]);o.useLayoutEffect(()=>n.subscribe(k),[n,k]),o.useEffect(()=>{c.isTransitioning&&!c.flushSync&&h(new N)},[c]),o.useEffect(()=>{if(f&&l&&n.window){let e=l,t=f.promise,r=n.window.document.startViewTransition(async()=>{w(()=>i(e)),await t});r.finished.finally(()=>{h(void 0),m(void 0),u(void 0),d({isTransitioning:!1})}),m(r)}},[w,l,f,n.window]),o.useEffect(()=>{f&&l&&a.location.key===l.location.key&&f.resolve()},[f,p,a.location,l]),o.useEffect(()=>{!c.isTransitioning&&v&&(u(v.state),d({isTransitioning:!0,flushSync:!1,currentLocation:v.currentLocation,nextLocation:v.nextLocation}),g(void 0))},[c.isTransitioning,v]),o.useEffect(()=>{},[]);let _=o.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,r)=>n.navigate(e,{state:t,preventScrollReset:null==r?void 0:r.preventScrollReset}),replace:(e,t,r)=>n.navigate(e,{replace:!0,state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})}),[n]),x=n.basename||"/",S=o.useMemo(()=>({router:n,navigator:_,static:!1,basename:x}),[n,_,x]),E=o.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return o.useEffect(()=>(0,s.V8)(r,n.future),[r,n.future]),o.createElement(o.Fragment,null,o.createElement(s.sp.Provider,{value:S},o.createElement(s.Rq.Provider,{value:a},o.createElement(j.Provider,{value:y.current},o.createElement(C.Provider,{value:c},o.createElement(s.Ix,{basename:x,location:a.location,navigationType:a.historyAction,navigator:_,future:E},a.initialized||n.future.v7_partialHydration?o.createElement(A,{routes:n.routes,future:n.future,state:a}):t))))),null)}const A=o.memo(I);function I(e){let{routes:t,future:n,state:r}=e;return(0,s.ph)(t,void 0,r,n)}function D(e){let{basename:t,children:n,future:r,window:a}=e,i=o.useRef();null==i.current&&(i.current=(0,l.zR)({window:a,v5Compat:!0}));let u=i.current,[c,d]=o.useState({action:u.action,location:u.location}),{v7_startTransition:f}=r||{},h=o.useCallback(e=>{f&&P?P(()=>d(e)):d(e)},[d,f]);return o.useLayoutEffect(()=>u.listen(h),[u,h]),o.useEffect(()=>(0,s.V8)(r),[r]),o.createElement(s.Ix,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:u,future:r})}function $(e){let{basename:t,children:n,future:r,window:a}=e,i=o.useRef();null==i.current&&(i.current=(0,l.TM)({window:a,v5Compat:!0}));let u=i.current,[c,d]=o.useState({action:u.action,location:u.location}),{v7_startTransition:f}=r||{},h=o.useCallback(e=>{f&&P?P(()=>d(e)):d(e)},[d,f]);return o.useLayoutEffect(()=>u.listen(h),[u,h]),o.useEffect(()=>(0,s.V8)(r),[r]),o.createElement(s.Ix,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:u,future:r})}function U(e){let{basename:t,children:n,future:r,history:a}=e,[i,l]=o.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},c=o.useCallback(e=>{u&&P?P(()=>l(e)):l(e)},[l,u]);return o.useLayoutEffect(()=>a.listen(c),[a,c]),o.useEffect(()=>(0,s.V8)(r),[r]),o.createElement(s.Ix,{basename:t,children:n,location:i.location,navigationType:i.action,navigator:a,future:r})}const M="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,F=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,z=o.forwardRef(function(e,t){let n,{onClick:r,relative:a,reloadDocument:i,replace:d,state:f,target:h,to:p,preventScrollReset:m,viewTransition:v}=e,g=c(e,b),{basename:y}=o.useContext(s.jb),w=!1;if("string"===typeof p&&F.test(p)&&(n=p,M))try{let e=new URL(window.location.href),t=p.startsWith("//")?new URL(e.protocol+p):new URL(p),n=(0,l.pb)(t.pathname,y);t.origin===e.origin&&null!=n?p=n+t.search+t.hash:w=!0}catch(ue){}let k=(0,s.$P)(p,{relative:a}),_=J(p,{replace:d,state:f,target:h,preventScrollReset:m,relative:a,viewTransition:v});return o.createElement("a",u({},g,{href:n||k,onClick:w||i?r:function(e){r&&r(e),e.defaultPrevented||_(e)},ref:t,target:h}))});const B=o.forwardRef(function(e,t){let{"aria-current":n="page",caseSensitive:r=!1,
2className:a="",end:i=!1,style:d,to:f,viewTransition:h,children:p}=e,m=c(e,w),v=(0,s.x$)(f,{relative:m.relative}),g=(0,s.zy)(),y=o.useContext(s.Rq),{navigator:b,basename:k}=o.useContext(s.jb),_=null!=y&&le(v)&&!0===h,x=b.encodeLocation?b.encodeLocation(v).pathname:v.pathname,S=g.pathname,E=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;r||(S=S.toLowerCase(),E=E?E.toLowerCase():null,x=x.toLowerCase()),E&&k&&(E=(0,l.pb)(E,k)||E);const C="/"!==x&&x.endsWith("/")?x.length-1:x.length;let j,P=S===x||!i&&S.startsWith(x)&&"/"===S.charAt(C),T=null!=E&&(E===x||!i&&E.startsWith(x)&&"/"===E.charAt(x.length)),R={isActive:P,isPending:T,isTransitioning:_},O=P?n:void 0;j="function"===typeof a?a(R):[a,P?"active":null,T?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let N="function"===typeof d?d(R):d;return o.createElement(z,u({},m,{"aria-current":O,className:j,ref:t,style:N,to:f,viewTransition:h}),"function"===typeof p?p(R):p)});const H=o.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:a,replace:i,state:s,method:l=d,action:f,onSubmit:h,relative:p,preventScrollReset:m,viewTransition:v}=e,g=c(e,k),y=Z(),b=ee(f,{relative:p}),w="get"===l.toLowerCase()?"get":"post";return o.createElement("form",u({ref:t,method:w,action:b,onSubmit:a?h:e=>{if(h&&h(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,a=(null==t?void 0:t.getAttribute("formmethod"))||l;y(t||e.currentTarget,{fetcherKey:n,method:a,navigate:r,replace:i,state:s,relative:p,preventScrollReset:m,viewTransition:v})}},g))});function q(e){let{getKey:t,storageKey:n}=e;return oe({getKey:t,storageKey:n}),null}var V,W;function K(e){let t=o.useContext(s.sp);return t||(0,l.Oi)(!1),t}function G(e){let t=o.useContext(s.Rq);return t||(0,l.Oi)(!1),t}function J(e,t){let{target:n,replace:r,state:a,preventScrollReset:i,relative:u,viewTransition:c}=void 0===t?{}:t,d=(0,s.Zp)(),f=(0,s.zy)(),h=(0,s.x$)(e,{relative:u});return o.useCallback(t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==r?r:(0,l.AO)(f)===(0,l.AO)(h);d(e,{replace:n,state:a,preventScrollReset:i,relative:u,viewTransition:c})}},[f,d,h,r,a,n,e,i,u,c])}function Q(e){let t=o.useRef(p(e)),n=o.useRef(!1),r=(0,s.zy)(),a=o.useMemo(()=>function(e,t){let n=p(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}(r.search,n.current?null:t.current),[r.search]),i=(0,s.Zp)(),l=o.useCallback((e,t)=>{const r=p("function"===typeof e?e(a):e);n.current=!0,i("?"+r,t)},[i,a]);return[a,l]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(V||(V={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(W||(W={}));let Y=0,X=()=>"__"+String(++Y)+"__";function Z(){let{router:e}
2=K(V.UseSubmit),{basename:t}=o.useContext(s.jb),n=(0,s.$3)();return o.useCallback(function(r,a){void 0===a&&(a={}),function(){if("undefined"===typeof document)throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}();let{action:o,method:i,encType:s,formData:l,body:u}=y(r,t);if(!1===a.navigate){let t=a.fetcherKey||X();e.fetch(t,n,a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||i,formEncType:a.encType||s,flushSync:a.flushSync})}else e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||i,formEncType:a.encType||s,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,n])}function ee(e,t){let{relative:n}=void 0===t?{}:t,{basename:r}=o.useContext(s.jb),a=o.useContext(s.UX);a||(0,l.Oi)(!1);let[i]=a.matches.slice(-1),c=u({},(0,s.x$)(e||".",{relative:n})),d=(0,s.zy)();if(null==e){c.search=d.search;let e=new URLSearchParams(c.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();c.search=n?"?"+n:""}}return e&&"."!==e||!i.route.index||(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),"/"!==r&&(c.pathname="/"===c.pathname?r:(0,l.HS)([r,c.pathname])),(0,l.AO)(c)}function te(e){var t;let{key:n}=void 0===e?{}:e,{router:r}=K(V.UseFetcher),a=G(W.UseFetcher),i=o.useContext(j),c=o.useContext(s.UX),d=null==(t=c.matches[c.matches.length-1])?void 0:t.route.id;i||(0,l.Oi)(!1),c||(0,l.Oi)(!1),null==d&&(0,l.Oi)(!1);let f=R?R():"",[h,p]=o.useState(n||f);n&&n!==h?p(n):h||p(X()),o.useEffect(()=>(r.getFetcher(h),()=>{r.deleteFetcher(h)}),[r,h]);let m=o.useCallback((e,t)=>{d||(0,l.Oi)(!1),r.fetch(h,d,e,t)},[h,d,r]),v=Z(),g=o.useCallback((e,t)=>{v(e,u({},t,{navigate:!1,fetcherKey:h}))},[h,v]),y=o.useMemo(()=>o.forwardRef((e,t)=>o.createElement(H,u({},e,{navigate:!1,fetcherKey:h,ref:t}))),[h]),b=a.fetchers.get(h)||l.HW,w=i.get(h);return o.useMemo(()=>u({Form:y,submit:g,load:m},b,{data:w}),[y,g,m,b,w])}function ne(){let e=G(W.UseFetchers);return Array.from(e.fetchers.entries()).map(e=>{let[t,n]=e;return u({},n,{key:t})})}const re="react-router-scroll-positions";let ae={};function oe(e){let{getKey:t,storageKey:n}=void 0===e?{}:e,{router:r}=K(V.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:i}=G(W.UseScrollRestoration),{basename:c}=o.useContext(s.jb),d=(0,s.zy)(),f=(0,s.FE)(),h=(0,s.cq)();o.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),function(e,t){let{capture:n}=t||{};o.useEffect(()=>{let t=null!=n?{capture:n}:void 0;return window.addEventListener("pagehide",e,t),()=>{window.removeEventListener("pagehide",e,t)}},[e,n])}(o.useCallback(()=>{if("idle"===h.state){let e=(t?t(d,f):null)||d.key;ae[e]=window.scrollY}try{sessionStorage.setItem(n||re,JSON.stringify(ae))}catch(e){}window.history.scrollRestoration="auto"},[n,t,h.state,d,f])),"undefined"!==typeof document&&(o.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(n||re);e&&(ae=JSON.parse(e))}catch(ue){}},[n]),o.useLayoutEffect(()=>{let e=t&&"/"!==c?(e,n)=>t(u({},e,{pathname:(0,l.pb)(e.pathname,c)||e.pathname}),n):t,n=null==r?void 0:r.enableScrollRestoration(ae,()=>window.scrollY,e);return()=>n&&n()},[r,c,t]),o.useLayoutEffect(()=>{if(!1!==a)if("number"!==typeof a){if(d.hash){let e=document.getElementById(decodeURIComponent(d.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==i&&window.scrollTo(0,0)}else window.scrollTo(0,a)},[d,a,i]))}function ie(e,t){let{capture:n}=t||{};o.useEffect(()=>{let t=null!=n?{capture:n}:void 0;return window.addEventListener("beforeunload",e,t),()=>{window.removeEventListener("beforeunload",e,t)}},[e,n])}function se(e){let{when:t,message:n}=e,r=(0,s.KP)(t);o.useEffect(()=>{if("blocked"===r.state){window.confirm(n)?setTimeout(r.proceed,0):r.reset()}},[r,n]),o.useEffect(()=>{"blocked"!==r.state||t||r.reset()},[r,t])}function le(e,t){void 0===t&&(t={});let n=o.useContext(C);null==n&&(0,l.Oi)(!1);let{basename:r}=K(V.useViewTransitionState),a=(0,s.x$)(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=(0,l.pb)(n.currentLocation.pathname,r)||n.currentLocation.pathname,u=(0,l.pb)(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=(0,l.B6)(a.pathname,u)||null!=(0,l.B6)(a.pathname,i)}},476:(e,t,n)=>{"use strict";var r=n(99).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},497:(e,t,n)=>{"use strict";var r=n(218);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
2:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},520:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}},579:(e,t,n)=>{"use strict";e.exports=n(153)},611:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}}t.default=n},630:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Headers:()=>i,Request:()=>s,Response:()=>l,default:()=>o,fetch:()=>a});var r=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw new Error("unable to locate global object")}();const a=r.fetch,o=r.fetch.bind(r),i=r.Headers,s=r.Request,l=r.Response},730:(e,t,n)=>{"use strict";var r=n(43),a=n(853);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,s={};function l(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(s[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},p={};function m(e,t,n,r,a,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){v[e]=new m(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];v[t]=new m(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){v[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){v[e]=new m(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){v[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){v[e]=new m(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){v[e]=new m(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){v[e]=new m(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){v[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)});var g=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function b(e,t,n,r){var a=v.hasOwnProperty(t)?v[t]:null;(null!==a?0!==a.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;
vendor: 17,502 bytes, line 2
2if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!d.call(p,e)||!d.call(h,e)&&(f.test(e)?p[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(g,y);v[t]=new m(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(g,y);v[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(g,y);v[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)}),v.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)});var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),_=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),j=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),N=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var L=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var A=Symbol.iterator;function I(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=A&&e[A]||e["@@iterator"])?e:null}var D,$=Object.assign;function U(e){if(void 0===D)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);D=t&&t[1]||""}return"\n"+D+e}var M=!1;function F(e,t){if(!e||M)return"";M=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var a=u.stack.split("\n"),o=r.stack.split("\n"),i=a.length-1,s=o.length-1;1<=i&&0<=s&&a[i]!==o[s];)s--;for(;1<=i&&0<=s;i--,s--)if(a[i]!==o[s]){if(1!==i||1!==s)do{if(i--,0>--s||a[i]!==o[s]){var l="\n"+a[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=i&&0<=s);break}}}finally{M=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?U(e):""}function z(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return e=F(e.type,!1);case 11:return e=F(e.type.render,!1);case 1:return e=F(e.type,!0);default:return""}}function B(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case x:return"Fragment";case _:return"Portal";case E:return"Profiler";case S:return"StrictMode";case T:return"Suspense";case R:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case j:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case O:return null!==(t=e.displayName||null)?t:B(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return B(e(t))}catch(n){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B(t);case 8:return t===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function q(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function V(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function W(e){e._valueTracker||(e._valueTracker=function(e){var t=V(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function G(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return $({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Q(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=q(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Y(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function X(e,t){Y(e,t);var n=q(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,q(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&G(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+q(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return $({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ae(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:q(n)}}function oe(e,t){var n=q(t.value),r=q(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,ce,de=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return ce(e,t)})}:ce);function fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var he={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function ve(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(he).forEach(function(e){pe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]})});var ge=$({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ge[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function ke(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var _e=null,xe=null,Se=null;function Ee(e){if(e=ba(e)){if("function"!==typeof _e)throw Error(o(280));var t=e.stateNode;t&&(t=ka(t),_e(e.stateNode,e.type,t))}}function Ce(e){xe?Se?Se.push(e):Se=[e]:xe=e}function je(){if(xe){var e=xe,t=Se;if(Se=xe=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function Pe(e,t){return e(t)}function Te(){}var Re=!1;function Oe(e,t,n){if(Re)return e(t,n);Re=!0;try{return Pe(e,t,n)}finally{Re=!1,(null!==xe||null!==Se)&&(Te(),je())}}function Ne(e,t){var n=e.stateNode;if(null===n)return null;var r=ka(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(o(231,t,typeof n));return n}var Le=!1;if(c)try{var Ae={};Object.defineProperty(Ae,"passive",{get:function(){Le=!0}}),window.addEventListener("test",Ae,Ae),window.removeEventListener("test",Ae,Ae)}catch(ce){Le=!1}function Ie(e,t,n,r,a,o,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var De=!1,$e=null,Ue=!1,Me=null,Fe={onError:function(e){De=!0,$e=e}};function ze(e,t,n,r,a,o,i,s,l){De=!1,$e=null,Ie.apply(Fe,arguments)}function Be(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function He(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function qe(e){if(Be(e)!==e)throw Error(o(188))}function Ve(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Be(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var i=a.alternate;if(null===i){if(null!==(r=a.return)){n=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return qe(a),e;if(i===r)return qe(a),t;i=i.sibling}throw Error(o(188))}if(n.return!==r.return)n=a,r=i;else{for(var s=!1,l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?We(e):null}function We(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=We(e);if(null!==t)return t;e=e.sibling}return null}var Ke=a.unstable_scheduleCallback,Ge=a.unstable_cancelCallback,Je=a.unstable_shouldYield,Qe=a.unstable_requestPaint,Ye=a.unstable_now,Xe=a.unstable_getCurrentPriorityLevel,Ze=a.unstable_ImmediatePriority,et=a.unstable_UserBlockingPriority,tt=a.unstable_NormalPriority,nt=a.unstable_LowPriority,rt=a.unstable_IdlePriority,at=null,ot=null;var it=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ut=64,ct=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ft(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,a=e.suspendedLanes,o=e.pingedLanes,i=268435455&n;if(0!==i){var s=i&~a;0!==s?r=dt(s):0!==(o&=i)&&(r=dt(o))}else 0!==(i=n&~a)?r=dt(i):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&a)&&((a=r&-r)>=(o=t&-t)||16===a&&0!==(4194240&o)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)a=1<<(n=31-it(t)),r|=e[n],t&=~a;return r}function ht(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ut;return 0===(4194240&(ut<<=1))&&(ut=64),e}function vt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-it(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}var bt=0;function wt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var kt,_t,xt,St,Et,Ct=!1,jt=[],Pt=null,Tt=null,Rt=null,Ot=new Map,Nt=ne
vendor: 6,277 bytes, line 2
2w Map,Lt=[],At="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function It(e,t){switch(e){case"focusin":case"focusout":Pt=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Rt=null;break;case"pointerover":case"pointerout":Ot.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nt.delete(t.pointerId)}}function Dt(e,t,n,r,a,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[a]},null!==t&&(null!==(t=ba(t))&&_t(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function $t(e){var t=ya(e.target);if(null!==t){var n=Be(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=He(n)))return e.blockedOn=t,void Et(e.priority,function(){xt(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ut(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ba(n))&&_t(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function Mt(e,t,n){Ut(e)&&n.delete(t)}function Ft(){Ct=!1,null!==Pt&&Ut(Pt)&&(Pt=null),null!==Tt&&Ut(Tt)&&(Tt=null),null!==Rt&&Ut(Rt)&&(Rt=null),Ot.forEach(Mt),Nt.forEach(Mt)}function zt(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Ft)))}function Bt(e){function t(t){return zt(t,e)}if(0<jt.length){zt(jt[0],e);for(var n=1;n<jt.length;n++){var r=jt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Pt&&zt(Pt,e),null!==Tt&&zt(Tt,e),null!==Rt&&zt(Rt,e),Ot.forEach(t),Nt.forEach(t),n=0;n<Lt.length;n++)(r=Lt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Lt.length&&null===(n=Lt[0]).blockedOn;)$t(n),null===n.blockedOn&&Lt.shift()}var Ht=w.ReactCurrentBatchConfig,qt=!0;function Vt(e,t,n,r){var a=bt,o=Ht.transition;Ht.transition=null;try{bt=1,Kt(e,t,n,r)}finally{bt=a,Ht.transition=o}}function Wt(e,t,n,r){var a=bt,o=Ht.transition;Ht.transition=null;try{bt=4,Kt(e,t,n,r)}finally{bt=a,Ht.transition=o}}function Kt(e,t,n,r){if(qt){var a=Jt(e,t,n,r);if(null===a)qr(e,t,r,Gt,n),It(e,r);else if(function(e,t,n,r,a){switch(t){case"focusin":return Pt=Dt(Pt,e,t,n,r,a),!0;case"dragenter":return Tt=Dt(Tt,e,t,n,r,a),!0;case"mouseover":return Rt=Dt(Rt,e,t,n,r,a),!0;case"pointerover":var o=a.pointerId;return Ot.set(o,Dt(Ot.get(o)||null,e,t,n,r,a)),!0;case"gotpointercapture":return o=a.pointerId,Nt.set(o,Dt(Nt.get(o)||null,e,t,n,r,a)),!0}return!1}(a,e,t,n,r))r.stopPropagation();else if(It(e,r),4&t&&-1<At.indexOf(e)){for(;null!==a;){var o=ba(a);if(null!==o&&kt(o),null===(o=Jt(e,t,n,r))&&qr(e,t,r,Gt,n),o===a)break;a=o}null!==a&&r.stopPropagation()}else qr(e,t,r,null,n)}}var Gt=null;function Jt(e,t,n,r){if(Gt=null,null!==(e=ya(e=ke(r))))if(null===(t=Be(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=He(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gt=e,null}function Qt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Yt=null,Xt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Xt,r=n.length,a="value"in Yt?Yt.value:Yt.textContent,o=a.length;for(e=0;e<r&&n[e]===a[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===a[o-t];t++);return Zt=a.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function an(e){function t(t,n,r,a,o){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(a):a[i]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return $(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var on,sn,ln,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=an(un),dn=$({},un,{view:0,detail:0}),fn=an(dn),hn=$({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.from
vendor: 9,184 bytes, line 2
2Element===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(on=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=on=0,ln=e),on)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),pn=an(hn),mn=an($({},hn,{dataTransfer:0})),vn=an($({},dn,{relatedTarget:0})),gn=an($({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=$({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=an(yn),wn=an($({},un,{data:0})),kn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_n={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=xn[e])&&!!t[e]}function En(){return Sn}var Cn=$({},dn,{key:function(e){if(e.key){var t=kn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?_n[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),jn=an(Cn),Pn=an($({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=an($({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),Rn=an($({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),On=$({},hn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Nn=an(On),Ln=[9,13,27,32],An=c&&"CompositionEvent"in window,In=null;c&&"documentMode"in document&&(In=document.documentMode);var Dn=c&&"TextEvent"in window&&!In,$n=c&&(!An||In&&8<In&&11>=In),Un=String.fromCharCode(32),Mn=!1;function Fn(e,t){switch(e){case"keyup":return-1!==Ln.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Bn=!1;var Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function qn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function Vn(e,t,n,r){Ce(r),0<(t=Wr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,Kn=null;function Gn(e){Ur(e,0)}function Jn(e){if(K(wa(e)))return e}function Qn(e,t){if("change"===e)return t}var Yn=!1;if(c){var Xn;if(c){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"===typeof er.oninput}Xn=Zn}else Xn=!1;Yn=Xn&&(!document.documentMode||9<document.documentMode)}function tr(){Wn&&(Wn.detachEvent("onpropertychange",nr),Kn=Wn=null)}function nr(e){if("value"===e.propertyName&&Jn(Kn)){var t=[];Vn(t,Kn,e,ke(e)),Oe(Gn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Kn=n,(Wn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ar(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Jn(Kn)}function or(e,t){if("click"===e)return Jn(t)}function ir(e,t){if("input"===e||"change"===e)return Jn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function lr(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var a=n[r];if(!d.call(t,a)||!sr(e[a],t[a]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=ur(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fr(){for(var e=window,t=G();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=G((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=fr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&hr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var a=n.textContent.length,o=Math.min(r.start,a);r=void 0===r.end?o:Math.min(r.end,a),!e.extend&&o>r&&(a=r,r=o,o=a),a=cr(n,o);var i=cr(n,r);a&&i&&(1!==e.rangeCount||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(a.node,a.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=c&&"documentMode"in document&&11>=document.documentMode,vr=null,gr=null,yr=null,br=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==vr||vr!==G(r)||("selectionStart"in(r=vr)&&hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=Wr(gr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}function kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _r={animationend:kr("Animation","AnimationEnd"),animationiteration:kr("Animation","AnimationIteration"),animationstart:kr("Animation","AnimationStart"),transitionend:kr("Transition","TransitionEnd")},xr={},Sr={};function Er(e){if(xr[e])return xr[e];if(!_r[e])return e;var t,n=_r[e];for(t in n)if(n.hasOwnProperty(t)&&t in Sr)return xr[e]=n[t];return e}c&&(Sr=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);var Cr=Er("animationend"),jr=Er("animationiteration"),Pr=Er("animationstart"),Tr=Er("transitionend"),Rr=new Map,Or="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Nr(e,t){Rr.set(e,t),l(t,[e])}for(var Lr=0;Lr<Or.length;Lr++){var Ar=Or[Lr];Nr(Ar.toLowerCase(),"on"+(Ar[0].toUpperCase()+Ar.slice(1)))}Nr(Cr,"onAnimationEnd"),Nr(jr,"onAnimationIteration"),Nr(Pr,"onAnimationStart"),Nr("dblclick","onDoubleClick"),Nr("focusin","onFocus"),Nr("focusout","onBlur"),Nr(Tr,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focu
2sin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ir="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Dr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ir));function $r(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,a,i,s,l,u){if(ze.apply(this,arguments),De){if(!De)throw Error(o(198));var c=$e;De=!1,$e=null,Ue||(Ue=!0,Me=c)}}(r,t,void 0,e),e.currentTarget=null}function Ur(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&a.isPropagationStopped())break e;$r(a,s,u),o=l}else for(i=0;i<r.length;i++){if(l=(s=r[i]).instance,u=s.currentTarget,s=s.listener,l!==o&&a.isPropagationStopped())break e;$r(a,s,u),o=l}}}if(Ue)throw e=Me,Ue=!1,Me=null,e}function Mr(e,t){var n=t[ma];void 0===n&&(n=t[ma]=new Set);var r=e+"__bubble";n.has(r)||(Hr(t,e,2,!1),n.add(r))}function Fr(e,t,n){var r=0;t&&(r|=4),Hr(n,e,r,t)}var zr="_reactListening"+Math.random().toString(36).slice(2);function Br(e){if(!e[zr]){e[zr]=!0,i.forEach(function(t){"selectionchange"!==t&&(Dr.has(t)||Fr(t,!1,e),Fr(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zr]||(t[zr]=!0,Fr("selectionchange",!1,t))}}function Hr(e,t,n,r){switch(Qt(t)){case 1:var a=Vt;break;case 4:a=Wt;break;default:a=Kt}n=a.bind(null,t,n,e),a=void 0,!Le||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function qr(e,t,n,r,a){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var s=r.stateNode.containerInfo;if(s===a||8===s.nodeType&&s.parentNode===a)break;if(4===i)for(i=r.return;null!==i;){var l=i.tag;if((3===l||4===l)&&((l=i.stateNode.containerInfo)===a||8===l.nodeType&&l.parentNode===a))return;i=i.return}for(;null!==s;){if(null===(i=ya(s)))return;if(5===(l=i.tag)||6===l){r=o=i;continue e}s=s.parentNode}}r=r.return}Oe(function(){var r=o,a=ke(n),i=[];e:{var s=Rr.get(e);if(void 0!==s){var l=cn,u=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=jn;break;case"focusin":u="focus",l=vn;break;case"focusout":u="blur",l=vn;break;case"beforeblur":case"afterblur":l=vn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Tn;break;case Cr:case jr:case Pr:l=gn;break;case Tr:l=Rn;break;case"scroll":l=fn;break;case"wheel":l=Nn;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Pn}var c=0!==(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var h,p=r;null!==p;){var m=(h=p).stateNode;if(5===h.tag&&null!==m&&(h=m,null!==f&&(null!=(m=Ne(p,f))&&c.push(Vr(p,m,h)))),d)break;p=p.return}0<c.length&&(s=new l(s,u,null,n,a),i.push({event:s,listeners:c}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===we||!(u=n.relatedTarget||n.fromElement)||!ya(u)&&!u[pa])&&(l||s)&&(s=a.window===a?a:(s=a.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?ya(u):null)&&(u!==(d=Be(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=pn,m="onMouseLeave",f="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=Pn,m="onPointerLeave",f="onPointerEnter",p="pointer"),d=null==l?s:wa(l),h=null==u?s:wa(u),(s=new c(m,p+"leave",l,n,a)).target=d,s.relatedTarget=h,m=null,ya(a)===r&&((c=new c(f,p+"enter",u,n,a)).target=h,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(f=u,p=0,h=c=l;h;h=Kr(h))p++;for(h=0,m=f;m;m=Kr(m))h++;for(;0<p-h;)c=Kr(c),p--;for(;0<h-p;)f=Kr(f),h--;for(;p--;){if(c===f||null!==f&&c===f.alternate)break e;c=Kr(c),f=Kr(f)}c=null}else c=null;null!==l&&Gr(i,s,l,c,!1),null!==u&&null!==d&&Gr(i,d,u,c,!0)}if("select"===(l=(s=r?wa(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var v=Qn;else if(qn(s))if(Yn)v=ir;else{v=ar;var g=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(v=or);switch(v&&(v=v(e,r))?Vn(i,v,n,a):(g&&g(e,s,r),"focusout"===e&&(g=s._wrapperState)&&g.controlled&&"number"===s.type&&ee(s,"number",s.value)),g=r?wa(r):window,e){case"focusin":(qn(g)||"true"===g.contentEditable)&&(vr=g,gr=r,yr=null);break;case"focusout":yr=gr=vr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,wr(i,n,a);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":wr(i,n,a)}var y;if(An)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Bn?Fn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&($n&&"ko"!==n.locale&&(Bn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Bn&&(y=en()):(Xt="value"in(Yt=a)?Yt.value:Yt.textContent,Bn=!0)),0<(g=Wr(r,b)).length&&(b=new wn(b,e,null,n,a),i.push({event:b,listeners:g}
vendor: 81,296 bytes, line 2
2),y?b.data=y:null!==(y=zn(n))&&(b.data=y))),(y=Dn?function(e,t){switch(e){case"compositionend":return zn(t);case"keypress":return 32!==t.which?null:(Mn=!0,Un);case"textInput":return(e=t.data)===Un&&Mn?null:e;default:return null}}(e,n):function(e,t){if(Bn)return"compositionend"===e||!An&&Fn(e,t)?(e=en(),Zt=Xt=Yt=null,Bn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $n&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Wr(r,"onBeforeInput")).length&&(a=new wn("onBeforeInput","beforeinput",null,n,a),i.push({event:a,listeners:r}),a.data=y))}Ur(i,t)})}function Vr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wr(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,o=a.stateNode;5===a.tag&&null!==o&&(a=o,null!=(o=Ne(e,n))&&r.unshift(Vr(e,o,a)),null!=(o=Ne(e,t))&&r.push(Vr(e,o,a))),e=e.return}return r}function Kr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Gr(e,t,n,r,a){for(var o=t._reactName,i=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,a?null!=(l=Ne(n,o))&&i.unshift(Vr(n,l,s)):a||null!=(l=Ne(n,o))&&i.push(Vr(n,l,s))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var Jr=/\r\n?/g,Qr=/\u0000|\uFFFD/g;function Yr(e){return("string"===typeof e?e:""+e).replace(Jr,"\n").replace(Qr,"")}function Xr(e,t,n){if(t=Yr(t),Yr(e)!==t&&n)throw Error(o(425))}function Zr(){}var ea=null,ta=null;function na(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ra="function"===typeof setTimeout?setTimeout:void 0,aa="function"===typeof clearTimeout?clearTimeout:void 0,oa="function"===typeof Promise?Promise:void 0,ia="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof oa?function(e){return oa.resolve(null).then(e).catch(sa)}:ra;function sa(e){setTimeout(function(){throw e})}function la(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&8===a.nodeType)if("/$"===(n=a.data)){if(0===r)return e.removeChild(a),void Bt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=a}while(n);Bt(t)}function ua(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ca(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var da=Math.random().toString(36).slice(2),fa="__reactFiber$"+da,ha="__reactProps$"+da,pa="__reactContainer$"+da,ma="__reactEvents$"+da,va="__reactListeners$"+da,ga="__reactHandles$"+da;function ya(e){var t=e[fa];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pa]||n[fa]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ca(e);null!==e;){if(n=e[fa])return n;e=ca(e)}return t}n=(e=n).parentNode}return null}function ba(e){return!(e=e[fa]||e[pa])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wa(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function ka(e){return e[ha]||null}var _a=[],xa=-1;function Sa(e){return{current:e}}function Ea(e){0>xa||(e.current=_a[xa],_a[xa]=null,xa--)}function Ca(e,t){xa++,_a[xa]=e.current,e.current=t}var ja={},Pa=Sa(ja),Ta=Sa(!1),Ra=ja;function Oa(e,t){var n=e.type.contextTypes;if(!n)return ja;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,o={};for(a in n)o[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Na(e){return null!==(e=e.childContextTypes)&&void 0!==e}function La(){Ea(Ta),Ea(Pa)}function Aa(e,t,n){if(Pa.current!==ja)throw Error(o(168));Ca(Pa,t),Ca(Ta,n)}function Ia(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var a in r=r.getChildContext())if(!(a in t))throw Error(o(108,H(e)||"Unknown",a));return $({},n,r)}function Da(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ja,Ra=Pa.current,Ca(Pa,e),Ca(Ta,Ta.current),!0}function $a(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Ia(e,t,Ra),r.__reactInternalMemoizedMergedChildContext=e,Ea(Ta),Ea(Pa),Ca(Pa,e)):Ea(Ta),Ca(Ta,n)}var Ua=null,Ma=!1,Fa=!1;function za(e){null===Ua?Ua=[e]:Ua.push(e)}function Ba(){if(!Fa&&null!==Ua){Fa=!0;var e=0,t=bt;try{var n=Ua;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ua=null,Ma=!1}catch(a){throw null!==Ua&&(Ua=Ua.slice(e+1)),Ke(Ze,Ba),a}finally{bt=t,Fa=!1}}return null}var Ha=[],qa=0,Va=null,Wa=0,Ka=[],Ga=0,Ja=null,Qa=1,Ya="";function Xa(e,t){Ha[qa++]=Wa,Ha[qa++]=Va,Va=e,Wa=t}function Za(e,t,n){Ka[Ga++]=Qa,Ka[Ga++]=Ya,Ka[Ga++]=Ja,Ja=e;var r=Qa;e=Ya;var a=32-it(r)-1;r&=~(1<<a),n+=1;var o=32-it(t)+a;if(30<o){var i=a-a%5;o=(r&(1<<i)-1).toString(32),r>>=i,a-=i,Qa=1<<32-it(t)+a|n<<a|r,Ya=o+e}else Qa=1<<o|n<<a|r,Ya=e}function eo(e){null!==e.return&&(Xa(e,1),Za(e,1,0))}function to(e){for(;e===Va;)Va=Ha[--qa],Ha[qa]=null,Wa=Ha[--qa],Ha[qa]=null;for(;e===Ja;)Ja=Ka[--Ga],Ka[Ga]=null,Ya=Ka[--Ga],Ka[Ga]=null,Qa=Ka[--Ga],Ka[Ga]=null}var no=null,ro=null,ao=!1,oo=null;function io(e,t){var n=Ou(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function so(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,no=e,ro=ua(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,no=e,ro=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Ja?{id:Qa,overflow:Ya}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ou(18,null,null,0)).stateNode=t,n.return=e,e.child=n,no=e,ro=null,!0);default:return!1}}function lo(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function uo(e){if(ao){var t=ro;if(t){var n=t;if(!so(e,t)){if(lo(e))throw Error(o(418));t=ua(n.nextSibling);var r=no;t&&so(e,t)?io(r,n):(e.flags=-4097&e.flags|2,ao=!1,no=e)}}else{if(lo(e))throw Error(o(418));e.flags=-4097&e.flags|2,ao=!1,no=e}}}function co(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;no=e}function fo(e){if(e!==no)return!1;if(!ao)return co(e),ao=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!na(e.type,e.memoizedProps)),t&&(t=ro)){if(lo(e))throw ho(),Error(o(418));for(;t;)io(e,t),t=ua(t.nextSibling)}if(co(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ro=ua(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ro=null}}else ro=no?ua(e.stateNode.nextSibling):null;return!0}function ho(){for(var e=ro;e;)e=ua(e.nextSibling)}function po(){ro=no=null,ao=!1}function mo(e){null===oo?oo=[e]:oo.push(e)}var vo=w.ReactCurrentBatchConfig;function go(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var a=r,i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=a.refs;null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!==typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function yo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bo(e){return(0,e._init)(e._payload)}function wo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t){return(e=Lu(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=$u(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function u(e,t,n,r){var o=n.type;return o===x?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"===typeof o&&null!==o&&o.$$typeof===N&&bo(o)===t.type)?((r=a(t,n.props)).ref=go(e,t,n),r.return=e,r):((r=Au(n.type,n.key,n.props,null,e.mode,r)).ref=go(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Uu(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Iu(n,e.mode,r,o)).return=e,t):((t=a(t,n)).return=e,t)}function f(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=$u(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case k:return(n=Au(t.type,t.key,t.props,null,e.mode,n)).ref=go(e,null,t),n.return=e,n;case _:return(t=Uu(t,e.mode,n)).return=e,t;case N:return f(e,(0,t._init)(t._payload),n)}if(te(t)||I(t))return(t=Iu(t,e.mode,n,null)).return=e,t;yo(e,t)}return null}function h(e,t,n,r){var a=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==a?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case k:return n.key===a?u(e,t,n,r):null;case _:return n.key===a?c(e,t,n,r):null;case N:return h(e,t,(a=n._init)(n._payload),r)}if(te(n)||I(n))return null!==a?null:d(e,t,n,r,null);yo(e,n)}return null}function p(e,t,n,r,a){if("string"===typeof r&&""!==r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,a);if("object"===typeof r&&null!==r){switch(r.$$typeof){case k:return u(t,e=e.get(null===r.key?n:r.key)||null,r,a);case _:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a);case N:return p(e,t,n,(0,r._init)(r._payload),a)}if(te(r)||I(r))return d(t,e=e.get(n)||null,r,a,null);yo(t,r)}return null}function m(a,o,s,l){for(var u=null,c=null,d=o,m=o=0,v=null;null!==d&&m<s.length;m++){d.index>m?(v=d,d=null):v=d.sibling;var g=h(a,d,s[m],l);if(null===g){null===d&&(d=v);break}e&&d&&null===g.alternate&&t(a,d),o=i(g,o,m),null===c?u=g:c.sibling=g,c=g,d=v}if(m===s.length)return n(a,d),ao&&Xa(a,m),u;if(null===d){for(;m<s.length;m++)null!==(d=f(a,s[m],l))&&(o=i(d,o,m),null===c?u=d:c.sibling=d,c=d);return ao&&Xa(a,m),u}for(d=r(a,d);m<s.length;m++)null!==(v=p(d,a,m,s[m],l))&&(e&&null!==v.alternate&&d.delete(null===v.key?m:v.key),o=i(v,o,m),null===c?u=v:c.sibling=v,c=v);return e&&d.forEach(function(e){return t(a,e)}),ao&&Xa(a,m),u}function v(a,s,l,u){var c=I(l);if("function"!==typeof c)throw Error(o(150));if(null==(l=c.call(l)))throw Error(o(151));for(var d=c=null,m=s,v=s=0,g=null,y=l.next();null!==m&&!y.done;v++,y=l.next()){m.index>v?(g=m,m=null):g=m.sibling;var b=h(a,m,y.value,u);if(null===b){null===m&&(m=g);break}e&&m&&null===b.alternate&&t(a,m),s=i(b,s,v),null===d?c=b:d.sibling=b,d=b,m=g}if(y.done)return n(a,m),ao&&Xa(a,v),c;if(null===m){for(;!y.done;v++,y=l.next())null!==(y=f(a,y.value,u))&&(s=i(y,s,v),null===d?c=y:d.sibling=y,d=y);return ao&&Xa(a,v),c}for(m=r(a,m);!y.done;v++,y=l.next())null!==(y=p(m,a,v,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?v:y.key),s=i(y,s,v),null===d?c=y:d.sibling=y,d=y);return e&&m.forEach(function(e){return t(a,e)}),ao&&Xa(a,v),c}return function e(r,o,i,l){if("object"===typeof i&&null!==i&&i.type===x&&null===i.key&&(i=i.props.children),"object"===typeof i&&null!==i){switch(i.$$typeof){case k:e:{for(var u=i.key,c=o;null!==c;){if(c.key===u){if((u=i.type)===x){if(7===c.tag){n(r,c.sibling),(o=a(c,i.props.children)).return=r,r=o;break e}}else if(c.elementType===u||"object"===typeof u&&null!==u&&u.$$typeof===N&&bo(u)===c.type){n(r,c.sibling),(o=a(c,i.props)).ref=go(r,c,i),o.return=r,r=o;break e}n(r,c);break}t(r,c),c=c.sibling}i.type===x?((o=Iu(i.props.children,r.mode,l,i.key)).return=r,r=o):((l=Au(i.type,i.key,i.props,null,r.mode,l)).ref=go(r,o,i),l.return=r,r=l)}return s(r);case _:e:{for(c=i.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===i.containerInfo&&o.stateNode.implementation===i.implementation){n(r,o.sibling),(o=a(o,i.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Uu(i,r.mode,l)).return=r,r=o}return s(r);case N:return e(r,o,(c=i._init)(i._payload),l)}if(te(i))return m(r,o,i,l);if(I(i))return v(r,o,i,l);yo(r,i)}return"string"===typeof i&&""!==i||"number"===typeof i?(i=""+i,null!==o&&6===o.tag?(n(r,o.sibling),(o=a(o,i)).return=r,r=o):(n(r,o),(o=$u(i,r.mode,l)).return=r,r=o),s(r)):n(r,o)}}var ko=wo(!0),_o=wo(!1),xo=Sa(null),So=null,Eo=null,Co=null;function jo(){Co=Eo=So=null}function Po(e){var t=xo.current;Ea(xo),e._currentValue=t}function To(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ro(e,t){So=e,Co=Eo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(bs=!0),e.firstContext=null)}function Oo(e){var t=e._currentValue;if(Co!==e)if(e={context:e,memoizedValue:t,next:null},null===Eo){if(null===So)throw Error(o(308));Eo=e,So.dependencies={lanes:0,firstContext:e}}else Eo=Eo.next=e;return t}var No=null;function Lo(e){null===No?No=[e]:No.push(e)}function Ao(e,t,n,r){var a=t.interleaved;return null===a?(n.next=n,Lo(t)):(n.next=a.next,a.next=n),t.interleaved=n,Io(e,r)}function Io(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Do=!1;function $o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Uo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Pl)){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,Io(e,n)}return null===(a=r.interleaved)?(t.next=t,Lo(r)):(t.next=a.next,a.next=t),r.interleaved=t,Io(e,n)}function zo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Bo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ho(e,t,n,r){var a=e.updateQueue;Do=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,s=a.shared.pending;if(null!==s){a.shared.pending=null;var l=s,u=l.next;l.next=null,null===i?o=u:i.next=u,i=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==o){var d=a.baseState;for(i=0,c=u=l=null,s=o;;){var f=s.lane,h=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(f=t,h=n,m.tag){case 1:if("function"===typeof(p=m.payload)){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(f="function"===typeof(p=m.payload)?p.call(h,d,f):p)||void 0===f)break e;d=$({},d,f);break e;case 2:Do=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=a.effects)?a.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=h,l=d):c=c.next=h,i|=f;if(null===(s=s.next)){if(null===(s=a.shared.pending))break;s=(f=s).next,f.next=null,a.lastBaseUpdate=f,a.shared.pending=null}}if(null===c&&(l=d),a.baseState=l,a.firstBaseUpdate=u,a.lastBaseUpdate=c,null!==(t=a.shared.interleaved)){a=t;do{i|=a.lane,a=a.next}while(a!==t)}else null===o&&(a.shared.lanes=0);Dl|=i,e.lanes=i,e.memoizedState=d}}function qo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(null!==a){if(r.callback=null,r=n,"function"!==typeof a)throw Error(o(191,a));a.call(r)}}}var Vo={},Wo=Sa(Vo),Ko=Sa(Vo),Go=Sa(Vo);function Jo(e){if(e===Vo)throw Error(o(174));return e}function Qo(e,t){switch(Ca(Go,t),Ca(Ko,e),Ca(Wo,Vo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ea(Wo),Ca(Wo,t)}function Yo(){Ea(Wo),Ea(Ko),Ea(Go)}function Xo(e){Jo(Go.current);var t=Jo(Wo.current),n=le(t,e.type);t!==n&&(Ca(Ko,e),Ca(Wo,n))}function Zo(e){Ko.current===e&&(Ea(Wo),Ea(Ko))}var ei=Sa(0);function ti(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ni=[];function ri(){for(var e=0;e<ni.length;e++)ni[e]._workInProgressVersionPrimary=null;ni.length=0}var ai=w.ReactCurrentDispatcher,oi=w.ReactCurrentBatchConfig,ii=0,si=null,li=null,ui=null,ci=!1,di=!1,fi=0,hi=0;function pi(){throw Error(o(321))}function mi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function vi(e,t,n,r,a,i){if(ii=i,si=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ai.current=null===e||null===e.memoizedState?Zi:es,e=n(r,a),di){i=0;do{if(di=!1,fi=0,25<=i)throw Error(o(301));i+=1,ui=li=null,t.updateQueue=null,ai.current=ts,e=n(r,a)}while(di)}if(ai.current=Xi,t=null!==li&&null!==li.next,ii=0,ui=li=si=null,ci=!1,t)throw Error(o(300));return e}function gi(){var e=0!==fi;return fi=0,e}function yi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ui?si.memoizedState=ui=e:ui=ui.next=e,ui}function bi(){if(null===li){var e=si.alternate;e=null!==e?e.memoizedState:null}else e=li.next;var t=null===ui?si.memoizedState:ui.next;if(null!==t)ui=t,li=e;else{if(null===e)throw Error(o(310));e={memoizedState:(li=e).memoizedState,baseState:li.baseState,baseQueue:li.baseQueue,queue:li.queue,next:null},null===ui?si.memoizedState=ui=e:ui=ui.next=e}return ui}function wi(e,t){return"function"===typeof t?t(e):t}function ki(e){var t=bi(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=li,a=r.baseQueue,i=n.pending;if(null!==i){if(null!==a){var s=a.next;a.next=i.next,i.next=s}r.baseQueue=a=i,n.pending=null}if(null!==a){i=a.next,r=r.baseState;var l=s=null,u=null,c=i;do{var d=c.lane;if((ii&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=f,s=r):u=u.next=f,si.lanes|=d,Dl|=d}c=c.next}while(null!==c&&c!==i);null===u?s=r:u.next=l,sr(r,t.memoizedState)||(bs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){a=e;do{i=a.lane,si.lanes|=i,Dl|=i,a=a.next}while(a!==e)}else null===a&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function _i(e){var t=bi(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,i=t.memoizedState;if(null!==a){n.pending=null;var s=a=a.next;do{i=e(i,s.action),s=s.next}while(s!==a);sr(i,t.memoizedState)||(bs=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function xi(){}function Si(e,t){var n=si,r=bi(),a=t(),i=!sr(r.memoizedState,a);if(i&&(r.memoizedState=a,bs=!0),r=r.queue,Di(ji.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||null!==ui&&1&ui.memoizedState.tag){if(n.flags|=2048,Oi(9,Ci.bind(null,n,r,a,t),void 0,null),null===Tl)throw Error(o(349));0!==(30&ii)||Ei(n,t,a)}return a}function Ei(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=si.updateQueue)?(t={lastEffect:null,stores:null},si.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ci(e,t,n,r){t.value=n,t.getSnapshot=r,Pi(t)&&Ti(e)}function ji(e,t,n){return n(function(){Pi(t)&&Ti(e)})}function Pi(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(r){return!0}}function Ti(e){var t=Io(e,1);null!==t&&nu(t,e,1,-1)}function Ri(e){var t=yi();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wi,lastRenderedState:e},t.queue=e,e=e.dispatch=Gi.bind(null,si,e),[t.memoizedState,e]}function Oi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=si.updateQueue)?(t={lastEffect:null,stores:null},si.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ni(){return bi().memoizedState}function Li(e,t,n,r){var a=yi();si.flags|=e,a.memoizedState=Oi(1|t,n,void 0,void 0===r?null:r)}function Ai(e,t,n,r){var a=bi();r=void 0===r?null:r;var o=void 0;if(null!==li){var i=li.memoizedState;if(o=i.destroy,null!==r&&mi(r,i.deps))return void(a.memoizedState=Oi(t,n,o,r))}si.flags|=e,a.memoizedState=Oi(1|t,n,o,r)}function Ii(e,t){return Li(8390656,8,e,t)}function Di(e,t){return Ai(2048,8,e,t)}function $i(e,t){return Ai(4,2,e,t)}function Ui(e,t){return Ai(4,4,e,t)}function Mi(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Fi(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ai(4,4,Mi.bind(null,t,e),n)}function zi(){}function Bi(e,t){var n=bi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&mi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Hi(e,t){var n=bi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&mi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function qi(e,t,n){return 0===(21&ii)?(e.baseState&&(e.baseState=!1,bs=!0),e.memoizedState=n):(sr(n,t)||(n=mt(),si.lanes|=n,Dl|=n,e.baseState=!0),t)}function Vi(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=oi.transition;oi.transition={};try{e(!1),t()}finally{bt=n,oi.transition=r}}function Wi(){return bi().memoizedState}function Ki(e,t,n){var r=tu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ji(e))Qi(t,n);else if(null!==(n=Ao(e,t,n,r))){nu(n,e,r,eu()),Yi(n,t,r)}}function Gi(e,t,n){var r=tu(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ji(e))Qi(t,a);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var i=t.lastRenderedState,s=o(i,n);if(a.hasEagerState=!0,a.eagerState=s,sr(s,i)){var l=t.interleaved;return null===l?(a.next=a,Lo(t)):(a.next=l.next,l.next=a),void(t.interleaved=a)}}catch(u){}null!==(n=Ao(e,t,a,r))&&(nu(n,e,r,a=eu()),Yi(n,t,r))}}function Ji(e){var t=e.alternate;return e===si||null!==t&&t===si}function Qi(e,t){di=ci=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Yi(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var Xi={readContext:Oo,useCallback:pi,useContext:pi,useEffect:pi,useImperativeHandle:pi,useInsertionEffect:pi,useLayoutEffect:pi,useMemo:pi,useReducer:pi,useRef:pi,useState:pi,useDebugValue:pi,useDeferredValue:pi,useTransition:pi,useMutableSource:pi,useSyncExternalStore:pi,useId:pi,unstable_isNewReconciler:!1},Zi={readContext:Oo,useCallback:function(e,t){return yi().memoizedState=[e,void 0===t?null:t],e},useContext:Oo,useEffect:Ii,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Li(4194308,4,Mi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Li(4194308,4,e,t)},useInsertionEffect:function(e,t){return Li(4,2,e,t)},useMemo:function(e,t){var n=yi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yi();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ki.bind(null,si,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},yi().memoizedState=e},useState:Ri,useDebugValue:zi,useDeferredValue:function(e){return yi().memoizedState=e},useTransition:function(){var e=Ri(!1),t=e[0];return e=Vi.bind(null,e[1]),yi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=si,a=yi();if(ao){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Tl)throw Error(o(349));0!==(30&ii)||Ei(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,Ii(ji.bind(null,r,i,e),[e]),r.flags|=2048,Oi(9,Ci.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=yi(),t=Tl.identifierPrefix;if(ao){var n=Ya;t=":"+t+"R"+(n=(Qa&~(1<<32-it(Qa)-1)).toString(32)+n),0<(n=fi++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=hi++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Oo,useCallback:Bi,useContext:Oo,useEffect:Di,useImperativeHandle:Fi,useInsertionEffect:$i,useLayoutEffect:Ui,useMemo:Hi,useReducer:ki,useRef:Ni,useState:function(){return ki(wi)},useDebugValue:zi,useDeferredValue:function(e){return qi(bi(),li.memoizedState,e)},useTransition:function(){return[ki(wi)[0],bi().memoizedState]},useMutableSource:xi,useSyncExternalStore:Si,useId:Wi,unstable_isNewReconciler:!1},ts={readContext:Oo,useCallback:Bi,useContext:Oo,useEffect:Di,useImperativeHandle:Fi,useInsertionEffect:$i,useLayoutEffect:Ui,useMemo:Hi,useReducer:_i,useRef:Ni,useState:function(){return _i(wi)},useDebugValue:zi,useDeferredValue:function(e){var t=bi();return null===li?t.memoizedState=e:qi(t,li.memoizedState,e)},useTransition:function(){return[_i(wi)[0],bi().memoizedState]},useMutableSource:xi,useSyncExternalStore:Si,useId:Wi,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=$({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:$({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var as={isMounted:function(e){return!!(e=e._reactInternals)&&Be(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=eu(),a=tu(e),o=Mo(r,a);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Fo(e,o,a))&&(nu(t,e,a,r),zo(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=eu(),a=tu(e),o=Mo(r,a);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Fo(e,o,a))&&(nu(t,e,a,r),zo(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=eu(),r=tu(e),a=Mo(n,r);a.tag=2,void 0!==t&&null!==t&&(a.callback=t),null!==(t=Fo(e,a,r))&&(nu(t,e,r,n),zo(t,e,r))}};function os(e,t,n,r,a,o,i){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,i):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(a,o))}function is(e,t,n){var r=!1,a=ja,o=t.contextType;return"object"===typeof o&&null!==o?o=Oo(o):(a=Na(t)?Ra:Pa.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?Oa(e,a):ja),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=as,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=o),t}function ss(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&as.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs={},$o(e);var o=t.contextType;"object"===typeof o&&null!==o?a.context=Oo(o):(o=Na(t)?Ra:Pa.current,a.context=Oa(e,o)),a.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(rs(e,t,o,n),a.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof a.getSnapshotBeforeUpdate||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||(t=a.state,"function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&as.enqueueReplaceState(a,a.state,null),Ho(e,n,a,r),a.state=e.memoizedState),"function"===typeof a.componentDidMount&&(e.flags|=4194308)}function us(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var a=n}catch(o){a="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:a,digest:null}}function cs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var fs="function"===typeof WeakMap?WeakMap:Map;function hs(e,t,n){(n=Mo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ql||(ql=!0,Vl=r),ds(0,t)},n}function ps(e,t,n){(n=Mo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var a=t.value;n.payload=function(){return r(a)},n.callback=function(){ds(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!==typeof r&&(null===Wl?Wl=new Set([this]):Wl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ms(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fs;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(a.add(n),e=Eu.bind(null,e,t,n),t.then(e,e))}function vs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function gs(e,t,n,r,a){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Mo(-1,1)).tag=2,Fo(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=a,e)}var ys=w.ReactCurrentOwner,bs=!1;function ws(e,t,n,r){t.child=null===e?_o(t,null,n,r):ko(t,e.child,n,r)}function ks(e,t,n,r,a){n=n.render;var o=t.ref;return Ro(t,a),r=vi(e,t,n,r,o,a),n=gi(),null===e||bs?(ao&&n&&eo(t),t.flags|=1,ws(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,qs(e,t,a))}function _s(e,t,n,r,a){if(null===e){var o=n.type;return"function"!==typeof o||Nu(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Au(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,xs(e,t,o,r,a))}if(o=e.child,0===(e.lanes&a)){var i=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(i,r)&&e.ref===t.ref)return qs(e,t,a)}return t.flags|=1,(e=Lu(o,r)).ref=t.ref,e.return=t,t.child=e}function xs(e,t,n,r,a){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(bs=!1,t.pendingProps=r=o,0===(e.lanes&a))return t.lanes=e.lanes,qs(e,t,a);0!==(131072&e.flags)&&(bs=!0)}}return Cs(e,t,n,r,a)}function Ss(e,t,n){var r=t.pendingProps,a=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ca(Ll,Nl),Nl|=n;else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ca(Ll,Nl),Nl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Ca(Ll,Nl),Nl|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ca(Ll,Nl),Nl|=r;return ws(e,t,a,n),t.child}function Es(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Cs(e,t,n,r,a){var o=Na(n)?Ra:Pa.current;return o=Oa(t,o),Ro(t,a),n=vi(e,t,n,r,o,a),r=gi(),null===e||bs?(ao&&r&&eo(t),t.flags|=1,ws(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,qs(e,t,a))}function js(e,t,n,r,a){if(Na(n)){var o=!0;Da(t)}else o=!1;if(Ro(t,a),null===t.stateNode)Hs(e,t),is(t,n,r),ls(t,n,r,a),r=!0;else if(null===e){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=n.contextType;"object"===typeof u&&null!==u?u=Oo(u):u=Oa(t,u=Na(n)?Ra:Pa.current);var c=n.getDerivedStateFromProps,d="function"===typeof c||"function"===typeof i.getSnapshotBeforeUpdate;d||"function"!==typeof i.UNSAFE_componentWillReceiveProps&&"function"!==typeof i.componentWillReceiveProps||(s!==r||l!==u)&&ss(t,i,r,u),Do=!1;var f=t.memoizedState;i.state=f,Ho(t,r,i,a),l=t.memoizedState,s!==r||f!==l||Ta.current||Do?("function"===typeof c&&(rs(t,n,c,r),l=t.memoizedState),(s=Do||os(t,n,s,r,f,l,u))?(d||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||("function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"===typeof i.componentDidMount&&(t.flags|=4194308)):("function"===typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=u,r=s):("function"===typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Uo(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ns(t.type,s),i.props=u,d=t.pendingProps,f=i.context,"object"===typeof(l=n.contextType)&&null!==l?l=Oo(l):l=Oa(t,l=Na(n)?Ra:Pa.current);var h=n.getDerivedStateFromProps;(c="function"===typeof h||"function"===typeof i.getSnapshotBeforeUpdate)||"function"!==typeof i.UNSAFE_componentWillReceiveProps&&"function"!==typeof i.componentWillReceiveProps||(s!==d||f!==l)&&ss(t,i,r,l),Do=!1,f=t.memoizedState,i.state=f,Ho(t,r,i,a);var p=t.memoizedState;s!==d||f!==p||Ta.current||Do?("function"===typeof h&&(rs(t,n,h,r),p=t.memoizedState),(u=Do||os(t,n,u,r,f,p,l)||!1)?(c||"function"!==typeof i.UNSAFE_componentWillUpdate&&"function"!==typeof i.componentWillUpdate||("function"===typeof i.componentWillUpdate&&i.componentWillUpdate(r,p,l),"function"===typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,p,l)),"function"===typeof i.componentDidUpdate&&(t.flags|=4),"function"===typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof i.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),i.props=r,i.state=p,i.context=l,r=u):("function"!==typeof i.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ps(e,t,n,r,o,a)}function Ps(e,t,n,r,a,o){Es(e,t);var i=0!==(128&t.flags);if(!r&&!i)return a&&$a(t,n,!1),qs(e,t,o);r=t.stateNode,ys.current=t;var s=i&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=ko(t,e.child,null,o),t.child=ko(t,null,s,o)):ws(e,t,s,o),t.memoizedState=r.state,a&&$a(t,n,!0),t.child}function Ts(e){var t=e.stateNode;t.pendingContext?Aa(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Aa(0,t.context,!1),Qo(e,t.containerInfo)}function Rs(e,t,n,r,a){return po(),mo(a),t.flags|=256,ws(e,t,n,r),t.child}var Os,Ns,Ls,As,Is={dehydrated:null,treeContext:null,retryLane:0};function Ds(e){return{baseLanes:e,cachePool:null,transitions:null}}function $s(e,t,n){var r,a=t.pendingProps,i=ei.current,s=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&i)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(i|=1),Ca(ei,1&i),null===e)return uo(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=a.children,e=a.fallback,s?(a=t.mode,s=t.child,l={mode:"hidden",children:l},0===(1&a)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Du(l,a,0,null),e=Iu(e,a,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ds(n),t.memoizedState=Is,e):Us(t,l));if(null!==(i=e.memoizedState)&&null!==(r=i.dehydrated))return function(e,t,n,r,a,i,s){if(n)return 256&t.flags?(t.flags&=-257,Ms(e,t,s,r=cs(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(i=r.fallback,a=t.mode,r=Du({mode:"visible",children:r.children},a,0,null),(i=Iu(i,a,s,null)).flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,0!==(1&t.mode)&&ko(t,e.child,null,s),t.child.memoizedState=Ds(s),t.memoizedState=Is,i);if(0===(1&t.mode))return Ms(e,t,s,null);if("$!"===a.data){if(r=a.nextSibling&&a.nextSibling.dataset)var l=r.dgst;return r=l,Ms(e,t,s,r=cs(i=Error(o(419)),r,void 0))}if(l=0!==(s&e.childLanes),bs||l){if(null!==(r=Tl)){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}0!==(a=0!==(a&(r.suspendedLanes|s))?0:a)&&a!==i.retryLane&&(i.retryLane=a,Io(e,a),nu(r,e,a,-1))}return mu(),Ms(e,t,s,r=cs(Error(o(421))))}return"$?"===a.data?(t.flags|=128,t.child=e.child,t=ju.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,ro=ua(a.nextSibling),no=t,ao=!0,oo=null,null!==e&&(Ka[Ga++]=Qa,Ka[Ga++]=Ya,Ka[Ga++]=Ja,Qa=e.id,Ya=e.overflow,Ja=t),t=Us(t,r.children),t.flags|=4096,t)}(e,t,l,a,r,i,n);if(s){s=a.fallback,l=t.mode,r=(i=e.child).sibling;var u={mode:"hidden",children:a.children};return 0===(1&l)&&t.child!==i?((a=t.child).childLanes=0,a.pendingProps=u,t.deletions=null):(a=Lu(i,u)).subtreeFlags=14680064&i.subtreeFlags,null!==r?s=Lu(r,s):(s=Iu(s,l,n,null)).flags|=2,s.return=t,a.return=t,a.sibling=s,t.child=a,a=s,s=t.child,l=null===(l=e.child.memoizedState)?Ds(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Is,a}return e=(s=e.child).sibling,a=Lu(s,{mode:"visible",children:a.children}),0===(1&t.mode)&&(a.lanes=n),a.return=t,a.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=a,t.memoizedState=null,a}function Us(e,t){return(t=Du({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ms(e,t,n,r){return null!==r&&mo(r),ko(t,e.child,null,n),(e=Us(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),To(e.return,t,n)}function zs(e,t,n,r,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=a)}function Bs(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;if(ws(e,t,r.children,n),0!==(2&(r=ei.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Fs(e,n,t);else if(19===e.tag)Fs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ca(ei,r),0===(1&t.mode))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===ti(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),zs(t,!1,a,n,o);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===ti(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}zs(t,!0,n,null,o);break;case"together":zs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function qs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Dl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Lu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Lu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Vs(e,t){if(!ao)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ws(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=14680064&a.subtreeFlags,r|=14680064&a.flags,a.return=e,a=a.sibling;else for(a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ks(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ws(t),null;case 1:case 17:return Na(t.type)&&La(),Ws(t),null;case 3:return r=t.stateNode,Yo(),Ea(Ta),Ea(Pa),ri(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(fo(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==oo&&(iu(oo),oo=null))),Ns(e,t),Ws(t),null;case 5:Zo(t);var a=Jo(Go.current);if(n=t.type,null!==e&&null!=t.stateNode)Ls(e,t,n,r,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Ws(t),null}if(e=Jo(Wo.current),fo(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[fa]=t,r[ha]=i,e=0!==(1&t.mode),n){case"dialog":Mr("cancel",r),Mr("close",r);break;case"iframe":case"object":case"embed":Mr("load",r);break;case"video":case"audio":for(a=0;a<Ir.length;a++)Mr(Ir[a],r);break;case"source":Mr("error",r);break;case"img":case"image":case"link":Mr("error",r),Mr("load",r);break;case"details":Mr("toggle",r);break;case"input":Q(r,i),Mr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Mr("invalid",r);break;case"textarea":ae(r,i),Mr("invalid",r)}for(var l in ye(n,i),a=null,i)if(i.hasOwnProperty(l)){var u=i[l];"children"===l?"string"===typeof u?r.textContent!==u&&(!0!==i.suppressHydrationWarning&&Xr(r.textContent,u,e),a=["children",u]):"number"===typeof u&&r.textContent!==""+u&&(!0!==i.suppressHydrationWarning&&Xr(r.textContent,u,e),a=["children",""+u]):s.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&Mr("scroll",r)}switch(n){case"input":W(r),Z(r,i,!0);break;case"textarea":W(r),ie(r);break;case"select":case"option":break;default:"function"===typeof i.onClick&&(r.onclick=Zr)}r=a,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===a.nodeType?a:a.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[fa]=t,e[ha]=r,Os(e,t,!1,!1),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":Mr("cancel",e),Mr("close",e),a=r;break;case"iframe":case"object":case"embed":Mr("load",e),a=r;break;case"video":case"audio":for(a=0;a<Ir.length;a++)Mr(Ir[a],e);a=r;break;case"source":Mr("error",e),a=r;break;case"img":case"image":case"link":Mr("error",e),Mr("load",e),a=r;break;case"details":Mr("toggle",e),a=r;break;case"input":Q(e,r),a=J(e,r),Mr("invalid",e);break;case"option":default:a=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=$({},r,{value:void 0}),Mr("invalid",e);break;case"textarea":ae(e,r),a=re(e,r),Mr("invalid",e)}for(i in ye(n,a),u=a)if(u.hasOwnProperty(i)){var c=u[i];"style"===i?ve(e,c):"dangerouslySetInnerHTML"===i?null!=(c=c?c.__html:void 0)&&de(e,c):"children"===i?"string"===typeof c?("textarea"!==n||""!==c)&&fe(e,c):"number"===typeof c&&fe(e,""+c):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(s.hasOwnProperty(i)?null!=c&&"onScroll"===i&&Mr("scroll",e):null!=c&&b(e,i,c,l))}switch(n){case"input":W(e),Z(e,r,!1);break;case"textarea":W(e),ie(e);break;case"option":null!=r.value&&e.setAttribute("value",""+q(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?ne(e,!!r.multiple,i,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof a.onClick&&(e.onclick=Zr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ws(t),null;case 6:if(e&&null!=t.stateNode)As(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(o(166));if(n=Jo(Go.current),Jo(Wo.current),fo(t)){if(r=t.stateNode,n=t.memoizedProps,r[fa]=t,(i=r.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Xr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Xr(r.nodeValue,n,0!==(1&e.mode))}i&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[fa]=t,t.stateNode=r}return Ws(t),null;case 13:if(Ea(ei),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ao&&null!==ro&&0!==(1&t.mode)&&0===(128&t.flags))ho(),po(),t.flags|=98560,i=!1;else if(i=fo(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(o(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(o(317));i[fa]=t}else po(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ws(t),i=!1}else null!==oo&&(iu(oo),oo=null),i=!0;if(!i)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&ei.current)?0===Al&&(Al=3):mu())),null!==t.updateQueue&&(t.flags|=4),Ws(t),null);case 4:return Yo(),Ns(e,t),null===e&&Br(t.stateNode.containerInfo),Ws(t),null;case 10:return Po(t.type._context),Ws(t),null;case 19:if(Ea(ei),null===(i=t.memoizedState))return Ws(t),null;if(r=0!==(128&t.flags),null===(l=i.rendering))if(r)Vs(i,!1);else{if(0!==Al||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ti(e))){for(t.flags|=128,Vs(i,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=14680066,null===(l=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,e=l.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ca(ei,1&ei.current|2),t.child}e=e.sibling}null!==i.tail&&Ye()>Bl&&(t.flags|=128,r=!0,Vs(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ti(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Vs(i,!0),null===i.tail&&"hidden"===i.tailMode&&!l.alternate&&!ao)return Ws(t),null}else 2*Ye()-i.renderingStartTime>Bl&&1073741824!==n&&(t.flags|=128,r=!0,Vs(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=i.last)?n.sibling=l:t.child=l,i.last=l)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ye(),t.sibling=null,n=ei.current,Ca(ei,r?1&n|2:1&n),t):(Ws(t),null);case 22:case 23:return du(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Nl)&&(Ws(t),6&t.subtreeFlags&&(t.flags|=8192)):Ws(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Gs(e,t){switch(to(t),t.tag){case 1:return Na(t.type)&&La(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Yo(),Ea(Ta),Ea(Pa),ri(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Zo(t),null;case 13:if(Ea(ei),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));po()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ea(ei),null;case 4:return Yo(),null;case 10:return Po(t.type._context),null;case 22:case 23:return du(),null;default:return null}}Os=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ns=function(){},Ls=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,Jo(Wo.current);var o,i=null;switch(n){case"input":a=J(e,a),r=J(e,r),i=[];break;case"select":a=$({},a,{value:void 0}),r=$({},r,{value:void 0}),i=[];break;case"textarea":a=re(e,a),r=re(e,r),i=[];break;default:"function"!==typeof a.onClick&&"function"===typeof r.onClick&&(e.onclick=Zr)}for(c in ye(n,r),n=null,a)if(!r.hasOwnProperty(c)&&a.hasOwnProperty(c)&&null!=a[c])if("style"===c){var l=a[c];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(s.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=a?a[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(i||(i=[]),i.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(i=i||[]).push(c,u)):"children"===c?"string"!==typeof u&&"number"!==typeof u||(i=i||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(s.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Mr("scroll",e),i||l===u||(i=[])):(i=i||[]).push(c,u))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}},As=function(e,t,n,r){n!==r&&(t.flags|=4)};var Js=!1,Qs=!1,Ys="function"===typeof WeakSet?WeakSet:Set,Xs=null;function Zs(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Su(e,t,r)}else n.current=null}function el(e,t,n){try{n()}catch(r){Su(e,t,r)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var a=r=r.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,void 0!==o&&el(t,n,o)}a=a.next}while(a!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function al(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[fa],delete t[ha],delete t[ma],delete t[va],delete t[ga])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function il(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||il(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Zr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function ul(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var cl=null,dl=!1;function fl(e,t,n){for(n=n.child;null!==n;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(ot&&"function"===typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(at,n)}catch(s){}switch(n.tag){case 5:Qs||Zs(n,t);case 6:var r=cl,a=dl;cl=null,fl(e,t,n),dl=a,null!==(cl=r)&&(dl?(e=cl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cl.removeChild(n.stateNode));break;case 18:null!==cl&&(dl?(e=cl,n=n.stateNode,8===e.nodeType?la(e.parentNode,n):1===e.nodeType&&la(e,n),Bt(e)):la(cl,n.stateNode));break;case 4:r=cl,a=dl,cl=n.stateNode.containerInfo,dl=!0,fl(e,t,n),cl=r,dl=a;break;case 0:case 11:case 14:case 15:if(!Qs&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){a=r=r.next;do{var o=a,i=o.destroy;o=o.tag,void 0!==i&&(0!==(2&o)||0!==(4&o))&&el(n,t,i),a=a.next}while(a!==r)}fl(e,t,n);break;case 1:if(!Qs&&(Zs(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Su(n,t,s)}fl(e,t,n);break;case 21:fl(e,t,n);break;case 22:1&n.mode?(Qs=(r=Qs)||null!==n.memoizedState,fl(e,t,n),Qs=r):fl(e,t,n);break;default:fl(e,t,n)}}function pl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ys),t.forEach(function(t){var r=Pu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function ml(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var a=n[r];try{var i=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:cl=l.stateNode,dl=!1;break e;case 3:case 4:cl=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===cl)throw Error(o(160));hl(i,s,a),cl=null,dl=!1;var u=a.alternate;null!==u&&(u.return=null),a.return=null}catch(c){Su(a,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)vl(t,e),t=t.sibling}function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ml(t,e),gl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(v){Su(e,e.return,v)}try{nl(5,e,e.return)}catch(v){Su(e,e.return,v)}}break;case 1:ml(t,e),gl(e),512&r&&null!==n&&Zs(n,n.return);break;case 5:if(ml(t,e),gl(e),512&r&&null!==n&&Zs(n,n.return),32&e.flags){var a=e.stateNode;try{fe(a,"")}catch(v){Su(e,e.return,v)}}if(4&r&&null!=(a=e.stateNode)){var i=e.memoizedProps,s=null!==n?n.memoizedProps:i,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===i.type&&null!=i.name&&Y(a,i),be(l,s);var c=be(l,i);for(s=0;s<u.length;s+=2){var d=u[s],f=u[s+1];"style"===d?ve(a,f):"dangerouslySetInnerHTML"===d?de(a,f):"children"===d?fe(a,f):b(a,d,f,c)}switch(l){case"input":X(a,i);break;case"textarea":oe(a,i);break;case"select":var h=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!i.multiple;var p=i.value;null!=p?ne(a,!!i.multiple,p,!1):h!==!!i.multiple&&(null!=i.defaultValue?ne(a,!!i.multiple,i.defaultValue,!0):ne(a,!!i.multiple,i.multiple?[]:"",!1))}a[ha]=i}catch(v){Su(e,e.return,v)}}break;case 6:if(ml(t,e),gl(e),4&r){if(null===e.stateNode)throw Error(o(162));a=e.stateNode,i=e.memoizedProps;try{a.nodeValue=i}catch(v){Su(e,e.return,v)}}break;case 3:if(ml(t,e),gl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Bt(t.containerInfo)}catch(v){Su(e,e.return,v)}break;case 4:default:ml(t,e),gl(e);break;case 13:ml(t,e),gl(e),8192&(a=e.child).flags&&(i=null!==a.memoizedState,a.stateNode.isHidden=i,!i||null!==a.alternate&&null!==a.alternate.memoizedState||(zl=Ye())),4&r&&pl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Qs=(c=Qs)||d,ml(t,e),Qs=c):ml(t,e),gl(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!d&&0!==(1&e.mode))for(Xs=e,d=e.child;null!==d;){for(f=Xs=d;null!==Xs;){switch(p=(h=Xs).child,h.tag){case 0:case 11:case 14:case 15:nl(4,h,h.return);break;case 1:Zs(h,h.return);var m=h.stateNode;if("function"===typeof m.componentWillUnmount){r=h,n=h.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(v){Su(r,n,v)}}break;case 5:Zs(h,h.return);break;case 22:if(null!==h.memoizedState){kl(f);continue}}null!==p?(p.return=h,Xs=p):kl(f)}d=d.sibling}e:for(d=null,f=e;;){if(5===f.tag){if(null===d){d=f;try{a=f.stateNode,c?"function"===typeof(i=a.style).setProperty?i.setProperty("display","none","important"):i.display="none":(l=f.stateNode,s=void 0!==(u=f.memoizedProps.style)&&null!==u&&u.hasOwnProperty("display")?u.display:null,l.style.display=me("display",s))}catch(v){Su(e,e.return,v)}}}else if(6===f.tag){if(null===d)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(v){Su(e,e.return,v)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===e)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;null===f.sibling;){if(null===f.return||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:ml(t,e),gl(e),4&r&&pl(e);case 21:}}function gl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(il(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 5:var a=r.stateNode;32&r.flags&&(fe(a,""),r.flags&=-33),ul(e,sl(e),a);break;case 3:case 4:var i=r.stateNode.containerInfo;ll(e,sl(e),i);break;default:throw Error(o(161))}}catch(s){Su(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function yl(e,t,n){Xs=e,bl(e,t,n)}function bl(e,t,n){for(var r=0!==(1&e.mode);null!==Xs;){var a=Xs,o=a.child;if(22===a.tag&&r){var i=null!==a.memoizedState||Js;if(!i){var s=a.alternate,l=null!==s&&null!==s.memoizedState||Qs;s=Js;var u=Qs;if(Js=i,(Qs=l)&&!u)for(Xs=a;null!==Xs;)l=(i=Xs).child,22===i.tag&&null!==i.memoizedState?_l(a):null!==l?(l.return=i,Xs=l):_l(a);for(;null!==o;)Xs=o,bl(o,t,n),o=o.sibling;Xs=a,Js=s,Qs=u}wl(e)}else 0!==(8772&a.subtreeFlags)&&null!==o?(o.return=a,Xs=o):wl(e)}}function wl(e){for(;null!==Xs;){var t=Xs;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Qs||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Qs)if(null===n)r.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:ns(t.type,n.memoizedProps);r.componentDidUpdate(a,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;null!==i&&qo(t,i,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}qo(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var f=d.dehydrated;null!==f&&Bt(f)}}}break;default:throw Error(o(163))}Qs||512&t.flags&&al(t)}catch(h){Su(t,t.return,h)}}if(t===e){Xs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Xs=n;break}Xs=t.return}}function kl(e){for(;null!==Xs;){var t=Xs;if(t===e){Xs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Xs=n;break}Xs=t.return}}function _l(e){for(;null!==Xs;){var t=Xs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(l){Su(t,n,l)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var a=t.return;try{r.componentDidMount()}catch(l){Su(t,a,l)}}var o=t.return;try{al(t)}catch(l){Su(t,o,l)}break;case 5:var i=t.return;try{al(t)}catch(l){Su(t,i,l)}}}catch(l){Su(t,t.return,l)}if(t===e){Xs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Xs=s;break}Xs=t.return}}var xl,Sl=Math.ceil,El=w.ReactCurrentDispatcher,Cl=w.ReactCurrentOwner,jl=w.ReactCurrentBatchConfig,Pl=0,Tl=null,Rl=null,Ol=0,Nl=0,Ll=Sa(0),Al=0,Il=null,Dl=0,$l=0,Ul=0,Ml=null,Fl=null,zl=0,Bl=1/0,Hl=null,ql=!1,Vl=null,Wl=null,Kl=!1,Gl=null,Jl=0,Ql=0,Yl=null,Xl=-1,Zl=0;function eu(){return 0!==(6&Pl)?Ye():-1!==Xl?Xl:Xl=Ye()}function tu(e){return 0===(1&e.mode)?1:0!==(2&Pl)&&0!==Ol?Ol&-Ol:null!==vo.transition?(0===Zl&&(Zl=mt()),Zl):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Qt(e.type)}function nu(e,t,n,r){if(50<Ql)throw Ql=0,Yl=null,Error(o(185));gt(e,n,r),0!==(2&Pl)&&e===Tl||(e===Tl&&(0===(2&Pl)&&($l|=n),4===Al&&su(e,Ol)),ru(e,r),1===n&&0===Pl&&0===(1&t.mode)&&(Bl=Ye()+500,Ma&&Ba()))}function ru(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-it(o),s=1<<i,l=a[i];-1===l?0!==(s&n)&&0===(s&r)||(a[i]=ht(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=ft(e,e===Tl?Ol:0);if(0===r)null!==n&&Ge(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ge(n),1===t)0===e.tag?function(e){Ma=!0,za(e)}(lu.bind(null,e)):za(lu.bind(null,e)),ia(function(){0===(6&Pl)&&Ba()}),n=null;else{switch(wt(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Tu(n,au.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function au(e,t){if(Xl=-1,Zl=0,0!==(6&Pl))throw Error(o(327));var n=e.callbackNode;if(_u()&&e.callbackNode!==n)return null;var r=ft(e,e===Tl?Ol:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=vu(e,r);else{t=r;var a=Pl;Pl|=2;var i=pu();for(Tl===e&&Ol===t||(Hl=null,Bl=Ye()+500,fu(e,t));;)try{yu();break}catch(l){hu(e,l)}jo(),El.current=i,Pl=a,null!==Rl?t=0:(Tl=null,Ol=0,t=Al)}if(0!==t){if(2===t&&(0!==(a=pt(e))&&(r=a,t=ou(e,a))),1===t)throw n=Il,fu(e,0),su(e,r),ru(e,Ye()),n;if(6===t)su(e,r);else{if(a=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var a=n[r],o=a.getSnapshot;a=a.value;try{if(!sr(o(),a))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(a)&&(2===(t=vu(e,r))&&(0!==(i=pt(e))&&(r=i,t=ou(e,i))),1===t))throw n=Il,fu(e,0),su(e,r),ru(e,Ye()),n;switch(e.finishedWork=a,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:ku(e,Fl,Hl);break;case 3:if(su(e,r),(130023424&r)===r&&10<(t=zl+500-Ye())){if(0!==ft(e,0))break;if(((a=e.suspendedLanes)&r)!==r){eu(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=ra(ku.bind(null,e,Fl,Hl),t);break}ku(e,Fl,Hl);break;case 4:if(su(e,r),(4194240&r)===r)break;for(t=e.eventTimes,a=-1;0<r;){var s=31-it(r);i=1<<s,(s=t[s])>a&&(a=s),r&=~i}if(r=a,10<(r=(120>(r=Ye()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sl(r/1960))-r)){e.timeoutHandle=ra(ku.bind(null,e,Fl,Hl),r);break}ku(e,Fl,Hl);break;default:throw Error(o(329))}}}return ru(e,Ye()),e.callbackNode===n?au.bind(null,e):null}function ou(e,t){var n=Ml;return e.current.memoizedState.isDehydrated&&(fu(e,t).flags|=256),2!==(e=vu(e,t))&&(t=Fl,Fl=n,null!==t&&iu(t)),e}function iu(e){null===Fl?Fl=e:Fl.push.apply(Fl,e)}function su(e,t){for(t&=~Ul,t&=~$l,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-it(t),r=1<<n;e[n]=-1,t&=~r}}function lu(e){if(0!==(6&Pl))throw Error(o(327));_u();var t=ft(e,0);if(0===(1&t))return ru(e,Ye()),null;var n=vu(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=ou(e,r))}if(1===n)throw n=Il,fu(e,0),su(e,t),ru(e,Ye()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ku(e,Fl,Hl),ru(e,Ye()),null}function uu(e,t){var n=Pl;Pl|=1;try{return e(t)}finally{0===(Pl=n)&&(Bl=Ye()+500,Ma&&Ba())}}function cu(e){null!==Gl&&0===Gl.tag&&0===(6&Pl)&&_u();var t=Pl;Pl|=1;var n=jl.transition,r=bt;try{if(jl.transition=null,bt=1,e)return e()}finally{bt=r,jl.transition=n,0===(6&(Pl=t))&&Ba()}}function du(){Nl=Ll.current,Ea(Ll)}function fu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,aa(n)),null!==Rl)for(n=Rl.return;null!==n;){var r=n;switch(to(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&La();break;case 3:Yo(),Ea(Ta),Ea(Pa),ri();break;case 5:Zo(r);break;case 4:Yo();break;case 13:case 19:Ea(ei);break;case 10:Po(r.type._context);break;case 22:case 23:du()}n=n.return}if(Tl=e,Rl=e=Lu(e.current,null),Ol=Nl=t,Al=0,Il=null,Ul=$l=Dl=0,Fl=Ml=null,null!==No){for(t=0;t<No.length;t++)if(null!==(r=(n=No[t]).interleaved)){n.interleaved=null;var a=r.next,o=n.pending;if(null!==o){var i=o.next;o.next=a,r.next=i}n.pending=r}No=null}return e}function hu(e,t){for(;;){var n=Rl;try{if(jo(),ai.current=Xi,ci){for(var r=si.memoizedState;null!==r;){var a=r.queue;null!==a&&(a.pending=null),r=r.next}ci=!1}if(ii=0,ui=li=si=null,di=!1,fi=0,Cl.current=null,null===n||null===n.return){Al=1,Il=t,Rl=null;break}e:{var i=e,s=n.return,l=n,u=t;if(t=Ol,l.flags|=32768,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u,d=l,f=d.tag;if(0===(1&d.mode)&&(0===f||11===f||15===f)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=vs(s);if(null!==p){p.flags&=-257,gs(p,s,l,0,t),1&p.mode&&ms(i,c,t),u=c;var m=(t=p).updateQueue;if(null===m){var v=new Set;v.add(u),t.updateQueue=v}else m.add(u);break e}if(0===(1&t)){ms(i,c,t),mu();break e}u=Error(o(426))}else if(ao&&1&l.mode){var g=vs(s);if(null!==g){0===(65536&g.flags)&&(g.flags|=256),gs(g,s,l,0,t),mo(us(u,l));break e}}i=u=us(u,l),4!==Al&&(Al=2),null===Ml?Ml=[i]:Ml.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t,Bo(i,hs(0,u,t));break e;case 1:l=u;var y=i.type,b=i.stateNode;if(0===(128&i.flags)&&("function"===typeof y.getDerivedStateFromError||null!==b&&"function"===typeof b.componentDidCatch&&(null===Wl||!Wl.has(b)))){i.flags|=65536,t&=-t,i.lanes|=t,Bo(i,ps(i,l,t));break e}}i=i.return}while(null!==i)}wu(n)}catch(w){t=w,Rl===n&&null!==n&&(Rl=n=n.return);continue}break}}function pu(){var e=El.current;return El.current=Xi,null===e?Xi:e}function mu(){0!==Al&&3!==Al&&2!==Al||(Al=4),null===Tl||0===(268435455&Dl)&&0===(268435455&$l)||su(Tl,Ol)}function vu(e,t){var n=Pl;Pl|=2;var r=pu();for(Tl===e&&Ol===t||(Hl=null,fu(e,t));;)try{gu();break}catch(a){hu(e,a)}if(jo(),Pl=n,El.current=r,null!==Rl)throw Error(o(261));return Tl=null,Ol=0,Al}function gu(){for(;null!==Rl;)bu(Rl)}function yu(){for(;null!==Rl&&!Je();)bu(Rl)}function bu(e){var t=xl(e.alternate,e,Nl);e.memoizedProps=e.pendingProps,null===t?wu(e):Rl=t,Cl.current=null}function wu(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Ks(n,t,Nl)))return void(Rl=n)}else{if(null!==(n=Gs(n,t)))return n.flags&=32767,void(Rl=n);if(null===e)return Al=6,void(Rl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Rl=t);Rl=t=e}while(null!==t);0===Al&&(Al=5)}function ku(e,t,n){var r=bt,a=jl.transition;try{jl.transition=null,bt=1,function(e,t,n,r){do{_u()}while(null!==Gl);if(0!==(6&Pl))throw Error(o(327));n=e.finishedWork;var a=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var a=31-it(n),o=1<<a;t[a]=0,r[a]=-1,e[a]=-1,n&=~o}}(e,i),e===Tl&&(Rl=Tl=null,Ol=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Kl||(Kl=!0,Tu(tt,function(){return _u(),null})),i=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||i){i=jl.transition,jl.transition=null;var s=bt;bt=1;var l=Pl;Pl|=4,Cl.current=null,function(e,t){if(ea=qt,hr(e=fr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(k){n=null;break e}var s=0,l=-1,u=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||0!==a&&3!==f.nodeType||(l=s+a),f!==i||0!==r&&3!==f.nodeType||(u=s+r),3===f.nodeType&&(s+=f.nodeValue.length),null!==(p=f.firstChild);)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++c===a&&(l=s),h===i&&++d===r&&(u=s),null!==(p=f.nextSibling))break;h=(f=h).parentNode}f=p}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ta={focusedElem:e,selectionRange:n},qt=!1,Xs=t;null!==Xs;)if(e=(t=Xs).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Xs=e;else for(;null!==Xs;){t=Xs;try{var m=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var v=m.memoizedProps,g=m.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:ns(t.type,v),g);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(o(163))}}catch(k){Su(t,t.return,k)}if(null!==(e=t.sibling)){e.return=t.return,Xs=e;break}Xs=t.return}m=tl,tl=!1}(e,n),vl(n,e),pr(ta),qt=!!ea,ta=ea=null,e.current=n,yl(n,e,a),Qe(),Pl=l,bt=s,jl.transition=i}else e.current=n;if(Kl&&(Kl=!1,Gl=e,Jl=a),i=e.pendingLanes,0===i&&(Wl=null),function(e){if(ot&&"function"===typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(at,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),ru(e,Ye()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],r(a.value,{componentStack:a.stack,digest:a.digest});if(ql)throw ql=!1,e=Vl,Vl=null,e;0!==(1&Jl)&&0!==e.tag&&_u(),i=e.pendingLanes,0!==(1&i)?e===Yl?Ql++:(Ql=0,Yl=e):Ql=0,Ba()}(e,t,n,r)}finally{jl.transition=a,bt=r}return null}function _u(){if(null!==Gl){var e=wt(Jl),t=jl.transition,n=bt;try{if(jl.transition=null,bt=16>e?16:e,null===Gl)var r=!1;else{if(e=Gl,Gl=null,Jl=0,0!==(6&Pl))throw Error(o(331));var a=Pl;for(Pl|=4,Xs=e.current;null!==Xs;){var i=Xs,s=i.child;if(0!==(16&Xs.flags)){var l=i.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(Xs=c;null!==Xs;){var d=Xs;switch(d.tag){case 0:case 11:case 15:nl(8,d,i)}var f=d.child;if(null!==f)f.return=d,Xs=f;else for(;null!==Xs;){var h=(d=Xs).sibling,p=d.return;if(ol(d),d===c){Xs=null;break}if(null!==h){h.return=p,Xs=h;break}Xs=p}}}var m=i.alternate;if(null!==m){var v=m.child;if(null!==v){m.child=null;do{var g=v.sibling;v.sibling=null,v=g}while(null!==v)}}Xs=i}}if(0!==(2064&i.subtreeFlags)&&null!==s)s.return=i,Xs=s;else e:for(;null!==Xs;){if(0!==(2048&(i=Xs).flags))switch(i.tag){case 0:case 11:case 15:nl(9,i,i.return)}var y=i.sibling;if(null!==y){y.return=i.return,Xs=y;break e}Xs=i.return}}var b=e.current;for(Xs=b;null!==Xs;){var w=(s=Xs).child;if(0!==(2064&s.subtreeFlags)&&null!==w)w.return=s,Xs=w;else e:for(s=b;null!==Xs;){if(0!==(2048&(l=Xs).flags))try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(_){Su(l,l.return,_)}if(l===s){Xs=null;break e}var k=l.sibling;if(null!==k){k.return=l.return,Xs=k;break e}Xs=l.return}}if(Pl=a,Ba(),ot&&"function"===typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(at,e)}catch(_){}r=!0}return r}finally{bt=n,jl.transition=t}}return!1}function xu(e,t,n){e=Fo(e,t=hs(0,t=us(n,t),1),1),t=eu(),null!==e&&(gt(e,1,t),ru(e,t))}function Su(e,t,n){if(3===e.tag)xu(e,e,n);else for(;null!==t;){if(3===t.tag){xu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Wl||!Wl.has(r))){t=Fo(t,e=ps(t,e=us(n,e),1),1),e=eu(),null!==t&&(gt(t,1,e),ru(t,e));break}}t=t.return}}function Eu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=eu(),e.pingedLanes|=e.suspendedLanes&n,Tl===e&&(Ol&n)===n&&(4===Al||3===Al&&(130023424&Ol)===Ol&&500>Ye()-zl?fu(e,0):Ul|=n),ru(e,t)}function Cu(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ct,0===(130023424&(ct<<=1))&&(ct=4194304)));var n=eu();null!==(e=Io(e,t))&&(gt(e,t,n),ru(e,n))}function ju(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Cu(e,n)}function Pu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),Cu(e,n)}function Tu(e,t){return Ke(e,t)}function Ru(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ou(e,t,n,r){return new Ru(e,t,n,r)}function Nu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Lu(e,t){var n=e.alternate;return null===n?((n=Ou(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Au(e,t,n,r,a,i){var s=2;if(r=e,"function"===typeof e)Nu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case x:return Iu(n.children,a,i,t);case S:s=8,a|=8;break;case E:return(e=Ou(12,n,t,2|a)).elementType=E,e.lanes=i,e;case T:return(e=Ou(13,n,t,a)).elementType=T,e.lanes=i,e;case R:return(e=Ou(19,n,t,a)).elementType=R,e.lanes=i,e;case L:return Du(n,a,i,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:s=10;break e;case j:s=9;break e;case P:s=11;break e;case O:s=14;break e;case N:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Ou(s,n,t,a)).elementType=e,t.type=r,t.lanes=i,t}function Iu(e,t,n,r){return(e=Ou(7,e,r,t)).lanes=n,e}function Du(e,t,n,r){return(e=Ou(22,e,r,t)).elementType=L,e.lanes=n,e.stateNode={isHidden:!1},e}function $u(e,t,n){return(e=Ou(6,e,null,t)).lanes=n,e}function Uu(e,t,n){return(t=Ou(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Mu(e,t,n,r,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vt(0),this.expirationTimes=vt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vt(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Fu(e,t,n,r,a,o,i,s,l){return e=new Mu(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Ou(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},$o(o),e}function zu(e){if(!e)return ja;e:{if(Be(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Na(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Na(n))return Ia(e,n,t)}return t}function Bu(e,t,n,r,a,o,i,s,l){return(e=Fu(n,r,!0,e,0,o,0,s,l)).context=zu(null),n=e.current,(o=Mo(r=eu(),a=tu(n))).callback=void 0!==t&&null!==t?t:null,Fo(n,o,a),e.current.lanes=a,gt(e,a,r),ru(e,r),e}function Hu(e,t,n,r){var a=t.current,o=eu(),i=tu(a);return n=zu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Mo(o,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Fo(a,t,i))&&(nu(e,a,i,o),zo(e,a,i)),i}function qu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Wu(e,t){Vu(e,t),(e=e.alternate)&&Vu(e,t)}xl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ta.current)bs=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return bs=!1,function(e,t,n){switch(t.tag){case 3:Ts(t),po();break;case 5:Xo(t);break;case 1:Na(t.type)&&Da(t);break;case 4:Qo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,a=t.memoizedProps.value;Ca(xo,r._currentValue),r._currentValue=a;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ca(ei,1&ei.current),t.flags|=128,null):0!==(n&t.child.childLanes)?$s(e,t,n):(Ca(ei,1&ei.current),null!==(e=qs(e,t,n))?e.sibling:null);Ca(ei,1&ei.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return Bs(e,t,n);t.flags|=128}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),Ca(ei,ei.current),r)break;return null;case 22:case 23:return t.lanes=0,Ss(e,t,n)}return qs(e,t,n)}(e,t,n);bs=0!==(131072&e.flags)}else bs=!1,ao&&0!==(1048576&t.flags)&&Za(t,Wa,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hs(e,t),e=t.pendingProps;var a=Oa(t,Pa.current);Ro(t,n),a=vi(null,t,r,e,a,n);var i=gi();return t.flags|=1,"object"===typeof a&&null!==a&&"function"===typeof a.render&&void 0===a.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Na(r)?(i=!0,Da(t)):i=!1,t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,$o(t),a.updater=as,t.stateNode=a,a._reactInternals=t,ls(t,r,e,n),t=Ps(null,t,r,!0,i,n)):(t.tag=0,ao&&i&&eo(t),ws(null,t,a,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,r=(a=r._init)(r._payload),t.type=r,a=t.tag=function(e){if("function"===typeof e)return Nu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===P)return 11;if(e===O)return 14}return 2}(r),e=ns(r,e),a){case 0:t=Cs(null,t,r,e,n);break e;case 1:t=js(null,t,r,e,n);break e;case 11:t=ks(null,t,r,e,n);break e;case 14:t=_s(null,t,r,ns(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,Cs(e,t,r,a=t.elementType===r?a:ns(r,a),n);case 1:return r=t.type,a=t.pendingProps,js(e,t,r,a=t.elementType===r?a:ns(r,a),n);case 3:e:{if(Ts(t),null===e)throw Error(o(387));r=t.pendingProps,a=(i=t.memoizedState).element,Uo(e,t),Ho(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Rs(e,t,r,n,a=us(Error(o(423)),t));break e}if(r!==a){t=Rs(e,t,r,n,a=us(Error(o(424)),t));break e}for(ro=ua(t.stateNode.containerInfo.firstChild),no=t,ao=!0,oo=null,n=_o(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(po(),r===a){t=qs(e,t,n);break e}ws(e,t,r,n)}t=t.child}return t;case 5:return Xo(t),null===e&&uo(t),r=t.type,a=t.pendingProps,i=null!==e?e.memoizedProps:null,s=a.children,na(r,a)?s=null:null!==i&&na(r,i)&&(t.flags|=32),Es(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&uo(t),null;case 13:return $s(e,t,n);case 4:return Qo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ko(t,null,r,n):ws(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,ks(e,t,r,a=t.elementType===r?a:ns(r,a),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,i=t.memoizedProps,s=a.value,Ca(xo,r._currentValue),r._currentValue=s,null!==i)if(sr(i.value,s)){if(i.children===a.children&&!Ta.current){t=qs(e,t,n);break e}}else for(null!==(i=t.child)&&(i.return=t);null!==i;){var l=i.dependencies;if(null!==l){s=i.child;for(var u=l.firstContext;null!==u;){if(u.context===r){if(1===i.tag){(u=Mo(-1,n&-n)).tag=2;var c=i.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}i.lanes|=n,null!==(u=i.alternate)&&(u.lanes|=n),To(i.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===i.tag)s=i.type===t.type?null:i.child;else if(18===i.tag){if(null===(s=i.return))throw Error(o(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),To(s,n,t),s=i.sibling}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===t){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}ws(e,t,a.children,n),t=t.child}return t;
vendor: 6,264 bytes, line 2
2case 9:return a=t.type,r=t.pendingProps.children,Ro(t,n),r=r(a=Oo(a)),t.flags|=1,ws(e,t,r,n),t.child;case 14:return a=ns(r=t.type,t.pendingProps),_s(e,t,r,a=ns(r.type,a),n);case 15:return xs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:ns(r,a),Hs(e,t),t.tag=1,Na(r)?(e=!0,Da(t)):e=!1,Ro(t,n),is(t,r,a),ls(t,r,a,n),Ps(null,t,r,!0,e,n);case 19:return Bs(e,t,n);case 22:return Ss(e,t,n)}throw Error(o(156,t.tag))};var Ku="function"===typeof reportError?reportError:function(e){console.error(e)};function Gu(e){this._internalRoot=e}function Ju(e){this._internalRoot=e}function Qu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Yu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Xu(){}function Zu(e,t,n,r,a){var o=n._reactRootContainer;if(o){var i=o;if("function"===typeof a){var s=a;a=function(){var e=qu(i);s.call(e)}}Hu(t,i,e,a)}else i=function(e,t,n,r,a){if(a){if("function"===typeof r){var o=r;r=function(){var e=qu(i);o.call(e)}}var i=Bu(t,r,e,0,null,!1,0,"",Xu);return e._reactRootContainer=i,e[pa]=i.current,Br(8===e.nodeType?e.parentNode:e),cu(),i}for(;a=e.lastChild;)e.removeChild(a);if("function"===typeof r){var s=r;r=function(){var e=qu(l);s.call(e)}}var l=Fu(e,0,!1,null,0,!1,0,"",Xu);return e._reactRootContainer=l,e[pa]=l.current,Br(8===e.nodeType?e.parentNode:e),cu(function(){Hu(t,l,n,r)}),l}(n,t,e,a,r);return qu(i)}Ju.prototype.render=Gu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Hu(e,t,null,null)},Ju.prototype.unmount=Gu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cu(function(){Hu(null,e,null,null)}),t[pa]=null}},Ju.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lt.length&&0!==t&&t<Lt[n].priority;n++);Lt.splice(n,0,e),0===n&&$t(e)}},kt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),ru(t,Ye()),0===(6&Pl)&&(Bl=Ye()+500,Ba()))}break;case 13:cu(function(){var t=Io(e,1);if(null!==t){var n=eu();nu(t,e,1,n)}}),Wu(e,1)}},_t=function(e){if(13===e.tag){var t=Io(e,134217728);if(null!==t)nu(t,e,134217728,eu());Wu(e,134217728)}},xt=function(e){if(13===e.tag){var t=tu(e),n=Io(e,t);if(null!==n)nu(n,e,t,eu());Wu(e,t)}},St=function(){return bt},Et=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},_e=function(e,t,n){switch(t){case"input":if(X(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=ka(r);if(!a)throw Error(o(90));K(r),X(r,a)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Pe=uu,Te=cu;var ec={usingClientEntryPoint:!1,Events:[ba,wa,ka,Ce,je,uu]},tc={findFiberByHostInstance:ya,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nc={bundleType:tc.bundleType,version:tc.version,rendererPackageName:tc.rendererPackageName,rendererConfig:tc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ve(e))?null:e.stateNode},findFiberByHostInstance:tc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var rc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rc.isDisabled&&rc.supportsFiber)try{at=rc.inject(nc),ot=rc}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ec,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Qu(t))throw Error(o(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:_,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Qu(e))throw Error(o(299));var n=!1,r="",a=Ku;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(a=t.onRecoverableError)),t=Fu(e,1,!1,null,0,n,0,r,a),e[pa]=t.current,Br(8===e.nodeType?e.parentNode:e),new Gu(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=null===(e=Ve(t))?null:e.stateNode},t.flushSync=function(e){return cu(e)},t.hydrate=function(e,t,n){if(!Yu(t))throw Error(o(200));return Zu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Qu(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,a=!1,i="",s=Ku;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(a=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Bu(t,null,e,1,null!=n?n:null,a,0,i,s),e[pa]=t.current,Br(e),r)for(e=0;e<r.length;e++)a=(a=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new Ju(t)},t.render=function(e,t,n){if(!Yu(t))throw Error(o(200));return Zu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Yu(e))throw Error(o(40));return!!e._reactRootContainer&&(cu(function(){Zu(null,null,e,!1,function(){e._reactRootContainer=null,e[pa]=null})}),!0)},t.unstable_batchedUpdates=uu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Yu(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Zu(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},736:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esMo
2dule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=r(n(374));class o extends a.default{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(e=>"string"===typeof e&&new RegExp("[,()]").test(e)?`"${e}"`:`${e}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}contains(e,t){return"string"===typeof t?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return"string"===typeof t?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return"string"===typeof t?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t){let{config:n,type:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a="";"plain"===r?a="pl":"phrase"===r?a="ph":"websearch"===r&&(a="w");const o=void 0===n?"":`(${n})`;return this.url.searchParams.append(e,`${a}fts${o}.${t}`),this}match(e){return Object.entries(e).forEach(e=>{let[t,n]=e;this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e){let{foreignTable:t,referencedTable:n=t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}}t.default=o},740:e=>{"use strict";e.exports=function(e,t,n,r,a,o,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,o,i,s],c=0;(l=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},745:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_HEADERS=void 0;const r=n(400);t.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${r.version}`}},829:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=r(n(736));t.default=class{constructor(e,t){let{headers:n={},schema:r,fetch:a}=t;this.url=e,this.headers=n,this.schema=r,this.fetch=a}select(e){let{head:t=!1,count:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=t?"HEAD":"GET";let o=!1;const i=(null!==e&&void 0!==e?e:"*").split("").map(e=>/\s/.test(e)&&!o?"":('"'===e&&(o=!o),e)).join("");return this.url.searchParams.set("select",i),n&&(this.headers.Prefer=`count=${n}`),new a.default({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}
2insert(e){let{count:t,defaultToNull:n=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[];if(this.headers.Prefer&&r.push(this.headers.Prefer),t&&r.push(`count=${t}`),n||r.push("missing=default"),this.headers.Prefer=r.join(","),Array.isArray(e)){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){const e=[...new Set(t)].map(e=>`"${e}"`);this.url.searchParams.set("columns",e.join(","))}}return new a.default({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e){let{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:o=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=[`resolution=${n?"ignore":"merge"}-duplicates`];if(void 0!==t&&this.url.searchParams.set("on_conflict",t),this.headers.Prefer&&i.push(this.headers.Prefer),r&&i.push(`count=${r}`),o||i.push("missing=default"),this.headers.Prefer=i.join(","),Array.isArray(e)){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){const e=[...new Set(t)].map(e=>`"${e}"`);this.url.searchParams.set("columns",e.join(","))}}return new a.default({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e){let{count:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=[];return this.headers.Prefer&&n.push(this.headers.Prefer),t&&n.push(`count=${t}`),this.headers.Prefer=n.join(","),new a.default({method:"PATCH",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete(){let{count:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];return e&&t.push(`count=${e}`),this.headers.Prefer&&t.unshift(this.headers.Prefer),this.headers.Prefer=t.join(","),new a.default({method:"DELETE",url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}},853:(e,t,n)=>{"use strict";e.exports=n(234)},950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(730)},980:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PostgrestError=t.PostgrestBuilder=t.PostgrestTransformBuilder=t.PostgrestFilterBuilder=t.PostgrestQueryBuilder=t.PostgrestClient=void 0;const a=r(n(210));t.PostgrestClient=a.default;const o=r(n(829));t.PostgrestQueryBuilder=o.default;const i=r(n(736));t.PostgrestFilterBuilder=i.default;const s=r(n(374));t.PostgrestTransformBuilder=s.default;const l=r(n(286));t.PostgrestBuilder=l.default;const u=r(n(611));t.PostgrestError=u.default,t.default={PostgrestClient:a.default,PostgrestQueryBuilder:o.default,PostgrestFilterBuilder:i.default,PostgrestTransformBuilder:s.default,PostgrestBuilder:l.default,PostgrestError:u.default}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,a){if(1&a&&(r=this(r)),8&a)return r;if("object"===typeof r&&r){if(4&a&&r.__esModule)return r;if(16&a&&"function"===typeof r.then)return r}var o=Object.create(null);n.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&a&&r;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>i[e]=()=>r[e]);return i.default=()=>r,n.d(o,i),o}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>"static/js/"+e+".5ae016b6.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="ai-form-reader:";n.l=(r,a,o,i)=>{if(e[r])e[r].push(a);else{var s,l;if(void 0!==o)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var d=u[c];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+o){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+o),s.src=r),e[r]=[a];var f=(t,n)=>{s.onerror=s.onload=null,clearTimeout(h);var a=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),a&&a.forEach(e
2=>e(n)),t)return t(n)},h=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),l&&document.head.appendChild(s)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",(()=>{var e={792:0};n.f.j=(t,r)=>{var a=n.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else{var o=new Promise((n,r)=>a=e[t]=[n,r]);r.push(a[2]=o);var i=n.p+n.u(t),s=new Error;n.l(i,r=>{if(n.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,a[1](s)}},"chunk-"+t,t)}};var t=(t,r)=>{var a,o,i=r[0],s=r[1],l=r[2],u=0;if(i.some(t=>0!==e[t])){for(a in s)n.o(s,a)&&(n.m[a]=s[a]);if(l)l(n)}for(t&&t(r);u<i.length;u++)o=i[u],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=self.webpackChunkai_form_reader=self.webpackChunkai_form_reader||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),(()=>{"use strict";var e=n(43),t=n(391),r=n(475),a=n(216),o=n(139),i=n.n(o),s=n(579);const l=["xxl","xl","lg","md","sm","xs"],u="xs",c=e.createContext({prefixes:{},breakpoints:l,minBreakpoint:u}),{Consumer:d,Provider:f}=c;function h(t,n){const{prefixes:r}=(0,e.useContext)(c);return t||r[n]||n}function p(){const{breakpoints:t}=(0,e.useContext)(c);return t}function m(){const{minBreakpoint:t}=(0,e.useContext)(c);return t}const v=e.forwardRef((e,t)=>{let{bsPrefix:n,fluid:r=!1,as:a="div",className:o,...l}=e;const u=h(n,"container"),c="string"===typeof r?`-${r}`:"-fluid";return(0,s.jsx)(a,{ref:t,...l,className:i()(o,r?`${u}${c}`:u)})});v.displayName="Container";const g=v,y=["as","disabled"];function b(e){let{tagName:t,disabled:n,href:r,target:a,rel:o,role:i,onClick:s,tabIndex:l=0,type:u}=e;t||(t=null!=r||null!=a||null!=o?"a":"button");const c={tagName:t};if("button"===t)return[{type:u||"button",disabled:n},c];const d=e=>{(n||"a"===t&&function(e){return!e||"#"===e.trim()}(r))&&e.preventDefault(),n?e.stopPropagation():null==s||s(e)};return"a"===t&&(r||(r="#"),n&&(r=void 0)),[{role:null!=i?i:"button",disabled:void 0,tabIndex:n?void 0:l,href:r,target:"a"===t?a:void 0,"aria-disabled":n||void 0,rel:"a"===t?o:void 0,onClick:d,onKeyDown:e=>{" "===e.key&&(e.preventDefault(),d(e))}},c]}const w=e.forwardRef((e,t)=>{let{as:n,disabled:r}=e,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,y);const[o,{tagName:i}]=b(Object.assign({tagName:n,disabled:r},a));return(0,s.jsx)(i,Object.assign({},a,o,{ref:t}))});w.displayName="Button";const k=w,_=e.forwardRef((e,t)=>{let{as:n,bsPrefix:r,variant:a="primary",size:o,active:l=!1,disabled:u=!1,className:c,...d}=e;const f=h(r,"btn"),[p,{tagName:m}]=b({tagName:n,disabled:u,...d}),v=m;return(0,s.jsx)(v,{...p,...d,ref:t,disabled:u,className:i()(c,f,l&&"active",a&&`${f}-${a}`,o&&`${f}-${o}`,d.href&&u&&"disabled")})});_.displayName="Button";const x=_,S=e.forwardRef((e,t)=>{let{bsPrefix:n,variant:r,animation:a="border",size:o,as:l="div",className:u,...c}=e;n=h(n,"spinner");const d=`${n}-${a}`;return(0,s.jsx)(l,{ref:t,...c,className:i()(u,d,o&&`${d}-${o}`,r&&`text-${r}`)})});S.displayName="Spinner";const E=S;function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},C.apply(null,arguments)}function j(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n(740);function P(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function T(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}function R(t,n){return Object.keys(n).reduce(function(r,a){var o,i=r,s=i[P(a)],l=i[a],u=j(i,[P(a),a].map(T)),c=n[a],d=function(t,n,r){var a=(0,e.useRef)(void 0!==t),o=(0,e.useState)(n),i=o[0],s=o[1],l=void 0!==t,u=a.current;return a.current=l,!l&&u&&i!==n&&s(n),[l?t:i,(0,e.useCallback)(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];r&&r.apply(void 0,[e].concat(n)),s(e)},[r])]}(l,s,t[c]),f=d[0],h=d[1];return C({},u,((o={})[a]=f,o[c]=h,o))},t)}function O(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function N(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function L(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}O.__suppressDeprecationWarning=!0,N.__suppressDeprecationWarning=!0,L.__suppressDeprecationWarning=!0;const A=function(t){const n=(0,e.useRef)(t);return(0,e.useEffect)(()=>{n.current=t},[t]),n};function I(t){const n=A(t);return(0,e.useCallback)(function(){return n.current&&n.current(...arguments)},[n])}const D=t=>
2e.forwardRef((e,n)=>(0,s.jsx)("div",{...e,ref:n,className:i()(e.className,t)})),$=D("h4");$.displayName="DivStyledAsH4";const U=e.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:a=$,...o}=e;return r=h(r,"alert-heading"),(0,s.jsx)(a,{ref:t,className:i()(n,r),...o})});U.displayName="AlertHeading";const M=U;const F=function(t){const n=(0,e.useRef)(t);return(0,e.useEffect)(()=>{n.current=t},[t]),n};function z(t){const n=F(t);return(0,e.useCallback)(function(){return n.current&&n.current(...arguments)},[n])}const B="undefined"!==typeof n.g&&n.g.navigator&&"ReactNative"===n.g.navigator.product,H="undefined"!==typeof document||B?e.useLayoutEffect:e.useEffect;new WeakMap;const q=["onKeyDown"];const V=e.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,q);const[a]=b(Object.assign({tagName:"a"},r)),o=z(e=>{a.onKeyDown(e),null==n||n(e)});return(i=r.href)&&"#"!==i.trim()&&"button"!==r.role?(0,s.jsx)("a",Object.assign({ref:t},r,{onKeyDown:n})):(0,s.jsx)("a",Object.assign({ref:t},r,a,{onKeyDown:o}));var i});V.displayName="Anchor";const W=V,K=e.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:a=W,...o}=e;return r=h(r,"alert-link"),(0,s.jsx)(a,{ref:t,className:i()(n,r),...o})});K.displayName="AlertLink";const G=K;function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}var Q=n(950);const Y=!1,X=e.createContext(null);var Z="unmounted",ee="exited",te="entering",ne="entered",re="exiting",ae=function(t){var n,r;function a(e,n){var r;r=t.call(this,e,n)||this;var a,o=n&&!n.isMounting?e.enter:e.appear;return r.appearStatus=null,e.in?o?(a=ee,r.appearStatus=te):a=ne:a=e.unmountOnExit||e.mountOnEnter?Z:ee,r.state={status:a},r.nextCallback=null,r}r=t,(n=a).prototype=Object.create(r.prototype),n.prototype.constructor=n,J(n,r),a.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Z?{status:ee}:null};var o=a.prototype;return o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==te&&n!==ne&&(t=te):n!==te&&n!==ne||(t=re)}this.updateStatus(!1,t)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},o.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===te){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Q.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ee&&this.setState({status:Z})},o.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,a=this.props.nodeRef?[r]:[Q.findDOMNode(this),r],o=a[0],i=a[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Y?this.safeSetState({status:ne},function(){t.props.onEntered(o)}):(this.props.onEnter(o,i),this.safeSetState({status:te},function(){t.props.onEntering(o,i),t.onTransitionEnd(l,function(){t.safeSetState({status:ne},function(){t.props.onEntered(o,i)})})}))},o.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Q.findDOMNode(this);t&&!Y?(this.props.onExit(r),this.safeSetState({status:re},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:ee},function(){e.props.onExited(r)})})})):this.safeSetState({status:ee},function(){e.props.onExited(r)})},o.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},o.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},o.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Q.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=a[0],i=a[1];this.props.addEndListener(o,i)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},o.render=function(){var t=this.state.status;if(t===Z)return null;var n=this.props,r=n.children,a=(n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef,j(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return e.createElement(X.Provider,{value:null},"function"===typeof r?r(t,a):e.cloneElement(e.Children.only(r),a))},a}(e.Component);function oe(){}ae.contextType=X,ae.propTypes={},ae.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter
2:!0,exit:!0,onEnter:oe,onEntering:oe,onEntered:oe,onExit:oe,onExiting:oe,onExited:oe},ae.UNMOUNTED=Z,ae.EXITED=ee,ae.ENTERING=te,ae.ENTERED=ne,ae.EXITING=re;const ie=ae;function se(t){if(!t||"function"===typeof t)return null;const{major:n}=function(){const t=e.version.split(".");return{major:+t[0],minor:+t[1],patch:+t[2]}}();return n>=19?t.props.ref:t.ref}function le(e){return e&&e.ownerDocument||document}function ue(e,t){return function(e){var t=le(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}var ce=/([A-Z])/g;var de=/^ms-/;function fe(e){return function(e){return e.replace(ce,"-$1").toLowerCase()}(e).replace(de,"-ms-")}var he=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;const pe=function(e,t){var n="",r="";if("string"===typeof t)return e.style.getPropertyValue(fe(t))||ue(e).getPropertyValue(fe(t));Object.keys(t).forEach(function(a){var o=t[a];o||0===o?!function(e){return!(!e||!he.test(e))}(a)?n+=fe(a)+": "+o+";":r+=a+"("+o+") ":e.style.removeProperty(fe(a))}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n},me=!("undefined"===typeof window||!window.document||!window.document.createElement);var ve=!1,ge=!1;try{var ye={get passive(){return ve=!0},get once(){return ge=ve=!0}};me&&(window.addEventListener("test",ye,ye),window.removeEventListener("test",ye,!0))}catch(bi){}const be=function(e,t,n,r){if(r&&"boolean"!==typeof r&&!ge){var a=r.once,o=r.capture,i=n;!ge&&a&&(i=n.__once||function e(r){this.removeEventListener(t,e,o),n.call(this,r)},n.__once=i),e.addEventListener(t,i,ve?r:o)}e.addEventListener(t,n,r)};const we=function(e,t,n,r){var a=r&&"boolean"!==typeof r?r.capture:r;e.removeEventListener(t,n,a),n.__once&&e.removeEventListener(t,n.__once,a)};const ke=function(e,t,n,r){return be(e,t,n,r),function(){we(e,t,n,r)}};function _e(e,t,n){void 0===n&&(n=5);var r=!1,a=setTimeout(function(){r||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var a=document.createEvent("HTMLEvents");a.initEvent(t,n,r),e.dispatchEvent(a)}}(e,"transitionend",!0)},t+n),o=ke(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(a),o()}}function xe(e,t,n,r){null==n&&(n=function(e){var t=pe(e,"transitionDuration")||"",n=-1===t.indexOf("ms")?1e3:1;return parseFloat(t)*n}(e)||0);var a=_e(e,n,r),o=ke(e,"transitionend",t);return function(){a(),o()}}function Se(e,t){const n=pe(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function Ee(e,t){const n=Se(e,"transitionDuration"),r=Se(e,"transitionDelay"),a=xe(e,n=>{n.target===e&&(a(),t(n))},n+r)}const Ce=e=>e&&"function"!==typeof e?t=>{e.current=t}:e;const je=function(t,n){return(0,e.useMemo)(()=>function(e,t){const n=Ce(e),r=Ce(t);return e=>{n&&n(e),r&&r(e)}}(t,n),[t,n])};const Pe=e.forwardRef((t,n)=>{let{onEnter:r,onEntering:a,onEntered:o,onExit:i,onExiting:l,onExited:u,addEndListener:c,children:d,childRef:f,...h}=t;const p=(0,e.useRef)(null),m=je(p,f),v=e=>{var t;m((t=e)&&"setState"in t?Q.findDOMNode(t):null!=t?t:null)},g=e=>t=>{e&&p.current&&e(p.current,t)},y=(0,e.useCallback)(g(r),[r]),b=(0,e.useCallback)(g(a),[a]),w=(0,e.useCallback)(g(o),[o]),k=(0,e.useCallback)(g(i),[i]),_=(0,e.useCallback)(g(l),[l]),x=(0,e.useCallback)(g(u),[u]),S=(0,e.useCallback)(g(c),[c]);return(0,s.jsx)(ie,{ref:n,...h,onEnter:y,onEntered:w,onEntering:b,onExit:k,onExited:x,onExiting:_,addEndListener:S,nodeRef:p,children:"function"===typeof d?(e,t)=>d(e,{...t,ref:v}):e.cloneElement(d,{ref:v})})});Pe.displayName="TransitionWrapper";const Te=Pe,Re={[te]:"show",[ne]:"show"},Oe=e.forwardRef((t,n)=>{let{className:r,children:a,transitionClasses:o={},onEnter:l,...u}=t;const c={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...u},d=(0,e.useCallback)((e,t)=>{!function(e){e.offsetHeight}(e),null==l||l(e,t)},[l]);return(0,s.jsx)(Te,{ref:n,addEndListener:Ee,...c,onEnter:d,childRef:se(a),children:(t,n)=>e.cloneElement(a,{...n,className:i()("fade",r,a.props.className,Re[t],o[t])})})});Oe.displayName="Fade";const Ne=Oe;var Le=n(173),Ae=n.n(Le);const Ie={"aria-label":Ae().string,onClick:Ae().func,variant:Ae().oneOf(["white"])},De=e.forwardRef((e,t)=>
2{let{className:n,variant:r,"aria-label":a="Close",...o}=e;return(0,s.jsx)("button",{ref:t,type:"button",className:i()("btn-close",r&&`btn-close-${r}`,n),"aria-label":a,...o})});De.displayName="CloseButton",De.propTypes=Ie;const $e=De,Ue=e.forwardRef((e,t)=>{const{bsPrefix:n,show:r=!0,closeLabel:a="Close alert",closeVariant:o,className:l,children:u,variant:c="primary",onClose:d,dismissible:f,transition:p=Ne,...m}=R(e,{show:"onClose"}),v=h(n,"alert"),g=I(e=>{d&&d(!1,e)}),y=!0===p?Ne:p,b=(0,s.jsxs)("div",{role:"alert",...y?void 0:m,ref:t,className:i()(l,v,c&&`${v}-${c}`,f&&`${v}-dismissible`),children:[f&&(0,s.jsx)($e,{onClick:g,"aria-label":a,variant:o}),u]});return y?(0,s.jsx)(y,{unmountOnExit:!0,...m,ref:void 0,in:r,children:b}):r?b:null});Ue.displayName="Alert";const Me=Object.assign(Ue,{Link:G,Heading:M}),Fe=e.forwardRef((e,t)=>{let{bsPrefix:n,className:r,as:a="div",...o}=e;const l=h(n,"row"),u=p(),c=m(),d=`${l}-cols`,f=[];return u.forEach(e=>{const t=o[e];let n;delete o[e],null!=t&&"object"===typeof t?({cols:n}=t):n=t;const r=e!==c?`-${e}`:"";null!=n&&f.push(`${d}${r}-${n}`)}),(0,s.jsx)(a,{ref:t,...o,className:i()(r,l,...f)})});Fe.displayName="Row";const ze=Fe;const Be=e.forwardRef((e,t)=>{const[{className:n,...r},{as:a="div",bsPrefix:o,spans:l}]=function(e){let{as:t,bsPrefix:n,className:r,...a}=e;n=h(n,"col");const o=p(),s=m(),l=[],u=[];return o.forEach(e=>{const t=a[e];let r,o,i;delete a[e],"object"===typeof t&&null!=t?({span:r,offset:o,order:i}=t):r=t;const c=e!==s?`-${e}`:"";r&&l.push(!0===r?`${n}${c}`:`${n}${c}-${r}`),null!=i&&u.push(`order${c}-${i}`),null!=o&&u.push(`offset${c}-${o}`)}),[{...a,className:i()(r,...l,...u)},{as:t,bsPrefix:n,spans:l}]}(e);return(0,s.jsx)(a,{...r,ref:t,className:i()(n,!l.length&&o)})});Be.displayName="Col";const He=Be,qe=e.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:a="div",...o}=e;return r=h(r,"card-body"),(0,s.jsx)(a,{ref:t,className:i()(n,r),...o})});qe.displayName="CardBody";const Ve=qe,We=e.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:a="div",...o}=e;return r=h(r,"card-footer"),(0,s.jsx)(a,{ref:t,className:i()(n,r),...o})});We.displayName="CardFooter";const Ke=We,Ge=e.createContext(null);Ge.displayName="CardHeaderContext";const Je=Ge,Qe=e.forwardRef((t,n)=>{let{bsPrefix:r,className:a,as:o="div",...l}=t;const u=h(r,"card-header"),c=(0,e.useMemo)(()=>({cardHeaderBsPrefix:u}),[u]);return(0,s.jsx)(Je.Provider,{value:c,children:(0,s.jsx)(o,{ref:n,...l,className:i()(a,u)})})});Qe.displayName="CardHeader";const Ye=Qe,Xe=e.forwardRef((e,t)=>{let{bsPrefix:n,className:r,variant:a,as:o="img",...l}=e;const u=h(n,"card-img");return(0,s.jsx)(o,{ref:t,className:i()(a?`${u}-${a}`:u,r),...l})});Xe.displayName="CardImg";const Ze=Xe,et=e.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:a="div",...o}=e;return r=h(r,"card-img-overlay"),(0,s.jsx)(a,{ref:t,className:i()(n,r),...o})});et.displayName="CardImgOverlay";const tt=et,nt=e.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:a="a",...o}=e;return r=h(r,"card-link"),(0,s.jsx)(a,{ref:t,className:i()(n,r),...o})});nt.displayName="CardLink";const rt=nt,at=D("h6"),ot=e.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:a=at,...o}=e;return r=h(r,"card-subtitle"),(0,s.jsx)(a,{ref:t,className:i()(n,r),...o})});ot.displayName="CardSubtitle";const it=ot,st=e.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:a="p",...o}=e;return r=h(r,"card-text"),(0,s.jsx)(a,{ref:t,className:i()(n,r),...o})});st.displayName="CardText";const lt=st,ut=D("h5"),ct=e.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:a=ut,...o}=e;return r=h(r,"card-title"),(0,s.jsx)(a,{ref:t,className:i()(n,r),...o})});ct.displayName="CardTitle";const dt=ct,ft=e.forwardRef((e,t)=>{let{bsPrefix:n,className:r,bg:a,text:o,border:l,body:u=!1,children:c,as:d="div",...f}=e;const p=h(n,"card");return(0,s.jsx)(d,{ref:t,...f,className:i()(r,p,a&&`bg-${a}`,o&&`text-${o}`,l&&`border-${l}`),children:u?(0,s.jsx)(Ve,{children:c}):c})});ft.displayName="Card";
2const ht=Object.assign(ft,{Img:Ze,Title:dt,Subtitle:it,Body:Ve,Link:rt,Text:lt,Header:Ye,Footer:Ke,ImgOverlay:tt});var pt;function mt(e){if((!pt&&0!==pt||e)&&me){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),pt=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return pt}function vt(t){const n=function(t){const n=(0,e.useRef)(t);return n.current=t,n}(t);(0,e.useEffect)(()=>()=>n.current(),[])}function gt(e){void 0===e&&(e=le());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(bi){return e.body}}function yt(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}function bt(t){const n=function(t){const n=(0,e.useRef)(t);return n.current=t,n}(t);(0,e.useEffect)(()=>()=>n.current(),[])}function wt(e){return`data-rr-ui-${e}`}const kt=wt("modal-open");const _t=class{constructor(){let{ownerDocument:e,handleContainerOverflow:t=!0,isRTL:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.handleContainerOverflow=t,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const t={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[n]:r.style[n]},e.scrollBarWidth&&(t[n]=`${parseInt(pe(r,n)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(kt,""),pe(r,t)}reset(){[...this.modals].forEach(e=>this.remove(e))}
2removeContainerStyle(e){const t=this.getElement();t.removeAttribute(kt),Object.assign(t.style,e.style)}add(e){let t=this.modals.indexOf(e);return-1!==t?t:(t=this.modals.length,this.modals.push(e),this.setModalAttributes(e),0!==t||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),t)}remove(e){const t=this.modals.indexOf(e);-1!==t&&(this.modals.splice(t,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}},xt=(0,e.createContext)(me?window:void 0);xt.Provider;function St(){return(0,e.useContext)(xt)}const Et=(e,t)=>me?null==e?(t||le()).body:("function"===typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;const Ct=e=>e&&"function"!==typeof e?t=>{e.current=t}:e;const jt=function(t,n){return(0,e.useMemo)(()=>function(e,t){const n=Ct(e),r=Ct(t);return e=>{n&&n(e),r&&r(e)}}(t,n),[t,n])};const Pt=function(t){let{children:n,in:r,onExited:a,mountOnEnter:o,unmountOnExit:i}=t;const s=(0,e.useRef)(null),l=(0,e.useRef)(r),u=z(a);(0,e.useEffect)(()=>{r?l.current=!0:u(s.current)},[r,u]);const c=jt(s,se(n)),d=(0,e.cloneElement)(n,{ref:c});return r?d:i||!l.current&&o?null:d},Tt=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];const Rt=["component"];const Ot=e.forwardRef((t,n)=>{let{component:r}=t;const a=function(t){let{onEnter:n,onEntering:r,onEntered:a,onExit:o,onExiting:i,onExited:s,addEndListener:l,children:u}=t,c=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(t,Tt);const d=(0,e.useRef)(null),f=jt(d,se(u)),h=e=>t=>{e&&d.current&&e(d.current,t)},p=(0,e.useCallback)(h(n),[n]),m=(0,e.useCallback)(h(r),[r]),v=(0,e.useCallback)(h(a),[a]),g=(0,e.useCallback)(h(o),[o]),y=(0,e.useCallback)(h(i),[i]),b=(0,e.useCallback)(h(s),[s]),w=(0,e.useCallback)(h(l),[l]);return Object.assign({},c,{nodeRef:d},n&&{onEnter:p},r&&{onEntering:m},a&&{onEntered:v},o&&{onExit:g},i&&{onExiting:y},s&&{onExited:b},l&&{addEndListener:w},{children:"function"===typeof u?(e,t)=>u(e,Object.assign({},t,{ref:f})):(0,e.cloneElement)(u,{ref:f})})}(function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(t,Rt));return(0,s.jsx)(r,Object.assign({ref:n},a))});function Nt(t){let{children:n,in:r,onExited:a,onEntered:o,transition:i}=t;const[s,l]=(0,e.useState)(!r);r&&s&&l(!1);const u=function(t){let{in:n,onTransition:r}=t;const a=(0,e.useRef)(null),o=(0,e.useRef)(!0),i=z(r);return H(()=>{if(!a.current)return;let e=!1;return i({in:n,element:a.current,initial:o.current,isStale:()=>e}),()=>{e=!0}},[n,i]),H(()=>(o.current=!1,()=>{o.current=!0}),[]),a}({in:!!r,onTransition:e=>{Promise.resolve(i(e)).then(()=>{e.isStale()||(e.in?null==o||o(e.element,e.initial):(l(!0),null==a||a(e.element)))},t=>{throw e.in||l(!0),t})}}),c=jt(u,se(n));return s&&!r?null:(0,e.cloneElement)(n,{ref:c})}function Lt(e,t,n){return e?(0,s.jsx)(Ot,Object.assign({},n,{component:e})):t?(0,s.jsx)(Nt,Object.assign({},n,{transition:t})):(0,s.jsx)(Pt,Object.assign({},n))}const At=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];let It;function Dt(t){const n=St(),r=t||function(e){return It||(It=new _t({ownerDocument:null==e?void 0:e.document})),It}(n),a=(0,e.useRef)({dialog:null,backdrop:null});return Object.assign(a.current,{add:()=>r.add(a.current),remove:()=>r.remove(a.current),isTopModal:()=>r.isTopModal(a.current),setDialogRef:(0,e.useCallback)(e=>{a.current.dialog=e},[]),setBackdropRef:(0,e.useCallback)(e=>{a.current.backdrop=e},[])})}const $t=(0,e.forwardRef)((t,n)=>{let{show:r=!1,role:a="dialog",className:o,style:i,children:l,backdrop:u=!0,keyboard:c=!0,onBackdropClick:d,onEscapeKeyDown:f,transition:h,runTransition:p,backdropTransition:m,runBackdropTransition:v,autoFocus:g=!0,enforceFocus:y=!0,restoreFocus:b=!0,restoreFocusOptions:w,renderDialog:k,renderBackdrop:_=e=>(0,s.jsx)("div",Object.assign({},e)),manager:x,container:S,onShow:E,onHide:C=()=>{},onExit:j,onExited:P,onExiting:T,onEnter:R,onEntering:O,onEntered:N}=t,L=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(t,At);const A=St(),I=function(t,n){const r=St(),[a,o]=(0,e.useState)(()=>Et(t,null==r?void 0:r.document));if(!a){const e=Et(t);e&&o(e)}return(0,e.useEffect)(()=>{n&&a&&n(a)},[n,a]),(0,e.useEffect)(()=>{const e=Et(t);e!==a&&o(e)},[t,a]),a}(S),D=Dt(x),$=function(){const t=(0,e.useRef)(!0),n=(0,e.useRef)(()=>t.current);return(0,e.useEffect)(()=>(t.current=!0,()=>{t.current=!1}),[]),n.current}(),U=function(t){const n=(0,e.useRef)(null);return(0,e.useEffect)(()=>{n.current=t}),n.current}(r),[M,F]=(0,e.useState)(!r),B=(0,e.useRef)(null);(0,e.useImperativeHandle)(n,()=>D,[D]),me&&!U&&r&&(B.current=gt(null==A?void 0:A.document)),r&&M&&F(!1);const H=z(()=>{if(D.add(),J.current=ke(document,"keydown",K),G.current=ke(document,"focus",()=>setTimeout(V),!0),E&&E(),g){var e,t;const n=gt(null!=(e=null==(t=D.dialog)?void 0:t.ownerDocument)?e:null==A?void 0:A.document);D.dialog&&n&&!yt(D.dialog,n)&&(B.current=n,D.dialog.focus())}}),q=z(()=>{var e;(D.remove(),null==J.current||J.current(),null==G.current||G.current(),b)&&(null==(e=B.current)||null==e.focus||e.focus(w),B.current=null)});(0,e.useEffect)(()=>{r&&I&&H()},[r,I,H]),(0,e.useEffect)(()=>{M&&q()},[M,q]),bt(()=>{q()});const V=z(()=>{if(!y||!$()||!D.isTopModal())return;const e=gt(null==A?void 0:A.document);D.dialog&&e&&!yt(D.dialog,e)&&D.dialog.focus()}),W=z(e=>{e.target===e.currentTarget&&(null==d||d(e),!0===u&&C())}),K=z(e=>
2{c&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&D.isTopModal()&&(null==f||f(e),e.defaultPrevented||C())}),G=(0,e.useRef)(),J=(0,e.useRef)();if(!I)return null;const Y=Object.assign({role:a,ref:D.setDialogRef,"aria-modal":"dialog"===a||void 0},L,{style:i,className:o,tabIndex:-1});let X=k?k(Y):(0,s.jsx)("div",Object.assign({},Y,{children:e.cloneElement(l,{role:"document"})}));X=Lt(h,p,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!r,onExit:j,onExiting:T,onExited:function(){F(!0),null==P||P(...arguments)},onEnter:R,onEntering:O,onEntered:N,children:X});let Z=null;return u&&(Z=_({ref:D.setBackdropRef,onClick:W}),Z=Lt(m,v,{in:!!r,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:Z})),(0,s.jsx)(s.Fragment,{children:Q.createPortal((0,s.jsxs)(s.Fragment,{children:[Z,X]}),I)})});$t.displayName="Modal";const Ut=Object.assign($t,{Manager:_t});var Mt=Function.prototype.bind.call(Function.prototype.call,[].slice);function Ft(e,t){return Mt(e.querySelectorAll(t))}function zt(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\
2s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const Bt=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Ht=".sticky-top",qt=".navbar-toggler";class Vt extends _t{adjustAndStore(e,t,n){const r=t.style[e];t.dataset[e]=r,pe(t,{[e]:`${parseFloat(pe(t,e))+n}px`})}restore(e,t){const n=t.dataset[e];void 0!==n&&(delete t.dataset[e],pe(t,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);const t=this.getElement();var n,r;if(r="modal-open",(n=t).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"===typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)),!e.scrollBarWidth)return;const a=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";Ft(t,Bt).forEach(t=>this.adjustAndStore(a,t,e.scrollBarWidth)),Ft(t,Ht).forEach(t=>this.adjustAndStore(o,t,-e.scrollBarWidth)),Ft(t,qt).forEach(t=>this.adjustAndStore(o,t,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const t=this.getElement();var n,r;r="modal-open",(n=t).classList?n.classList.remove(r):"string"===typeof n.className?n.className=zt(n.className,r):n.setAttribute("class",zt(n.className&&n.className.baseVal||"",r));const a=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";Ft(t,Bt).forEach(e=>this.restore(a,e)),Ft(t,Ht).forEach(e=>this.restore(o,e)),Ft(t,qt).forEach(e=>this.restore(o,e))}}let Wt;const Kt=e.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:a="div",...o}=e;return r=h(r,"modal-body"),(0,s.jsx)(a,{ref:t,className:i()(n,r),...o})});Kt.displayName="ModalBody";const Gt=Kt,Jt=e.createContext({onHide(){}}),Qt=e.forwardRef((e,t)=>{let{bsPrefix:n,className:r,contentClassName:a,centered:o,size:l,fullscreen:u,children:c,scrollable:d,...f}=e;n=h(n,"modal");const p=`${n}-dialog`,m="string"===typeof u?`${n}-fullscreen-${u}`:`${n}-fullscreen`;return(0,s.jsx)("div",{...f,ref:t,className:i()(p,r,l&&`${n}-${l}`,o&&`${p}-centered`,d&&`${p}-scrollable`,u&&m),children:(0,s.jsx)("div",{className:i()(`${n}-content`,a),children:c})})});Qt.displayName="ModalDialog";const Yt=Qt,Xt=e.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:a="div",...o}=e;return r=h(r,"modal-footer"),(0,s.jsx)(a,{ref:t,className:i()(n,r),...o})});Xt.displayName="ModalFooter";const Zt=Xt,en=e.forwardRef((t,n)=>{let{closeLabel:r="Close",closeVariant:a,closeButton:o=!1,onHide:i,children:l,...u}=t;const c=(0,e.useContext)(Jt),d=I(()=>{null==c||c.onHide(),null==i||i()});return(0,s.jsxs)("div",{ref:n,...u,children:[l,o&&(0,s.jsx)($e,{"aria-label":r,variant:a,onClick:d})]})});en.displayName="AbstractModalHeader";const tn=en,nn=e.forwardRef((e,t)=>{let{bsPrefix:n,className:r,closeLabel:a="Close",closeButton:o=!1,...l}=e;return n=h(n,"modal-header"),(0,s.jsx)(tn,{ref:t,...l,className:i()(r,n),closeLabel:a,closeButton:o})});nn.displayName="ModalHeader";const rn=nn,an=D("h4"),on=e.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:a=an,...o}=e;return r=h(r,"modal-title"),(0,s.jsx)(a,{ref:t,className:i()(n,r),...o})});on.displayName="ModalTitle";const sn=on;function ln(e){return(0,s.jsx)(Ne,{...e,timeout:null})}function un(e){return(0,s.jsx)(Ne,{...e,timeout:null})}const cn=e.forwardRef((t,n)=>{let{bsPrefix:r,className:a,style:o,dialogClassName:l,contentClassName:u,children:d,dialogAs:f=Yt,"data-bs-theme":p,"aria-labelledby":m,"aria-describedby":v,"aria-label":g,show:y=!1,animation:b=!0,backdrop:w=!0,keyboard:k=!0,onEscapeKeyDown:_,onShow:x,onHide:S,container:E,autoFocus:C=!0,enforceFocus:j=!0,restoreFocus:P=!0,restoreFocusOptions:T,onEntered:R,onExit:O,onExiting:N,onEnter:L,onEntering:A,onExited:D,backdropClassName:$,manager:U,...M}=t;const[F,z]=(0,e.useState)({}),[B,H]=(0,e.useState)(!1),q=(0,e.useRef)(!1),V=(0,e.useRef)(!1),W=(0,e.useRef)(null),[K,G]=(0,e.useState)(null),J=je(n,G),Q=I(S),Y=function(){const{dir:t}=(0,e.useContext)(c);return"rtl"===t}();r=h(r,"modal");const X=(0,e.useMemo)(()=>({onHide:Q}),[Q]);function Z(){return U||function(e){return Wt||(Wt=new Vt(e)),Wt}({isRTL:Y})}function ee(e){if(!me)return;const t=Z().getScrollbarWidth()>0,n=e.scrollHeight>le(e).documentElement.clientHeight;z({paddingRight:t&&!n?mt():void 0,paddingLeft:!t&&n?mt():void 0})}const te=I(()=>{K&&ee(K.dialog)});vt(()=>{we(window,"resize",te),null==W.current||W.current()});const ne=()=>{q.current=!0},re=e=>{q.current&&K&&e.target===K.dialog&&(V.current=!0),q.current=!1},ae=()=>{H(!0),W.current=xe(K.dialog,()=>{H(!1)})},oe=e=>{"static"!==w?V.current||e.target!==e.currentTarget?V.current=!1:null==S||S():(e=>{e.target===e.currentTarget&&ae()})(e)},ie=(0,e.useCallback)(e=>(0,s.jsx)("div",{...e,className:i()(`${r}-backdrop`,$,!b&&"show")}),[b,$,r]),se={...o,...F};
2se.display="block";return(0,s.jsx)(Jt.Provider,{value:X,children:(0,s.jsx)(Ut,{show:y,ref:J,backdrop:w,container:E,keyboard:!0,autoFocus:C,enforceFocus:j,restoreFocus:P,restoreFocusOptions:T,onEscapeKeyDown:e=>{k?null==_||_(e):(e.preventDefault(),"static"===w&&ae())},onShow:x,onHide:S,onEnter:(e,t)=>{e&&ee(e),null==L||L(e,t)},onEntering:(e,t)=>{null==A||A(e,t),be(window,"resize",te)},onEntered:R,onExit:e=>{null==W.current||W.current(),null==O||O(e)},onExiting:N,onExited:e=>{e&&(e.style.display=""),null==D||D(e),we(window,"resize",te)},manager:Z(),transition:b?ln:void 0,backdropTransition:b?un:void 0,renderBackdrop:ie,renderDialog:e=>(0,s.jsx)("div",{role:"dialog",...e,style:se,className:i()(a,r,B&&`${r}-static`,!b&&"show"),onClick:w?oe:void 0,onMouseUp:re,"data-bs-theme":p,"aria-label":g,"aria-labelledby":m,"aria-describedby":v,children:(0,s.jsx)(f,{...M,onMouseDown:ne,className:l,contentClassName:u,children:d})})})})});cn.displayName="Modal";const dn=Object.assign(cn,{Body:Gt,Header:rn,Title:sn,Footer:Zt,Dialog:Yt,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),fn={type:Ae().string,tooltip:Ae().bool,as:Ae().elementType},hn=e.forwardRef((e,t)=>{let{as:n="div",className:r,type:a="valid",tooltip:o=!1,...l}=e;return(0,s.jsx)(n,{...l,ref:t,className:i()(r,`${a}-${o?"tooltip":"feedback"}`)})});hn.displayName="Feedback",hn.propTypes=fn;const pn=hn,mn=e.createContext({}),vn=e.forwardRef((t,n)=>{let{id:r,bsPrefix:a,className:o,type:l="checkbox",isValid:u=!1,isInvalid:c=!1,as:d="input",...f}=t;const{controlId:p}=(0,e.useContext)(mn);return a=h(a,"form-check-input"),(0,s.jsx)(d,{...f,ref:n,type:l,id:r||p,className:i()(o,a,u&&"is-valid",c&&"is-invalid")})});vn.displayName="FormCheckInput";const gn=vn,yn=e.forwardRef((t,n)=>{let{bsPrefix:r,className:a,htmlFor:o,...l}=t;const{controlId:u}=(0,e.useContext)(mn);return r=h(r,"form-check-label"),(0,s.jsx)("label",{...l,ref:n,htmlFor:o||u,className:i()(a,r)})});yn.displayName="FormCheckLabel";const bn=yn;const wn=e.forwardRef((t,n)=>{let{id:r,bsPrefix:a,bsSwitchPrefix:o,inline:l=!1,reverse:u=!1,disabled:c=!1,isValid:d=!1,isInvalid:f=!1,feedbackTooltip:p=!1,feedback:m,feedbackType:v,className:g,style:y,title:b="",type:w="checkbox",label:k,children:_,as:x="input",...S}=t;a=h(a,"form-check"),o=h(o,"form-switch");const{controlId:E}=(0,e.useContext)(mn),C=(0,e.useMemo)(()=>({controlId:r||E}),[E,r]),j=!_&&null!=k&&!1!==k||function(t,n){return e.Children.toArray(t).some(t=>e.isValidElement(t)&&t.type===n)}(_,bn),P=(0,s.jsx)(gn,{...S,type:"switch"===w?"checkbox":w,ref:n,isValid:d,isInvalid:f,disabled:c,as:x});return(0,s.jsx)(mn.Provider,{value:C,children:(0,s.jsx)("div",{style:y,className:i()(g,j&&a,l&&`${a}-inline`,u&&`${a}-reverse`,"switch"===w&&o),children:_||(0,s.jsxs)(s.Fragment,{children:[P,j&&(0,s.jsx)(bn,{title:b,children:k}),m&&(0,s.jsx)(pn,{type:v,tooltip:p,children:m})]})})})});wn.displayName="FormCheck";const kn=Object.assign(wn,{Input:gn,Label:bn});n(440);const _n=e.forwardRef((t,n)=>{let{bsPrefix:r,type:a,size:o,htmlSize:l,id:u,className:c,isValid:d=!1,isInvalid:f=!1,plaintext:p,readOnly:m,as:v="input",...g}=t;const{controlId:y}=(0,e.useContext)(mn);return r=h(r,"form-control"),(0,s.jsx)(v,{...g,type:a,size:l,ref:n,readOnly:m,id:u||y,className:i()(c,p?`${r}-plaintext`:r,o&&`${r}-${o}`,"color"===a&&`${r}-color`,d&&"is-valid",f&&"is-invalid")})});_n.displayName="FormControl";const xn=Object.assign(_n,{Feedback:pn}),Sn=e.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:a="div",...o}=e;return r=h(r,"form-floating"),(0,s.jsx)(a,{ref:t,className:i()(n,r),...o})});Sn.displayName="FormFloating";const En=Sn,Cn=e.forwardRef((t,n)=>{let{controlId:r,as:a="div",...o}=t;const i=(0,e.useMemo)(()=>({controlId:r}),[r]);return(0,s.jsx)(mn.Provider,{value:i,children:(0,s.jsx)(a,{...o,ref:n})})});Cn.displayName="FormGroup";const jn=Cn,Pn=e.forwardRef((t,n)=>{let{as:r="label",bsPrefix:a,column:o=!1,visuallyHidden:l=!1,className:u,htmlFor:c,...d}=t;const{controlId:f}=(0,e.useContext)(mn);a=h(a,"form-label");let p="col-form-label";"string"===typeof o&&(p=`${p} ${p}-${o}`);const m=i()(u,a,l&&"visually-hidden",o&&p);return c=c||f,o?(0,s.jsx)(He,{ref:n,as:"label",className:m,htmlFor:c,...d}):(0,s.jsx)(r,{ref:n,className:m,htmlFor:c,...d})});Pn.displayName="FormLabel";
2const Tn=Pn,Rn=e.forwardRef((t,n)=>{let{bsPrefix:r,className:a,id:o,...l}=t;const{controlId:u}=(0,e.useContext)(mn);return r=h(r,"form-range"),(0,s.jsx)("input",{...l,type:"range",ref:n,className:i()(a,r),id:o||u})});Rn.displayName="FormRange";const On=Rn,Nn=e.forwardRef((t,n)=>{let{bsPrefix:r,size:a,htmlSize:o,className:l,isValid:u=!1,isInvalid:c=!1,id:d,...f}=t;const{controlId:p}=(0,e.useContext)(mn);return r=h(r,"form-select"),(0,s.jsx)("select",{...f,size:o,ref:n,className:i()(l,r,a&&`${r}-${a}`,u&&"is-valid",c&&"is-invalid"),id:d||p})});Nn.displayName="FormSelect";const Ln=Nn,An=e.forwardRef((e,t)=>{let{bsPrefix:n,className:r,as:a="small",muted:o,...l}=e;return n=h(n,"form-text"),(0,s.jsx)(a,{...l,ref:t,className:i()(r,n,o&&"text-muted")})});An.displayName="FormText";const In=An,Dn=e.forwardRef((e,t)=>(0,s.jsx)(kn,{...e,ref:t,type:"switch"}));Dn.displayName="Switch";const $n=Object.assign(Dn,{Input:kn.Input,Label:kn.Label}),Un=e.forwardRef((e,t)=>{let{bsPrefix:n,className:r,children:a,controlId:o,label:l,...u}=e;return n=h(n,"form-floating"),(0,s.jsxs)(jn,{ref:t,className:i()(r,n),controlId:o,...u,children:[a,(0,s.jsx)("label",{htmlFor:o,children:l})]})});Un.displayName="FloatingLabel";const Mn=Un,Fn={_ref:Ae().any,validated:Ae().bool,as:Ae().elementType},zn=e.forwardRef((e,t)=>{let{className:n,validated:r,as:a="form",...o}=e;return(0,s.jsx)(a,{...o,ref:t,className:i()(n,r&&"was-validated")})});zn.displayName="Form",zn.propTypes=Fn;const Bn=Object.assign(zn,{Group:jn,Control:xn,Floating:En,Check:kn,Switch:$n,Label:Tn,Text:In,Range:On,Select:Ln,FloatingLabel:Mn});var Hn=n(140),qn=n(476);const Vn={API_BASE_URL:""},Wn=()=>{const[t,n]=(0,e.useState)([]),[r,a]=(0,e.useState)(!0),[o,i]=(0,e.useState)(null),[l,u]=(0,e.useState)(!1),[c,d]=(0,e.useState)("");(0,e.useEffect)(()=>{f()},[]);const f=async()=>{a(!0),i(null);try{const e=await fetch(`${Vn.API_BASE_URL}/api/forms`);if(!e.ok)throw new Error("Failed to fetch forms.");const t=await e.json();n(t)}catch(e){i(e instanceof Error?e.message:"An unknown error occurred.")}finally{a(!1)}},h=()=>u(!1);return(0,s.jsxs)(g,{className:"mt-5",children:[(0,s.jsxs)("div",{className:"d-flex justify-content-between align-items-center mb-4",children:[(0,s.jsx)("h1",{className:"text-white mb-0",children:"My workspace"}),(0,s.jsx)(Hn.m,{to:"/admin/form/new",children:(0,s.jsx)(x,{variant:"primary",children:"+ New formless"})})]}),(0,s.jsxs)("div",{className:"card bg-dark text-white p-4 shadow-lg rounded-3",children:[r&&(0,s.jsx)(E,{animation:"border",role:"status",className:"text-primary",children:(0,s.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),o&&(0,s.jsx)(Me,{variant:"danger",children:o}),!r&&!o&&0===t.length&&(0,s.jsx)(Me,{variant:"info",children:'No forms created yet. Click "+ New formless" to get started!'}),!r&&!o&&t.length>0&&(0,s.jsx)(ze,{xs:1,md:2,lg:3,className:"g-4",children:t.map(e=>(0,s.jsx)(He,{children:(0,s.jsxs)(ht,{bg:"secondary",text:"white",className:"h-100 shadow-sm",children:[(0,s.jsxs)(ht.Body,{children:[(0,s.jsx)(ht.Title,{children:e.name}),(0,s.jsxs)(ht.Text,{className:"text-muted small mb-2",children:["ID: ",e.id," | Created: ",new Date(e.created_at).toLocaleDateString()]}),(0,s.jsxs)(ht.Text,{children:[(0,s.jsx)("strong",{children:"Goal:"})," ",e.goal]}),(0,s.jsxs)(ht.Text,{children:[(0,s.jsx)("strong",{children:"AI Model:"})," ",e.ai_model]}),(0,s.jsxs)(ht.Text,{children:[(0,s.jsx)("strong",{children:"AI Tone:"})," ",e.ai_tone]})]}),(0,s.jsxs)(ht.Footer,{className:"d-flex justify-content-between align-items-center bg-dark border-top border-secondary",children:[(0,s.jsx)(Hn.m,{to:`/admin/form/edit/${e.id}`,children:(0,s.jsx)(x,{variant:"info",size:"sm",children:"Edit"})}),(0,s.jsx)(Hn.m,{to:`/admin/results/${e.id}`,children:(0,s.jsx)(x,{variant:"success",size:"sm",children:"Results"})}),(0,s.jsx)(x,{variant:"secondary",size:"sm",onClick:()=>(e=>{const t=`${window.location.origin}/form/${e}`;d(t),u(!0)})(e.id),children:"Share"}),(0,s.jsx)(x,{variant:"danger",size:"sm",onClick:()=>(async e=>{if(window.confirm("Are you sure you want to delete this form?"))try{if(!(await fetch(`${Vn.API_BASE_URL}/api/forms/${e}`,{method:"DELETE"})).ok)throw new Error("Failed to delete form.");f()}catch(t){i(t instanceof Error?t.message:"An unknown error occurred.")}})(e.id),children:"Delete"})]})]})},e.id))})]})," ",(0,s.jsxs)(dn,{show:l,onHide:h,centered:!0,children:[(0,s.jsx)(dn.Header,{closeButton:!0,className:"bg-dark text-white",children:(0,s.jsx)(dn.Title,{children:"Share Form Link"})}),(0,s.jsxs)(dn.Body,{className:"bg-dark text-white",children:[(0,s.jsx)("p",{children:"Copy this link to share your form:"}
2),(0,s.jsx)(Bn.Control,{type:"text",value:c,readOnly:!0,onClick:e=>e.target.select(),className:"bg-secondary text-white border-secondary"}),(0,s.jsx)(qn.CopyToClipboard,{text:c,onCopy:h,children:(0,s.jsx)(x,{variant:"primary",className:"mt-3",children:"Copy to Clipboard"})})]}),(0,s.jsx)(dn.Footer,{className:"bg-dark text-white",children:(0,s.jsx)(x,{variant:"secondary",onClick:h,children:"Close"})})]})]})},Kn=()=>{const{formId:t}=(0,a.g)(),n=(0,a.Zp)(),[r,o]=(0,e.useState)({name:"",prompt:"",question_count:5,ai_model:"gpt-4o-mini",ai_tone:"professional"}),[i,l]=(0,e.useState)(!1),[u,c]=(0,e.useState)(null),[d,f]=(0,e.useState)(null);(0,e.useEffect)(()=>{if(t){(async()=>{l(!0),c(null);try{const e=await fetch(`${Vn.API_BASE_URL}/api/forms/${t}`);if(!e.ok)throw new Error("Failed to fetch form data.");const n=await e.json();o(n)}catch(e){c(e instanceof Error?e.message:"An unknown error occurred.")}finally{l(!1)}})()}},[t]);const h=e=>{const{name:t,value:n}=e.target;o(e=>({...e,[t]:n}))};return(0,s.jsxs)(g,{className:"mt-5",children:[(0,s.jsxs)("div",{className:"d-flex justify-content-between align-items-center mb-4",children:[(0,s.jsx)("h1",{className:"text-white mb-0",children:t?"Edit Form":"Create New Form"}),(0,s.jsx)(x,{variant:"secondary",onClick:()=>n("/admin"),disabled:i,children:"\u2190 Back to Dashboard"})]}),(0,s.jsxs)("div",{className:"card bg-dark text-white p-4 shadow-lg rounded-3",children:[u&&(0,s.jsx)(Me,{variant:"danger",children:u}),d&&(0,s.jsx)(Me,{variant:"success",children:d}),(0,s.jsxs)(Bn,{onSubmit:async e=>{e.preventDefault(),l(!0),c(null),f(null);const a=t?"PUT":"POST",i=t?`${Vn.API_BASE_URL}/api/forms/${t}`:`${Vn.API_BASE_URL}/api/forms`;try{const e=await fetch(i,{method:a,headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!e.ok){const t=await e.json();throw new Error(t.detail||"Failed to save form.")}if(f(`Form ${t?"updated":"created"} successfully!`),t){const t=await e.json();o(t)}else{const t=await e.json();n(`/admin/form/edit/${t.id}`)}}catch(s){c(s instanceof Error?s.message:"An unknown error occurred.")}finally{l(!1)}},children:[(0,s.jsxs)(Bn.Group,{className:"mb-3",children:[(0,s.jsx)(Bn.Label,{children:"Form Name"}),(0,s.jsx)(Bn.Control,{type:"text",name:"name",value:r.name,onChange:h,required:!0,className:"bg-dark text-white border-secondary"})]}),(0,s.jsxs)(Bn.Group,{className:"mb-3",children:[(0,s.jsx)(Bn.Label,{children:"Custom Instructions"}),(0,s.jsx)(Bn.Control,{as:"textarea",rows:5,name:"prompt",value:r.prompt,onChange:h,required:!0,className:"bg-dark text-white border-secondary",placeholder:"Detailed instructions for the AI: What information to collect, conversation style, specific questions to ask, etc..."}),(0,s.jsx)(Bn.Text,{className:"text-muted",children:"Tell the AI exactly how to conduct the interview, what questions to ask, and what information to collect."})]}),(0,s.jsxs)(Bn.Group,{className:"mb-3",children:[(0,s.jsx)(Bn.Label,{children:"Number of Questions"}),(0,s.jsxs)(Bn.Select,{name:"question_count",value:r.question_count,onChange:h,className:"bg-dark text-white border-secondary",children:[(0,s.jsx)("option",{value:3,children:"3 Questions"}),(0,s.jsx)("option",{value:4,children:"4 Questions"}),(0,s.jsx)("option",{value:5,children:"5 Questions"}),(0,s.jsx)("option",{value:6,children:"6 Questions"}),(0,s.jsx)("option",{value:7,children:"7 Questions"}),(0,s.jsx)("option",{value:8,children:"8 Questions"}),(0,s.jsx)("option",{value:10,children:"10 Questions"})]}),(0,s.jsx)(Bn.Text,{className:"text-muted",children:"How many questions should the AI ask before concluding the interview?"})]}),(0,s.jsxs)(Bn.Group,{className:"mb-3",children:[(0,s.jsx)(Bn.Label,{children:"AI Model"}),(0,s.jsxs)(Bn.Select,{name:"ai_model",value:r.ai_model,onChange:h,className:"bg-dark text-white border-secondary",children:[(0,s.jsx)("option",{value:"gpt-4o-mini",children:"GPT-4o Mini"}),(0,s.jsx)("option",{value:"gpt-3.5-turbo",children:"GPT-3.5 Turbo"})]})]}),(0,s.jsxs)(Bn.Group,{className:"mb-3",children:[(0,s.jsx)(Bn.Label,{children:"AI Tone"}),(0,s.jsxs)(Bn.Select,{name:"ai_tone",value:r.ai_tone,onChange:h,className:"bg-dark text-white border-secondary",children:[(0,s.jsx)("option",{value:"professional",children:"Professional"}),(0,s.jsx)("option",{value:"friendly",children:"Friendly"}),(0,s.jsx)("option",{value:"casual",children:"Casual"}),(0,s.jsx)("option",{value:"formal",children:"Formal"}),(0,s.jsx)("option",{value:"enthusiastic",children:"Enthusiastic"}),(0,s.jsx)("option",{value:"empathetic",children:"Empathetic"}),(0,s.jsx)("option",{value:"direct",children:"Direct"}),(0,s.jsx)("option",{value:"conversational",children:"Conversational"}),(0,s.jsx)("option",{value:"warm",children:"Warm"}),(0,s.jsx)("option",{value:"concise",children:"Concise"})]}),(0,s.jsx)(Bn.Text,{className:"text-muted",children:"Choose the conversational tone for the AI interviewer."})]}),(0,s.jsx)(x,{variant:"primary",type:"submit",disabled:i,children:i?(0,s.jsx)(E,{as:"span",animation:"border",size:"sm"}
2):t?"Update Form":"Create Form"})]})]})," "]})},Gn=e.forwardRef((e,t)=>{let{bsPrefix:n,className:r,striped:a,bordered:o,borderless:l,hover:u,size:c,variant:d,responsive:f,...p}=e;const m=h(n,"table"),v=i()(r,m,d&&`${m}-${d}`,c&&`${m}-${c}`,a&&`${m}-${"string"===typeof a?`striped-${a}`:"striped"}`,o&&`${m}-bordered`,l&&`${m}-borderless`,u&&`${m}-hover`),g=(0,s.jsx)("table",{...p,className:v,ref:t});if(f){let e=`${m}-responsive`;return"string"===typeof f&&(e=`${e}-${f}`),(0,s.jsx)("div",{className:e,children:g})}return g});Gn.displayName="Table";const Jn=Gn,Qn=()=>{const{formId:t}=(0,a.g)(),n=(0,a.Zp)(),[r,o]=(0,e.useState)([]),[i,l]=(0,e.useState)(null),[u,c]=(0,e.useState)(!0),[d,f]=(0,e.useState)(null),h=(0,e.useCallback)(async()=>{try{const e=await fetch(`${Vn.API_BASE_URL}/api/forms/${t}`);if(!e.ok)throw new Error("Failed to fetch form details.");const n=await e.json();l(n)}catch(e){f(e instanceof Error?e.message:"An unknown error occurred while fetching form details.")}},[t]),p=(0,e.useCallback)(async()=>{c(!0),f(null);try{const e=await fetch(`${Vn.API_BASE_URL}/api/submissions?form_id=${t}`);if(!e.ok)throw new Error("Failed to fetch submissions.");const n=await e.json();o(n)}catch(e){f(e instanceof Error?e.message:"An unknown error occurred while fetching submissions.")}finally{c(!1)}},[t]);return(0,e.useEffect)(()=>{t&&(h(),p())},[t]),(0,s.jsxs)(g,{className:"mt-5",children:[(0,s.jsxs)("div",{className:"d-flex justify-content-between align-items-center mb-4",children:[(0,s.jsxs)("h1",{className:"text-white mb-0",children:["Results for Form: ",(null===i||void 0===i?void 0:i.name)||"Loading..."]}),(0,s.jsx)(x,{variant:"secondary",onClick:()=>n("/admin"),children:"\u2190 Back to Dashboard"})]}),(0,s.jsxs)("div",{className:"card bg-dark text-white p-4 shadow-lg rounded-3",children:[i&&(0,s.jsxs)("p",{className:"text-muted",children:["Goal: ",i.goal]}),u&&(0,s.jsx)(E,{animation:"border",role:"status",className:"text-primary",children:(0,s.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),d&&(0,s.jsx)(Me,{variant:"danger",children:d}),!u&&!d&&0===r.length&&(0,s.jsx)(Me,{variant:"info",children:"No submissions yet for this form."}),!u&&!d&&r.length>0&&(0,s.jsxs)(Jn,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,className:"mt-3",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"ID"}),(0,s.jsx)("th",{children:"Email"}),(0,s.jsx)("th",{children:"Summary"}),(0,s.jsx)("th",{children:"Submitted At"})]})}),(0,s.jsx)("tbody",{children:r.map(e=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:e.id}),(0,s.jsx)("td",{children:e.email||"Not provided"}),(0,s.jsx)("td",{children:(0,s.jsx)(ht,{bg:"secondary",text:"white",className:"mb-2",children:(0,s.jsx)(ht.Body,{style:{whiteSpace:"pre-wrap"},children:e.summary})})}),(0,s.jsx)("td",{children:new Date(e.created_at).toLocaleString()})]},e.id))})]})]})]})},Yn=()=>{const{formId:t}=(0,a.g)(),[n,r]=(0,e.useState)(null),[o,i]=(0,e.useState)([]),[l,u]=(0,e.useState)(""),[c,d]=(0,e.useState)(!0),[f,h]=(0,e.useState)(!1),[p,m]=(0,e.useState)(null),[v,g]=(0,e.useState)(!1),[y,b]=(0,e.useState)(!1),[w,k]=(0,e.useState)(""),_=(0,e.useRef)(!1),S=((t,n)=>{const[r,a]=(0,e.useState)("");return(0,e.useEffect)(()=>{if(!t)return void a("");a("");let e=0;const r=()=>{e<t.length&&(a(t.substring(0,e+1)),e++,setTimeout(r,n))},o=setTimeout(r,50);return()=>{clearTimeout(o)}},[t,n]),r})(w,30),C=(0,e.useCallback)(async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;console.log("PublicForm: Attempting to fetch next question. History length:",e.length),d(!0),m(null);const r=t||n;if(!r)return console.warn("PublicForm: fetchNextQuestion called but formDetails is null."),void d(!1);try{const t=await fetch(`${Vn.API_BASE_URL}/api/generate_question`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({history:e,form_id:r.id})});if(!t.ok){const e=await t.json();throw console.error("PublicForm: Failed to fetch next question. Response:",t.status,e),new Error(e.detail||"Failed to fetch the next question.")}const n=await t.json();console.log("PublicForm: Successfully fetched next question:",n),n.next_question&&(k(n.next_question),n.next_question.includes("Thank y
2ou for your time")&&b(!0),i(e=>[...e,{role:"assistant",content:n.next_question}]))}catch(a){console.error("PublicForm: Error fetching next question:",a),m(a instanceof Error?a.message:"An unknown error occurred.")}finally{d(!1)}},[n]),j=(0,e.useCallback)(async()=>{console.log("PublicForm: Attempting to fetch form details for formId:",t),d(!0),m(null);try{const e=await fetch(`${Vn.API_BASE_URL}/api/forms/${t}`);if(!e.ok){const t=await e.text();throw console.error("PublicForm: Failed to fetch form details. Response:",e.status,t),new Error(`Form not found or failed to fetch details. Status: ${e.status}`)}const n=await e.json();console.log("PublicForm: Successfully fetched form details:",n),r(n),d(!1),_.current||(_.current=!0,setTimeout(()=>C([],n),100))}catch(e){console.error("PublicForm: Error fetching form details:",e),m(e instanceof Error?e.message:"An unknown error occurred while fetching form details."),d(!1)}},[t]);(0,e.useEffect)(()=>{console.log("PublicForm: useEffect triggered with formId:",t),t&&j()},[t]);return c&&!n?(0,s.jsx)("div",{className:"public-form-page",children:(0,s.jsxs)("div",{className:"form-container text-center",children:[(0,s.jsx)(E,{animation:"border",role:"status",children:(0,s.jsx)("span",{className:"visually-hidden",children:"Loading Form..."})}),(0,s.jsx)("p",{children:"Loading form..."})]})}):p&&!n?(0,s.jsx)("div",{className:"public-form-page",children:(0,s.jsx)("div",{className:"form-container text-center",children:(0,s.jsxs)(Me,{variant:"danger",children:["Error: ",p]})})}):n?(0,s.jsx)("div",{className:"public-form-page",children:(0,s.jsxs)("div",{className:"form-container",children:[(0,s.jsx)("h1",{className:"question "+(v?"question-inactive":""),children:S}),y?(0,s.jsxs)("div",{className:"text-center mt-5",children:[(0,s.jsx)("h2",{className:"text-success",children:"Conversation Complete!"}),(0,s.jsx)("p",{children:"Thank you for your responses."}),(0,s.jsx)(x,{variant:"primary",onClick:()=>window.location.reload(),children:"Start New Conversation"})]}):(0,s.jsxs)(Bn,{onSubmit:async e=>{if(e.preventDefault(),console.log("Form submitted with answer:",l),!l.trim()||y||f)return;h(!0);const t=[...o,{role:"user",content:l}];console.log("New history:",t),i(t),u("");try{await C(t)}catch(p){console.error("Error in handleAnswerSubmit:",p)}finally{h(!1)}},children:[(0,s.jsx)(Bn.Control,{as:"textarea",rows:2,placeholder:"Type your answer here...",value:l,onChange:e=>u(e.target.value),onFocus:()=>g(!0),onBlur:()=>g(""!==l.trim()),disabled:f,required:!0,className:"form-control"}),p&&(0,s.jsx)(Me,{variant:"danger",className:"mt-3",children:p}),(0,s.jsx)(x,{className:"btn-next",type:"submit",disabled:f,children:f?(0,s.jsx)(E,{as:"span",animation:"border",size:"sm"}):"Next \u2192"})]})]})}):(0,s.jsx)("div",{className:"public-form-page",children:(0,s.jsx)("div",{className:"form-container text-center",children:(0,s.jsx)(Me,{variant:"warning",children:"Form not found or invalid ID."})})})};const Xn=e.createContext(null);Xn.displayName="NavContext";const Zn=Xn,er=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null!=e?String(e):t||null},tr=e.createContext(null),nr=e.createContext(null),rr=["as","active","eventKey"];function ar(t){let{key:n,onClick:r,active:a,id:o,role:i,disabled:s}=t;const l=(0,e.useContext)(tr),u=(0,e.useContext)(Zn),c=(0,e.useContext)(nr);let d=a;const f={role:i};if(u){i||"tablist"!==u.role||(f.role="tab");const e=u.getControllerId(null!=n?n:null),t=u.getControlledId(null!=n?n:null);f[wt("event-key")]=n,f.id=e||o,d=null==a&&null!=n?u.activeKey===n:a,!d&&(null!=c&&c.unmountOnExit||null!=c&&c.mountOnEnter)||(f["aria-controls"]=t)}return"tab"===f.role&&(f["aria-selected"]=d,d||(f.tabIndex=-1),s&&(f.tabIndex=-1,f["aria-disabled"]=!0)),f.onClick=z(e=>{s||(null==r||r(e),null!=n&&l&&!e.isPropagationStopped()&&l(n,e))}),[f,{isActive:d}]}const or=e.forwardRef((e,t)=>{let{as:n=k,active:r,eventKey:a}=e,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,rr);const[i,l]=ar(Object.assign({key:er(a,o.href),active:r},o));return i[wt("active")]=l.isActive,(0,s.jsx)(n,Object.assign({},o,i,{ref:t}))});or.displayName="NavItem";
2const ir=or,sr=["as","onSelect","activeKey","role","onKeyDown"];const lr=()=>{},ur=wt("event-key"),cr=e.forwardRef((t,n)=>{let{as:r="div",onSelect:a,activeKey:o,role:i,onKeyDown:l}=t,u=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(t,sr);const c=function(){const[,t]=(0,e.useReducer)(e=>e+1,0);return t}(),d=(0,e.useRef)(!1),f=(0,e.useContext)(tr),h=(0,e.useContext)(nr);let p,m;h&&(i=i||"tablist",o=h.activeKey,p=h.getControlledId,m=h.getControllerId);const v=(0,e.useRef)(null),g=e=>{const t=v.current;if(!t)return null;const n=Ft(t,`[${ur}]:not([aria-disabled=true])`),r=t.querySelector("[aria-selected=true]");if(!r||r!==document.activeElement)return null;const a=n.indexOf(r);if(-1===a)return null;let o=a+e;return o>=n.length&&(o=0),o<0&&(o=n.length-1),n[o]},y=(e,t)=>{null!=e&&(null==a||a(e,t),null==f||f(e,t))};(0,e.useEffect)(()=>{if(v.current&&d.current){const e=v.current.querySelector(`[${ur}][aria-selected=true]`);null==e||e.focus()}d.current=!1});const b=jt(n,v);return(0,s.jsx)(tr.Provider,{value:y,children:(0,s.jsx)(Zn.Provider,{value:{role:i,activeKey:er(o),getControlledId:p||lr,getControllerId:m||lr},children:(0,s.jsx)(r,Object.assign({},u,{onKeyDown:e=>{if(null==l||l(e),!h)return;let t;switch(e.key){case"ArrowLeft":case"ArrowUp":t=g(-1);break;case"ArrowRight":case"ArrowDown":t=g(1);break;default:return}var n;t&&(e.preventDefault(),y(t.dataset[(n="EventKey",`rrUi${n}`)]||null,e),d.current=!0,c())},ref:b,role:i}))})})});cr.displayName="Nav";const dr=Object.assign(cr,{Item:ir}),fr=e.createContext(null);fr.displayName="NavbarContext";const hr=fr,pr=e.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:a="div",...o}=e;return r=h(r,"nav-item"),(0,s.jsx)(a,{ref:t,className:i()(n,r),...o})});pr.displayName="NavItem";const mr=pr,vr=e.forwardRef((e,t)=>{let{bsPrefix:n,className:r,as:a=W,active:o,eventKey:l,disabled:u=!1,...c}=e;n=h(n,"nav-link");const[d,f]=ar({key:er(l,c.href),active:o,disabled:u,...c});return(0,s.jsx)(a,{...c,...d,ref:t,disabled:u,className:i()(r,n,u&&"disabled",f.isActive&&"active")})});vr.displayName="NavLink";const gr=vr,yr=e.forwardRef((t,n)=>{const{as:r="div",bsPrefix:a,variant:o,fill:l=!1,justify:u=!1,navbar:c,navbarScroll:d,className:f,activeKey:p,...m}=R(t,{activeKey:"onSelect"}),v=h(a,"nav");let g,y,b=!1;const w=(0,e.useContext)(hr),k=(0,e.useContext)(Je);return w?(g=w.bsPrefix,b=null==c||c):k&&({cardHeaderBsPrefix:y}=k),(0,s.jsx)(dr,{as:r,ref:n,activeKey:p,className:i()(f,{[v]:!b,[`${g}-nav`]:b,[`${g}-nav-scroll`]:b&&d,[`${y}-${o}`]:!!y,[`${v}-${o}`]:!!o,[`${v}-fill`]:l,[`${v}-justified`]:u}),...m})});yr.displayName="Nav";const br=Object.assign(yr,{Item:mr,Link:gr});class wr extends Error{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"FunctionsError",n=arguments.length>2?arguments[2]:void 0;super(e),this.name=t,this.context=n}}class kr extends wr{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class _r extends wr{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class xr extends wr{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Sr;!function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"}(Sr||(Sr={}));var Er=function(e,t,n,r){return new(n||(n=Promise))(function(a,o){function i(e){try{l(r.next(e))}catch(bi){o(bi)}}function s(e){try{l(r.throw(e))}catch(bi){o(bi)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,s)}l((r=r.apply(e,t||[])).next())})};class Cr{constructor(e){let{headers:t={},customFetch:r,region:a=Sr.Any}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.url=e,this.headers=t,this.region=a,this.fetch=(e=>{let t;return t=e||("undefined"===typeof fetch?function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Promise.resolve().then(n.bind(n,630)).then(e=>{let{default:n}=e;return n(...t)})}:fetch),function(){return t(...arguments)}})(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;return Er(this,void 0,void 0,function*(){try{const{headers:r,method:a,body:o}=t;let i={},{region:s}=t;s||(s=this.region);const l=new URL(`${this.url}/${e}`);let u;s&&"any"!==s&&(i["x-region"]=s,l.searchParams.set("forceFunctionRegion",s)),o&&(r&&!Object.prototype.hasOwnProperty.call(r,"Content-Type")||!r)&&("undefined"!==typeof Blob&&o instanceof Blob||o instanceof ArrayBuffer?(i["Content-Type"]="application/octet-stream",u=o):"string"===typeof o?(i["Content-Type"]="text/plain",u=o):"undefined"!==typeof FormData&&o instanceof FormData?u=o:(i["Content-Type"]="application/json",u=JSON.stringify(o)));const c=yield this.fetch(l.toString(),{method:a||"POST",headers:Object.assign(Object.assign(Object.assign({},i),this.headers),r),body:u}).catch(e=>{throw new kr(e)}
2),d=c.headers.get("x-relay-error");if(d&&"true"===d)throw new _r(c);if(!c.ok)throw new xr(c);let f,h=(null!==(n=c.headers.get("Content-Type"))&&void 0!==n?n:"text/plain").split(";")[0].trim();return f="application/json"===h?yield c.json():"application/octet-stream"===h?yield c.blob():"text/event-stream"===h?c:"multipart/form-data"===h?yield c.formData():yield c.text(),{data:f,error:null,response:c}}catch(r){return{data:null,error:r,response:r instanceof xr||r instanceof _r?r.context:void 0}}})}}var jr=n(980);const{PostgrestClient:Pr,PostgrestQueryBuilder:Tr,PostgrestFilterBuilder:Rr,PostgrestTransformBuilder:Or,PostgrestBuilder:Nr,PostgrestError:Lr}=jr;const Ar=function(){if("undefined"!==typeof WebSocket)return WebSocket;if("undefined"!==typeof global.WebSocket)return global.WebSocket;if("undefined"!==typeof window.WebSocket)return window.WebSocket;if("undefined"!==typeof self.WebSocket)return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}();var Ir,Dr,$r,Ur,Mr,Fr;!function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"}(Ir||(Ir={})),function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"}(Dr||(Dr={})),function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"}($r||($r={})),function(e){e.websocket="websocket"}(Ur||(Ur={})),function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"}(Mr||(Mr={}));class zr{constructor(){this.HEADER_LENGTH=1}decode(e,t){return e.constructor===ArrayBuffer?t(this._binaryDecode(e)):t("string"===typeof e?JSON.parse(e):{})}_binaryDecode(e){const t=new DataView(e),n=new TextDecoder;return this._decodeBroadcast(e,t,n)}_decodeBroadcast(e,t,n){const r=t.getUint8(1),a=t.getUint8(2);let o=this.HEADER_LENGTH+2;const i=n.decode(e.slice(o,o+r));o+=r;const s=n.decode(e.slice(o,o+a));o+=a;return{ref:null,topic:i,event:s,payload:JSON.parse(n.decode(e.slice(o,e.byteLength)))}}}class Br{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}!function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"}(Fr||(Fr={}));const Hr=function(e,t){var n;const r=null!==(n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).skipTypes)&&void 0!==n?n:[];return Object.keys(t).reduce((n,a)=>(n[a]=qr(a,e,t,r),n),{})},qr=(e,t,n,r)=>{const a=t.find(t=>t.name===e),o=null===a||void 0===a?void 0:a.type,i=n[e];return o&&!r.includes(o)?Vr(o,i):Wr(i)},Vr=(e,t)=>{if("_"===e.charAt(0)){const n=e.slice(1,e.length);return Qr(t,n)}switch(e){case Fr.bool:return Kr(t);case Fr.float4:case Fr.float8:case Fr.int2:case Fr.int4:case Fr.int8:case Fr.numeric:case Fr.oid:return Gr(t);case Fr.json:case Fr.jsonb:return Jr(t);case Fr.timestamp:return Yr(t);case Fr.abstime:case Fr.date:case Fr.daterange:case Fr.int4range:case Fr.int8range:case Fr.money:case Fr.reltime:case Fr.text:case Fr.time:case Fr.timestamptz:case Fr.timetz:case Fr.tsrange:case Fr.tstzrange:default:return Wr(t)}},Wr=e=>e,Kr=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},Gr=e=>{if("string"===typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},Jr=e=>{if("string"===typeof e)try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},Qr=(e,t)=>{if("string"!==typeof e)return e;const n=e.length-1,r=e[n];if("{"===e[0]&&"}"===r){let r;const o=e.slice(1,n);try{r=JSON.parse("["+o+"]")}catch(a){r=o?o.split(","):[]}return r.map(e=>
2Vr(t,e))}return e},Yr=e=>"string"===typeof e?e.replace(" ","T"):e,Xr=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")};class Zr{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e4;this.channel=e,this.event=t,this.payload=n,this.timeout=r,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){var n;return this._hasReceived(e)&&t(null===(n=this.receivedResp)||void 0===n?void 0:n.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);this.channel._on(this.refEvent,{},e=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=e,this._matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive(e){let{status:t,response:n}=e;this.recHooks.filter(e=>e.status===t).forEach(e=>e.callback(n))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var ea,ta,na,ra;!function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"}(ea||(ea={}));class aa{constructor(e,t){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(null===t||void 0===t?void 0:t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},e=>{const{onJoin:t,onLeave:n,onSync:r}=this.caller;this.joinRef=this.channel._joinRef(),this.state=aa.syncState(this.state,e,t,n),this.pendingDiffs.forEach(e=>{this.state=aa.syncDiff(this.state,e,t,n)}),this.pendingDiffs=[],r()}),this.channel._on(n.diff,{},e=>{const{onJoin:t,onLeave:n,onSync:r}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(e):(this.state=aa.syncDiff(this.state,e,t,n),r())}),this.onJoin((e,t,n)=>{this.channel._trigger("presence",{event:"join",key:e,currentPresences:t,newPresences:n})}),this.onLeave((e,t,n)=>{this.channel._trigger("presence",{event:"leave",key:e,currentPresences:t,leftPresences:n})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,t,n,r){const a=this.cloneDeep(e),o=this.transformState(t),i={},s={};return this.map(a,(e,t)=>{o[e]||(s[e]=t)}),this.map(o,(e,t)=>{const n=a[e];if(n){const r=t.map(e=>e.presence_ref),a=n.map(e=>e.presence_ref),o=t.filter(e=>a.indexOf(e.presence_ref)<0),l=n.filter(e=>r.indexOf(e.presence_ref)<0);o.length>0&&(i[e]=o),l.length>0&&(s[e]=l)}else i[e]=t}),this.syncDiff(a,{joins:i,leaves:s},n,r)}static syncDiff(e,t,n,r){const{joins:a,leaves:o}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return n||(n=()=>{}),r||(r=()=>{}),this.map(a,(t,r)=>{var a;const o=null!==(a=e[t])&&void 0!==a?a:[];if(e[t]=this.cloneDeep(r),o.length>0){const n=e[t].map(e=>e.presence_ref),r=o.filter(e=>n.indexOf(e.presence_ref)<0);e[t].unshift(...r)}n(t,o,r)}),this.map(o,(t,n)=>{let a=e[t];if(!a)return;const o=n.map(e=>e.presence_ref);a=a.filter(e=>o.indexOf(e.presence_ref)<0),e[t]=a,r(t,a,n),0===a.length&&delete e[t]}),e}static map(e,t){return Object.getOwnPropertyNames(e).map(n=>t(n,e[n]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((t,n)=>{const r=e[n];return t[n]="metas"in r?r.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e)):r,t},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}!function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"}(ta||(ta={})),function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"}(na||(na={})),function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"}(ra||(ra={}));class oa{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{config:{}},n=arguments.length>2?arguments[2]:void 0;this.topic=e,this.params=t,this.socket=n,this.bindings={},this.state=Dr.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},t.config),this.timeout=this.socket.timeout,this.joinPush=new Zr(this,$r.join,this.params,this.timeout),this.rejoinTimer=new Br(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Dr.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e
2=>e.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Dr.closed,this.socket._remove(this)}),this._onError(e=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,e),this.state=Dr.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Dr.errored,this.rejoinTimer.scheduleTimeout())}),this._on($r.reply,{},(e,t)=>{this._trigger(this._replyEventName(t),e)}),this.presence=new aa(this),this.broadcastEndpointURL=Xr(this.socket.endPoint)+"/api/broadcast",this.private=this.params.config.private||!1}subscribe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.timeout;var n,r;if(this.socket.isConnected()||this.socket.connect(),this.state==Dr.closed){const{config:{broadcast:a,presence:o,private:i}}=this.params;this._onError(t=>null===e||void 0===e?void 0:e(ra.CHANNEL_ERROR,t)),this._onClose(()=>null===e||void 0===e?void 0:e(ra.CLOSED));const s={},l={broadcast:a,presence:o,postgres_changes:null!==(r=null===(n=this.bindings.postgres_changes)||void 0===n?void 0:n.map(e=>e.filter))&&void 0!==r?r:[],private:i};this.socket.accessTokenValue&&(s.access_token=this.socket.accessTokenValue),this.updateJoinPayload(Object.assign({config:l},s)),this.joinedOnce=!0,this._rejoin(t),this.joinPush.receive("ok",async t=>{let{postgres_changes:n}=t;var r;if(this.socket.setAuth(),void 0!==n){const t=this.bindings.postgres_changes,a=null!==(r=null===t||void 0===t?void 0:t.length)&&void 0!==r?r:0,o=[];for(let r=0;r<a;r++){const a=t[r],{filter:{event:i,schema:s,table:l,filter:u}}=a,c=n&&n[r];if(!c||c.event!==i||c.schema!==s||c.table!==l||c.filter!==u)return this.unsubscribe(),this.state=Dr.errored,void(null===e||void 0===e||e(ra.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes")));o.push(Object.assign(Object.assign({},a),{id:c.id}))}return this.bindings.postgres_changes=o,void(e&&e(ra.SUBSCRIBED))}null===e||void 0===e||e(ra.SUBSCRIBED)}).receive("error",t=>{this.state=Dr.errored,null===e||void 0===e||e(ra.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(t).join(", ")||"error")))}).receive("timeout",()=>{null===e||void 0===e||e(ra.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)}async untrack(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return await this.send({type:"presence",event:"untrack"},e)}on(e,t,n){return this._on(e,t,n)}async send(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,r;if(this._canPush()||"broadcast"!==e.type)return new Promise(n=>{var r,a,o;const i=this._push(e.type,e,t.timeout||this.timeout);"broadcast"!==e.type||(null===(o=null===(a=null===(r=this.params)||void 0===r?void 0:r.config)||void 0===a?void 0:a.broadcast)||void 0===o?void 0:o.ack)||n("ok"),i.receive("ok",()=>n("ok")),i.receive("error",()=>n("error")),i.receive("timeout",()=>n("timed out"))});{const{event:o,payload:i}=e,s={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:i,private:this.private}]})};try{const e=await this._fetchWithTimeout(this.broadcastEndpointURL,s,null!==(n=t.timeout)&&void 0!==n?n:this.timeout);return await(null===(r=e.body)||void 0===r?void 0:r.cancel()),e.ok?"ok":"error"}catch(a){return"AbortError"===a.name?"timed out":"error"}}}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.state=Dr.leaving;const t=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger($r.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(r=>{n=new Zr(this,$r.leave,{},e),n.receive("ok",()=>{t(),r("ok")}).receive("timeout",()=>{t(),r("timed out")}).receive("error",()=>{r("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{null===n||void 0===n||n.destroy()})}
2teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.rejoinTimer&&clearTimeout(this.rejoinTimer.timer),this.joinPush.destroy()}async _fetchWithTimeout(e,t,n){const r=new AbortController,a=setTimeout(()=>r.abort(),n),o=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:r.signal}));return clearTimeout(a),o}_push(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.timeout;if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let r=new Zr(this,e,t,n);return this._canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}_onMessage(e,t,n){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,n){var r,a;const o=e.toLocaleLowerCase(),{close:i,error:s,leave:l,join:u}=$r;if(n&&[i,s,l,u].indexOf(o)>=0&&n!==this._joinRef())return;let c=this._onMessage(o,t,n);if(t&&!c)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?null===(r=this.bindings.postgres_changes)||void 0===r||r.filter(e=>{var t,n,r;return"*"===(null===(t=e.filter)||void 0===t?void 0:t.event)||(null===(r=null===(n=e.filter)||void 0===n?void 0:n.event)||void 0===r?void 0:r.toLocaleLowerCase())===o}).map(e=>e.callback(c,n)):null===(a=this.bindings[o])||void 0===a||a.filter(e=>{var n,r,a,i,s,l;if(["broadcast","presence","postgres_changes"].includes(o)){if("id"in e){const o=e.id,i=null===(n=e.filter)||void 0===n?void 0:n.event;return o&&(null===(r=t.ids)||void 0===r?void 0:r.includes(o))&&("*"===i||(null===i||void 0===i?void 0:i.toLocaleLowerCase())===(null===(a=t.data)||void 0===a?void 0:a.type.toLocaleLowerCase()))}{const n=null===(s=null===(i=null===e||void 0===e?void 0:e.filter)||void 0===i?void 0:i.event)||void 0===s?void 0:s.toLocaleLowerCase();return"*"===n||n===(null===(l=null===t||void 0===t?void 0:t.event)||void 0===l?void 0:l.toLocaleLowerCase())}}return e.type.toLocaleLowerCase()===o}).map(e=>{if("object"===typeof c&&"ids"in c){const e=c.data,{schema:t,table:n,commit_timestamp:r,type:a,errors:o}=e,i={schema:t,table:n,commit_timestamp:r,eventType:a,new:{},old:{},errors:o};c=Object.assign(Object.assign({},i),this._getPayloadRecords(e))}e.callback(c,n)})}_isClosed(){return this.state===Dr.closed}_isJoined(){return this.state===Dr.joined}_isJoining(){return this.state===Dr.joining}_isLeaving(){return this.state===Dr.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,t,n){const r=e.toLocaleLowerCase(),a={type:r,filter:t,callback:n};return this.bindings[r]?this.bindings[r].push(a):this.bindings[r]=[a],this}_off(e,t){const n=e.toLocaleLowerCase();return this.bindings[n]=this.bindings[n].filter(e=>{var r;return!((null===(r=e.type)||void 0===r?void 0:r.toLocaleLowerCase())===n&&oa.isEqual(e.filter,t))}),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on($r.close,{},e)}_onError(e){this._on($r.error,{},t=>e(t))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Dr.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const t={new:{},old:{}};return"INSERT"!==e.type&&"UPDATE"!==e.type||(t.new=Hr(e.columns,e.record)),"UPDATE"!==e.type&&"DELETE"!==e.type||(t.old=Hr(e.columns,e.old_record)),t}}const ia=()=>{};class sa{constructor(e,t){var r;this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=1e4,this.heartbeatIntervalMs=25e3,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=ia,this.ref=0,this.logger=ia,this.conn=null,this.sendBuffer=[],this.serializer=new zr,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._resolveFetch=e=>{let t;return t=e||("undefined"===typeof fetch?function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Promise.resolve().then(n.bind(n,630)).then(e=>{let{default:n}=e;return n(...t)})}:fetch),function(){return t(...arguments)}},this.endPoint=`${e}/${Ur.websocket}`,this.httpEndpoint=Xr(e),(null===t||void 0===t?void 0:t.transport)?this.transport=t.transport:this.transport=null,(null===t||void 0===t?void 0:t.params)&&(this.params=t.params),(null===t||void 0===t?void 0:t.t
2imeout)&&(this.timeout=t.timeout),(null===t||void 0===t?void 0:t.logger)&&(this.logger=t.logger),((null===t||void 0===t?void 0:t.logLevel)||(null===t||void 0===t?void 0:t.log_level))&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),(null===t||void 0===t?void 0:t.heartbeatIntervalMs)&&(this.heartbeatIntervalMs=t.heartbeatIntervalMs);const a=null===(r=null===t||void 0===t?void 0:t.params)||void 0===r?void 0:r.apikey;if(a&&(this.accessTokenValue=a,this.apiKey=a),this.reconnectAfterMs=(null===t||void 0===t?void 0:t.reconnectAfterMs)?t.reconnectAfterMs:e=>[1e3,2e3,5e3,1e4][e-1]||1e4,this.encode=(null===t||void 0===t?void 0:t.encode)?t.encode:(e,t)=>t(JSON.stringify(e)),this.decode=(null===t||void 0===t?void 0:t.decode)?t.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new Br(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(null===t||void 0===t?void 0:t.fetch),null===t||void 0===t?void 0:t.worker){if("undefined"!==typeof window&&!window.Worker)throw new Error("Web Worker is not supported");this.worker=(null===t||void 0===t?void 0:t.worker)||!1,this.workerUrl=null===t||void 0===t?void 0:t.workerUrl}this.accessToken=(null===t||void 0===t?void 0:t.accessToken)||null}connect(){if(!this.conn){if(this.transport||(this.transport=Ar),!this.transport)throw new Error("No transport provided");this.conn=new this.transport(this.endpointURL()),this.setupConnection()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:"1.0.0"}))}disconnect(e,t){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,null!==t&&void 0!==t?t:""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset(),this.channels.forEach(e=>e.teardown()))}getChannels(){return this.channels}async removeChannel(e){const t=await e.unsubscribe();return 0===this.channels.length&&this.disconnect(),t}async removeAllChannels(){const e=await Promise.all(this.channels.map(e=>e.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,t,n){this.logger(e,t,n)}connectionState(){switch(this.conn&&this.conn.readyState){case Ir.connecting:return Mr.Connecting;case Ir.open:return Mr.Open;case Ir.closing:return Mr.Closing;default:return Mr.Closed}}isConnected(){return this.connectionState()===Mr.Open}channel(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{config:{}};const n=`realtime:${e}`,r=this.getChannels().find(e=>e.topic===n);if(r)return r;{const n=new oa(`realtime:${e}`,t,this);return this.channels.push(n),n}}push(e){const{topic:t,event:n,payload:r,ref:a}=e,o=()=>{this.encode(e,e=>{var t;null===(t=this.conn)||void 0===t||t.send(e)})};this.log("push",`${t} ${n} (${a})`,r),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(){let e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)||this.accessToken&&await this.accessToken()||this.accessTokenValue;this.accessTokenValue!=e&&(this.accessTokenValue=e,this.channels.forEach(t=>{const n={access_token:e,version:"realtime-js/2.11.15"};e&&t.updateJoinPayload(n),t.joinedOnce&&t._isJoined()&&t._push($r.access_token,{access_token:e})}))}async sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef)return this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.heartbeatCallback("timeout"),void(null===(e=this.conn)||void 0===e||e.close(1e3,"hearbeat timeout"));this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatCallback("sent"),await this.setAuth()}else this.heartbeatCallback("disconnected")}onHeartbeat(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t._isJoined()||t._isJoining()));t&&(this.log("transport",`leaving duplicate topic "${e}"`),t.unsubscribe())}_remove(e){this.channels=this.channels.filter(t=>t.topic!==e.topic)}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>
2this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_onConnMessage(e){this.decode(e.data,e=>{let{topic:t,event:n,payload:r,ref:a}=e;"phoenix"===t&&"phx_reply"===n&&this.heartbeatCallback("ok"==e.payload.status?"ok":"error"),a&&a===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null),this.log("receive",`${r.status||""} ${t} ${n} ${a&&"("+a+")"||""}`,r),Array.from(this.channels).filter(e=>e._isMember(t)).forEach(e=>e._trigger(n,r,a)),this.stateChangeCallbacks.message.forEach(t=>t(e))})}_onConnOpen(){this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this.reconnectTimer.reset(),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this.stateChangeCallbacks.open.forEach(e=>e())}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=e=>{this.log("worker","worker error",e.message),this.workerRef.terminate()},this.workerRef.onmessage=e=>{"keepAlive"===e.data.event&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(t=>t(e))}_onConnError(e){this.log("transport",`${e}`),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(t=>t(e))}_triggerChanError(){this.channels.forEach(e=>e._trigger($r.error))}_appendParams(e,t){if(0===Object.keys(t).length)return e;const n=e.match(/\?/)?"&":"?";return`${e}${n}${new URLSearchParams(t)}`}_workerObjectUrl(e){let t;if(e)t=e;else{const e=new Blob(['\n  addEventListener("message", (e) => {\n    if (e.data.event === "start") {\n      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);\n    }\n  });'],{type:"application/javascript"});t=URL.createObjectURL(e)}return t}}
2class la extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function ua(e){return"object"===typeof e&&null!==e&&"__isStorageError"in e}class ca extends la{constructor(e,t,n){super(e),this.name="StorageApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class da extends la{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}var fa=function(e,t,n,r){return new(n||(n=Promise))(function(a,o){function i(e){try{l(r.next(e))}catch(bi){o(bi)}}function s(e){try{l(r.throw(e))}catch(bi){o(bi)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,s)}l((r=r.apply(e,t||[])).next())})};const ha=e=>{let t;return t=e||("undefined"===typeof fetch?function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Promise.resolve().then(n.bind(n,630)).then(e=>{let{default:n}=e;return n(...t)})}:fetch),function(){return t(...arguments)}},pa=e=>{if(Array.isArray(e))return e.map(e=>pa(e));if("function"===typeof e||e!==Object(e))return e;const t={};return Object.entries(e).forEach(e=>{let[n,r]=e;const a=n.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace(/[-_]/g,""));t[a]=pa(r)}),t};var ma=function(e,t,n,r){return new(n||(n=Promise))(function(a,o){function i(e){try{l(r.next(e))}catch(bi){o(bi)}}function s(e){try{l(r.throw(e))}catch(bi){o(bi)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,s)}l((r=r.apply(e,t||[])).next())})};const va=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),ga=(e,t,r)=>ma(void 0,void 0,void 0,function*(){const a=yield fa(void 0,void 0,void 0,function*(){return"undefined"===typeof Response?(yield Promise.resolve().then(n.bind(n,630))).Response:Response});e instanceof a&&!(null===r||void 0===r?void 0:r.noResolveJson)?e.json().then(n=>{const r=e.status||500,a=(null===n||void 0===n?void 0:n.statusCode)||r+"";t(new ca(va(n),r,a))}).catch(e=>{t(new da(va(e),e))}):t(new da(va(e),e))}),ya=(e,t,n,r)=>{const a={method:e,headers:(null===t||void 0===t?void 0:t.headers)||{}};return"GET"!==e&&r?((e=>{if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)})(r)?(a.headers=Object.assign({"Content-Type":"application/json"},null===t||void 0===t?void 0:t.headers),a.body=JSON.stringify(r)):a.body=r,Object.assign(Object.assign({},a),n)):a};function ba(e,t,n,r,a,o){return ma(this,void 0,void 0,function*(){return new Promise((i,s)=>{e(n,ya(t,r,a,o)).then(e=>{if(!e.ok)throw e;return(null===r||void 0===r?void 0:r.noResolveJson)?e:e.json()}).then(e=>i(e)).catch(e=>ga(e,s,r))})})}function wa(e,t,n,r){return ma(this,void 0,void 0,function*(){return ba(e,"GET",t,n,r)})}function ka(e,t,n,r,a){return ma(this,void 0,void 0,function*(){return ba(e,"POST",t,r,a,n)})}function _a(e,t,n,r,a){return ma(this,void 0,void 0,function*(){return ba(e,"PUT",t,r,a,n)})}function xa(e,t,n,r,a){return ma(this,void 0,void 0,function*(){return ba(e,"DELETE",t,r,a,n)})}var Sa=function(e,t,n,r){return new(n||(n=Promise))(function(a,o){function i(e){try{l(r.next(e))}catch(bi){o(bi)}}function s(e){try{l(r.throw(e))}catch(bi){o(bi)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,s)}l((r=r.apply(e,t||[])).next())})};const Ea={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Ca={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class ja{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;this.url=e,this.headers=t,this.bucketId=n,this.fetch=ha(r)}uploadOrUpdate(e,t,n,r){return Sa(this,void 0,void 0,function*(){try{let a;const o=Object.assign(Object.assign({},Ca),r);let i=Object.assign(Object.assign({},this.headers),"POST"===e&&{"x-upsert":String(o.upsert)});const s=o.metadata;"undefined"!==typeof Blob&&n instanceof Blob?(a=new FormData,a.append("cacheControl",o.cacheControl),s&&a.append("metadata",this.encodeMetadata(s)),a.append("",n)):"undefined"!==typeof FormData&&n instanceof FormData?(a=n,a.append("cacheControl",o.cacheControl),s&&a.append("metadata",this.encodeMetadata(s))):(a=n,i["cache-control"]=`max-age=${o.cacheControl}`,i["content-type"]=o.contentType,s&&(i["x-metadata"]=this.toBase64(this.encodeMetadata(s)))),(null===r||void 0===r?void 0:r.headers)&&(i=Object.assign(Object.assign({},i),r.headers));const l=this._removeEmptyFolders(t),u=this._getFinalPath(l),c=yield("PUT"==e?_a:ka)(this.fetch,`${this.url}/object/${u}`,a,Object.assign({headers:i},(null===o||void 0===o?void 0:o.duplex)?{duplex:o.duplex}:{}));return{data:{path:l,id:c.Id,fullPath:c.Key},error:null}}catch(a){if(ua(a))return{data:null,error:a};throw a}})}upload(e,t,n){return Sa(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,t,n)})}uploadToSignedUrl(e,t,n,r){return Sa(this,void 0,void 0,function*(){const a=this._removeEmptyFolders(e),o=this._getFinalPath(a),i=new URL(this.url+`/object/upload/sign/${o}`);i.searchParams.set("token",t);try{let e;const t=Object.assign({upsert:Ca.upsert},r),o=Object.assign(Object.assign({},this.headers),{"x-upsert":String(t.upsert)});"undefined"!==typeof Blob&&n instanceof Blob?(e=new FormData,e.append("cacheControl",t.cacheControl),e.append("",n)):"undefined"!==typeof FormData&&n instanceof FormData?(e=n,e.append("cacheControl",t.cacheControl)):(e=n,o["cache-control"]=`max-age=${t.cacheControl}`,o["content-type"]=t.contentType);return{data:{path:a,fullPath:(yield _a(this.fetch,i.toString(),e,{headers:o})).Key},error:null}}catch(s){if(ua(s))return{data:null,error:s};throw s}})}createSignedUploadUrl(e,t){return Sa(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e);const r=Object.assign({},this.headers);(null===t||void 0===t?void 0:t.upsert)&&(r["x-upsert"]="true");const a=yield ka(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:r}),o=new URL(this.url+a.url),i=o.searchParams.get("token");if(!i)throw new la("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:i},error:null}}catch(n){if(ua(n))return{data:null,error:n};throw n}})}update(e,t,n){return Sa(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,t,n)})}move(e,t,n){return Sa(this,void 0,void 0,function*(){try{return{data:yield ka(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,de
2stinationBucket:null===n||void 0===n?void 0:n.destinationBucket},{headers:this.headers}),error:null}}catch(r){if(ua(r))return{data:null,error:r};throw r}})}copy(e,t,n){return Sa(this,void 0,void 0,function*(){try{return{data:{path:(yield ka(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:null===n||void 0===n?void 0:n.destinationBucket},{headers:this.headers})).Key},error:null}}catch(r){if(ua(r))return{data:null,error:r};throw r}})}createSignedUrl(e,t,n){return Sa(this,void 0,void 0,function*(){try{let r=this._getFinalPath(e),a=yield ka(this.fetch,`${this.url}/object/sign/${r}`,Object.assign({expiresIn:t},(null===n||void 0===n?void 0:n.transform)?{transform:n.transform}:{}),{headers:this.headers});const o=(null===n||void 0===n?void 0:n.download)?`&download=${!0===n.download?"":n.download}`:"";return a={signedUrl:encodeURI(`${this.url}${a.signedURL}${o}`)},{data:a,error:null}}catch(r){if(ua(r))return{data:null,error:r};throw r}})}createSignedUrls(e,t,n){return Sa(this,void 0,void 0,function*(){try{const r=yield ka(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:t,paths:e},{headers:this.headers}),a=(null===n||void 0===n?void 0:n.download)?`&download=${!0===n.download?"":n.download}`:"";return{data:r.map(e=>Object.assign(Object.assign({},e),{signedUrl:e.signedURL?encodeURI(`${this.url}${e.signedURL}${a}`):null})),error:null}}catch(r){if(ua(r))return{data:null,error:r};throw r}})}download(e,t){return Sa(this,void 0,void 0,function*(){const n="undefined"!==typeof(null===t||void 0===t?void 0:t.transform)?"render/image/authenticated":"object",r=this.transformOptsToQueryString((null===t||void 0===t?void 0:t.transform)||{}),a=r?`?${r}`:"";try{const t=this._getFinalPath(e),r=yield wa(this.fetch,`${this.url}/${n}/${t}${a}`,{headers:this.headers,noResolveJson:!0});return{data:yield r.blob(),error:null}}catch(o){if(ua(o))return{data:null,error:o};throw o}})}info(e){return Sa(this,void 0,void 0,function*(){const t=this._getFinalPath(e);try{const e=yield wa(this.fetch,`${this.url}/object/info/${t}`,{headers:this.headers});return{data:pa(e),error:null}}catch(n){if(ua(n))return{data:null,error:n};throw n}})}exists(e){return Sa(this,void 0,void 0,function*(){const t=this._getFinalPath(e);try{return yield function(e,t,n,r){return ma(this,void 0,void 0,function*(){return ba(e,"HEAD",t,Object.assign(Object.assign({},n),{noResolveJson:!0}),r)})}(this.fetch,`${this.url}/object/${t}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if(ua(n)&&n instanceof da){const e=n.originalError;if([400,404].includes(null===e||void 0===e?void 0:e.status))return{data:!1,error:n}}throw n}})}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],a=(null===t||void 0===t?void 0:t.download)?`download=${!0===t.download?"":t.download}`:"";""!==a&&r.push(a);const o="undefined"!==typeof(null===t||void 0===t?void 0:t.transform)?"render/image":"object",i=this.transformOptsToQueryString((null===t||void 0===t?void 0:t.transform)||{});""!==i&&r.push(i);let s=r.join("&");return""!==s&&(s=`?${s}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${n}${s}`)}}}remove(e){return Sa(this,void 0,void 0,function*(){try{return{data:yield xa(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(t){if(ua(t))return{data:null,error:t};throw t}})}list(e,t,n){return Sa(this,void 0,void 0,function*(){try{const r=Object.assign(Object.assign(Object.assign({},Ea),t),{prefix:e||""});return{data:yield ka(this.fetch,`${this.url}/object/list/${this.bucketId}`,r,{headers:this.headers},n),error:null}}catch(r){if(ua(r))return{data:null,error:r};throw r}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return"undefined"!==typeof Buffer?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}}const Pa={"X-Client-Info":"storage-js/2.10.4"};
2var Ta=function(e,t,n,r){return new(n||(n=Promise))(function(a,o){function i(e){try{l(r.next(e))}catch(bi){o(bi)}}function s(e){try{l(r.throw(e))}catch(bi){o(bi)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,s)}l((r=r.apply(e,t||[])).next())})};class Ra{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const a=new URL(e);if(null===r||void 0===r?void 0:r.useNewHostname){/supabase\.(co|in|red)$/.test(a.hostname)&&!a.hostname.includes("storage.supabase.")&&(a.hostname=a.hostname.replace("supabase.","storage.supabase."))}this.url=a.href,this.headers=Object.assign(Object.assign({},Pa),t),this.fetch=ha(n)}listBuckets(){return Ta(this,void 0,void 0,function*(){try{return{data:yield wa(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(ua(e))return{data:null,error:e};throw e}})}getBucket(e){return Ta(this,void 0,void 0,function*(){try{return{data:yield wa(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(t){if(ua(t))return{data:null,error:t};throw t}})}createBucket(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{public:!1};return Ta(this,void 0,void 0,function*(){try{return{data:yield ka(this.fetch,`${this.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(ua(n))return{data:null,error:n};throw n}})}updateBucket(e,t){return Ta(this,void 0,void 0,function*(){try{return{data:yield _a(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(ua(n))return{data:null,error:n};throw n}})}emptyBucket(e){return Ta(this,void 0,void 0,function*(){try{return{data:yield ka(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(t){if(ua(t))return{data:null,error:t};throw t}})}deleteBucket(e){return Ta(this,void 0,void 0,function*(){try{return{data:yield xa(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(t){if(ua(t))return{data:null,error:t};throw t}})}}class Oa extends Ra{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2?arguments[2]:void 0,arguments.length>3?arguments[3]:void 0)}from(e){return new ja(this.url,this.headers,e,this.fetch)}}let Na="";Na="undefined"!==typeof Deno?"deno":"undefined"!==typeof document?"web":"undefined"!==typeof navigator&&"ReactNative"===navigator.product?"react-native":"node";const La={headers:{"X-Client-Info":`supabase-js-${Na}/2.53.0`}},Aa={schema:"public"},Ia={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Da={};var $a=n(630),Ua=function(e,t,n,r){return new(n||(n=Promise))(function(a,o){function i(e){try{l(r.next(e))}catch(bi){o(bi)}}function s(e){try{l(r.throw(e))}catch(bi){o(bi)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,s)}l((r=r.apply(e,t||[])).next())})};const Ma=e=>{let t;return t=e||("undefined"===typeof fetch?$a.default:fetch),function(){return t(...arguments)}},Fa=(e,t,n)=>{const r=Ma(n),a="undefined"===typeof Headers?$a.Headers:Headers;return(n,o)=>Ua(void 0,void 0,void 0,function*(){var i;const s=null!==(i=yield t())&&void 0!==i?i:e;let l=new a(null===o||void 0===o?void 0:o.headers);return l.has("apikey")||l.set("apikey",e),l.has("Authorization")||l.set("Authorization",`Bearer ${s}`),r(n,Object.assign(Object.assign({},o),{headers:l}))})};var za=function(e,t,n,r){return new(n||(n=Promise))(function(a,o){function i(e){try{l(r.next(e))}catch(bi){o(bi)}}function s(e){try{l(r.throw(e))}catch(bi){o(bi)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,s)}l((r=r.apply(e,t||[])).next())})};const Ba="2.71.1",Ha=3e4,qa=9e4,Va={"X-Client-Info":`gotrue-js/${Ba}`},Wa="X-Supabase-Api-Version",Ka={timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"},Ga=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;
2class Ja extends Error{constructor(e,t,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t,this.code=n}}function Qa(e){return"object"===typeof e&&null!==e&&"__isAuthError"in e}class Ya extends Ja{constructor(e,t,n){super(e,t,n),this.name="AuthApiError",this.status=t,this.code=n}}class Xa extends Ja{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class Za extends Ja{constructor(e,t,n,r){super(e,n,r),this.name=t,this.status=n}}class eo extends Za{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}class to extends Za{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class no extends Za{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class ro extends Za{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class ao extends Za{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class oo extends Za{constructor(e,t){super(e,"AuthRetryableFetchError",t,void 0)}}function io(e){return Qa(e)&&"AuthRetryableFetchError"===e.name}class so extends Za{constructor(e,t,n){super(e,"AuthWeakPasswordError",t,"weak_password"),this.reasons=n}}class lo extends Za{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const uo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),co=" \t\n\r=".split(""),fo=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<co.length;t+=1)e[co[t].charCodeAt(0)]=-2;for(let t=0;t<uo.length;t+=1)e[uo[t].charCodeAt(0)]=t;return e})();function ho(e,t,n){if(null!==e)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const e=t.queue>>t.queuedBits-6&63;n(uo[e]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const e=t.queue>>t.queuedBits-6&63;n(uo[e]),t.queuedBits-=6}}function po(e,t,n){const r=fo[e];if(!(r>-1)){if(-2===r)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8}function mo(e){const t=[],n=e=>{t.push(String.fromCodePoint(e))},r={utf8seq:0,codepoint:0},a={queue:0,queuedBits:0},o=e=>{!function(e,t,n){if(0===t.utf8seq){if(e<=127)return void n(e);for(let n=1;n<6;n+=1)if(0===(e>>7-n&1)){t.utf8seq=n;break}if(2===t.utf8seq)t.codepoint=31&e;else if(3===t.utf8seq)t.codepoint=15&e;else{if(4!==t.utf8seq)throw new Error("Invalid UTF-8 sequence");t.codepoint=7&e}t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|63&e,t.utf8seq-=1,0===t.utf8seq&&n(t.codepoint)}}(e,r,n)};for(let i=0;i<e.length;i+=1)po(e.charCodeAt(i),a,o);return t.join("")}function vo(e,t){if(!(e<=127)){if(e<=2047)return t(192|e>>6),void t(128|63&e);if(e<=65535)return t(224|e>>12),t(128|e>>6&63),void t(128|63&e);if(e<=1114111)return t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),void t(128|63&e);throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}t(e)}function go(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const t=1024*(r-55296)&65535;r=65536+(e.charCodeAt(n+1)-56320&65535|t),n+=1}vo(r,t)}}function yo(e){const t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};for(let a=0;a<e.length;a+=1)po(e.charCodeAt(a),n,r);return new Uint8Array(t)}function bo(e){const t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};return e.forEach(e=>ho(e,n,r)),ho(null,n,r),t.join("")}const wo=()=>"undefined"!==typeof window&&"undefined"!==typeof document,ko={tested:!1,writable:!1},_o=()=>{if(!wo())return!1;try{if("object"!==typeof globalThis.localStorage)return!1}catch(bi){return!1}if(ko.tested)return ko.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ko.tested=!0,ko.writable=!0}catch(bi){ko.tested=!0,ko.writable=!1}return ko.writable};const xo=e=>{let t;return t=e||("undefined"===typeof fetch?function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Promise.resolve().then(n.bind(n,630)).then(e=>{let{default:n}=e;return n(...t)})}:fetch),function(){return t(...arguments)}},So=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Eo=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch(r){return n}},Co=async(e,t)=>{await e.removeItem(t)};
2class jo{constructor(){this.promise=new jo.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}}function Po(e){const t=e.split(".");if(3!==t.length)throw new lo("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!Ga.test(t[n]))throw new lo("JWT not in base64url format");return{header:JSON.parse(mo(t[0])),payload:JSON.parse(mo(t[1])),signature:yo(t[2]),raw:{header:t[0],payload:t[1]}}}function To(e){return("0"+e.toString(16)).substr(-2)}async function Ro(e){if(!("undefined"!==typeof crypto&&"undefined"!==typeof crypto.subtle&&"undefined"!==typeof TextEncoder))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const t=await async function(e){const t=(new TextEncoder).encode(e),n=await crypto.subtle.digest("SHA-256",t),r=new Uint8Array(n);return Array.from(r).map(e=>String.fromCharCode(e)).join("")}(e);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Oo(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=function(){const e=new Uint32Array(56);if("undefined"===typeof crypto){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",t=e.length;let n="";for(let r=0;r<56;r++)n+=e.charAt(Math.floor(Math.random()*t));return n}return crypto.getRandomValues(e),Array.from(e,To).join("")}();let a=r;n&&(a+="/PASSWORD_RECOVERY"),await So(e,`${t}-code-verifier`,a);const o=await Ro(r);return[o,r===o?"plain":"s256"]}jo.promiseConstructor=Promise;const No=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;const Lo=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Ao(e){if(!Lo.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Io(){return new Proxy({},{get:(e,t)=>{if("__isUserNotAvailableProxy"===t)return!0;if("symbol"===typeof t){const e=t.toString();if("Symbol(Symbol.toPrimitive)"===e||"Symbol(Symbol.toStringTag)"===e||"Symbol(util.inspect.custom)"===e)return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${t}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,t)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,t)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Do(e){return JSON.parse(JSON.stringify(e))}var $o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};const Uo=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),Mo=[502,503,504];async function Fo(e){var t,n;if(!("object"===typeof(n=e)&&null!==n&&"status"in n&&"ok"in n&&"json"in n&&"function"===typeof n.json))throw new oo(Uo(e),0);if(Mo.includes(e.status))throw new oo(Uo(e),e.status);let r,a;try{r=await e.json()}catch(bi){throw new Xa(Uo(bi),bi)}const o=function(e){const t=e.headers.get(Wa);if(!t)return null;if(!t.match(No))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch(bi){return null}}(e);if(o&&o.getTime()>=Ka.timestamp&&"object"===typeof r&&r&&"string"===typeof r.code?a=r.code:"object"===typeof r&&r&&"string"===typeof r.error_code&&(a=r.error_code),a){if("weak_password"===a)throw new so(Uo(r),e.status,(null===(t=r.weak_password)||void 0===t?void 0:t.reasons)||[]);if("session_not_found"===a)throw new eo}else if("object"===typeof r&&r&&"object"===typeof r.weak_password&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((e,t)=>
2e&&"string"===typeof t,!0))throw new so(Uo(r),e.status,r.weak_password.reasons);throw new Ya(Uo(r),e.status||500,a)}async function zo(e,t,n,r){var a;const o=Object.assign({},null===r||void 0===r?void 0:r.headers);o[Wa]||(o[Wa]=Ka.name),(null===r||void 0===r?void 0:r.jwt)&&(o.Authorization=`Bearer ${r.jwt}`);const i=null!==(a=null===r||void 0===r?void 0:r.query)&&void 0!==a?a:{};(null===r||void 0===r?void 0:r.redirectTo)&&(i.redirect_to=r.redirectTo);const s=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",l=await async function(e,t,n,r,a,o){const i=((e,t,n,r)=>{const a={method:e,headers:(null===t||void 0===t?void 0:t.headers)||{}};return"GET"===e?a:(a.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},null===t||void 0===t?void 0:t.headers),a.body=JSON.stringify(r),Object.assign(Object.assign({},a),n))})(t,r,a,o);let s;try{s=await e(n,Object.assign({},i))}catch(bi){throw console.error(bi),new oo(Uo(bi),0)}s.ok||await Fo(s);if(null===r||void 0===r?void 0:r.noResolveJson)return s;try{return await s.json()}catch(bi){await Fo(bi)}}(e,t,n+s,{headers:o,noResolveJson:null===r||void 0===r?void 0:r.noResolveJson},{},null===r||void 0===r?void 0:r.body);return(null===r||void 0===r?void 0:r.xform)?null===r||void 0===r?void 0:r.xform(l):{data:Object.assign({},l),error:null}}function Bo(e){var t;let n=null;var r;(function(e){return e.access_token&&e.refresh_token&&e.expires_in})(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=(r=e.expires_in,Math.round(Date.now()/1e3)+r)));return{data:{session:n,user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function Ho(e){const t=Bo(e);return!t.error&&e.weak_password&&"object"===typeof e.weak_password&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&"string"===typeof e.weak_password.message&&e.weak_password.reasons.reduce((e,t)=>e&&"string"===typeof t,!0)&&(t.data.weak_password=e.weak_password),t}function qo(e){var t;return{data:{user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function Vo(e){return{data:e,error:null}}function Wo(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:a,verification_type:o}=e,i=$o(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]);return{data:{properties:{action_link:t,email_otp:n,hashed_token:r,redirect_to:a,verification_type:o},user:Object.assign({},i)},error:null}}function Ko(e){return e}const Go=["global","local","others"];var Jo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};class Qo{constructor(e){let{url:t="",headers:n={},fetch:r}=e;this.url=t,this.headers=n,this.fetch=xo(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Go[0];if(Go.indexOf(t)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Go.join(", ")}`);try{return await zo(this.fetch,"POST",`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(Qa(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{return await zo(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:qo})}catch(n){if(Qa(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:t}=e,n=Jo(e,["options"]),r=Object.assign(Object.assign({},n),t);return"newEmail"in n&&(r.new_email=null===n||void 0===n?void 0:n.newEmail,delete r.newEmail),await zo(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:r,headers:this.headers,xform:Wo,redirectTo:null===t||void 0===t?void 0:t.redirectTo})}catch(t){if(Qa(t))return{data:{properties:null,user:null},error:t};throw t}}async createUser(e){try{return await zo(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:qo})}catch(t){if(Qa(t))return{data:{user:null},error:t};throw t}}async listUsers(e){var t,n,r,a,o,i,s;try{const l={nextPage:null,lastPage:0,total:0},u=await zo(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:null!==(n=null===(t=null===e||void 0===e?void 0:e.page)||void 0===t?void 0:t.toString())&&void 0!==n?n:"",per_page:null!==(a=null===(r=null===e||void 0===e?void 0:e.perPage)||void 0===r?void 0:r.toString())&&void 0!==a?a:""},xform:Ko});if(u.error)throw u.error;const c=await u.json(),d=null!==(o=u.headers.get("x-total-count"))&&void 0!==o?o:0,f=null!==(s=null===(i=u.headers.get("link"))||void 0===i?void 0:i.split(","))&&void 0!==s?s:[];return f.length>
20&&(f.forEach(e=>{const t=parseInt(e.split(";")[0].split("=")[1].substring(0,1)),n=JSON.parse(e.split(";")[1].split("=")[1]);l[`${n}Page`]=t}),l.total=parseInt(d)),{data:Object.assign(Object.assign({},c),l),error:null}}catch(l){if(Qa(l))return{data:{users:[]},error:l};throw l}}async getUserById(e){Ao(e);try{return await zo(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:qo})}catch(t){if(Qa(t))return{data:{user:null},error:t};throw t}}async updateUserById(e,t){Ao(e);try{return await zo(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:qo})}catch(n){if(Qa(n))return{data:{user:null},error:n};throw n}}async deleteUser(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Ao(e);try{return await zo(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:qo})}catch(n){if(Qa(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){Ao(e.userId);try{const{data:t,error:n}=await zo(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:n}}catch(t){if(Qa(t))return{data:null,error:t};throw t}}async _deleteFactor(e){Ao(e.userId),Ao(e.id);try{return{data:await zo(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(t){if(Qa(t))return{data:null,error:t};throw t}}}function Yo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const Xo=!!(globalThis&&_o()&&globalThis.localStorage&&"true"===globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug"));class Zo extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class ei extends Zo{}async function ti(e,t,n){Xo&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),Xo&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,0===t?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async r=>{if(!r){if(0===t)throw Xo&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new ei(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Xo)try{const e=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(e,null,"  "))}catch(bi){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",bi)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}Xo&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,r.name);try{return await n()}finally{Xo&&console.log("@supabase/gotrue-js: navigatorLock: released",e,r.name)}}))}!function(){if("object"!==typeof globalThis)try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(bi){"undefined"!==typeof self&&(self.globalThis=self)}}();const ni={url:"http://localhost:9999",storageKey:"supabase.auth.token",autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Va,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function ri(e,t,n){return await n()}const ai={};class oi{constructor(e){var t,n;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=oi.nextInstanceID,oi.nextInstanceID+=1,this.instanceID>0&&wo()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const r=Object.assign(Object.assign({},ni),e);if(this.logDebugMessages=!!r.debug,"function"===typeof r.debug&&(this.logger=r.debug),this.persistSession=r.persistSession,this.storageKey=r.storageKey,this.autoRefreshToken=r.autoRefreshToken,this.admin=new Qo({url:r.url,headers:r.headers,fetch:r.fetch}),this.url=r.url,this.headers=r.headers,this.fetch=xo(r.fetch),this.lock=r.lock||ri,this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,r.lock?this.lock=r.lock:wo()&&(null===(t=null===globalThis||void 0===globalThis?void 0:globalThis.navigator)||void 0===t?void 0:t.locks)?this.lock=ti:this.lock=ri,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?(r.storage?this.storage=r.storage:_o()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Yo(this.memoryStorage)),r.userStorage&&(this.userStorage=r.userStorage)):(this.memoryStorage={},this.storage=Yo(this.memoryStorage)),wo()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(bi){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",bi)}null===(n=this.broadcastChannel)||void 0===n||n.addEventListener("message",async e=>{this._debug("received broadcast notification from other tab or client",e),await this._notifyAllSubscribers(e.data.event,e.data.session,!1)})}this.initialize()}get jwks(){var e,t;return null!==(t=null===(e=ai[this.storageKey])||void 0===e?void 0:e.jwks)&&void 0!==t?t:{keys:[]}}set jwks(e){ai[this.storageKey]=Object.assign(Object.assign({},ai[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,t;return null!==(t=null===(e=ai[this.storageKey])||void 0===e?void 0:e.cachedAt)&&void 0!==t?t:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){ai[this.storageKey]=Object.assign(Object.assign({},ai[this.storageKey]),{cachedAt:e})}_debug(){if(this.logDebugMessages){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.logger(`GoTrueClient@${this.instanceID} (${Ba}) ${(new Date).toISOString()}`,...t)}return this}async initialize(){return this.initializePromise||(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))()),await this.initializePromise}async _initialize(){var e;try{const t=function(e){const t={},n=new URL(e);if(n.hash&&"#"===n.hash[0])try{new URLSearchParams(n.hash.substring(1)).forEac
2h((e,n)=>{t[n]=e})}catch(bi){}return n.searchParams.forEach((e,n)=>{t[n]=e}),t}(window.location.href);let n="none";if(this._isImplicitGrantCallback(t)?n="implicit":await this._isPKCECallback(t)&&(n="pkce"),wo()&&this.detectSessionInUrl&&"none"!==n){const{data:r,error:a}=await this._getSessionFromURL(t,n);if(a){if(this._debug("#_initialize()","error detecting session from URL",a),function(e){return Qa(e)&&"AuthImplicitGrantRedirectError"===e.name}(a)){const t=null===(e=a.details)||void 0===e?void 0:e.code;if("identity_already_exists"===t||"identity_not_found"===t||"single_identity_not_deletable"===t)return{error:a}}return await this._removeSession(),{error:a}}const{session:o,redirectType:i}=r;return this._debug("#_initialize()","detected session in URL",o,"redirect type",i),await this._saveSession(o),setTimeout(async()=>{"recovery"===i?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(t){return Qa(t)?{error:t}:{error:new Xa("Unexpected error during initialization",t)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var t,n,r;try{const a=await zo(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:null!==(n=null===(t=null===e||void 0===e?void 0:e.options)||void 0===t?void 0:t.data)&&void 0!==n?n:{},gotrue_meta_security:{captcha_token:null===(r=null===e||void 0===e?void 0:e.options)||void 0===r?void 0:r.captchaToken}},xform:Bo}),{data:o,error:i}=a;if(i||!o)return{data:{user:null,session:null},error:i};const s=o.session,l=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",s)),{data:{user:l,session:s},error:null}}catch(a){if(Qa(a))return{data:{user:null,session:null},error:a};throw a}}async signUp(e){var t,n,r;try{let a;if("email"in e){const{email:n,password:r,options:o}=e;let i=null,s=null;"pkce"===this.flowType&&([i,s]=await Oo(this.storage,this.storageKey)),a=await zo(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:null===o||void 0===o?void 0:o.emailRedirectTo,body:{email:n,password:r,data:null!==(t=null===o||void 0===o?void 0:o.data)&&void 0!==t?t:{},gotrue_meta_security:{captcha_token:null===o||void 0===o?void 0:o.captchaToken},code_challenge:i,code_challenge_method:s},xform:Bo})}else{if(!("phone"in e))throw new no("You must provide either an email or phone number and a password");{const{phone:t,password:o,options:i}=e;a=await zo(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:t,password:o,data:null!==(n=null===i||void 0===i?void 0:i.data)&&void 0!==n?n:{},channel:null!==(r=null===i||void 0===i?void 0:i.channel)&&void 0!==r?r:"sms",gotrue_meta_security:{captcha_token:null===i||void 0===i?void 0:i.captchaToken}},xform:Bo})}}const{data:o,error:i}=a;if(i||!o)return{data:{user:null,session:null},error:i};const s=o.session,l=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",s)),{data:{user:l,session:s},error:null}}catch(a){if(Qa(a))return{data:{user:null,session:null},error:a};throw a}}async signInWithPassword(e){try{let t;if("email"in e){const{email:n,password:r,options:a}=e;t=await zo(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:n,password:r,gotrue_meta_security:{captcha_token:null===a||void 0===a?void 0:a.captchaToken}},xform:Ho})}else{if(!("phone"in e))throw new no("You must provide either an email or phone number and a password");{const{phone:n,password:r,options:a}=e;t=await zo(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:n,password:r,gotrue_meta_security:{captcha_token:null===a||void 0===a?void 0:a.captchaToken}},xform:Ho})}}const{data:n,error:r}=t;return r?{data:{user:null,session:null},error:r}:n&&n.session&&n.user?(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),{data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:r}):{data:{user:null,session:null},error:new to}}catch(t){if(Qa(t))return{data:{user:null,session:null},error:t};throw t}}async signInWithOAuth(e){var t,n,r,a;return await this._handleProviderSignIn(e.provider,{redirectTo:null===(t=e.options)||void 0===t?void 0:t.redirectTo,scopes:null===(n=e.options)||void 0===n?void 0:n.scopes,queryParams:null===(r=e.options)||void 0===r?void 0:r.queryParams,skipBrowserRedirect:null===(a=e.options)||void 0===a?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:t}=e;if("solana"===t)return await this.signInWithSolana(e);throw new Error(`@supabase/auth-js: Unsupported chain "${t}"`)}async signInWithSolana(e){var t,n,r,a,o,i,s,l,u,c,d,f;let h,p;if("message"in e)h=e.message,p=e.signature;else{const{chain:d,wallet:f,statement:m,options:v}=e;let g;if(wo())if("object"===typeof f)g=f;else{const e=window;if(!("solana"in e)||"object"!==typeof e.solana||!("signIn"in e.solana&&"function"===typeof e.solana.signIn||"sign
2Message"in e.solana&&"function"===typeof e.solana.signMessage))throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.");g=e.solana}else{if("object"!==typeof f||!(null===v||void 0===v?void 0:v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");g=f}const y=new URL(null!==(t=null===v||void 0===v?void 0:v.url)&&void 0!==t?t:window.location.href);if("signIn"in g&&g.signIn){const e=await g.signIn(Object.assign(Object.assign(Object.assign({issuedAt:(new Date).toISOString()},null===v||void 0===v?void 0:v.signInWithSolana),{version:"1",domain:y.host,uri:y.href}),m?{statement:m}:null));let t;if(Array.isArray(e)&&e[0]&&"object"===typeof e[0])t=e[0];else{if(!(e&&"object"===typeof e&&"signedMessage"in e&&"signature"in e))throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");t=e}if(!("signedMessage"in t&&"signature"in t&&("string"===typeof t.signedMessage||t.signedMessage instanceof Uint8Array)&&t.signature instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields");h="string"===typeof t.signedMessage?t.signedMessage:(new TextDecoder).decode(t.signedMessage),p=t.signature}else{if(!("signMessage"in g)||"function"!==typeof g.signMessage||!("publicKey"in g)||"object"!==typeof g||!g.publicKey||!("toBase58"in g.publicKey)||"function"!==typeof g.publicKey.toBase58)throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");h=[`${y.host} wants you to sign in with your Solana account:`,g.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${y.href}`,`Issued At: ${null!==(r=null===(n=null===v||void 0===v?void 0:v.signInWithSolana)||void 0===n?void 0:n.issuedAt)&&void 0!==r?r:(new Date).toISOString()}`,...(null===(a=null===v||void 0===v?void 0:v.signInWithSolana)||void 0===a?void 0:a.notBefore)?[`Not Before: ${v.signInWithSolana.notBefore}`]:[],...(null===(o=null===v||void 0===v?void 0:v.signInWithSolana)||void 0===o?void 0:o.expirationTime)?[`Expiration Time: ${v.signInWithSolana.expirationTime}`]:[],...(null===(i=null===v||void 0===v?void 0:v.signInWithSolana)||void 0===i?void 0:i.chainId)?[`Chain ID: ${v.signInWithSolana.chainId}`]:[],...(null===(s=null===v||void 0===v?void 0:v.signInWithSolana)||void 0===s?void 0:s.nonce)?[`Nonce: ${v.signInWithSolana.nonce}`]:[],...(null===(l=null===v||void 0===v?void 0:v.signInWithSolana)||void 0===l?void 0:l.requestId)?[`Request ID: ${v.signInWithSolana.requestId}`]:[],...(null===(c=null===(u=null===v||void 0===v?void 0:v.signInWithSolana)||void 0===u?void 0:u.resources)||void 0===c?void 0:c.length)?["Resources",...v.signInWithSolana.resources.map(e=>`- ${e}`)]:[]].join("\n");const e=await g.signMessage((new TextEncoder).encode(h),"utf8");if(!e||!(e instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");p=e}}try{const{data:t,error:n}=await zo(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:h,signature:bo(p)},(null===(d=e.options)||void 0===d?void 0:d.captchaToken)?{gotrue_meta_security:{captcha_token:null===(f=e.options)||void 0===f?void 0:f.captchaToken}}:null),xform:Bo});if(n)throw n;return t&&t.session&&t.user?(t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),{data:Object.assign({},t),error:n}):{data:{user:null,session:null},error:new to}}catch(m){if(Qa(m))return{data:{user:null,session:null},error:m};throw m}}async _exchangeCodeForSession(e){const t=await Eo(this.storage,`${this.storageKey}-code-verifier`),[n,r]=(null!==t&&void 0!==t?t:"").split("/");try{const{data:t,error:a}=await zo(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:Bo});if(await Co(this.storage,`${this.storageKey}-code-verifier`),a)throw a;return t&&t.session&&t.user?(t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),{data:Object.assign(Object.assign({},t),{redirectType:null!==r&&void 0!==r?r:null}),error:a}):{data:{user:null,session:null,redirectType:null},error:new to}}catch(a){if(Qa(a))return{data:{user:null,session:null,redirectType:null},error:a};throw a}}async signInWithIdToken(e){try{const{options:t,provider:n,token:r,access_token:a,nonce:o}=e,i=await zo(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:r,access_token:a,nonce:o,gotrue_meta_security:{captcha_token:null===t||void 0===t?void 0:t.captchaToken}},xform:Bo}),{data:s,error:l}=i;return l?{data:{user:null,session:null},error:l}:s&&s.session&&s.user?(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:s,error:l}):{data:{user:null,session:null},error:new to}}catch(t){if(Qa(t))return{data:{user:null,session:null},error:t};throw t}}async signInWithOtp(e){var t,n,r,a,o;try{if("email"in e){const{email:r,options:a}=e;let o=null,i=null;"pkce"===this.flowType&&([o,i]=await Oo(this.storage,this.storageKey));const{error:s}=await zo(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:r,data:null!==(t=null===a||void 0===a?void 0:a.data)&&void 0!==t?t:{}
2,create_user:null===(n=null===a||void 0===a?void 0:a.shouldCreateUser)||void 0===n||n,gotrue_meta_security:{captcha_token:null===a||void 0===a?void 0:a.captchaToken},code_challenge:o,code_challenge_method:i},redirectTo:null===a||void 0===a?void 0:a.emailRedirectTo});return{data:{user:null,session:null},error:s}}if("phone"in e){const{phone:t,options:n}=e,{data:i,error:s}=await zo(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:null!==(r=null===n||void 0===n?void 0:n.data)&&void 0!==r?r:{},create_user:null===(a=null===n||void 0===n?void 0:n.shouldCreateUser)||void 0===a||a,gotrue_meta_security:{captcha_token:null===n||void 0===n?void 0:n.captchaToken},channel:null!==(o=null===n||void 0===n?void 0:n.channel)&&void 0!==o?o:"sms"}});return{data:{user:null,session:null,messageId:null===i||void 0===i?void 0:i.message_id},error:s}}throw new no("You must provide either an email or phone number.")}catch(i){if(Qa(i))return{data:{user:null,session:null},error:i};throw i}}async verifyOtp(e){var t,n;try{let r,a;"options"in e&&(r=null===(t=e.options)||void 0===t?void 0:t.redirectTo,a=null===(n=e.options)||void 0===n?void 0:n.captchaToken);const{data:o,error:i}=await zo(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:a}}),redirectTo:r,xform:Bo});if(i)throw i;if(!o)throw new Error("An error occurred on token verification.");const s=o.session,l=o.user;return(null===s||void 0===s?void 0:s.access_token)&&(await this._saveSession(s),await this._notifyAllSubscribers("recovery"==e.type?"PASSWORD_RECOVERY":"SIGNED_IN",s)),{data:{user:l,session:s},error:null}}catch(r){if(Qa(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithSSO(e){var t,n,r;try{let a=null,o=null;return"pkce"===this.flowType&&([a,o]=await Oo(this.storage,this.storageKey)),await zo(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:null!==(n=null===(t=e.options)||void 0===t?void 0:t.redirectTo)&&void 0!==n?n:void 0}),(null===(r=null===e||void 0===e?void 0:e.options)||void 0===r?void 0:r.captchaToken)?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:o}),headers:this.headers,xform:Vo})}catch(a){if(Qa(a))return{data:null,error:a};throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:t},error:n}=e;if(n)throw n;if(!t)throw new eo;const{error:r}=await zo(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return{data:{user:null,session:null},error:r}})}catch(e){if(Qa(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{const t=`${this.url}/resend`;if("email"in e){const{email:n,type:r,options:a}=e,{error:o}=await zo(this.fetch,"POST",t,{headers:this.headers,body:{email:n,type:r,gotrue_meta_security:{captcha_token:null===a||void 0===a?void 0:a.captchaToken}},redirectTo:null===a||void 0===a?void 0:a.emailRedirectTo});return{data:{user:null,session:null},error:o}}if("phone"in e){const{phone:n,type:r,options:a}=e,{data:o,error:i}=await zo(this.fetch,"POST",t,{headers:this.headers,body:{phone:n,type:r,gotrue_meta_security:{captcha_token:null===a||void 0===a?void 0:a.captchaToken}}});return{data:{user:null,session:null,messageId:null===o||void 0===o?void 0:o.message_id},error:i}}throw new no("You must provide either an email or phone number and a type")}catch(t){if(Qa(t))return{data:{user:null,session:null},error:t};throw t}}async getSession(){await this.initializePromise;return await this._acquireLock(-1,async()=>this._useSession(async e=>e))}async _acquireLock(e,t){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),n=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await n}catch(bi){}})()),n}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const e=t();for(this.pendingInLock.push((async()=>{try{await e}catch(bi){}})()),await e;this.pendingInLock.length;){const e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const t=await this.__loadSession();return await e(t)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",(new Error).stack);try{let e=null;const t=await Eo(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),null!==t&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not val
2id"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=!!e.expires_at&&1e3*e.expires_at-Date.now()<qa;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const t=await Eo(this.userStorage,this.storageKey+"-user");(null===t||void 0===t?void 0:t.user)?e.user=t.user:e.user=Io()}if(this.storage.isServer&&e.user){let t=this.suppressGetSessionWarning;e=new Proxy(e,{get:(e,n,r)=>(t||"user"!==n||(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t=!0,this.suppressGetSessionWarning=!0),Reflect.get(e,n,r))})}return{data:{session:e},error:null}}const{session:r,error:a}=await this._callRefreshToken(e.refresh_token);return a?{data:{session:null},error:a}:{data:{session:r},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;return await this._acquireLock(-1,async()=>await this._getUser())}async _getUser(e){try{return e?await zo(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:qo}):await this._useSession(async e=>{var t,n,r;const{data:a,error:o}=e;if(o)throw o;return(null===(t=a.session)||void 0===t?void 0:t.access_token)||this.hasCustomAuthorizationHeader?await zo(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:null!==(r=null===(n=a.session)||void 0===n?void 0:n.access_token)&&void 0!==r?r:void 0,xform:qo}):{data:{user:null},error:new eo}})}catch(t){if(Qa(t))return function(e){return Qa(e)&&"AuthSessionMissingError"===e.name}(t)&&(await this._removeSession(),await Co(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:t};throw t}}async updateUser(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,t))}async _updateUser(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{return await this._useSession(async n=>{const{data:r,error:a}=n;if(a)throw a;if(!r.session)throw new eo;const o=r.session;let i=null,s=null;"pkce"===this.flowType&&null!=e.email&&([i,s]=await Oo(this.storage,this.storageKey));const{data:l,error:u}=await zo(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:null===t||void 0===t?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:i,code_challenge_method:s}),jwt:o.access_token,xform:qo});if(u)throw u;return o.user=l.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(n){if(Qa(n))return{data:{user:null},error:n};throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new eo;const t=Date.now()/1e3;let n=t,r=!0,a=null;const{payload:o}=Po(e.access_token);if(o.exp&&(n=o.exp,r=n<=t),r){const{session:t,error:n}=await this._callRefreshToken(e.refresh_token);if(n)return{data:{user:null,session:null},error:n};if(!t)return{data:{user:null,session:null},error:null};a=t}else{const{data:r,error:o}=await this._getUser(e.access_token);if(o)throw o;a={access_token:e.access_token,refresh_token:e.refresh_token,user:r.user,token_type:"bearer",expires_in:n-t,expires_at:n},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return{data:{user:a.user,session:a},error:null}}catch(t){if(Qa(t))return{data:{session:null,user:null},error:t};throw t}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{var n;if(!e){const{data:r,error:a}=t;if(a)throw a;e=null!==(n=r.session)&&void 0!==n?n:void 0}if(!(null===e||void 0===e?void 0:e.refresh_token))throw new eo;const{session:r,error:a}=await this._callRefreshToken(e.refresh_token);return a?{data:{user:null,session:null},error:a}:r?{data:{user:r.user,session:r},error:null}:{data:{user:null,session:null},error:null}})}catch(t){if(Qa(t))return{data:{user:null,session:null},error:t};throw t}}async _getSessionFromURL(e,t){try{if(!wo())throw new ro("No browser detected.");
2if(e.error||e.error_description||e.error_code)throw new ro(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(t){case"implicit":if("pkce"===this.flowType)throw new ao("Not a valid PKCE flow url.");break;case"pkce":if("implicit"===this.flowType)throw new ro("Not a valid implicit grant flow url.")}if("pkce"===t){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new ao("No code detected.");const{data:t,error:n}=await this._exchangeCodeForSession(e.code);if(n)throw n;const r=new URL(window.location.href);return r.searchParams.delete("code"),window.history.replaceState(window.history.state,"",r.toString()),{data:{session:t.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:r,access_token:a,refresh_token:o,expires_in:i,expires_at:s,token_type:l}=e;if(!a||!i||!o||!l)throw new ro("No session defined in URL");const u=Math.round(Date.now()/1e3),c=parseInt(i);let d=u+c;s&&(d=parseInt(s));const f=d-u;1e3*f<=Ha&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${c}s`);const h=d-c;u-h>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",h,d,u):u-h<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",h,d,u);const{data:p,error:m}=await this._getUser(a);if(m)throw m;const v={provider_token:n,provider_refresh_token:r,access_token:a,expires_in:c,expires_at:d,refresh_token:o,token_type:l,user:p.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:v,redirectType:e.type},error:null}}catch(n){if(Qa(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantCallback(e){return Boolean(e.access_token||e.error_description)}async _isPKCECallback(e){const t=await Eo(this.storage,`${this.storageKey}-code-verifier`);return!(!e.code||!t)}async signOut(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{scope:"global"};return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut(){let{scope:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{scope:"global"};return await this._useSession(async t=>{var n;const{data:r,error:a}=t;if(a)return{error:a};const o=null===(n=r.session)||void 0===n?void 0:n.access_token;if(o){const{error:t}=await this.admin.signOut(o,e);if(t&&(!function(e){return Qa(e)&&"AuthApiError"===e.name}(t)||404!==t.status&&401!==t.status&&403!==t.status))return{error:t}}return"others"!==e&&(await this._removeSession(),await Co(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}),n={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,n),(async()=>{await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(t)})})(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async t=>{var n,r;try{const{data:{session:r},error:a}=t;if(a)throw a;await(null===(n=this.stateChangeEmitters.get(e))||void 0===n?void 0:n.callback("INITIAL_SESSION",r)),this._debug("INITIAL_SESSION","callback id",e,"session",r)}catch(a){await(null===(r=this.stateChangeEmitters.get(e))||void 0===r?void 0:r.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",a),console.error(a)}})}async resetPasswordForEmail(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null;"pkce"===this.flowType&&([n,r]=await Oo(this.storage,this.storageKey,!0));try{return await zo(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(a){if(Qa(a))return{data:null,error:a};throw a}}async getUserIdentities(){var e;try{const{data:t,error:n}=await this.getUser();if(n)throw n;return{data:{identities:null!==(e=t.user.identities)&&void 0!==e?e:[]},error:null}}catch(t){if(Qa(t))return{data:null,error:t};throw t}}async linkIdentity(e){var t;try{const{data:n,error:r}=await this._useSession(async t=>{var n,r,a,o,i;const{data:s,error:l}=t;if(l)throw l;const u=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:null===(n=e.options)||void 0===n?void 0:n.redirectTo,scopes:null===(r=e.options)||void 0===r?void 0:r.scopes,queryParams:null===(a=e.options)||void 0===a?void 0:a.queryParams,skipBrowserRedirect:!0});return await zo(this.fetch,"GET",u,{headers:this.headers,jwt:null!==(i=null===(o=s.session)||void 0===o?void 0:o.access_token)&&void 0!==i?i:void 0})});if(r)throw r;return wo()&&!(null===(t=e.options)||void 0===t?void 0:t.skipBrowserRedirect)&&window.location.assign(null===n||void 0===n?void 0:n.url),{data:{provider:e.provider,url:null===n||void 0===n?void 0:n.url},error:null}}catch(n){if(Qa(n))return{data:{provider:e.provider,url:null},error:n};throw n}}async unlinkIdentity(e){try{return await this._useSession(async t=>{var n,r;const{data:a,error:o}=t;if(o)throw o;
vendor: 5,683 bytes, line 2
2return await zo(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:null!==(r=null===(n=a.session)||void 0===n?void 0:n.access_token)&&void 0!==r?r:void 0})})}catch(t){if(Qa(t))return{data:null,error:t};throw t}}async _refreshAccessToken(e){const t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{const a=Date.now();return await(n=async n=>(n>0&&await async function(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}(200*Math.pow(2,n-1)),this._debug(t,"refreshing attempt",n),await zo(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Bo})),r=(e,t)=>{const n=200*Math.pow(2,e);return t&&io(t)&&Date.now()+n-a<Ha},new Promise((e,t)=>{(async()=>{for(let a=0;a<1/0;a++)try{const t=await n(a);if(!r(a,null,t))return void e(t)}catch(bi){if(!r(a,bi))return void t(bi)}})()}))}catch(a){if(this._debug(t,"error",a),Qa(a))return{data:{session:null,user:null},error:a};throw a}finally{this._debug(t,"end")}var n,r}_isValidSession(e){return"object"===typeof e&&null!==e&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,t){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",t,"url",n),wo()&&!t.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,t;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const a=await Eo(this.storage,this.storageKey);if(a&&this.userStorage){let t=await Eo(this.userStorage,this.storageKey+"-user");this.storage.isServer||!Object.is(this.storage,this.userStorage)||t||(t={user:a.user},await So(this.userStorage,this.storageKey+"-user",t)),a.user=null!==(e=null===t||void 0===t?void 0:t.user)&&void 0!==e?e:Io()}else if(a&&!a.user&&!a.user){const e=await Eo(this.storage,this.storageKey+"-user");e&&(null===e||void 0===e?void 0:e.user)?(a.user=e.user,await Co(this.storage,this.storageKey+"-user"),await So(this.storage,this.storageKey,a)):a.user=Io()}if(this._debug(n,"session from storage",a),!this._isValidSession(a))return this._debug(n,"session is not valid"),void(null!==a&&await this._removeSession());const o=1e3*(null!==(t=a.expires_at)&&void 0!==t?t:1/0)-Date.now()<qa;if(this._debug(n,`session has${o?"":" not"} expired with margin of 90000s`),o){if(this.autoRefreshToken&&a.refresh_token){const{error:e}=await this._callRefreshToken(a.refresh_token);e&&(console.error(e),io(e)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",e),await this._removeSession()))}}else if(a.user&&!0===a.user.__isUserNotAvailableProxy)try{const{data:e,error:t}=await this._getUser(a.access_token);!t&&(null===e||void 0===e?void 0:e.user)?(a.user=e.user,await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(r){console.error("Error getting user data:",r),this._debug(n,"error getting user data, skipping SIGNED_IN notification",r)}else await this._notifyAllSubscribers("SIGNED_IN",a)}catch(a){return this._debug(n,"error",a),void console.error(a)}finally{this._debug(n,"end")}}async _callRefreshToken(e){var t,n;if(!e)throw new eo;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const r=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{this.refreshingDeferred=new jo;const{data:t,error:n}=await this._refreshAccessToken(e);if(n)throw n;if(!t.session)throw new eo;await this._saveSession(t.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",t.session);const r={session:t.session,error:null};return this.refreshingDeferred.resolve(r),r}catch(a){if(this._debug(r,"error",a),Qa(a)){const e={session:null,error:a};return io(a)||await this._removeSession(),null===(t=this.refreshingDeferred)||void 0===t||t.resolve(e),e}throw null===(n=this.refreshingDeferred)||void 0===n||n.reject(a),a}finally{this.refreshingDeferred=null,this._debug(r,"end")}}async _notifyAllSubscribers(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=`#_notifyAllSubscribers(${e})`;this._debug(r,"begin",t,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:t});const r=[],a=Array.from(this.stateChangeEmitters.values()).map(async n=>{try{await n.callback(e,t)}catch(bi){r.push(bi)}});if(await Promise.all(a),r.length>0){for(let e=0;e<r.length;e+=1)console.error(r[e]);throw r[0]}}finally{this._debug(r,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const t=Object.assign({},e),n=t.user&&!0===t.user.__isUserNotAvailableProxy;if(this.userStorage){!n&&t.user&&await So(this.userStorage,this.storageKey+"-user",{user:t.user});const e=Object.assign({},t);delete e.user;const r=Do(e);await So(this.storage,this.storageKey,r)}else{const e=Do(t);await So(this.storage,this.storageKey,e)}}async _removeSession(){this._debug("#_removeSession()"),await Co(this.storage,this.storageKey),await Co(this.storage,this.storageKey+"-code-verifier"),await Co(this.storage,this.storageKey+"-user"),this.userStorage&&await Co(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&wo()&&(null===window||void 0===window?void 0:window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
2catch(bi){console.error("removing visibilitychange callback failed",bi)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Ha);this.autoRefreshTicker=e,e&&"object"===typeof e&&"function"===typeof e.unref?e.unref():"undefined"!==typeof Deno&&"function"===typeof Deno.unrefTimer&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async t=>{const{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at)return void this._debug("#_autoRefreshTokenTick()","no session");const r=Math.floor((1e3*n.expires_at-e)/Ha);this._debug("#_autoRefreshTokenTick()",`access token expires in ${r} ticks, a tick lasts 30000ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)})}catch(bi){console.error("Auto refresh tick failed with error. This is likely a transient error.",bi)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(bi){if(!(bi.isAcquireTimeout||bi instanceof Zo))throw bi;this._debug("auto refresh token tick lock not available")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!wo()||!(null===window||void 0===window?void 0:window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),null===window||void 0===window||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),"visible"===document.visibilityState?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{"visible"===document.visibilityState?await this._recoverAndRefresh():this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting")}))):"hidden"===document.visibilityState&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,n){const r=[`provider=${encodeURIComponent(t)}`];if((null===n||void 0===n?void 0:n.redirectTo)&&r.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),(null===n||void 0===n?void 0:n.scopes)&&r.push(`scopes=${encodeURIComponent(n.scopes)}`),"pkce"===this.flowType){const[e,t]=await Oo(this.storage,this.storageKey),n=new URLSearchParams({code_challenge:`${encodeURIComponent(e)}`,code_challenge_method:`${encodeURIComponent(t)}`});r.push(n.toString())}if(null===n||void 0===n?void 0:n.queryParams){const e=new URLSearchParams(n.queryParams);r.push(e.toString())}return(null===n||void 0===n?void 0:n.skipBrowserRedirect)&&r.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${r.join("&")}`}async _unenroll(e){try{return await this._useSession(async t=>{var n;const{data:r,error:a}=t;return a?{data:null,error:a}:await zo(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:null===(n=null===r||void 0===r?void 0:r.session)||void 0===n?void 0:n.access_token})})}catch(t){if(Qa(t))return{data:null,error:t};throw t}}async _enroll(e){try{return await this._useSession(async t=>{var n,r;const{data:a,error:o}=t;if(o)return{data:null,error:o};const i=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},"phone"===e.factorType?{phone:e.phone}:{issuer:e.issuer}),{data:s,error:l}=await zo(this.fetch,"POST",`${this.url}/factors`,{body:i,headers:this.headers,jwt:null===(n=null===a||void 0===a?void 0:a.session)||void 0===n?void 0:n.access_token});return l?{data:null,error:l}:("totp"===e.factorType&&(null===(r=null===s||void 0===s?void 0:s.totp)||void 0===r?void 0:r.qr_code)&&(s.totp.qr_code=`data:image/svg+xml;utf-8,${s.totp.qr_code}`),{data:s,error:null})})}catch(t){if(Qa(t))return{data:null,error:t};throw t}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async t=>{var n;const{data:r,error:a}=t;if(a)return{data:null,error:a};const{data:o,error:i}=await zo(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:null===(n=null===r||void 0===r?void 0:r.session)||void 0===n?void 0:n.access_token});return i?{data:null,error:i}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:i})})}catch(t){if(Qa(t))return{data:null,error:t};throw t}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async t=>{var n;const{data:r,error:a}=t;return a?{data:null,error:a}:await zo(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:null===(n=null===r||void 0===r?void 0:r.session)||void 0===n?void 0:n.access_token})})}catch(t){if(Qa(t))return{data:null,error:t};throw t}})}async _challengeAndVerify(e){const{data:t,error:n}=await this._challenge({factorId:e.factorId});return n?{data:null,error:n}:await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){const{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};const n=(null===e||void 0===e?void 0:e.factors)||[],r=n.filter(e=>"totp"===e.factor_type&&"verified"===e.status),a=n.filter(e=>"phone"===e.factor_type&&"verified"===e.status);return{data:{all:n,totp:r,phone:a},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var t,n;const{data:{session:r},error:a}=e;if(a)return{data:null,error:a};if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=Po(r.access_token);let i=null;o.aal&&(i=o.aal);let s=i;(null!==(n=null===(t=r.user.factors)||void 0===t?void 0:t.filter(e=>"verified"===e.status))&&void 0!==n?n:[]).length>0&&(s="aal2");return{data:{currentLevel:i,nextLevel:s,currentAuthenticationMethods:o.amr||[]},error:null}}))}async fetchJwk(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{keys:[]}).keys.find(t=>t.kid===e);if(t)return t;const n=Date.now();if(t=this.jwks.keys.find(t=>t.kid===e),t&&this.jwks_cached_at+6e5>n)return t;const{data:r,error:a}=await zo(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return r.keys&&0!==r.keys.length?(this.jwks=r,this.jwks_cached_at=n,t=r.keys.find(t=>t.kid===e),t||null):null}async getClaims(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{let n=e;if(!n){const{data:e,error:t}
2=await this.getSession();if(t||!e.session)return{data:null,error:t};n=e.session.access_token}const{header:r,payload:a,signature:o,raw:{header:i,payload:s}}=Po(n);(null===t||void 0===t?void 0:t.allowExpired)||function(e){if(!e)throw new Error("Missing exp claim");if(e<=Math.floor(Date.now()/1e3))throw new Error("JWT has expired")}(a.exp);const l=r.alg&&!r.alg.startsWith("HS")&&r.kid&&"crypto"in globalThis&&"subtle"in globalThis.crypto?await this.fetchJwk(r.kid,(null===t||void 0===t?void 0:t.keys)?{keys:t.keys}:null===t||void 0===t?void 0:t.jwks):null;if(!l){const{error:e}=await this.getUser(n);if(e)throw e;return{data:{claims:a,header:r,signature:o},error:null}}const u=function(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}(r.alg),c=await crypto.subtle.importKey("jwk",l,u,!0,["verify"]);if(!await crypto.subtle.verify(u,c,o,function(e){const t=[];return go(e,e=>t.push(e)),new Uint8Array(t)}(`${i}.${s}`)))throw new lo("Invalid JWT signature");return{data:{claims:a,header:r,signature:o},error:null}}catch(n){if(Qa(n))return{data:null,error:n};throw n}}}oi.nextInstanceID=0;const ii=oi;class si extends ii{constructor(e){super(e)}}var li=function(e,t,n,r){return new(n||(n=Promise))(function(a,o){function i(e){try{l(r.next(e))}catch(bi){o(bi)}}function s(e){try{l(r.throw(e))}catch(bi){o(bi)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,s)}l((r=r.apply(e,t||[])).next())})};class ui{constructor(e,t,n){var r,a,o;if(this.supabaseUrl=e,this.supabaseKey=t,!e)throw new Error("supabaseUrl is required.");if(!t)throw new Error("supabaseKey is required.");const i=(s=e).endsWith("/")?s:s+"/";var s;const l=new URL(i);this.realtimeUrl=new URL("realtime/v1",l),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",l),this.storageUrl=new URL("storage/v1",l),this.functionsUrl=new URL("functions/v1",l);const u=`sb-${l.hostname.split(".")[0]}-auth-token`,c=function(e,t){var n,r;const{db:a,auth:o,realtime:i,global:s}=e,{db:l,auth:u,realtime:c,global:d}=t,f={db:Object.assign(Object.assign({},l),a),auth:Object.assign(Object.assign({},u),o),realtime:Object.assign(Object.assign({},c),i),storage:{},global:Object.assign(Object.assign(Object.assign({},d),s),{headers:Object.assign(Object.assign({},null!==(n=null===d||void 0===d?void 0:d.headers)&&void 0!==n?n:{}),null!==(r=null===s||void 0===s?void 0:s.headers)&&void 0!==r?r:{})}),accessToken:()=>za(this,void 0,void 0,function*(){return""})};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}(null!==n&&void 0!==n?n:{},{db:Aa,realtime:Da,auth:Object.assign(Object.assign({},Ia),{storageKey:u}),global:La});this.storageKey=null!==(r=c.auth.storageKey)&&void 0!==r?r:"",this.headers=null!==(a=c.global.headers)&&void 0!==a?a:{},c.accessToken?(this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(e,t)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(t)} is not possible`)}})):this.auth=this._initSupabaseAuthClient(null!==(o=c.auth)&&void 0!==o?o:{},this.headers,c.global.fetch),this.fetch=Fa(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.rest=new Pr(new URL("rest/v1",l).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this.storage=new Oa(this.storageUrl.href,this.headers,this.fetch,null===n||void 0===n?void 0:n.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new Cr(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.rest.rpc(e,t,n)}channel(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{config:{}};return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,t;return li(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:n}=yield this.auth.getSession();return null!==(t=null===(e=n.session)||void 0===e?void 0:e.access_token)&&void 0!==t?t:null})}_initSupabaseAuthClient(e,t,n){let{autoRefreshToken:r,persistSession:a,detectSessionInUrl:o,storage:i,storageKey:s,flowType:l,lock:u,debug:c}=e;const d={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new si({url:this.authUrl.href,headers:Object.assign(Object.assign({},d),t),storageKey:s,autoRefreshToken:r,persistSession:a,detectSessionInUrl:o,storage:i,flowType:l,lock:u,debug:c,fetch:n,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(e){return new sa(this.realtimeUrl.href,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},null===e||void 0===e?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",null===t||void 0===t?void 0:t.access_token)})}_handleTokenChanged(e,t,n){"TOKEN_REFRESHED"!==e&&"SIGNED_IN"!==e||this.changedAccessToken===n?"SIGNED_OUT"===e&&(this.realtime.setAuth(),"STORAGE"==t&&this.auth.signOut(),this.changedAccessToken=void 0):this.changedAccessToken=n}}(function(){if("undefined"!==typeof window||"undefined"===typeof process||void 0===process.version||null===process.version)return!1;const e=process.version.match(/^v(\d+)\./);return!!e&&parseInt(e[1],10)<=18})()&&console.warn("\u26a0\ufe0f  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
2ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const ci=((e,t,n)=>new ui(e,t,n))("https://ehcazveenuygfvkehzwj.supabase.co",{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_NAME:"gncll",REACT_APP_VERCEL_GIT_PROVIDER:"github",REACT_APP_VERCEL_PROJECT_ID:"prj_0tR2zKehgCXM2KVxXG9vpKDEiLOw",REACT_APP_VERCEL_GIT_PULL_REQUEST_ID:"",REACT_APP_VERCEL_BRANCH_URL:"ai-form-reader-git-main-gencays-projects-e80363dc.vercel.app",REACT_APP_VERCEL_GIT_COMMIT_MESSAGE:"Fix field names: goal -> prompt, add question_count, add PUT endpoint",REACT_APP_VERCEL_DEPLOYMENT_ID:"dpl_3BZuoJTL2vJWNYRMhHjx8KayXETK",REACT_APP_VERCEL_GIT_REPO_SLUG:"AI-form-reader",REACT_APP_VERCEL_TARGET_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_SHA:"9ab78e9bdb4c33b2ce59db9579f88f49f6167f75",REACT_APP_VERCEL_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_REF:"main",REACT_APP_VERCEL_URL:"ai-form-reader-5heju6bk7-gencays-projects-e80363dc.vercel.app",REACT_APP_VERCEL_PROJECT_PRODUCTION_URL:"ai-form-reader.vercel.app",REACT_APP_VERCEL_GIT_PREVIOUS_SHA:"",REACT_APP_VERCEL_GIT_REPO_ID:"1031287181",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"gncll",REACT_APP_VERCEL_GIT_REPO_OWNER:"gncll"}.REACT_APP_SUPABASE_ANON_KEY||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImVoY2F6dmVlbnV5Z2Z2a2VoendqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTQyMzAwMDcsImV4cCI6MjA2OTgwNjAwN30.gl6UsgN6zYvvGUMCpg0NbM3tpG5rPmb3-C-4BcbWQXI"),di=(0,e.createContext)({user:null,loading:!0,signOut:async()=>{}}),fi=()=>{const t=(0,e.useContext)(di);if(!t)throw new Error("useAuth must be used within an AuthProvider");return t},hi=t=>{let{children:n}=t;const[r,a]=(0,e.useState)(null),[o,i]=(0,e.useState)(!0);(0,e.useEffect)(()=>{ci.auth.getSession().then(e=>{var t;let{data:{session:n}}=e;a(null!==(t=null===n||void 0===n?void 0:n.user)&&void 0!==t?t:null),i(!1)});const{data:{subscription:e}}=ci.auth.onAuthStateChange(async(e,t)=>{var n;a(null!==(n=null===t||void 0===t?void 0:t.user)&&void 0!==n?n:null),i(!1)});return()=>e.unsubscribe()},[]);const l={user:r,loading:o,signOut:async()=>{await ci.auth.signOut()}};return(0,s.jsx)(di.Provider,{value:l,children:n})},pi=()=>{const{user:e,signOut:t}=fi();return(0,s.jsxs)("div",{className:"sidebar bg-dark text-white p-3 d-flex flex-column",children:[(0,s.jsxs)("div",{className:"user-profile mb-4 d-flex align-items-center",children:[(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",fill:"currentColor",className:"bi bi-person-circle me-2",viewBox:"0 0 16 16",children:[(0,s.jsx)("path",{d:"M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0"}),(0,s.jsx)("path",{fillRule:"evenodd",d:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8m8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h5",{className:"mb-0",children:null===e||void 0===e?void 0:e.email}),(0,s.jsxs)("div",{className:"d-flex align-items-center",children:[(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",fill:"currentColor",className:"bi bi-circle-fill text-success me-1",viewBox:"0 0 16 16",children:(0,s.jsx)("circle",{cx:"8",cy:"8",r:"8"})}),(0,s.jsx)("small",{children:"Online"})]})]})]}),(0,s.jsx)(Bn,{className:"mb-4",children:(0,s.jsxs)("div",{className:"input-group",children:[(0,s.jsx)(xn,{type:"search",placeholder:"Search forms or workspaces...",className:"bg-secondary border-0 text-white","aria-label":"Search"}),(0,s.jsx)(x,{variant:"secondary",className:"border-0",children:(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-search text-white",viewBox:"0 0 16 16",children:(0,s.jsx)("path",{d:"M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.085.12l3.957 3.957a.5.5 0 0 0 .708-.708l-3.957-3.957a.5.5 0 0 0-.12-.085zm-5.442 1.04A5.5 5.5 0 1 1 10.5 7.5a5.5 5.5 0 0 1-5.5 5.5"})})})]})}),(0,s.jsxs)(br,{className:"flex-column flex-grow-1",children:[(0,s.jsx)("h6",{className:"text-muted text-uppercase mb-2",children:"Worksp
2aces"}),(0,s.jsx)(Hn.m,{to:"/admin",children:(0,s.jsx)(br.Link,{className:"text-white",children:"My workspace"})}),(0,s.jsx)(br.Link,{className:"text-muted",children:"Mehmet Gencay I\u015f\u0131k's workspace"})]}),(0,s.jsxs)("div",{className:"mt-auto pt-3 border-top border-secondary",children:[(0,s.jsx)(x,{variant:"outline-light",size:"sm",onClick:t,className:"w-100 mb-2",children:"Logout"}),(0,s.jsx)(r.Link,{to:"#",className:"text-muted text-decoration-none small",children:"Send Feedback"})]})]})},mi=()=>{const[t,n]=(0,e.useState)(""),[r,o]=(0,e.useState)(""),[i,l]=(0,e.useState)(""),[u,c]=(0,e.useState)(!1),d=(0,a.Zp)();return(0,s.jsx)("div",{className:"public-form-page",children:(0,s.jsxs)("div",{className:"form-container",children:[(0,s.jsx)("h1",{className:"question mb-4",children:"Admin Login"}),i&&(0,s.jsx)(Me,{variant:"danger",children:i}),(0,s.jsxs)(Bn,{onSubmit:async e=>{e.preventDefault(),c(!0),l("");try{const{error:e}=await ci.auth.signInWithPassword({email:t,password:r});if(e)throw e;d("/admin")}catch(i){l(i instanceof Error?i.message:"Login failed")}finally{c(!1)}},children:[(0,s.jsx)(Bn.Group,{className:"mb-3",children:(0,s.jsx)(Bn.Control,{type:"email",placeholder:"Email address",value:t,onChange:e=>n(e.target.value),required:!0,className:"form-control"})}),(0,s.jsx)(Bn.Group,{className:"mb-3",children:(0,s.jsx)(Bn.Control,{type:"password",placeholder:"Password",value:r,onChange:e=>o(e.target.value),required:!0,className:"form-control"})}),(0,s.jsx)(x,{className:"btn-next",type:"submit",disabled:u,children:u?"Logging in...":"Login \u2192"})]})]})})},vi=e=>{let{children:t}=e;const{user:n,loading:r}=fi();return r?(0,s.jsx)("div",{className:"public-form-page",children:(0,s.jsx)("div",{className:"form-container text-center",children:(0,s.jsx)(E,{animation:"border",role:"status",children:(0,s.jsx)("span",{className:"visually-hidden",children:"Loading..."})})})}):n?(0,s.jsx)(s.Fragment,{children:t}):(0,s.jsx)(mi,{})};const gi=function(){return(0,s.jsx)(r.BrowserRouter,{children:(0,s.jsxs)(a.BV,{children:[(0,s.jsx)(a.qh,{path:"/form/:formId",element:(0,s.jsx)(Yn,{})}),(0,s.jsx)(a.qh,{path:"/*",element:(0,s.jsx)(hi,{children:(0,s.jsx)(vi,{children:(0,s.jsxs)("div",{className:"d-flex",children:[(0,s.jsx)(pi,{}),(0,s.jsx)("div",{className:"flex-grow-1 p-3",children:(0,s.jsxs)(a.BV,{children:[(0,s.jsx)(a.qh,{path:"/admin",element:(0,s.jsx)(Wn,{})}),(0,s.jsx)(a.qh,{path:"/admin/form/new",element:(0,s.jsx)(Kn,{})}),(0,s.jsx)(a.qh,{path:"/admin/form/edit/:formId",element:(0,s.jsx)(Kn,{})}),(0,s.jsx)(a.qh,{path:"/admin/results/:formId",element:(0,s.jsx)(Qn,{})}),(0,s.jsx)(a.qh,{path:"/",element:(0,s.jsx)(Wn,{})})," "]})})]})})})})]})})},yi=e=>{e&&e instanceof Function&&n.e(453).then(n.bind(n,453)).then(t=>{let{getCLS:n,getFID:r,getFCP:a,getLCP:o,getTTFB:i}=t;n(e),r(e),a(e),o(e),i(e)})};t.createRoot(document.getElementById("root")).render((0,s.jsx)(e.StrictMode,{children:(0,s.jsx)(gi,{})})),yi()})()})();
3//# sourceMappingURL=main.2c794c77.js.map

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.