@devmoods/postgres-admin 0.17.5 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.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`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){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 s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`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`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function te(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,te(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),te(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=te(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=te(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return te(ee(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ne(e,t,n){if(e==null)return e;var r=[],i=0;return te(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var M=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},N={map:ne,forEach:function(e,t,n){ne(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ne(e,function(){t++}),t},toArray:function(e){return ne(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=N,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:re}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,M)}catch(e){M(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=f();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;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.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.5`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=u(),n=f(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;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.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function ee(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var te=Symbol.for(`react.client.reference`);function ne(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ne(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var re=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},ae=[],oe=-1;function P(e){return{current:e}}function se(e){0>oe||(e.current=ae[oe],ae[oe]=null,oe--)}function F(e,t){oe++,ae[oe]=e.current,e.current=t}var ce=P(null),le=P(null),ue=P(null),de=P(null);function fe(e,t){switch(F(ue,t),F(le,e),F(ce,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}se(ce),F(ce,e)}function pe(){se(ce),se(le),se(ue)}function me(e){e.memoizedState!==null&&F(de,e);var t=ce.current,n=Hd(t,e.type);t!==n&&(F(le,e),F(ce,n))}function he(e){le.current===e&&(se(ce),se(le)),de.current===e&&(se(de),Qf._currentValue=ie)}var ge,_e;function ve(e){if(ge===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ge=t&&t[1]||``,_e=-1<e.stack.indexOf(`
|
|
2
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
-
`+ge+e+_e}var ye=!1;function be(e,t){if(!e||ye)return``;ye=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
-
`),l=s.split(`
|
|
5
|
-
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
-
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ye=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ve(n):``}function xe(e,t){switch(e.tag){case 26:case 27:case 5:return ve(e.type);case 16:return ve(`Lazy`);case 13:return e.child!==t&&t!==null?ve(`Suspense Fallback`):ve(`Suspense`);case 19:return ve(`SuspenseList`);case 0:case 15:return be(e.type,!1);case 11:return be(e.type.render,!1);case 1:return be(e.type,!0);case 31:return ve(`Activity`);default:return``}}function Se(e){try{var t=``,n=null;do t+=xe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
-
Error generating stack: `+e.message+`
|
|
8
|
-
`+e.stack}}var Ce=Object.prototype.hasOwnProperty,we=t.unstable_scheduleCallback,Te=t.unstable_cancelCallback,Ee=t.unstable_shouldYield,De=t.unstable_requestPaint,Oe=t.unstable_now,ke=t.unstable_getCurrentPriorityLevel,Ae=t.unstable_ImmediatePriority,je=t.unstable_UserBlockingPriority,Me=t.unstable_NormalPriority,Ne=t.unstable_LowPriority,Pe=t.unstable_IdlePriority,Fe=t.log,Ie=t.unstable_setDisableYieldValue,Le=null,Re=null;function ze(e){if(typeof Fe==`function`&&Ie(e),Re&&typeof Re.setStrictMode==`function`)try{Re.setStrictMode(Le,e)}catch{}}var Be=Math.clz32?Math.clz32:Ue,Ve=Math.log,He=Math.LN2;function Ue(e){return e>>>=0,e===0?32:31-(Ve(e)/He|0)|0}var We=256,Ge=262144,Ke=4194304;function qe(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Je(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=qe(n))):i=qe(o):i=qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=qe(n))):i=qe(o)):i=qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ye(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ze(){var e=Ke;return Ke<<=1,!(Ke&62914560)&&(Ke=4194304),e}function Qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $e(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function et(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Be(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&tt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function tt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Be(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function nt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Be(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function rt(e,t){var n=t&-t;return n=n&42?1:it(n),(n&(e.suspendedLanes|t))===0?n:0}function it(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function at(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ot(){var e=N.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function st(e,t){var n=N.p;try{return N.p=e,t()}finally{N.p=n}}var ct=Math.random().toString(36).slice(2),lt=`__reactFiber$`+ct,ut=`__reactProps$`+ct,dt=`__reactContainer$`+ct,ft=`__reactEvents$`+ct,pt=`__reactListeners$`+ct,mt=`__reactHandles$`+ct,ht=`__reactResources$`+ct,gt=`__reactMarker$`+ct;function _t(e){delete e[lt],delete e[ut],delete e[ft],delete e[pt],delete e[mt]}function vt(e){var t=e[lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[dt]||n[lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[lt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function yt(e){if(e=e[lt]||e[dt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function bt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function xt(e){var t=e[ht];return t||=e[ht]={hoistableStyles:new Map,hoistableScripts:new Map},t}function St(e){e[gt]=!0}var Ct=new Set,wt={};function Tt(e,t){Et(e,t),Et(e+`Capture`,t)}function Et(e,t){for(wt[e]=t,e=0;e<t.length;e++)Ct.add(t[e])}var Dt=RegExp(`^[: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]*$`),Ot={},kt={};function At(e){return Ce.call(kt,e)?!0:Ce.call(Ot,e)?!1:Dt.test(e)?kt[e]=!0:(Ot[e]=!0,!1)}function jt(e,t,n){if(At(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Mt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Nt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Pt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ft(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function It(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lt(e){if(!e._valueTracker){var t=Ft(e)?`checked`:`value`;e._valueTracker=It(e,t,``+e[t])}}function Rt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ft(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function zt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Bt=/[\n"\\]/g;function Vt(e){return e.replace(Bt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ht(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Pt(t)):e.value!==``+Pt(t)&&(e.value=``+Pt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Wt(e,o,Pt(n)):Wt(e,o,Pt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Pt(s):e.removeAttribute(`name`)}function Ut(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Lt(e);return}n=n==null?``:``+Pt(n),t=t==null?n:``+Pt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Lt(e)}function Wt(e,t,n){t===`number`&&zt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Gt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Pt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Kt(e,t,n){if(t!=null&&(t=``+Pt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Pt(n)}function qt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(re(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Pt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Lt(e)}function Jt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Xt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Yt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Zt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Xt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Xt(e,o,t[o])}function Qt(e){if(e.indexOf(`-`)===-1)return!1;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 $t=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),en=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function tn(e){return en.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function nn(){}var rn=null;function an(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var on=null,sn=null;function cn(e){var t=yt(e);if(t&&(e=t.stateNode)){var n=e[ut]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ht(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Vt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ut]||null;if(!a)throw Error(i(90));Ht(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Rt(r)}break a;case`textarea`:Kt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Gt(e,!!n.multiple,t,!1)}}}var ln=!1;function un(e,t,n){if(ln)return e(t,n);ln=!0;try{return e(t)}finally{if(ln=!1,(on!==null||sn!==null)&&(bu(),on&&(t=on,e=sn,sn=on=null,cn(t),e)))for(t=0;t<e.length;t++)cn(e[t])}}function dn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ut]||null;if(r===null)return null;n=r[t];a: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)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var fn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),pn=!1;if(fn)try{var mn={};Object.defineProperty(mn,`passive`,{get:function(){pn=!0}}),window.addEventListener(`test`,mn,mn),window.removeEventListener(`test`,mn,mn)}catch{pn=!1}var hn=null,gn=null,_n=null;function vn(){if(_n)return _n;var e,t=gn,n=t.length,r,i=`value`in hn?hn.value:hn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return _n=i.slice(e,1<r?1-r:void 0)}function yn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function bn(){return!0}function xn(){return!1}function Sn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?bn:xn,this.isPropagationStopped=xn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=bn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=bn)},persist:function(){},isPersistent:bn}),t}var Cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wn=Sn(Cn),Tn=h({},Cn,{view:0,detail:0}),En=Sn(Tn),Dn,On,kn,An=h({},Tn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==kn&&(kn&&e.type===`mousemove`?(Dn=e.screenX-kn.screenX,On=e.screenY-kn.screenY):On=Dn=0,kn=e),Dn)},movementY:function(e){return`movementY`in e?e.movementY:On}}),jn=Sn(An),Mn=Sn(h({},An,{dataTransfer:0})),Nn=Sn(h({},Tn,{relatedTarget:0})),Pn=Sn(h({},Cn,{animationName:0,elapsedTime:0,pseudoElement:0})),Fn=Sn(h({},Cn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),In=Sn(h({},Cn,{data:0})),Ln={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Rn={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`},zn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Bn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zn[e])?!!t[e]:!1}function Vn(){return Bn}var Hn=Sn(h({},Tn,{key:function(e){if(e.key){var t=Ln[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=yn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Rn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vn,charCode:function(e){return e.type===`keypress`?yn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?yn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Un=Sn(h({},An,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Wn=Sn(h({},Tn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vn})),Gn=Sn(h({},Cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Kn=Sn(h({},An,{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})),qn=Sn(h({},Cn,{newState:0,oldState:0})),Jn=[9,13,27,32],Yn=fn&&`CompositionEvent`in window,Xn=null;fn&&`documentMode`in document&&(Xn=document.documentMode);var Zn=fn&&`TextEvent`in window&&!Xn,Qn=fn&&(!Yn||Xn&&8<Xn&&11>=Xn),$n=` `,er=!1;function tr(e,t){switch(e){case`keyup`:return Jn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function nr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var rr=!1;function ir(e,t){switch(e){case`compositionend`:return nr(t);case`keypress`:return t.which===32?(er=!0,$n):null;case`textInput`:return e=t.data,e===$n&&er?null:e;default:return null}}function ar(e,t){if(rr)return e===`compositionend`||!Yn&&tr(e,t)?(e=vn(),_n=gn=hn=null,rr=!1,e):null;switch(e){case`paste`: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 Qn&&t.locale!==`ko`?null:t.data;default:return null}}var or={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 sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!or[e.type]:t===`textarea`}function cr(e,t,n,r){on?sn?sn.push(r):sn=[r]:on=r,t=Ed(t,`onChange`),0<t.length&&(n=new wn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var lr=null,ur=null;function dr(e){yd(e,0)}function fr(e){if(Rt(bt(e)))return e}function pr(e,t){if(e===`change`)return t}var mr=!1;if(fn){var hr;if(fn){var gr=`oninput`in document;if(!gr){var _r=document.createElement(`div`);_r.setAttribute(`oninput`,`return;`),gr=typeof _r.oninput==`function`}hr=gr}else hr=!1;mr=hr&&(!document.documentMode||9<document.documentMode)}function vr(){lr&&(lr.detachEvent(`onpropertychange`,yr),ur=lr=null)}function yr(e){if(e.propertyName===`value`&&fr(ur)){var t=[];cr(t,ur,e,an(e)),un(dr,t)}}function br(e,t,n){e===`focusin`?(vr(),lr=t,ur=n,lr.attachEvent(`onpropertychange`,yr)):e===`focusout`&&vr()}function xr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return fr(ur)}function Sr(e,t){if(e===`click`)return fr(t)}function Cr(e,t){if(e===`input`||e===`change`)return fr(t)}function wr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Tr=typeof Object.is==`function`?Object.is:wr;function Er(e,t){if(Tr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!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 i=n[r];if(!Ce.call(t,i)||!Tr(e[i],t[i]))return!1}return!0}function Dr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Or(e,t){var n=Dr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Dr(n)}}function kr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ar(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=zt(e.document)}return t}function jr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Mr=fn&&`documentMode`in document&&11>=document.documentMode,Nr=null,Pr=null,Fr=null,Ir=!1;function Lr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ir||Nr==null||Nr!==zt(r)||(r=Nr,`selectionStart`in r&&jr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Fr&&Er(Fr,r)||(Fr=r,r=Ed(Pr,`onSelect`),0<r.length&&(t=new wn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Nr)))}function Rr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var zr={animationend:Rr(`Animation`,`AnimationEnd`),animationiteration:Rr(`Animation`,`AnimationIteration`),animationstart:Rr(`Animation`,`AnimationStart`),transitionrun:Rr(`Transition`,`TransitionRun`),transitionstart:Rr(`Transition`,`TransitionStart`),transitioncancel:Rr(`Transition`,`TransitionCancel`),transitionend:Rr(`Transition`,`TransitionEnd`)},Br={},Vr={};fn&&(Vr=document.createElement(`div`).style,`AnimationEvent`in window||(delete zr.animationend.animation,delete zr.animationiteration.animation,delete zr.animationstart.animation),`TransitionEvent`in window||delete zr.transitionend.transition);function Hr(e){if(Br[e])return Br[e];if(!zr[e])return e;var t=zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Vr)return Br[e]=t[n];return e}var Ur=Hr(`animationend`),Wr=Hr(`animationiteration`),Gr=Hr(`animationstart`),Kr=Hr(`transitionrun`),qr=Hr(`transitionstart`),Jr=Hr(`transitioncancel`),Yr=Hr(`transitionend`),Xr=new Map,Zr=`abort auxClick beforeToggle 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(` `);Zr.push(`scrollEnd`);function Qr(e,t){Xr.set(e,t),Tt(t,[e])}var $r=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ei=[],ti=0,ni=0;function ri(){for(var e=ti,t=ni=ti=0;t<e;){var n=ei[t];ei[t++]=null;var r=ei[t];ei[t++]=null;var i=ei[t];ei[t++]=null;var a=ei[t];if(ei[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&si(n,i,a)}}function ii(e,t,n,r){ei[ti++]=e,ei[ti++]=t,ei[ti++]=n,ei[ti++]=r,ni|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ai(e,t,n,r){return ii(e,t,n,r),ci(e)}function oi(e,t){return ii(e,null,null,t),ci(e)}function si(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Be(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ci(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var li={};function ui(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.refCleanup=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 di(e,t,n,r){return new ui(e,t,n,r)}function fi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pi(e,t){var n=e.alternate;return n===null?(n=di(e.tag,t,e.key,e.mode),n.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=e.flags&65011712,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=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function mi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function hi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)fi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,ce.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=di(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return gi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=di(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=di(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=di(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=di(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function gi(e,t,n,r){return e=di(7,e,r,t),e.lanes=n,e}function _i(e,t,n){return e=di(6,e,null,t),e.lanes=n,e}function vi(e){var t=di(18,null,null,0);return t.stateNode=e,t}function yi(e,t,n){return t=di(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var bi=new WeakMap;function xi(e,t){if(typeof e==`object`&&e){var n=bi.get(e);return n===void 0?(t={value:e,source:t,stack:Se(t)},bi.set(e,t),t):n}return{value:e,source:t,stack:Se(t)}}var Si=[],Ci=0,wi=null,Ti=0,Ei=[],Di=0,Oi=null,ki=1,Ai=``;function ji(e,t){Si[Ci++]=Ti,Si[Ci++]=wi,wi=e,Ti=t}function Mi(e,t,n){Ei[Di++]=ki,Ei[Di++]=Ai,Ei[Di++]=Oi,Oi=e;var r=ki;e=Ai;var i=32-Be(r)-1;r&=~(1<<i),n+=1;var a=32-Be(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ki=1<<32-Be(t)+i|n<<i|r,Ai=a+e}else ki=1<<a|n<<i|r,Ai=e}function Ni(e){e.return!==null&&(ji(e,1),Mi(e,1,0))}function Pi(e){for(;e===wi;)wi=Si[--Ci],Si[Ci]=null,Ti=Si[--Ci],Si[Ci]=null;for(;e===Oi;)Oi=Ei[--Di],Ei[Di]=null,Ai=Ei[--Di],Ei[Di]=null,ki=Ei[--Di],Ei[Di]=null}function Fi(e,t){Ei[Di++]=ki,Ei[Di++]=Ai,Ei[Di++]=Oi,ki=t.id,Ai=t.overflow,Oi=e}var Ii=null,Li=null,I=!1,Ri=null,zi=!1,Bi=Error(i(519));function Vi(e){throw qi(xi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Bi}function Hi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[lt]=e,t[ut]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Ut(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),qt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=nn),t=!0):t=!1,t||Vi(e,!0)}function Ui(e){for(Ii=e.return;Ii;)switch(Ii.tag){case 5:case 31:case 13:zi=!1;return;case 27:case 3:zi=!0;return;default:Ii=Ii.return}}function Wi(e){if(e!==Ii)return!1;if(!I)return Ui(e),I=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&Li&&Vi(e),Ui(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Li=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Li=uf(e)}else t===27?(t=Li,Zd(e.type)?(e=lf,lf=null,Li=e):Li=t):Li=Ii?cf(e.stateNode.nextSibling):null;return!0}function Gi(){Li=Ii=null,I=!1}function Ki(){var e=Ri;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Ri=null),e}function qi(e){Ri===null?Ri=[e]:Ri.push(e)}var Ji=P(null),Yi=null,Xi=null;function Zi(e,t,n){F(Ji,t._currentValue),t._currentValue=n}function Qi(e){e._currentValue=Ji.current,se(Ji)}function $i(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ea(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),$i(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),$i(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ta(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Tr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===de.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&ea(t,e,n,r),t.flags|=262144}function na(e){for(e=e.firstContext;e!==null;){if(!Tr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ra(e){Yi=e,Xi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ia(e){return oa(Yi,e)}function aa(e,t){return Yi===null&&ra(e),oa(e,t)}function oa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Xi===null){if(e===null)throw Error(i(308));Xi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Xi=Xi.next=t;return n}var sa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ca=t.unstable_scheduleCallback,la=t.unstable_NormalPriority,ua={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function da(){return{controller:new sa,data:new Map,refCount:0}}function fa(e){e.refCount--,e.refCount===0&&ca(la,function(){e.controller.abort()})}var pa=null,ma=0,ha=0,ga=null;function L(e,t){if(pa===null){var n=pa=[];ma=0,ha=dd(),ga={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ma++,t.then(_a,_a),t}function _a(){if(--ma===0&&pa!==null){ga!==null&&(ga.status=`fulfilled`);var e=pa;pa=null,ha=0,ga=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function va(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ya=M.S;M.S=function(e,t){eu=Oe(),typeof t==`object`&&t&&typeof t.then==`function`&&L(e,t),ya!==null&&ya(e,t)};var ba=P(null);function xa(){var e=ba.current;return e===null?Rl.pooledCache:e}function Sa(e,t){t===null?F(ba,ba.current):F(ba,t.pool)}function Ca(){var e=xa();return e===null?null:{parent:ua._currentValue,pool:e}}var wa=Error(i(460)),Ta=Error(i(474)),Ea=Error(i(542)),Da={then:function(){}};function Oa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ka(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(nn,nn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e;default:if(typeof t.status==`string`)t.then(nn,nn);else{if(e=Rl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e}throw ja=t,wa}}function Aa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ja=e,wa):e}}var ja=null;function Ma(){if(ja===null)throw Error(i(459));var e=ja;return ja=null,e}function Na(e){if(e===wa||e===Ea)throw Error(i(483))}var R=null,Pa=0;function Fa(e){var t=Pa;return Pa+=1,R===null&&(R=[]),ka(R,e,t)}function Ia(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function La(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ra(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=pi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=_i(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Aa(i)===t.type)?(t=a(t,n.props),Ia(t,n),t.return=e,t):(t=hi(n.type,n.key,n.props,null,e.mode,r),Ia(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=yi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=gi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=_i(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=hi(t.type,t.key,t.props,null,e.mode,n),Ia(n,t),n.return=e,n;case v:return t=yi(t,e.mode,n),t.return=e,t;case O:return t=Aa(t),f(e,t,n)}if(re(t)||ee(t))return t=gi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Fa(t),n);if(t.$$typeof===C)return f(e,aa(e,t),n);La(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Aa(n),p(e,t,n,r)}if(re(n)||ee(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Fa(n),r);if(n.$$typeof===C)return p(e,t,aa(e,n),r);La(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Aa(r),m(e,t,n,r,i)}if(re(r)||ee(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Fa(r),i);if(r.$$typeof===C)return m(e,t,n,aa(t,r),i);La(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),I&&ji(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return I&&ji(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),I&&ji(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),I&&ji(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return I&&ji(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),I&&ji(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Aa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ia(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=gi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=hi(o.type,o.key,o.props,null,e.mode,c),Ia(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=yi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Aa(o),b(e,r,o,c)}if(re(o))return h(e,r,o,c);if(ee(o)){if(l=ee(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Fa(o),c);if(o.$$typeof===C)return b(e,r,aa(e,o),c);La(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=_i(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Pa=0;var i=b(e,t,n,r);return R=null,i}catch(t){if(t===wa||t===Ea)throw t;var a=di(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var za=Ra(!0),Ba=Ra(!1),Va=!1;function Ha(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ua(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Wa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,q&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ci(e),si(e,null,n),t}return ii(e,r,t,n),ci(e)}function Ka(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}function qa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ja=!1;function Ya(){if(Ja){var e=ga;if(e!==null)throw e}}function Xa(e,t,n,r){Ja=!1;var i=e.updateQueue;Va=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===ha&&(Ja=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Va=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Za(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Za(n[e],t)}var $a=P(null),eo=P(0);function to(e,t){e=Ul,F(eo,e),F($a,t),Ul=e|t.baseLanes}function no(){F(eo,Ul),F($a,$a.current)}function ro(){Ul=eo.current,se($a),se(eo)}var io=P(null),ao=null;function oo(e){var t=e.alternate;F(fo,fo.current&1),F(io,e),ao===null&&(t===null||$a.current!==null||t.memoizedState!==null)&&(ao=e)}function so(e){F(fo,fo.current),F(io,e),ao===null&&(ao=e)}function co(e){e.tag===22?(F(fo,fo.current),F(io,e),ao===null&&(ao=e)):lo(e)}function lo(){F(fo,fo.current),F(io,io.current)}function uo(e){se(io),ao===e&&(ao=null),se(fo)}var fo=P(0);function po(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mo=0,z=null,ho=null,go=null,_o=!1,vo=!1,yo=!1,bo=0,xo=0,So=null,Co=0;function wo(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tr(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return mo=a,z=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Vs:Hs,yo=!1,a=n(r,i),yo=!1,vo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){M.H=Bs;var t=ho!==null&&ho.next!==null;if(mo=0,go=ho=z=null,_o=!1,xo=0,So=null,t)throw Error(i(300));e===null||ic||(e=e.dependencies,e!==null&&na(e)&&(ic=!0))}function Oo(e,t,n,r){z=e;var a=0;do{if(vo&&(So=null),xo=0,vo=!1,25<=a)throw Error(i(301));if(a+=1,go=ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=Us,o=t(n,r)}while(vo);return o}function ko(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?Io(t):t,e=e.useState()[0],(ho===null?null:ho.memoizedState)!==e&&(z.flags|=1024),t}function Ao(){var e=bo!==0;return bo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}mo=0,go=ho=z=null,vo=!1,xo=bo=0,So=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return go===null?z.memoizedState=go=e:go=go.next=e,go}function Po(){if(ho===null){var e=z.alternate;e=e===null?null:e.memoizedState}else e=ho.next;var t=go===null?z.memoizedState:go.next;if(t!==null)go=t,ho=e;else{if(e===null)throw z.alternate===null?Error(i(467)):Error(i(310));ho=e,e={memoizedState:ho.memoizedState,baseState:ho.baseState,baseQueue:ho.baseQueue,queue:ho.queue,next:null},go===null?z.memoizedState=go=e:go=go.next=e}return go}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=xo;return xo+=1,So===null&&(So=[]),e=ka(So,e,t),t=z,(go===null?t.memoizedState:go.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Vs:Hs),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Io(e);if(e.$$typeof===C)return ia(e)}throw Error(i(438,String(e)))}function Ro(e){var t=null,n=z.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=z.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Fo(),z.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){return Vo(Po(),ho,e)}function Vo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(mo&f)===f:(Y&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ha&&(d=!0);else if((mo&p)===p){u=u.next,p===ha&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,z.lanes|=p,Gl|=p;f=u.action,yo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,z.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Tr(o,e.memoizedState)&&(ic=!0,d&&(n=ga,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ho(e){var t=Po(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Tr(o,t.memoizedState)||(ic=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Uo(e,t,n){var r=z,a=Po(),o=I;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Tr((ho||a).memoizedState,n);if(s&&(a.memoizedState=n,ic=!0),a=a.queue,fs(Ko.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||go!==null&&go.memoizedState.tag&1){if(r.flags|=2048,V(9,{destroy:void 0},Go.bind(null,r,a,n,t),null),Rl===null)throw Error(i(349));o||mo&127||Wo(r,t,n)}return n}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=z.updateQueue,t===null?(t=Fo(),z.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tr(e,n)}catch{return!0}}function Jo(e){var t=oi(e,2);t!==null&&hu(t,e,2)}function Yo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),yo){ze(!0);try{n()}finally{ze(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t}function Xo(e,t,n,r){return e.baseState=n,Vo(e,ho,typeof r==`function`?r:zo)}function Zo(e,t,n,r,a){if(Ls(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),$o(e,t,s)}catch(n){ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),$o(e,t,a)}catch(n){ts(e,t,n)}}function $o(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){es(e,t,n)},function(n){return ts(e,t,n)}):es(e,t,n)}function es(e,t,n){t.status=`fulfilled`,t.value=n,B(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qo(e,n)))}function ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,B(t),t=t.next;while(t!==r)}e.action=null}function B(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ns(e,t){return t}function rs(e,t){if(I){var n=Rl.formState;if(n!==null){a:{var r=z;if(I){if(Li){b:{for(var i=Li,a=zi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Li=cf(i.nextSibling),r=i.data===`F!`;break a}}Vi(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:t},n.queue=r,n=Ps.bind(null,z,r),r.dispatch=n,r=Yo(!1),a=Is.bind(null,z,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zo.bind(null,z,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function is(e){return as(Po(),ho,e)}function as(e,t,n){if(t=Vo(e,t,ns)[0],e=Bo(zo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Io(t)}catch(e){throw e===wa?Ea:e}else r=t;t=Po();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(z.flags|=2048,V(9,{destroy:void 0},os.bind(null,i,n),null)),[r,a,e]}function os(e,t){e.action=t}function ss(e){var t=Po(),n=ho;if(n!==null)return as(t,n,e);Po(),t=t.memoizedState,n=Po();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function V(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=z.updateQueue,t===null&&(t=Fo(),z.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function cs(){return Po().memoizedState}function ls(e,t,n,r){var i=No();z.flags|=e,i.memoizedState=V(1|t,{destroy:void 0},n,r===void 0?null:r)}function us(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=i.memoizedState.inst;ho!==null&&r!==null&&To(r,ho.memoizedState.deps)?i.memoizedState=V(t,a,n,r):(z.flags|=e,i.memoizedState=V(1|t,a,n,r))}function ds(e,t){ls(8390656,8,e,t)}function fs(e,t){us(2048,8,e,t)}function ps(e){z.flags|=4;var t=z.updateQueue;if(t===null)t=Fo(),z.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ms(e){var t=Po().memoizedState;return ps({ref:t,nextImpl:e}),function(){if(q&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function hs(e,t){return us(4,2,e,t)}function gs(e,t){return us(4,4,e,t)}function _s(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vs(e,t,n){n=n==null?null:n.concat([e]),us(4,4,_s.bind(null,t,e),n)}function ys(){}function bs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),yo){ze(!0);try{e()}finally{ze(!1)}}return n.memoizedState=[r,t],r}function Ss(e,t,n){return n===void 0||mo&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),z.lanes|=e,Gl|=e,n)}function Cs(e,t,n,r){return Tr(n,t)?n:$a.current===null?!(mo&42)||mo&1073741824&&!(Y&261930)?(ic=!0,e.memoizedState=n):(e=mu(),z.lanes|=e,Gl|=e,t):(e=Ss(e,n,r),Tr(e,t)||(ic=!0),e)}function ws(e,t,n,r,i){var a=N.p;N.p=a!==0&&8>a?a:8;var o=M.T,s={};M.T=s,Is(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Fs(e,t,va(c,r),pu(e)):Fs(e,t,r,pu(e))}catch(n){Fs(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function Ts(){}function Es(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ds(e).queue;ws(e,a,t,ie,n===null?Ts:function(){return Os(e),n(r)})}function Ds(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Os(e){var t=Ds(e);t.next===null&&(t=e.alternate.memoizedState),Fs(e,t.next.queue,{},pu())}function ks(){return ia(Qf)}function As(){return Po().memoizedState}function js(){return Po().memoizedState}function Ms(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Wa(n);var r=Ga(t,e,n);r!==null&&(hu(r,t,n),Ka(r,t,n)),t={cache:da()},e.payload=t;return}t=t.return}}function Ns(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ls(e)?Rs(t,n):(n=ai(e,t,n,r),n!==null&&(hu(n,e,r),zs(n,t,r)))}function Ps(e,t,n){Fs(e,t,n,pu())}function Fs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ls(e))Rs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Tr(s,o))return ii(e,t,i,0),Rl===null&&ri(),!1}catch{}if(n=ai(e,t,i,r),n!==null)return hu(n,e,r),zs(n,t,r),!0}return!1}function Is(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ls(e)){if(t)throw Error(i(479))}else t=ai(e,n,r,2),t!==null&&hu(t,e,2)}function Ls(e){var t=e.alternate;return e===z||t!==null&&t===z}function Rs(e,t){vo=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}var Bs={readContext:ia,use:Lo,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useLayoutEffect:wo,useInsertionEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useSyncExternalStore:wo,useId:wo,useHostTransitionStatus:wo,useFormState:wo,useActionState:wo,useOptimistic:wo,useMemoCache:wo,useCacheRefresh:wo};Bs.useEffectEvent=wo;var Vs={readContext:ia,use:Lo,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:ia,useEffect:ds,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ls(4194308,4,_s.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ls(4194308,4,e,t)},useInsertionEffect:function(e,t){ls(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(yo){ze(!0);try{e()}finally{ze(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(yo){ze(!0);try{n(t)}finally{ze(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ns.bind(null,z,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Ps.bind(null,z,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ys,useDeferredValue:function(e,t){return Ss(No(),e,t)},useTransition:function(){var e=Yo(!1);return e=ws.bind(null,z,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=z,a=No();if(I){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Rl===null)throw Error(i(349));Y&127||Wo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ds(Ko.bind(null,r,o,e),[e]),r.flags|=2048,V(9,{destroy:void 0},Go.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=Rl.identifierPrefix;if(I){var n=Ai,r=ki;n=(r&~(1<<32-Be(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Co++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ks,useFormState:rs,useActionState:rs,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Is.bind(null,z,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return No().memoizedState=Ms.bind(null,z)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(q&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Hs={readContext:ia,use:Lo,useCallback:bs,useContext:ia,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Bo,useRef:cs,useState:function(){return Bo(zo)},useDebugValue:ys,useDeferredValue:function(e,t){return Cs(Po(),ho.memoizedState,e,t)},useTransition:function(){var e=Bo(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:As,useHostTransitionStatus:ks,useFormState:is,useActionState:is,useOptimistic:function(e,t){return Xo(Po(),ho,e,t)},useMemoCache:Ro,useCacheRefresh:js};Hs.useEffectEvent=ms;var Us={readContext:ia,use:Lo,useCallback:bs,useContext:ia,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Ho,useRef:cs,useState:function(){return Ho(zo)},useDebugValue:ys,useDeferredValue:function(e,t){var n=Po();return ho===null?Ss(n,e,t):Cs(n,ho.memoizedState,e,t)},useTransition:function(){var e=Ho(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:As,useHostTransitionStatus:ks,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){var n=Po();return ho===null?(n.baseState=e,[e,n.queue.dispatch]):Xo(n,ho,e,t)},useMemoCache:Ro,useCacheRefresh:js};Us.useEffectEvent=ms;function Ws(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var H={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Wa(r);i.payload=t,n!=null&&(i.callback=n),t=Ga(e,i,r),t!==null&&(hu(t,e,r),Ka(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Wa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ga(e,i,r),t!==null&&(hu(t,e,r),Ka(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Wa(n);r.tag=2,t!=null&&(r.callback=t),t=Ga(e,r,n),t!==null&&(hu(t,e,n),Ka(t,e,n))}};function Gs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Er(n,r)||!Er(i,a):!0}function Ks(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&H.enqueueReplaceState(t,t.state,null)}function qs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Js(e){$r(e)}function Ys(e){console.error(e)}function Xs(e){$r(e)}function Zs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Qs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function $s(e,t,n){return n=Wa(n),n.tag=3,n.payload={element:null},n.callback=function(){Zs(e,t)},n}function ec(e){return e=Wa(e),e.tag=3,e}function tc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Qs(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function nc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ta(t,n,a,!0),n=io.current,n!==null){switch(n.tag){case 31:case 13:return ao===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Du(),!1}if(I)return t=io.current,t===null?(r!==Bi&&(t=Error(i(423),{cause:r}),qi(xi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=xi(r,n),a=$s(e.stateNode,r,a),qa(e,a),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Bi&&(e=Error(i(422),{cause:r}),qi(xi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=xi(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=xi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=$s(n.stateNode,r,e),qa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ec(a),tc(a,e,n,r),qa(n,a),!1}n=n.return}while(n!==null);return!1}var rc=Error(i(461)),ic=!1;function ac(e,t,n,r){t.child=e===null?Ba(t,null,n,r):za(t,e.child,n,r)}function oc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ra(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!ic?(jo(e,t,i),Dc(e,t,i)):(I&&s&&Ni(t),t.flags|=1,ac(e,t,r,i),t.child)}function sc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!fi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,cc(e,t,a,r,i)):(e=hi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Oc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Er:n,n(o,r)&&e.ref===t.ref)return Dc(e,t,i)}return t.flags|=1,e=pi(a,r),e.ref=t.ref,e.return=t,t.child=e}function cc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Er(a,r)&&e.ref===t.ref)if(ic=!1,t.pendingProps=r=a,Oc(e,i))e.flags&131072&&(ic=!0);else return t.lanes=e.lanes,Dc(e,t,i)}return pc(e,t,n,r,i)}function U(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return W(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Sa(t,a===null?null:a.cachePool),a===null?no():to(t,a),co(t);else return r=t.lanes=536870912,W(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Sa(t,null),no(),lo(t)):(Sa(t,a.cachePool),to(t,a),lo(t),t.memoizedState=null);return ac(e,t,i,n),t.child}function lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function W(e,t,n,r,i){var a=xa();return a=a===null?null:{parent:ua._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Sa(t,null),no(),co(t),e!==null&&ta(e,t,r,!0),t.childLanes=i,null}function G(e,t){return t=Sc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function uc(e,t,n){return za(t,e.child,null,n),e=G(t,t.pendingProps),e.flags|=2,uo(t),t.memoizedState=null,e}function dc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(I){if(r.mode===`hidden`)return e=G(t,r),t.lanes=536870912,lc(null,e);if(so(t),(e=Li)?(e=rf(e,zi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Oi===null?null:{id:ki,overflow:Ai},retryLane:536870912,hydrationErrors:null},n=vi(e),n.return=t,t.child=n,Ii=t,Li=null)):e=null,e===null)throw Vi(t);return t.lanes=536870912,null}return G(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(so(t),a)if(t.flags&256)t.flags&=-257,t=uc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ic||ta(e,t,n,!1),a=(n&e.childLanes)!==0,ic||a){if(r=Rl,r!==null&&(s=rt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,oi(e,s),hu(r,e,s),rc;Du(),t=uc(e,t,n)}else e=o.treeContext,Li=cf(s.nextSibling),Ii=t,I=!0,Ri=null,zi=!1,e!==null&&Fi(t,e),t=G(t,r),t.flags|=4096;return t}return e=pi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function pc(e,t,n,r,i){return ra(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!ic?(jo(e,t,i),Dc(e,t,i)):(I&&r&&Ni(t),t.flags|=1,ac(e,t,n,i),t.child)}function mc(e,t,n,r,i,a){return ra(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!ic?(jo(e,t,a),Dc(e,t,a)):(I&&r&&Ni(t),t.flags|=1,ac(e,t,n,a),t.child)}function hc(e,t,n,r,i){if(ra(t),t.stateNode===null){var a=li,o=n.contextType;typeof o==`object`&&o&&(a=ia(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=H,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ha(t),o=n.contextType,a.context=typeof o==`object`&&o?ia(o):li,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ws(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&H.enqueueReplaceState(a,a.state,null),Xa(t,r,a,i),Ya(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=li,typeof u==`object`&&u&&(o=ia(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ks(t,a,r,o),Va=!1;var f=t.memoizedState;a.state=f,Xa(t,r,a,i),Ya(),l=t.memoizedState,s||f!==l||Va?(typeof d==`function`&&(Ws(t,n,d,r),l=t.memoizedState),(c=Va||Gs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ua(e,t),o=t.memoizedProps,u=qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=li,typeof l==`object`&&l&&(c=ia(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ks(t,a,r,c),Va=!1,f=t.memoizedState,a.state=f,Xa(t,r,a,i),Ya();var p=t.memoizedState;o!==d||f!==p||Va||e!==null&&e.dependencies!==null&&na(e.dependencies)?(typeof s==`function`&&(Ws(t,n,s,r),p=t.memoizedState),(u=Va||Gs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&na(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,fc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=za(t,e.child,null,i),t.child=za(t,null,n,i)):ac(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Dc(e,t,i),e}function gc(e,t,n,r){return Gi(),t.flags|=256,ac(e,t,n,r),t.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:Ca()}}function yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function bc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(fo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(I){if(a?oo(t):lo(t),(e=Li)?(e=rf(e,zi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Oi===null?null:{id:ki,overflow:Ai},retryLane:536870912,hydrationErrors:null},n=vi(e),n.return=t,t.child=n,Ii=t,Li=null)):e=null,e===null)throw Vi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(lo(t),a=t.mode,c=Sc({mode:`hidden`,children:c},a),r=gi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,lc(null,r)):(oo(t),xc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(oo(t),t.flags&=-257,t=Cc(e,t,n)):t.memoizedState===null?(lo(t),c=r.fallback,a=t.mode,r=Sc({mode:`visible`,children:r.children},a),c=gi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,za(t,e.child,null,n),r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,t=lc(null,r)):(lo(t),t.child=e.child,t.flags|=128,t=null);else if(oo(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,qi({value:r,source:null,stack:null}),t=Cc(e,t,n)}else if(ic||ta(e,t,n,!1),s=(n&e.childLanes)!==0,ic||s){if(s=Rl,s!==null&&(r=rt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,oi(e,r),hu(s,e,r),rc;af(c)||Du(),t=Cc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Li=cf(c.nextSibling),Ii=t,I=!0,Ri=null,zi=!1,e!==null&&Fi(t,e),t=xc(t,r.children),t.flags|=4096);return t}return a?(lo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=pi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=gi(c,a,n,null),c.flags|=2):c=pi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,lc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=vc(n):(a=c.cachePool,a===null?a=Ca():(l=ua._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=yc(e,s,n),t.memoizedState=_c,lc(e.child,r)):(oo(t),n=e.child,e=n.sibling,n=pi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function xc(e,t){return t=Sc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Sc(e,t){return e=di(22,e,null,t),e.lanes=0,e}function Cc(e,t,n){return za(t,e.child,null,n),e=xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$i(e.return,t,n)}function Tc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ec(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=fo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,F(fo,o),ac(e,t,r,n),r=I?Ti:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wc(e,n,t);else if(e.tag===19)wc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&po(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Tc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&po(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Tc(t,!0,n,null,a,r);break;case`together`:Tc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Dc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ta(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=pi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Oc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&na(e))):!0}function kc(e,t,n){switch(t.tag){case 3:fe(t,t.stateNode.containerInfo),Zi(t,ua,e.memoizedState.cache),Gi();break;case 27:case 5:me(t);break;case 4:fe(t,t.stateNode.containerInfo);break;case 10:Zi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,so(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(oo(t),e=Dc(e,t,n),e===null?null:e.sibling):bc(e,t,n):(oo(t),t.flags|=128,null);oo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ta(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ec(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),F(fo,fo.current),r)break;return null;case 22:return t.lanes=0,U(e,t,n,t.pendingProps);case 24:Zi(t,ua,e.memoizedState.cache)}return Dc(e,t,n)}function Ac(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ic=!0;else{if(!Oc(e,n)&&!(t.flags&128))return ic=!1,kc(e,t,n);ic=!!(e.flags&131072)}else ic=!1,I&&t.flags&1048576&&Mi(t,Ti,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Aa(t.elementType),t.type=e,typeof e==`function`)fi(e)?(r=qs(e,r),t.tag=1,t=hc(null,t,e,r,n)):(t.tag=0,t=pc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=oc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=sc(null,t,e,r,n);break a}}throw t=ne(e)||e,Error(i(306,t,``))}}return t;case 0:return pc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=qs(r,t.pendingProps),hc(e,t,r,a,n);case 3:a:{if(fe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ua(e,t),Xa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Zi(t,ua,r),r!==o.cache&&ea(t,[ua],n,!0),Ya(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=gc(e,t,r,n);break a}else if(r!==a){a=xi(Error(i(424)),t),qi(a),t=gc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Li=cf(e.firstChild),Ii=t,I=!0,Ri=null,zi=!0,n=Ba(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Gi(),r===a){t=Dc(e,t,n);break a}ac(e,t,r,n)}t=t.child}return t;case 26:return fc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:I||(n=t.type,e=t.pendingProps,r=Bd(ue.current).createElement(n),r[lt]=t,r[ut]=e,Pd(r,n,e),St(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return me(t),e===null&&I&&(r=t.stateNode=ff(t.type,t.pendingProps,ue.current),Ii=t,zi=!0,a=Li,Zd(t.type)?(lf=a,Li=cf(r.firstChild)):Li=a),ac(e,t,t.pendingProps.children,n),fc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&I&&((a=r=Li)&&(r=tf(r,t.type,t.pendingProps,zi),r===null?a=!1:(t.stateNode=r,Ii=t,Li=cf(r.firstChild),zi=!1,a=!0)),a||Vi(t)),me(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),Qf._currentValue=a),fc(e,t),ac(e,t,r,n),t.child;case 6:return e===null&&I&&((e=n=Li)&&(n=nf(n,t.pendingProps,zi),n===null?e=!1:(t.stateNode=n,Ii=t,Li=null,e=!0)),e||Vi(t)),null;case 13:return bc(e,t,n);case 4:return fe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=za(t,null,r,n):ac(e,t,r,n),t.child;case 11:return oc(e,t,t.type,t.pendingProps,n);case 7:return ac(e,t,t.pendingProps,n),t.child;case 8:return ac(e,t,t.pendingProps.children,n),t.child;case 12:return ac(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Zi(t,t.type,r.value),ac(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ra(t),a=ia(a),r=r(a),t.flags|=1,ac(e,t,r,n),t.child;case 14:return sc(e,t,t.type,t.pendingProps,n);case 15:return cc(e,t,t.type,t.pendingProps,n);case 19:return Ec(e,t,n);case 31:return dc(e,t,n);case 22:return U(e,t,n,t.pendingProps);case 24:return ra(t),r=ia(ua),e===null?(a=xa(),a===null&&(a=Rl,o=da(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ha(t),Zi(t,ua,a)):((e.lanes&n)!==0&&(Ua(e,t),Xa(t,null,null,n),Ya()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Zi(t,ua,r),r!==a.cache&&ea(t,[ua],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Zi(t,ua,r))),ac(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function jc(e){e.flags|=4}function Mc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw ja=Da,Ta}else e.flags&=-16777217}function Nc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw ja=Da,Ta}function Pc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ze(),e.lanes|=t,Yl|=t)}function Fc(e,t){if(!I)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ic(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Lc(e,t,n){var r=t.pendingProps;switch(Pi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ic(t),null;case 1:return Ic(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Qi(ua),pe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Wi(t)?jc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ki())),Ic(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(jc(t),o===null?(Ic(t),Mc(t,a,null,r,n)):(Ic(t),Nc(t,o))):o?o===e.memoizedState?(Ic(t),t.flags&=-16777217):(jc(t),Ic(t),Nc(t,o)):(e=e.memoizedProps,e!==r&&jc(t),Ic(t),Mc(t,a,e,r,n)),null;case 27:if(he(t),n=ue.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ic(t),null}e=ce.current,Wi(t)?Hi(t,e):(e=ff(a,r,n),t.stateNode=e,jc(t))}return Ic(t),null;case 5:if(he(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ic(t),null}if(o=ce.current,Wi(t))Hi(t,o);else{var s=Bd(ue.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[lt]=t,o[ut]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&jc(t)}}return Ic(t),Mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ue.current,Wi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ii,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[lt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Vi(t,!0)}else e=Bd(e).createTextNode(r),e[lt]=t,t.stateNode=e}return Ic(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Wi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[lt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),e=!1}else n=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(uo(t),t):(uo(t),null);if(t.flags&128)throw Error(i(558))}return Ic(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Wi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[lt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),a=!1}else a=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(uo(t),t):(uo(t),null)}return uo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Pc(t,t.updateQueue),Ic(t),null);case 4:return pe(),e===null&&Sd(t.stateNode.containerInfo),Ic(t),null;case 10:return Qi(t.type),Ic(t),null;case 19:if(se(fo),r=t.memoizedState,r===null)return Ic(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Fc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=po(e),o!==null){for(t.flags|=128,Fc(r,!1),e=o.updateQueue,t.updateQueue=e,Pc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)mi(n,e),n=n.sibling;return F(fo,fo.current&1|2),I&&ji(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Oe()>tu&&(t.flags|=128,a=!0,Fc(r,!1),t.lanes=4194304)}else{if(!a)if(e=po(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Pc(t,e),Fc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!I)return Ic(t),null}else 2*Oe()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Fc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Ic(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Oe(),e.sibling=null,n=fo.current,F(fo,a?n&1|2:n&1),I&&ji(t,r.treeForkCount),e);case 22:case 23:return uo(t),ro(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ic(t),t.subtreeFlags&6&&(t.flags|=8192)):Ic(t),n=t.updateQueue,n!==null&&Pc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&se(ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qi(ua),Ic(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Rc(e,t){switch(Pi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qi(ua),pe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return he(t),null;case 31:if(t.memoizedState!==null){if(uo(t),t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(uo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(fo),null;case 4:return pe(),null;case 10:return Qi(t.type),null;case 22:case 23:return uo(t),ro(),e!==null&&se(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qi(ua),null;case 25:return null;default:return null}}function zc(e,t){switch(Pi(t),t.tag){case 3:Qi(ua),pe();break;case 26:case 27:case 5:he(t);break;case 4:pe();break;case 31:t.memoizedState!==null&&uo(t);break;case 13:uo(t);break;case 19:se(fo);break;case 10:Qi(t.type);break;case 22:case 23:uo(t),ro(),e!==null&&se(ba);break;case 24:Qi(ua)}}function Bc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Vc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Hc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Qa(t,n)}catch(t){Z(e,e.return,t)}}}function Uc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Wc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Gc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Kc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function qc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ut]=t}catch(t){Z(e,e.return,t)}}function Jc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Yc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Jc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=nn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[lt]=e,t[ut]=n}catch(t){Z(e,e.return,t)}}var $c=!1,el=!1,tl=!1,nl=typeof WeakSet==`function`?WeakSet:Set,rl=null;function il(e,t){if(e=e.containerInfo,Rd=sp,e=Ar(e),jr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,rl=t;rl!==null;)if(t=rl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,rl=e;else for(;rl!==null;){switch(t=rl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=qs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,rl=e;break}rl=t.return}}function al(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n),r&4&&Bc(5,n);break;case 1:if(bl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Hc(n),r&512&&Wc(n,n.return);break;case 3:if(bl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Qa(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&Qc(n);case 26:case 5:bl(e,n),t===null&&r&4&&Kc(n),r&512&&Wc(n,n.return);break;case 12:bl(e,n);break;case 31:bl(e,n),r&4&&dl(e,n);break;case 13:bl(e,n),r&4&&fl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||$c,!r){t=t!==null&&t.memoizedState!==null||el,i=$c;var a=el;$c=r,(el=t)&&!a?Sl(e,n,(n.subtreeFlags&8772)!=0):bl(e,n),$c=i,el=a}break;case 30:break;default:bl(e,n)}}function ol(e){var t=e.alternate;t!==null&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&_t(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var sl=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Re&&typeof Re.onCommitFiberUnmount==`function`)try{Re.onCommitFiberUnmount(Le,n)}catch{}switch(n.tag){case 26:el||Gc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:el||Gc(n,t);var r=sl,i=cl;Zd(n.type)&&(sl=n.stateNode,cl=!1),ll(e,t,n),pf(n.stateNode),sl=r,cl=i;break;case 5:el||Gc(n,t);case 6:if(r=sl,i=cl,sl=null,ll(e,t,n),sl=r,cl=i,sl!==null)if(cl)try{(sl.nodeType===9?sl.body:sl.nodeName===`HTML`?sl.ownerDocument.body:sl).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{sl.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:sl!==null&&(cl?(e=sl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(sl,n.stateNode));break;case 4:r=sl,i=cl,sl=n.stateNode.containerInfo,cl=!0,ll(e,t,n),sl=r,cl=i;break;case 0:case 11:case 14:case 15:Vc(2,n,t),el||Vc(4,n,t),ll(e,t,n);break;case 1:el||(Gc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Uc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:el=(r=el)||n.memoizedState!==null,ll(e,t,n),el=r;break;default:ll(e,t,n)}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nl),t;default:throw Error(i(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function hl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){sl=c.stateNode,cl=!1;break a}break;case 5:sl=c.stateNode,cl=!1;break a;case 3:case 4:sl=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(sl===null)throw Error(i(160));ul(o,s,a),sl=null,cl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Vc(3,e,e.return),Bc(3,e),Vc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&64&&$c&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=gl;if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[gt]||o[lt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[lt]=e,St(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[lt]=e,St(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),n!==null&&r&4&&qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),e.flags&32){a=e.stateNode;try{Jt(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,qc(e,a,n===null?a:n.memoizedProps)),r&1024&&(tl=!0);break;case 6:if(hl(t,e),vl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,a=gl,gl=gf(t.containerInfo),hl(t,e),gl=a,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}tl&&(tl=!1,yl(e));break;case 4:r=gl,gl=gf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Oe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=$c,d=el;if($c=u||a,el=d||l,hl(t,e),el=d,$c=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||$c||el||xl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Jc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Zc(e,Yc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Jt(o,``),n.flags&=-33),Zc(e,Yc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Xc(e,Yc(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)al(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Vc(4,t,t.return),xl(t);break;case 1:Gc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Uc(t,t.return,n),xl(t);break;case 27:pf(t.stateNode);case 26:case 5:Gc(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function Sl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Sl(i,a,n),Bc(4,a);break;case 1:if(Sl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Za(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Hc(a),Wc(a,a.return);break;case 27:Qc(a);case 26:case 5:Sl(i,a,n),n&&r===null&&o&4&&Kc(a),Wc(a,a.return);break;case 12:Sl(i,a,n);break;case 31:Sl(i,a,n),n&&o&4&&dl(i,a);break;case 13:Sl(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&Sl(i,a,n),Wc(a,a.return);break;case 30:break;default:Sl(i,a,n)}t=t.sibling}}function Cl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&fa(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&Bc(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e)));break;case 12:if(i&2048){Tl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Dl(a,o,s,c,i),Bc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)K(e,t,n),e=e.sibling}function K(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Gf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=gl;gl=gf(e.stateNode.containerInfo),Al(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function jl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Fl(r,e)}jl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Nl(e),e=e.sibling}function Nl(e){switch(e.tag){case 0:case 11:case 15:Ml(e),e.flags&2048&&Vc(9,e,e.return);break;case 3:Ml(e);break;case 12:Ml(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Pl(e)):Ml(e);break;default:Ml(e)}}function Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Fl(r,e)}jl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Vc(8,t,t.return),Pl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Pl(t));break;default:Pl(t)}e=e.sibling}}function Fl(e,t){for(;rl!==null;){var n=rl;switch(n.tag){case 0:case 11:case 15:Vc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,rl=r;else a:for(n=e;rl!==null;){r=rl;var i=r.sibling,a=r.return;if(ol(r),r===n){rl=null;break a}if(i!==null){i.return=a,rl=i;break a}rl=a}}}var Il={getCacheForType:function(e){var t=ia(ua),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ia(ua).controller.signal}},Ll=typeof WeakMap==`function`?WeakMap:Map,q=0,Rl=null,J=null,Y=0,X=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return q&2&&Y!==0?Y&-Y:M.T===null?ot():dd()}function mu(){if(Jl===0)if(!(Y&536870912)||I){var e=Ge;Ge<<=1,!(Ge&3932160)&&(Ge=262144),Jl=e}else Jl=536870912;return e=io.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===Rl&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),$e(e,n),(!(q&2)||e!==Rl)&&(e===Rl&&(!(q&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(q&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ye(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Vl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){a=Ou(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-Oe(),10<a)){if(yu(r,t,Jl,!Bl),Je(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:nn},K(t,a,d);var m=(a&62914560)===a?$l-Oe():(a&4194048)===a?eu-Oe():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Tr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Be(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&tt(e,n,t)}function bu(){return q&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,Xi=Yi=null,Mo(e),R=null,Pa=0,e=J;for(;e!==null;)zc(e.alternate,e),e=e.return;J=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),Rl=e,J=n=pi(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=Ye(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Be(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,ri(),n}function Cu(e,t){z=null,M.H=Bs,t===wa||t===Ea?(t=Ma(),X=3):t===Ta?(t=Ma(),X=4):X=t===rc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,Zs(e,xi(t,e.current)))}function wu(){var e=io.current;return e===null?!0:(Y&4194048)===Y?ao===null:(Y&62914560)===Y||Y&536870912?e===ao:!1}function Tu(){var e=M.H;return M.H=Bs,e===null?Bs:e}function Eu(){var e=M.A;return M.A=Il,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&io.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||Rl===null||yu(Rl,Y,Jl,!1)}function Ou(e,t,n){var r=q;q|=2;var i=Tu(),a=Eu();(Rl!==e||Y!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(X!==0&&J!==null){var s=J,c=zl;switch(X){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:io.current===null&&(t=!0);var l=X;if(X=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=X,X=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Xi=Yi=null,q=r,M.H=i,M.A=a,J===null&&(Rl=null,Y=0,ri()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=q;q|=2;var r=Tu(),a=Eu();Rl!==e||Y!==t?(nu=null,tu=Oe()+500,Su(e,t)):Vl=Ye(e,t);a:do try{if(X!==0&&J!==null){t=J;var o=zl;b:switch(X){case 1:X=0,zl=null,Pu(e,t,o,1);break;case 2:case 9:if(Oa(o)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||Rl!==e||(X=7),rd(e)},o.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:Oa(o)?(X=0,zl=null,Nu(t)):(X=0,zl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Wf(s):c.stateNode.complete){X=0,zl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Fu(u))}break b}}X=0,zl=null,Pu(e,t,o,5);break;case 6:X=0,zl=null,Pu(e,t,o,6);break;case 8:xu(),Wl=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Xi=Yi=null,M.H=r,M.A=a,q=n,J===null?(Rl=null,Y=0,ri(),Wl):0}function ju(){for(;J!==null&&!Ee();)Mu(J)}function Mu(e){var t=Ac(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=mc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=mc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Mo(t);default:zc(n,t),t=J=mi(t,Ul),t=Ac(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){Xi=Yi=null,Mo(t),R=null,Pa=0;var i=t.return;try{if(nc(e,i,t,n,Y)){Wl=1,Zs(e,xi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,Zs(e,xi(n,e.current)),J=null;return}t.flags&32768?(I||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=io.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=Lc(t.alternate,t,Ul);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=Rc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Wl=6,J=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(q&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ni,et(e,n,o,s,c,l),e===Rl&&(J=Rl=null,Y=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Me,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=M.T,M.T=null,a=N.p,N.p=2,s=q,q|=4;try{il(e,t,n)}finally{q=s,N.p=a,M.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=q;q|=4;try{_l(t,e);var a=zd,o=Ar(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&kr(s.ownerDocument.documentElement,s)){if(c!==null&&jr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Or(s,h),v=Or(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{q=i,N.p=r,M.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=q;q|=4;try{al(e,t.alternate,t)}finally{q=i,N.p=r,M.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,De();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),at(n),t=t.stateNode,Re&&typeof Re.onCommitFiberRoot==`function`)try{Re.onCommitFiberRoot(Le,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=M.T,i=N.p,N.p=2,M.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{M.T=t,N.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=at(su),r=M.T,a=N.p;try{N.p=32>n?32:n,M.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,q&6)throw Error(i(331));var c=q;if(q|=4,Nl(o.current),El(o,o.current,s,n),q=c,id(0,!1),Re&&typeof Re.onPostCommitFiberRoot==`function`)try{Re.onPostCommitFiberRoot(Le,o)}catch{}return!0}finally{N.p=a,M.T=r,Vu(e,t)}}function Wu(e,t,n){t=xi(n,t),t=$s(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&($e(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=xi(n,e),n=ec(2),r=Ga(t,n,2),r!==null&&(tc(n,r,t,e),$e(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ll;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rl===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Oe()-$l?!(q&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Ze()),e=oi(e,t),e!==null&&($e(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return we(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Be(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=Je(r,r===Rl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ye(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Oe(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Be(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Xe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Rl,n=Y,n=Je(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Te(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ye(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Te(r),at(n)){case 2:case 8:n=je;break;case 32:n=Me;break;case 268435456:n=Pe;break;default:n=Me}return r=cd.bind(null,e),n=we(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Te(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=Je(e,e===Rl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Oe()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){q&6?we(Ae,ad):od()})}function dd(){if(nd===0){var e=ha;e===0&&(e=We,We<<=1,!(We&261888)&&(We=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:tn(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[ut]||null).action),o=r.submitter;o&&(t=(t=o[ut]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new wn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Es(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Es(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Zr.length;hd++){var gd=Zr[hd];Qr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Qr(Ur,`onAnimationEnd`),Qr(Wr,`onAnimationIteration`),Qr(Gr,`onAnimationStart`),Qr(`dblclick`,`onDoubleClick`),Qr(`focusin`,`onFocus`),Qr(`focusout`,`onBlur`),Qr(Kr,`onTransitionRun`),Qr(qr,`onTransitionStart`),Qr(Jr,`onTransitionCancel`),Qr(Yr,`onTransitionEnd`),Et(`onMouseEnter`,[`mouseout`,`mouseover`]),Et(`onMouseLeave`,[`mouseout`,`mouseover`]),Et(`onPointerEnter`,[`pointerout`,`pointerover`]),Et(`onPointerLeave`,[`pointerout`,`pointerover`]),Tt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Tt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Tt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Tt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){$r(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){$r(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[ft];n===void 0&&(n=t[ft]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,Ct.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!pn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=vt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}un(function(){var r=a,i=an(n),s=[];a:{var c=Xr.get(e);if(c!==void 0){var l=wn,u=e;switch(e){case`keypress`:if(yn(n)===0)break a;case`keydown`:case`keyup`:l=Hn;break;case`focusin`:u=`focus`,l=Nn;break;case`focusout`:u=`blur`,l=Nn;break;case`beforeblur`:case`afterblur`:l=Nn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=jn;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=Wn;break;case Ur:case Wr:case Gr:l=Pn;break;case Yr:l=Gn;break;case`scroll`:case`scrollend`:l=En;break;case`wheel`:l=Kn;break;case`copy`:case`cut`:case`paste`:l=Fn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Un;break;case`toggle`:case`beforetoggle`:l=qn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=dn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==rn&&(u=n.relatedTarget||n.fromElement)&&(vt(u)||u[dt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?vt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=jn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Un,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:bt(l),h=u==null?c:bt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,vt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?bt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=pr;else if(sr(c))if(mr)v=Cr;else{v=xr;var y=br}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Qt(r.elementType)&&(v=pr):v=Sr;if(v&&=v(e,r)){cr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Wt(c,`number`,c.value)}switch(y=r?bt(r):window,e){case`focusin`:(sr(y)||y.contentEditable===`true`)&&(Nr=y,Pr=r,Fr=null);break;case`focusout`:Fr=Pr=Nr=null;break;case`mousedown`:Ir=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ir=!1,Lr(s,n,i);break;case`selectionchange`:if(Mr)break;case`keydown`:case`keyup`:Lr(s,n,i)}var b;if(Yn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else rr?tr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Qn&&n.locale!==`ko`&&(rr||x!==`onCompositionStart`?x===`onCompositionEnd`&&rr&&(b=vn()):(hn=i,gn=`value`in hn?hn.value:hn.textContent,rr=!0)),y=Ed(r,x),0<y.length&&(x=new In(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=nr(n),b!==null&&(x.data=b)))),(b=Zn?ir(e,n):ar(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new In(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=dn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=dn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=dn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=dn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
|
|
9
|
-
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Jt(e,``+r);break;case`className`:Mt(e,`class`,r);break;case`tabIndex`:Mt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Mt(e,n,r);break;case`style`:Zt(e,r,o);break;case`data`:if(t!==`object`){Mt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=tn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),jt(e,`popover`,r);break;case`xlinkActuate`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:jt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=$t.get(n)||n,jt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Zt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Jt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!wt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ut]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):jt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:$(e,t,r,d,n,null)}}Ut(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Gt(e,!!r,n,!0):Gt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:$(e,t,s,c,n,null)}qt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,u,r,n,null)}return;default:if(Qt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Ht(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Gt(e,!!n,n?[]:``,!1):Gt(e,!!n,t,!0)):Gt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&$(e,t,s,a,r,o)}Kt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(Qt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[gt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),_t(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[gt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_t(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=N.d;N.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=yt(e);t!==null&&t.tag===5&&t.type===`form`?Os(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Vt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Vt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Vt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Vt(n.imageSizes)+`"]`)):i+=`[href="`+Vt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Vt(r)+`"][href="`+Vt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),St(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=xt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);St(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=xt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),St(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=xt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),St(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=ue.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=xt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=xt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=xt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Vt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),St(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Vt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Vt(n.href)+`"]`);if(r)return t.instance=r,St(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),St(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,St(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),St(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,St(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),St(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[gt]||a[lt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,St(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),St(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qe(0),this.hiddenUpdates=Qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=di(3,null,null,t),e.current=a,a.stateNode=e,t=da(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ha(a),e}function tp(e){return e?(e=li,e):li}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Wa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ga(e,r,t),n!==null&&(hu(n,e,t),Ka(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=oi(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=it(t);var n=oi(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,up(e,t,n,r)}finally{N.p=a,M.T=i}}function lp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,up(e,t,n,r)}finally{N.p=a,M.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=yt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Be(o);s.entanglements[1]|=c,o&=~c}rd(a),!(q&6)&&(tu=Oe()+500,id(0,!1))}}break;case 31:case 13:s=oi(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=an(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=vt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`: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`toggle`: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 2;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`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(ke()){case Ae:return 2;case je:return 8;case Me:case Ne:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=yt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=vt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,st(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,st(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);rn=r,n.target.dispatchEvent(r),rn=null}else return t=yt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=yt(n);a!==null&&(e.splice(t,3),t-=3,Es(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ut]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ut]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[dt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=ot();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(i(527,Lp,`19.2.5`));N.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Le=zp.inject(Rp),Re=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Js,s=Ys,c=Xs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[dt]=t.current,Sd(e),new Fp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=`modulepreload`,v=function(e,t){return new URL(e,t).href},y={},b=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=v(t,n),t in y)return;y[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:_,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},x=c(f(),1),S=e=>{throw TypeError(e)},C=(e,t,n)=>t.has(e)||S(`Cannot `+n),w=(e,t,n)=>(C(e,t,`read from private field`),n?n.call(e):t.get(e)),T=(e,t,n)=>t.has(e)?S(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),E=`popstate`;function D(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function O(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return te(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:ne(t)}return M(t,n,null,e)}function k(e,t){if(e===!1||e==null)throw Error(t)}function A(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function j(){return Math.random().toString(36).substring(2,10)}function ee(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function te(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?re(t):t,state:n,key:t&&t.key||r||j(),unstable_mask:i}}function ne({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function re(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function M(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=D(e)?e:te(h.location,e,t);n&&n(r,e),l=u()+1;let d=ee(r,l),f=h.createHref(r.unstable_mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=D(e)?e:te(h.location,e,t);n&&n(r,e),l=u();let i=ee(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return N(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(E,d),c=e,()=>{i.removeEventListener(E,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function N(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),k(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:ne(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}var ie,ae=class{constructor(e){if(T(this,ie,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(w(this,ie).has(e))return w(this,ie).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){w(this,ie).set(e,t)}};ie=new WeakMap;var oe=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function P(e){return oe.has(e)}var se=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function F(e){return se.has(e)}function ce(e){return e.index===!0}function le(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(k(e.index!==!0||!e.children,`Cannot specify children on an index route`),k(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),ce(e)){let n={...e,id:s};return r[s]=ue(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=ue(n,t(n)),e.children&&(n.children=le(e.children,t,o,r,i)),n}})}function ue(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function de(e,t,n=`/`){return fe(e,t,n,!1)}function fe(e,t,n,r){let i=Ae((typeof t==`string`?re(t):t).pathname||`/`,n);if(i==null)return null;let a=me(e);ge(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=ke(i);o=Ee(a[e],t,r)}return o}function pe(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function me(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;k(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Be([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(k(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),me(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:we(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of he(e.path))a(e,t,!0,n)}),t}function he(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=he(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ge(e){e.sort((e,t)=>e.score===t.score?Te(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var _e=/^:[\w-]+$/,ve=3,ye=2,be=1,xe=10,Se=-2,Ce=e=>e===`*`;function we(e,t){let n=e.split(`/`),r=n.length;return n.some(Ce)&&(r+=Se),t&&(r+=ye),n.filter(e=>!Ce(e)).reduce((e,t)=>e+(_e.test(t)?ve:t===``?be:xe),r)}function Te(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Ee(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=De({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=De({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:Be([a,u.pathname]),pathnameBase:Ve(Be([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=Be([a,u.pathnameBase]))}return o}function De(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Oe(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Oe(e,t=!1,n=!0){A(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=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ke(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return A(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ae(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 je({basename:e,pathname:t}){return t===`/`?e:Be([e,t])}var Me=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ne=e=>Me.test(e);function Pe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?re(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?Fe(n.substring(1),`/`):Fe(n,t)):a=t,{pathname:a,search:He(r),hash:Ue(i)}}function Fe(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(`/`):`/`}function Ie(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 Le(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Re(e){let t=Le(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function ze(e,t,n,r=!1){let i;typeof e==`string`?i=re(e):(i={...e},k(!i.pathname||!i.pathname.includes(`?`),Ie(`?`,`pathname`,`search`,i)),k(!i.pathname||!i.pathname.includes(`#`),Ie(`#`,`pathname`,`hash`,i)),k(!i.search||!i.search.includes(`#`),Ie(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Pe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Be=e=>e.join(`/`).replace(/\/\/+/g,`/`),Ve=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),He=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ue=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,We=class{constructor(e,t,n,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 Ge(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ke(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var qe=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Je(e,t){let n=e;if(typeof n!=`string`||!Me.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(qe)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=Ae(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{A(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Ye=Symbol(`Uninstrumented`);function Xe(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=Qe(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=Qe(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[Ye]??i,a=Qe(n[e],t,(...e)=>et(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[Ye]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[Ye]??e,r=Qe(n.middleware,t,(...e)=>et(e[0]));return r?(r[Ye]=t,r):e})),r}function Ze(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[Ye]??e.navigate,r=Qe(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?ne(n):`.`,...tt(e,r??{})}});r&&(r[Ye]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[Ye]??e.fetch,r=Qe(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...tt(e,i??{})}});r&&(r[Ye]=t,e.fetch=r)}return e}function Qe(e,t,n){return e.length===0?null:async(...r)=>{let i=await $e(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function $e(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=$e(e,t,n,r-1),a=await o,k(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function et(e){let{request:t,context:n,params:r,unstable_pattern:i}=e;return{request:nt(t),params:{...r},unstable_pattern:i,context:rt(n)}}function tt(e,t){return{currentUrl:ne(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function nt(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function rt(e){if(at(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var it=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function at(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===it}var ot=[`POST`,`PUT`,`PATCH`,`DELETE`],st=new Set(ot),ct=[`GET`,...ot],lt=new Set(ct),ut=new Set([301,302,303,307,308]),dt=new Set([307,308]),ft={state:`idle`,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},pt={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},mt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},ht=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),gt=`remix-router-transitions`,_t=Symbol(`ResetLoaderData`);function vt(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;k(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||ht,a=i;if(e.unstable_instrumentations){let t=e.unstable_instrumentations;a=e=>({...i(e),...Xe(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=le(e.routes,a,void 0,o),c,l=e.basename||`/`;l.startsWith(`/`)||(l=`/${l}`);let u=e.dataStrategy||Ft,d={unstable_passThroughRequests:!1,...e.future},f=null,p=new Set,m=null,h=null,g=null,_=e.hydrationData!=null,v=de(s,e.history.location,l),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=on(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=an(s);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&<(v,s,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=lt(null,s,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1,S=!x;else if(!v.some(e=>Ct(e.route)))x=!0,S=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}S=!1,x=!0,r.forEach(e=>{let r=wt(e.route,t,n);S||=r.renderFallback,x&&=!r.shouldLoad})}let C,w={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:S,navigation:ft,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=`POP`,E=null,D=!1,O,j=!1,ee=new Map,ne=null,M=!1,ie=!1,oe=new Set,P=new Map,se=0,F=-1,ce=new Map,ue=new Set,me=new Map,he=new Map,ge=new Set,_e=new Map,ve,ye=null;function be(){if(f=e.history.listen(({action:t,location:n,delta:r})=>{if(ve){ve(),ve=void 0;return}A(_e.size===0||r!=null,"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 i=rt({currentLocation:w.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{ve=e});e.history.go(r*-1),nt(i,{state:`blocked`,location:n,proceed(){nt(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(w.blockers);e.set(i,mt),Ce({blockers:e})}}),E?.resolve(),E=null;return}return De(t,n)}),n){An(t,ee);let e=()=>jn(t,ee);t.addEventListener(`pagehide`,e),ne=()=>t.removeEventListener(`pagehide`,e)}return w.initialized||De(`POP`,w.location,{initialHydration:!0}),C}function xe(){f&&f(),ne&&ne(),p.clear(),O&&O.abort(),w.fetchers.forEach((e,t)=>Ke(t)),w.blockers.forEach((e,t)=>tt(t))}function Se(e){return p.add(e),()=>p.delete(e)}function Ce(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),w={...w,...e};let n=[],r=[];w.fetchers.forEach((e,t)=>{e.state===`idle`&&(ge.has(t)?n.push(t):r.push(t))}),ge.forEach(e=>{!w.fetchers.has(e)&&!P.has(e)&&n.push(e)}),[...p].forEach(r=>r(w,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ke(e)),r.forEach(e=>w.fetchers.delete(e))}function we(t,n,{flushSync:r}={}){let i=w.actionData!=null&&w.navigation.formMethod!=null&&xn(w.navigation.formMethod)&&w.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?w.actionData:null;let o=n.loaderData?tn(w.loaderData,n.loaderData,n.matches||[],n.errors):w.loaderData,l=w.blockers;l.size>0&&(l=new Map(l),l.forEach((e,t)=>l.set(t,mt)));let u=M?!1:ct(t,n.matches||w.matches),d=D===!0||w.navigation.formMethod!=null&&xn(w.navigation.formMethod)&&t.state?._isRedirect!==!0;c&&=(s=c,void 0),M||T===`POP`||(T===`PUSH`?e.history.push(t,t.state):T===`REPLACE`&&e.history.replace(t,t.state));let f;if(T===`POP`){let e=ee.get(w.location.pathname);e&&e.has(t.pathname)?f={currentLocation:w.location,nextLocation:t}:ee.has(t.pathname)&&(f={currentLocation:t,nextLocation:w.location})}else if(j){let e=ee.get(w.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),ee.set(w.location.pathname,e)),f={currentLocation:w.location,nextLocation:t}}Ce({...n,actionData:a,loaderData:o,historyAction:T,location:t,initialized:!0,renderFallback:!1,navigation:ft,revalidation:`idle`,restoreScrollPosition:u,preventScrollReset:d,blockers:l},{viewTransitionOpts:f,flushSync:r===!0}),T=`POP`,D=!1,j=!1,M=!1,ie=!1,E?.resolve(),E=null,ye?.resolve(),ye=null}async function Te(t,n){if(E?.resolve(),E=null,typeof t==`number`){E||=Mn();let n=E.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=xt(!1,bt(w.location,w.matches,l,t,n?.fromRouteId,n?.relative),n),o;n?.unstable_mask&&(o={pathname:``,search:``,hash:``,...typeof n.unstable_mask==`string`?re(n.unstable_mask):{...w.location.unstable_mask,...n.unstable_mask}});let s=w.location,c=te(s,r,n&&n.state,void 0,o);c={...c,...e.history.encodeLocation(c)};let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&xn(i.formMethod)&&i.formAction===w.location.pathname+w.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=rt({currentLocation:s,nextLocation:c,historyAction:d});if(m){nt(m,{state:`blocked`,location:c,proceed(){nt(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:c}),Te(t,n)},reset(){let e=new Map(w.blockers);e.set(m,mt),Ce({blockers:e})}});return}await De(d,c,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.unstable_defaultShouldRevalidate})}function Ee(){ye||=Mn(),Be(),Ce({revalidation:`loading`});let e=ye.promise;return w.navigation.state===`submitting`?e:w.navigation.state===`idle`?(De(w.historyAction,w.location,{startUninterruptedRevalidation:!0}),e):(De(T||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:j===!0}),e)}async function De(t,n,r){O&&O.abort(),O=null,T=t,M=(r&&r.startUninterruptedRevalidation)===!0,st(w.location,w.matches),D=(r&&r.preventScrollReset)===!0,j=(r&&r.enableViewTransition)===!0;let i=c||s,a=r&&r.overrideNavigation,o=r?.initialHydration&&w.matches&&w.matches.length>0&&!y?w.matches:de(i,n,l),u=(r&&r.flushSync)===!0;if(o&&w.initialized&&!ie&&ln(w.location,n)&&!(r&&r.submission&&xn(r.submission.formMethod))){we(n,{matches:o},{flushSync:u});return}let d=lt(o,i,n.pathname);if(d.active&&d.matches&&(o=d.matches),!o){let{error:e,notFoundMatches:t,route:r}=it(n.pathname);we(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:u});return}O=new AbortController;let f=Yt(e.history,n,O.signal,r&&r.submission),p=e.getContext?await e.getContext():new ae,m;if(r&&r.pendingError)m=[rn(o).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&xn(r.submission.formMethod)){let t=await Oe(f,n,r.submission,o,p,d.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:u});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(mn(r)&&Ge(r.error)&&r.error.status===404){O=null,we(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}o=t.matches||o,m=t.pendingActionResult,a=Tn(n,r.submission),u=!1,d.active=!1,f=Yt(e.history,f.url,f.signal)}let{shortCircuited:h,matches:g,loaderData:_,errors:v}=await ke(f,n,o,p,d.active,a,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,u,m,r&&r.callSiteDefaultShouldRevalidate);h||(O=null,we(n,{matches:g||o,...nn(m),loaderData:_,errors:v}))}async function Oe(t,n,i,c,u,d,f,p={}){if(Be(),Ce({navigation:En(n,i)},{flushSync:p.flushSync===!0}),d){let e=await ut(c,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=an(s);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=rn(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)c=e.matches;else{let{notFoundMatches:e,error:t,route:r}=it(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let m,h=Cn(c,n);if(!h.route.action&&!h.route.lazy)m={type:`error`,error:on(405,{method:t.method,pathname:n.pathname,routeId:h.route.id})};else{let e=await Re(t,n,Vt(a,o,t,n,c,h,f?[]:r,u),u,null);if(m=e[h.route.id],!m){for(let t of c)if(e[t.route.id]){m=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(hn(m)){let n;return n=p&&p.replace!=null?p.replace:Jt(m.response.headers.get(`Location`),new URL(t.url),l,e.history)===w.location.pathname+w.location.search,await Le(t,m,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(mn(m)){let e=rn(c,h.route.id);return(p&&p.replace)!==!0&&(T=`PUSH`),{matches:c,pendingActionResult:[e.route.id,m,h.route.id]}}return{matches:c,pendingActionResult:[h.route.id,m]}}async function ke(t,n,i,u,d,f,p,m,h,g,_,v,y){let b=f||Tn(n,p),x=p||m||wn(b),S=!M&&!g;if(d){if(S){let e=je(v);Ce({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await ut(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=an(s);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=rn(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=it(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=c||s,{dsMatches:T,revalidatingFetchers:E}=St(t,u,a,o,e.history,w,i,x,n,g?[]:r,g===!0,ie,oe,ge,me,ue,C,l,e.patchRoutesOnNavigation!=null,v,y);if(F=++se,!e.dataStrategy&&!T.some(e=>e.shouldLoad)&&!T.some(e=>e.route.middleware&&e.route.middleware.length>0)&&E.length===0){let e=Qe();return we(n,{matches:i,loaderData:{},errors:v&&mn(v[1])?{[v[0]]:v[1].error}:null,...nn(v),...e?{fetchers:new Map(w.fetchers)}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=je(v);t!==void 0&&(e.actionData=t)}E.length>0&&(e.fetchers=Me(E)),Ce(e,{flushSync:_})}E.forEach(e=>{Je(e.key),e.controller&&P.set(e.key,e.controller)});let D=()=>E.forEach(e=>Je(e.key));O&&O.signal.addEventListener(`abort`,D);let{loaderResults:k,fetcherResults:A}=await ze(T,E,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener(`abort`,D),E.forEach(e=>P.delete(e.key));let j=sn(k);if(j)return await Le(t,j.result,!0,{replace:h}),{shortCircuited:!0};if(j=sn(A),j)return ue.add(j.key),await Le(t,j.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:ee,errors:te}=en(w,i,k,v,E,A);g&&w.errors&&(te={...w.errors,...te});let ne=Qe(),re=$e(F),N=ne||re||E.length>0;return{matches:i,loaderData:ee,errors:te,...N?{fetchers:new Map(w.fetchers)}:{}}}function je(e){if(e&&!mn(e[1]))return{[e[0]]:e[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function Me(e){return e.forEach(e=>{let t=w.fetchers.get(e.key),n=Dn(void 0,t?t.data:void 0);w.fetchers.set(e.key,n)}),new Map(w.fetchers)}async function Pe(t,n,r,i){Je(t);let a=(i&&i.flushSync)===!0,o=c||s,u=bt(w.location,w.matches,l,r,n,i?.relative),d=de(o,u,l),f=lt(d,o,u);if(f.active&&f.matches&&(d=f.matches),!d){He(t,n,on(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=xt(!0,u,i);if(h){He(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new ae,_=(i&&i.preventScrollReset)===!0;if(m&&xn(m.formMethod)){await Fe(t,n,p,d,g,f.active,a,_,m,i&&i.unstable_defaultShouldRevalidate);return}me.set(t,{routeId:n,path:p}),await Ie(t,n,p,d,g,f.active,a,_,m)}async function Fe(t,n,i,u,d,f,p,m,h,g){Be(),me.delete(t),Ve(t,On(h,w.fetchers.get(t)),{flushSync:p});let _=new AbortController,v=Yt(e.history,i,_.signal,h);if(f){let e=await ut(u,new URL(v.url).pathname,v.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){He(t,n,e.error,{flushSync:p});return}else if(e.matches)u=e.matches;else{He(t,n,on(404,{pathname:i}),{flushSync:p});return}}let y=Cn(u,i);if(!y.route.action&&!y.route.lazy){He(t,n,on(405,{method:h.formMethod,pathname:i,routeId:n}),{flushSync:p});return}P.set(t,_);let b=se,x=Vt(a,o,v,i,u,y,r,d),S=await Re(v,i,x,d,t),C=S[y.route.id];if(!C){for(let e of x)if(S[e.route.id]){C=S[e.route.id];break}}if(v.signal.aborted){P.get(t)===_&&P.delete(t);return}if(ge.has(t)){if(hn(C)||mn(C)){Ve(t,kn(void 0));return}}else{if(hn(C))if(P.delete(t),F>b){Ve(t,kn(void 0));return}else return ue.add(t),Ve(t,Dn(h)),Le(v,C,!1,{fetcherSubmission:h,preventScrollReset:m});if(mn(C)){He(t,n,C.error);return}}let E=w.navigation.location||w.location,D=Yt(e.history,E,_.signal),A=c||s,j=w.navigation.state===`idle`?w.matches:de(A,w.navigation.location,l);k(j,`Didn't find any matches after fetcher action`);let ee=++se;ce.set(t,ee);let te=Dn(h,C.data);w.fetchers.set(t,te);let{dsMatches:ne,revalidatingFetchers:re}=St(D,d,a,o,e.history,w,j,h,E,r,!1,ie,oe,ge,me,ue,A,l,e.patchRoutesOnNavigation!=null,[y.route.id,C],g);re.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=w.fetchers.get(t),r=Dn(void 0,n?n.data:void 0);w.fetchers.set(t,r),Je(t),e.controller&&P.set(t,e.controller)}),Ce({fetchers:new Map(w.fetchers)});let M=()=>re.forEach(e=>Je(e.key));_.signal.addEventListener(`abort`,M);let{loaderResults:N,fetcherResults:ae}=await ze(ne,re,D,E,d);if(_.signal.aborted)return;if(_.signal.removeEventListener(`abort`,M),ce.delete(t),P.delete(t),re.forEach(e=>P.delete(e.key)),w.fetchers.has(t)){let e=kn(C.data);w.fetchers.set(t,e)}let le=sn(N);if(le)return Le(D,le.result,!1,{preventScrollReset:m});if(le=sn(ae),le)return ue.add(le.key),Le(D,le.result,!1,{preventScrollReset:m});let{loaderData:fe,errors:pe}=en(w,j,N,void 0,re,ae);$e(ee),w.navigation.state===`loading`&&ee>F?(k(T,`Expected pending action`),O&&O.abort(),we(w.navigation.location,{matches:j,loaderData:fe,errors:pe,fetchers:new Map(w.fetchers)})):(Ce({errors:pe,loaderData:tn(w.loaderData,fe,j,pe),fetchers:new Map(w.fetchers)}),ie=!1)}async function Ie(t,n,i,s,c,l,u,d,f){let p=w.fetchers.get(t);Ve(t,Dn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Yt(e.history,i,m.signal);if(l){let e=await ut(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){He(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{He(t,n,on(404,{pathname:i}),{flushSync:u});return}}let g=Cn(s,i);P.set(t,m);let _=se,v=(await Re(h,i,Vt(a,o,h,i,s,g,r,c),c,t))[g.route.id];if(P.get(t)===m&&P.delete(t),!h.signal.aborted){if(ge.has(t)){Ve(t,kn(void 0));return}if(hn(v))if(F>_){Ve(t,kn(void 0));return}else{ue.add(t),await Le(h,v,!1,{preventScrollReset:d});return}if(mn(v)){He(t,n,v.error);return}Ve(t,kn(v.data))}}async function Le(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:c,replace:u}={}){a||(E?.resolve(),E=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ie=!0);let d=i.response.headers.get(`Location`);k(d,`Expected a Location header on the redirect Response`),d=Jt(d,new URL(r.url),l,e.history);let f=te(w.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Ne(d)){let n=N(d,!0);e=n.origin!==t.location.origin||Ae(n.pathname,l)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}O=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=w.navigation;!o&&!s&&m&&h&&g&&(o=wn(w.navigation));let _=o||s;dt.has(i.response.status)&&_&&xn(_.formMethod)?await De(p,f,{submission:{..._,formAction:d},preventScrollReset:c||D,enableViewTransition:a?j:void 0}):await De(p,f,{overrideNavigation:Tn(f,o),fetcherSubmission:s,preventScrollReset:c||D,enableViewTransition:a?j:void 0})}async function Re(e,t,n,r,i){let a,o={};try{a=await Ht(u,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!xn(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!w.loaderData.hasOwnProperty(e.route.id)&&(!w.errors||!w.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(pn(r)){let i=r.result;o[t]={type:`redirect`,response:Kt(i,e,t,n,l)}}else o[t]=await Gt(r);return o}async function ze(e,t,n,r,i){let a=Re(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Re(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}else return Promise.resolve({[e.key]:{type:`error`,error:on(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Be(){ie=!0,me.forEach((e,t)=>{P.has(t)&&oe.add(t),Je(t)})}function Ve(e,t,n={}){w.fetchers.set(e,t),Ce({fetchers:new Map(w.fetchers)},{flushSync:(n&&n.flushSync)===!0})}function He(e,t,n,r={}){let i=rn(w.matches,t);Ke(e),Ce({errors:{[i.route.id]:n},fetchers:new Map(w.fetchers)},{flushSync:(r&&r.flushSync)===!0})}function Ue(e){return he.set(e,(he.get(e)||0)+1),ge.has(e)&&ge.delete(e),w.fetchers.get(e)||pt}function We(e,t){Je(e,t?.reason),Ve(e,kn(null))}function Ke(e){let t=w.fetchers.get(e);P.has(e)&&!(t&&t.state===`loading`&&ce.has(e))&&Je(e),me.delete(e),ce.delete(e),ue.delete(e),ge.delete(e),oe.delete(e),w.fetchers.delete(e)}function qe(e){let t=(he.get(e)||0)-1;t<=0?(he.delete(e),ge.add(e)):he.set(e,t),Ce({fetchers:new Map(w.fetchers)})}function Je(e,t){let n=P.get(e);n&&(n.abort(t),P.delete(e))}function Ye(e){for(let t of e){let e=kn(Ue(t).data);w.fetchers.set(t,e)}}function Qe(){let e=[],t=!1;for(let n of ue){let r=w.fetchers.get(n);k(r,`Expected fetcher: ${n}`),r.state===`loading`&&(ue.delete(n),e.push(n),t=!0)}return Ye(e),t}function $e(e){let t=[];for(let[n,r]of ce)if(r<e){let e=w.fetchers.get(n);k(e,`Expected fetcher: ${n}`),e.state===`loading`&&(Je(n),ce.delete(n),t.push(n))}return Ye(t),t.length>0}function et(e,t){let n=w.blockers.get(e)||mt;return _e.get(e)!==t&&_e.set(e,t),n}function tt(e){w.blockers.delete(e),_e.delete(e)}function nt(e,t){let n=w.blockers.get(e)||mt;k(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(w.blockers);r.set(e,t),Ce({blockers:r})}function rt({currentLocation:e,nextLocation:t,historyAction:n}){if(_e.size===0)return;_e.size>1&&A(!1,`A router only supports one blocker at a time`);let r=Array.from(_e.entries()),[i,a]=r[r.length-1],o=w.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function it(e){let t=on(404,{pathname:e}),{matches:n,route:r}=an(c||s);return{notFoundMatches:n,route:r,error:t}}function at(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===ft){_=!0;let e=ct(w.location,w.matches);e!=null&&Ce({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function ot(e,t){return h&&h(e,t.map(e=>pe(e,w.loaderData)))||e.key}function st(e,t){if(m&&g){let n=ot(e,t);m[n]=g()}}function ct(e,t){if(m){let n=ot(e,t),r=m[n];if(typeof r==`number`)return r}return null}function lt(t,n,r){if(e.patchRoutesOnNavigation){if(!t)return{active:!0,matches:fe(n,r,l,!0)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:fe(n,r,l,!0)}}return{active:!1,matches:null}}async function ut(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let u=t;for(;;){let t=c==null,d=c||s,f=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:u,fetcherKey:i,patch:(e,t)=>{r.aborted||Ot(e,t,d,f,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:u}}finally{t&&!r.aborted&&(s=[...s])}if(r.aborted)return{type:`aborted`};let p=de(d,n,l),m=null;if(p&&(Object.keys(p[0].params).length===0||(m=fe(d,n,l,!0),!(m&&u.length<m.length&>(u,m.slice(0,u.length))))))return{type:`success`,matches:p};if(m||=fe(d,n,l,!0),!m||gt(u,m))return{type:`success`,matches:null};u=m}}function gt(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function _t(e){o={},c=le(e,a,void 0,o)}function vt(e,t,n=!1){let r=c==null;Ot(e,t,c||s,o,a,n),r&&(s=[...s],Ce({}))}return C={get basename(){return l},get future(){return d},get state(){return w},get routes(){return s},get window(){return t},initialize:be,subscribe:Se,enableScrollRestoration:at,navigate:Te,fetch:Pe,revalidate:Ee,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ue,resetFetcher:We,deleteFetcher:qe,dispose:xe,getBlocker:et,deleteBlocker:tt,patchRoutes:vt,_internalFetchControllers:P,_internalSetRoutes:_t,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){Ce(e)}},e.unstable_instrumentations&&(C=Ze(C,e.unstable_instrumentations.map(e=>e.router).filter(Boolean))),C}function yt(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function bt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=ze(r||`.`,Re(o),Ae(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Sn(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.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 n!==`/`&&(c.pathname=je({basename:n,pathname:c.pathname})),ne(c)}function xt(e,t,n){if(!n||!yt(n))return{path:t};if(n.formMethod&&!bn(n.formMethod))return{path:t,error:on(405,{method:n.formMethod})};let r=()=>({path:t,error:on(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=cn(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!xn(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}
|
|
10
|
-
`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!xn(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}k(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Zt(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Zt(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Qt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Qt(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(xn(c.formMethod))return{path:t,submission:c};let l=re(t);return e&&l.search&&Sn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:ne(l),submission:c}}function St(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b){let x=y?mn(y[1])?y[1].error:y[1].data:void 0,S=i.createURL(a.location),C=i.createURL(c),w;if(u&&a.errors){let e=Object.keys(a.errors)[0];w=o.findIndex(t=>t.route.id===e)}else if(y&&mn(y[1])){let e=y[0];w=o.findIndex(t=>t.route.id===e)-1}let T=y?y[1].statusCode:void 0,E=T&&T>=400,D={currentUrl:S,currentParams:a.matches[0]?.params||{},nextUrl:C,nextParams:o[0].params,...s,actionResult:x,actionStatus:T},O=Ke(o),k=o.map((i,o)=>{let{route:s}=i,f=null;if(w!=null&&o>w)f=!1;else if(s.lazy)f=!0;else if(!Ct(s))f=!1;else if(u){let{shouldLoad:e}=wt(s,a.loaderData,a.errors);f=e}else Tt(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Bt(n,r,e,c,O,i,l,t,f);let p=!1;typeof b==`boolean`?p=b:E?p=!1:d||S.pathname+S.search===C.pathname+C.search?p=!0:S.search===C.search?Et(a.matches[o],i)&&(p=!0):p=!0;let m={...D,defaultShouldRevalidate:p};return Bt(n,r,e,c,O,i,l,t,Dt(i,m),m,b)}),A=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,y=de(g,e.path,_);if(!y){if(v&&m)return;A.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let x=Cn(y,e.path),S=new AbortController,C=Yt(i,e.path,S.signal),w=null;if(f.has(s))f.delete(s),w=Vt(n,r,C,e.path,y,x,l,t);else if(m)d&&(w=Vt(n,r,C,e.path,y,x,l,t));else{let i;i=typeof b==`boolean`?b:E?!1:d;let a={...D,defaultShouldRevalidate:i};Dt(x,a)&&(w=Vt(n,r,C,e.path,y,x,l,t,a))}w&&A.push({key:s,routeId:e.routeId,path:e.path,matches:w,match:x,request:C,controller:S})}),{dsMatches:k,revalidatingFetchers:A}}function Ct(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function wt(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Ct(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function Tt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Et(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Dt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Ot(e,t,n,r,i,a){let o;if(e){let t=r[e];k(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>kt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=le(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=le([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}}function kt(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>kt(e,t)))??!1:!1}var At=new WeakMap,jt=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(k(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=At.get(i);o||(o={},At.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=P(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)A(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)A(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},Mt=new WeakMap;function Nt(e,t,n,r,i){let a=n[e.id];if(k(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Mt.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{k(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=F(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?A(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?A(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return Mt.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=jt({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function Pt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Ft(e){return e.matches.some(e=>e.route.middleware)?It(e,()=>Pt(e)):Pt(e)}function It(e,t){return Lt(e,t,e=>{if(yn(e))throw e;return e},dn,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=rn(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function Lt(e,t,n,r,i){let{matches:a,...o}=e;return await Rt(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Rt(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await Rt(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function zt(e,t,n,r,i){let a=jt({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=Nt(r.route,xn(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Bt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=zt(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Dt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Dt(a,{...l,defaultShouldRevalidate:e}):Dt(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!xn(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(xn(n.method)||!p)?Ut({request:n,path:r,unstable_pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function Vt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Bt(e,t,n,r,Ke(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:zt(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Ht(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,unstable_url:Xt(t,n),unstable_pattern:Ke(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return It(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function Ut({request:e,path:t,unstable_pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=xn(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,unstable_url:Xt(e,t),unstable_pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a)if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw on(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}else if(t)c=await f(t);else{let t=new URL(e.url);throw on(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Wt(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Gt(e){let{result:t,type:n}=e;if(_n(t)){let e;try{e=await Wt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new We(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?gn(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:un(t),statusCode:Ge(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Ge(t)?t.status:void 0}:gn(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function Kt(e,t,n,r,i){let a=e.headers.get(`Location`);if(k(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Ne(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=bt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var qt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Jt(e,t,n,r){if(Ne(e)){let r=e,i=r.startsWith(`//`)?new URL(t.protocol+r):new URL(r);if(qt.includes(i.protocol))throw Error(`Invalid redirect location`);let a=Ae(i.pathname,n)!=null;if(i.origin===t.origin&&a)return i.pathname+i.search+i.hash}try{let t=r.createURL(e);if(qt.includes(t.protocol))throw Error(`Invalid redirect location`)}catch{}return e}function Yt(e,t,n,r){let i=e.createURL(cn(t)).toString(),a={signal:n};if(r&&xn(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=Zt(r.formData):a.body=r.formData}return new Request(i,a)}function Xt(e,t){let n=new URL(e.url),r=typeof t==`string`?re(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);n.search=e.size?`?${e.toString()}`:``}else n.search=``;return n.hash=r.hash||``,n}function Zt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Qt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function $t(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&mn(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(k(!hn(f),`Cannot handle redirect results in processLoaderData`),mn(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=rn(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=_t),c||(c=!0,s=Ge(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function en(e,t,n,r,i,a){let{loaderData:o,errors:s}=$t(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let o=a[n];if(k(o,`Did not find corresponding fetcher result`),mn(o)){let t=rn(e.matches,r?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:o.error}),e.fetchers.delete(n)}else if(hn(o))k(!1,`Unhandled fetcher revalidation redirect`);else{let t=kn(o.data);e.fetchers.set(n,t)}}),{loaderData:o,errors:s}}function tn(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==_t).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function nn(e){return e?mn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function rn(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function an(e){let t=e.length===1?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 on(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new We(e||500,o,Error(s),!0)}function sn(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(hn(r))return{key:n,result:r}}}function cn(e){return ne({...typeof e==`string`?re(e):e,hash:``})}function ln(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function un(e){return new We(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function dn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&fn(t))}function fn(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function pn(e){return _n(e.result)&&ut.has(e.result.status)}function mn(e){return e.type===`error`}function hn(e){return(e&&e.type)===`redirect`}function gn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function _n(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function vn(e){return ut.has(e)}function yn(e){return _n(e)&&vn(e.status)&&e.headers.has(`Location`)}function bn(e){return lt.has(e.toUpperCase())}function xn(e){return st.has(e.toUpperCase())}function Sn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Cn(e,t){let n=typeof t==`string`?re(t).search:t.search;if(e[e.length-1].route.index&&Sn(n||``))return e[e.length-1];let r=Le(e);return r[r.length-1]}function wn(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Tn(e,t){return t?{state:`loading`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:`loading`,location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function En(e,t){return{state:`submitting`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Dn(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function On(e,t){return{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}}function kn(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function An(e,t){try{let n=e.sessionStorage.getItem(gt);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{}}function jn(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(gt,JSON.stringify(n))}catch(e){A(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function Mn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Nn=x.createContext(null);Nn.displayName=`DataRouter`;var Pn=x.createContext(null);Pn.displayName=`DataRouterState`;var Fn=x.createContext(!1);function In(){return x.useContext(Fn)}var Ln=x.createContext({isTransitioning:!1});Ln.displayName=`ViewTransition`;var Rn=x.createContext(new Map);Rn.displayName=`Fetchers`;var zn=x.createContext(null);zn.displayName=`Await`;var Bn=x.createContext(null);Bn.displayName=`Navigation`;var Vn=x.createContext(null);Vn.displayName=`Location`;var Hn=x.createContext({outlet:null,matches:[],isDataRoute:!1});Hn.displayName=`Route`;var Un=x.createContext(null);Un.displayName=`RouteError`;var Wn=`REACT_ROUTER_ERROR`,Gn=`REDIRECT`,Kn=`ROUTE_ERROR_RESPONSE`;function qn(e){if(e.startsWith(`${Wn}:${Gn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Jn(e){if(e.startsWith(`${Wn}:${Kn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new We(t.status,t.statusText,t.data)}catch{}}function Yn(e,{relative:t}={}){k(Xn(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=x.useContext(Bn),{hash:i,pathname:a,search:o}=ar(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Be([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Xn(){return x.useContext(Vn)!=null}function Zn(){return k(Xn(),`useLocation() may be used only in the context of a <Router> component.`),x.useContext(Vn).location}var Qn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function $n(e){x.useContext(Bn).static||x.useLayoutEffect(e)}function er(){let{isDataRoute:e}=x.useContext(Hn);return e?wr():tr()}function tr(){k(Xn(),`useNavigate() may be used only in the context of a <Router> component.`);let e=x.useContext(Nn),{basename:t,navigator:n}=x.useContext(Bn),{matches:r}=x.useContext(Hn),{pathname:i}=Zn(),a=JSON.stringify(Re(r)),o=x.useRef(!1);return $n(()=>{o.current=!0}),x.useCallback((r,s={})=>{if(A(o.current,Qn),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=ze(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Be([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var nr=x.createContext(null);function rr(e){let t=x.useContext(Hn).outlet;return x.useMemo(()=>t&&x.createElement(nr.Provider,{value:e},t),[t,e])}function ir(){let{matches:e}=x.useContext(Hn),t=e[e.length-1];return t?t.params:{}}function ar(e,{relative:t}={}){let{matches:n}=x.useContext(Hn),{pathname:r}=Zn(),i=JSON.stringify(Re(n));return x.useMemo(()=>ze(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function or(e,t){return sr(e,t)}function sr(e,t,n){k(Xn(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=x.useContext(Bn),{matches:i}=x.useContext(Hn),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Er(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
11
|
-
|
|
12
|
-
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=Zn(),d;if(t){let e=typeof t==`string`?re(t):t;k(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=de(e,{pathname:p});A(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),A(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=mr(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Be([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Be([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?x.createElement(Vn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},h):h}function cr(){let e=Cr(),t=Ge(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},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=x.createElement(x.Fragment,null,x.createElement(`p`,null,`💿 Hey developer 👋`),x.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,x.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,x.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),x.createElement(x.Fragment,null,x.createElement(`h2`,null,`Unexpected Application Error!`),x.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?x.createElement(`pre`,{style:i},n):null,o)}var lr=x.createElement(cr,null),ur=class extends x.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||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Jn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:x.createElement(Hn.Provider,{value:this.props.routeContext},x.createElement(Un.Provider,{value:e,children:this.props.component}));return this.context?x.createElement(fr,{error:e},t):t}};ur.contextType=Fn;var dr=new WeakMap;function fr({children:e,error:t}){let{basename:n}=x.useContext(Bn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=qn(t.digest);if(e){let r=dr.get(t);if(r)throw r;let i=Je(e.location,n);if(qe&&!dr.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw dr.set(t,n),n}return x.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function pr({routeContext:e,match:t,children:n}){let r=x.useContext(Nn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),x.createElement(Hn.Provider,{value:e},n)}function mr(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);k(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Ke(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||lr,o&&(s<0&&c===0?(Er(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?x.createElement(n.route.Component,null):n.route.element?n.route.element:e,x.createElement(pr,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?x.createElement(ur,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function hr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gr(e){let t=x.useContext(Nn);return k(t,hr(e)),t}function _r(e){let t=x.useContext(Pn);return k(t,hr(e)),t}function vr(e){let t=x.useContext(Hn);return k(t,hr(e)),t}function yr(e){let t=vr(e),n=t.matches[t.matches.length-1];return k(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function br(){return yr(`useRouteId`)}function xr(){return _r(`useNavigation`).navigation}function Sr(){let{matches:e,loaderData:t}=_r(`useMatches`);return x.useMemo(()=>e.map(e=>pe(e,t)),[e,t])}function Cr(){let e=x.useContext(Un),t=_r(`useRouteError`),n=yr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function wr(){let{router:e}=gr(`useNavigate`),t=yr(`useNavigate`),n=x.useRef(!1);return $n(()=>{n.current=!0}),x.useCallback(async(r,i={})=>{A(n.current,Qn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Tr={};function Er(e,t,n){!t&&!Tr[e]&&(Tr[e]=!0,A(!1,n))}var Dr={};function Or(e,t){!e&&!Dr[t]&&(Dr[t]=!0,console.warn(t))}var kr=x.useOptimistic,Ar=()=>void 0;function jr(e){return kr?kr(e):[e,Ar]}function Mr(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&A(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:x.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&A(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:x.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&A(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:x.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Nr=[`HydrateFallback`,`hydrateFallbackElement`],Pr=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function Fr({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){r=In()||r;let[i,a]=x.useState(e.state),[o,s]=jr(i),[c,l]=x.useState(),[u,d]=x.useState({isTransitioning:!1}),[f,p]=x.useState(),[m,h]=x.useState(),[g,_]=x.useState(),v=x.useRef(new Map),y=x.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},unstable_pattern:Ke(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),Or(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Or(g==null||y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!g||!y){t&&u?t(()=>a(i)):r===!1?a(i):x.startTransition(()=>{r===!0&&s(e=>Ir(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n));return}m?(f?.resolve(),m.skipTransition(),_({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);x.useLayoutEffect(()=>e.subscribe(y),[e,y]),x.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new Pr)},[u]),x.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):x.startTransition(()=>{r===!0&&s(e=>Ir(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),x.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),x.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),_(void 0))},[u.isTransitioning,g]);let b=x.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=x.useMemo(()=>({router:e,navigator:b,static:!1,basename:S,onError:n}),[e,b,S,n]);return x.createElement(x.Fragment,null,x.createElement(Nn.Provider,{value:C},x.createElement(Pn.Provider,{value:o},x.createElement(Rn.Provider,{value:v.current},x.createElement(Ln.Provider,{value:u},x.createElement(Vr,{basename:S,location:o.location,navigationType:o.historyAction,navigator:b,unstable_useTransitions:r},x.createElement(Lr,{routes:e.routes,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function Ir(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Lr=x.memo(Rr);function Rr({routes:e,future:t,state:n,isStatic:r,onError:i}){return sr(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function zr(e){return rr(e.context)}function Br(e){k(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Vr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){k(!Xn(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=x.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=re(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:m}=n,h=x.useMemo(()=>{let e=Ae(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,unstable_mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return A(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:x.createElement(Bn.Provider,{value:c},x.createElement(Vn.Provider,{children:t,value:h}))}function Hr({children:e,location:t}){return or(Ur(e),t)}x.Component;function Ur(e,t=[]){let n=[];return x.Children.forEach(e,(e,r)=>{if(!x.isValidElement(e))return;let i=[...t,r];if(e.type===x.Fragment){n.push.apply(n,Ur(e.props.children,i));return}k(e.type===Br,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),k(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={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,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Ur(e.props.children,i)),n.push(a)}),n}var Wr=`get`,Gr=`application/x-www-form-urlencoded`;function Kr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function qr(e){return Kr(e)&&e.tagName.toLowerCase()===`button`}function Jr(e){return Kr(e)&&e.tagName.toLowerCase()===`form`}function Yr(e){return Kr(e)&&e.tagName.toLowerCase()===`input`}function Xr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Zr(e,t){return e.button===0&&(!t||t===`_self`)&&!Xr(e)}var Qr=null;function $r(){if(Qr===null)try{new FormData(document.createElement(`form`),0),Qr=!1}catch{Qr=!0}return Qr}var ei=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function ti(e){return e!=null&&!ei.has(e)?(A(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gr}"`),null):e}function ni(e,t){let n,r,i,a,o;if(Jr(e)){let o=e.getAttribute(`action`);r=o?Ae(o,t):null,n=e.getAttribute(`method`)||Wr,i=ti(e.getAttribute(`enctype`))||Gr,a=new FormData(e)}else if(qr(e)||Yr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Ae(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Wr,i=ti(e.getAttribute(`formenctype`))||ti(o.getAttribute(`enctype`))||Gr,a=new FormData(o,e),!$r()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Kr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Wr,r=null,i=Gr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var ri={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},ii=/[&><\u2028\u2029]/g;function ai(e){return e.replace(ii,e=>ri[e])}function oi(e,t){if(e===!1||e==null)throw Error(t)}function si(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&Ae(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function ci(e,t){if(e.id in t)return t[e.id];try{let n=await b(()=>import(e.module),[],import.meta.url);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function li(e){return e!=null&&typeof e.page==`string`}function ui(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function di(e,t,n){return gi((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await ci(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(ui).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function fi(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function pi(e,t,{includeHydrateFallback:n}={}){return mi(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function mi(e){return[...new Set(e)]}function hi(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function gi(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!li(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(hi(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function _i(){let e=x.useContext(Nn);return oi(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function vi(){let e=x.useContext(Pn);return oi(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var yi=x.createContext(void 0);yi.displayName=`FrameworkContext`;function bi(){let e=x.useContext(yi);return oi(e,`You must render this element inside a <HydratedRouter> element`),e}function xi(e,t){let n=x.useContext(yi),[r,i]=x.useState(!1),[a,o]=x.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=x.useRef(null);x.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),x.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Si(s,p),onBlur:Si(c,m),onMouseEnter:Si(l,p),onMouseLeave:Si(u,m),onTouchStart:Si(d,p)}]:[a,f,{}]:[!1,f,{}]}function Si(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ci({page:e,...t}){let n=In(),{router:r}=_i(),i=x.useMemo(()=>de(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?x.createElement(Ti,{page:e,matches:i,...t}):x.createElement(Ei,{page:e,matches:i,...t}):null}function wi(e){let{manifest:t,routeModules:n}=bi(),[r,i]=x.useState([]);return x.useEffect(()=>{let r=!1;return di(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Ti({page:e,matches:t,...n}){let r=Zn(),{future:i}=bi(),{basename:a}=_i(),o=x.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=si(e,a,i.unstable_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.unstable_trailingSlashAwareDataRequests,e,r,t]);return x.createElement(x.Fragment,null,o.map(e=>x.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Ei({page:e,matches:t,...n}){let r=Zn(),{future:i,manifest:a,routeModules:o}=bi(),{basename:s}=_i(),{loaderData:c,matches:l}=vi(),u=x.useMemo(()=>fi(e,t,l,a,r,`data`),[e,t,l,a,r]),d=x.useMemo(()=>fi(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=x.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=si(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=x.useMemo(()=>pi(d,a),[d,a]),m=wi(d);return x.createElement(x.Fragment,null,f.map(e=>x.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>x.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>x.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Di(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}x.Component;var Oi=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Oi&&(window.__reactRouterVersion=`7.14.0`)}catch{}function ki(e,t){return vt({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:O({window:t?.window}),hydrationData:t?.hydrationData||Ai(),routes:e,mapRouteProperties:Mr,hydrationRouteProperties:Nr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function Ai(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:ji(e.errors)}),e}function ji(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new We(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(r.__subType){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}function Mi({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=x.useState({action:n.action,location:n.location}),o=x.useCallback(e=>{r===!1?a(e):x.startTransition(()=>a(e))},[r]);return x.useLayoutEffect(()=>n.listen(o),[n,o]),x.createElement(Vr,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}Mi.displayName=`unstable_HistoryRouter`;var Ni=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pi=x.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,unstable_useTransitions:_}=x.useContext(Bn),v=typeof l==`string`&&Ni.test(l),y=Je(l,h);l=y.to;let b=Yn(l,{relative:r}),S=Zn(),C=null;if(o){let e=ze(o,[],S.unstable_mask?S.unstable_mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Be([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=xi(n,p),D=Bi(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:_});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(y.isExternal||i),A=x.createElement(`a`,{...p,...E,href:(k?C:void 0)||y.absoluteURL||b,onClick:k?O:e,ref:Di(m,T),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return w&&!v?x.createElement(x.Fragment,null,A,x.createElement(Ci,{page:b})):A});Pi.displayName=`Link`;var Fi=x.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=ar(a,{relative:c.relative}),d=Zn(),f=x.useContext(Pn),{navigator:p,basename:m}=x.useContext(Bn),h=f!=null&&Xi(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=Ae(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,S=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),C={isActive:b,isPending:S,isTransitioning:h},w=b?e:void 0,T;T=typeof n==`function`?n(C):[n,b?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return x.createElement(Pi,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Fi.displayName=`NavLink`;var Ii=x.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Wr,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=x.useContext(Bn),g=Ui(),_=Wi(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&Ni.test(s);return x.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?x.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Ii.displayName=`Form`;function Li({getKey:e,storageKey:t,...n}){let r=x.useContext(yi),{basename:i}=x.useContext(Bn),a=Zn(),o=Sr();Ji({getKey:e,storageKey:t});let s=x.useMemo(()=>{if(!r||!e)return null;let t=qi(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return x.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${ai(JSON.stringify(t||Gi))}, ${ai(JSON.stringify(s))})`}})}Li.displayName=`ScrollRestoration`;function I(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ri(e){let t=x.useContext(Nn);return k(t,I(e)),t}function zi(e){let t=x.useContext(Pn);return k(t,I(e)),t}function Bi(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=er(),d=Zn(),f=ar(e,{relative:o});return x.useCallback(p=>{if(Zr(p,t)){p.preventDefault();let t=n===void 0?ne(d)===ne(f):n,m=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?x.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var Vi=0,Hi=()=>`__${String(++Vi)}__`;function Ui(){let{router:e}=Ri(`useSubmit`),{basename:t}=x.useContext(Bn),n=br(),r=e.fetch,i=e.navigate;return x.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=ni(e,t);a.navigate===!1?await r(a.fetcherKey||Hi(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Wi(e,{relative:t}={}){let{basename:n}=x.useContext(Bn),r=x.useContext(Hn);k(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...ar(e||`.`,{relative:t})},o=Zn();if(e==null){a.search=o.search;let e=new URLSearchParams(a.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();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Be([n,a.pathname])),ne(a)}var Gi=`react-router-scroll-positions`,Ki={};function qi(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:Ae(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Ji({getKey:e,storageKey:t}={}){let{router:n}=Ri(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=zi(`useScrollRestoration`),{basename:a}=x.useContext(Bn),o=Zn(),s=Sr(),c=xr();x.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Yi(x.useCallback(()=>{if(c.state===`idle`){let t=qi(o,s,a,e);Ki[t]=window.scrollY}try{sessionStorage.setItem(t||Gi,JSON.stringify(Ki))}catch(e){A(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(x.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Gi);e&&(Ki=JSON.parse(e))}catch{}},[t]),x.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Ki,()=>window.scrollY,e?(t,n)=>qi(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),x.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{A(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Yi(e,t){let{capture:n}=t||{};x.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Xi(e,{relative:t}={}){let n=x.useContext(Ln);k(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ri(`useViewTransitionState`),i=ar(e,{relative:t});if(!n.isTransitioning)return!1;let a=Ae(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Ae(n.nextLocation.pathname,r)||n.nextLocation.pathname;return De(i.pathname,o)!=null||De(i.pathname,a)!=null}var Zi=o((e=>{var t=f().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){return t.H.useMemoCache(e)}})),Qi=o(((e,t)=>{t.exports=Zi()})),$i=g(),ea=Qi(),ta=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),na=o(((e,t)=>{t.exports=ta()})),ra={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ia=x.createContext&&x.createContext(ra),aa=[`attr`,`size`,`title`];function oa(e,t){if(e==null)return{};var n,r,i=sa(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function sa(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ca(){return ca=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},ca.apply(null,arguments)}function la(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 ua(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?la(Object(n),!0).forEach(function(t){da(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):la(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function da(e,t,n){return(t=fa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fa(e){var t=pa(e,`string`);return typeof t==`symbol`?t:t+``}function pa(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ma(e){return e&&e.map((e,t)=>x.createElement(e.tag,ua({key:t},e.attr),ma(e.child)))}function ha(e){return t=>x.createElement(ga,ca({attr:ua({},e.attr)},t),ma(e.child))}function ga(e){var t=t=>{var{attr:n,size:r,title:i}=e,a=oa(e,aa),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),x.createElement(`svg`,ca({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:ua(ua({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:`http://www.w3.org/2000/svg`}),i&&x.createElement(`title`,null,i),e.children)};return ia===void 0?t(ra):x.createElement(ia.Consumer,null,e=>t(e))}var L=na();function _a(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M228.9 79.9L51.8 403.1C40.6 423.3 55.5 448 78.9 448h354.3c23.3 0 38.2-24.7 27.1-44.9L283.1 79.9c-11.7-21.2-42.5-21.2-54.2 0zM273.6 214L270 336h-28l-3.6-122h35.2zM256 402.4c-10.7 0-19.1-8.1-19.1-18.4s8.4-18.4 19.1-18.4 19.1 8.1 19.1 18.4-8.4 18.4-19.1 18.4z`},child:[]}]})(e)}function va(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M443.5 420.2L336.7 312.4c20.9-26.2 33.5-59.4 33.5-95.5 0-84.5-68.5-153-153.1-153S64 132.5 64 217s68.5 153 153.1 153c36.6 0 70.1-12.8 96.5-34.2l106.1 107.1c3.2 3.4 7.6 5.1 11.9 5.1 4.1 0 8.2-1.5 11.3-4.5 6.6-6.3 6.8-16.7.6-23.3zm-226.4-83.1c-32.1 0-62.3-12.5-85-35.2-22.7-22.7-35.2-52.9-35.2-84.9 0-32.1 12.5-62.3 35.2-84.9 22.7-22.7 52.9-35.2 85-35.2s62.3 12.5 85 35.2c22.7 22.7 35.2 52.9 35.2 84.9 0 32.1-12.5 62.3-35.2 84.9-22.7 22.7-52.9 35.2-85 35.2z`},child:[]}]})(e)}function ya(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M368.5 240h-225c-8.8 0-16 7.2-16 16 0 4.4 1.8 8.4 4.7 11.3 2.9 2.9 6.9 4.7 11.3 4.7h225c8.8 0 16-7.2 16-16s-7.2-16-16-16z`},child:[]}]})(e)}function ba(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm19 304h-38.2V207.9H275V352zm-19.1-159.8c-11.3 0-20.5-8.6-20.5-20s9.3-19.9 20.5-19.9c11.4 0 20.7 8.5 20.7 19.9s-9.3 20-20.7 20z`},child:[]}]})(e)}function xa(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M255.8 112c-80.4 0-143.8 50.6-219.6 133.3-5.5 6.1-5.6 15.2-.1 21.3C101 338.3 158.2 400 255.8 400c96.4 0 168.7-77.7 220.1-134 5.3-5.8 5.6-14.6.5-20.7C424 181.8 351.5 112 255.8 112zm4.4 233.9c-53 2.4-96.6-41.2-94.1-94.1 2.1-46.2 39.5-83.6 85.7-85.7 53-2.4 96.6 41.2 94.1 94.1-2.1 46.2-39.5 83.6-85.7 85.7z`},child:[]},{tag:`path`,attr:{d:`M256 209c0-6 1.1-11.7 3.1-16.9-1 0-2-.1-3.1-.1-36.9 0-66.6 31.4-63.8 68.9 2.4 31.3 27.6 56.5 58.9 58.9 37.5 2.8 68.9-26.9 68.9-63.8 0-1.3-.1-2.6-.1-3.9-5.6 2.5-11.7 3.9-18.2 3.9-25.2 0-45.7-21.1-45.7-47z`},child:[]}]})(e)}function Sa(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M88.3 68.1c-5.6-5.5-14.6-5.5-20.1.1-5.5 5.5-5.5 14.5 0 20l355.5 355.7c3.7 3.7 9 4.9 13.7 3.6 2.4-.6 4.6-1.9 6.4-3.7 5.5-5.5 5.5-14.5 0-20L88.3 68.1zM260.2 345.9c-53 2.4-96.6-41.2-94.1-94.1.6-12.2 3.6-23.8 8.6-34.3L121.3 164c-27.7 21.4-55.4 48.9-85.1 81.3-5.5 6.1-5.6 15.2-.1 21.3C101 338.3 158.2 400 255.8 400c29.7 0 57.1-7.4 82.3-19.2l-43.5-43.5c-10.6 5-22.2 8-34.4 8.6zM475.8 266c5.3-5.8 5.6-14.6.5-20.7C424 181.8 351.5 112 255.8 112c-29.1 0-56 6.6-82 19l43.7 43.7c10.5-5 22.1-8.1 34.3-8.6 53-2.4 96.6 41.2 94.1 94.1-.6 12.2-3.6 23.8-8.6 34.3l53.5 53.5c33-25.3 61.3-55.9 85-82z`},child:[]},{tag:`path`,attr:{d:`M192.2 260.9c2.4 31.3 27.6 56.5 58.9 58.9 8.2.6 16.1-.3 23.4-2.6l-79.8-79.8c-2.2 7.4-3.1 15.3-2.5 23.5zM320 256c0-1.3-.1-2.6-.1-3.9-5.6 2.5-11.7 3.9-18.2 3.9-1.1 0-2.1 0-3.1-.1l18.6 18.7c1.8-5.9 2.8-12.2 2.8-18.6zM256 209c0-6 1.1-11.7 3.1-16.9-1 0-2-.1-3.1-.1-6.4 0-12.6 1-18.5 2.8l18.7 18.7c-.1-1.5-.2-3-.2-4.5z`},child:[]}]})(e)}function Ca(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M278.6 256l68.2-68.2c6.2-6.2 6.2-16.4 0-22.6-6.2-6.2-16.4-6.2-22.6 0L256 233.4l-68.2-68.2c-6.2-6.2-16.4-6.2-22.6 0-3.1 3.1-4.7 7.2-4.7 11.3 0 4.1 1.6 8.2 4.7 11.3l68.2 68.2-68.2 68.2c-3.1 3.1-4.7 7.2-4.7 11.3 0 4.1 1.6 8.2 4.7 11.3 6.2 6.2 16.4 6.2 22.6 0l68.2-68.2 68.2 68.2c6.2 6.2 16.4 6.2 22.6 0 6.2-6.2 6.2-16.4 0-22.6L278.6 256z`},child:[]}]})(e)}function wa(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M362.6 192.9L345 174.8c-.7-.8-1.8-1.2-2.8-1.2-1.1 0-2.1.4-2.8 1.2l-122 122.9-44.4-44.4c-.8-.8-1.8-1.2-2.8-1.2-1 0-2 .4-2.8 1.2l-17.8 17.8c-1.6 1.6-1.6 4.1 0 5.7l56 56c3.6 3.6 8 5.7 11.7 5.7 5.3 0 9.9-3.9 11.6-5.5h.1l133.7-134.4c1.4-1.7 1.4-4.2-.1-5.7z`},child:[]}]})(e)}function Ta(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm106.5 150.5L228.8 332.8h-.1c-1.7 1.7-6.3 5.5-11.6 5.5-3.8 0-8.1-2.1-11.7-5.7l-56-56c-1.6-1.6-1.6-4.1 0-5.7l17.8-17.8c.8-.8 1.8-1.2 2.8-1.2 1 0 2 .4 2.8 1.2l44.4 44.4 122-122.9c.8-.8 1.8-1.2 2.8-1.2 1.1 0 2.1.4 2.8 1.2l17.5 18.1c1.8 1.7 1.8 4.2.2 5.8z`},child:[]}]})(e)}function Ea(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z`},child:[]}]})(e)}function Da(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z`},child:[]}]})(e)}function Oa(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M217.9 256L345 129c9.4-9.4 9.4-24.6 0-33.9-9.4-9.4-24.6-9.3-34 0L167 239c-9.1 9.1-9.3 23.7-.7 33.1L310.9 417c4.7 4.7 10.9 7 17 7s12.3-2.3 17-7c9.4-9.4 9.4-24.6 0-33.9L217.9 256z`},child:[]}]})(e)}function ka(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm17.2 109.6l-3.1 115.1c-.2 8.2-5.9 14.8-14.1 14.8s-13.9-6.6-14.1-14.8l-3.1-115.1c-.2-9.6 7.5-17.6 17.2-17.6 9.6 0 17.4 7.9 17.2 17.6zM256 354c-10.7 0-19.1-8.1-19.1-18.4s8.4-18.4 19.1-18.4c10.7 0 19.1 8.1 19.1 18.4S266.7 354 256 354z`},child:[]}]})(e)}function Aa(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M368.5 240H272v-96.5c0-8.8-7.2-16-16-16s-16 7.2-16 16V240h-96.5c-8.8 0-16 7.2-16 16 0 4.4 1.8 8.4 4.7 11.3 2.9 2.9 6.9 4.7 11.3 4.7H240v96.5c0 4.4 1.8 8.4 4.7 11.3 2.9 2.9 6.9 4.7 11.3 4.7 8.8 0 16-7.2 16-16V272h96.5c8.8 0 16-7.2 16-16s-7.2-16-16-16z`},child:[]}]})(e)}function ja(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M346.5 240H272v-74.5c0-8.8-7.2-16-16-16s-16 7.2-16 16V240h-74.5c-8.8 0-16 6-16 16s7.5 16 16 16H240v74.5c0 9.5 7 16 16 16s16-7.2 16-16V272h74.5c8.8 0 16-7.2 16-16s-7.2-16-16-16z`},child:[]},{tag:`path`,attr:{d:`M256 76c48.1 0 93.3 18.7 127.3 52.7S436 207.9 436 256s-18.7 93.3-52.7 127.3S304.1 436 256 436c-48.1 0-93.3-18.7-127.3-52.7S76 304.1 76 256s18.7-93.3 52.7-127.3S207.9 76 256 76m0-28C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48z`},child:[]}]})(e)}var Ma=o(((e,t)=>{(function(){var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()})),Na=o(((e,t)=>{var n=typeof Element<`u`,r=typeof Map==`function`,i=typeof Set==`function`,a=typeof ArrayBuffer==`function`&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;var s,c,l;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(!o(e[c],t[c]))return!1;return!0}var u;if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!o(c.value[1],t.get(c.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==`function`&&typeof t.valueOf==`function`)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==`function`&&typeof t.toString==`function`)return e.toString()===t.toString();if(l=Object.keys(e),s=l.length,s!==Object.keys(t).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[c]))return!1;if(n&&e instanceof Element)return!1;for(c=s;c--!==0;)if(!((l[c]===`_owner`||l[c]===`__v`||l[c]===`__o`)&&e.$$typeof)&&!o(e[l[c]],t[l[c]]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||``).match(/stack|recursion/i))return console.warn(`react-fast-compare cannot handle circular refs`),!1;throw e}}})),R=c(Ma(),1),Pa=c(Na(),1);function Fa(e){throw Error(`The prop "${e}" is required`)}var Ia=e=>Wa(e,`-`);function La(e,t=[],n={}){for(let r of Object.keys(e)){let i=e[r],a=t.concat([Ia(r)]);typeof i==`object`&&i?La(i,a,n):n[a.join(`-`)]=i}return n}function Ra(e,t,n=[]){return new Proxy(e,{get(e,r,i){let a=n.concat(r.toString()),o=Reflect.get(e,r,i);return o&&typeof o==`object`&&!Array.isArray(o)?Ra(o,t,a):t(a,o)}})}function za(e){return Ra(e,e=>`var(--${e.map(Ia).join(`-`)})`)}function Ba(e){return e}function Va(e,t){if(e!=null)if(typeof e==`function`)e(t);else try{e.current=t}catch{throw Error(`Cannot assign value "${t}" to ref "${e}"`)}}function Ha(...e){return(0,x.useMemo)(()=>e.every(e=>e==null)?null:t=>{e.forEach(e=>{Va(e,t)})},[...e])}function Ua(e,t){let n=(0,x.createContext)(t);return n.displayName=e,n}function Wa(e,t){return e.replace(/([a-z\d])([A-Z])/g,`$1${t}$2`).replace(/([A-Z]+)([A-Z][a-z\d]+)/g,`$1${t}$2`).toLowerCase()}function Ga(e){return e==null?[]:Array.isArray(e)?e:[e]}var Ka={alert:`BZ7qn`,title:`hdHDi`,closeButton:`SgstT`,content:`Q9Sh5`,error:`VGIpm`,success:`DlYCJ`,info:`rHcuC`,warning:`OC-ol`,none:`xqeOj`},qa={success:Ta,error:ka,warning:_a,info:ba,none:ba};function Ja({intent:e=`none`,title:t,onClose:n,children:r,...i}){let a=qa[e];return(0,L.jsxs)(`div`,{...i,className:(0,R.default)(Ka.alert,i.className,Ka[e]),children:[n&&(0,L.jsx)(`button`,{type:`button`,onClick:n,className:Ka.closeButton,"aria-label":`Close`,children:(0,L.jsx)(Ca,{})}),(0,L.jsxs)(`div`,{className:Ka.title,children:[(0,L.jsx)(a,{}),t]}),typeof r<`u`&&(0,L.jsx)(`div`,{className:Ka.content,children:r})]})}function Ya(){return typeof window<`u`&&!!window.document?.createElement}var Xa=Ya(),Za=Xa?x.useLayoutEffect:x.useEffect,Qa={badge:`xeHAL`,"badge-danger":`cgE-K`,"badge-warning":`_0U-VJ`,"badge-success":`ZgKwX`,"badge-pill":`OBQRM`,notificationBadge:`LzQDv`},$a=Ba(({as:e=`span`,intent:t=`none`,pill:n=!1,className:r,ref:i,...a})=>(0,L.jsx)(e,{ref:i,...a,className:(0,R.default)(Qa.badge,Qa[`badge-${t}`],n&&Qa[`badge-pill`],r)})),eo={root:`mtrF8`,contained:`W8YVd`,"intent-danger":`_3UX8S`,"intent-none":`-HhPB`,text:`_2LiTf`,outlined:`_9x9uq`,"size-s":`_5jbkc`,"size-m":`tf6zw`,"size-l":`_7vljf`,content:`SUABR`,spinner:`QSIpR`},to={root:`QAwiK`,static:`xse-M`,circle:`bWHVH`,circleTrack:`qGMq-`,indeterminate:`uxHDU`,circleStatic:`aGrAV`,circleIndeterminate:`vIA5t`};function no({size:e=52,thickness:t=2,value:n,color:r=`var(--CircularProgress-color)`,children:i,className:a,...o}){let s={},c={},l={};if(typeof n==`number`){let r=2*Math.PI*((e-t)/2);s.strokeDasharray=r.toFixed(3),l[`aria-valuenow`]=Math.round(n),s.strokeDashoffset=`${((100-n)/100*r).toFixed(3)}px`,c.transform=`rotate(-90deg)`}return(0,L.jsxs)(`div`,{className:(0,R.default)(to.root,{[to.indeterminate]:n==null,[to.static]:typeof n==`number`},a),style:{color:r,width:e,height:e,...c},role:`progressbar`,...l,...o,children:[(0,L.jsxs)(`svg`,{viewBox:`${e/2} ${e/2} ${e} ${e}`,children:[(0,L.jsx)(`circle`,{className:to.circleTrack,cx:e,cy:e,r:(e-t)/2,fill:`none`,strokeWidth:t}),(0,L.jsx)(`circle`,{className:(0,R.default)(to.circle,{[to.circleIndeterminate]:n==null,[to.circleStatic]:typeof n==`number`}),style:s,cx:e,cy:e,r:(e-t)/2,fill:`none`,strokeWidth:t,strokeLinecap:`round`})]}),(0,L.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,transform:`rotate(90deg)`},children:i})]})}var ro=e=>{let t=Xa?e.map(e=>window.matchMedia(e).matches):e.map(()=>!0);return{subscribe(n){if(!Xa)return()=>{};let r=e.map(e=>window.matchMedia(e));t=r.map(e=>e.matches);let i=()=>{t=e.map(e=>window.matchMedia(e).matches),n()};for(let e of r)e.addEventListener(`change`,i);return()=>{for(let e of r)e.removeEventListener(`change`,i)}},getSnapshot(){return t},getServerSnapshot(){return t}}};function io(e){let t=Ga(e),n=(0,x.useMemo)(()=>ro(t),[t.join(`/`)]),r=(0,x.useSyncExternalStore)(n.subscribe,n.getSnapshot,n.getServerSnapshot);return Array.isArray(e)?r:r[0]}function ao(e,t){let[n,r]=(0,x.useState)(()=>{if(!Xa)return t;try{return JSON.parse(window.localStorage.getItem(e)||`null`)??t}catch{return t}});return(0,x.useEffect)(()=>{if(Xa)try{n===void 0?window.localStorage.removeItem(e):window.localStorage.setItem(e,JSON.stringify(n))}catch{}},[e,n]),(0,x.useEffect)(()=>{let t=t=>{if(!(t.key!==e||t.storageArea!==window.localStorage))try{t.newValue!=null&&r(JSON.parse(t.newValue))}catch{}};return window.addEventListener(`storage`,t),()=>{window.removeEventListener(`storage`,t)}},[e]),[n,r]}var oo=e=>`screen and (min-width: ${e})`,so=[oo(`0px`),oo(`600px`),oo(`1200px`)];function co(e){let[t,n,r,i]=To(e);return`hsla(${t}, ${n*.9}%, ${100-r}%, ${i})`}function lo(e){return JSON.parse(JSON.stringify(e),(e,t)=>typeof t==`string`&&t.startsWith(`#`)?co(t):t)}function uo(e){return fo(e)}function fo(e){let{id:t=`theme-${new Date().getTime()*Math.random()}`,...n}=e,{primary:r=`#0074d9`,secondary:i=`#a2c14e`,danger:a=`#d2322d`,...o}=n.colors||{},{base:s=`#ffffff`,...c}=o,l=`#fff`,u={"05":`#f9fafb`,10:`#f3f4f6`,20:`#e5e7eb`,30:`#d1d5db`,40:`#9ca3af`,50:`#6b7280`,60:`#4b5563`,70:`#374151`,80:`#1f2937`,90:`#111827`,95:`#030712`},d={"05":`#fef2f2`,10:`#fee2e2`,20:`#fecaca`,30:`#fca5a5`,40:`#f87171`,50:`#ef4444`,60:`#dc2626`,70:`#b91c1c`,80:`#991b1b`,90:`#7f1d1d`,95:`#450a0a`};return{id:t,tokens:{...n,spacing:{auto:`auto`,none:`0px`,xxs:`2px`,xs:`4px`,s:`8px`,m:`16px`,l:`24px`,xl:`32px`,xxl:`64px`,...n.spacing},fonts:{base:`Inter`,...n.fonts},colors:{base:s,gray:u,red:d,linkText:r,primaryText:`#1f2937`,baseText:s===`#ffffff`?u[70]:xo(s,100),primary:r,secondary:i,primaryLight:xo(r,20),primaryDark:xo(r,-20),secondaryLight:xo(i,20),secondaryDark:xo(i,-20),danger:a,dangerLight:xo(a,20),dangerDark:xo(a,-20),warning:`#fbbf24`,warningTint:xo(`#fff3cd`,-10),warningLight:`#fff3cd`,success:`#047857`,successTint:xo(`#d4edda`,-10),successLight:`#d4edda`,info:`#0c5460`,infoTint:xo(`#d1ecf1`,-10),infoLight:`#d1ecf1`,white:l,formsBorder:u[30],formsBorderHover:u[40],formsBorderFocus:`transparent`,formsBorderDisabled:`#ccc`,formsBorderError:d[60],formsBorderWidth:`1px`,formsBorderRadius:`4px`,formsPadding:`8px`,formsBackground:u[`05`],formsBackgroundHover:l,formsBackgroundFocus:l,formsBackgroundDisabled:u[10],formsBackgroundError:d[`05`],formsText:u[60],formsTextDisabled:u[50],formsTextError:u[60],formsTextPlaceholder:u[40],formsError:d[60],formsShadow:`0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.06)`,selection:{background:xo(r,10),text:`#fff`},...c},shadows:{elevation0:`none`,elevation1:`0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.1)`,elevation2:`0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)`,...n.shadows},borderRadius:{s:`4px`,m:`6px`,...n.borderRadius},focusRing:{width:`2px`,color:`rgba(64, 122, 230, 0.6)`,...n.focusRing},zIndex:Array.from({length:10}).map((e,t)=>t*100),cursor:{pointer:`pointer`,...n.cursor}},breakpoints:so}}var po=uo({id:`dmk-default`,colors:{primary:`#0074d9`,secondary:`#a2c14e`}}),mo=(0,x.createContext)({theme:po,setTheme:()=>{},darkMode:!1,setDarkMode:()=>!1,tokens:za(po.tokens)});function z({theme:e=po,children:t,injectCssCustomProperties:n=!0,allowDarkMode:r=!1,respectDefaultDarkMode:i=!1}){let[a,o]=(0,x.useState)(e);(0,x.useEffect)(()=>{o(e)},[e]);let s=(0,x.useMemo)(()=>lo(a),[a]),c=io(`(prefers-color-scheme: dark)`),[l,u]=ao(`dmk-dark-mode`,i?c:!1),d=l&&r?s:a,f=d.tokens.colors.base;return(0,x.useEffect)(()=>{let e=document.createElement(`div`);e.style.background=f,document.body.appendChild(e);let t=window.getComputedStyle(e).backgroundColor;document.body.removeChild(e),document.documentElement.style.setProperty(`--theme-color`,f);let n=document.querySelector(`meta[name="theme-color"]`);n??(n=document.createElement(`meta`),n.setAttribute(`name`,`theme-color`),document.head.appendChild(n)),n.setAttribute(`content`,Co(t))},[l,f]),(0,x.useInsertionEffect)(()=>{n&&bo(La(d.tokens)),document.body.setAttribute(`data-mode`,l?`dark`:`light`)},[d,n,l]),(0,L.jsx)(mo,{value:(0,x.useMemo)(()=>({theme:d,tokens:za(d.tokens),setTheme:o,darkMode:l,setDarkMode:u}),[d,l,u]),children:(0,L.jsx)(yo,{breakpoints:e.breakpoints,children:t})})}function ho(){return(0,x.use)(mo)}function go(){return(0,x.use)(vo)}function _o(){let{tokens:e}=ho();return e}var vo=Ua(`BreakpointsContext`,[!1,!1,!0]);function yo({breakpoints:e,children:t}){return(0,L.jsx)(vo,{value:io(e),children:t})}function bo(e){for(let t of Object.keys(e))document.documentElement.style.setProperty(`--${t}`,e[t])}function xo(e,t){return`#${e.replace(/^#/,``).replace(/../g,e=>`0${Math.min(255,Math.max(0,parseInt(e,16)+t)).toString(16)}`.slice(-2))}`}function So(e){e.startsWith(`#`)&&(e=e.slice(1));let[t,n,r,i]=[0,0,0,1];if(e.length===3)t=parseInt(`${e[0]}${e[0]}`,16),n=parseInt(`${e[1]}${e[1]}`,16),r=parseInt(`${e[2]}${e[2]}`,16),i=1;else if(e.length===4)t=parseInt(`${e[0]}${e[0]}`,16),n=parseInt(`${e[1]}${e[1]}`,16),r=parseInt(`${e[2]}${e[2]}`,16),i=parseInt(`${e[3]}${e[3]}`,16),i=+(i/255).toFixed(3);else if(e.length===6)t=parseInt(`${e[0]}${e[1]}`,16),n=parseInt(`${e[2]}${e[3]}`,16),r=parseInt(`${e[4]}${e[5]}`,16),i=1;else if(e.length===8)t=parseInt(`${e[0]}${e[1]}`,16),n=parseInt(`${e[2]}${e[3]}`,16),r=parseInt(`${e[4]}${e[5]}`,16),i=parseInt(`${e[6]}${e[7]}`,16),i=+(i/255).toFixed(3);else throw Error(`Invalid hex: ${e}`);return[t,n,r,i]}function Co(e){let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);if(!t)return`#ffffff`;let[,n,r,i,a]=t.map(Number),o=e=>{let t=Math.round(e).toString(16);return t.length===1?`0${t}`:t};if(a==null||isNaN(a)||a===1)return`#${o(n)}${o(r)}${o(i)}`;let s=Math.round(a*255);return`#${o(n)}${o(r)}${o(i)}${o(s)}`}function wo(e,t,n,r){e/=255,t/=255,n/=255;let i=Math.min(e,t,n),a=Math.max(e,t,n),o=a-i,[s,c,l]=[0,0,0];return s=o===0?0:a===e?(t-n)/o%6:a===t?(n-e)/o+2:(e-t)/o+4,s=Math.round(s*60),s<0&&(s+=360),l=(a+i)/2,c=o===0?0:o/(1-Math.abs(2*l-1)),c=+(c*100).toFixed(1),l=+(l*100).toFixed(1),[s,c,l,r]}function To(e){return wo(...So(e))}var Eo=Ba(({as:e=`button`,variant:t=`contained`,intent:n=`none`,className:r,color:i,style:a,size:o,isPending:s,disabled:c,children:l,...u})=>{let d=Do({variant:t,intent:n,color:i,className:r,style:a,size:o});return(0,L.jsxs)(e,{"data-state":s?`pending`:`initial`,type:e===`button`?`button`:void 0,onTouchStart:()=>{},...u,...d,disabled:c||s,children:[(0,L.jsx)(`span`,{className:eo.content,children:l}),s&&(0,L.jsx)(`span`,{className:eo.spinner,children:(0,L.jsx)(no,{size:22,thickness:2})})]})});function Do({variant:e=`contained`,intent:t=`none`,color:n,style:r,size:i=`m`,className:a}={}){return{style:{...n&&{"--Button-color":n,"--Button-hoverColor":xo(n,20)},...r},className:(0,R.default)(eo.root,eo[e],eo[`intent-${t}`],eo[`size-${i}`],a)}}var Oo=m(),ko={root:`nwF8S`,checkbox:`_076Ml`,hiddenCheckbox:`vULBC`},Ao={vstack:`f-weF`,"stack--spacing-none":`_4n4EX`,hstack:`O-Obi`,"stack--spacing-xxs":`FpVz1`,"stack--spacing-xs":`yXJ18`,"stack--spacing-s":`fvPFs`,"stack--spacing-m":`_9zB8n`,"stack--spacing-l":`Fh5sy`,"stack--spacing-xl":`_1cgrL`,"stack--spacing-xxl":`nfwQY`,wrap:`NcK99`};function jo(e){let t=go();return Array.isArray(e)?No(t,e):e}function Mo(e){let t=go();return e.map(e=>Array.isArray(e)?No(t,e):e)}function No(e,t){for(let n=e.length-1;n>=0;--n)if(e[n])return t[n];throw Error(`Invalid breakpoint config. At least one of them should have min-width: 0px`)}function Po({height:e=`m`,horizontal:t=!1}){let[n,r]=Mo([e,t]),i=_o();return(0,L.jsx)(`div`,{style:{flexGrow:0,flexShrink:0,[r?`width`:`height`]:typeof n==`number`?n:i.spacing[n].valueOf()}})}function Fo(e){let t=_o(),{alignItems:n,alignSelf:r,justifyContent:i,paddingLeft:a,paddingRight:o,paddingTop:s,paddingBottom:c,paddingX:l,paddingY:u,padding:d,marginLeft:f,marginRight:p,marginTop:m,marginBottom:h,marginX:g,marginY:_,margin:v,...y}=e,[b,x,S]=Mo([i,n,r]),[C,w,T,E,D,O,k]=Mo([a,o,s,c,l,u,d]).map(e=>typeof e==`number`||e==null?e:t.spacing[e]),[A,j,ee,te,ne,re,M]=Mo([f,p,m,h,g,_,v]).map(e=>typeof e==`number`||e==null?e:t.spacing[e]),N={};return D!=null&&(N.paddingLeft=D.valueOf(),N.paddingRight=D.valueOf()),O!=null&&(N.paddingTop=O.valueOf(),N.paddingBottom=O.valueOf()),C!=null&&(N.paddingLeft=C.valueOf()),w!=null&&(N.paddingRight=w.valueOf()),T!=null&&(N.paddingTop=T.valueOf()),E!=null&&(N.paddingBottom=E.valueOf()),k!=null&&(N.padding=k.valueOf()),ne!=null&&(N.marginLeft=ne.valueOf(),N.marginRight=ne.valueOf()),re!=null&&(N.marginTop=ee?.valueOf(),N.marginBottom=te?.valueOf()),A!=null&&(N.marginLeft=A.valueOf()),j!=null&&(N.marginRight=j.valueOf()),ee!=null&&(N.marginTop=ee.valueOf()),te!=null&&(N.marginBottom=te.valueOf()),M!=null&&(N.margin=M.valueOf()),b!=null&&(N.justifyContent=b),x!=null&&(N.alignItems=x),S!=null&&(N.alignSelf=S),[N,y]}var Io=Ba(function({as:e=`div`,spacing:t=`m`,justifyContent:n=`flex-start`,alignItems:r=`stretch`,horizontal:i=!1,wrap:a=!1,...o}){let[s,c,l]=Mo([i,t,a]),[u,d]=Fo({alignItems:r,justifyContent:n,...o});return(0,L.jsx)(e,{...d,className:(0,R.default)(s?Ao.hstack:Ao.vstack,l&&Ao.wrap,o.className,typeof c!=`number`&&Ao[`stack--spacing-${c}`]),style:{...u,...o.style}})}),Lo=Ua(`CheckboxGroupContext`,null);function Ro({children:e,error:t,style:n,className:r,indeterminate:i,...a}){let o=zo(a);return(0,L.jsxs)(`label`,{"aria-disabled":o.disabled,"data-error":t,className:(0,R.default)(ko.root,r),style:n,children:[(0,L.jsx)(`input`,{type:`checkbox`,...a,className:(0,R.default)(`dmk-visually-hidden`,ko.hiddenCheckbox),"aria-checked":o.checked,"aria-invalid":t?`true`:`false`,"data-indeterminate":i,...o}),(0,L.jsx)(`span`,{className:ko.checkbox}),(0,L.jsx)(`span`,{children:e})]})}function zo(e){let t=(0,x.use)(Lo);return t==null?e:{value:e.value,name:t.name,checked:t.isChecked(e.value),disabled:t.disabled,onChange:t.onChange}}function Bo(...e){}function Vo(e,t){return Ho(e)?e(Uo(t)?t():t):e}function Ho(e){return typeof e==`function`}function Uo(e){return typeof e==`function`}function Wo(e,t){return typeof Object.hasOwn==`function`?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function Go(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function Ko(e){return e.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``)}function qo(e,t){let n={...e};for(let e of t)Wo(n,e)&&delete n[e];return n}function Jo(e,t){let n={};for(let r of t)Wo(e,r)&&(n[r]=e[r]);return n}function Yo(e){return e}function Xo(e,t){if(!e)throw Error(typeof t==`string`?t:`Invariant failed`)}function Zo(e){return Object.keys(e)}function Qo(e,...t){let n=typeof e==`function`?e(...t):e;return n==null?!1:!n}function $o(e){return e.disabled||e[`aria-disabled`]===!0||e[`aria-disabled`]===`true`}function es(e){return e.getAttribute(`aria-disabled`)===`true`||`disabled`in e&&e.disabled===!0}function ts(e){let t={};for(let n in e)e[n]!==void 0&&(t[n]=e[n]);return t}function B(...e){for(let t of e)if(t!==void 0)return t}function ns(e,t){typeof e==`function`?e(t):e&&(e.current=t)}function rs(e){return!e||!(0,x.isValidElement)(e)?!1:`ref`in e.props||`ref`in e}function is(e){return rs(e)?{...e.props}.ref||e.ref:null}function as(e,t){let n={...e};for(let r in t){if(!Wo(t,r))continue;if(r===`className`){let r=`className`;n[r]=e[r]?`${e[r]} ${t[r]}`:t[r];continue}if(r===`style`){let r=`style`;n[r]=e[r]?{...e[r],...t[r]}:t[r];continue}let i=t[r];if(typeof i==`function`&&r.startsWith(`on`)){let t=e[r];if(typeof t==`function`){n[r]=(...e)=>{i(...e),t(...e)};continue}}n[r]=i}return n}var os=ss();function ss(){return typeof window<`u`&&!!window.document?.createElement}function V(e){return e?`self`in e?e.document:e.ownerDocument||document:document}function cs(e){return e?`self`in e?e.self:V(e).defaultView||window:self}function ls(e,t=!1){let{activeElement:n}=V(e);if(!n?.nodeName)return null;if(ds(n)&&n.contentDocument?.body)return ls(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=V(n).getElementById(e);if(t)return t}}return n}function us(e,t){return e===t||e.contains(t)}function ds(e){return e.tagName===`IFRAME`}function fs(e){let t=e.tagName.toLowerCase();return t===`button`?!0:t===`input`&&e.type?ps.indexOf(e.type)!==-1:!1}var ps=[`button`,`color`,`file`,`image`,`reset`,`submit`];function ms(e){if(typeof e.checkVisibility==`function`)return e.checkVisibility();let t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}function hs(e){try{let t=e instanceof HTMLInputElement&&e.selectionStart!==null,n=e.tagName===`TEXTAREA`;return t||n||!1}catch{return!1}}function gs(e){return e.isContentEditable||hs(e)}function _s(e){if(hs(e))return e.value;if(e.isContentEditable){let t=V(e).createRange();return t.selectNodeContents(e),t.toString()}return``}function vs(e){let t=0,n=0;if(hs(e))t=e.selectionStart||0,n=e.selectionEnd||0;else if(e.isContentEditable){let r=V(e).getSelection();if(r?.rangeCount&&r.anchorNode&&us(e,r.anchorNode)&&r.focusNode&&us(e,r.focusNode)){let i=r.getRangeAt(0),a=i.cloneRange();a.selectNodeContents(e),a.setEnd(i.startContainer,i.startOffset),t=a.toString().length,a.setEnd(i.endContainer,i.endOffset),n=a.toString().length}}return{start:t,end:n}}function ys(e,t){let n=[`dialog`,`menu`,`listbox`,`tree`,`grid`],r=e?.getAttribute(`role`);return r&&n.indexOf(r)!==-1?r:t}function bs(e,t){let n={menu:`menuitem`,listbox:`option`,tree:`treeitem`},r=ys(e);return r?n[r]??t:t}function xs(e){if(!e)return null;let t=e=>e===`auto`||e===`scroll`;if(e.clientHeight&&e.scrollHeight>e.clientHeight){let{overflowY:n}=getComputedStyle(e);if(t(n))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){let{overflowX:n}=getComputedStyle(e);if(t(n))return e}return xs(e.parentElement)||document.scrollingElement||document.body}function Ss(e,t){let n=e.map((e,t)=>[t,e]),r=!1;return n.sort(([e,n],[i,a])=>{let o=t(n),s=t(a);return o===s||!o||!s?0:Cs(o,s)?(e>i&&(r=!0),-1):(e<i&&(r=!0),1)}),r?n.map(([e,t])=>t):e}function Cs(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function ws(){return os&&!!navigator.maxTouchPoints}function Ts(){return os?/mac|iphone|ipad|ipod/i.test(navigator.platform):!1}function Es(){return os&&Ts()&&/apple/i.test(navigator.vendor)}function Ds(){return os&&/firefox\//i.test(navigator.userAgent)}function Os(){return os&&navigator.platform.startsWith(`Mac`)&&!ws()}function ks(e){return!!(e.currentTarget&&!us(e.currentTarget,e.target))}function As(e){return e.target===e.currentTarget}function js(e){let t=e.currentTarget;if(!t)return!1;let n=Ts();if(n&&!e.metaKey||!n&&!e.ctrlKey)return!1;let r=t.tagName.toLowerCase();return r===`a`||r===`button`&&t.type===`submit`||r===`input`&&t.type===`submit`}function Ms(e){let t=e.currentTarget;if(!t)return!1;let n=t.tagName.toLowerCase();return e.altKey?n===`a`||n===`button`&&t.type===`submit`||n===`input`&&t.type===`submit`:!1}function Ns(e,t,n){let r=new Event(t,n);return e.dispatchEvent(r)}function Ps(e,t){let n=new FocusEvent(`blur`,t),r=e.dispatchEvent(n),i={...t,bubbles:!0};return e.dispatchEvent(new FocusEvent(`focusout`,i)),r}function Fs(e,t,n){let r=new KeyboardEvent(t,n);return e.dispatchEvent(r)}function Is(e,t){let n=new MouseEvent(`click`,t);return e.dispatchEvent(n)}function Ls(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!us(n,r)}function Rs(e,t,n,r){let i=(e=>{if(r){let t=setTimeout(e,r);return()=>clearTimeout(t)}let t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)})(()=>{e.removeEventListener(t,a,!0),n()}),a=()=>{i(),n()};return e.addEventListener(t,a,{once:!0,capture:!0}),i}function zs(e,t,n,r=window){let i=[];try{r.document.addEventListener(e,t,n);for(let a of Array.from(r.frames))i.push(zs(e,t,n,a))}catch{}return()=>{try{r.document.removeEventListener(e,t,n)}catch{}for(let e of i)e()}}var Bs={...x},Vs=Bs.useId;Bs.useDeferredValue;var Hs=Bs.useInsertionEffect,Us=os?x.useLayoutEffect:x.useEffect;function Ws(e){let t=(0,x.useRef)(e);return Us(()=>{t.current=e}),t}function H(e){let t=(0,x.useRef)(()=>{throw Error(`Cannot call an event handler while rendering.`)});return Hs?Hs(()=>{t.current=e}):t.current=e,(0,x.useCallback)((...e)=>t.current?.call(t,...e),[])}function Gs(e){let[t,n]=(0,x.useState)(null);return Us(()=>{if(t==null||!e)return;let n=null;return e(e=>(n=e,t)),()=>{e(n)}},[t,e]),[t,n]}function Ks(...e){return(0,x.useMemo)(()=>{if(e.some(Boolean))return t=>{for(let n of e)ns(n,t)}},e)}function qs(e){if(Vs){let t=Vs();return e||t}let[t,n]=(0,x.useState)(e);return Us(()=>{e||t||n(`id-${Math.random().toString(36).slice(2,8)}`)},[e,t]),e||t}function Js(e,t){let n=e=>{if(typeof e==`string`)return e},[r,i]=(0,x.useState)(()=>n(t));return Us(()=>{i((e&&`current`in e?e.current:e)?.tagName.toLowerCase()||n(t))},[e,t]),r}function Ys(e,t){let n=(0,x.useRef)(!1);(0,x.useEffect)(()=>{if(n.current)return e();n.current=!0},t),(0,x.useEffect)(()=>()=>{n.current=!1},[])}function Xs(){return(0,x.useReducer)(()=>[],[])}function Zs(e){return H(typeof e==`function`?e:()=>e)}function Qs(e,t,n=[]){let r=(0,x.useCallback)(n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n)),[...n,e.wrapElement]);return{...e,wrapElement:r}}function $s(e=!1,t){let[n,r]=(0,x.useState)(null);return{portalRef:Ks(r,t),portalNode:n,domReady:!e||n}}function ec(e,t,n){let r=e.onLoadedMetadataCapture,i=(0,x.useMemo)(()=>Object.assign(()=>{},r,...n===void 0?[]:[{[t]:n}]),[r,t,n]);return[r?.[t],{onLoadedMetadataCapture:i}]}var tc=!1;function nc(){return(0,x.useEffect)(()=>{tc||=(zs(`mousemove`,sc,!0),zs(`mousedown`,cc,!0),zs(`mouseup`,cc,!0),zs(`keydown`,cc,!0),zs(`scroll`,cc,!0),!0)},[]),H(()=>rc)}var rc=!1,ic=0,ac=0;function oc(e){let t=e.movementX||e.screenX-ic,n=e.movementY||e.screenY-ac;return ic=e.screenX,ac=e.screenY,t||n||!1}function sc(e){oc(e)&&(rc=!0)}function cc(){rc=!1}function U(e){let t=x.forwardRef((t,n)=>e({...t,ref:n}));return t.displayName=e.displayName||e.name,t}function lc(e,t){return x.memo(e,t)}function W(e,t){let{wrapElement:n,render:r,...i}=t,a=Ks(t.ref,is(r)),o;if(x.isValidElement(r)){let e={...r.props,ref:a};o=x.cloneElement(r,as(i,e))}else o=r?r(i):(0,L.jsx)(e,{...i});return n?n(o):o}function G(e){let t=(t={})=>e(t);return t.displayName=e.name,t}function uc(e=[],t=[]){let n=x.createContext(void 0),r=x.createContext(void 0),i=()=>x.useContext(n),a=(e=!1)=>{let t=x.useContext(r),n=i();return e?t:t||n},o=()=>{let e=x.useContext(r),t=i();if(!(e&&e===t))return t},s=t=>e.reduceRight((e,n)=>(0,L.jsx)(n,{...t,children:e}),(0,L.jsx)(n.Provider,{...t}));return{context:n,scopedContext:r,useContext:i,useScopedContext:a,useProviderContext:o,ContextProvider:s,ScopedContextProvider:e=>(0,L.jsx)(s,{...e,children:t.reduceRight((t,n)=>(0,L.jsx)(n,{...e,children:t}),(0,L.jsx)(r.Provider,{...e}))})}}var dc=uc(),fc=dc.useContext;dc.useScopedContext,dc.useProviderContext;var pc=dc.ContextProvider,mc=dc.ScopedContextProvider,hc=uc([pc],[mc]),gc=hc.useContext;hc.useScopedContext;var _c=hc.useProviderContext,vc=hc.ContextProvider,yc=hc.ScopedContextProvider,bc=(0,x.createContext)(void 0),xc=(0,x.createContext)(void 0),Sc={id:null};function Cc(e,t,n=!1){let r=e.findIndex(e=>e.id===t);return[...e.slice(r+1),...n?[Sc]:[],...e.slice(0,r)]}function wc(e,t){return e.find(e=>t?!e.disabled&&e.id!==t:!e.disabled)}function Tc(e,t){return t&&e.item(t)||null}function Ec(e){let t=[];for(let n of e){let e=t.find(e=>e[0]?.rowId===n.rowId);e?e.push(n):t.push([n])}return t}function Dc(e,t=!1){if(hs(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){let n=V(e).getSelection();n?.selectAllChildren(e),t&&n?.collapseToEnd()}}var Oc=Symbol(`FOCUS_SILENTLY`);function kc(e){e[Oc]=!0,e.focus({preventScroll:!0})}function Ac(e){let t=e[Oc];return delete e[Oc],t}function jc(e,t,n){if(!t||t===n)return!1;let r=e.item(t.id);return!(!r||n&&r.element===n)}var Mc=`div`,Nc=G(function({store:e,shouldRegisterItem:t=!0,getItem:n=Yo,element:r,...i}){let a=fc();e||=a;let o=qs(i.id),s=(0,x.useRef)(r);return(0,x.useEffect)(()=>{let r=s.current;if(!o||!r||!t)return;let i=n({id:o,element:r});return e?.renderItem(i)},[o,t,n,e]),i={...i,ref:Ks(s,i.ref)},ts(i)});U(function(e){return W(Mc,Nc(e))});var Pc=(0,x.createContext)(!0),Fc=`input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])`;function Ic(e){return Number.parseInt(e.getAttribute(`tabindex`)||`0`,10)<0}function Lc(e){return!(!e.matches(Fc)||!ms(e)||e.closest(`[inert]`))}function Rc(e){if(!Lc(e)||Ic(e))return!1;if(!(`form`in e)||!e.form||e.checked||e.type!==`radio`)return!0;let t=e.form.elements.namedItem(e.name);if(!t||!(`length`in t))return!0;let n=ls(e);return!n||n===e||!(`form`in n)||n.form!==e.form||n.name!==e.name}function zc(e,t){let n=Array.from(e.querySelectorAll(Fc));t&&n.unshift(e);let r=n.filter(Lc);return r.forEach((e,t)=>{if(!ds(e))return;let n=e.contentDocument?.body;n&&r.splice(t,1,...zc(n))}),r}function Bc(e,t,n){let r=Array.from(e.querySelectorAll(Fc)),i=r.filter(Rc);return t&&Rc(e)&&i.unshift(e),i.forEach((e,t)=>{if(!ds(e))return;let r=e.contentDocument?.body;if(!r)return;let a=Bc(r,!1,n);i.splice(t,1,...a)}),!i.length&&n?r:i}function Vc(e,t,n){let[r]=Bc(e,t,n);return r||null}function Hc(e,t,n,r){let i=ls(e),a=zc(e,t),o=a.indexOf(i),s=a.slice(o+1);return s.find(Rc)||(n?a.find(Rc):null)||(r?s[0]:null)||null}function Uc(e,t){return Hc(document.body,!1,e,t)}function Wc(e,t,n,r){let i=ls(e),a=zc(e,t).reverse(),o=a.indexOf(i),s=a.slice(o+1);return s.find(Rc)||(n?a.find(Rc):null)||(r?s[0]:null)||null}function Gc(e,t){return Wc(document.body,!1,e,t)}function Kc(e){let t=ls(e);if(!t)return!1;if(t===e)return!0;let n=t.getAttribute(`aria-activedescendant`);return n?n===e.id:!1}function qc(e){let t=ls(e);if(!t)return!1;if(us(e,t))return!0;let n=t.getAttribute(`aria-activedescendant`);return!n||!(`id`in e)?!1:n===e.id?!0:!!e.querySelector(`#${CSS.escape(n)}`)}function Jc(e){let t=e.getAttribute(`tabindex`)??``;e.setAttribute(`data-tabindex`,t),e.setAttribute(`tabindex`,`-1`)}function Yc(e,t){let n=Bc(e,t);for(let e of n)Jc(e)}function Xc(e){let t=e.querySelectorAll(`[data-tabindex]`),n=e=>{let t=e.getAttribute(`data-tabindex`);e.removeAttribute(`data-tabindex`),t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)};e.hasAttribute(`data-tabindex`)&&n(e);for(let e of t)n(e)}function Zc(e,t){`scrollIntoView`in e?(e.focus({preventScroll:!0}),e.scrollIntoView({block:`nearest`,inline:`nearest`,...t})):e.focus()}var Qc=`div`,$c=Symbol(`accessibleWhenDisabled`),el=Es(),tl=[`text`,`search`,`url`,`tel`,`email`,`password`,`number`,`date`,`month`,`week`,`time`,`datetime`,`datetime-local`];function nl(e){let{tagName:t,readOnly:n,type:r}=e;return t===`TEXTAREA`&&!n||t===`SELECT`&&!n?!0:t===`INPUT`&&!n?tl.includes(r):!!(e.isContentEditable||e.getAttribute(`role`)===`combobox`&&e.dataset.name)}function rl(e){return e?e===`button`||e===`summary`||e===`input`||e===`select`||e===`textarea`||e===`a`:!0}function il(e){return e?e===`button`||e===`input`||e===`select`||e===`textarea`:!0}var al=[`button`,`color`,`file`,`image`,`reset`,`submit`];function ol(e,t){return e===`button`?!0:e===`input`&&t?t===`checkbox`||t===`radio`?!0:al.includes(t):!1}function sl({focusable:e,trulyDisabled:t,nativeTabbable:n,supportsDisabled:r,safariTabIndex:i,tabIndexProp:a}){return e?t?n&&!r?-1:void 0:n?i&&a==null?0:a:a??0:a}function cl(e,t){return H(n=>{e?.(n),!n.defaultPrevented&&t&&(n.stopPropagation(),n.preventDefault())})}var ll=!1,ul=!0;function dl(e){let t=e.target;t&&`hasAttribute`in t&&(t.hasAttribute(`data-focus-visible`)||(ul=!1))}function fl(e){e.metaKey||e.ctrlKey||e.altKey||(ul=!0)}var pl=G(function({focusable:e=!0,accessibleWhenDisabled:t,autoFocus:n,onFocusVisible:r,...i}){let a=(0,x.useRef)(null),[o,s]=ec(i,$c,t);t??=o,(0,x.useEffect)(()=>{e&&(ll||=(zs(`mousedown`,dl,!0),zs(`keydown`,fl,!0),!0))},[e]);let c=e&&$o(i),l=!!c&&!t,[u,d]=(0,x.useState)(!1);(0,x.useEffect)(()=>{e&&l&&u&&d(!1)},[e,l,u]),(0,x.useEffect)(()=>{if(!e||!u)return;let t=a.current;if(!t||typeof IntersectionObserver>`u`)return;let n=new IntersectionObserver(()=>{Lc(t)||d(!1)});return n.observe(t),()=>n.disconnect()},[e,u]);let f=cl(i.onKeyPressCapture,c),p=cl(i.onMouseDownCapture,c),m=cl(i.onClickCapture,c),h=(t,n)=>{if(n&&(t.currentTarget=n),!e)return;let i=t.currentTarget;i&&Kc(i)&&(r?.(t),!t.defaultPrevented&&(i.dataset.focusVisible=`true`,d(!0)))},g=i.onKeyDownCapture,_=H(t=>{if(g?.(t),t.defaultPrevented||!e||u||t.metaKey||t.altKey||t.ctrlKey||!As(t))return;let n=t.currentTarget;Rs(n,`focusout`,()=>h(t,n))}),v=i.onFocusCapture,y=H(t=>{if(v?.(t),t.defaultPrevented||!e)return;if(!As(t)){d(!1);return}let n=t.currentTarget;ul||nl(t.target)?Rs(t.target,`focusout`,()=>h(t,n)):d(!1)}),b=i.onBlur,S=H(t=>{b?.(t),e&&Ls(t)&&(t.currentTarget.removeAttribute(`data-focus-visible`),d(!1))}),C=(0,x.useContext)(Pc),w=H(t=>{e&&n&&t&&C&&queueMicrotask(()=>{Kc(t)||Lc(t)&&t.focus()})}),T=Js(a),E=e&&rl(T),D=e&&il(T),[O,k]=(0,x.useState)(!1);el&&(0,x.useEffect)(()=>{if(!e)return;let t=a.current;if(!t)return;let n=t.tagName.toLowerCase(),r=t.type;k(ol(n,r))},[e]);let A=i.style,j=(0,x.useMemo)(()=>l?{pointerEvents:`none`,...A}:A,[l,A]);return i={"data-focus-visible":e&&u||void 0,"data-autofocus":n||void 0,"aria-disabled":c||void 0,...i,...s,ref:Ks(a,w,i.ref),style:j,tabIndex:sl({focusable:e,trulyDisabled:l,nativeTabbable:E,supportsDisabled:D,safariTabIndex:O,tabIndexProp:i.tabIndex}),disabled:D&&l?!0:void 0,contentEditable:c?void 0:i.contentEditable,onKeyPressCapture:f,onClickCapture:m,onMouseDownCapture:p,onKeyDownCapture:_,onFocusCapture:y,onBlur:S},ts(i)});U(function(e){return W(Qc,pl(e))});var ml=`button`;function hl(e){if(!e.isTrusted)return!1;let t=e.currentTarget;return e.key===`Enter`?fs(t)||t.tagName===`SUMMARY`||t.tagName===`A`:e.key===` `?fs(t)||t.tagName===`SUMMARY`||t.tagName===`INPUT`||t.tagName===`SELECT`:!1}var gl=Symbol(`command`),_l=G(function({clickOnEnter:e=!0,clickOnSpace:t=!0,...n}){let r=(0,x.useRef)(null),[i,a]=(0,x.useState)(!1);(0,x.useEffect)(()=>{r.current&&a(fs(r.current))},[]);let[o,s]=(0,x.useState)(!1),c=(0,x.useRef)(!1),l=$o(n),[u,d]=ec(n,gl,!0),f=n.onKeyDown,p=H(n=>{f?.(n);let r=n.currentTarget;if(n.defaultPrevented||u||l||!As(n)||hs(r)||r.isContentEditable)return;let i=e&&n.key===`Enter`,a=t&&n.key===` `,o=n.key===`Enter`&&!e,d=n.key===` `&&!t;if(o||d){n.preventDefault();return}if(i||a){let e=hl(n);if(i){if(!e){n.preventDefault();let{view:e,...t}=n,i=()=>Is(r,t);Ds()?Rs(r,`keyup`,i):queueMicrotask(i)}}else a&&(c.current=!0,e||(n.preventDefault(),s(!0)))}}),m=n.onKeyUp,h=H(e=>{if(m?.(e),e.defaultPrevented||u||l||e.metaKey)return;let n=t&&e.key===` `;if(c.current&&n&&(c.current=!1,!hl(e))){e.preventDefault(),s(!1);let t=e.currentTarget,{view:n,...r}=e;queueMicrotask(()=>Is(t,r))}});return n={"data-active":o||void 0,type:i?`button`:void 0,...d,...n,ref:Ks(r,n.ref),onKeyDown:p,onKeyUp:h},n=pl(n),n});U(function(e){return W(ml,_l(e))});function vl(e,t){let n=e.__unstableInternals;return Xo(n,`Invalid store`),n[t]}function yl(e,...t){let n=e,r=n,i=Symbol(),a=Bo,o=new Set,s=new Set,c=new Set,l=new Set,u=new Set,d=new WeakMap,f=new WeakMap,p=e=>(c.add(e),()=>c.delete(e)),m=()=>{let e=o.size,r=Symbol();o.add(r);let i=()=>{o.delete(r),!o.size&&a()};if(e)return i;let s=Zo(n).map(e=>Go(...t.map(t=>{let n=(t?.getState)?.call(t);if(n&&Wo(n,e))return Cl(t,[e],t=>{S(e,t[e],!0)})}))),l=[];for(let e of c)l.push(e());let u=t.map(xl);return a=Go(...s,...l,...u),i},h=(e,t,n=l)=>(n.add(t),f.set(t,e),()=>{var e;(e=d.get(t))==null||e(),d.delete(t),f.delete(t),n.delete(t)}),g=(e,t)=>h(e,t),_=(e,t)=>(d.set(t,t(n,n)),h(e,t)),v=(e,t)=>(d.set(t,t(n,r)),h(e,t,u)),y=e=>yl(Jo(n,e),C),b=e=>yl(qo(n,e),C),x=()=>n,S=(e,a,o=!1)=>{var c;if(!Wo(n,e))return;let p=Vo(a,n[e]);if(p===n[e])return;if(!o)for(let n of t)(c=n?.setState)==null||c.call(n,e,p);let m=n;n={...n,[e]:p};let h=Symbol();i=h,s.add(e);let g=(t,r,i)=>{var a;let o=f.get(t);(!o||o.some(t=>i?i.has(t):t===e))&&((a=d.get(t))==null||a(),d.set(t,t(n,r)))};for(let e of l)g(e,m);queueMicrotask(()=>{if(i!==h)return;let e=n;for(let e of u)g(e,r,s);r=e,s.clear()})},C={getState:x,setState:S,__unstableInternals:{setup:p,init:m,subscribe:g,sync:_,batch:v,pick:y,omit:b}};return C}function bl(e,...t){if(e)return vl(e,`setup`)(...t)}function xl(e,...t){if(e)return vl(e,`init`)(...t)}function Sl(e,...t){if(e)return vl(e,`subscribe`)(...t)}function Cl(e,...t){if(e)return vl(e,`sync`)(...t)}function wl(e,...t){if(e)return vl(e,`batch`)(...t)}function Tl(e,...t){if(e)return vl(e,`omit`)(...t)}function El(e,...t){if(e)return vl(e,`pick`)(...t)}function Dl(...e){let t={};for(let n of e){let e=(n?.getState)?.call(n);e&&Object.assign(t,e)}let n=yl(t,...e);return Object.assign({},...e,n)}var Ol=o((e=>{var t=f();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),kl=o(((e,t)=>{t.exports=Ol()}))(),Al=()=>()=>{};function K(e,t=Yo){let n=x.useCallback(t=>e?Sl(e,null,t):Al(),[e]),r=()=>{let n=typeof t==`string`?t:null,r=typeof t==`function`?t:null,i=e?.getState();if(r)return r(i);if(i&&n&&Wo(i,n))return i[n]};return(0,kl.useSyncExternalStore)(n,r,r)}function jl(e,t){let n=x.useRef({}),r=x.useCallback(t=>e?Sl(e,null,t):Al(),[e]),i=()=>{let r=e?.getState(),i=!1,a=n.current;for(let e in t){let n=t[e];if(typeof n==`function`){let t=n(r);t!==a[e]&&(a[e]=t,i=!0)}if(typeof n==`string`){if(!r||!Wo(r,n))continue;let t=r[n];t!==a[e]&&(a[e]=t,i=!0)}}return i&&(n.current={...a}),n.current};return(0,kl.useSyncExternalStore)(r,i,i)}function Ml(e,t,n,r){let i=Wo(t,n)?t[n]:void 0,a=Ws({value:i,setValue:r?t[r]:void 0});Us(()=>Cl(e,[n],(e,t)=>{let{value:r,setValue:i}=a.current;i&&e[n]!==t[n]&&e[n]!==r&&i(e[n])}),[e,n]),Us(()=>{if(i!==void 0)return e.setState(n,i),wl(e,[n],()=>{i!==void 0&&e.setState(n,i)})})}function Nl(e,t){let[n,r]=x.useState(()=>e(t));Us(()=>xl(n),[n]);let i=x.useCallback(e=>K(n,e),[n]);return[x.useMemo(()=>({...n,useState:i}),[n,i]),H(()=>{r(n=>e({...t,...n.getState()}))})]}var Pl=`button`;function Fl(e){return gs(e)?!0:e.tagName===`INPUT`&&!fs(e)}function Il(e,t=!1){let n=e.clientHeight,{top:r}=e.getBoundingClientRect(),i=Math.max(n*.875,n-40)*1.5,a=t?n-i+r:i+r;return e.tagName===`HTML`?a+e.scrollTop:a}function Ll(e,t=!1){let{top:n}=e.getBoundingClientRect();return t?n+e.clientHeight:n}function q(e,t,n,r=!1){if(!t||!n)return;let{renderedItems:i}=t.getState(),a=xs(e);if(!a)return;let o=Il(a,r),s,c;for(let e=0;e<i.length;e+=1){let i=s;if(s=n(e),!s)break;if(s===i)continue;let a=Tc(t,s)?.element;if(!a)continue;let l=Ll(a,r)-o,u=Math.abs(l);if(r&&l<=0||!r&&l>=0){c!==void 0&&c<u&&(s=i);break}c=u}return s}function Rl(e,t){return As(e)?!1:jc(t,e.target)}var J=G(function({store:e,rowId:t,preventScrollOnKeyDown:n=!1,moveOnKeyPress:r=!0,tabbable:i=!1,getItem:a,"aria-setsize":o,"aria-posinset":s,...c}){let l=gc();e||=l;let u=qs(c.id),d=(0,x.useRef)(null),f=(0,x.useContext)(xc),p=$o(c)&&!c.accessibleWhenDisabled,{rowId:m,baseElement:h,isActiveItem:g,ariaSetSize:_,ariaPosInSet:v,isTabbable:y}=jl(e,{rowId(e){if(t)return t;if(e&&f?.baseElement&&f.baseElement===e.baseElement)return f.id},baseElement(e){return e?.baseElement||void 0},isActiveItem(e){return!!e&&e.activeId===u},ariaSetSize(e){if(o!=null)return o;if(e&&f?.ariaSetSize&&f.baseElement===e.baseElement)return f.ariaSetSize},ariaPosInSet(e){if(s!=null)return s;if(!e||!f?.ariaPosInSet||f.baseElement!==e.baseElement)return;let t=e.renderedItems.filter(e=>e.rowId===m);return f.ariaPosInSet+t.findIndex(e=>e.id===u)},isTabbable(t){if(!t?.renderedItems.length)return!0;if(t.virtualFocus)return!1;if(i)return!0;if(t.activeId===null)return!1;let n=e?.item(t.activeId);return n?.disabled||!n?.element?!0:t.activeId===u}}),b=(0,x.useCallback)(e=>{let t={...e,id:u||e.id,rowId:m,disabled:!!p,children:e.element?.textContent};return a?a(t):t},[u,m,p,a]),S=c.onFocus,C=(0,x.useRef)(!1),w=H(t=>{if(S?.(t),t.defaultPrevented||ks(t)||!u||!e||Rl(t,e))return;let{virtualFocus:n,baseElement:r}=e.getState();e.setActiveId(u),gs(t.currentTarget)&&Dc(t.currentTarget),n&&As(t)&&(Fl(t.currentTarget)||r?.isConnected&&(Es()&&t.currentTarget.hasAttribute(`data-autofocus`)&&t.currentTarget.scrollIntoView({block:`nearest`,inline:`nearest`}),C.current=!0,t.relatedTarget===r||jc(e,t.relatedTarget)?kc(r):r.focus()))}),T=c.onBlurCapture,E=H(t=>{T?.(t),!t.defaultPrevented&&e?.getState()?.virtualFocus&&C.current&&(C.current=!1,t.preventDefault(),t.stopPropagation())}),D=c.onKeyDown,O=Zs(n),k=Zs(r),A=H(t=>{if(D?.(t),t.defaultPrevented||!As(t)||!e)return;let{currentTarget:n}=t,r=e.getState(),i=!!e.item(u)?.rowId,a=r.orientation!==`horizontal`,o=r.orientation!==`vertical`,s=()=>!!(i||o||!r.baseElement||!hs(r.baseElement)),c={ArrowUp:(i||a)&&e.up,ArrowRight:(i||o)&&e.next,ArrowDown:(i||a)&&e.down,ArrowLeft:(i||o)&&e.previous,Home:()=>{if(s())return!i||t.ctrlKey?e?.first():e?.previous(-1)},End:()=>{if(s())return!i||t.ctrlKey?e?.last():e?.next(-1)},PageUp:()=>q(n,e,e?.up,!0),PageDown:()=>q(n,e,e?.down)}[t.key];if(c){if(gs(n)){let e=vs(n),r=o&&t.key===`ArrowLeft`,i=o&&t.key===`ArrowRight`,s=a&&t.key===`ArrowUp`,c=a&&t.key===`ArrowDown`;if(i||c){let{length:t}=_s(n);if(e.end!==t)return}else if((r||s)&&e.start!==0)return}let r=c();if(O(t)||r!==void 0){if(!k(t))return;t.preventDefault(),e.move(r)}}}),j=(0,x.useMemo)(()=>({id:u,baseElement:h}),[u,h]);return c=Qs(c,e=>(0,L.jsx)(bc.Provider,{value:j,children:e}),[j]),c={"data-active-item":g||void 0,...c,id:u,ref:Ks(d,c.ref),tabIndex:y?c.tabIndex:-1,onFocus:w,onBlurCapture:E,onKeyDown:A},c=_l(c),c=Nc({store:e,...c,getItem:b,shouldRegisterItem:u?c.shouldRegisterItem:!1}),ts({...c,"aria-setsize":_,"aria-posinset":v})});lc(U(function(e){return W(Pl,J(e))}));function Y(e){let t=[];for(let n of e)t.push(...n);return t}function X(e){return e.slice().reverse()}var zl=`div`;function Bl(e){return e.some(e=>!!e.rowId)}function Vl(e){let t=e.target;return t&&!hs(t)?!1:e.key.length===1&&!e.ctrlKey&&!e.metaKey}function Hl(e){return e.key===`Shift`||e.key===`Control`||e.key===`Alt`||e.key===`Meta`}function Ul(e,t,n){return H(r=>{if(t?.(r),r.defaultPrevented||r.isPropagationStopped()||!As(r)||Hl(r)||Vl(r))return;let i=Tc(e,e.getState().activeId)?.element;if(!i)return;let{view:a,...o}=r;i!==n?.current&&i.focus(),Fs(i,r.type,o)||r.preventDefault(),r.currentTarget.contains(i)&&r.stopPropagation()})}function Wl(e){return wc(Y(X(Ec(e))))}function Gl(e,t){let{virtualFocus:n,baseElement:r}=e.getState();if(!n||!r||!hs(r)){t();return}let i=r.scrollLeft,a=r.scrollTop;t(),r.scrollLeft=i,r.scrollTop=a}function Kl(e){let[t,n]=(0,x.useState)(!1),r=(0,x.useCallback)(()=>n(!0),[]),i=K(e,t=>Tc(e,t.activeId));return(0,x.useEffect)(()=>{let r=i?.element;t&&r&&(n(!1),Gl(e,()=>{r.focus({preventScroll:!0})}))},[e,i,t]),r}var ql=G(function({store:e,composite:t=!0,focusOnMove:n=t,moveOnKeyPress:r=!0,...i}){let a=_c();e||=a,Xo(e,!1);let o=(0,x.useRef)(null),s=(0,x.useRef)(null),c=Kl(e),l=K(e,`moves`),[,u]=Gs(t?e.setBaseElement:null);(0,x.useEffect)(()=>{if(!e||!l||!t||!n)return;let{activeId:r}=e.getState(),i=Tc(e,r)?.element;i&&Gl(e,()=>Zc(i))},[e,l,t,n]),Us(()=>{if(!e||!l||!t)return;let{baseElement:n,activeId:r}=e.getState();if(r!==null||!n)return;let i=s.current;s.current=null,i&&Ps(i,{relatedTarget:n}),Kc(n)||n.focus()},[e,l,t]);let d=K(e,`activeId`),f=K(e,`virtualFocus`);Us(()=>{if(!e||!t||!f)return;let n=s.current;if(s.current=null,!n)return;let r=Tc(e,d)?.element||ls(n);r!==n&&Ps(n,{relatedTarget:r})},[e,d,f,t]);let p=Ul(e,i.onKeyDownCapture,s),m=Ul(e,i.onKeyUpCapture,s),h=i.onFocusCapture,g=H(t=>{if(h?.(t),t.defaultPrevented||!e)return;let{virtualFocus:n}=e.getState();if(!n)return;let r=t.relatedTarget,i=Ac(t.currentTarget);As(t)&&i&&(t.stopPropagation(),s.current=r)}),_=i.onFocus,v=H(n=>{if(_?.(n),n.defaultPrevented||!t||!e)return;let{relatedTarget:r}=n,{virtualFocus:i}=e.getState();i?As(n)&&!jc(e,r)&&queueMicrotask(c):As(n)&&e.setActiveId(null)}),y=i.onBlurCapture,b=H(t=>{if(y?.(t),t.defaultPrevented||!e)return;let{virtualFocus:n,activeId:r}=e.getState();if(!n)return;let i=Tc(e,r)?.element,a=t.relatedTarget,o=jc(e,a),c=s.current;s.current=null,As(t)&&o?(a===i?c&&c!==a&&Ps(c,t):i?Ps(i,t):c&&Ps(c,t),t.stopPropagation()):!jc(e,t.target)&&i&&Ps(i,t)}),S=i.onKeyDown,C=Zs(r),w=H(t=>{if(S?.(t),t.nativeEvent.isComposing||t.defaultPrevented||!e||!As(t))return;let{orientation:n,renderedItems:r,activeId:i}=e.getState();if(Tc(e,i)?.element?.isConnected)return;let a=n!==`horizontal`,o=n!==`vertical`,s=Bl(r);if((t.key===`ArrowLeft`||t.key===`ArrowRight`||t.key===`Home`||t.key===`End`)&&hs(t.currentTarget))return;let c={ArrowUp:(s||a)&&(()=>s?Wl(r)?.id:e?.last()),ArrowRight:(s||o)&&e.first,ArrowDown:(s||a)&&e.first,ArrowLeft:(s||o)&&e.last,Home:e.first,End:e.last,PageUp:e.first,PageDown:e.last}[t.key];if(c){let n=c();if(n!==void 0){if(!C(t))return;t.preventDefault(),e.move(n)}}});return i=Qs(i,t=>(0,L.jsx)(vc,{value:e,children:t}),[e]),i={"aria-activedescendant":K(e,n=>{if(e&&t&&n.virtualFocus)return Tc(e,n.activeId)?.id}),...i,ref:Ks(o,u,i.ref),onKeyDownCapture:p,onKeyUpCapture:m,onFocusCapture:g,onFocus:v,onBlurCapture:b,onKeyDown:w},i=pl({focusable:K(e,e=>t&&(e.virtualFocus||e.activeId===null)),...i}),i});U(function(e){return W(zl,ql(e))});var Jl=uc();Jl.useContext,Jl.useScopedContext;var Yl=Jl.useProviderContext,Xl=Jl.ContextProvider,Zl=Jl.ScopedContextProvider,Ql=uc([Xl],[Zl]);Ql.useContext;var $l=Ql.useScopedContext,eu=Ql.useProviderContext,tu=Ql.ContextProvider,nu=Ql.ScopedContextProvider,ru=(0,x.createContext)(void 0),iu=(0,x.createContext)(void 0),au=`div`;function ou(e,t){let n=setTimeout(t,e);return()=>clearTimeout(n)}function su(e){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)}function cu(...e){return e.join(`, `).split(`, `).reduce((e,t)=>{let n=t.endsWith(`ms`)?1:1e3,r=Number.parseFloat(t||`0s`)*n;return r>e?r:e},0)}function lu(e,t,n){return!n&&t!==!1&&(!e||!!t)}var uu=G(function({store:e,alwaysVisible:t,...n}){let r=Yl();e||=r,Xo(e,!1);let i=(0,x.useRef)(null),a=qs(n.id),[o,s]=(0,x.useState)(null),c=K(e,`open`),l=K(e,`mounted`),u=K(e,`animated`),d=K(e,`contentElement`),f=K(e.disclosure,`contentElement`);Us(()=>{i.current&&e?.setContentElement(i.current)},[e]),Us(()=>{let t;return e?.setState(`animated`,e=>(t=e,!0)),()=>{t!==void 0&&e?.setState(`animated`,t)}},[e]),Us(()=>{if(u){if(!d?.isConnected){s(null);return}return su(()=>{s(c?`enter`:l?`leave`:null)})}},[u,d,c,l]),Us(()=>{if(!e||!u||!o||!d)return;let t=()=>e?.setState(`animating`,!1),n=()=>(0,Oo.flushSync)(t);if(o===`leave`&&c||o===`enter`&&!c)return;if(typeof u==`number`)return ou(u,n);let{transitionDuration:r,animationDuration:i,transitionDelay:a,animationDelay:s}=getComputedStyle(d),{transitionDuration:l=`0`,animationDuration:p=`0`,transitionDelay:m=`0`,animationDelay:h=`0`}=f?getComputedStyle(f):{},g=cu(a,s,m,h)+cu(r,i,l,p);if(!g){o===`enter`&&e.setState(`animated`,!1),t();return}return ou(Math.max(g-1e3/60,0),n)},[e,u,d,f,c,o]),n=Qs(n,t=>(0,L.jsx)(nu,{value:e,children:t}),[e]);let p=lu(l,n.hidden,t),m=n.style,h=(0,x.useMemo)(()=>p?{...m,display:`none`}:m,[p,m]);return n={"data-open":c||void 0,"data-enter":o===`enter`||void 0,"data-leave":o===`leave`||void 0,hidden:p,...n,id:a,ref:Ks(a?e.setContentElement:null,i,n.ref),style:h},ts(n)}),du=U(function(e){return W(au,uu(e))});U(function({unmountOnHide:e,...t}){let n=Yl();return K(t.store||n,t=>!e||t?.mounted)===!1?null:(0,L.jsx)(du,{...t})});function fu(e={}){let t=Dl(e.store,Tl(e.disclosure,[`contentElement`,`disclosureElement`])),n=t?.getState(),r=B(e.open,n?.open,e.defaultOpen,!1),i=B(e.animated,n?.animated,!1),a=yl({open:r,animated:i,animating:!!i&&r,mounted:r,contentElement:B(n?.contentElement,null),disclosureElement:B(n?.disclosureElement,null)},t);return bl(a,()=>Cl(a,[`animated`,`animating`],e=>{e.animated||a.setState(`animating`,!1)})),bl(a,()=>Sl(a,[`open`],()=>{a.getState().animated&&a.setState(`animating`,!0)})),bl(a,()=>Cl(a,[`open`,`animating`],e=>{a.setState(`mounted`,e.open||e.animating)})),{...a,disclosure:e.disclosure,setOpen:e=>a.setState(`open`,e),show:()=>a.setState(`open`,!0),hide:()=>a.setState(`open`,!1),toggle:()=>a.setState(`open`,e=>!e),stopAnimation:()=>a.setState(`animating`,!1),setContentElement:e=>a.setState(`contentElement`,e),setDisclosureElement:e=>a.setState(`disclosureElement`,e)}}function pu(e,t,n){return Ys(t,[n.store,n.disclosure]),Ml(e,n,`open`,`setOpen`),Ml(e,n,`mounted`,`setMounted`),Ml(e,n,`animated`),Object.assign(e,{disclosure:n.disclosure})}function mu(e={}){let[t,n]=Nl(fu,e);return pu(t,n,e)}var hu=uc([tu],[nu]);hu.useContext,hu.useScopedContext;var gu=hu.useProviderContext,_u=hu.ContextProvider,vu=hu.ScopedContextProvider;function yu(e){let t=e.find(e=>!!e.element),n=[...e].reverse().find(e=>!!e.element)?.element,r=t?.element?.parentElement;if(!n)return V(r).body;for(;r;){if(r.contains(n))return r;r=r.parentElement}return V(r).body}function bu(e){return e?.__unstablePrivateStore}function xu(e={}){e.store;let t=e.store?.getState(),n=B(e.items,t?.items,e.defaultItems,[]),r=new Map(n.map(e=>[e.id,e])),i={items:n,renderedItems:B(t?.renderedItems,[])},a=bu(e.store),o=yl({items:n,renderedItems:i.renderedItems},a),s=yl(i,e.store),c=e=>{let t=Ss(e,e=>e.element);o.setState(`renderedItems`,t),s.setState(`renderedItems`,t)};bl(s,()=>xl(o)),bl(o,()=>wl(o,[`items`],e=>{s.setState(`items`,e.items)})),bl(o,()=>wl(o,[`renderedItems`],e=>{let t=!0,n=requestAnimationFrame(()=>{let{renderedItems:t}=s.getState();e.renderedItems!==t&&c(e.renderedItems)});if(typeof IntersectionObserver!=`function`)return()=>cancelAnimationFrame(n);let r=()=>{if(t){t=!1;return}cancelAnimationFrame(n),n=requestAnimationFrame(()=>c(e.renderedItems))},i=yu(e.renderedItems),a=new IntersectionObserver(r,{root:i});for(let t of e.renderedItems)t.element&&a.observe(t.element);return()=>{cancelAnimationFrame(n),a.disconnect()}}));let l=(e,t,n=!1)=>{let i;return t(t=>{let n=t.findIndex(({id:t})=>t===e.id),a=t.slice();if(n!==-1){i=t[n];let o={...i,...e};a[n]=o,r.set(e.id,o)}else a.push(e),r.set(e.id,e);return a}),()=>{t(t=>{if(!i)return n&&r.delete(e.id),t.filter(({id:t})=>t!==e.id);let a=t.findIndex(({id:t})=>t===e.id);if(a===-1)return t;let o=t.slice();return o[a]=i,r.set(e.id,i),o})}},u=e=>l(e,e=>o.setState(`items`,e),!0);return{...s,registerItem:u,renderItem:e=>Go(u(e),l(e,e=>o.setState(`renderedItems`,e))),item:e=>{if(!e)return null;let t=r.get(e);if(!t){let{items:n}=o.getState();t=n.find(t=>t.id===e),t&&r.set(e,t)}return t||null},__unstablePrivateStore:o}}function Su(e,t,n){return Ys(t,[n.store]),Ml(e,n,`items`,`setItems`),e}var Cu={id:null};function wu(e,t){return e.find(e=>t?!e.disabled&&e.id!==t:!e.disabled)}function Tu(e,t){return e.filter(e=>t?!e.disabled&&e.id!==t:!e.disabled)}function Eu(e,t){return e.filter(e=>e.rowId===t)}function Du(e,t,n=!1){let r=e.findIndex(e=>e.id===t);return[...e.slice(r+1),...n?[Cu]:[],...e.slice(0,r)]}function Ou(e){let t=[];for(let n of e){let e=t.find(e=>e[0]?.rowId===n.rowId);e?e.push(n):t.push([n])}return t}function ku(e){let t=0;for(let{length:n}of e)n>t&&(t=n);return t}function Au(e){return{id:`__EMPTY_ITEM__`,disabled:!0,rowId:e}}function ju(e,t,n){let r=ku(e);for(let i of e)for(let e=0;e<r;e+=1){let r=i[e];if(!r||n&&r.disabled){let r=e===0&&n?wu(i):i[e-1];i[e]=r&&t!==r.id&&n?r:Au(r?.rowId)}}return e}function Mu(e){let t=Ou(e),n=ku(t),r=[];for(let e=0;e<n;e+=1)for(let n of t){let t=n[e];t&&r.push({...t,rowId:t.rowId?`${e}`:void 0})}return r}function Nu(e={}){let t=e.store?.getState(),n=xu(e),r=B(e.activeId,t?.activeId,e.defaultActiveId),i=yl({...n.getState(),id:B(e.id,t?.id,`id-${Math.random().toString(36).slice(2,8)}`),activeId:r,baseElement:B(t?.baseElement,null),includesBaseElement:B(e.includesBaseElement,t?.includesBaseElement,r===null),moves:B(t?.moves,0),orientation:B(e.orientation,t?.orientation,`both`),rtl:B(e.rtl,t?.rtl,!1),virtualFocus:B(e.virtualFocus,t?.virtualFocus,!1),focusLoop:B(e.focusLoop,t?.focusLoop,!1),focusWrap:B(e.focusWrap,t?.focusWrap,!1),focusShift:B(e.focusShift,t?.focusShift,!1)},n,e.store);bl(i,()=>Cl(i,[`renderedItems`,`activeId`],e=>{i.setState(`activeId`,t=>t===void 0?wu(e.renderedItems)?.id:t)}));let a=(e=`next`,t={})=>{let n=i.getState(),{skip:r=0,activeId:a=n.activeId,focusShift:o=n.focusShift,focusLoop:s=n.focusLoop,focusWrap:c=n.focusWrap,includesBaseElement:l=n.includesBaseElement,renderedItems:u=n.renderedItems,rtl:d=n.rtl}=t,f=e===`up`||e===`down`,p=e===`next`||e===`down`,m=p?d&&!f:!d||f,h=o&&!r,g=f?Y(ju(Ou(u),a,h)):u;if(g=m?X(g):g,g=f?Mu(g):g,a==null)return wu(g)?.id;let _=g.find(e=>e.id===a);if(!_)return wu(g)?.id;let v=g.some(e=>e.rowId),y=g.indexOf(_),b=g.slice(y+1),x=Eu(b,_.rowId);if(r){let e=Tu(x,a);return(e.slice(r)[0]||e[e.length-1])?.id}let S=s&&(f?s!==`horizontal`:s!==`vertical`),C=v&&c&&(f?c!==`horizontal`:c!==`vertical`),w=p?(!v||f)&&S&&l:f?l:!1;if(S)return wu(Du(C&&!w?g:Eu(g,_.rowId),a,w),a)?.id;if(C){let e=wu(w?x:b,a);return w?e?.id||null:e?.id}let T=wu(x,a);return!T&&w?null:T?.id};return{...n,...i,setBaseElement:e=>i.setState(`baseElement`,e),setActiveId:e=>i.setState(`activeId`,e),move:e=>{e!==void 0&&(i.setState(`activeId`,e),i.setState(`moves`,e=>e+1))},first:()=>wu(i.getState().renderedItems)?.id,last:()=>wu(X(i.getState().renderedItems))?.id,next:e=>(e!==void 0&&typeof e==`number`&&(e={skip:e}),a(`next`,e)),previous:e=>(e!==void 0&&typeof e==`number`&&(e={skip:e}),a(`previous`,e)),down:e=>(e!==void 0&&typeof e==`number`&&(e={skip:e}),a(`down`,e)),up:e=>(e!==void 0&&typeof e==`number`&&(e={skip:e}),a(`up`,e))}}function Pu(e,t,n){return e=Su(e,t,n),Ml(e,n,`activeId`,`setActiveId`),Ml(e,n,`includesBaseElement`),Ml(e,n,`virtualFocus`),Ml(e,n,`orientation`),Ml(e,n,`rtl`),Ml(e,n,`focusLoop`),Ml(e,n,`focusWrap`),Ml(e,n,`focusShift`),e}(0,x.createContext)(void 0);var Fu=uc([_u,vc],[vu,yc]);Fu.useContext,Fu.useScopedContext;var Iu=Fu.useProviderContext;Fu.ContextProvider,Fu.ScopedContextProvider,(0,x.createContext)(void 0),(0,x.createContext)(!1);var Lu=`hr`,Ru=G(function({orientation:e=`horizontal`,...t}){return t={role:`separator`,"aria-orientation":e,...t},t});U(function(e){return W(Lu,Ru(e))});var zu=`hr`,Bu=G(function({store:e,...t}){let n=gc();e||=n,Xo(e,!1);let r=K(e,e=>e.orientation===`horizontal`?`vertical`:`horizontal`);return t=Ru({...t,orientation:r}),t});U(function(e){return W(zu,Bu(e))});var Vu=uc([_u],[vu]);Vu.useContext,Vu.useScopedContext;var Hu=Vu.useProviderContext,Uu=Vu.ContextProvider,Wu=Vu.ScopedContextProvider;function Z(e){return[e.clientX,e.clientY]}function Gu(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=a,o=0,s=e-1;o<e;s=o++){let a=t[o],c=t[s],l=t[s===0?e-1:s-1];if(a==null||c==null||l==null)return!1;let[u,d]=a,[f,p]=c,[,m]=l,h=(d-p)*(n-u)-(u-f)*(r-d);if(p<d){if(r>=p&&r<d){if(h===0)return!0;h>0&&(r===p?r>m&&(i=!i):i=!i)}}else if(d<p){if(r>d&&r<=p){if(h===0)return!0;h<0&&(r===p?r<m&&(i=!i):i=!i)}}else if(r===d&&(n>=f&&n<=u||n>=u&&n<=f))return!0}return i}function Ku(e,t){let{top:n,right:r,bottom:i,left:a}=t,[o,s]=e;return[o<a?`left`:o>r?`right`:null,s<n?`top`:s>i?`bottom`:null]}function qu(e,t){let n=e.getBoundingClientRect(),{top:r,right:i,bottom:a,left:o}=n,[s,c]=Ku(t,n),l=[t];return s?(c!==`top`&&l.push([s===`left`?o:i,r]),l.push([s===`left`?i:o,r]),l.push([s===`left`?i:o,a]),c!==`bottom`&&l.push([s===`left`?o:i,a])):c===`top`?(l.push([o,r]),l.push([o,a]),l.push([i,a]),l.push([i,r])):(l.push([o,a]),l.push([o,r]),l.push([i,r]),l.push([i,a])),l}var Ju=(0,x.createContext)(null),Yu=`span`,Xu=G(function(e){return e={...e,style:{border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,whiteSpace:`nowrap`,width:`1px`,...e.style}},e});U(function(e){return W(Yu,Xu(e))});var Zu=`span`,Qu=G(function(e){return e={"data-focus-trap":``,tabIndex:0,"aria-hidden":!0,...e,style:{position:`fixed`,top:0,left:0,...e.style}},e=Xu(e),e}),$u=U(function(e){return W(Zu,Qu(e))}),ed=`div`;function td(e){return V(e).body}function nd(e,t){return t?typeof t==`function`?t(e):t:V(e).createElement(`div`)}function rd(e=`id`){return`${e?`${e}-`:``}${Math.random().toString(36).slice(2,8)}`}function id(e){queueMicrotask(()=>{e?.focus()})}var ad=G(function({preserveTabOrder:e,preserveTabOrderAnchor:t,portalElement:n,portalRef:r,portal:i=!0,...a}){let o=(0,x.useRef)(null),s=Ks(o,a.ref),c=(0,x.useContext)(Ju),[l,u]=(0,x.useState)(null),[d,f]=(0,x.useState)(null),p=(0,x.useRef)(null),m=(0,x.useRef)(null),h=(0,x.useRef)(null),g=(0,x.useRef)(null);return Us(()=>{let e=o.current;if(!e||!i){u(null);return}let t=nd(e,n);if(!t){u(null);return}let a=t.isConnected;if(a||(c||td(e)).appendChild(t),t.id||=e.id?`portal/${e.id}`:rd(),u(t),ns(r,t),!a)return()=>{t.remove(),ns(r,null)}},[i,n,c,r]),Us(()=>{if(!i||!e||!t)return;let n=V(t).createElement(`span`);return n.style.position=`fixed`,t.insertAdjacentElement(`afterend`,n),f(n),()=>{n.remove(),f(null)}},[i,e,t]),(0,x.useEffect)(()=>{if(!l||!e)return;let t=0,n=e=>{if(!Ls(e))return;let n=e.type===`focusin`;if(cancelAnimationFrame(t),n)return Xc(l);t=requestAnimationFrame(()=>{Yc(l,!0)})};return l.addEventListener(`focusin`,n,!0),l.addEventListener(`focusout`,n,!0),()=>{cancelAnimationFrame(t),l.removeEventListener(`focusin`,n,!0),l.removeEventListener(`focusout`,n,!0)}},[l,e]),a=Qs(a,t=>{if(t=(0,L.jsx)(Ju.Provider,{value:l||c,children:t}),!i)return t;if(!l)return(0,L.jsx)(`span`,{ref:s,id:a.id,style:{position:`fixed`},hidden:!0});t=(0,L.jsxs)(L.Fragment,{children:[e&&l&&(0,L.jsx)($u,{ref:m,"data-focus-trap":a.id,className:`__focus-trap-inner-before`,onFocus:e=>{Ls(e,l)?id(Uc()):id(p.current)}}),t,e&&l&&(0,L.jsx)($u,{ref:h,"data-focus-trap":a.id,className:`__focus-trap-inner-after`,onFocus:e=>{Ls(e,l)?id(Gc()):id(g.current)}})]}),l&&(t=(0,Oo.createPortal)(t,l));let n=(0,L.jsxs)(L.Fragment,{children:[e&&l&&(0,L.jsx)($u,{ref:p,"data-focus-trap":a.id,className:`__focus-trap-outer-before`,onFocus:e=>{e.relatedTarget!==g.current&&Ls(e,l)?id(m.current):id(Gc())}}),e&&(0,L.jsx)(`span`,{"aria-owns":l?.id,style:{position:`fixed`}}),e&&l&&(0,L.jsx)($u,{ref:g,"data-focus-trap":a.id,className:`__focus-trap-outer-after`,onFocus:e=>{if(Ls(e,l))id(h.current);else{let e=Uc();if(e===m.current){requestAnimationFrame(()=>Uc()?.focus());return}id(e)}}})]});return d&&e&&(n=(0,Oo.createPortal)(n,d)),(0,L.jsxs)(L.Fragment,{children:[n,t]})},[l,c,i,a.id,e,d]),a={...a,ref:s},a});U(function(e){return W(ed,ad(e))});var od=(0,x.createContext)(0);function sd({level:e,children:t}){let n=(0,x.useContext)(od),r=Math.max(Math.min(e||n+1,6),1);return(0,L.jsx)(od.Provider,{value:r,children:t})}var cd=`div`,ld=G(function({autoFocusOnShow:e=!0,...t}){return t=Qs(t,t=>(0,L.jsx)(Pc.Provider,{value:e,children:t}),[e]),t});U(function(e){return W(cd,ld(e))});function ud(e,t){let n=V(e).createElement(`button`);return n.type=`button`,n.tabIndex=-1,n.textContent=`Dismiss popup`,Object.assign(n.style,{border:`0px`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0px`,position:`absolute`,whiteSpace:`nowrap`,width:`1px`}),n.addEventListener(`click`,t),e.prepend(n),()=>{n.removeEventListener(`click`,t),n.remove()}}function dd(e){let t=(0,x.useRef)(null);return(0,x.useEffect)(()=>{if(!e){t.current=null;return}return zs(`mousedown`,e=>{t.current=e.target},!0)},[e]),t}var fd=new WeakMap;function pd(e,t,n){fd.has(e)||fd.set(e,new Map);let r=fd.get(e),i=r.get(t);if(!i)return r.set(t,n()),()=>{var e;(e=r.get(t))==null||e(),r.delete(t)};let a=n(),o=()=>{a(),i(),r.delete(t)};return r.set(t,o),()=>{r.get(t)===o&&(a(),r.set(t,i))}}function md(e,t,n){return pd(e,t,()=>{let r=e.getAttribute(t);return e.setAttribute(t,n),()=>{r==null?e.removeAttribute(t):e.setAttribute(t,r)}})}function hd(e,t,n){return pd(e,t,()=>{let r=t in e,i=e[t];return e[t]=n,()=>{r?e[t]=i:delete e[t]}})}function gd(e,t){return e?pd(e,`style`,()=>{let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}):()=>{}}function _d(e,t,n){return e?pd(e,t,()=>{let r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{r?e.style.setProperty(t,r):e.style.removeProperty(t)}}):()=>{}}var vd=[`SCRIPT`,`STYLE`];function yd(e){return`__ariakit-dialog-snapshot-${e}`}function Q(e,t){let n=V(t),r=yd(e);if(!n.body[r])return!0;do{if(t===n.body)return!1;if(t[r])return!0;if(!t.parentElement)return!1;t=t.parentElement}while(!0)}function bd(e,t,n){return vd.includes(t.tagName)||!Q(e,t)?!1:!n.some(e=>e&&us(t,e))}function xd(e,t,n,r){for(let i of t){if(!i?.isConnected)continue;let a=t.some(e=>!e||e===i?!1:e.contains(i)),o=V(i),s=i;for(;i.parentElement&&i!==o.body;){if(r?.(i.parentElement,s),!a)for(let r of i.parentElement.children)bd(e,r,t)&&n(r,s);i=i.parentElement}}}function Sd(e,t){let{body:n}=V(t[0]),r=[];return xd(e,t,t=>{r.push(hd(t,yd(e),!0))}),Go(hd(n,yd(e),!0),()=>{for(let e of r)e()})}function Cd(e,...t){if(!e)return!1;let n=e.getAttribute(`data-backdrop`);return n==null?!1:n===``||n===`true`||!t.length?!0:t.some(e=>n===e)}function wd(e=``,t=!1){return`__ariakit-dialog-${t?`ancestor`:`outside`}${e?`-${e}`:``}`}function Td(e,t=``){return Go(hd(e,wd(),!0),hd(e,wd(t),!0))}function Ed(e,t=``){return Go(hd(e,wd(``,!0),!0),hd(e,wd(t,!0),!0))}function Dd(e,t){let n=wd(t,!0);if(e[n])return!0;let r=wd(t);do{if(e[r])return!0;if(!e.parentElement)return!1;e=e.parentElement}while(!0)}function Od(e,t){let n=[],r=t.map(e=>e?.id);return xd(e,t,t=>{Cd(t,...r)||n.unshift(Td(t,e))},(t,r)=>{r.hasAttribute(`data-dialog`)&&r.id!==e||n.unshift(Ed(t,e))}),()=>{for(let e of n)e()}}function kd(e){return e.tagName===`HTML`?!0:us(V(e).body,e)}function Ad(e,t){if(!e)return!1;if(us(e,t))return!0;let n=t.getAttribute(`aria-activedescendant`);if(n){let t=V(e).getElementById(n);if(t)return us(e,t)}return!1}function jd(e,t){if(!(`clientY`in e))return!1;let n=t.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=e.clientY&&e.clientY<=n.top+n.height&&n.left<=e.clientX&&e.clientX<=n.left+n.width}function Md({store:e,type:t,listener:n,capture:r,domReady:i}){let a=H(n),o=K(e,`open`),s=(0,x.useRef)(!1);Us(()=>{if(!o||!i)return;let{contentElement:t}=e.getState();if(!t)return;let n=()=>{s.current=!0};return t.addEventListener(`focusin`,n,!0),()=>t.removeEventListener(`focusin`,n,!0)},[e,o,i]),(0,x.useEffect)(()=>o?zs(t,t=>{let{contentElement:n,disclosureElement:r}=e.getState(),i=t.target;n&&i&&kd(i)&&(us(n,i)||Ad(r,i)||i.hasAttribute(`data-focus-trap`)||jd(t,n)||s.current&&!Dd(i,n.id)||a(t))},r):void 0,[o,r,e,t,a])}function $(e,t){return typeof e==`function`?e(t):!!e}function Nd(e,t,n,r){let i=dd(K(e,`open`)),a={store:e,domReady:n,capture:!0};Md({...a,type:`click`,listener:n=>{let{contentElement:a}=e.getState(),o=i.current;o&&Dd(o,a?.id)&&$(t,n)&&(r&&(r.current=!0),e.hide())}}),Md({...a,type:`focusin`,listener:n=>{let{contentElement:r}=e.getState();r&&n.target!==V(r)&&$(t,n)&&e.hide()}}),Md({...a,type:`contextmenu`,listener:n=>{$(t,n)&&(r&&(r.current=!0),e.hide())}})}var Pd=(0,x.createContext)({});function Fd(e){let t=(0,x.useContext)(Pd),[n,r]=(0,x.useState)([]),i=(0,x.useCallback)(e=>(r(t=>[...t,e]),Go(t.add?.call(t,e),()=>{r(t=>t.filter(t=>t!==e))})),[t]);Us(()=>Cl(e,[`open`,`contentElement`],n=>{if(n.open&&n.contentElement)return t.add?.call(t,e)}),[e,t]);let a=(0,x.useMemo)(()=>({store:e,add:i}),[e,i]);return{wrapElement:(0,x.useCallback)(e=>(0,L.jsx)(Pd.Provider,{value:a,children:e}),[a]),nestedDialogs:n}}function Id({attribute:e,contentId:t,contentElement:n,enabled:r}){let[i,a]=Xs(),o=(0,x.useCallback)(()=>{if(!r||!n)return!1;let{body:i}=V(n),a=i.getAttribute(e);return!a||a===t},[i,r,n,e,t]);return(0,x.useEffect)(()=>{if(!r||!t||!n)return;let{body:i}=V(n);if(o())return i.setAttribute(e,t),()=>i.removeAttribute(e);let s=new MutationObserver(()=>(0,Oo.flushSync)(a));return s.observe(i,{attributeFilter:[e]}),()=>s.disconnect()},[i,r,t,n,o,e]),o}function Ld(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?`paddingLeft`:`paddingRight`}function Rd(e,t,n){let r=Id({attribute:`data-dialog-prevent-body-scroll`,contentElement:e,contentId:t,enabled:n});(0,x.useEffect)(()=>{if(!r()||!e)return;let t=V(e),n=cs(e),{documentElement:i,body:a}=t,o=i.style.getPropertyValue(`--scrollbar-width`),s=o?Number.parseInt(o,10):n.innerWidth-i.clientWidth,c=()=>_d(i,`--scrollbar-width`,`${s}px`),l=Ld(i),u=()=>gd(a,{overflow:`hidden`,[l]:`${s}px`}),d=()=>{let{scrollX:e,scrollY:t,visualViewport:r}=n,i=r?.offsetLeft??0,o=r?.offsetTop??0,c=gd(a,{position:`fixed`,overflow:`hidden`,top:`${-(t-Math.floor(o))}px`,left:`${-(e-Math.floor(i))}px`,right:`0`,[l]:`${s}px`});return()=>{c(),n.scrollTo({left:e,top:t,behavior:`instant`})}},f=Ts()&&!Os();return Go(c(),f?d():u())},[r,e])}function zd(e,...t){if(!e)return!1;let n=e.getAttribute(`data-focus-trap`);return n==null?!1:t.length?n===``?!1:t.some(e=>n===e):!0}function Bd(){return`inert`in HTMLElement.prototype}function Vd(e){return md(e,`aria-hidden`,`true`)}function Hd(e,t){return`style`in e?Bd()?hd(e,`inert`,!0):Go(...Bc(e,!0).map(e=>{if(t?.some(t=>t&&us(t,e)))return Bo;let n=pd(e,`focus`,()=>(e.focus=Bo,()=>{delete e.focus}));return Go(md(e,`tabindex`,`-1`),n)}),Vd(e),gd(e,{pointerEvents:`none`,userSelect:`none`,cursor:`default`})):Bo}function Ud(e,t){let n=[],r=t.map(e=>e?.id);return xd(e,t,e=>{Cd(e,...r)||zd(e,...r)||n.unshift(Hd(e,t))},e=>{e.hasAttribute(`role`)&&(t.some(t=>t&&us(t,e))||n.unshift(md(e,`role`,`none`)))}),()=>{for(let e of n)e()}}var Wd=`div`,Gd=`a.button.details.dialog.div.form.h1.h2.h3.h4.h5.h6.header.img.input.label.li.nav.ol.p.section.select.span.summary.textarea.ul.svg`.split(`.`);G(function(e){return e});var Kd=U(function(e){return W(Wd,e)});Object.assign(Kd,Gd.reduce((e,t)=>(e[t]=U(function(e){return W(t,e)}),e),{}));function qd({store:e,backdrop:t,alwaysVisible:n,hidden:r}){let i=(0,x.useRef)(null),a=mu({disclosure:e}),o=K(e,`contentElement`);(0,x.useEffect)(()=>{let e=i.current,t=o;e&&t&&(e.style.zIndex=getComputedStyle(t).zIndex)},[o]),Us(()=>{let e=o?.id;if(!e)return;let t=i.current;if(t)return Ed(t,e)},[o]);let s=uu({ref:i,store:a,role:`presentation`,"data-backdrop":o?.id||``,alwaysVisible:n,hidden:r??void 0,style:{position:`fixed`,top:0,right:0,bottom:0,left:0}});if(!t)return null;if((0,x.isValidElement)(t))return(0,L.jsx)(Kd,{...s,render:t});let c=typeof t==`boolean`?`div`:t;return(0,L.jsx)(Kd,{...s,render:(0,L.jsx)(c,{})})}function Jd(e={}){return fu(e)}function Yd(e,t,n){return pu(e,t,n)}function Xd(e={}){let[t,n]=Nl(Jd,e);return Yd(t,n,e)}var Zd=`div`,Qd=Es();function $d(e){let t=ls();return!t||e&&us(e,t)?!1:!!Lc(t)}function ef(e,t=!1){if(!e)return null;let n=`current`in e?e.current:e;return n?t?Lc(n)?n:null:n:null}var tf=G(function({store:e,open:t,onClose:n,focusable:r=!0,modal:i=!0,portal:a=!!i,backdrop:o=!!i,hideOnEscape:s=!0,hideOnInteractOutside:c=!0,getPersistentElements:l,preventBodyScroll:u=!!i,autoFocusOnShow:d=!0,autoFocusOnHide:f=!0,initialFocus:p,finalFocus:m,unmountOnHide:h,unstable_treeSnapshotKey:g,..._}){let v=eu(),y=(0,x.useRef)(null),b=Xd({store:e||v,open:t,setOpen(e){if(e)return;let t=y.current;if(!t)return;let r=new Event(`close`,{bubbles:!1,cancelable:!0});n&&t.addEventListener(`close`,n,{once:!0}),t.dispatchEvent(r),r.defaultPrevented&&b.setOpen(!0)}}),{portalRef:S,domReady:C}=$s(a,_.portalRef),w=_.preserveTabOrder,T=K(b,e=>w&&!i&&e.mounted),E=qs(_.id),D=K(b,`open`),O=K(b,`mounted`),k=K(b,`contentElement`),A=lu(O,_.hidden,_.alwaysVisible);Rd(k,E,u&&!A);let j=(0,x.useRef)(!1);Us(()=>Cl(b,[`open`],e=>{e.open&&(j.current=!1)}),[b]),Nd(b,c,C,j);let{wrapElement:ee,nestedDialogs:te}=Fd(b);_=Qs(_,ee,[ee]);let ne=(0,x.useRef)(null);Qd&&(0,x.useEffect)(()=>{if(!C)return;let e=y.current;if(!e)return;let t=V(e),n=e=>{ne.current=e.target};return t.addEventListener(`mousedown`,n,!0),()=>{t.removeEventListener(`mousedown`,n,!0)}},[C]),Us(()=>{if(!D)return;let e=y.current,t=ls(e,!0);if(t){if(t.tagName===`BODY`){let t=ne.current;if(ne.current=null,!t?.isConnected||!Lc(t)||e&&us(e,t))return;b.setDisclosureElement(t);return}e&&us(e,t)||b.setDisclosureElement(t)}},[b,D]),(0,x.useEffect)(()=>{if(!O||!C)return;let e=y.current;if(!e)return;let t=cs(e),n=t.visualViewport||t,r=()=>{let n=t.visualViewport?.height??t.innerHeight;e.style.setProperty(`--dialog-viewport-height`,`${n}px`)};return r(),n.addEventListener(`resize`,r),()=>{n.removeEventListener(`resize`,r)}},[O,C]),(0,x.useEffect)(()=>{if(!i||!O||!C)return;let e=y.current;if(e&&!e.querySelector(`[data-dialog-dismiss]`))return ud(e,b.hide)},[b,i,O,C]),Us(()=>{if(!Bd()||D||!O||!C)return;let e=y.current;if(e)return Hd(e)},[D,O,C]);let re=D&&C;Us(()=>{if(!E||!re)return;let e=y.current;return Sd(E,[e])},[E,re,g]);let M=H(l);Us(()=>{if(!E||!re)return;let{disclosureElement:e}=b.getState(),t=[y.current,...M()||[],...te.map(e=>e.getState().contentElement)];return i?Go(Od(E,t),Ud(E,t)):Od(E,[e,...t])},[E,b,re,M,te,i,g]);let N=!!d,ie=Zs(d),[ae,oe]=(0,x.useState)(!1);(0,x.useEffect)(()=>{if(!D||!N||!C||!k?.isConnected)return;let e=ef(p,!0)||k.querySelector(`[data-autofocus=true],[autofocus]`)||Vc(k,!0,a&&T)||k,t=Lc(e);ie(t?e:null)&&(oe(!0),queueMicrotask(()=>{b.getState().open&&(e.focus(),Qd&&t&&e.scrollIntoView({block:`nearest`,inline:`nearest`}))}))},[D,N,C,k,p,a,T,b,ie]);let P=!!f,se=Zs(f),[F,ce]=(0,x.useState)(!1);(0,x.useEffect)(()=>{if(D)return ce(!0),()=>ce(!1)},[D]);let le=(0,x.useCallback)((e,t=!0)=>{if(j.current)return;let{disclosureElement:n}=b.getState();if($d(e))return;let r=ef(m)||n;if(r?.id){let e=V(r),t=`[aria-activedescendant="${r.id}"]`,n=e.querySelector(t);n&&(r=n)}if(r&&!Lc(r)){let e=r.closest(`[data-dialog]`);if(e?.id){let t=V(e),n=`[aria-controls~="${e.id}"]`,i=t.querySelector(n);i&&(r=i)}}let i=r&&Lc(r);if(!i&&t){requestAnimationFrame(()=>le(e,!1));return}se(i?r:null)&&i&&r?.focus()},[b,m,se]),ue=(0,x.useRef)(!1);Us(()=>{if(D||!F||!P)return;let e=y.current;ue.current=!0,le(e)},[D,F,C,P,le]),(0,x.useEffect)(()=>{if(!F||!P)return;let e=y.current;return()=>{if(ue.current){ue.current=!1;return}le(e)}},[F,P,le]);let de=Zs(s);(0,x.useEffect)(()=>!C||!O?void 0:zs(`keydown`,e=>{if(e.key!==`Escape`||e.defaultPrevented)return;let t=y.current;if(!t||Dd(t))return;let n=e.target;if(!n)return;let{disclosureElement:r}=b.getState();(n.tagName===`BODY`||us(t,n)||!r||us(r,n))&&de(e)&&b.hide()},!0),[b,C,O,de]),_=Qs(_,e=>(0,L.jsx)(sd,{level:i?1:void 0,children:e}),[i]);let fe=_.hidden,pe=_.alwaysVisible;_=Qs(_,e=>o?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(qd,{store:b,backdrop:o,hidden:fe,alwaysVisible:pe}),e]}):e,[b,o,fe,pe]);let[me,he]=(0,x.useState)(),[ge,_e]=(0,x.useState)();return _=Qs(_,e=>(0,L.jsx)(nu,{value:b,children:(0,L.jsx)(ru.Provider,{value:he,children:(0,L.jsx)(iu.Provider,{value:_e,children:e})})}),[b]),_={"data-dialog":``,role:`dialog`,tabIndex:r?-1:void 0,"aria-labelledby":_[`aria-label`]==null?me:void 0,"aria-describedby":ge,..._,id:E,ref:Ks(y,_.ref)},_=ld({..._,autoFocusOnShow:ae}),_=uu({store:b,..._}),_=pl({..._,focusable:r}),_=ad({portal:a,..._,portalRef:S,preserveTabOrder:T}),_});function nf(e,t=eu){return U(function(n){let r=t();return K(n.store||r,e=>!n.unmountOnHide||e?.mounted||!!n.open)?(0,L.jsx)(e,{...n}):null})}var rf=nf(U(function(e){return W(Zd,tf(e))}),eu),af=Math.min,of=Math.max,sf=Math.round,cf=Math.floor,lf=e=>({x:e,y:e}),uf={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function df(e,t,n){return of(e,af(t,n))}function ff(e,t){return typeof e==`function`?e(t):e}function pf(e){return e.split(`-`)[0]}function mf(e){return e.split(`-`)[1]}function hf(e){return e===`x`?`y`:`x`}function gf(e){return e===`y`?`height`:`width`}function _f(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function vf(e){return hf(_f(e))}function yf(e,t,n){n===void 0&&(n=!1);let r=mf(e),i=vf(e),a=gf(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Of(o)),[o,Of(o)]}function bf(e){let t=Of(e);return[xf(e),t,xf(t)]}function xf(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Sf=[`left`,`right`],Cf=[`right`,`left`],wf=[`top`,`bottom`],Tf=[`bottom`,`top`];function Ef(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Cf:Sf:t?Sf:Cf;case`left`:case`right`:return t?wf:Tf;default:return[]}}function Df(e,t,n,r){let i=mf(e),a=Ef(pf(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(xf)))),a}function Of(e){let t=pf(e);return uf[t]+e.slice(t.length)}function kf(e){return{top:0,right:0,bottom:0,left:0,...e}}function Af(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:kf(e)}function jf(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Mf(e,t,n){let{reference:r,floating:i}=e,a=_f(t),o=vf(t),s=gf(o),c=pf(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(mf(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Nf(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=ff(t,e),p=Af(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=jf(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=jf(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Pf=50,Ff=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Nf},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Mf(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Pf&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Mf(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},If=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=ff(e,t)||{};if(l==null)return{};let d=Af(u),f={x:n,y:r},p=vf(i),m=gf(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=af(d[_],T),D=af(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=df(O,A,k),ee=!c.arrow&&mf(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,te=ee?A<O?A-O:A-k:0;return{[p]:f[p]+te,data:{[p]:j,centerOffset:A-j-te,...ee&&{alignmentOffset:te}},reset:ee}}}),Lf=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=ff(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=pf(r),_=_f(o),v=pf(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Of(o)]:bf(o)),x=p!==`none`;!d&&x&&b.push(...Df(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=yf(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==_f(t))||T.every(e=>_f(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=_f(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}},Rf=new Set([`left`,`top`]);async function zf(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=pf(n),s=mf(n),c=_f(n)===`y`,l=Rf.has(o)?-1:1,u=a&&c?-1:1,d=ff(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Bf=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await zf(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Vf=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ff(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=_f(pf(i)),p=hf(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=df(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=df(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Hf=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ff(e,t),u={x:n,y:r},d=_f(i),f=hf(d),p=u[f],m=u[d],h=ff(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Rf.has(pf(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Uf=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=ff(e,t),u=await o.detectOverflow(t,l),d=pf(i),f=mf(i),p=_f(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=af(h-u[g],v),x=af(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=of(u.left,0),t=of(u.right,0),n=of(u.top,0),r=of(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:of(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:of(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Wf(){return typeof window<`u`}function Gf(e){return Jf(e)?(e.nodeName||``).toLowerCase():`#document`}function Kf(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qf(e){return((Jf(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Jf(e){return Wf()?e instanceof Node||e instanceof Kf(e).Node:!1}function Yf(e){return Wf()?e instanceof Element||e instanceof Kf(e).Element:!1}function Xf(e){return Wf()?e instanceof HTMLElement||e instanceof Kf(e).HTMLElement:!1}function Zf(e){return!Wf()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Kf(e).ShadowRoot}function Qf(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=lp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function $f(e){return/^(table|td|th)$/.test(Gf(e))}function ep(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var tp=/transform|translate|scale|rotate|perspective|filter/,np=/paint|layout|strict|content/,rp=e=>!!e&&e!==`none`,ip;function ap(e){let t=Yf(e)?lp(e):e;return rp(t.transform)||rp(t.translate)||rp(t.scale)||rp(t.rotate)||rp(t.perspective)||!sp()&&(rp(t.backdropFilter)||rp(t.filter))||tp.test(t.willChange||``)||np.test(t.contain||``)}function op(e){let t=dp(e);for(;Xf(t)&&!cp(t);){if(ap(t))return t;if(ep(t))return null;t=dp(t)}return null}function sp(){return ip??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ip}function cp(e){return/^(html|body|#document)$/.test(Gf(e))}function lp(e){return Kf(e).getComputedStyle(e)}function up(e){return Yf(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dp(e){if(Gf(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Zf(e)&&e.host||qf(e);return Zf(t)?t.host:t}function fp(e){let t=dp(e);return cp(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xf(t)&&Qf(t)?t:fp(t)}function pp(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=fp(e),i=r===e.ownerDocument?.body,a=Kf(r);if(i){let e=mp(a);return t.concat(a,a.visualViewport||[],Qf(r)?r:[],e&&n?pp(e):[])}else return t.concat(r,pp(r,[],n))}function mp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hp(e){let t=lp(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Xf(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=sf(n)!==a||sf(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function gp(e){return Yf(e)?e:e.contextElement}function _p(e){let t=gp(e);if(!Xf(t))return lf(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=hp(t),o=(a?sf(n.width):n.width)/r,s=(a?sf(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var vp=lf(0);function yp(e){let t=Kf(e);return!sp()||!t.visualViewport?vp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Kf(e)?!1:t}function xp(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=gp(e),o=lf(1);t&&(r?Yf(r)&&(o=_p(r)):o=_p(e));let s=bp(a,n,r)?yp(a):lf(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Kf(a),t=r&&Yf(r)?Kf(r):r,n=e,i=mp(n);for(;i&&r&&t!==n;){let e=_p(i),t=i.getBoundingClientRect(),r=lp(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Kf(i),i=mp(n)}}return jf({width:u,height:d,x:c,y:l})}function Sp(e,t){let n=up(e).scrollLeft;return t?t.left+n:xp(qf(e)).left+n}function Cp(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Sp(e,n),y:n.top+t.scrollTop}}function wp(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=qf(r),s=t?ep(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=lf(1),u=lf(0),d=Xf(r);if((d||!d&&!a)&&((Gf(r)!==`body`||Qf(o))&&(c=up(r)),d)){let e=xp(r);l=_p(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Cp(o,c):lf(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Tp(e){return Array.from(e.getClientRects())}function Ep(e){let t=qf(e),n=up(e),r=e.ownerDocument.body,i=of(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=of(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Sp(e),s=-n.scrollTop;return lp(r).direction===`rtl`&&(o+=of(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Dp=25;function Op(e,t){let n=Kf(e),r=qf(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=sp();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Sp(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Dp&&(a-=o)}else l<=Dp&&(a+=l);return{width:a,height:o,x:s,y:c}}function kp(e,t){let n=xp(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Xf(e)?_p(e):lf(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ap(e,t,n){let r;if(t===`viewport`)r=Op(e,n);else if(t===`document`)r=Ep(qf(e));else if(Yf(t))r=kp(t,n);else{let n=yp(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return jf(r)}function jp(e,t){let n=dp(e);return n===t||!Yf(n)||cp(n)?!1:lp(n).position===`fixed`||jp(n,t)}function Mp(e,t){let n=t.get(e);if(n)return n;let r=pp(e,[],!1).filter(e=>Yf(e)&&Gf(e)!==`body`),i=null,a=lp(e).position===`fixed`,o=a?dp(e):e;for(;Yf(o)&&!cp(o);){let t=lp(o),n=ap(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Qf(o)&&!n&&jp(e,o))?r=r.filter(e=>e!==o):i=t,o=dp(o)}return t.set(e,r),r}function Np(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ep(t)?[]:Mp(t,this._c):[].concat(n),r],o=Ap(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ap(t,a[e],i);s=of(n.top,s),c=af(n.right,c),l=af(n.bottom,l),u=of(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Pp(e){let{width:t,height:n}=hp(e);return{width:t,height:n}}function Fp(e,t,n){let r=Xf(t),i=qf(t),a=n===`fixed`,o=xp(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=lf(0);function l(){c.x=Sp(i)}if(r||!r&&!a)if((Gf(t)!==`body`||Qf(i))&&(s=up(t)),r){let e=xp(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Cp(i,s):lf(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Ip(e){return lp(e).position===`static`}function Lp(e,t){if(!Xf(e)||lp(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return qf(e)===n&&(n=n.ownerDocument.body),n}function Rp(e,t){let n=Kf(e);if(ep(e))return n;if(!Xf(e)){let t=dp(e);for(;t&&!cp(t);){if(Yf(t)&&!Ip(t))return t;t=dp(t)}return n}let r=Lp(e,t);for(;r&&$f(r)&&Ip(r);)r=Lp(r,t);return r&&cp(r)&&Ip(r)&&!ap(r)?n:r||op(e)||n}var zp=async function(e){let t=this.getOffsetParent||Rp,n=this.getDimensions,r=await n(e.floating);return{reference:Fp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Bp(e){return lp(e).direction===`rtl`}var Vp={convertOffsetParentRelativeRectToViewportRelativeRect:wp,getDocumentElement:qf,getClippingRect:Np,getOffsetParent:Rp,getElementRects:zp,getClientRects:Tp,getDimensions:Pp,getScale:_p,isElement:Yf,isRTL:Bp};function Hp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Up(e,t){let n=null,r,i=qf(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=cf(d),h=cf(i.clientWidth-(u+f)),g=cf(i.clientHeight-(d+p)),_=cf(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:of(0,af(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Hp(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Wp(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=gp(e),u=i||a?[...l?pp(l):[],...t?pp(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Up(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?xp(e):null;c&&g();function g(){let t=xp(e);h&&!Hp(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Gp=Bf,Kp=Vf,qp=Lf,Jp=Uf,Yp=If,Xp=Hf,Zp=(e,t,n)=>{let r=new Map,i={platform:Vp,...n},a={...i.platform,_c:r};return Ff(e,t,{...i,platform:a})},Qp=`div`;function $p(e=0,t=0,n=0,r=0){if(typeof DOMRect==`function`)return new DOMRect(e,t,n,r);let i={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...i,toJSON:()=>i}}function em(e){if(!e)return $p();let{x:t,y:n,width:r,height:i}=e;return $p(t,n,r,i)}function tm(e,t){return{contextElement:e||void 0,getBoundingClientRect:()=>{let n=e,r=t?.(n);return r||!n?em(r):n.getBoundingClientRect()}}}function nm(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}function rm(e){let t=window.devicePixelRatio||1;return Math.round(e*t)/t}function im(e,t){return Gp(({placement:n})=>{let r=(e?.clientHeight||0)/2,i=typeof t.gutter==`number`?t.gutter+r:t.gutter??r;return{crossAxis:n.split(`-`)[1]?void 0:t.shift,mainAxis:i,alignmentAxis:t.shift}})}function am(e){if(e.flip===!1)return;let t=typeof e.flip==`string`?e.flip.split(` `):void 0;return Xo(!t||t.every(nm),!1),qp({padding:e.overflowPadding,fallbackPlacements:t})}function om(e){if(!(!e.slide&&!e.overlap))return Kp({mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Xp()})}function sm(e){return Jp({padding:e.overflowPadding,apply({elements:t,availableWidth:n,availableHeight:r,rects:i}){let a=t.floating,o=Math.round(i.reference.width);n=Math.floor(n),r=Math.floor(r),a.style.setProperty(`--popover-anchor-width`,`${o}px`),a.style.setProperty(`--popover-available-width`,`${n}px`),a.style.setProperty(`--popover-available-height`,`${r}px`),e.sameWidth&&(a.style.width=`${o}px`),e.fitViewport&&(a.style.maxWidth=`${n}px`,a.style.maxHeight=`${r}px`)}})}function cm(e,t){if(e)return Yp({element:e,padding:t.arrowPadding})}var lm=G(function({store:e,modal:t=!1,portal:n=!!t,preserveTabOrder:r=!0,autoFocusOnShow:i=!0,wrapperProps:a,fixed:o=!1,flip:s=!0,shift:c=0,slide:l=!0,overlap:u=!1,sameWidth:d=!1,fitViewport:f=!1,gutter:p,arrowPadding:m=4,overflowPadding:h=8,getAnchorRect:g,updatePosition:_,...v}){let y=gu();e||=y,Xo(e,!1);let b=K(e,`arrowElement`),S=K(e,`anchorElement`),C=K(e,`disclosureElement`),w=K(e,`popoverElement`),T=K(e,`contentElement`),E=K(e,`placement`),D=K(e,`mounted`),O=K(e,`rendered`),k=(0,x.useRef)(null),[A,j]=(0,x.useState)(!1),{portalRef:ee,domReady:te}=$s(n,v.portalRef),ne=H(g),re=H(_),M=!!_;Us(()=>{if(!w?.isConnected)return;w.style.setProperty(`--popover-overflow-padding`,`${h}px`);let t=tm(S,ne),n=async()=>{if(!D)return;b||(k.current=k.current||document.createElement(`div`));let n=b||k.current,r=[im(n,{gutter:p,shift:c}),am({flip:s,overflowPadding:h}),om({slide:l,shift:c,overlap:u,overflowPadding:h}),cm(n,{arrowPadding:m}),sm({sameWidth:d,fitViewport:f,overflowPadding:h})],i=await Zp(t,w,{placement:E,strategy:o?`fixed`:`absolute`,middleware:r});e?.setState(`currentPlacement`,i.placement),j(!0);let a=rm(i.x),g=rm(i.y);if(Object.assign(w.style,{top:`0`,left:`0`,transform:`translate3d(${a}px,${g}px,0)`}),n&&i.middlewareData.arrow){let{x:e,y:t}=i.middlewareData.arrow,r=i.placement.split(`-`)[0],a=n.clientWidth/2,o=n.clientHeight/2,s=e==null?-a:e+a,c=t==null?-o:t+o;w.style.setProperty(`--popover-transform-origin`,{top:`${s}px calc(100% + ${o}px)`,bottom:`${s}px ${-o}px`,left:`calc(100% + ${a}px) ${c}px`,right:`${-a}px ${c}px`}[r]),Object.assign(n.style,{left:e==null?``:`${e}px`,top:t==null?``:`${t}px`,[r]:`100%`})}},r=Wp(t,w,async()=>{M?(await re({updatePosition:n}),j(!0)):await n()},{elementResize:typeof ResizeObserver==`function`});return()=>{j(!1),r()}},[e,O,w,b,S,w,E,D,te,o,s,c,l,u,d,f,p,m,h,ne,M,re]),Us(()=>{if(!D||!te||!w?.isConnected||!T?.isConnected)return;let e=()=>{w.style.zIndex=getComputedStyle(T).zIndex};e();let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>cancelAnimationFrame(t)},[D,te,w,T]);let N=o?`fixed`:`absolute`;return v=Qs(v,t=>(0,L.jsx)(`div`,{...a,style:{position:N,top:0,left:0,width:`max-content`,...a?.style},ref:e?.setPopoverElement,children:t}),[e,N,a]),v=Qs(v,t=>(0,L.jsx)(vu,{value:e,children:t}),[e]),v={"data-placing":!A||void 0,...v,style:{position:`relative`,...v.style}},v=tf({store:e,modal:t,portal:n,preserveTabOrder:r,preserveTabOrderAnchor:C||S,autoFocusOnShow:A&&i,...v,portalRef:ee}),v});nf(U(function(e){return W(Qp,lm(e))}),gu);var um=`div`;function dm(e,t,n,r){return qc(t)?!0:e?!!(us(t,e)||n&&us(n,e)||r?.some(t=>dm(e,t,n))):!1}function fm({store:e,...t}){let[n,r]=(0,x.useState)(!1),i=K(e,`mounted`);(0,x.useEffect)(()=>{i||r(!1)},[i]);let a=t.onFocus,o=H(e=>{a?.(e),!e.defaultPrevented&&r(!0)}),s=(0,x.useRef)(null);return(0,x.useEffect)(()=>Cl(e,[`anchorElement`],e=>{s.current=e.anchorElement}),[e]),t={autoFocusOnHide:n,finalFocus:s,...t,onFocus:o},t}var pm=(0,x.createContext)(null),mm=G(function({store:e,modal:t=!1,portal:n=!!t,hideOnEscape:r=!0,hideOnHoverOutside:i=!0,disablePointerEventsOnApproach:a=!!i,...o}){let s=Hu();e||=s,Xo(e,!1);let c=(0,x.useRef)(null),[l,u]=(0,x.useState)([]),d=(0,x.useRef)(0),f=(0,x.useRef)(null),{portalRef:p,domReady:m}=$s(n,o.portalRef),h=nc(),g=!!i,_=Zs(i),v=!!a,y=Zs(a),b=K(e,`open`),S=K(e,`mounted`);(0,x.useEffect)(()=>{if(!m||!S||!g&&!v)return;let t=c.current;return t?Go(zs(`mousemove`,n=>{if(!e||!h())return;let{anchorElement:r,hideTimeout:i,timeout:a}=e.getState(),o=f.current,[s]=n.composedPath(),c=r;if(dm(s,t,c,l)){f.current=s&&c&&us(c,s)?Z(n):null,window.clearTimeout(d.current),d.current=0;return}if(!d.current){if(o){let e=Z(n);if(Gu(e,qu(t,o))){if(f.current=e,!y(n))return;n.preventDefault(),n.stopPropagation();return}}_(n)&&(d.current=window.setTimeout(()=>{d.current=0,e?.hide()},i??a))}},!0),()=>clearTimeout(d.current)):void 0},[e,h,m,S,g,v,l,y,_]),(0,x.useEffect)(()=>{if(!m||!S||!v)return;let e=e=>{let t=c.current;if(!t)return;let n=f.current;if(!n)return;let r=qu(t,n);if(Gu(Z(e),r)){if(!y(e))return;e.preventDefault(),e.stopPropagation()}};return Go(zs(`mouseenter`,e,!0),zs(`mouseover`,e,!0),zs(`mouseout`,e,!0),zs(`mouseleave`,e,!0))},[m,S,v,y]),(0,x.useEffect)(()=>{m&&(b||e?.setAutoFocusOnShow(!1))},[e,m,b]);let C=Ws(b);(0,x.useEffect)(()=>{if(m)return()=>{C.current||e?.setAutoFocusOnShow(!1)}},[e,m]);let w=(0,x.useContext)(pm);Us(()=>{if(t||!n||!S||!m)return;let e=c.current;if(e)return w?.(e)},[t,n,S,m]);let T=(0,x.useCallback)(e=>{u(t=>[...t,e]);let t=w?.(e);return()=>{u(t=>t.filter(t=>t!==e)),t?.()}},[w]);o=Qs(o,t=>(0,L.jsx)(Wu,{value:e,children:(0,L.jsx)(pm.Provider,{value:T,children:t})}),[e,T]),o={...o,ref:Ks(c,o.ref)},o=fm({store:e,...o});let E=K(e,e=>t||e.autoFocusOnShow);return o=lm({store:e,modal:t,portal:n,autoFocusOnShow:E,...o,portalRef:p,hideOnEscape(t){return Qo(r,t)?!1:(requestAnimationFrame(()=>{requestAnimationFrame(()=>{e?.hide()})}),!0)}}),o});nf(U(function(e){return W(um,mm(e))}),Hu);var hm=`a`,gm=G(function({store:e,showOnHover:t=!0,...n}){let r=Hu();e||=r,Xo(e,!1);let i=$o(n),a=(0,x.useRef)(0);(0,x.useEffect)(()=>()=>window.clearTimeout(a.current),[]),(0,x.useEffect)(()=>zs(`mouseleave`,t=>{if(!e)return;let{anchorElement:n}=e.getState();n&&t.target===n&&(window.clearTimeout(a.current),a.current=0)},!0),[e]);let o=n.onMouseMove,s=Zs(t),c=nc(),l=H(t=>{if(o?.(t),i||!e||t.defaultPrevented||a.current||!c()||!s(t))return;let n=t.currentTarget;e.setAnchorElement(n),e.setDisclosureElement(n);let{showTimeout:r,timeout:l}=e.getState(),u=()=>{a.current=0,c()&&(e?.setAnchorElement(n),e?.show(),queueMicrotask(()=>{e?.setDisclosureElement(n)}))},d=r??l;d===0?u():a.current=window.setTimeout(u,d)}),u=n.onClick,d=H(t=>{u?.(t),e&&(window.clearTimeout(a.current),a.current=0)}),f=(0,x.useCallback)(t=>{if(!e)return;let{anchorElement:n}=e.getState();n?.isConnected||e.setAnchorElement(t)},[e]);return n={...n,ref:Ks(f,n.ref),onMouseMove:l,onClick:d},n=pl(n),n});U(function(e){return W(hm,gm(e))});function _m({popover:e,...t}={}){let n=Dl(t.store,Tl(e,[`arrowElement`,`anchorElement`,`contentElement`,`popoverElement`,`disclosureElement`])),r=n?.getState(),i=Jd({...t,store:n}),a=B(t.placement,r?.placement,`bottom`),o=yl({...i.getState(),placement:a,currentPlacement:a,anchorElement:B(r?.anchorElement,null),popoverElement:B(r?.popoverElement,null),arrowElement:B(r?.arrowElement,null),rendered:Symbol(`rendered`)},i,n);return{...i,...o,setAnchorElement:e=>o.setState(`anchorElement`,e),setPopoverElement:e=>o.setState(`popoverElement`,e),setArrowElement:e=>o.setState(`arrowElement`,e),render:()=>o.setState(`rendered`,Symbol(`rendered`))}}function vm(e,t,n){return Ys(t,[n.popover]),Ml(e,n,`placement`),Yd(e,t,n)}function ym(e={}){let t=e.store?.getState(),n=_m({...e,placement:B(e.placement,t?.placement,`bottom`)}),r=B(e.timeout,t?.timeout,500),i=yl({...n.getState(),timeout:r,showTimeout:B(e.showTimeout,t?.showTimeout),hideTimeout:B(e.hideTimeout,t?.hideTimeout),autoFocusOnShow:B(t?.autoFocusOnShow,!1)},n,e.store);return{...n,...i,setAutoFocusOnShow:e=>i.setState(`autoFocusOnShow`,e)}}function bm(e,t,n){return Ml(e,n,`timeout`),Ml(e,n,`showTimeout`),Ml(e,n,`hideTimeout`),vm(e,t,n)}var xm=uc([vc],[yc]),Sm=xm.useContext,Cm=xm.useScopedContext;xm.useProviderContext,xm.ContextProvider,xm.ScopedContextProvider,(0,x.createContext)(void 0);var wm=`div`,Tm=G(function({store:e,...t}){let n=gu();return e||=n,t={...t,ref:Ks(e?.setAnchorElement,t.ref)},t});U(function(e){return W(wm,Tm(e))});var Em=`button`,Dm=G(function(e){let t=(0,x.useRef)(null),n=Js(t,Em),[r,i]=(0,x.useState)(()=>!!n&&fs({tagName:n,type:e.type}));return(0,x.useEffect)(()=>{t.current&&i(fs(t.current))},[]),e={role:!r&&n!==`a`?`button`:void 0,...e,ref:Ks(t,e.ref)},e=_l(e),e});U(function(e){return W(Em,Dm(e))});var Om=`button`,km=Symbol(`disclosure`),Am=G(function({store:e,toggleOnClick:t=!0,...n}){let r=Yl();e||=r,Xo(e,!1);let i=(0,x.useRef)(null),[a,o]=(0,x.useState)(!1),s=K(e,`disclosureElement`),c=K(e,`open`);(0,x.useEffect)(()=>{let t=s===i.current;s?.isConnected||(e?.setDisclosureElement(i.current),t=!0),o(c&&t)},[s,e,c]);let l=n.onClick,u=Zs(t),[d,f]=ec(n,km,!0),p=H(t=>{l?.(t),!t.defaultPrevented&&(d||u(t)&&(e?.setDisclosureElement(t.currentTarget),e?.toggle()))});return n={"aria-expanded":a,"aria-controls":K(e,`contentElement`)?.id,...f,...n,ref:Ks(i,n.ref),onClick:p},n=Dm(n),n});U(function(e){return W(Om,Am(e))});var jm=`button`,Mm=G(function({store:e,...t}){let n=eu();return e||=n,Xo(e,!1),t={"aria-haspopup":ys(K(e,`contentElement`),`dialog`),...t},t=Am({store:e,...t}),t});U(function(e){return W(jm,Mm(e))});var Nm=`button`,Pm=G(function({store:e,...t}){let n=gu();e||=n,Xo(e,!1);let r=t.onClick,i=H(t=>{e?.setAnchorElement(t.currentTarget),r?.(t)});return t=Qs(t,t=>(0,L.jsx)(vu,{value:e,children:t}),[e]),t={...t,onClick:i},t=Tm({store:e,...t}),t=Mm({store:e,...t}),t});U(function(e){return W(Nm,Pm(e))});var Fm=`button`,Im=G(function({store:e,...t}){let n=$l();e||=n;let r=t.onClick,i=H(t=>{r?.(t),!t.defaultPrevented&&e?.hide()});return t={"data-dialog-dismiss":``,children:(0,x.useMemo)(()=>(0,L.jsxs)(`svg`,{"aria-label":`Dismiss popup`,display:`block`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,viewBox:`0 0 16 16`,height:`1em`,width:`1em`,children:[(0,L.jsx)(`line`,{x1:`4`,y1:`4`,x2:`12`,y2:`12`}),(0,L.jsx)(`line`,{x1:`4`,y1:`12`,x2:`12`,y2:`4`})]}),[]),...t,onClick:i},t=Dm(t),t}),Lm=U(function(e){return W(Fm,Im(e))}),Rm=`h1`,zm=G(function(e){let t=(0,x.useRef)(null),n=(0,x.useContext)(od)||1,r=`h${n}`,i=Js(t,r),a=(0,x.useMemo)(()=>!!i&&/^h\d$/.test(i),[i]);return e={render:(0,L.jsx)(r,{}),role:a?void 0:`heading`,"aria-level":a?void 0:n,...e,ref:Ks(t,e.ref)},e});U(function(e){return W(Rm,zm(e))});var Bm=`h1`,Vm=G(function({store:e,...t}){let n=(0,x.useContext)(ru),r=qs(t.id);return Us(()=>(n?.(r),()=>n?.(void 0)),[n,r]),t={...t,id:r},t=zm(t),t}),Hm=U(function(e){return W(Bm,Vm(e))}),Um=`div`,Wm=``;function Gm(){Wm=``}function Km(e){let t=e.target;return t&&hs(t)?!1:e.key===` `&&Wm.length?!0:e.key.length===1&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&/^[\p{Letter}\p{Number}]$/u.test(e.key)}function qm(e,t){if(As(e))return!0;let n=e.target;return n?t.some(e=>e.element===n):!1}function Jm(e){return e.filter(e=>!e.disabled)}function Ym(e,t){let n=e.element?.textContent||e.children||`value`in e&&e.value;return n?Ko(n).trim().toLowerCase().startsWith(t.toLowerCase()):!1}function Xm(e,t,n){if(!n)return e;let r=e.find(e=>e.id===n);return!r||!Ym(r,t)||Wm!==t&&Ym(r,Wm)?e:(Wm=t,Cc(e.filter(e=>Ym(e,Wm)),n).filter(e=>e.id!==n))}var Zm=G(function({store:e,typeahead:t=!0,...n}){let r=gc();e||=r,Xo(e,!1);let i=n.onKeyDownCapture,a=(0,x.useRef)(0),o=H(n=>{if(i?.(n),n.defaultPrevented||!t||!e)return;if(!Km(n))return Gm();let{renderedItems:r,items:o,activeId:s,id:c}=e.getState(),l=Jm(o.length>r.length?o:r),u=V(n.currentTarget),d=`[data-offscreen-id="${c}"]`,f=u.querySelectorAll(d);for(let e of f){let t=e.ariaDisabled===`true`||`disabled`in e&&!!e.disabled;l.push({id:e.id,element:e,disabled:t})}if(f.length&&(l=Ss(l,e=>e.element)),!qm(n,l))return Gm();n.preventDefault(),window.clearTimeout(a.current),a.current=window.setTimeout(()=>{Wm=``},500);let p=n.key.toLowerCase();Wm+=p,l=Xm(l,p,s);let m=l.find(e=>Ym(e,Wm));m?e.move(m.id):Gm()});return n={...n,onKeyDownCapture:o},ts(n)});U(function(e){return W(Um,Zm(e))});var Qm=`div`;function $m(e){let t=e.relatedTarget;return t?.nodeType===Node.ELEMENT_NODE?t:null}function eh(e){let t=$m(e);return t?us(e.currentTarget,t):!1}var th=Symbol(`composite-hover`);function nh(e){let t=$m(e);if(!t)return!1;do{if(Wo(t,th)&&t[th])return!0;t=t.parentElement}while(t);return!1}var rh=G(function({store:e,focusOnHover:t=!0,blurOnHoverEnd:n=!!t,...r}){let i=gc();e||=i,Xo(e,!1);let a=nc(),o=r.onMouseMove,s=Zs(t),c=H(t=>{if(o?.(t),!t.defaultPrevented&&a()&&s(t)){if(!qc(t.currentTarget)){let t=e?.getState().baseElement;t&&!Kc(t)&&t.focus()}e?.setActiveId(t.currentTarget.id)}}),l=r.onMouseLeave,u=Zs(n),d=H(t=>{var n;l?.(t),!t.defaultPrevented&&a()&&(eh(t)||nh(t)||s(t)&&u(t)&&(e?.setActiveId(null),(n=e?.getState().baseElement)==null||n.focus()))}),f=(0,x.useCallback)(e=>{e&&(e[th]=!0)},[]);return r={...r,ref:Ks(f,r.ref),onMouseMove:c,onMouseLeave:d},ts(r)});lc(U(function(e){return W(Qm,rh(e))}));var ih=uc([vc,Uu],[yc,Wu]),ah=ih.useContext,oh=ih.useScopedContext,sh=ih.useProviderContext,ch=ih.ContextProvider,lh=ih.ScopedContextProvider;(0,x.createContext)(void 0);var uh=`div`;function dh({store:e,...t}){let[n,r]=(0,x.useState)(void 0),i=t[`aria-label`],a=K(e,`disclosureElement`),o=K(e,`contentElement`);return(0,x.useEffect)(()=>{let e=a;if(!e)return;let t=o;t&&(i||t.hasAttribute(`aria-label`)?r(void 0):e.id&&r(e.id))},[i,a,o]),n}var fh=G(function({store:e,alwaysVisible:t,composite:n,...r}){let i=sh();e||=i,Xo(e,!1);let a=e.parent,o=e.menubar,s=!!a,c=qs(r.id),l=r.onKeyDown,u=K(e,e=>e.placement.split(`-`)[0]),d=K(e,e=>e.orientation===`both`?void 0:e.orientation),f=d!==`vertical`,p=K(o,e=>!!e&&e.orientation!==`vertical`),m=H(t=>{if(l?.(t),!t.defaultPrevented){if(s||o&&!f){let n={ArrowRight:()=>u===`left`&&!f,ArrowLeft:()=>u===`right`&&!f,ArrowUp:()=>u===`bottom`&&f,ArrowDown:()=>u===`top`&&f}[t.key];if(n?.())return t.stopPropagation(),t.preventDefault(),e?.hide()}if(o){let e={ArrowRight:()=>{if(p)return o.next()},ArrowLeft:()=>{if(p)return o.previous()},ArrowDown:()=>{if(!p)return o.next()},ArrowUp:()=>{if(!p)return o.previous()}}[t.key],n=e?.();n!==void 0&&(t.stopPropagation(),t.preventDefault(),o.move(n))}}});r=Qs(r,t=>(0,L.jsx)(lh,{value:e,children:t}),[e]);let h=dh({store:e,...r}),g=lu(K(e,`mounted`),r.hidden,t),_=g?{...r.style,display:`none`}:r.style;r={"aria-labelledby":h,hidden:g,...r,id:c,ref:Ks(c?e.setContentElement:null,r.ref),style:_,onKeyDown:m};let v=!!e.combobox;return n??=!v,n&&(r={role:`menu`,"aria-orientation":d,...r}),r=ql({store:e,composite:n,...r}),r=Zm({store:e,typeahead:!v,...r}),r});U(function(e){return W(uh,fh(e))});var ph=`div`,mh=G(function({store:e,modal:t=!1,portal:n=!!t,hideOnEscape:r=!0,autoFocusOnShow:i=!0,hideOnHoverOutside:a,alwaysVisible:o,...s}){let c=sh();e||=c,Xo(e,!1);let l=(0,x.useRef)(null),u=e.parent,d=e.menubar,f=!!u,p=!!d&&!f,m=f?!1:t;s={...s,ref:Ks(l,s.ref)};let{"aria-labelledby":h,...g}=fh({store:e,alwaysVisible:o,...s});s=g;let[_,v]=(0,x.useState)(),y=K(e,`autoFocusOnShow`),b=K(e,`initialFocus`),S=K(e,`baseElement`),C=K(e,`renderedItems`);(0,x.useEffect)(()=>{let e=!1;return v(t=>{if(e)return;if(m&&t?.current?.isConnected)return t;if(!y)return;let n;switch(b){case`first`:n=C.find(e=>!e.disabled&&e.element)?.element||null;break;case`last`:n=[...C].reverse().find(e=>!e.disabled&&e.element)?.element||null;break;default:n=S}if(n&&n===t?.current)return t;let r=(0,x.createRef)();return r.current=n,r}),()=>{e=!0}},[e,m,y,b,C,S]);let w=!!i,T=!!_||!!s.initialFocus||!!m,E=K(e.combobox||e,`contentElement`),D=K(u?.combobox||u,`contentElement`),O=(0,x.useMemo)(()=>{if(!D||!E)return;let e=E.getAttribute(`role`),t=D.getAttribute(`role`);if(!((t===`menu`||t===`menubar`)&&e===`menu`))return D},[E,D]);return O!==void 0&&(s={preserveTabOrderAnchor:O,...s}),s=mm({store:e,alwaysVisible:o,initialFocus:_,autoFocusOnShow:w?T&&i:y||!!m,...s,hideOnEscape(t){return Qo(r,t)?!1:(e?.hideAll(),!0)},hideOnHoverOutside(t){let n=e?.getState().disclosureElement;return(typeof a==`function`?a(t):a??(f?!0:p?n?!qc(n):!0:!1))?t.defaultPrevented||!f||!n||(Ns(n,`mouseout`,t),!qc(n))?!0:(requestAnimationFrame(()=>{qc(n)||e?.hide()}),!1):!1},modal:m,portal:n,backdrop:f?!1:s.backdrop}),s={"aria-labelledby":h,...s},s}),hh=nf(U(function(e){return W(ph,mh(e))}),sh),gh=`button`;function _h(e,t){return{ArrowDown:t===`bottom`||t===`top`?`first`:!1,ArrowUp:t===`bottom`||t===`top`?`last`:!1,ArrowRight:t===`right`?`first`:!1,ArrowLeft:t===`left`?`first`:!1}[e.key]}function vh(e,t){return!!e?.some(e=>!e.element||e.element===t?!1:e.element.getAttribute(`aria-expanded`)===`true`)}var yh=G(function({store:e,focusable:t,accessibleWhenDisabled:n,showOnHover:r,...i}){let a=sh();e||=a,Xo(e,!1);let o=(0,x.useRef)(null),s=e.parent,c=e.menubar,l=!!s,u=!!c&&!l,d=$o(i),f=e=>d||es(e),p=()=>{let t=o.current;t&&(e?.setDisclosureElement(t),e?.setAnchorElement(t),e?.show())},m=i.onFocus,h=H(t=>{if(m?.(t),f(t.currentTarget)||t.defaultPrevented||(e?.setAutoFocusOnShow(!1),e?.setActiveId(null),!c)||!u)return;let{items:n}=c.getState();vh(n,t.currentTarget)&&p()}),g=K(e,e=>e.placement.split(`-`)[0]),_=i.onKeyDown,v=H(t=>{if(_?.(t),f(t.currentTarget)||t.defaultPrevented)return;let n=_h(t,g);n&&(t.preventDefault(),p(),e?.setAutoFocusOnShow(!0),e?.setInitialFocus(n))}),y=i.onClick,b=H(t=>{if(y?.(t),t.defaultPrevented||!e)return;let n=!t.detail,{open:r}=e.getState();(!r||n)&&((!l||n)&&e.setAutoFocusOnShow(!0),e.setInitialFocus(n?`first`:`container`)),l&&p()});i=Qs(i,t=>(0,L.jsx)(ch,{value:e,children:t}),[e]),l&&(i={...i,render:(0,L.jsx)(Kd.div,{render:i.render})});let S=qs(i.id),C=K(s?.combobox||s,`contentElement`);return i={role:l||u?bs(C,`menuitem`):void 0,"aria-haspopup":ys(K(e,`contentElement`),`menu`),...i,id:S,ref:Ks(o,i.ref),onFocus:h,onKeyDown:v,onClick:b},i=gm({store:e,focusable:t,accessibleWhenDisabled:n,...i,showOnHover:e=>{if(!(()=>{if(typeof r==`function`)return r(e);if(r!=null)return r;if(l)return!0;if(!c)return!1;let{items:t}=c.getState();return u&&vh(t)})())return!1;let t=u?c:s;return t&&t.setActiveId(e.currentTarget.id),!0}}),i=Pm({store:e,toggleOnClick:!l,focusable:t,accessibleWhenDisabled:n,...i}),i=Zm({store:e,typeahead:u,...i}),i}),bh=U(function(e){return W(gh,yh(e))}),xh=`div`;function Sh(e,t,n){if(!e)return!1;if(qc(e))return!0;let r=(t?.find(e=>e.element===n?!1:e.element?.getAttribute(`aria-expanded`)===`true`)?.element)?.getAttribute(`aria-controls`);if(!r)return!1;let i=V(e).getElementById(r);return i?qc(i)?!0:!!i.querySelector(`[role=menuitem][aria-expanded=true]`):!1}var Ch=G(function({store:e,hideOnClick:t=!0,preventScrollOnKeyDown:n=!0,focusOnHover:r,blurOnHoverEnd:i,...a}){let o=oh(!0),s=Cm();e=e||o||s,Xo(e,!1);let c=a.onClick,l=Zs(t),u=`hideAll`in e?e.hideAll:void 0,d=!!u,f=H(e=>{c?.(e),!e.defaultPrevented&&(Ms(e)||js(e)||u&&e.currentTarget.getAttribute(`aria-haspopup`)!==`menu`&&l(e)&&u())});return a={role:bs(K(e,e=>`contentElement`in e?e.contentElement:null),`menuitem`),...a,onClick:f},a=J({store:e,preventScrollOnKeyDown:n,...a}),a=rh({store:e,...a,focusOnHover(t){if(!e||!(typeof r==`function`?r(t):r??!0))return!1;let{baseElement:n,items:i}=e.getState();return d?(t.currentTarget.hasAttribute(`aria-expanded`)&&t.currentTarget.focus(),!0):Sh(n,i,t.currentTarget)?(t.currentTarget.focus(),!0):!1},blurOnHoverEnd(e){return typeof i==`function`?i(e):i??d}}),a}),wh=lc(U(function(e){return W(xh,Ch(e))}));function Th({combobox:e,parent:t,menubar:n,...r}={}){let i=!!n&&!t,a=Dl(r.store,El(t,[`values`]),Tl(e,[`arrowElement`,`anchorElement`,`contentElement`,`popoverElement`,`disclosureElement`])),o=a.getState(),s=Nu({...r,store:a,orientation:B(r.orientation,o.orientation,`vertical`)}),c=ym({...r,store:a,placement:B(r.placement,o.placement,`bottom-start`),timeout:B(r.timeout,o.timeout,i?0:150),hideTimeout:B(r.hideTimeout,o.hideTimeout,0)}),l=yl({...s.getState(),...c.getState(),initialFocus:B(o.initialFocus,`container`),values:B(r.values,o.values,r.defaultValues,{})},s,c,a);return bl(l,()=>Cl(l,[`mounted`],e=>{e.mounted||l.setState(`activeId`,null)})),bl(l,()=>Cl(t,[`orientation`],e=>{l.setState(`placement`,e.orientation===`vertical`?`right-start`:`bottom-start`)})),{...s,...c,...l,combobox:e,parent:t,menubar:n,hideAll:()=>{c.hide(),t?.hideAll()},setInitialFocus:e=>l.setState(`initialFocus`,e),setValues:e=>l.setState(`values`,e),setValue:(e,t)=>{e!==`__proto__`&&e!==`constructor`&&(Array.isArray(e)||l.setState(`values`,n=>{let r=n[e],i=Vo(t,r);return i===r?n:{...n,[e]:i!==void 0&&i}}))}}}function Eh(e,t,n){return Ys(t,[n.combobox,n.parent,n.menubar]),Ml(e,n,`values`,`setValues`),Object.assign(bm(Pu(e,t,n),t,n),{combobox:n.combobox,parent:n.parent,menubar:n.menubar})}function Dh(e={}){let t=ah(),n=Sm(),r=Iu();e={...e,parent:e.parent===void 0?t:e.parent,menubar:e.menubar===void 0?n:e.menubar,combobox:e.combobox===void 0?r:e.combobox};let[i,a]=Nl(Th,e);return Eh(i,a,e)}function Oh(e={}){return(0,L.jsx)(ch,{value:Dh(e),children:e.children})}var kh=`hr`,Ah=G(function({store:e,...t}){let n=ah();return e||=n,t=Bu({store:e,...t}),t}),jh=U(function(e){return W(kh,Ah(e))}),Mh={root:`_0bZjG`,inputContainer:`f-ccT`,input:`BQJSS`,startAdornment:`pFIPb`,endAdornment:`MBy3g`},Nh={legend:`BjkL4`,label:`IogM9`,errorText:`iCPgd`,textErrorMessage:`_1r4K2`,helperText:`aW7kV`,fieldSet:`LwRcp`};function Ph({error:e,className:t,...n}){return(0,L.jsx)(`fieldset`,{...n,className:(0,R.default)(Nh.fieldSet,e&&Nh.hasError,t)})}function Fh({error:e,className:t,...n}){return(0,L.jsx)(`div`,{...n,className:(0,R.default)(Nh.helperText,e&&Nh.hasError,t)})}function Ih({error:e,className:t,...n}){return(0,L.jsx)(`label`,{...n,className:(0,R.default)(Nh.label,e&&Nh.hasError,t)})}function Lh({error:e,className:t,...n}){return(0,L.jsx)(`div`,{...n,className:(0,R.default)(Nh.legend,e&&Nh.hasError,t)})}function Rh({className:e,...t}){return(0,L.jsx)(`p`,{...t,className:(0,R.default)(Nh.errorText,Nh.textErrorMessage,e)})}var zh=Ba(function({as:e=`input`,label:t,disabled:n,error:r,hint:i,size:a,multiline:o,startAdornment:s,endAdornment:c,id:l,style:u,className:d,inputClassName:f,ref:p,wrapperRef:m,...h}){let g=e===`input`?o?`textarea`:`input`:e,_=(0,x.useId)(),v=l||_;return(0,L.jsxs)(`div`,{className:(0,R.default)(Mh.root,d),style:{maxWidth:a,...u},"data-error":!!r,"aria-disabled":!!n,id:l?`${l}-container`:void 0,ref:m,children:[t&&(0,L.jsx)(Ih,{htmlFor:v,children:t}),i&&(0,L.jsx)(Fh,{id:`${v}_hint`,children:i}),(0,L.jsxs)(`div`,{className:(0,R.default)(Mh.inputContainer),children:[s&&(0,L.jsx)(`div`,{className:Mh.startAdornment,children:s}),(0,L.jsx)(g,{ref:p,disabled:n,id:v,...h,"aria-describedby":(0,R.default)(h[`aria-describedby`],!!i&&`${v}_hint`,!!r&&`${v}_error`),"aria-invalid":!!r,className:(0,R.default)(Mh.input,f)}),c&&(0,L.jsx)(`div`,{className:Mh.endAdornment,children:c})]}),r&&(0,L.jsx)(Rh,{id:`${v}_error`,role:`alert`,children:r})]})});function Bh({value:e,ref:t,wrapperRef:n,...r}){let i=(0,x.useRef)(void 0),a=Ha(t,i),o=()=>{Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set?.call(i.current,``);let e=new Event(`input`,{bubbles:!0});i.current?.dispatchEvent(e)},s=e=>{e.key===`Escape`&&o(),r.onKeyDown?.(e)},c=(e??``).length>0;return(0,L.jsx)(zh,{ref:a,wrapperRef:n,...r,type:`search`,onKeyDown:s,value:e,startAdornment:(0,L.jsx)(va,{size:24,style:{marginTop:6}}),endAdornment:(0,L.jsx)(`button`,{type:`button`,onClick:o,tabIndex:-1,style:{marginTop:6,opacity:+!!c,pointerEvents:c?void 0:`none`},children:(0,L.jsx)(Ca,{size:32,style:{opacity:.75}})})})}function Vh(e,t){let[n,r]=(0,x.useState)(e),i=(0,x.useRef)(Date.now());return(0,x.useEffect)(()=>{let n=setTimeout(()=>{Date.now()-i.current>=t&&(r(e),i.current=Date.now())},t-(Date.now()-i.current));return()=>{clearTimeout(n)}},[e,t]),n}var Hh={root:`hhIFY`,button:`LYR4G`,value:`afH1B`,numberInput:`MdvMX`};function Uh({id:e,name:t,value:n,defaultValue:r,onChange:i,min:a=-1/0,max:o=1/0,step:s=1,disabled:c,error:l,className:u,style:d,onFocus:f,decreaseIcon:p,increaseIcon:m,...h}){let g=n!==void 0,_=(0,x.useRef)(null),[v,y]=(0,x.useState)((g?n:r)??``);g&&n!==v&&y(n);let b=Number(o),S=Number(a),C=Number(s),w=e=>{let n=Gh(e,S,b);y(n);let r=new Event(`change`),a={writable:!1,value:{name:t,value:n}};Object.defineProperty(r,`target`,a),Object.defineProperty(r,`currentTarget`,a),i?.(r)},T=e=>{let t=Number(v)||0;e.key===`Home`?(e.preventDefault(),w(`${S}`)):e.key===`End`&&b<1/0?(e.preventDefault(),w(`${b}`)):e.key===`ArrowUp`?(e.preventDefault(),w(`${t+C}`)):e.key===`ArrowDown`&&(e.preventDefault(),w(`${t-C}`))},E=e=>{w(e.target.value)},D=e=>()=>{w((Number(v)||0)+e),Wh()||_.current?.focus()};return(0,L.jsxs)(`div`,{className:(0,R.default)(Hh.root,u),"aria-valuenow":Number(n||0),"aria-valuemin":S===-1/0?void 0:S,"aria-valuemax":b===1/0?void 0:b,tabIndex:-1,style:d,"aria-invalid":!!l,"aria-disabled":!!c,id:e?`${e}-container`:void 0,children:[(0,L.jsx)(`button`,{type:`button`,onClick:D(-C),className:(0,R.default)(Hh.button),disabled:c||Number(v||0)<=S,"aria-label":`Decrease`,tabIndex:-1,children:p??(0,L.jsx)(ya,{})}),(0,L.jsx)(`input`,{ref:_,id:e,role:`spinbutton`,type:`tel`,inputMode:`numeric`,pattern:`[0-9]*`,className:(0,R.default)(Hh.value,Hh.numberInput),name:t,min:S,max:b,value:v,onChange:E,onKeyDown:T,disabled:c,onFocus:e=>{_.current?.select(),f?.(e)},...h}),(0,L.jsx)(`button`,{type:`button`,onClick:D(C),className:Hh.button,disabled:c||Number(v||0)>=b,"aria-label":`Increase`,tabIndex:-1,children:m??(0,L.jsx)(Aa,{})})]})}function Wh(){try{return document.createEvent(`TouchEvent`),!0}catch{return!1}}function Gh(e,t,n){let r=typeof e==`string`?parseFloat(e):e;return e===`-`?e:isNaN(r)?``:Math.max(t,Math.min(n,r))}var Kh={backdrop:`JKTsp`,dialog:`hTxsM`,header:`Y-99i`,withTitle:`_51P42`,title:`GprBx`,content:`G5k-W`,closeButton:`xWVnm`,footer:`NGZT3`};function qh({title:e,isOpen:t=!0,onDismiss:n,initialFocusRef:r,className:i,style:a,children:o,hideOnInteractOutside:s}){let c=s??!!n;return(0,L.jsxs)(rf,{initialFocus:r,open:t,onClose:()=>n?.(),backdrop:(0,L.jsx)(`div`,{className:Kh.backdrop}),modal:!0,hideOnInteractOutside:c,hideOnEscape:!!n,className:(0,R.default)(Kh.dialog,Kh.withTitle,i),style:{"--transition-opacity":1,...a},children:[(0,L.jsxs)(`header`,{className:(0,R.default)(Kh.header,Kh.withTitle),children:[e&&(0,L.jsx)(Hm,{className:Kh.title,children:e}),(0,L.jsx)(Lm,{className:Kh.closeButton,style:{display:n?void 0:`none`},children:(0,L.jsx)(Ca,{})})]}),(0,L.jsx)(`section`,{className:(0,R.default)(Kh.content,Kh.withTitle),children:o})]})}qh.Footer=({children:e})=>(0,L.jsx)(`footer`,{className:Kh.footer,children:e});var Jh={menuButton:`uQnDM`,list:`_5sdh-`,listItem:`cYlZh`,separator:`WSXYE`};function Yh({items:e,label:t=`Menu`,buttonProps:n={},arrow:r=!0}){let{className:i,style:a}=Do(n);return(0,L.jsxs)(Oh,{children:[(0,L.jsx)(bh,{className:(0,R.default)(Jh.menuButton,i),style:a,children:(0,L.jsxs)(`span`,{className:`dmk-text-with-icon`,children:[t,r&&(0,L.jsx)(Da,{className:`dmk-margin-left-xxs`})]})}),(0,L.jsx)(hh,{className:Jh.list,children:e.map(({action:e,label:t,selected:n,separator:r},i)=>r?(0,L.jsx)(jh,{className:Jh.separator},i):(0,L.jsxs)(wh,{onClick:e,className:Jh.listItem,disabled:!e,children:[t,` `,n&&(0,L.jsx)(wa,{})]},i))})]})}var Xh=class extends x.Component{constructor(){super(...arguments),this.state={error:null},this.resetErrorBoundary=()=>{this.props.onReset?.(),this.setState({error:null})}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){return this.state.error?(0,x.isValidElement)(this.props.fallback)?this.props.fallback:typeof this.props.fallback==`function`?this.props.fallback({error:this.state.error,resetErrorBoundary:this.resetErrorBoundary}):null:this.props.children}};Xh.defaultProps={fallback:(0,L.jsx)(`div`,{className:`dmk-padding-m`,children:(0,L.jsx)(Ja,{intent:`error`,title:`Error`,children:(0,L.jsx)(`p`,{children:`An error occurred`})})}),onError:(e,t)=>console.error(e,t)};var Zh={root:`j5ZL9`,hamburgerButton:`wJ6xF`};function Qh({open:e=!1,className:t,...n}){return(0,L.jsx)(`button`,{type:`button`,...n,className:(0,R.default)(Zh.root,t),"data-open":e,children:(0,L.jsxs)(`div`,{className:Zh.hamburgerButton,children:[(0,L.jsx)(`span`,{}),(0,L.jsx)(`span`,{}),(0,L.jsx)(`span`,{}),(0,L.jsx)(`span`,{})]})})}var $h=e=>{if(e.trim()===``)return``;let t=parseFloat(e.replace(/[^0-9,.]/g,``));return isNaN(t)?``:t},eg=Ba(({value:e,onChange:t,onBlur:n,min:r,max:i,...a})=>{let o=+(r??0),s=+(i||2**53-1),[c,l]=(0,x.useState)(e??``),u=(0,x.useRef)(null);return(0,x.useEffect)(()=>{e!=null&&l(`${e}`)},[e]),(0,L.jsx)(zh,{type:`tel`,inputMode:`numeric`,pattern:`[0-9]*`,autoComplete:`off`,value:c,onChange:e=>{let n=e.currentTarget.value;l(n);let r=$h(n);u.current=r;let i=new Event(`change`);Object.defineProperty(i,`target`,{writable:!1,value:{name:e.target.name,value:`${r}`}}),t?.(i)},onBlur:e=>{typeof u.current==`number`?l(`${u.current}`):l(``),n?.(e)},min:o,max:s,...a})}),tg={root:`_2NpgS`,radio:`qytUm`,input:`_9AxBc`,radioGroup:`xYP4R`},ng=Ba(function({as:e=og,name:t,value:n,onChange:r,disabled:i,children:a,error:o,variant:s=`normal`,...c}){return(0,L.jsx)(rg,{value:(0,x.useMemo)(()=>({name:t,disabled:i,isChecked:e=>n===e,onChange:r}),[t,n,r,i]),children:(0,L.jsx)(e,{role:`radiogroup`,"data-radio-group":t,"data-variant":s,...c,"data-error":!!o,"aria-disabled":!!i,className:(0,R.default)(tg.radioGroup,c.className),children:a})})}),rg=Ua(`RadioGroupContext`,null);function ig({children:e,className:t,style:n,error:r,...i}){let a=ag(i);return(0,L.jsxs)(`label`,{className:(0,R.default)(tg.root,t),"data-checked":a.checked,"data-error":r,"aria-disabled":a.disabled,style:n,children:[(0,L.jsx)(`input`,{...i,className:(0,R.default)(`dmk-visually-hidden`,tg.input),"aria-checked":a.checked,"aria-invalid":r?`true`:`false`,type:`radio`,...a}),(0,L.jsx)(`span`,{className:tg.radio,"aria-hidden":`true`}),(0,L.jsx)(`span`,{children:typeof e==`function`?e(a.checked):e})]})}function ag(e){let t=(0,x.use)(rg);return t==null?e:{value:e.value,name:t.name,checked:t.isChecked(e.value),disabled:t.disabled,onChange:t.onChange}}var og=Ba(function(e){return(0,L.jsx)(Io,{spacing:`s`,...e})}),sg={root:`piq-R`,sidebar:`Og3fR`,mobile:`muuLM`,overlay:`xZmuk`,header:`JYx2J`,contentContainer:`_5UdA1`,content:`xV9Cb`,sidebarMenuItem:`xAYHd`,sidebarSectionHeading:`tt-vd`,sidebarSectionHeader:`_4VfZO`,arrow:`H1UKZ`,open:`udBU-`};function cg(e=!1){let[t,n]=(0,x.useState)(e),r=(0,x.useCallback)(()=>n(e=>!e),[]),i=(0,x.useCallback)(()=>n(!0),[]),a=(0,x.useCallback)(()=>n(!1),[]);return(0,x.useMemo)(()=>({value:t,toggle:r,enable:i,disable:a}),[t,r,i,a])}function lg(e){let t=(0,x.useRef)(void 0);return Za(()=>{t.current=e},[e]),t.current}var ug=(0,x.createContext)(null);function dg(){let e=(0,x.use)(ug);if(e==null)throw Error(`MenuOpenContext not available`);return e}function fg({header:e,sidebar:t,children:n,className:r,maxWidth:i,headerHeight:a,style:o}){let s=jo([!0,!1,!1]),c=cg(!s),l=lg(c.value);return Za(()=>{!s&&!l?c.enable():s&&l&&c.disable()},[s,c,l]),(0,L.jsx)(ug,{value:c,children:(0,L.jsxs)(`div`,{className:(0,R.default)(sg.root,r,s&&sg.mobile),style:{"--max-width":i,"--header-height":a,...o},children:[e,s&&c.value&&(0,L.jsx)(`div`,{className:sg.overlay,onClick:c.disable}),(0,L.jsxs)(`aside`,{className:(0,R.default)(sg.sidebar,s&&sg.mobile),"data-open":c.value,children:[s&&(0,L.jsx)(Io,{horizontal:!0,justifyContent:`flex-end`,className:`dmk-margin-bottom-l`,children:(0,L.jsx)(pg,{})}),t]}),(0,L.jsx)(`main`,{className:(0,R.default)(sg.contentContainer,s&&sg.mobile),children:(0,L.jsx)(`div`,{className:sg.content,children:n})})]})})}function pg(){let e=dg();return(0,L.jsx)(Qh,{open:e.value,onClick:e.toggle})}function mg({logo:e,children:t,className:n,style:r}){let i=jo([!0,!1,!1]);return(0,L.jsxs)(Io,{horizontal:[!1,!0,!0],justifyContent:`space-between`,alignItems:`center`,className:(0,R.default)(sg.header,i&&sg.mobile,n),style:r,children:[(0,L.jsxs)(Io,{horizontal:!0,alignItems:`center`,justifyContent:`space-between`,children:[i&&(0,L.jsx)(pg,{}),e]}),t]})}var hg=Ba(function({as:e=`a`,onClick:t,className:n,children:r,...i}){let a=dg(),o=jo([!0,!1,!1]);return(0,L.jsx)(e,{...i,className:(0,R.default)(sg.sidebarMenuItem,n),draggable:!1,onClick:e=>{t?.(e),!e.defaultPrevented&&o&&a.disable()},children:(0,L.jsx)(`span`,{children:r})})}),gg={root:`ScOVn`,selectContainer:`o18SG`,arrow:`LsR6O`,select:`f1zqA`,hint:`_1hf0-`};function _g(e){return ha({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`},child:[{tag:`path`,attr:{fillRule:`evenodd`,d:`M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z`,clipRule:`evenodd`},child:[]}]})(e)}function vg(e){return ha({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`},child:[{tag:`path`,attr:{fillRule:`evenodd`,d:`M11.47 2.47a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06l-6.22-6.22V21a.75.75 0 0 1-1.5 0V4.81l-6.22 6.22a.75.75 0 1 1-1.06-1.06l7.5-7.5Z`,clipRule:`evenodd`},child:[]}]})(e)}function yg(e){return ha({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`},child:[{tag:`path`,attr:{fillRule:`evenodd`,d:`M12 2.25a.75.75 0 0 1 .75.75v16.19l6.22-6.22a.75.75 0 1 1 1.06 1.06l-7.5 7.5a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 1 1 1.06-1.06l6.22 6.22V3a.75.75 0 0 1 .75-.75Z`,clipRule:`evenodd`},child:[]}]})(e)}function bg({style:e,className:t,error:n,hint:r,label:i,value:a,disabled:o,children:s,placeholder:c,id:l,ref:u,...d}){let f=(0,x.useId)(),p=l||f;return(0,L.jsxs)(`div`,{className:(0,R.default)(gg.root,t),"data-error":!!n,"aria-disabled":!!o,style:e,children:[i&&(0,L.jsx)(Ih,{htmlFor:p,children:i}),r&&(0,L.jsx)(`div`,{className:gg.hint,id:`${p}_hint`,children:r}),(0,L.jsxs)(`div`,{className:(0,R.default)(gg.selectContainer),children:[(0,L.jsxs)(`select`,{id:p,ref:u,...d,disabled:o,value:a===null?``:a,className:(0,R.default)(gg.select),"aria-invalid":!!n,"aria-describedby":(0,R.default)(d[`aria-describedby`],!!r&&`${p}_hint`,!!n&&`${p}_error`),children:[c&&(0,L.jsx)(`option`,{value:``,children:c}),s]}),(0,L.jsx)(`div`,{className:gg.arrow,"aria-hidden":!0,role:`presentation`,children:(0,L.jsx)(_g,{})})]}),n&&(0,L.jsx)(Rh,{role:`alert`,id:`${p}_error`,children:n})]})}var xg={visuallyHidden:`zZoQC`},Sg=Ba(function({as:e=`div`,className:t,ref:n,...r}){return(0,L.jsx)(e,{ref:n,...r,className:(0,R.default)(xg.visuallyHidden,t)})}),Cg={root:`_7x-oj`,scrollableContainer:`Sc0YX`,sortPrioIndicator:`tKRSW`},wg=[10,20,50,100];function Tg({limit:e,onLimitChange:t,page:n,onPageChange:r,total:i,limits:a=wg}){let o=Math.ceil(i/Math.max(1,e)),s=e*(Math.max(1,n)-1);return(0,L.jsxs)(Io,{horizontal:!0,alignItems:`center`,children:[(0,L.jsx)(Uh,{name:`page`,value:n,onChange:e=>r(+e.currentTarget.value||1),min:1,max:o,decreaseIcon:(0,L.jsx)(Oa,{}),increaseIcon:(0,L.jsx)(Ea,{})}),(0,L.jsxs)(`span`,{style:{whiteSpace:`nowrap`},children:[(0,L.jsx)(`span`,{className:`dmk-text-semibold`,children:s+1}),` to`,` `,(0,L.jsx)(`span`,{className:`dmk-text-semibold`,children:Math.min(s+e,i)}),` `,`of `,(0,L.jsx)(`span`,{className:`dmk-text-semibold`,children:i})]}),(0,L.jsx)(`div`,{className:`dmk-margin-left-auto`,children:(0,L.jsx)(Yh,{label:`${e} per page`,items:a.map(n=>({label:`${n} per page`,action:()=>t(n),selected:n===e})),buttonProps:{variant:`text`,size:`s`}})})]})}var Eg=365.2425,Dg=6e4,Og=36e5,kg=3600*24;kg*7,kg*Eg/12*3;var Ag=Symbol.for(`constructDateFrom`);function jg(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&Ag in e?e[Ag](t):e instanceof Date?new e.constructor(t):new Date(t)}function Mg(e,t){return jg(t||e,e)}function Ng(e,t){let n=Mg(e)-+Mg(t);return n<0?-1:n>0?1:n}function Pg(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function Fg(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}function Ig(e,t){let n=Mg(e,t?.in);if(isNaN(+n))throw RangeError(`Invalid time value`);let r=t?.format??`extended`,i=t?.representation??`complete`,a=``,o=``,s=r===`extended`?`-`:``,c=r===`extended`?`:`:``;if(i!==`time`){let e=Fg(n.getDate(),2),t=Fg(n.getMonth()+1,2);a=`${Fg(n.getFullYear(),4)}${s}${t}${s}${e}`}if(i!==`date`){let e=n.getTimezoneOffset();if(e!==0){let t=Math.abs(e),n=Fg(Math.trunc(t/60),2),r=Fg(t%60,2);o=`${e<0?`+`:`-`}${n}:${r}`}else o=`Z`;let t=Fg(n.getHours(),2),r=Fg(n.getMinutes(),2),i=Fg(n.getSeconds(),2),s=a===``?``:`T`,l=[t,r,i].join(c);a=`${a}${s}${l}${o}`}return a}function Lg(e,t){let n=()=>jg(t?.in,NaN),r=t?.additionalDigits??2,i=Hg(e),a;if(i.date){let e=Ug(i.date,r);a=Wg(e.restDateString,e.year)}if(!a||isNaN(+a))return n();let o=+a,s=0,c;if(i.time&&(s=Kg(i.time),isNaN(s)))return n();if(i.timezone){if(c=Jg(i.timezone),isNaN(c))return n()}else{let e=new Date(o+s),n=Mg(0,t?.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return Mg(o+s+c,t?.in)}var Rg={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},zg=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Bg=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Vg=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Hg(e){let t={},n=e.split(Rg.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Rg.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Rg.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){let e=Rg.timezone.exec(r);e?(t.time=r.replace(e[1],``),t.timezone=e[1]):t.time=r}return t}function Ug(e,t){let n=RegExp(`^(?:(\\d{4}|[+-]\\d{`+(4+t)+`})|(\\d{2}|[+-]\\d{`+(2+t)+`})$)`),r=e.match(n);if(!r)return{year:NaN,restDateString:``};let i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function Wg(e,t){if(t===null)return new Date(NaN);let n=e.match(zg);if(!n)return new Date(NaN);let r=!!n[4],i=Gg(n[1]),a=Gg(n[2])-1,o=Gg(n[3]),s=Gg(n[4]),c=Gg(n[5])-1;if(r)return e_(t,s,c)?Yg(t,s,c):new Date(NaN);{let e=new Date(0);return!Qg(t,a,o)||!$g(t,i)?new Date(NaN):(e.setUTCFullYear(t,a,Math.max(i,o)),e)}}function Gg(e){return e?parseInt(e):1}function Kg(e){let t=e.match(Bg);if(!t)return NaN;let n=qg(t[1]),r=qg(t[2]),i=qg(t[3]);return t_(n,r,i)?n*Og+r*Dg+i*1e3:NaN}function qg(e){return e&&parseFloat(e.replace(`,`,`.`))||0}function Jg(e){if(e===`Z`)return 0;let t=e.match(Vg);if(!t)return 0;let n=t[1]===`+`?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return n_(r,i)?n*(r*Og+i*Dg):NaN}function Yg(e,t,n){let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var Xg=[31,null,31,30,31,30,31,31,30,31,30,31];function Zg(e){return e%400==0||e%4==0&&e%100!=0}function Qg(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Xg[t]||(Zg(e)?29:28))}function $g(e,t){return t>=1&&t<=(Zg(e)?366:365)}function e_(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function t_(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function n_(e,t){return t>=0&&t<=59}var r_=(e,t)=>e==null&&t==null?0:e==null?-1:t==null?1:typeof e==`string`&&typeof t==`string`?e.localeCompare(t):Pg(e)&&Pg(t)?Ng(e,t):typeof e==`number`&&typeof t==`number`?e-t:typeof e==`boolean`&&typeof t==`boolean`?e===t?0:e?1:-1:String(e).localeCompare(String(t)),i_=Symbol();function a_(e,t={},n=void 0,r=r_){let i=Ga(e),a=(e,r)=>{if(typeof e==`function`)return Ga(e(r));if(e===i_)return[r];if(typeof e==`string`&&typeof r==`object`&&r){let i=e.at(0)===`-`?e.slice(1):e;return i in t?[t[i]?.(r,n)]:[r[i]]}return[r]};return function(e){return e.slice().sort((e,t)=>{if(i.length===0)return r(e,t);for(let n of i){let i=a(n,e),o=a(n,t);for(let e=0;e<i.length;e++){let t=i[e],a=o[e];if(t==null&&a==null)continue;if(t==null)return 1;if(a==null)return-1;let s=r(t,a);if(s!==0)return typeof n==`string`&&n.at(0)===`-`?s*-1:s}}return 0})}}function o_({multi:e=!0,keys:t}={}){function n(t,n){if(n.column==null)return[];let r=`-${String(n.column)}`;return t.includes(r)?t.filter(e=>e!==r):t.includes(n.column)?t.map(e=>e===n.column?r:e):!e||!n.shiftKey?[n.column]:t.concat([n.column])}return{multi:e,keys:t,sortReducer:n}}var s_=[];function c_(e,t={}){let[n,r]=(0,x.useReducer)(e.sortReducer,t.initialSortingColumns??s_),i=(0,x.useMemo)(()=>a_(n,e.keys,t.context),[n,e.keys,t.context]);function a(e){let t=n.length>1,r;return(r=n.indexOf(e))>-1?(0,L.jsx)(l_,{direction:`asc`,priority:t?r+1:null}):(r=n.indexOf(`-${String(e)}`))>-1?(0,L.jsx)(l_,{direction:`desc`,priority:t?r+1:null}):(0,L.jsx)(l_,{})}function o(e,t){return(0,L.jsxs)(L.Fragment,{children:[t??e,` `,a(e)]})}function s(e,t){return{"data-sortable":!0,onClick:t=>{r({column:e,shiftKey:t.shiftKey})},children:o(e,t)}}return{sortColumns:n,toggleSortColumn:r,sorted:i,getThProps:s}}function l_({direction:e,priority:t}){return e==null?(0,L.jsx)(_g,{className:`dmk-text-muted`}):(0,L.jsxs)(L.Fragment,{children:[e===`asc`?(0,L.jsx)(vg,{}):(0,L.jsx)(yg,{}),` `,t!=null&&(0,L.jsx)(`sup`,{className:Cg.sortPrioIndicator,children:t})]})}function u_(e){return(0,L.jsx)(`div`,{...e,className:(0,R.default)(Cg.scrollableContainer,e.className)})}function d_({ref:e,isPending:t,renderHeaderRow:n,renderRow:r,renderEmpty:i,renderFooter:a,items:o,caption:s,...c}){let l=(0,x.useRef)(null),u=Ha(e,l),[d,f]=(0,x.useState)(0);return(0,x.useLayoutEffect)(()=>{l.current&&f(l.current.querySelectorAll(`thead th`).length)}),(0,L.jsxs)(`table`,{ref:u,...c,className:(0,R.default)(Cg.root,c.className),children:[s&&(0,L.jsx)(Sg,{as:`caption`,children:s}),(0,L.jsx)(`thead`,{children:n()}),o&&o.length>0&&(0,L.jsx)(`tbody`,{children:(o||[]).map(r)}),(0,L.jsxs)(`tfoot`,{children:[t&&(0,L.jsx)(`tr`,{children:(0,L.jsx)(`td`,{"data-align":`center`,colSpan:d,children:(0,L.jsx)(Io,{horizontal:!0,spacing:`s`,justifyContent:`center`,alignItems:`center`,style:{height:100},children:(0,L.jsx)(no,{size:64})})})}),!t&&o&&o.length===0&&i?.({numColumns:d}),a?.({numColumns:d})]})]})}function f_(e,t){let n=(0,x.useRef)(e);Za(()=>{n.current=e},[e]),(0,x.useEffect)(()=>{if(!t&&t!==0)return;let e=setTimeout(()=>n.current(),t);return()=>clearTimeout(e)},[t])}var p_=Ua(`ToastContext`,null);function m_(e,t){switch(t.type){case`ADD`:return[...e,{_id:Date.now(),...t.payload}].slice(-5);case`REMOVE`:return e.filter(e=>e._id!==t.payload);default:return e}}function h_({children:e}){let[t,n]=(0,x.useReducer)(m_,[]),[r,i]=(0,x.useState)({}),a=(0,x.useCallback)(e=>{n({type:`ADD`,payload:e})},[]),o=e=>{n({type:`REMOVE`,payload:e}),i(t=>{let n={...t};return delete n[e],n})},s=e=>{let n=0;for(let i=0;i<e;i++){let e=t[i]._id;n+=(r[e]||0)+8}return n},c=(e,t)=>{i(n=>({...n,[e]:t}))};return(0,L.jsxs)(p_.Provider,{value:a,children:[e,(0,L.jsx)(`div`,{style:{position:`fixed`,top:0,zIndex:`var(--z-index-9)`,right:16,left:16,maxWidth:500,margin:`40px auto`,pointerEvents:`none`},children:t.map((e,t)=>(0,L.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,transform:`translateY(${s(t)}px)`,transition:`transform 200ms ease-out`,pointerEvents:`all`},children:(0,L.jsx)(v_,{onClose:()=>o(e._id),onHeight:t=>c(e._id,t),...e})},e._id))})]})}function g_(){let e=(0,x.use)(p_);if(e==null)throw Error();return e}function __({title:e,description:t,intent:n,duration:r,onClose:i}){let a=_o(),o=r??1e4,[s,c]=(0,x.useState)(!1),[l,u]=(0,x.useState)(o);return f_(()=>{c(!0)},l),(0,L.jsx)(`div`,{style:{boxShadow:a.shadows.elevation1.valueOf(),borderRadius:a.borderRadius.s,opacity:+!s,transition:`opacity 200ms ease-out`},onTransitionEnd:()=>{s&&i()},children:(0,L.jsx)(Ja,{title:e,intent:n||`success`,onClose:()=>c(!0),onMouseOver:()=>{u(null)},onMouseLeave:()=>{u(o)},children:t})})}function v_({onHeight:e,...t}){return(0,L.jsx)(`div`,{ref:(0,x.useCallback)(t=>{t&&requestAnimationFrame(()=>{let n=t.getBoundingClientRect().height;e(n)})},[e]),children:(0,L.jsx)(__,{...t})})}var y_={email:x_,date:S_,"date-time":S_},b_={"credit-card-number":C_};function x_(e){if(!e)return!1;let t=e.split(`@`);return!(t.length!==2||!t[1].includes(`.`)||t[0].substr(-1)===`.`)}function S_(e){if(!e)return!1;let t=Lg(e);return isNaN(t.getTime())?!1:Pg(t)}function C_(e){return typeof e==`string`?e.replace(/\D+/g,``):``}var w_=T_();function T_(e=0){let t=e,n=()=>++t;return n.reset=()=>t=0,n}function E_(e){return e.length===0?void 0:e[e.length-1]}function D_(e,t){if(!Array.isArray(t))return e;let n=new Set(t),r=new Set(e),i=[];for(let e of t)r.has(e)&&i.push(e);for(let t of e)n.has(t)||i.push(t);return i}function O_(e,t){if(!e)throw Error(`Invariant failed`)}function k_(e,t){if(!e){console.warn(t);try{throw Error(t)}catch{}}}function A_(e){return e}function j_(e){return e.type===`object`||!!e.properties||Array.isArray(e.required)||Array.isArray(e.allOf)||!!(e.if&&j_(e.if))}function M_(e,t=`schema must be of type object`){if(!e||!j_(e))throw Error(t)}function N_(e){return!!(e.type===`string`||typeof e.const==`string`||`anyOf`in e&&e.anyOf&&e.anyOf.every(e=>N_(e)&&typeof e.const==`string`))}function P_(e){return e.type===`number`}function F_(e){return e.type===`integer`}function I_(e){return e.type===`boolean`||typeof e.const==`boolean`}function L_(e){return e.type===`array`}function R_(e){return e.type===`null`}function z_(e,t){if(e.$bitiforms&&e.$bitiforms.widget){let n=e.$bitiforms.widget;if(!Object.prototype.hasOwnProperty.call(t,n))throw Error(`Unknown widget ${n}`);return t[n]}if(R_(e))return x.Fragment;if(L_(e))return N_(e.items)?t.CheckboxGroupWidget:t.ArrayWidget;if(j_(e))return t.ObjectWidget;if(I_(e))return t.CheckboxWidget;if(N_(e)){if(e.enum||e.oneOf||e.anyOf)return t.RadioGroupWidget;if(e.format&&e.format.startsWith(`date`))return t.DateWidget}return P_(e)||F_(e)?t.NumberWidget:t.TextInputWidget}function B_(e,t){let n=z_(e,t);if(n==null)throw Error(`Resolved widget is undefined for schema ${JSON.stringify(e)}`);return n}var V_={widgets:{},formats:y_,texts:{"wizard.next":`Continue`,"wizard.prev":`Go back`,"wizard.fixErrorsBeforeContinue":`Fix the errors above before continuing`,"errors.required":`Must be filled in`,"errors.radiogroup.required":`Select an element`,"errors.checkbox.required":`Must be checked`,"errors.minItems":`You must select at least {count}`,"errors.maxLength":`The maximum length is {maxLength}`,"errors.minLength":`The minimum length is {minLength}`,"errors.minimum":`Minimum value is {minimum}`,"errors.invalidFormat.email":`Not a valid email address`,"arrayfield.remove":`Remove item`,"arrayfield.add":`Add item`},resolveWidget:B_},H_=(0,x.createContext)(V_);H_.displayName=`FormConfigContext`;function U_(){return(0,x.useContext)(H_)}function W_({widgets:e=V_.widgets,texts:t=V_.texts,formats:n=V_.formats,resolveWidget:r=V_.resolveWidget,children:i}){let a=(0,x.useMemo)(()=>({widgets:{...V_.widgets,...e},texts:{...V_.texts,...t},formats:{...V_.formats,...n},resolveWidget:r}),[e,t,n,r]);return(0,L.jsx)(H_.Provider,{value:a,children:i})}var G_=(0,x.createContext)({});G_.displayName=`FormValuesContext`;var K_=(0,x.createContext)(!1);K_.displayName=`RevealErrorsContext`;function q_(){let e=(0,x.useContext)(K_),[t,n]=(0,x.useState)(!1),r=(0,x.useCallback)(()=>n(!0),[]);return(0,x.useEffect)(()=>{n(e)},[e]),{value:t,enable:r}}var J_=(0,x.createContext)(null);J_.displayName=`UpdateValuesContext`;function Y_(e){let t=(0,x.useContext)(J_);if(t==null)throw Error(`Not wrapped in UpdateValuesContext.Provider`);return(0,x.useCallback)(n=>t(e,n),[e,t])}var X_=(0,x.createContext)(null);X_.displayName=`FormRendererContext`;function Z_(e){return e==null?!1:Array.isArray(e)?e.length===0?!1:e.some(e=>Z_(e)):Q_(e)?!0:typeof e==`object`?Object.keys(e).some(t=>Z_(e[t])):typeof e==`string`}function Q_(e){return!!(e&&typeof e==`object`&&!Array.isArray(e)&&typeof e.message==`string`&&e.args)}function $_(e,t){return e.map(e=>Q_(e)?ev(t?.[e.message]??e.message,e.args):t?.[e]||e).join(`, `)}function ev(e,t){let n=Object.keys(t).join(`|`);return(e||``).replace(RegExp(`{(${n})}`,`g`),(e,n)=>t[n]??e)}var tv=y_;function nv({formats:e=tv}={}){function t(t,n,r){if(typeof t.const<`u`&&t.const!==n)return[rv(`errors.const`,t,{value:t.const})];let i=[];if(av(n))return r?(i.push(iv(`errors.required`,t)),i):[];let a=n.length;if(t.minLength&&a<t.minLength&&i.push(rv(`errors.minLength`,t,{minLength:t.minLength})),t.maxLength&&a>t.maxLength&&i.push(rv(`errors.maxLength`,t,{maxLength:t.maxLength})),t.enum&&!t.enum.includes(n)&&i.push(rv(`errors.oneOf`,t,{values:t.enum})),t.oneOf&&!t.oneOf.some(e=>!Z_(u(e,n,!0)))&&i.push(rv(`errors.oneOf`,t,{})),t.format){let r=t.format;k_(Object.prototype.hasOwnProperty.call(e,r),`${r} format validator is not implemented.`);let a=e[r];a!=null&&!a(n)&&i.push(iv(`errors.invalidFormat.${t.format}`,t))}return i}function n(e,t,n){if(typeof e.const<`u`&&e.const!==t)return[rv(`errors.const`,e,{value:e.const})];let r=[];return av(t)?n?(r.push(iv(`errors.required`,e)),r):[]:(e.enum&&!e.enum.includes(t)&&r.push(rv(`errors.oneOf`,e,{values:e.enum})),r)}function r(e,t,n){if(typeof e.const<`u`&&e.const!==t)return[rv(`errors.const`,e,{value:e.const})];let r=[];if(av(t)||isNaN(Number(t)))return n?(r.push(iv(`errors.required`,e)),r):[];let i=parseFloat(`${t}`);return e.minimum&&i<e.minimum&&r.push(rv(`errors.minimum`,e,{minimum:e.minimum})),e.maximum&&i>e.maximum&&r.push(rv(`errors.maximum`,e,{maximum:e.maximum})),r}function i(e,t,n){if(typeof e.const<`u`&&e.const!==t)return[rv(`errors.const`,e,{value:e.const})];let r=[];if(av(t)||isNaN(Number(t)))return n?(r.push(iv(`errors.required`,e)),r):[];let i=parseFloat(`${t}`);return Number.isInteger(i)||r.push(iv(`errors.notAnInteger`,e)),e.minimum&&i<e.minimum&&r.push(rv(`errors.minimum`,e,{minimum:e.minimum})),e.maximum&&i>e.maximum&&r.push(rv(`errors.maximum`,e,{maximum:e.maximum})),r}function a(e,t){let n={all:[],items:[]};if(e.minItems&&e.minItems>0&&(t||[]).length<e.minItems&&n.all.push(rv(`errors.minItems`,e,{count:e.minItems})),e.maxItems&&(t||[]).length>e.maxItems&&n.all.push(rv(`errors.maxItems`,e,{count:e.maxItems})),e.contains){let r=e.contains;(!Array.isArray(t)||t.every(e=>Z_(u(r,e,!1))))&&n.all.push(iv(`errors.notContains`,e))}return t&&t.length>0&&(n.items=t.map(t=>{let n=lv(e.items,t),r=u(n,t,!1);return j_(n)?{_id:t._id,...r}:r})),n}function o(e,t){let n=e.properties||{},r=Object.keys(n).reduce((r,i)=>(r[i]=u(n[i],(t||{})[i],(e.required||[]).includes(i)),r),{_all:[]});if(e.anyOf){let n=!1;for(let r of e.anyOf)if(!Z_(o(r,t))){n=!0;break}n||(r._all=[iv(`errors.anyOf`,e)])}return r}function s(e,t){return t==null?[]:[iv(`errors.shouldBeNull`,e)]}let c=new WeakMap,l=new WeakMap;function u(e,u,d){let f=t=>{let n=c.get(e);if(n!==void 0&&n===u)return l.get(e);let r=t();return c.set(e,u),l.set(e,r),r};if(j_(e))return o(e,u);if(N_(e))return f(()=>t(e,u,d));if(I_(e))return f(()=>n(e,u,d));if(P_(e))return f(()=>r(e,u,d));if(F_(e))return f(()=>i(e,u,d));if(L_(e))return a(e,u);if(R_(e))return s(e,u);throw Error(`validateSchema() got invalid schema ${JSON.stringify(e)}`)}function d(e,t){return u(e,t,!0)}return{validateSchema:d}}function rv(e,t,n){return{message:iv(e,t),args:n}}function iv(e,t){return t.$bitiforms?.errorMessages?.[e]||e}function av(e){return typeof e==`string`?e.trim()===``:e==null}var ov;function sv(){return ov??=nv().validateSchema,ov}function cv(e,t){if(!j_(e))throw Error(`Tried to evaluate an if that is not a ObjectSchema`);return!Z_(sv()(e,t))}function lv(e,t){let n=e.$bitiforms||{};if(j_(e)){let r={...e.properties||{}},i=[...e.required||[]];for(let e of Object.keys(r))r[e]=lv(r[e],(t||{})[e]);if(e.if){e.then!=null&&M_(e.then,`schemas using \`if\` should also have \`then\` of type object: ${JSON.stringify(e)}`);let n=cv(e.if,t)?e.then:e.else;k_(typeof n?.$bitiforms>`u`,`$bitiforms must not be set on branched schemas.
|
|
13
|
-
Got schema ${JSON.stringify(n,null,2)}`);let a=n==null?null:lv(n,t);a&&(M_(a,`then and else schemas must be object schemas: ${JSON.stringify(a,null,2)}`),a.required&&i.push(...a.required),Object.assign(r,a.properties))}if(e.allOf)for(let n of e.allOf){let e=lv(n,t);j_(e)&&(e.required&&i.push(...e.required),Object.assign(r,e.properties))}let a={type:`object`,properties:r,$bitiforms:n,required:[...new Set(i)]};return e.title&&(a.title=e.title),e.description&&(a.description=e.description),a}return e}function uv(e,t={}){let n=[];for(let r of e){let e=lv(r,t);dv(e)&&n.push(e)}return n}function dv(e){return!!(j_(e)&&e.properties&&Object.keys(e.properties).length>0)}function fv(e,t){if(Array.isArray(e))return uv(e,t);let n=Object.keys(e.properties||{}).length>0;if(Array.isArray(e.allOf)){let{allOf:r,...i}=e;return uv(n?[i].concat(r):r,t)}if(n)return uv([e],t);throw Error(`resolveBaseSchema() either takes an array of ObjectSchemas or an ObjectSchema with an .allOf property.`)}function pv(e){let t={type:`object`,properties:{}},n=[];for(let r of e)Object.assign(t.properties,r.properties),r.required&&n.push(...r.required);return n.length>0&&(t.required=[...new Set(n)]),t}function mv(e,t){if(j_(e)){let n=e.properties||{},r=t||hv(e);return{...r,...Object.keys(n).reduce((e,t)=>(e[t]=mv(n[t],r[t]),e),{})}}return L_(e)?j_(e.items)?(t||hv(e)).map(t=>{let n=t||hv(e.items);return{...n,_id:n._id==null?w_():n._id,...mv(lv(e.items,n),n)}}):(t||hv(e)).map(t=>mv(e.items,t)):Object.prototype.hasOwnProperty.call(e,`const`)?e.const:t??hv(e)}function hv(e){if(Object.prototype.hasOwnProperty.call(e,`default`))return e.default;if(j_(e))return{};if(N_(e))return``;if(I_(e)||P_(e)||F_(e)||R_(e))return null;if(L_(e))return[];throw Error(`getDefaultValue invalid schema ${JSON.stringify(e)}`)}function gv(e,t){if(j_(e)){let n=e.properties||{};return typeof t!=`object`||!t?{}:Object.keys(n).reduce((e,r)=>(e[r]=gv(n[r],t[r]),e),{})}return L_(e)?Array.isArray(t)?t.map(t=>gv(lv(e.items,t),t)):[]:N_(e)&&e.format&&b_[e.format]?b_[e.format](String(t)):t}var _v=(e,t,n)=>(e||[]).find(e=>e._id===t)||n;function vv({id:e,name:t,path:n,value:r,schema:i,errors:a,disabled:o,texts:s,renderAddButton:c,renderItem:l,renderContainer:u}){let[d]=(0,x.useState)(()=>T_(E_(r)?._id)),f=Y_(n),p=(0,x.useCallback)(()=>{f(e=>e.concat({_id:d(),...mv(lv(i.items,{}),{})}))},[d,i.items,f]),m=(0,x.useCallback)(e=>{f(t=>t.filter(t=>t._id!==e))},[f]),h=(0,x.useCallback)((e,t)=>{f(n=>n.map(n=>{if(n._id===e){let e={...n,[t.target.name]:t.target.value};return mv(lv(i.items,e),e)}return n}))},[f,i.items]),g=q_();M_(i.items);let _=!!(g.value&&a&&a.all.length>0),v=r.length;return(0,L.jsx)(L.Fragment,{children:u({schema:i,name:t,id:e,children:(0,L.jsxs)(L.Fragment,{children:[r.map((r,o)=>(0,L.jsx)(yv,{id:r._id,path:`${n}/${o}`,parentId:e,parentName:t,item:r,onFieldChange:h,render:l,index:o,onRemove:m,schema:i.items,errors:a,texts:s},r._id)),c({disabled:o,onClick:p,itemCount:v,texts:s})]}),errors:_?$_(a.all,s):null,itemCount:v,texts:s})})}var yv=(0,x.memo)(function({parentId:e,parentName:t,path:n,render:r,id:i,index:a,texts:o,onRemove:s,item:c,schema:l,onFieldChange:u,errors:d}){let f=lv(l,c).properties||{},p=D_(Object.keys(f),l.$bitiforms?.propertyOrder),m=_v(d.items,i,{}),h=p.reduce((r,a)=>(r[a]={path:`${n}/${a}`,schema:f[a],id:`${e}__${a}__${i}`,name:`${t}__${a}__${i}`,onChange:e=>u(i,{target:{name:a,value:e.target.value}}),value:c[a],errors:m[a],texts:o},r),{});return(0,L.jsx)(L.Fragment,{children:r?.({fields:h,index:a,id:i,path:n,onRemove:()=>{s(i)},texts:o})})}),bv=(0,x.memo)(function(e){let{texts:t,resolveWidget:n,widgets:r}=U_();O_(typeof e.name==`string`&&e.name.trim()!==``);let i=n(e.schema,r);return(0,L.jsx)(x.Suspense,{fallback:(0,L.jsx)(`div`,{}),children:(0,L.jsx)(i,{...e,texts:t})})}),xv=class e{static from(t){if(t===``)return new e([]);t.startsWith(`/`)||(t=`/${t}`);let[,...n]=t.split(`/`);return new e(n.map(e=>e.replace(/~1/g,`/`).replace(/~0/g,`~`)))}constructor(e){this.tokens=e}toString(){return this.tokens.length===0?``:`/${this.tokens.map(e=>e.replace(/~/g,`~0`).replace(/\//g,`~1`)).join(`/`)}`}toPath(){return this.tokens}};function Sv(e,t,n){let r=(typeof t==`string`?xv.from(t):t).toPath(),i=(e,t,n,r)=>{let a,o=t[r];return t.length>r?(Array.isArray(e)?(o=parseInt(o,10),a=e.slice()):a={...e},a[o]=i(e[o]===void 0?{}:e[o],t,n,r+1),a):typeof n==`function`?n(e):n};return i(e,r,n,0)}var Cv=class extends Error{constructor(e){super(`SubmissionError`),this.errors=e}},wv=1,Tv=2,Ev=4,Dv=5,Ov=6,kv=7,Av=8,jv={};function Mv(e){let t=(0,x.useId)();return e||t}function Nv({name:e,initialValues:t=jv,schema:n,disabled:r,onSubmit:i,onFormValuesChanged:a}){let o=Iv(),s=Mv(e);function c(e,t){function r(e){let t=Lv(n,e.values,!1,o()),r=!0;(0,Pa.default)(t.steps,e.steps)&&(r=!1,t.steps=e.steps);let i=!0;(0,Pa.default)(t.values,e.values)&&(i=!1,t.values=e.values);let a=!0;return(0,Pa.default)(t.errors,e.errors)&&(a=!1,t.errors=e.errors),!r&&!i&&!a?e:{...e,...t}}switch(t.type){case wv:return{...e,submissionState:`not-submitted`,submissionErrors:{},revealAllErrors:!1};case Tv:return r(e);case Ev:return{...e,submissionState:`submitting`};case Dv:return{...e,submissionState:`submitted`};case Ov:{let n=t.error;return{...e,submissionState:`failed`,submissionErrors:n instanceof Cv?n.errors:{},revealAllErrors:!0}}case kv:return{...e,revealAllErrors:t.value};case Av:return r({...e,values:Sv(e.values,t.path,t.updater)});default:return e}}let l=(0,x.useRef)(!0);(0,x.useEffect)(()=>(l.current=!0,()=>{l.current=!1}),[]);let[u,d]=(0,x.useReducer)(c,void 0,()=>{let{steps:e,errors:r,values:i}=Lv(n,t,!1,o());return{values:i,steps:e,touched:{},errors:r,submissionState:`not-submitted`,submissionErrors:{},revealAllErrors:!1}});(0,x.useEffect)(()=>{a?.(u.values)},[u.values,a]),(0,x.useEffect)(()=>{d({type:Tv})},[n]);let f=(0,x.useCallback)(e=>{d({type:kv,value:e})},[]),p=(0,x.useCallback)((e,t)=>{d({type:Av,path:e,updater:t})},[]),m=(0,x.useCallback)(e=>{if(r)return;let{name:t,value:n}=e.target;p(``,e=>({...e,[t]:n}))},[r,p]),h=async e=>{if(!l.current||r)return;e.preventDefault?.(),d({type:Ev});let{errors:t,values:a}=Lv(n,u.values,!0,o()),s=!Z_(t);try{if(await i?.({values:a,errors:t,isValid:s})===!1)throw new Cv({});d({type:Dv})}catch(e){d({type:Ov,error:e})}},g=()=>u.steps.map(e=>{let{properties:t={},$bitiforms:n={}}=e,i=D_(Object.keys(t),n.propertyOrder).reduce((e,n)=>(e[n]={path:n,schema:t[n],value:u.values[n],id:`form-${s}-${n}`,name:n,errors:u.errors[n],onChange:m,disabled:r},e),{});return{isValid:()=>!Object.keys(i).some(e=>Z_(i[e].errors)),fields:i}}),_=(0,x.useCallback)(()=>{l.current&&d({type:wv})},[]),v=g(),y={name:s,errors:u.errors,steps:v,values:u.values,onSubmit:h,submissionState:u.submissionState,clearSubmission:_,submissionErrors:u.submissionErrors,revealAllErrors:f,schema:n};return[y,{revealAllErrors:u.revealAllErrors,values:y.values,updateValues:p}]}function Pv({revealAllErrors:e,values:t,updateValues:n,children:r}){return(0,L.jsx)(J_.Provider,{value:n,children:(0,L.jsx)(K_.Provider,{value:e,children:(0,L.jsx)(G_.Provider,{value:t,children:r})})})}function Fv({render:e,component:t,element:n,...r}){let[i,a]=Nv(r);if(typeof e==`function`&&t)throw Error(`one of render or component must be provided, but not both`);if(typeof e==`function`)return(0,L.jsx)(Pv,{...a,children:e(i)});if(n)return(0,L.jsx)(Pv,{...a,children:(0,L.jsx)(X_.Provider,{value:i,children:n})});if(t)return(0,L.jsx)(Pv,{...a,children:(0,L.jsx)(t,{...i})});throw Error(`one of render or component must be provided`)}function Iv(){let{formats:e}=U_(),t=(0,x.useRef)(null);function n(){return t.current??=nv({formats:e}),t.current}return n}function Lv(e,t,n,r){let i=fv(e,t),a=pv(i),o=mv(a,t);n&&(o=gv(a,o));let s=r.validateSchema(a,o);return{steps:i,values:o,errors:s}}function Rv({id:e,name:t,path:n,value:r,schema:i,errors:a,disabled:o,texts:s}){let c=Y_(n),l=(0,x.useCallback)((e,t)=>{c(n=>({...n,[e]:t}))},[c]),u=i.$bitiforms||{},d=i.properties||{};return(0,L.jsxs)(`div`,{"data-bitiforms-object":!0,role:`group`,"data-field-path":n,children:[i.title&&(0,L.jsx)(`legend`,{"data-bitiforms-object-title":!0,children:i.title}),i.description&&(0,L.jsx)(`div`,{"data-bitiforms-object-description":!0,children:i.description}),(0,L.jsx)(`div`,{"data-bitiforms-object-fields":!0,children:D_(Object.keys(d),u.propertyOrder).map(i=>{let c=`${t}_${i}`;return(0,L.jsx)(zv,{path:`${n}/${i}`,field:i,schema:d[i],value:r[i],id:`${e}_${i}`,errors:a[i],name:c,onChange:l,disabled:o,texts:s},c)})})]})}var zv=(0,x.memo)(function({field:e,onChange:t,...n}){return(0,L.jsx)(bv,{...n,onChange:n=>t(e,n.target.value)})});function Bv(e){if(!e.enum)return[];let t=[];for(let n=0;n<e.enum.length;n++)t.push([e.enum[n],e.$enumNames?.[n]||e.enum[n]]);return t}function Vv(e){return(0,x.useMemo)(()=>{if(N_(e)){let t=e=>e,n=e=>e,r=[];return e.enum?r=Bv(e):e.oneOf?r=e.oneOf.map(e=>{let t=e.const?e.const:e.enum?e.enum[0]:``;return[t,e.title||t]}):e.anyOf&&(r=e.anyOf.map(e=>{let t=e.const?e.const:e.enum?e.enum[0]:``;return[t,e.title||t]})),{values:r,fromSchemaValue:n,toSchemaValue:t}}if(I_(e))return{values:[[`yes`,`Yes`],[`no`,`No`]],fromSchemaValue:e=>e===!0?`yes`:e===!1?`no`:null,toSchemaValue:e=>{switch(e){case`yes`:return!0;case`no`:return!1;default:return null}}};if(P_(e)||F_(e)){let t=e=>parseInt(e??``,10),n=[];for(let t=e.minimum??0;t<=(e.maximum??20);t++)n.push([`${t}`,`${t}`]);return{values:n,fromSchemaValue:e=>`${e??``}`,toSchemaValue:t}}throw Error(`Invalid schema given to SelectWidget`)},[e])}var Hv=e=>e;function Uv(e,t=Hv){let n=e.name,r=q_();return{onBlur:()=>{r.enable()},onChange:r=>{let i=t(r.target.value);e.onChange({target:{name:n,value:i}})},error:r.value?$_(e.errors,e.texts):void 0,schema:e.schema,$bitiforms:e.schema.$bitiforms||{},id:e.id,name:e.name,value:e.value,disabled:e.disabled}}var Wv=({fields:e,onRemove:t,texts:n,path:r})=>(0,L.jsxs)(`div`,{"data-bitiforms-array-item":!0,"data-field-path":r,children:[Object.keys(e).map(t=>(0,L.jsx)(bv,{...e[t]},t)),(0,L.jsx)(Eo,{className:`dmk-margin-top-m`,variant:`outlined`,intent:`danger`,type:`button`,onClick:t,"data-bitiforms-array-remove-button":!0,children:(n||{})[`arrayfield.remove`]??`Remove`})]}),Gv=({disabled:e,onClick:t,texts:n})=>(0,L.jsx)(Io,{as:`footer`,horizontal:!0,alignItems:`center`,className:`dmk-margin-top-l`,"data-bitiforms-array-add-button":!0,children:!e&&(0,L.jsx)(Eo,{variant:`outlined`,onClick:t,children:(n||{})[`arrayfield.add`]??`Add`})}),Kv=({schema:e,id:t,name:n,children:r,errors:i,itemCount:a})=>(0,L.jsxs)(`div`,{"data-bitiforms-array-field":n,children:[e.title&&(0,L.jsxs)(`h3`,{id:`${t}_title`,className:`dmk-text-title2 dmk-margin-bottom-s`,children:[e.title,` `,(0,L.jsxs)(`span`,{"data-bitiforms-array-item-count":!0,children:[`(`,a,`)`]})]}),e.description&&(0,L.jsx)(`div`,{id:`${t}_description`,children:e.description}),i&&(0,L.jsx)(`div`,{children:i}),r]});function qv(e){return(0,L.jsx)(vv,{...e,renderItem:Wv,renderAddButton:Gv,renderContainer:Kv})}function Jv(e){return(0,L.jsx)(`div`,{"data-bitiforms-description":!0,...e})}function Yv({onChange:e,id:t,name:n,value:r,errors:i,schema:a,texts:o,disabled:s,path:c}){let l=q_();O_(Zv(a),`CheckboxGroupWidget must be given a schema of type 'object' or 'array'. ${JSON.stringify(a)} given.`);let u=t=>i=>L_(a)&&Array.isArray(r)?e({target:{name:n,value:Qv(r,t,i.currentTarget.checked)}}):e({target:{name:n,value:{...r,[t]:i.currentTarget.checked}}}),d=()=>{l.enable()},f=l.value,p=Xv(i,a);return(0,L.jsxs)(Ph,{"aria-labelledby":`${t}-legend`,"data-bitiforms-checkboxgroup":!0,"data-field-path":c,children:[a.title&&(0,L.jsx)(Lh,{id:`${t}-legend`,children:a.title}),a.description&&(0,L.jsx)(Jv,{id:`${t}_description`,children:a.description}),(0,L.jsx)(Io,{spacing:`s`,children:$v(a).map(([e,n])=>{let a=Array.isArray(r)?r.includes(e):r[e]===!0,o=Array.isArray(r)?!a&&p.length>0?`invalid`:void 0:Z_(i[e])?`invalid`:void 0;return(0,L.jsx)(Ro,{id:`${t}_${e}`,checked:a,value:e,error:f?!!o:void 0,onChange:u(e),onBlur:d,disabled:s,children:n},e)})}),f&&p.length>0&&(0,L.jsx)(Rh,{role:`alert`,children:$_(p,o)})]})}function Xv(e,t){return Z_(e)?L_(t)?e.all:[`errors.checkboxGroup.invalid`]:[]}function Zv(e){return!!(L_(e)&&N_(e.items)&&e.items.enum||j_(e)&&Object.values(e.properties||{}).every(I_))}function Qv(e,t,n){let r=new Set(e);return n?[...r.add(t)]:(r.delete(t),[...r])}function $v(e){if(L_(e)&&N_(e.items)&&e.items.enum){let t=[];for(let n=0;n<e.items.enum.length;n++)t.push([e.items.enum[n],e.items.$enumNames?.[n]||e.items.enum[n]]);return t}return j_(e)?D_(Object.keys(e.properties||{}),(e.$bitiforms||{}).propertyOrder).map(t=>[t,e.properties[t].title]):[]}function ey({name:e,value:t,onChange:n,schema:r,errors:i,texts:a,path:o}){let s=q_(),c=t=>{let{checked:r}=t.currentTarget;return n({target:{name:e,value:r}})},l=s.value&&Z_(i);return(0,L.jsxs)(`div`,{"data-field-path":o,children:[(0,L.jsx)(Ro,{checked:t||!1,onChange:c,onBlur:s.enable,error:l,children:r.title}),l&&(0,L.jsx)(Rh,{role:`alert`,children:a?.[`errors.checkbox.required`]})]})}function ty(e){let{onBlur:t,onChange:n,error:r,schema:i,id:a,name:o,value:s,disabled:c,$bitiforms:l}=Uv(e);return(0,L.jsx)(zh,{"data-field-path":e.path,name:o,type:`date`,id:a,label:i.title,hint:i.description,error:r,value:s??``,onChange:n,onBlur:t,disabled:c,...l.widgetProps})}function ny({schema:e,path:t}){return!e.title&&!e.description&&!e.const?null:(0,L.jsxs)(`div`,{"data-bitiforms-helptext":!0,"data-field-path":t,children:[e.title&&(0,L.jsx)(`h4`,{children:e.title}),e.description||e.const||``]})}var ry=({})=>null;function iy({suffix:e=``,...t}){let{$bitiforms:n,onBlur:r,onChange:i,error:a,schema:o,id:s,name:c,value:l,disabled:u}=Uv(t,ay);return(0,L.jsx)(eg,{"data-field-path":t.path,id:s,name:c,placeholder:n.placeholder,error:a,label:o.title,autoFocus:n.autoFocus,...n.widgetProps,hint:o.description,value:l==null||l===``?``:l,onBlur:r,onChange:e=>{i({target:{name:e.target.name,value:e.target.value}})},min:o.minimum,max:o.maximum,disabled:u,endAdornment:e})}var ay=e=>{if(e.trim()===``)return null;let t=parseFloat(e.replace(/[^0-9,.]/g,``));return isNaN(t)?null:t};function oy(e){return(0,L.jsx)(Rv,{...e})}var sy={email:`email`};function cy(e){return e.type===`string`&&e.format&&sy[e.format]||`text`}function ly({type:e,endAdornment:t,...n}){let{$bitiforms:r,onBlur:i,onChange:a,error:o,schema:s,id:c,name:l,value:u,disabled:d}=Uv(n),f=cy(s);return(0,L.jsx)(zh,{"data-field-path":n.path,type:e||f,id:c,name:l,placeholder:r.placeholder,error:o,label:s.title,autoFocus:r.autoFocus,hint:s.description,value:u??``,onBlur:i,onChange:a,disabled:d,endAdornment:t,...r.widgetProps,autoComplete:typeof r.autoComplete==`string`?r.autoComplete:r.autoComplete===!1?`off`:`on`})}function uy(e){let t=cg(!1);return(0,L.jsx)(ly,{...e,type:t.value?`text`:`password`,endAdornment:(0,L.jsx)(Eo,{tabIndex:-1,variant:`text`,style:{fontSize:32,lineHeight:1,padding:0},onClick:t.toggle,children:t.value?(0,L.jsx)(xa,{}):(0,L.jsx)(Sa,{})})})}var dy=({value:e,label:t,disabled:n})=>(0,L.jsx)(ig,{value:e,disabled:n,children:t});function fy({className:e,renderOption:t=dy,texts:n,...r}){let{values:i,fromSchemaValue:a,toSchemaValue:o}=Vv(r.schema),{onBlur:s,onChange:c,schema:l,id:u,error:d,name:f,value:p,disabled:m}=Uv(r,o);return(0,L.jsxs)(`div`,{"aria-labelledby":`${u}-legend`,"data-field-path":r.path,children:[(0,L.jsx)(Lh,{error:!!d,id:`${u}-legend`,children:l.title}),l.description&&(0,L.jsx)(Jv,{id:`${u}_description`,children:l.description}),(0,L.jsx)(ng,{name:f,id:u,className:e,error:!!d,value:a(p)??``,onChange:c,onBlur:s,disabled:m,children:i.map(([e,n],r)=>(0,L.jsx)(x.Fragment,{children:t({value:e,label:n,disabled:m||!1,index:r})},e))}),d&&(0,L.jsx)(Rh,{children:n?.[`errors.radiogroup.required`]})]})}function py(e){let{values:t,fromSchemaValue:n,toSchemaValue:r}=Vv(e.schema),{id:i,name:a,$bitiforms:o,error:s,schema:c,onChange:l,onBlur:u,value:d,disabled:f}=Uv(e,r);return(0,L.jsx)(bg,{"data-field-path":e.path,id:i,name:a,label:c.title,autoFocus:o.autoFocus,error:s,hint:c.description,value:n(d),onChange:l,onBlur:u,disabled:f,children:t.map(([e,t])=>(0,L.jsx)(`option`,{value:e,children:t},e))})}function my({errors:e,onClose:t,title:n=`Failed to submit`}){let{texts:r}=U_();return(0,L.jsx)(Ja,{intent:`error`,title:n,onClose:t,children:(0,L.jsx)(`ul`,{children:Object.values(e).map((e,t)=>(0,L.jsx)(`li`,{children:$_([e],r)},t))})})}var hy={ArrayWidget:qv,ObjectWidget:oy,CheckboxWidget:ey,CheckboxGroupWidget:Yv,DateWidget:ty,HelpTextWidget:ny,HiddenWidget:ry,NumberWidget:iy,PasswordWidget:uy,RadioGroupWidget:fy,SelectWidget:py,TextInputWidget:ly},gy=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},_y=new class extends gy{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},vy={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},yy=new class{#e=vy;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function by(e){setTimeout(e,0)}var xy=typeof window>`u`||`Deno`in globalThis;function Sy(){}function Cy(e,t){return typeof e==`function`?e(t):e}function wy(e){return typeof e==`number`&&e>=0&&e!==1/0}function Ty(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ey(e,t){return typeof e==`function`?e(t):e}function Dy(e,t){return typeof e==`function`?e(t):e}function Oy(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Ay(o,t.options))return!1}else if(!My(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function ky(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(jy(t.options.mutationKey)!==jy(a))return!1}else if(!My(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Ay(e,t){return(t?.queryKeyHashFn||jy)(e)}function jy(e){return JSON.stringify(e,(e,t)=>Ly(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function My(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>My(e[n],t[n])):!1}var Ny=Object.prototype.hasOwnProperty;function Py(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Iy(e)&&Iy(t);if(!r&&!(Ly(e)&&Ly(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Ny.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Py(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Fy(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Iy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ly(e){if(!Ry(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Ry(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Ry(e){return Object.prototype.toString.call(e)===`[object Object]`}function zy(e){return new Promise(t=>{yy.setTimeout(t,e)})}function By(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Py(e,t)}function Vy(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Hy(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Uy=Symbol();function Wy(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Uy?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Gy(e,t){return typeof e==`function`?e(...t):!!e}function Ky(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var qy=(()=>{let e=()=>xy;return{isServer(){return e()},setIsServer(t){e=t}}})();function Jy(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Yy=by;function Xy(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Yy,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Zy=Xy(),Qy=new class extends gy{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function $y(e){return Math.min(1e3*2**e,3e4)}function eb(e){return(e??`online`)===`online`?Qy.isOnline():!0}var tb=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function nb(e){let t=!1,n=0,r,i=Jy(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new tb(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>_y.isFocused()&&(e.networkMode===`always`||Qy.isOnline())&&e.canRun(),u=()=>eb(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(qy.isServer()?0:3),o=e.retryDelay??$y,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),zy(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var rb=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wy(this.gcTime)&&(this.#e=yy.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qy.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(yy.clearTimeout(this.#e),this.#e=void 0)}},ib=class extends rb{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=sb(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=sb(this.options);e.data!==void 0&&(this.setState(ob(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=By(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(Sy).catch(Sy):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Dy(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Uy||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ey(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Ty(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=Wy(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=nb({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof tb&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof tb){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ab(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...ob(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),Zy.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function ab(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:eb(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function ob(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function sb(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var cb=class extends gy{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=Jy(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),ub(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return db(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return db(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Dy(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Fy(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&fb(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Dy(this.options.enabled,this.#t)!==Dy(t.enabled,this.#t)||Ey(this.options.staleTime,this.#t)!==Ey(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Dy(this.options.enabled,this.#t)!==Dy(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return mb(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Sy)),t}#g(){this.#b();let e=Ey(this.options.staleTime,this.#t);if(qy.isServer()||this.#r.isStale||!wy(e))return;let t=Ty(this.#r.dataUpdatedAt,e)+1;this.#d=yy.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(qy.isServer()||Dy(this.options.enabled,this.#t)===!1||!wy(this.#p)||this.#p===0)&&(this.#f=yy.setInterval(()=>{(this.options.refetchIntervalInBackground||_y.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(yy.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(yy.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&ub(e,t),o=i&&fb(e,n,t,r);(a||o)&&(l={...l,...ab(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=By(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=By(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:pb(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Dy(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=Jy())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!Fy(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){Zy.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function lb(e,t){return Dy(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function ub(e,t){return lb(e,t)||e.state.data!==void 0&&db(e,t,t.refetchOnMount)}function db(e,t,n){if(Dy(t.enabled,e)!==!1&&Ey(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&pb(e,t)}return!1}function fb(e,t,n,r){return(e!==t||Dy(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&pb(e,n)}function pb(e,t){return Dy(t.enabled,e)!==!1&&e.isStaleByTime(Ey(t.staleTime,e))}function mb(e,t){return!Fy(e.getCurrentResult(),t)}function hb(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Ky(e,()=>t.signal,()=>n=!0)},u=Wy(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?Hy:Vy;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?_b:gb,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:gb(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function gb(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function _b(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var vb=class extends rb{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||yb(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=nb({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),Zy.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function yb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var bb=class extends gy{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new vb({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=xb(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=xb(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=xb(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=xb(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Zy.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ky(t,e))}findAll(e={}){return this.getAll().filter(t=>ky(e,t))}notify(e){Zy.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Zy.batch(()=>Promise.all(e.map(e=>e.continue().catch(Sy))))}};function xb(e){return e.options.scope?.id}var Sb=class extends gy{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Fy(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&jy(t.mutationKey)!==jy(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??yb();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Zy.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Cb=class extends gy{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Ay(r,t),a=this.get(i);return a||(a=new ib({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Zy.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Oy(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Oy(e,t)):t}notify(e){Zy.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Zy.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Zy.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},wb=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Cb,this.#t=e.mutationCache||new bb,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=_y.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Qy.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ey(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Cy(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Zy.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Zy.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Zy.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Zy.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Sy).catch(Sy)}invalidateQueries(e,t={}){return Zy.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Zy.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Sy)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Sy)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Ey(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Sy).catch(Sy)}fetchInfiniteQuery(e){return e.behavior=hb(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Sy).catch(Sy)}ensureInfiniteQueryData(e){return e.behavior=hb(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Qy.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(jy(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{My(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(jy(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{My(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Ay(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Uy&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Tb=x.createContext(void 0),Eb=e=>{let t=x.useContext(Tb);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Db=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,L.jsx)(Tb.Provider,{value:e,children:t})),Ob=x.createContext(!1),kb=()=>x.useContext(Ob);Ob.Provider;function Ab(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var jb=x.createContext(Ab()),Mb=()=>x.useContext(jb),Nb=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Gy(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Pb=e=>{x.useEffect(()=>{e.clearReset()},[e])},Fb=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Gy(n,[e.error,r])),Ib=(e,t)=>t.state.data===void 0,Lb=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Rb=(e,t)=>e.isLoading&&e.isFetching&&!t,zb=(e,t)=>e?.suspense&&t.isPending,Bb=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Vb(e,t,n){let r=kb(),i=Mb(),a=Eb(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,Lb(o),Nb(o,i,s),Pb(i);let c=!a.getQueryCache().get(o.queryHash),[l]=x.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(e=>{let t=d?l.subscribe(Zy.batchCalls(e)):Sy;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),x.useEffect(()=>{l.setOptions(o)},[o,l]),zb(o,u))throw Bb(o,l,i);if(Fb({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!qy.isServer()&&Rb(u,r)&&(c?Bb(o,l,i):s?.promise)?.catch(Sy).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function Hb(e,t){return Vb(e,cb,t)}function Ub(e,t){return Vb({...e,enabled:!0,suspense:!0,throwOnError:Ib,placeholderData:void 0},cb,t)}function Wb(e,t){let n=Eb(t),[r]=x.useState(()=>new Sb(n,e));x.useEffect(()=>{r.setOptions(e)},[r,e]);let i=x.useSyncExternalStore(x.useCallback(e=>r.subscribe(Zy.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=x.useCallback((e,t)=>{r.mutate(e,t).catch(Sy)},[r]);if(i.error&&Gy(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Gb=Object.defineProperty,Kb=Object.defineProperties,qb=Object.getOwnPropertyDescriptors,Jb=Object.getOwnPropertySymbols,Yb=Object.prototype.hasOwnProperty,Xb=Object.prototype.propertyIsEnumerable,Zb=(e,t,n)=>t in e?Gb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qb=(e,t)=>{for(var n in t||={})Yb.call(t,n)&&Zb(e,n,t[n]);if(Jb)for(var n of Jb(t))Xb.call(t,n)&&Zb(e,n,t[n]);return e},$b=(e,t)=>Kb(e,qb(t)),ex=(e,t)=>{var n={};for(var r in e)Yb.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Jb)for(var r of Jb(e))t.indexOf(r)<0&&Xb.call(e,r)&&(n[r]=e[r]);return n},tx=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),nx=e=>cx({max:5,isRetriable:e=>e instanceof ax?e.response.status===503:e instanceof ox,getDelay:e=>500*e,signal:e}),rx=()=>globalThis.crypto.randomUUID();function ix(e={}){var t=e,{fetch:n=fetch,getRootUrl:r=()=>``,timeout:i=0,retryOn:a=nx,headers:o={},requestIdHeaderName:s=`X-Request-ID`,getRequestId:c=rx,json:l=!0,transform:u=e=>e}=t,d=ex(t,[`fetch`,`getRootUrl`,`timeout`,`retryOn`,`headers`,`requestIdHeaderName`,`getRequestId`,`json`,`transform`]);let f=[];function p(e){return tx(this,arguments,function*(e,t={}){let p=t.json??l,m=t.transform??u,h=yield r(e),g=t.fetch??n,_=c(),v=n=>tx(null,null,function*(){let r=new Headers;r.set(s,n),p&&(r.set(`Accept`,`application/json`),t.method!==`GET`&&typeof t.body==`string`&&r.set(`Content-Type`,`application/json`));for(let[e,n]of Object.entries(Qb(Qb({},o),t.headers)))r.set(e,n);return new Request(`${h}${e}`,$b(Qb(Qb({credentials:`include`},d),t),{headers:r}))}),y=new AbortController,b=t.signal,x=()=>{y.abort(b?.reason)};return b!=null&&b.aborted?y.abort(b.reason):b?.addEventListener(`abort`,x,{once:!0}),fx(()=>tx(null,null,function*(){let e=t.timeout??i??0,n=yield v(_),r=yield tx(null,null,function*(){return ux(e=>tx(null,null,function*(){let t=new Request(n,{signal:e});for(let e of f)e.request&&(yield e.request(t));return g(t)}),e,{signal:n.signal})});r.jsonData=p?yield r.clone().json().then(e=>{let n=typeof m==`function`?m(e):m.response?m.response(e):e;return t.schema?px(t.schema,n):n},()=>{}):void 0;for(let e of f)e.response&&(yield e.response(r));if(r.status<200||r.status>=400)throw new ax(r);return r}),t.retryOn||(a===nx?nx(y.signal):a()))().finally(()=>{b?.removeEventListener(`abort`,x)})})}return p.intercept=e=>(f.push(e),()=>{let t=f.indexOf(e);t>=0&&f.splice(t,1)}),p}var ax=class extends Error{constructor(e){let t=`${e.status} ${e.statusText} at ${e.url}`;super(t),this.name=this.constructor.name,this.response=e}},ox=class extends Error{constructor(e){super(e),this.name=this.constructor.name}},sx=class extends Error{constructor(e,t){super(`Validation error`),this.name=this.constructor.name,this.issues=e.issues,this.data=t}};function cx({max:e,isRetriable:t,getDelay:n,signal:r}){let i=0;return function(a){return tx(this,null,function*(){return i++,t(a)&&i<e?(yield dx(n(i),{signal:r}),!0):!1})}}function lx(e){return e instanceof Error?e:Error(`Aborted`)}function ux(e,t){return tx(this,arguments,function*(e,t,n={}){let r=n.signal;if(r!=null&&r.aborted)throw r.reason;if(t<=0||!Number.isFinite(t))return e(r??new AbortController().signal);let i=new AbortController,{signal:a}=i,o=()=>{i.abort(r.reason)};r&&r.addEventListener(`abort`,o,{once:!0});let s=setTimeout(()=>{i.abort(new ox(`Timed out after ${t} ms`))},t);try{return yield e(a)}finally{clearTimeout(s),r?.removeEventListener(`abort`,o)}})}function dx(e,t={}){let{signal:n}=t;return new Promise((t,r)=>{if(n!=null&&n.aborted){r(lx(n.reason));return}let i=setTimeout(()=>{n?.removeEventListener(`abort`,a),t()},e),a=()=>{clearTimeout(i),n?.removeEventListener(`abort`,a),r(lx(n?.reason))};n?.addEventListener(`abort`,a,{once:!0})})}function fx(e,t=()=>!0){let n=(...r)=>tx(null,null,function*(){try{return yield e(...r)}catch(e){if(yield t(e))return n(...r);throw e}});return n}function px(e,t){return tx(this,null,function*(){let n=e[`~standard`].validate(t);if(n instanceof Promise&&(n=yield n),n.issues)throw new sx(n,t);return n.value})}var mx=[`number`,`string`,`datetime`,`date`,`format-string`,`yes-no`,`boolean`,`json`,`duration`],hx=ix({getRootUrl:()=>`/${document.querySelector(`meta[name="x-basename"]`)?.getAttribute(`content`)}/api`,headers:{"X-CSRF-Token":document.querySelector(`meta[name="csrf-token"]`)?.getAttribute(`content`)??``}});async function gx(){return hx(`/tables`)}async function _x(e,t,n,r,i){let a=new URLSearchParams;for(let e of t)a.append(`order`,e);return a.append(`limit`,n.toString()),a.append(`page`,r.toString()),i&&a.append(`search`,i),hx(`/tables/${e}?${a.toString()}`)}async function vx(e,t){return hx(`/tables/${e}/${t}`)}async function yx(e,t){return hx(`/tables/${e}/${t}`,{method:`DELETE`})}async function bx(e,t){return hx(`/tables/${e}`,{method:`POST`,body:JSON.stringify(t)})}async function xx(e,t,n){return hx(`/tables/${e}/${t}`,{method:`PUT`,body:JSON.stringify(n)})}async function Sx(e,t){return hx(`/tables/${e}/suggestions/${t}`)}function Cx(){let e=(0,ea.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`database`],queryFn:wx},e[0]=t):t=e[0],Ub(t)}async function wx(){let e=await gx(),t=[],n={};for(let r of e.jsonData?.tables??[])t.push(r.tableName),n[r.tableName]=r;return{tableIds:t,tables:n,rowCounts:e.jsonData?.rowCounts??{},databaseName:e.jsonData?.databaseName??`unknown`}}function Tx(e,t){let n=(0,ea.c)(17),{order:r,limit:i,page:a,search:o}=t,s;n[0]!==i||n[1]!==r||n[2]!==a||n[3]!==o?(s={order:r,limit:i,page:a,search:o},n[0]=i,n[1]=r,n[2]=a,n[3]=o,n[4]=s):s=n[4];let c;n[5]!==s||n[6]!==e?(c=[`tables`,e,s],n[5]=s,n[6]=e,n[7]=c):c=n[7];let l;n[8]!==i||n[9]!==r||n[10]!==a||n[11]!==o||n[12]!==e?(l=()=>_x(e,r,i,a,o).then(Ex),n[8]=i,n[9]=r,n[10]=a,n[11]=o,n[12]=e,n[13]=l):l=n[13];let u;return n[14]!==c||n[15]!==l?(u={queryKey:c,queryFn:l},n[14]=c,n[15]=l,n[16]=u):u=n[16],Ub(u)}function Ex(e){return e.jsonData}function Dx(e){let t=(0,ea.c)(11),n=Eb(),r=g_(),i;t[0]===e?i=t[1]:(i=async t=>{let{pk:n,data:r}=t;return n==null?bx(e,r):xx(e,n,r)},t[0]=e,t[1]=i);let a;t[2]!==n||t[3]!==e?(a=()=>{n.invalidateQueries({queryKey:[`tables`,e]})},t[2]=n,t[3]=e,t[4]=a):a=t[4];let o;t[5]===r?o=t[6]:(o=()=>{r({title:`Failed to update row`,description:``,intent:`error`})},t[5]=r,t[6]=o);let s;return t[7]!==i||t[8]!==a||t[9]!==o?(s={mutationFn:i,onSuccess:a,onError:o},t[7]=i,t[8]=a,t[9]=o,t[10]=s):s=t[10],Wb(s)}function Ox(e){let t=(0,ea.c)(11),n=Eb(),r=g_(),i;t[0]===e?i=t[1]:(i=t=>yx(e,t),t[0]=e,t[1]=i);let a;t[2]!==n||t[3]!==e?(a=()=>{n.invalidateQueries({queryKey:[`tables`,e]})},t[2]=n,t[3]=e,t[4]=a):a=t[4];let o;t[5]===r?o=t[6]:(o=()=>{r({title:`Failed to delete row`,description:``,intent:`error`})},t[5]=r,t[6]=o);let s;return t[7]!==i||t[8]!==a||t[9]!==o?(s={mutationFn:i,onSuccess:a,onError:o},t[7]=i,t[8]=a,t[9]=o,t[10]=s):s=t[10],Wb(s)}function kx(e,t){let n=(0,ea.c)(3),r;return n[0]!==t||n[1]!==e?(r={queryKey:[`tables`,e,`rows`,t],queryFn:()=>t==null?{}:vx(e,t).then(Ax)},n[0]=t,n[1]=e,n[2]=r):r=n[2],Ub(r)}function Ax(e){return e.jsonData}function jx(e,t){let n=(0,ea.c)(3),r;return n[0]!==t||n[1]!==e?(r={queryKey:[`foreign-key-options`,e,t],queryFn:()=>Sx(e,t).then(Mx)},n[0]=t,n[1]=e,n[2]=r):r=n[2],Hb(r)}function Mx(e){return e.jsonData}var Nx=e=>e.name?String(e.name):e.title?String(e.title):e.slug?String(e.slug):JSON.stringify(e);function Px(e){let t=(0,ea.c)(16),n=e.schema.$bitiforms?.widgetProps,r;t[0]===n?r=t[1]:(r=n||{},t[0]=n,t[1]=r);let{foreignTable:i,foreignColumn:a}=r,{data:o}=jx(i,a),s;t[2]===o?s=t[3]:(s=o===void 0?[]:o,t[2]=o,t[3]=s);let c=s,l=e.value||``,u;t[4]===l?u=t[5]:(u=l.toString(),t[4]=l,t[5]=u);let d=u,f=e.schema.title,p=e.schema.description,m;t[6]===e?m=t[7]:(m=t=>{e.onChange({target:{name:e.name,value:Number(t.target.value)}})},t[6]=e,t[7]=m);let h;t[8]===c?h=t[9]:(h=c.map(Fx),t[8]=c,t[9]=h);let g;return t[10]!==e.schema.description||t[11]!==e.schema.title||t[12]!==d||t[13]!==m||t[14]!==h?(g=(0,L.jsx)(bg,{label:f,hint:p,value:d,onChange:m,children:h}),t[10]=e.schema.description,t[11]=e.schema.title,t[12]=d,t[13]=m,t[14]=h,t[15]=g):g=t[15],g}function Fx(e){return(0,L.jsxs)(`option`,{value:String(e.id),children:[String(e.id),`: `,Nx(e)]},String(e.id))}var Ix=uo({colors:{primary:`#2a2f3b`}}),Lx=new wb({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1}}}),Rx={...hy,ForeignKeyWidget:Px};function zx(e){let t=(0,ea.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,L.jsx)(x.StrictMode,{children:(0,L.jsx)(Xh,{children:(0,L.jsx)(W_,{widgets:Rx,children:(0,L.jsx)(Db,{client:Lx,children:(0,L.jsx)(z,{theme:Ix,children:(0,L.jsx)(h_,{children:n})})})})})}),t[0]=n,t[1]=r),r}var Bx=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Vx=(e=>e?Bx(e):Bx),Hx=e=>e;function Ux(e,t=Hx){let n=x.useSyncExternalStore(e.subscribe,x.useCallback(()=>t(e.getState()),[e,t]),x.useCallback(()=>t(e.getInitialState()),[e,t]));return x.useDebugValue(n),n}var Wx=e=>!!e.dispatchFromDevtools&&typeof e.dispatch==`function`,Gx=new Map,Kx=e=>{let t=Gx.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([e,t])=>[e,t.getState()])):{}},qx=(e,t,n)=>{if(e===void 0)return{type:`untracked`,connection:t.connect(n)};let r=Gx.get(n.name);if(r)return{type:`tracked`,store:e,...r};let i={connection:t.connect(n),stores:{}};return Gx.set(n.name,i),{type:`tracked`,store:e,...i}},Jx=(e,t)=>{if(t===void 0)return;let n=Gx.get(e);n&&(delete n.stores[t],Object.keys(n.stores).length===0&&Gx.delete(e))},Yx=e=>{if(!e)return;let t=e.split(`
|
|
14
|
-
`),n=t.findIndex(e=>e.includes(`api.setState`));if(n<0)return;let r=t[n+1]?.trim()||``;return/.+ (.+) .+/.exec(r)?.[1]},Xx=(e,t={})=>(n,r,i)=>{let{enabled:a,anonymousActionType:o,store:s,...c}=t,l;try{l=(a??!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return e(n,r,i);let{connection:u,...d}=qx(s,l,c),f=!0;i.setState=((e,t,a)=>{let l=n(e,t);if(!f)return l;let d=a===void 0?{type:o||Yx(Error().stack)||`anonymous`}:typeof a==`string`?{type:a}:a;return s===void 0?(u?.send(d,r()),l):(u?.send({...d,type:`${s}/${d.type}`},{...Kx(c.name),[s]:i.getState()}),l)}),i.devtools={cleanup:()=>{u&&typeof u.unsubscribe==`function`&&u.unsubscribe(),Jx(c.name,s)}};let p=(...e)=>{let t=f;f=!1,n(...e),f=t},m=e(i.setState,r,i);if(d.type===`untracked`?u?.init(m):(d.stores[d.store]=i,u?.init(Object.fromEntries(Object.entries(d.stores).map(([e,t])=>[e,e===d.store?m:t.getState()])))),Wx(i)){let e=i.dispatch;i.dispatch=(...t)=>{e(...t)}}return u.subscribe(e=>{switch(e.type){case`ACTION`:if(typeof e.payload!=`string`){console.error(`[zustand devtools middleware] Unsupported action format`);return}return Zx(e.payload,e=>{if(e.type===`__setState`){if(s===void 0){p(e.state);return}Object.keys(e.state).length!==1&&console.error(`
|
|
15
|
-
[zustand devtools middleware] Unsupported __setState action format.
|
|
16
|
-
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
17
|
-
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
18
|
-
`);let t=e.state[s];if(t==null)return;JSON.stringify(i.getState())!==JSON.stringify(t)&&p(t);return}Wx(i)&&i.dispatch(e)});case`DISPATCH`:switch(e.payload.type){case`RESET`:return p(m),s===void 0?u?.init(i.getState()):u?.init(Kx(c.name));case`COMMIT`:if(s===void 0){u?.init(i.getState());return}return u?.init(Kx(c.name));case`ROLLBACK`:return Zx(e.state,e=>{if(s===void 0){p(e),u?.init(i.getState());return}p(e[s]),u?.init(Kx(c.name))});case`JUMP_TO_STATE`:case`JUMP_TO_ACTION`:return Zx(e.state,e=>{if(s===void 0){p(e);return}JSON.stringify(i.getState())!==JSON.stringify(e[s])&&p(e[s])});case`IMPORT_STATE`:{let{nextLiftedState:t}=e.payload,n=t.computedStates.slice(-1)[0]?.state;if(!n)return;p(s===void 0?n:n[s]),u?.send(null,t);return}case`PAUSE_RECORDING`:return f=!f}return}}),m},Zx=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error(`[zustand devtools middleware] Could not parse the received json`,e)}n!==void 0&&t(n)};function Qx(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var $x=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return $x(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return $x(t)(e)}}}},eS=(e,t)=>(n,r,i)=>{let a={storage:Qx(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return $x(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},tS={displayName:``,columns:{},sortBy:[],page:1,limit:10,search:``};function nS(e){return Vx(Xx(eS(t=>({config:Object.fromEntries(Object.values(e.tables).map(e=>[e.tableName,{...tS,displayName:e.tableName,columns:Object.fromEntries(e.columnNames.concat(e.relatedColumnNames).map(t=>[t,{displayName:t,displayType:e.columnMetadata[t]?.displayType??`string`,valueTemplate:void 0,visible:!0}]))}])),setConfig:(e,n)=>{t(t=>({config:{...t.config,[e]:{...tS,...t.config[e],...n}}}))}}),{name:`tableConfig:${e.databaseName}`})))}var rS=(0,x.createContext)(null);function iS(e){let t=(0,ea.c)(5),{children:n,database:r}=e,i;t[0]===r?i=t[1]:(i=()=>nS(r),t[0]=r,t[1]=i);let[a]=(0,x.useState)(i),o;return t[2]!==n||t[3]!==a?(o=(0,L.jsx)(rS.Provider,{value:a,children:n}),t[2]=n,t[3]=a,t[4]=o):o=t[4],o}var aS=()=>{let e=(0,x.useContext)(rS);if(e==null)throw Error(`useTableConfig must be used within a StoreProvider`);return e},oS=()=>Ux(aS(),cS),sS=()=>Ux(aS(),lS);function cS(e){return e.config}function lS(e){return e.setConfig}function uS(){let e=(0,ea.c)(6),{data:t}=Cx(),n;e[0]===t.tableIds?n=e[1]:(n=t.tableIds||[],e[0]=t.tableIds,e[1]=n);let r;e[2]===n?r=e[3]:(r=n.map(dS),e[2]=n,e[3]=r);let i;return e[4]===r?i=e[5]:(i=(0,L.jsx)(`div`,{className:`sidebar-menu`,children:(0,L.jsx)(`ul`,{children:r})}),e[4]=r,e[5]=i),i}function dS(e){return(0,L.jsx)(`li`,{children:(0,L.jsx)(hg,{as:Fi,to:e,children:e})},e)}function fS(){let{data:e}=Cx();return(0,L.jsx)(iS,{database:e,children:(0,L.jsx)(fg,{headerHeight:`64px`,header:(0,L.jsx)(mg,{style:{"--header-color":`var(--colors-white)`,"--header-background":`#2a2f3b`,color:`var(--colors-white)`},logo:(0,L.jsx)(`span`,{className:`logo`,children:document.querySelector(`meta[name="x-title"]`)?.getAttribute(`content`)}),children:null}),sidebar:(0,L.jsx)(uS,{}),children:(0,L.jsx)(zr,{})})})}function pS(){let e=(0,ea.c)(2),t=Cr(),n;return e[0]===t.message?n=e[1]:(n=(0,L.jsx)(Ja,{title:`Error`,intent:`error`,children:t.message}),e[0]=t.message,e[1]=n),n}function mS(){let e=(0,ea.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,L.jsx)(`div`,{children:`Welcome!`}),e[0]=t):t=e[0],t}function hS(e){return ha({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`32`,d:`M262.29 192.31a64 64 0 1 0 57.4 57.4 64.13 64.13 0 0 0-57.4-57.4zM416.39 256a154.34 154.34 0 0 1-1.53 20.79l45.21 35.46a10.81 10.81 0 0 1 2.45 13.75l-42.77 74a10.81 10.81 0 0 1-13.14 4.59l-44.9-18.08a16.11 16.11 0 0 0-15.17 1.75A164.48 164.48 0 0 1 325 400.8a15.94 15.94 0 0 0-8.82 12.14l-6.73 47.89a11.08 11.08 0 0 1-10.68 9.17h-85.54a11.11 11.11 0 0 1-10.69-8.87l-6.72-47.82a16.07 16.07 0 0 0-9-12.22 155.3 155.3 0 0 1-21.46-12.57 16 16 0 0 0-15.11-1.71l-44.89 18.07a10.81 10.81 0 0 1-13.14-4.58l-42.77-74a10.8 10.8 0 0 1 2.45-13.75l38.21-30a16.05 16.05 0 0 0 6-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 0 0-6.07-13.94l-38.19-30A10.81 10.81 0 0 1 49.48 186l42.77-74a10.81 10.81 0 0 1 13.14-4.59l44.9 18.08a16.11 16.11 0 0 0 15.17-1.75A164.48 164.48 0 0 1 187 111.2a15.94 15.94 0 0 0 8.82-12.14l6.73-47.89A11.08 11.08 0 0 1 213.23 42h85.54a11.11 11.11 0 0 1 10.69 8.87l6.72 47.82a16.07 16.07 0 0 0 9 12.22 155.3 155.3 0 0 1 21.46 12.57 16 16 0 0 0 15.11 1.71l44.89-18.07a10.81 10.81 0 0 1 13.14 4.58l42.77 74a10.8 10.8 0 0 1-2.45 13.75l-38.21 30a16.05 16.05 0 0 0-6.05 14.08c.33 4.14.55 8.3.55 12.47z`},child:[]}]})(e)}function gS(e){let t=(0,ea.c)(17),{onSubmit:n,steps:r,submissionErrors:i,submissionState:a,clearSubmission:o,submitButtonText:s}=e,c=s===void 0?`Submit`:s,l;t[0]===n?l=t[1]:(l=e=>{e.preventDefault(),n(e)},t[0]=n,t[1]=l);let u=l,d;t[2]!==o||t[3]!==i||t[4]!==a?(d=a===`failed`&&(0,L.jsx)(my,{errors:i,onClose:o}),t[2]=o,t[3]=i,t[4]=a,t[5]=d):d=t[5];let f;t[6]===r?f=t[7]:(f=r.flatMap(_S),t[6]=r,t[7]=f);let p;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,L.jsx)(Po,{height:`s`}),t[8]=p):p=t[8];let m;t[9]!==a||t[10]!==c?(m=c!=null&&(0,L.jsx)(Eo,{type:`submit`,style:{alignSelf:`flex-start`},disabled:a===`submitting`,children:a===`submitting`?`Submitting...`:c}),t[9]=a,t[10]=c,t[11]=m):m=t[11];let h;return t[12]!==u||t[13]!==d||t[14]!==f||t[15]!==m?(h=(0,L.jsxs)(Io,{as:`form`,onSubmit:u,noValidate:!0,children:[d,f,p,m]}),t[12]=u,t[13]=d,t[14]=f,t[15]=m,t[16]=h):h=t[16],h}function _S(e){return Object.keys(e.fields).map(t=>(0,L.jsx)(bv,{...e.fields[t]},t))}function vS(e){let t=(0,ea.c)(18),{table:n}=e,{pk:r}=ir(),i=r===void 0?null:r,a=er(),o=Dx(n.tableName),{data:s,isLoading:c}=kx(n.tableName,i),l;t[0]===s?l=t[1]:(l=s===void 0?{}:s,t[0]=s,t[1]=l);let u=l,d;t[2]!==o||t[3]!==a||t[4]!==i?(d=async e=>{let{values:t,isValid:n}=e;if(!n)throw new Cv({});await o.mutateAsync({pk:i,data:t}),a(`..`,{replace:!0})},t[2]=o,t[3]=a,t[4]=i,t[5]=d):d=t[5];let f=d,p=i==null?`Add row`:`Edit row ${i}`,m;t[6]===a?m=t[7]:(m=()=>a(`..`,{replace:!0}),t[6]=a,t[7]=m);let h;t[8]!==f||t[9]!==u||t[10]!==c||t[11]!==n.schema||t[12]!==n.tableName?(h=c?(0,L.jsx)(no,{}):(0,L.jsx)(Fv,{initialValues:u,schema:n.schema,name:n.tableName,component:gS,onSubmit:f}),t[8]=f,t[9]=u,t[10]=c,t[11]=n.schema,t[12]=n.tableName,t[13]=h):h=t[13];let g;return t[14]!==m||t[15]!==h||t[16]!==p?(g=(0,L.jsx)(qh,{title:p,isOpen:!0,onDismiss:m,children:h}),t[14]=m,t[15]=h,t[16]=p,t[17]=g):g=t[17],g}function yS(e){let t=(0,ea.c)(9),{table:n}=e,r=er(),i;t[0]===r?i=t[1]:(i=()=>r(`..`,{replace:!0}),t[0]=r,t[1]=i);let a=i,o=`UI for ${n.tableName}`,s;t[2]!==a||t[3]!==n?(s=(0,L.jsx)(bS,{table:n,onSubmit:a}),t[2]=a,t[3]=n,t[4]=s):s=t[4];let c;return t[5]!==a||t[6]!==o||t[7]!==s?(c=(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(qh,{title:o,onDismiss:a,children:s})}),t[5]=a,t[6]=o,t[7]=s,t[8]=c):c=t[8],c}function bS(e){let t=(0,ea.c)(14),{table:n,onSubmit:r}=e,i=oS(),a=i[n.tableName]??tS,o=sS(),s;t[0]!==n.columnNames||t[1]!==n.relatedColumnNames?(s=A_({type:`object`,properties:{displayName:{type:`string`,title:`Display name`},columns:{type:`object`,properties:Object.fromEntries(n.columnNames.concat(n.relatedColumnNames).map(SS))}}}),t[0]=n.columnNames,t[1]=n.relatedColumnNames,t[2]=s):s=t[2];let c=s,l;t[3]!==o||t[4]!==n.tableName||t[5]!==i?(l=e=>{(0,Pa.default)(e,i)||o(n.tableName,e)},t[3]=o,t[4]=n.tableName,t[5]=i,t[6]=l):l=t[6];let u=l,d;t[7]!==r||t[8]!==u?(d=async e=>{let{values:t,isValid:n,errors:i}=e;if(!n)throw new Cv(i);u(t),r()},t[7]=r,t[8]=u,t[9]=d):d=t[9];let f=d;if(!a)return null;let p=a,m;return t[10]!==f||t[11]!==c||t[12]!==p?(m=(0,L.jsx)(Fv,{initialValues:p,schema:c,onSubmit:f,render:xS}),t[10]=f,t[11]=c,t[12]=p,t[13]=m):m=t[13],m}function xS(e){return(0,L.jsx)(gS,{...e,submitButtonText:`Save`})}function SS(e){return[e,{type:`object`,title:`Column ${e}`,properties:{displayName:{type:`string`,title:`Display name`},displayType:{type:`string`,title:`Display type`,enum:[``].concat(Array.from(mx)),$bitiforms:{widget:`SelectWidget`}},visible:{type:`boolean`,title:`Visible`}},if:{properties:{displayType:{const:`format-string`}}},then:{type:`object`,properties:{valueTemplate:{title:`Value template`,type:`string`,description:`Use placeholders like {{ ${e} }}`}}}}]}function CS(e,t){return e.replace(/\{\{\s*(\w+)\s*\}\}/g,(e,n)=>{if(Object.prototype.hasOwnProperty.call(t,n)){let e=t[n];return e==null?``:String(e)}return e})}var wS=e=>(0,L.jsx)(`pre`,{style:{maxWidth:250},children:JSON.stringify(e)});function TS(e,t,n){let r=t[e];switch(n.displayType){case`format-string`:return CS(n.valueTemplate||``,t);case`yes-no`:return r?`Yes`:`No`;case`datetime`:return typeof r==`string`?Ig(new Date(r)):wS(r);case`duration`:return wS(r);case`date`:return typeof r==`string`?Ig(new Date(r),{representation:`date`}):wS(r);case`number`:return String(r);case`string`:return String(r);default:return wS(r)}}function ES(e,t,n,r){let i=t[e];if(i===null)return(0,L.jsx)($a,{style:{opacity:.4},children:`NULL`});let a=n.columnMetadata[e]||void 0,o=r[n.tableName].columns[e];if(a&&a.foreignKeys.length>0){let n=a.foreignKeys.at(0),r=i;return(0,L.jsx)(Pi,{to:`/${n?.table}/edit/${r}`,children:(0,L.jsx)($a,{children:TS(e,t,o)})})}return TS(e,t,r[n.tableName].columns[e])}var DS=o_({multi:!0});function OS(){let e=(0,ea.c)(6),{tableId:t}=ir(),n;e[0]===t?n=e[1]:(n=t===void 0?Fa():t,e[0]=t,e[1]=n);let r=n,{data:i}=Cx(),a=i?.tables[r],o=i.rowCounts[r],s;return e[2]!==o||e[3]!==a||e[4]!==r?(s=(0,L.jsx)(kS,{table:a,rowCount:o},r),e[2]=o,e[3]=a,e[4]=r,e[5]=s):s=e[5],s}function kS(e){let t=(0,ea.c)(58),{table:n,rowCount:r}=e,i=oS(),a=i[n.tableName]??tS,o=Vh(a.search,500),s=sS(),c;t[0]===a.sortBy?c=t[1]:(c={initialSortingColumns:a.sortBy},t[0]=a.sortBy,t[1]=c);let{sortColumns:l,getThProps:u}=c_(DS,c),d,f;t[2]!==s||t[3]!==l||t[4]!==n.tableName?(d=()=>{s(n.tableName,{sortBy:l})},f=[l,n.tableName,s],t[2]=s,t[3]=l,t[4]=n.tableName,t[5]=d,t[6]=f):(d=t[5],f=t[6]),(0,x.useEffect)(d,f);let p;t[7]!==l||t[8]!==a.limit||t[9]!==a.page||t[10]!==o?(p={page:a.page,limit:a.limit,order:l,search:o},t[7]=l,t[8]=a.limit,t[9]=a.page,t[10]=o,t[11]=p):p=t[11];let{data:m}=Tx(n.tableName,p),h;t[12]===a.columns?h=t[13]:(h=Object.keys(a.columns),t[12]=a.columns,t[13]=h);let g;t[14]!==a.columns||t[15]!==h?(g=h.filter(e=>a.columns[e].visible),t[14]=a.columns,t[15]=h,t[16]=g):g=t[16];let _=g;if(!n)return null;let v;t[17]===a.displayName?v=t[18]:(v=(0,L.jsx)(`h1`,{className:`dmk-text-title2`,children:a.displayName}),t[17]=a.displayName,t[18]=v);let y;t[19]===r?y=t[20]:(y=(0,L.jsxs)(`div`,{className:`dmk-text-subhead dmk-text-muted dmk-margin-top-s`,children:[r,` rows`]}),t[19]=r,t[20]=y);let b;t[21]!==v||t[22]!==y?(b=(0,L.jsxs)(`div`,{children:[v,y]}),t[21]=v,t[22]=y,t[23]=b):b=t[23];let S;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,L.jsx)(Eo,{as:Pi,to:`config`,variant:`text`,size:`s`,children:(0,L.jsx)(hS,{className:`dmk-margin-right-xs`})}),t[24]=S):S=t[24];let C;t[25]===b?C=t[26]:(C=(0,L.jsxs)(Io,{horizontal:!0,className:`dmk-margin-bottom-l`,spacing:`xs`,children:[b,S]}),t[25]=b,t[26]=C);let w;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,L.jsxs)(Eo,{as:Pi,to:`new`,variant:`outlined`,size:`s`,children:[(0,L.jsx)(ja,{className:`dmk-margin-right-xs`}),` Insert row`]}),t[27]=w):w=t[27];let T;t[28]===C?T=t[29]:(T=(0,L.jsxs)(Io,{horizontal:!0,justifyContent:`space-between`,children:[C,w]}),t[28]=C,t[29]=T);let E;t[30]!==s||t[31]!==n.tableName?(E=e=>s(n.tableName,{search:e.currentTarget.value}),t[30]=s,t[31]=n.tableName,t[32]=E):E=t[32];let D;t[33]!==a.search||t[34]!==E?(D=(0,L.jsx)(`div`,{className:`dmk-margin-bottom-l`,children:(0,L.jsx)(Bh,{value:a.search,onChange:E})}),t[33]=a.search,t[34]=E,t[35]=D):D=t[35];let O;t[36]!==u||t[37]!==a.columns||t[38]!==_?(O=()=>(0,L.jsxs)(`tr`,{children:[_.map(e=>(0,L.jsx)(`th`,{...u(e,a.columns[e].displayName)},e)),(0,L.jsx)(`th`,{style:{width:200}})]}),t[36]=u,t[37]=a.columns,t[38]=_,t[39]=O):O=t[39];let k;t[40]!==n||t[41]!==i||t[42]!==_?(k=e=>(0,L.jsx)(jS,{table:n,row:e,visibleColumns:_,tableConfig:i},String(e.id)),t[40]=n,t[41]=i,t[42]=_,t[43]=k):k=t[43];let A;t[44]!==m||t[45]!==O||t[46]!==k?(A=(0,L.jsx)(u_,{className:`database-table-browser`,children:(0,L.jsx)(d_,{renderHeaderRow:O,renderRow:k,items:m})}),t[44]=m,t[45]=O,t[46]=k,t[47]=A):A=t[47];let j;t[48]!==r||t[49]!==a.limit||t[50]!==a.page||t[51]!==n?(j=(0,L.jsx)(AS,{limit:a.limit,page:a.page,total:r,table:n}),t[48]=r,t[49]=a.limit,t[50]=a.page,t[51]=n,t[52]=j):j=t[52];let ee;return t[53]!==T||t[54]!==D||t[55]!==A||t[56]!==j?(ee=(0,L.jsxs)(`main`,{"data-detail-view":!0,children:[T,D,A,j]}),t[53]=T,t[54]=D,t[55]=A,t[56]=j,t[57]=ee):ee=t[57],ee}var AS=(0,x.memo)(function(e){let t=(0,ea.c)(26),{limit:n,page:r,total:i,table:a}=e,o=sS(),s;t[0]!==o||t[1]!==a.tableName?(s=e=>o(a.tableName,{limit:e}),t[0]=o,t[1]=a.tableName,t[2]=s):s=t[2];let c;t[3]!==o||t[4]!==a.tableName?(c=e=>o(a.tableName,{page:e}),t[3]=o,t[4]=a.tableName,t[5]=c):c=t[5];let l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=[10,50,100,500],t[6]=l):l=t[6];let u;t[7]!==n||t[8]!==r||t[9]!==s||t[10]!==c||t[11]!==i?(u=(0,L.jsx)(`div`,{className:`dmk-margin-top-l`,children:(0,L.jsx)(Tg,{limit:n,onLimitChange:s,page:r,onPageChange:c,total:i,limits:l})}),t[7]=n,t[8]=r,t[9]=s,t[10]=c,t[11]=i,t[12]=u):u=t[12];let d;t[13]===a?d=t[14]:(d=(0,L.jsx)(Br,{path:`new`,element:(0,L.jsx)(vS,{table:a})}),t[13]=a,t[14]=d);let f;t[15]===a?f=t[16]:(f=(0,L.jsx)(Br,{path:`config`,element:(0,L.jsx)(yS,{table:a})}),t[15]=a,t[16]=f);let p;t[17]===a?p=t[18]:(p=(0,L.jsx)(Br,{path:`edit/:pk`,element:(0,L.jsx)(vS,{table:a})}),t[17]=a,t[18]=p);let m;t[19]!==d||t[20]!==f||t[21]!==p?(m=(0,L.jsxs)(Hr,{children:[d,f,p]}),t[19]=d,t[20]=f,t[21]=p,t[22]=m):m=t[22];let h;return t[23]!==u||t[24]!==m?(h=(0,L.jsxs)(L.Fragment,{children:[u,m]}),t[23]=u,t[24]=m,t[25]=h):h=t[25],h}),jS=(0,x.memo)(function(e){let t=(0,ea.c)(26),{table:n,tableConfig:r,row:i,visibleColumns:a}=e,o=Ox(n.tableName),s=cg(),c;t[0]!==s||t[1]!==o||t[2]!==i.id?(c=()=>{s.value?o.mutate(String(i.id)):(s.enable(),setTimeout(()=>s.disable(),3e3))},t[0]=s,t[1]=o,t[2]=i.id,t[3]=c):c=t[3];let l=c,u=String(i.id),d;if(t[4]!==i||t[5]!==n||t[6]!==r||t[7]!==a){let e;t[9]!==i||t[10]!==n||t[11]!==r?(e=e=>(0,L.jsx)(`td`,{children:ES(e,i,n,r)},e),t[9]=i,t[10]=n,t[11]=r,t[12]=e):e=t[12],d=a.map(e),t[4]=i,t[5]=n,t[6]=r,t[7]=a,t[8]=d}else d=t[8];let f=`edit/${i.id}`,p;t[13]===f?p=t[14]:(p=(0,L.jsx)(Eo,{as:Pi,size:`s`,variant:`text`,to:f,children:`Edit`}),t[13]=f,t[14]=p);let m=s.value?`Sure?`:`Delete`,h;t[15]!==o.isPending||t[16]!==l||t[17]!==m?(h=(0,L.jsx)(Eo,{size:`s`,variant:`text`,intent:`danger`,disabled:o.isPending,onClick:l,children:m}),t[15]=o.isPending,t[16]=l,t[17]=m,t[18]=h):h=t[18];let g;t[19]!==p||t[20]!==h?(g=(0,L.jsxs)(`td`,{children:[p,h]}),t[19]=p,t[20]=h,t[21]=g):g=t[21];let _;return t[22]!==u||t[23]!==d||t[24]!==g?(_=(0,L.jsxs)(`tr`,{children:[d,g]},u),t[22]=u,t[23]=d,t[24]=g,t[25]=_):_=t[25],_}),MS=ki([{path:`/`,element:(0,L.jsx)(fS,{}),children:[{path:`:tableId/*`,element:(0,L.jsx)(OS,{}),errorElement:(0,L.jsx)(pS,{})},{index:!0,element:(0,L.jsx)(mS,{})}]}],{basename:`/${document.querySelector(`meta[name="x-basename"]`)?.getAttribute(`content`)??``}`});(0,$i.createRoot)(document.getElementById(`root`)).render((0,L.jsx)(zx,{children:(0,L.jsx)(Fr,{router:MS})}));
|