const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/stegaEncodeSourceMap-BheWRINd.js","assets/stegaClean-BGs5fC09.js","assets/browser-C0hijO98.js","assets/chunk-B3K2TuZy.js"])))=>i.map(i=>d[i]);
import{n as e,t}from"./chunk-B3K2TuZy.js";import{n,t as r}from"./stegaClean-BGs5fC09.js";(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 i=t((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 M(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,M(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,`$&/`)+`/`),M(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+=M(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+=M(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return M(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 N(e,t,n){if(e==null)return e;var r=[],i=0;return M(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function te(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 P=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)},F={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(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=F,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:te}},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,P)}catch(e){P(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`})),a=t(((e,t)=>{t.exports=i()})),o=t((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}}}})),s=t(((e,t)=>{t.exports=o()})),c=t((e=>{var t=a();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},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(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 s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=i.p;try{if(c.T=null,i.p=2,e)return e()}finally{c.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=l(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=l(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=l(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=l(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 c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.5`})),l=t(((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=c()})),u=t((e=>{var t=s(),n=a(),r=l();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 o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(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 u(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 d(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 f(e){if(c(e)!==e)throw Error(i(188))}function p(e){var t=e.alternate;if(!t){if(t=c(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 o=a.alternate;if(o===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return f(a),e;if(o===r)return f(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var s=!1,l=a.child;l;){if(l===n){s=!0,n=a,r=o;break}if(l===r){s=!0,r=a,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=a;break}if(l===r){s=!0,r=o,n=a;break}l=l.sibling}if(!s)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 m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(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 M=Symbol.for(`react.client.reference`);function N(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===M?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?N(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return N(e(t))}catch{}}return null}var te=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function ae(e){return{current:e}}function I(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function L(e,t){ie++,re[ie]=e.current,e.current=t}var oe=ae(null),se=ae(null),ce=ae(null),le=ae(null);function ue(e,t){switch(L(ce,t),L(se,e),L(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kd(t),e=qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}I(oe),L(oe,e)}function de(){I(oe),I(se),I(ce)}function fe(e){e.memoizedState!==null&&L(le,e);var t=oe.current,n=qd(t,e.type);t!==n&&(L(se,e),L(oe,n))}function pe(e){se.current===e&&(I(oe),I(se)),le.current===e&&(I(le),np._currentValue=ne)}var me,he;function ge(e){if(me===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);me=t&&t[1]||``,he=-1<e.stack.indexOf(`
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
`+me+e+he}var _e=!1;function ve(e,t){if(!e||_e)return``;_e=!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(`
`),l=s.split(`
`);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=`
`+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{_e=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ge(n):``}function ye(e,t){switch(e.tag){case 26:case 27:case 5:return ge(e.type);case 16:return ge(`Lazy`);case 13:return e.child!==t&&t!==null?ge(`Suspense Fallback`):ge(`Suspense`);case 19:return ge(`SuspenseList`);case 0:case 15:return ve(e.type,!1);case 11:return ve(e.type.render,!1);case 1:return ve(e.type,!0);case 31:return ge(`Activity`);default:return``}}function be(e){try{var t=``,n=null;do t+=ye(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
Error generating stack: `+e.message+`
`+e.stack}}var xe=Object.prototype.hasOwnProperty,Se=t.unstable_scheduleCallback,Ce=t.unstable_cancelCallback,we=t.unstable_shouldYield,Te=t.unstable_requestPaint,Ee=t.unstable_now,De=t.unstable_getCurrentPriorityLevel,Oe=t.unstable_ImmediatePriority,ke=t.unstable_UserBlockingPriority,Ae=t.unstable_NormalPriority,je=t.unstable_LowPriority,Me=t.unstable_IdlePriority,Ne=t.log,Pe=t.unstable_setDisableYieldValue,Fe=null,R=null;function Ie(e){if(typeof Ne==`function`&&Pe(e),R&&typeof R.setStrictMode==`function`)try{R.setStrictMode(Fe,e)}catch{}}var Le=Math.clz32?Math.clz32:Be,Re=Math.log,ze=Math.LN2;function Be(e){return e>>>=0,e===0?32:31-(Re(e)/ze|0)|0}var Ve=256,He=262144,Ue=4194304;function We(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 Ge(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=We(n))):i=We(o):i=We(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=We(n))):i=We(o)):i=We(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 Ke(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function z(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 qe(){var e=Ue;return Ue<<=1,!(Ue&62914560)&&(Ue=4194304),e}function Je(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ye(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xe(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-Le(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&&Ze(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ze(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Le(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Qe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Le(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function $e(e,t){var n=t&-t;return n=n&42?1:et(n),(n&(e.suspendedLanes|t))===0?n:0}function et(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 tt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function nt(){var e=F.p;return e===0?(e=window.event,e===void 0?32:vp(e.type)):e}function rt(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var it=Math.random().toString(36).slice(2),at=`__reactFiber$`+it,ot=`__reactProps$`+it,st=`__reactContainer$`+it,ct=`__reactEvents$`+it,lt=`__reactListeners$`+it,ut=`__reactHandles$`+it,dt=`__reactResources$`+it,ft=`__reactMarker$`+it;function pt(e){delete e[at],delete e[ot],delete e[ct],delete e[lt],delete e[ut]}function mt(e){var t=e[at];if(t)return t;for(var n=e.parentNode;n;){if(t=n[st]||n[at]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gf(e);e!==null;){if(n=e[at])return n;e=gf(e)}return t}e=n,n=e.parentNode}return null}function ht(e){if(e=e[at]||e[st]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function gt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function _t(e){var t=e[dt];return t||=e[dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function vt(e){e[ft]=!0}var yt=new Set,bt={};function xt(e,t){St(e,t),St(e+`Capture`,t)}function St(e,t){for(bt[e]=t,e=0;e<t.length;e++)yt.add(t[e])}var Ct=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]*$`),wt={},Tt={};function Et(e){return xe.call(Tt,e)?!0:xe.call(wt,e)?!1:Ct.test(e)?Tt[e]=!0:(wt[e]=!0,!1)}function Dt(e,t,n){if(Et(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 Ot(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 kt(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 At(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function jt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Mt(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 Nt(e){if(!e._valueTracker){var t=jt(e)?`checked`:`value`;e._valueTracker=Mt(e,t,``+e[t])}}function Pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=jt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ft(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 It=/[\n"\\]/g;function Lt(e){return e.replace(It,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Rt(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=``+At(t)):e.value!==``+At(t)&&(e.value=``+At(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Bt(e,o,At(n)):Bt(e,o,At(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=``+At(s):e.removeAttribute(`name`)}function zt(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)){Nt(e);return}n=n==null?``:``+At(n),t=t==null?n:``+At(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),Nt(e)}function Bt(e,t,n){t===`number`&&Ft(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Vt(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=``+At(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 Ht(e,t,n){if(t!=null&&(t=``+At(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+At(n)}function Ut(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(te(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=At(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Nt(e)}function Wt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gt=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 Kt(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||Gt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function qt(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&&Kt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Kt(e,o,t[o])}function Jt(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 Yt=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`]]),Xt=/^[\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 Zt(e){return Xt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Qt(){}var $t=null;function en(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tn=null,nn=null;function rn(e){var t=ht(e);if(t&&(e=t.stateNode)){var n=e[ot]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Rt(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="`+Lt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ot]||null;if(!a)throw Error(i(90));Rt(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&&Pt(r)}break a;case`textarea`:Ht(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Vt(e,!!n.multiple,t,!1)}}}var an=!1;function on(e,t,n){if(an)return e(t,n);an=!0;try{return e(t)}finally{if(an=!1,(tn!==null||nn!==null)&&(wu(),tn&&(t=tn,e=nn,nn=tn=null,rn(t),e)))for(t=0;t<e.length;t++)rn(e[t])}}function sn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ot]||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 cn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),ln=!1;if(cn)try{var un={};Object.defineProperty(un,`passive`,{get:function(){ln=!0}}),window.addEventListener(`test`,un,un),window.removeEventListener(`test`,un,un)}catch{ln=!1}var dn=null,fn=null,pn=null;function mn(){if(pn)return pn;var e,t=fn,n=t.length,r,i=`value`in dn?dn.value:dn.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 pn=i.slice(e,1<r?1-r:void 0)}function hn(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 gn(){return!0}function _n(){return!1}function vn(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)?gn:_n,this.isPropagationStopped=_n,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=gn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=gn)},persist:function(){},isPersistent:gn}),t}var yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bn=vn(yn),xn=h({},yn,{view:0,detail:0}),Sn=vn(xn),Cn,wn,Tn,En=h({},xn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ln,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!==Tn&&(Tn&&e.type===`mousemove`?(Cn=e.screenX-Tn.screenX,wn=e.screenY-Tn.screenY):wn=Cn=0,Tn=e),Cn)},movementY:function(e){return`movementY`in e?e.movementY:wn}}),Dn=vn(En),On=vn(h({},En,{dataTransfer:0})),kn=vn(h({},xn,{relatedTarget:0})),An=vn(h({},yn,{animationName:0,elapsedTime:0,pseudoElement:0})),jn=vn(h({},yn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Mn=vn(h({},yn,{data:0})),Nn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Pn={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`},Fn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function In(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fn[e])?!!t[e]:!1}function Ln(){return In}var Rn=vn(h({},xn,{key:function(e){if(e.key){var t=Nn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=hn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Pn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ln,charCode:function(e){return e.type===`keypress`?hn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?hn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),zn=vn(h({},En,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Bn=vn(h({},xn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ln})),Vn=vn(h({},yn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Hn=vn(h({},En,{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})),Un=vn(h({},yn,{newState:0,oldState:0})),Wn=[9,13,27,32],Gn=cn&&`CompositionEvent`in window,Kn=null;cn&&`documentMode`in document&&(Kn=document.documentMode);var qn=cn&&`TextEvent`in window&&!Kn,Jn=cn&&(!Gn||Kn&&8<Kn&&11>=Kn),Yn=` `,Xn=!1;function Zn(e,t){switch(e){case`keyup`:return Wn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Qn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var $n=!1;function er(e,t){switch(e){case`compositionend`:return Qn(t);case`keypress`:return t.which===32?(Xn=!0,Yn):null;case`textInput`:return e=t.data,e===Yn&&Xn?null:e;default:return null}}function tr(e,t){if($n)return e===`compositionend`||!Gn&&Zn(e,t)?(e=mn(),pn=fn=dn=null,$n=!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 Jn&&t.locale!==`ko`?null:t.data;default:return null}}var nr={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 rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!nr[e.type]:t===`textarea`}function ir(e,t,n,r){tn?nn?nn.push(r):nn=[r]:tn=r,t=Ad(t,`onChange`),0<t.length&&(n=new bn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ar=null,or=null;function sr(e){wd(e,0)}function cr(e){if(Pt(gt(e)))return e}function lr(e,t){if(e===`change`)return t}var ur=!1;if(cn){var dr;if(cn){var fr=`oninput`in document;if(!fr){var pr=document.createElement(`div`);pr.setAttribute(`oninput`,`return;`),fr=typeof pr.oninput==`function`}dr=fr}else dr=!1;ur=dr&&(!document.documentMode||9<document.documentMode)}function mr(){ar&&(ar.detachEvent(`onpropertychange`,hr),or=ar=null)}function hr(e){if(e.propertyName===`value`&&cr(or)){var t=[];ir(t,or,e,en(e)),on(sr,t)}}function gr(e,t,n){e===`focusin`?(mr(),ar=t,or=n,ar.attachEvent(`onpropertychange`,hr)):e===`focusout`&&mr()}function _r(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return cr(or)}function vr(e,t){if(e===`click`)return cr(t)}function yr(e,t){if(e===`input`||e===`change`)return cr(t)}function br(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var xr=typeof Object.is==`function`?Object.is:br;function Sr(e,t){if(xr(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(!xe.call(t,i)||!xr(e[i],t[i]))return!1}return!0}function Cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wr(e,t){var n=Cr(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=Cr(n)}}function Tr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Er(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ft(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=Ft(e.document)}return t}function Dr(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 Or=cn&&`documentMode`in document&&11>=document.documentMode,kr=null,Ar=null,jr=null,Mr=!1;function Nr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mr||kr==null||kr!==Ft(r)||(r=kr,`selectionStart`in r&&Dr(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}),jr&&Sr(jr,r)||(jr=r,r=Ad(Ar,`onSelect`),0<r.length&&(t=new bn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=kr)))}function Pr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Fr={animationend:Pr(`Animation`,`AnimationEnd`),animationiteration:Pr(`Animation`,`AnimationIteration`),animationstart:Pr(`Animation`,`AnimationStart`),transitionrun:Pr(`Transition`,`TransitionRun`),transitionstart:Pr(`Transition`,`TransitionStart`),transitioncancel:Pr(`Transition`,`TransitionCancel`),transitionend:Pr(`Transition`,`TransitionEnd`)},Ir={},Lr={};cn&&(Lr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Fr.animationend.animation,delete Fr.animationiteration.animation,delete Fr.animationstart.animation),`TransitionEvent`in window||delete Fr.transitionend.transition);function Rr(e){if(Ir[e])return Ir[e];if(!Fr[e])return e;var t=Fr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Lr)return Ir[e]=t[n];return e}var zr=Rr(`animationend`),Br=Rr(`animationiteration`),Vr=Rr(`animationstart`),Hr=Rr(`transitionrun`),Ur=Rr(`transitionstart`),Wr=Rr(`transitioncancel`),Gr=Rr(`transitionend`),Kr=new Map,qr=`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(` `);qr.push(`scrollEnd`);function Jr(e,t){Kr.set(e,t),xt(t,[e])}var Yr=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)},Xr=[],Zr=0,Qr=0;function $r(){for(var e=Zr,t=Qr=Zr=0;t<e;){var n=Xr[t];Xr[t++]=null;var r=Xr[t];Xr[t++]=null;var i=Xr[t];Xr[t++]=null;var a=Xr[t];if(Xr[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&&ri(n,i,a)}}function ei(e,t,n,r){Xr[Zr++]=e,Xr[Zr++]=t,Xr[Zr++]=n,Xr[Zr++]=r,Qr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ti(e,t,n,r){return ei(e,t,n,r),ii(e)}function ni(e,t){return ei(e,null,null,t),ii(e)}function ri(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-Le(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ii(e){if(50<hu)throw hu=0,gu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ai={};function oi(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 si(e,t,n,r){return new oi(e,t,n,r)}function ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function li(e,t){var n=e.alternate;return n===null?(n=si(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 ui(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 di(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ci(e)&&(s=1);else if(typeof e==`string`)s=qf(e,n,oe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=si(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return fi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=si(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=si(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=si(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=si(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function fi(e,t,n,r){return e=si(7,e,r,t),e.lanes=n,e}function pi(e,t,n){return e=si(6,e,null,t),e.lanes=n,e}function mi(e){var t=si(18,null,null,0);return t.stateNode=e,t}function hi(e,t,n){return t=si(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var gi=new WeakMap;function _i(e,t){if(typeof e==`object`&&e){var n=gi.get(e);return n===void 0?(t={value:e,source:t,stack:be(t)},gi.set(e,t),t):n}return{value:e,source:t,stack:be(t)}}var vi=[],yi=0,bi=null,xi=0,Si=[],Ci=0,wi=null,Ti=1,Ei=``;function Di(e,t){vi[yi++]=xi,vi[yi++]=bi,bi=e,xi=t}function Oi(e,t,n){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,wi=e;var r=Ti;e=Ei;var i=32-Le(r)-1;r&=~(1<<i),n+=1;var a=32-Le(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ti=1<<32-Le(t)+i|n<<i|r,Ei=a+e}else Ti=1<<a|n<<i|r,Ei=e}function ki(e){e.return!==null&&(Di(e,1),Oi(e,1,0))}function Ai(e){for(;e===bi;)bi=vi[--yi],vi[yi]=null,xi=vi[--yi],vi[yi]=null;for(;e===wi;)wi=Si[--Ci],Si[Ci]=null,Ei=Si[--Ci],Si[Ci]=null,Ti=Si[--Ci],Si[Ci]=null}function ji(e,t){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,Ti=t.id,Ei=t.overflow,wi=e}var Mi=null,Ni=null,B=!1,Pi=null,Fi=!1,Ii=Error(i(519));function Li(e){throw Ui(_i(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ii}function Ri(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[at]=e,t[ot]=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<Sd.length;n++)q(Sd[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),zt(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),Ut(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||Id(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=Qt),t=!0):t=!1,t||Li(e,!0)}function zi(e){for(Mi=e.return;Mi;)switch(Mi.tag){case 5:case 31:case 13:Fi=!1;return;case 27:case 3:Fi=!0;return;default:Mi=Mi.return}}function Bi(e){if(e!==Mi)return!1;if(!B)return zi(e),B=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Jd(e.type,e.memoizedProps)),n=!n),n&&Ni&&Li(e),zi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=hf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=hf(e)}else t===27?(t=Ni,nf(e.type)?(e=mf,mf=null,Ni=e):Ni=t):Ni=Mi?pf(e.stateNode.nextSibling):null;return!0}function Vi(){Ni=Mi=null,B=!1}function Hi(){var e=Pi;return e!==null&&(nu===null?nu=e:nu.push.apply(nu,e),Pi=null),e}function Ui(e){Pi===null?Pi=[e]:Pi.push(e)}var Wi=ae(null),Gi=null,Ki=null;function qi(e,t,n){L(Wi,t._currentValue),t._currentValue=n}function Ji(e){e._currentValue=Wi.current,I(Wi)}function Yi(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 Xi(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),Yi(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),Yi(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 Zi(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;xr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===le.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[np]:e.push(np))}a=a.return}e!==null&&Xi(t,e,n,r),t.flags|=262144}function Qi(e){for(e=e.firstContext;e!==null;){if(!xr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $i(e){Gi=e,Ki=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ea(e){return na(Gi,e)}function ta(e,t){return Gi===null&&$i(e),na(e,t)}function na(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ki===null){if(e===null)throw Error(i(308));Ki=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ki=Ki.next=t;return n}var ra=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()})}},ia=t.unstable_scheduleCallback,aa=t.unstable_NormalPriority,oa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sa(){return{controller:new ra,data:new Map,refCount:0}}function ca(e){e.refCount--,e.refCount===0&&ia(aa,function(){e.controller.abort()})}var la=null,ua=0,da=0,fa=null;function pa(e,t){if(la===null){var n=la=[];ua=0,da=gd(),fa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ua++,t.then(ma,ma),t}function ma(){if(--ua===0&&la!==null){fa!==null&&(fa.status=`fulfilled`);var e=la;la=null,da=0,fa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ha(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 ga=P.S;P.S=function(e,t){au=Ee(),typeof t==`object`&&t&&typeof t.then==`function`&&pa(e,t),ga!==null&&ga(e,t)};var _a=ae(null);function va(){var e=_a.current;return e===null?Ul.pooledCache:e}function ya(e,t){t===null?L(_a,_a.current):L(_a,t.pool)}function ba(){var e=va();return e===null?null:{parent:oa._currentValue,pool:e}}var xa=Error(i(460)),Sa=Error(i(474)),Ca=Error(i(542)),wa={then:function(){}};function Ta(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ea(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Qt,Qt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Aa(e),e;default:if(typeof t.status==`string`)t.then(Qt,Qt);else{if(e=Ul,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,Aa(e),e}throw Oa=t,xa}}function Da(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Oa=e,xa):e}}var Oa=null;function ka(){if(Oa===null)throw Error(i(459));var e=Oa;return Oa=null,e}function Aa(e){if(e===xa||e===Ca)throw Error(i(483))}var ja=null,Ma=0;function Na(e){var t=Ma;return Ma+=1,ja===null&&(ja=[]),Ea(ja,e,t)}function Pa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Fa(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 Ia(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=li(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=pi(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&&Da(i)===t.type)?(t=a(t,n.props),Pa(t,n),t.return=e,t):(t=di(n.type,n.key,n.props,null,e.mode,r),Pa(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=hi(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=fi(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=pi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=di(t.type,t.key,t.props,null,e.mode,n),Pa(n,t),n.return=e,n;case v:return t=hi(t,e.mode,n),t.return=e,t;case O:return t=Da(t),f(e,t,n)}if(te(t)||ee(t))return t=fi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Na(t),n);if(t.$$typeof===C)return f(e,ta(e,t),n);Fa(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=Da(n),p(e,t,n,r)}if(te(n)||ee(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Na(n),r);if(n.$$typeof===C)return p(e,t,ta(e,n),r);Fa(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=Da(r),m(e,t,n,r,i)}if(te(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,Na(r),i);if(r.$$typeof===C)return m(e,t,n,ta(t,r),i);Fa(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),B&&Di(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 B&&Di(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)}),B&&Di(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),B&&Di(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 B&&Di(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)}),B&&Di(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&&Da(l)===r.type){n(e,r.sibling),c=a(r,o.props),Pa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=fi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=di(o.type,o.key,o.props,null,e.mode,c),Pa(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=hi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Da(o),b(e,r,o,c)}if(te(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,Na(o),c);if(o.$$typeof===C)return b(e,r,ta(e,o),c);Fa(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=pi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ma=0;var i=b(e,t,n,r);return ja=null,i}catch(t){if(t===xa||t===Ca)throw t;var a=si(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var La=Ia(!0),Ra=Ia(!1),za=!1;function Ba(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Va(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 Ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,H&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ii(e),ri(e,null,n),t}return ei(e,r,t,n),ii(e)}function Wa(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,Qe(e,n)}}function Ga(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 Ka=!1;function qa(){if(Ka){var e=fa;if(e!==null)throw e}}function Ja(e,t,n,r){Ka=!1;var i=e.updateQueue;za=!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?(W&f)===f:(r&f)===f){f!==0&&f===da&&(Ka=!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:za=!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),Xl|=o,e.lanes=o,e.memoizedState=d}}function Ya(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Xa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ya(n[e],t)}var Za=ae(null),Qa=ae(0);function $a(e,t){e=Jl,L(Qa,e),L(Za,t),Jl=e|t.baseLanes}function eo(){L(Qa,Jl),L(Za,Za.current)}function to(){Jl=Qa.current,I(Za),I(Qa)}var no=ae(null),ro=null;function io(e){var t=e.alternate;L(lo,lo.current&1),L(no,e),ro===null&&(t===null||Za.current!==null||t.memoizedState!==null)&&(ro=e)}function ao(e){L(lo,lo.current),L(no,e),ro===null&&(ro=e)}function oo(e){e.tag===22?(L(lo,lo.current),L(no,e),ro===null&&(ro=e)):so(e)}function so(){L(lo,lo.current),L(no,no.current)}function co(e){I(no),ro===e&&(ro=null),I(lo)}var lo=ae(0);function uo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||uf(n)||df(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 fo=0,V=null,po=null,mo=null,ho=!1,go=!1,_o=!1,vo=0,yo=0,bo=null,xo=0;function So(){throw Error(i(321))}function Co(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xr(e[n],t[n]))return!1;return!0}function wo(e,t,n,r,i,a){return fo=a,V=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Vs:Hs,_o=!1,a=n(r,i),_o=!1,go&&(a=Eo(t,n,r,i)),To(e),a}function To(e){P.H=Bs;var t=po!==null&&po.next!==null;if(fo=0,mo=po=V=null,ho=!1,yo=0,bo=null,t)throw Error(i(300));e===null||ac||(e=e.dependencies,e!==null&&Qi(e)&&(ac=!0))}function Eo(e,t,n,r){V=e;var a=0;do{if(go&&(bo=null),yo=0,go=!1,25<=a)throw Error(i(301));if(a+=1,mo=po=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Us,o=t(n,r)}while(go);return o}function Do(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Po(t):t,e=e.useState()[0],(po===null?null:po.memoizedState)!==e&&(V.flags|=1024),t}function Oo(){var e=vo!==0;return vo=0,e}function ko(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ao(e){if(ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ho=!1}fo=0,mo=po=V=null,go=!1,yo=vo=0,bo=null}function jo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mo===null?V.memoizedState=mo=e:mo=mo.next=e,mo}function Mo(){if(po===null){var e=V.alternate;e=e===null?null:e.memoizedState}else e=po.next;var t=mo===null?V.memoizedState:mo.next;if(t!==null)mo=t,po=e;else{if(e===null)throw V.alternate===null?Error(i(467)):Error(i(310));po=e,e={memoizedState:po.memoizedState,baseState:po.baseState,baseQueue:po.baseQueue,queue:po.queue,next:null},mo===null?V.memoizedState=mo=e:mo=mo.next=e}return mo}function No(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Po(e){var t=yo;return yo+=1,bo===null&&(bo=[]),e=Ea(bo,e,t),t=V,(mo===null?t.memoizedState:mo.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Vs:Hs),e}function Fo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Po(e);if(e.$$typeof===C)return ea(e)}throw Error(i(438,String(e)))}function Io(e){var t=null,n=V.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=V.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=No(),V.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 Lo(e,t){return typeof t==`function`?t(e):t}function Ro(e){return zo(Mo(),po,e)}function zo(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?(fo&f)===f:(W&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===da&&(d=!0);else if((fo&p)===p){u=u.next,p===da&&(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,V.lanes|=p,Xl|=p;f=u.action,_o&&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,V.lanes|=f,Xl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!xr(o,e.memoizedState)&&(ac=!0,d&&(n=fa,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 Bo(e){var t=Mo(),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);xr(o,t.memoizedState)||(ac=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Vo(e,t,n){var r=V,a=Mo(),o=B;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!xr((po||a).memoizedState,n);if(s&&(a.memoizedState=n,ac=!0),a=a.queue,fs(Wo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||mo!==null&&mo.memoizedState.tag&1){if(r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,a,n,t),null),Ul===null)throw Error(i(349));o||fo&127||Ho(r,t,n)}return n}function Ho(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=V.updateQueue,t===null?(t=No(),V.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Uo(e,t,n,r){t.value=n,t.getSnapshot=r,Go(t)&&Ko(e)}function Wo(e,t,n){return n(function(){Go(t)&&Ko(e)})}function Go(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xr(e,n)}catch{return!0}}function Ko(e){var t=ni(e,2);t!==null&&yu(t,e,2)}function qo(e){var t=jo();if(typeof e==`function`){var n=e;if(e=n(),_o){Ie(!0);try{n()}finally{Ie(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:e},t}function Jo(e,t,n,r){return e.baseState=n,zo(e,po,typeof r==`function`?r:Lo)}function Yo(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)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Xo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Xo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Zo(e,t,s)}catch(n){$o(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Zo(e,t,a)}catch(n){$o(e,t,n)}}function Zo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Qo(e,t,n)},function(n){return $o(e,t,n)}):Qo(e,t,n)}function Qo(e,t,n){t.status=`fulfilled`,t.value=n,es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Xo(e,n)))}function $o(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,es(t),t=t.next;while(t!==r)}e.action=null}function es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ts(e,t){return t}function ns(e,t){if(B){var n=Ul.formState;if(n!==null){a:{var r=V;if(B){if(Ni){b:{for(var i=Ni,a=Fi;i.nodeType!==8;){if(!a){i=null;break b}if(i=pf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ni=pf(i.nextSibling),r=i.data===`F!`;break a}}Li(r)}r=!1}r&&(t=n[0])}}return n=jo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:t},n.queue=r,n=Ps.bind(null,V,r),r.dispatch=n,r=qo(!1),a=Is.bind(null,V,!1,r.queue),r=jo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Yo.bind(null,V,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function rs(e){return is(Mo(),po,e)}function is(e,t,n){if(t=zo(e,t,ts)[0],e=Ro(Lo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Po(t)}catch(e){throw e===xa?Ca:e}else r=t;t=Mo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(V.flags|=2048,ss(9,{destroy:void 0},as.bind(null,i,n),null)),[r,a,e]}function as(e,t){e.action=t}function os(e){var t=Mo(),n=po;if(n!==null)return is(t,n,e);Mo(),t=t.memoizedState,n=Mo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ss(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=V.updateQueue,t===null&&(t=No(),V.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 Mo().memoizedState}function ls(e,t,n,r){var i=jo();V.flags|=e,i.memoizedState=ss(1|t,{destroy:void 0},n,r===void 0?null:r)}function us(e,t,n,r){var i=Mo();r=r===void 0?null:r;var a=i.memoizedState.inst;po!==null&&r!==null&&Co(r,po.memoizedState.deps)?i.memoizedState=ss(t,a,n,r):(V.flags|=e,i.memoizedState=ss(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){V.flags|=4;var t=V.updateQueue;if(t===null)t=No(),V.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ms(e){var t=Mo().memoizedState;return ps({ref:t,nextImpl:e}),function(){if(H&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=Mo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Co(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Co(t,r[1]))return r[0];if(r=e(),_o){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r}function Ss(e,t,n){return n===void 0||fo&1073741824&&!(W&261930)?e.memoizedState=t:(e.memoizedState=n,e=vu(),V.lanes|=e,Xl|=e,n)}function Cs(e,t,n,r){return xr(n,t)?n:Za.current===null?!(fo&42)||fo&1073741824&&!(W&261930)?(ac=!0,e.memoizedState=n):(e=vu(),V.lanes|=e,Xl|=e,t):(e=Ss(e,n,r),xr(e,t)||(ac=!0),e)}function ws(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Is(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Fs(e,t,ha(c,r),_u(e)):Fs(e,t,r,_u(e))}catch(n){Fs(e,t,{then:function(){},status:`rejected`,reason:n},_u())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.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,ne,n===null?Ts:function(){return Os(e),n(r)})}function Ds(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,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,{},_u())}function ks(){return ea(np)}function As(){return Mo().memoizedState}function js(){return Mo().memoizedState}function Ms(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=_u();e=Ha(n);var r=Ua(t,e,n);r!==null&&(yu(r,t,n),Wa(r,t,n)),t={cache:sa()},e.payload=t;return}t=t.return}}function Ns(e,t,n){var r=_u();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ls(e)?Rs(t,n):(n=ti(e,t,n,r),n!==null&&(yu(n,e,r),zs(n,t,r)))}function Ps(e,t,n){Fs(e,t,n,_u())}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,xr(s,o))return ei(e,t,i,0),Ul===null&&$r(),!1}catch{}if(n=ti(e,t,i,r),n!==null)return yu(n,e,r),zs(n,t,r),!0}return!1}function Is(e,t,n,r){if(r={lane:2,revertLane:gd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ls(e)){if(t)throw Error(i(479))}else t=ti(e,n,r,2),t!==null&&yu(t,e,2)}function Ls(e){var t=e.alternate;return e===V||t!==null&&t===V}function Rs(e,t){go=ho=!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,Qe(e,n)}}var Bs={readContext:ea,use:Fo,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useLayoutEffect:So,useInsertionEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useSyncExternalStore:So,useId:So,useHostTransitionStatus:So,useFormState:So,useActionState:So,useOptimistic:So,useMemoCache:So,useCacheRefresh:So};Bs.useEffectEvent=So;var Vs={readContext:ea,use:Fo,useCallback:function(e,t){return jo().memoizedState=[e,t===void 0?null:t],e},useContext:ea,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=jo();t=t===void 0?null:t;var r=e();if(_o){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=jo();if(n!==void 0){var i=n(t);if(_o){Ie(!0);try{n(t)}finally{Ie(!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,V,e),[r.memoizedState,e]},useRef:function(e){var t=jo();return e={current:e},t.memoizedState=e},useState:function(e){e=qo(e);var t=e.queue,n=Ps.bind(null,V,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ys,useDeferredValue:function(e,t){return Ss(jo(),e,t)},useTransition:function(){var e=qo(!1);return e=ws.bind(null,V,e.queue,!0,!1),jo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=V,a=jo();if(B){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ul===null)throw Error(i(349));W&127||Ho(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ds(Wo.bind(null,r,o,e),[e]),r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,o,n,t),null),n},useId:function(){var e=jo(),t=Ul.identifierPrefix;if(B){var n=Ei,r=Ti;n=(r&~(1<<32-Le(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ks,useFormState:ns,useActionState:ns,useOptimistic:function(e){var t=jo();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,V,!0,n),n.dispatch=t,[e,t]},useMemoCache:Io,useCacheRefresh:function(){return jo().memoizedState=Ms.bind(null,V)},useEffectEvent:function(e){var t=jo(),n={impl:e};return t.memoizedState=n,function(){if(H&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Hs={readContext:ea,use:Fo,useCallback:bs,useContext:ea,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Ro,useRef:cs,useState:function(){return Ro(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){return Cs(Mo(),po.memoizedState,e,t)},useTransition:function(){var e=Ro(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:As,useHostTransitionStatus:ks,useFormState:rs,useActionState:rs,useOptimistic:function(e,t){return Jo(Mo(),po,e,t)},useMemoCache:Io,useCacheRefresh:js};Hs.useEffectEvent=ms;var Us={readContext:ea,use:Fo,useCallback:bs,useContext:ea,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Bo,useRef:cs,useState:function(){return Bo(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){var n=Mo();return po===null?Ss(n,e,t):Cs(n,po.memoizedState,e,t)},useTransition:function(){var e=Bo(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:As,useHostTransitionStatus:ks,useFormState:os,useActionState:os,useOptimistic:function(e,t){var n=Mo();return po===null?(n.baseState=e,[e,n.queue.dispatch]):Jo(n,po,e,t)},useMemoCache:Io,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 Gs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_u(),i=Ha(r);i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(yu(t,e,r),Wa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_u(),i=Ha(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(yu(t,e,r),Wa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_u(),r=Ha(n);r.tag=2,t!=null&&(r.callback=t),t=Ua(e,r,n),t!==null&&(yu(t,e,n),Wa(t,e,n))}};function Ks(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?!Sr(n,r)||!Sr(i,a):!0}function qs(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&&Gs.enqueueReplaceState(t,t.state,null)}function Js(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 Ys(e){Yr(e)}function Xs(e){console.error(e)}function Zs(e){Yr(e)}function Qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function $s(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 ec(e,t,n){return n=Ha(n),n.tag=3,n.payload={element:null},n.callback=function(){Qs(e,t)},n}function tc(e){return e=Ha(e),e.tag=3,e}function nc(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(){$s(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){$s(t,n,r),typeof i!=`function`&&(su===null?su=new Set([this]):su.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function rc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Zi(t,n,a,!0),n=no.current,n!==null){switch(n.tag){case 31:case 13:return ro===null?ju():n.alternate===null&&Yl===0&&(Yl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===wa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Xu(e,r,a)),!1;case 22:return n.flags|=65536,r===wa?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)),Xu(e,r,a)),!1}throw Error(i(435,n.tag))}return Xu(e,r,a),ju(),!1}if(B)return t=no.current,t===null?(r!==Ii&&(t=Error(i(423),{cause:r}),Ui(_i(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=_i(r,n),a=ec(e.stateNode,r,a),Ga(e,a),Yl!==4&&(Yl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ii&&(e=Error(i(422),{cause:r}),Ui(_i(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=_i(o,n),tu===null?tu=[o]:tu.push(o),Yl!==4&&(Yl=2),t===null)return!0;r=_i(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=ec(n.stateNode,r,e),Ga(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`&&(su===null||!su.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=tc(a),nc(a,e,n,r),Ga(n,a),!1}n=n.return}while(n!==null);return!1}var ic=Error(i(461)),ac=!1;function oc(e,t,n,r){t.child=e===null?Ra(t,null,n,r):La(t,e.child,n,r)}function sc(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 $i(t),r=wo(e,t,n,o,a,i),s=Oo(),e!==null&&!ac?(ko(e,t,i),jc(e,t,i)):(B&&s&&ki(t),t.flags|=1,oc(e,t,r,i),t.child)}function cc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ci(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,lc(e,t,a,r,i)):(e=di(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Mc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Sr:n,n(o,r)&&e.ref===t.ref)return jc(e,t,i)}return t.flags|=1,e=li(a,r),e.ref=t.ref,e.return=t,t.child=e}function lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Sr(a,r)&&e.ref===t.ref)if(ac=!1,t.pendingProps=r=a,Mc(e,i))e.flags&131072&&(ac=!0);else return t.lanes=e.lanes,jc(e,t,i)}return _c(e,t,n,r,i)}function uc(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 fc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ya(t,a===null?null:a.cachePool),a===null?eo():$a(t,a),oo(t);else return r=t.lanes=536870912,fc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ya(t,null),eo(),so(t)):(ya(t,a.cachePool),$a(t,a),so(t),t.memoizedState=null);return oc(e,t,i,n),t.child}function dc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fc(e,t,n,r,i){var a=va();return a=a===null?null:{parent:oa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ya(t,null),eo(),oo(t),e!==null&&Zi(e,t,r,!0),t.childLanes=i,null}function pc(e,t){return t=Ec({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function mc(e,t,n){return La(t,e.child,null,n),e=pc(t,t.pendingProps),e.flags|=2,co(t),t.memoizedState=null,e}function hc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(B){if(r.mode===`hidden`)return e=pc(t,r),t.lanes=536870912,dc(null,e);if(ao(t),(e=Ni)?(e=lf(e,Fi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Li(t);return t.lanes=536870912,null}return pc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ao(t),a)if(t.flags&256)t.flags&=-257,t=mc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ac||Zi(e,t,n,!1),a=(n&e.childLanes)!==0,ac||a){if(r=Ul,r!==null&&(s=$e(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ni(e,s),yu(r,e,s),ic;ju(),t=mc(e,t,n)}else e=o.treeContext,Ni=pf(s.nextSibling),Mi=t,B=!0,Pi=null,Fi=!1,e!==null&&ji(t,e),t=pc(t,r),t.flags|=4096;return t}return e=li(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function gc(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 _c(e,t,n,r,i){return $i(t),n=wo(e,t,n,r,void 0,i),r=Oo(),e!==null&&!ac?(ko(e,t,i),jc(e,t,i)):(B&&r&&ki(t),t.flags|=1,oc(e,t,n,i),t.child)}function vc(e,t,n,r,i,a){return $i(t),t.updateQueue=null,n=Eo(t,r,n,i),To(e),r=Oo(),e!==null&&!ac?(ko(e,t,a),jc(e,t,a)):(B&&r&&ki(t),t.flags|=1,oc(e,t,n,a),t.child)}function yc(e,t,n,r,i){if($i(t),t.stateNode===null){var a=ai,o=n.contextType;typeof o==`object`&&o&&(a=ea(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Gs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ba(t),o=n.contextType,a.context=typeof o==`object`&&o?ea(o):ai,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&&Gs.enqueueReplaceState(a,a.state,null),Ja(t,r,a,i),qa(),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=Js(n,s);a.props=c;var l=a.context,u=n.contextType;o=ai,typeof u==`object`&&u&&(o=ea(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)&&qs(t,a,r,o),za=!1;var f=t.memoizedState;a.state=f,Ja(t,r,a,i),qa(),l=t.memoizedState,s||f!==l||za?(typeof d==`function`&&(Ws(t,n,d,r),l=t.memoizedState),(c=za||Ks(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,Va(e,t),o=t.memoizedProps,u=Js(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ai,typeof l==`object`&&l&&(c=ea(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)&&qs(t,a,r,c),za=!1,f=t.memoizedState,a.state=f,Ja(t,r,a,i),qa();var p=t.memoizedState;o!==d||f!==p||za||e!==null&&e.dependencies!==null&&Qi(e.dependencies)?(typeof s==`function`&&(Ws(t,n,s,r),p=t.memoizedState),(u=za||Ks(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Qi(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,gc(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=La(t,e.child,null,i),t.child=La(t,null,n,i)):oc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=jc(e,t,i),e}function bc(e,t,n,r){return Vi(),t.flags|=256,oc(e,t,n,r),t.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(e){return{baseLanes:e,cachePool:ba()}}function Cc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=$l),e}function wc(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:(lo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(B){if(a?io(t):so(t),(e=Ni)?(e=lf(e,Fi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=mi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Li(t);return df(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(so(t),a=t.mode,c=Ec({mode:`hidden`,children:c},a),r=fi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(null,r)):(io(t),Tc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(io(t),t.flags&=-257,t=Dc(e,t,n)):t.memoizedState===null?(so(t),c=r.fallback,a=t.mode,r=Ec({mode:`visible`,children:r.children},a),c=fi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,La(t,e.child,null,n),r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,t=dc(null,r)):(so(t),t.child=e.child,t.flags|=128,t=null);else if(io(t),df(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ui({value:r,source:null,stack:null}),t=Dc(e,t,n)}else if(ac||Zi(e,t,n,!1),s=(n&e.childLanes)!==0,ac||s){if(s=Ul,s!==null&&(r=$e(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ni(e,r),yu(s,e,r),ic;uf(c)||ju(),t=Dc(e,t,n)}else uf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ni=pf(c.nextSibling),Mi=t,B=!0,Pi=null,Fi=!1,e!==null&&ji(t,e),t=Tc(t,r.children),t.flags|=4096);return t}return a?(so(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=li(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=fi(c,a,n,null),c.flags|=2):c=li(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,dc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Sc(n):(a=c.cachePool,a===null?a=ba():(l=oa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(e.child,r)):(io(t),n=e.child,e=n.sibling,n=li(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 Tc(e,t){return t=Ec({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Ec(e,t){return e=si(22,e,null,t),e.lanes=0,e}function Dc(e,t,n){return La(t,e.child,null,n),e=Tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Oc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Yi(e.return,t,n)}function kc(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 Ac(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=lo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,L(lo,o),oc(e,t,r,n),r=B?xi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Oc(e,n,t);else if(e.tag===19)Oc(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&&uo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),kc(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&&uo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}kc(t,!0,n,null,a,r);break;case`together`:kc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function jc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Zi(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=li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Mc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Qi(e))):!0}function Nc(e,t,n){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),qi(t,oa,e.memoizedState.cache),Vi();break;case 27:case 5:fe(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:qi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ao(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(io(t),e=jc(e,t,n),e===null?null:e.sibling):wc(e,t,n):(io(t),t.flags|=128,null);io(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Zi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ac(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),L(lo,lo.current),r)break;return null;case 22:return t.lanes=0,uc(e,t,n,t.pendingProps);case 24:qi(t,oa,e.memoizedState.cache)}return jc(e,t,n)}function Pc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ac=!0;else{if(!Mc(e,n)&&!(t.flags&128))return ac=!1,Nc(e,t,n);ac=!!(e.flags&131072)}else ac=!1,B&&t.flags&1048576&&Oi(t,xi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Da(t.elementType),t.type=e,typeof e==`function`)ci(e)?(r=Js(e,r),t.tag=1,t=yc(null,t,e,r,n)):(t.tag=0,t=_c(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=sc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=cc(null,t,e,r,n);break a}}throw t=N(e)||e,Error(i(306,t,``))}}return t;case 0:return _c(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Js(r,t.pendingProps),yc(e,t,r,a,n);case 3:a:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Va(e,t),Ja(t,r,null,n);var s=t.memoizedState;if(r=s.cache,qi(t,oa,r),r!==o.cache&&Xi(t,[oa],n,!0),qa(),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=bc(e,t,r,n);break a}else if(r!==a){a=_i(Error(i(424)),t),Ui(a),t=bc(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(Ni=pf(e.firstChild),Mi=t,B=!0,Pi=null,Fi=!0,n=Ra(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Vi(),r===a){t=jc(e,t,n);break a}oc(e,t,r,n)}t=t.child}return t;case 26:return gc(e,t),e===null?(n=Nf(t.type,null,t.pendingProps,null))?t.memoizedState=n:B||(n=t.type,e=t.pendingProps,r=Gd(ce.current).createElement(n),r[at]=t,r[ot]=e,zd(r,n,e),vt(r),t.stateNode=r):t.memoizedState=Nf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fe(t),e===null&&B&&(r=t.stateNode=_f(t.type,t.pendingProps,ce.current),Mi=t,Fi=!0,a=Ni,nf(t.type)?(mf=a,Ni=pf(r.firstChild)):Ni=a),oc(e,t,t.pendingProps.children,n),gc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&B&&((a=r=Ni)&&(r=sf(r,t.type,t.pendingProps,Fi),r===null?a=!1:(t.stateNode=r,Mi=t,Ni=pf(r.firstChild),Fi=!1,a=!0)),a||Li(t)),fe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Jd(a,o)?r=null:s!==null&&Jd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=wo(e,t,Do,null,null,n),np._currentValue=a),gc(e,t),oc(e,t,r,n),t.child;case 6:return e===null&&B&&((e=n=Ni)&&(n=cf(n,t.pendingProps,Fi),n===null?e=!1:(t.stateNode=n,Mi=t,Ni=null,e=!0)),e||Li(t)),null;case 13:return wc(e,t,n);case 4:return ue(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=La(t,null,r,n):oc(e,t,r,n),t.child;case 11:return sc(e,t,t.type,t.pendingProps,n);case 7:return oc(e,t,t.pendingProps,n),t.child;case 8:return oc(e,t,t.pendingProps.children,n),t.child;case 12:return oc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,qi(t,t.type,r.value),oc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,$i(t),a=ea(a),r=r(a),t.flags|=1,oc(e,t,r,n),t.child;case 14:return cc(e,t,t.type,t.pendingProps,n);case 15:return lc(e,t,t.type,t.pendingProps,n);case 19:return Ac(e,t,n);case 31:return hc(e,t,n);case 22:return uc(e,t,n,t.pendingProps);case 24:return $i(t),r=ea(oa),e===null?(a=va(),a===null&&(a=Ul,o=sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ba(t),qi(t,oa,a)):((e.lanes&n)!==0&&(Va(e,t),Ja(t,null,null,n),qa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,qi(t,oa,r),r!==a.cache&&Xi(t,[oa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),qi(t,oa,r))),oc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Fc(e){e.flags|=4}function Ic(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(Ou())e.flags|=8192;else throw Oa=wa,Sa}else e.flags&=-16777217}function Lc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Jf(t))if(Ou())e.flags|=8192;else throw Oa=wa,Sa}function Rc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:qe(),e.lanes|=t,eu|=t)}function zc(e,t){if(!B)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 Bc(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 Vc(e,t,n){var r=t.pendingProps;switch(Ai(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bc(t),null;case 1:return Bc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ji(oa),de(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Bi(t)?Fc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Hi())),Bc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Fc(t),o===null?(Bc(t),Ic(t,a,null,r,n)):(Bc(t),Lc(t,o))):o?o===e.memoizedState?(Bc(t),t.flags&=-16777217):(Fc(t),Bc(t),Lc(t,o)):(e=e.memoizedProps,e!==r&&Fc(t),Bc(t),Ic(t,a,e,r,n)),null;case 27:if(pe(t),n=ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Bc(t),null}e=oe.current,Bi(t)?Ri(t,e):(e=_f(a,r,n),t.stateNode=e,Fc(t))}return Bc(t),null;case 5:if(pe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Bc(t),null}if(o=oe.current,Bi(t))Ri(t,o);else{var s=Gd(ce.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[at]=t,o[ot]=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(zd(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&&Fc(t)}}return Bc(t),Ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ce.current,Bi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Mi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[at]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Id(e.nodeValue,n)),e||Li(t,!0)}else e=Gd(e).createTextNode(r),e[at]=t,t.stateNode=e}return Bc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Bi(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[at]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bc(t),e=!1}else n=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(co(t),t):(co(t),null);if(t.flags&128)throw Error(i(558))}return Bc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Bi(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[at]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bc(t),a=!1}else a=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(co(t),t):(co(t),null)}return co(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),Rc(t,t.updateQueue),Bc(t),null);case 4:return de(),e===null&&Dd(t.stateNode.containerInfo),Bc(t),null;case 10:return Ji(t.type),Bc(t),null;case 19:if(I(lo),r=t.memoizedState,r===null)return Bc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)zc(r,!1);else{if(Yl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=uo(e),o!==null){for(t.flags|=128,zc(r,!1),e=o.updateQueue,t.updateQueue=e,Rc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ui(n,e),n=n.sibling;return L(lo,lo.current&1|2),B&&Di(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ee()>K&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304)}else{if(!a)if(e=uo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Rc(t,e),zc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!B)return Bc(t),null}else 2*Ee()-r.renderingStartTime>K&&n!==536870912&&(t.flags|=128,a=!0,zc(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?(Bc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ee(),e.sibling=null,n=lo.current,L(lo,a?n&1|2:n&1),B&&Di(t,r.treeForkCount),e);case 22:case 23:return co(t),to(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Bc(t),t.subtreeFlags&6&&(t.flags|=8192)):Bc(t),n=t.updateQueue,n!==null&&Rc(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&&I(_a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ji(oa),Bc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Hc(e,t){switch(Ai(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ji(oa),de(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pe(t),null;case 31:if(t.memoizedState!==null){if(co(t),t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(co(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(lo),null;case 4:return de(),null;case 10:return Ji(t.type),null;case 22:case 23:return co(t),to(),e!==null&&I(_a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ji(oa),null;case 25:return null;default:return null}}function Uc(e,t){switch(Ai(t),t.tag){case 3:Ji(oa),de();break;case 26:case 27:case 5:pe(t);break;case 4:de();break;case 31:t.memoizedState!==null&&co(t);break;case 13:co(t);break;case 19:I(lo);break;case 10:Ji(t.type);break;case 22:case 23:co(t),to(),e!==null&&I(_a);break;case 24:Ji(oa)}}function Wc(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){Yu(t,t.return,e)}}function Gc(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){Yu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Yu(t,t.return,e)}}function Kc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Xa(t,n)}catch(t){Yu(e,e.return,t)}}}function qc(e,t,n){n.props=Js(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Yu(e,t,n)}}function Jc(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){Yu(e,t,n)}}function Yc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Yu(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){Yu(e,t,n)}else n.current=null}function Xc(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){Yu(e,e.return,t)}}function Zc(e,t,n){try{var r=e.stateNode;Bd(r,e.type,n,t),r[ot]=t}catch(t){Yu(e,e.return,t)}}function Qc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&nf(e.type)||e.tag===4}function $c(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Qc(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&&nf(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 el(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=Qt));else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(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&&nf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(tl(e,t,n),e=e.sibling;e!==null;)tl(e,t,n),e=e.sibling}function nl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zd(t,r,n),t[at]=e,t[ot]=n}catch(t){Yu(e,e.return,t)}}var rl=!1,il=!1,al=!1,ol=typeof WeakSet==`function`?WeakSet:Set,sl=null;function cl(e,t){if(e=e.containerInfo,Ud=dp,e=Er(e),Dr(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(Wd={focusedElem:e,selectionRange:n},dp=!1,sl=t;sl!==null;)if(t=sl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,sl=e;else for(;sl!==null;){switch(t=sl,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=Js(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Yu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)of(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:of(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,sl=e;break}sl=t.return}}function ll(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:wl(e,n),r&4&&Wc(5,n);break;case 1:if(wl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Yu(n,n.return,e)}else{var i=Js(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Yu(n,n.return,e)}}r&64&&Kc(n),r&512&&Jc(n,n.return);break;case 3:if(wl(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{Xa(e,t)}catch(e){Yu(n,n.return,e)}}break;case 27:t===null&&r&4&&nl(n);case 26:case 5:wl(e,n),t===null&&r&4&&Xc(n),r&512&&Jc(n,n.return);break;case 12:wl(e,n);break;case 31:wl(e,n),r&4&&hl(e,n);break;case 13:wl(e,n),r&4&&gl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=$u.bind(null,n),ff(e,n))));break;case 22:if(r=n.memoizedState!==null||rl,!r){t=t!==null&&t.memoizedState!==null||il,i=rl;var a=il;rl=r,(il=t)&&!a?El(e,n,(n.subtreeFlags&8772)!=0):wl(e,n),rl=i,il=a}break;case 30:break;default:wl(e,n)}}function ul(e){var t=e.alternate;t!==null&&(e.alternate=null,ul(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pt(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 dl=null,fl=!1;function pl(e,t,n){for(n=n.child;n!==null;)ml(e,t,n),n=n.sibling}function ml(e,t,n){if(R&&typeof R.onCommitFiberUnmount==`function`)try{R.onCommitFiberUnmount(Fe,n)}catch{}switch(n.tag){case 26:il||Yc(n,t),pl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:il||Yc(n,t);var r=dl,i=fl;nf(n.type)&&(dl=n.stateNode,fl=!1),pl(e,t,n),vf(n.stateNode),dl=r,fl=i;break;case 5:il||Yc(n,t);case 6:if(r=dl,i=fl,dl=null,pl(e,t,n),dl=r,fl=i,dl!==null)if(fl)try{(dl.nodeType===9?dl.body:dl.nodeName===`HTML`?dl.ownerDocument.body:dl).removeChild(n.stateNode)}catch(e){Yu(n,t,e)}else try{dl.removeChild(n.stateNode)}catch(e){Yu(n,t,e)}break;case 18:dl!==null&&(fl?(e=dl,rf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Lp(e)):rf(dl,n.stateNode));break;case 4:r=dl,i=fl,dl=n.stateNode.containerInfo,fl=!0,pl(e,t,n),dl=r,fl=i;break;case 0:case 11:case 14:case 15:Gc(2,n,t),il||Gc(4,n,t),pl(e,t,n);break;case 1:il||(Yc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&qc(n,t,r)),pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:il=(r=il)||n.memoizedState!==null,pl(e,t,n),il=r;break;default:pl(e,t,n)}}function hl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Lp(e)}catch(e){Yu(t,t.return,e)}}}function gl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Lp(e)}catch(e){Yu(t,t.return,e)}}function _l(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ol),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ol),t;default:throw Error(i(435,e.tag))}}function vl(e,t){var n=_l(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=ed.bind(null,e,t);t.then(r,r)}})}function yl(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(nf(c.type)){dl=c.stateNode,fl=!1;break a}break;case 5:dl=c.stateNode,fl=!1;break a;case 3:case 4:dl=c.stateNode.containerInfo,fl=!0;break a}c=c.return}if(dl===null)throw Error(i(160));ml(o,s,a),dl=null,fl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)xl(t,e),t=t.sibling}var bl=null;function xl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:yl(t,e),Sl(e),r&4&&(Gc(3,e,e.return),Wc(3,e),Gc(5,e,e.return));break;case 1:yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),r&64&&rl&&(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=bl;if(yl(t,e),Sl(e),r&512&&(il||n===null||Yc(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[ft]||o[at]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),zd(o,r,n),o[at]=e,vt(o),r=o;break a;case`link`:var s=Gf(`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),zd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Gf(`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),zd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[at]=e,vt(o),r=o}e.stateNode=r}else Kf(a,e.type,e.stateNode);else e.stateNode=Bf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Zc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Kf(a,e.type,e.stateNode):Bf(a,r,e.memoizedProps))}break;case 27:yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),n!==null&&r&4&&Zc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),e.flags&32){a=e.stateNode;try{Wt(a,``)}catch(t){Yu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Zc(e,a,n===null?a:n.memoizedProps)),r&1024&&(al=!0);break;case 6:if(yl(t,e),Sl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Yu(e,e.return,t)}}break;case 3:if(Wf=null,a=bl,bl=xf(t.containerInfo),yl(t,e),bl=a,Sl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Lp(t.containerInfo)}catch(t){Yu(e,e.return,t)}al&&(al=!1,Cl(e));break;case 4:r=bl,bl=xf(e.stateNode.containerInfo),yl(t,e),Sl(e),bl=r;break;case 12:yl(t,e),Sl(e);break;case 31:yl(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 13:yl(t,e),Sl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(iu=Ee()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=rl,d=il;if(rl=u||a,il=d||l,yl(t,e),il=d,rl=u,Sl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||rl||il||Tl(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){Yu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Yu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?af(m,!0):af(l.stateNode,!1)}catch(e){Yu(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,vl(e,n))));break;case 19:yl(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 30:break;case 21:break;default:yl(t,e),Sl(e)}}function Sl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Qc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;tl(e,$c(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Wt(o,``),n.flags&=-33),tl(e,$c(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;el(e,$c(e),s);break;default:throw Error(i(161))}}catch(t){Yu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Cl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Cl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ll(e,t.alternate,t),t=t.sibling}function Tl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Gc(4,t,t.return),Tl(t);break;case 1:Yc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&qc(t,t.return,n),Tl(t);break;case 27:vf(t.stateNode);case 26:case 5:Yc(t,t.return),Tl(t);break;case 22:t.memoizedState===null&&Tl(t);break;case 30:Tl(t);break;default:Tl(t)}e=e.sibling}}function El(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:El(i,a,n),Wc(4,a);break;case 1:if(El(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Yu(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++)Ya(c[i],s)}catch(e){Yu(r,r.return,e)}}n&&o&64&&Kc(a),Jc(a,a.return);break;case 27:nl(a);case 26:case 5:El(i,a,n),n&&r===null&&o&4&&Xc(a),Jc(a,a.return);break;case 12:El(i,a,n);break;case 31:El(i,a,n),n&&o&4&&hl(i,a);break;case 13:El(i,a,n),n&&o&4&&gl(i,a);break;case 22:a.memoizedState===null&&El(i,a,n),Jc(a,a.return);break;case 30:break;default:El(i,a,n)}t=t.sibling}}function Dl(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&&ca(n))}function Ol(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ca(e))}function kl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Al(e,t,n,r),t=t.sibling}function Al(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:kl(e,t,n,r),i&2048&&Wc(9,t);break;case 1:kl(e,t,n,r);break;case 3:kl(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&&ca(e)));break;case 12:if(i&2048){kl(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){Yu(t,t.return,e)}}else kl(e,t,n,r);break;case 31:kl(e,t,n,r);break;case 13:kl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?kl(e,t,n,r):(a._visibility|=2,jl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?kl(e,t,n,r):Ml(e,t),i&2048&&Dl(o,t);break;case 24:kl(e,t,n,r),i&2048&&Ol(t.alternate,t);break;default:kl(e,t,n,r)}}function jl(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:jl(a,o,s,c,i),Wc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,jl(a,o,s,c,i)):u._visibility&2?jl(a,o,s,c,i):Ml(a,o),i&&l&2048&&Dl(o.alternate,o);break;case 24:jl(a,o,s,c,i),i&&l&2048&&Ol(o.alternate,o);break;default:jl(a,o,s,c,i)}t=t.sibling}}function Ml(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:Ml(n,r),i&2048&&Dl(r.alternate,r);break;case 24:Ml(n,r),i&2048&&Ol(r.alternate,r);break;default:Ml(n,r)}t=t.sibling}}var Nl=8192;function Pl(e,t,n){if(e.subtreeFlags&Nl)for(e=e.child;e!==null;)Fl(e,t,n),e=e.sibling}function Fl(e,t,n){switch(e.tag){case 26:Pl(e,t,n),e.flags&Nl&&e.memoizedState!==null&&Yf(n,bl,e.memoizedState,e.memoizedProps);break;case 5:Pl(e,t,n);break;case 3:case 4:var r=bl;bl=xf(e.stateNode.containerInfo),Pl(e,t,n),bl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Nl,Nl=16777216,Pl(e,t,n),Nl=r):Pl(e,t,n));break;default:Pl(e,t,n)}}function Il(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 Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sl=r,Bl(r,e)}Il(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rl(e),e=e.sibling}function Rl(e){switch(e.tag){case 0:case 11:case 15:Ll(e),e.flags&2048&&Gc(9,e,e.return);break;case 3:Ll(e);break;case 12:Ll(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zl(e)):Ll(e);break;default:Ll(e)}}function zl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sl=r,Bl(r,e)}Il(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Gc(8,t,t.return),zl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zl(t));break;default:zl(t)}e=e.sibling}}function Bl(e,t){for(;sl!==null;){var n=sl;switch(n.tag){case 0:case 11:case 15:Gc(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:ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,sl=r;else a:for(n=e;sl!==null;){r=sl;var i=r.sibling,a=r.return;if(ul(r),r===n){sl=null;break a}if(i!==null){i.return=a,sl=i;break a}sl=a}}}var Vl={getCacheForType:function(e){var t=ea(oa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ea(oa).controller.signal}},Hl=typeof WeakMap==`function`?WeakMap:Map,H=0,Ul=null,U=null,W=0,G=0,Wl=null,Gl=!1,Kl=!1,ql=!1,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=null,nu=null,ru=!1,iu=0,au=0,K=1/0,ou=null,su=null,cu=0,lu=null,uu=null,du=0,fu=0,pu=null,mu=null,hu=0,gu=null;function _u(){return H&2&&W!==0?W&-W:P.T===null?nt():gd()}function vu(){if($l===0)if(!(W&536870912)||B){var e=He;He<<=1,!(He&3932160)&&(He=262144),$l=e}else $l=536870912;return e=no.current,e!==null&&(e.flags|=32),$l}function yu(e,t,n){(e===Ul&&(G===2||G===9)||e.cancelPendingCommit!==null)&&(Eu(e,0),Cu(e,W,$l,!1)),Ye(e,n),(!(H&2)||e!==Ul)&&(e===Ul&&(!(H&2)&&(Zl|=n),Yl===4&&Cu(e,W,$l,!1)),cd(e))}function bu(e,t,n){if(H&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ke(e,t),a=r?Pu(e,t):Mu(e,t,!0),o=r;do{if(a===0){Kl&&!r&&Cu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Su(n)){a=Mu(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=tu;var l=c.current.memoizedState.isDehydrated;if(l&&(Eu(c,s).flags|=256),s=Mu(c,s,!1),s!==2){if(ql&&!l){c.errorRecoveryDisabledLanes|=o,Zl|=o,a=4;break a}o=nu,nu=a,o!==null&&(nu===null?nu=o:nu.push.apply(nu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Eu(e,0),Cu(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:Cu(r,t,$l,!Gl);break a;case 2:nu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=iu+300-Ee(),10<a)){if(Cu(r,t,$l,!Gl),Ge(r,0,!0)!==0)break a;du=t,r.timeoutHandle=Zd(xu.bind(null,r,n,nu,ou,ru,t,$l,Zl,eu,Gl,o,`Throttled`,-0,0),a);break a}xu(r,n,nu,ou,ru,t,$l,Zl,eu,Gl,o,null,-0,0)}}break}while(1);cd(e)}function xu(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:Qt},Fl(t,a,d);var m=(a&62914560)===a?iu-Ee():(a&4194048)===a?au-Ee():0;if(m=Zf(d,m),m!==null){du=a,e.cancelPendingCommit=m(Vu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Cu(e,a,o,!l);return}}Vu(e,t,a,n,r,i,o,s,c)}function Su(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(!xr(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 Cu(e,t,n,r){t&=~Ql,t&=~Zl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Le(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ze(e,n,t)}function wu(){return H&6?!0:(ld(0,!1),!1)}function Tu(){if(U!==null){if(G===0)var e=U.return;else e=U,Ki=Gi=null,Ao(e),ja=null,Ma=0,e=U;for(;e!==null;)Uc(e.alternate,e),e=e.return;U=null}}function Eu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),du=0,Tu(),Ul=e,U=n=li(e.current,null),W=t,G=0,Wl=null,Gl=!1,Kl=Ke(e,t),ql=!1,eu=$l=Ql=Zl=Xl=Yl=0,nu=tu=null,ru=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Le(r),a=1<<i;t|=e[i],r&=~a}return Jl=t,$r(),n}function Du(e,t){V=null,P.H=Bs,t===xa||t===Ca?(t=ka(),G=3):t===Sa?(t=ka(),G=4):G=t===ic?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Wl=t,U===null&&(Yl=1,Qs(e,_i(t,e.current)))}function Ou(){var e=no.current;return e===null?!0:(W&4194048)===W?ro===null:(W&62914560)===W||W&536870912?e===ro:!1}function ku(){var e=P.H;return P.H=Bs,e===null?Bs:e}function Au(){var e=P.A;return P.A=Vl,e}function ju(){Yl=4,Gl||(W&4194048)!==W&&no.current!==null||(Kl=!0),!(Xl&134217727)&&!(Zl&134217727)||Ul===null||Cu(Ul,W,$l,!1)}function Mu(e,t,n){var r=H;H|=2;var i=ku(),a=Au();(Ul!==e||W!==t)&&(ou=null,Eu(e,t)),t=!1;var o=Yl;a:do try{if(G!==0&&U!==null){var s=U,c=Wl;switch(G){case 8:Tu(),o=6;break a;case 3:case 2:case 9:case 6:no.current===null&&(t=!0);var l=G;if(G=0,Wl=null,Ru(e,s,c,l),n&&Kl){o=0;break a}break;default:l=G,G=0,Wl=null,Ru(e,s,c,l)}}Nu(),o=Yl;break}catch(t){Du(e,t)}while(1);return t&&e.shellSuspendCounter++,Ki=Gi=null,H=r,P.H=i,P.A=a,U===null&&(Ul=null,W=0,$r()),o}function Nu(){for(;U!==null;)Iu(U)}function Pu(e,t){var n=H;H|=2;var r=ku(),a=Au();Ul!==e||W!==t?(ou=null,K=Ee()+500,Eu(e,t)):Kl=Ke(e,t);a:do try{if(G!==0&&U!==null){t=U;var o=Wl;b:switch(G){case 1:G=0,Wl=null,Ru(e,t,o,1);break;case 2:case 9:if(Ta(o)){G=0,Wl=null,Lu(t);break}t=function(){G!==2&&G!==9||Ul!==e||(G=7),cd(e)},o.then(t,t);break a;case 3:G=7;break a;case 4:G=5;break a;case 7:Ta(o)?(G=0,Wl=null,Lu(t)):(G=0,Wl=null,Ru(e,t,o,7));break;case 5:var s=null;switch(U.tag){case 26:s=U.memoizedState;case 5:case 27:var c=U;if(s?Jf(s):c.stateNode.complete){G=0,Wl=null;var l=c.sibling;if(l!==null)U=l;else{var u=c.return;u===null?U=null:(U=u,zu(u))}break b}}G=0,Wl=null,Ru(e,t,o,5);break;case 6:G=0,Wl=null,Ru(e,t,o,6);break;case 8:Tu(),Yl=6;break a;default:throw Error(i(462))}}Fu();break}catch(t){Du(e,t)}while(1);return Ki=Gi=null,P.H=r,P.A=a,H=n,U===null?(Ul=null,W=0,$r(),Yl):0}function Fu(){for(;U!==null&&!we();)Iu(U)}function Iu(e){var t=Pc(e.alternate,e,Jl);e.memoizedProps=e.pendingProps,t===null?zu(e):U=t}function Lu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vc(n,t,t.pendingProps,t.type,void 0,W);break;case 11:t=vc(n,t,t.pendingProps,t.type.render,t.ref,W);break;case 5:Ao(t);default:Uc(n,t),t=U=ui(t,Jl),t=Pc(n,t,Jl)}e.memoizedProps=e.pendingProps,t===null?zu(e):U=t}function Ru(e,t,n,r){Ki=Gi=null,Ao(t),ja=null,Ma=0;var i=t.return;try{if(rc(e,i,t,n,W)){Yl=1,Qs(e,_i(n,e.current)),U=null;return}}catch(t){if(i!==null)throw U=i,t;Yl=1,Qs(e,_i(n,e.current)),U=null;return}t.flags&32768?(B||r===1?e=!0:Kl||W&536870912?e=!1:(Gl=e=!0,(r===2||r===9||r===3||r===6)&&(r=no.current,r!==null&&r.tag===13&&(r.flags|=16384))),Bu(t,e)):zu(t)}function zu(e){var t=e;do{if(t.flags&32768){Bu(t,Gl);return}e=t.return;var n=Vc(t.alternate,t,Jl);if(n!==null){U=n;return}if(t=t.sibling,t!==null){U=t;return}U=t=e}while(t!==null);Yl===0&&(Yl=5)}function Bu(e,t){do{var n=Hc(e.alternate,e);if(n!==null){n.flags&=32767,U=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){U=e;return}U=e=n}while(e!==null);Yl=6,U=null}function Vu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Ku();while(cu!==0);if(H&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Qr,Xe(e,n,o,s,c,l),e===Ul&&(U=Ul=null,W=0),uu=t,lu=e,du=n,fu=o,pu=a,mu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,td(Ae,function(){return qu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,a=F.p,F.p=2,s=H,H|=4;try{cl(e,t,n)}finally{H=s,F.p=a,P.T=r}}cu=1,Hu(),Uu(),Wu()}}function Hu(){if(cu===1){cu=0;var e=lu,t=uu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=H;H|=4;try{xl(t,e);var a=Wd,o=Er(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Tr(s.ownerDocument.documentElement,s)){if(c!==null&&Dr(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 _=wr(s,h),v=wr(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}}dp=!!Ud,Wd=Ud=null}finally{H=i,F.p=r,P.T=n}}e.current=t,cu=2}}function Uu(){if(cu===2){cu=0;var e=lu,t=uu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=H;H|=4;try{ll(e,t.alternate,t)}finally{H=i,F.p=r,P.T=n}}cu=3}}function Wu(){if(cu===4||cu===3){cu=0,Te();var e=lu,t=uu,n=du,r=mu;t.subtreeFlags&10256||t.flags&10256?cu=5:(cu=0,uu=lu=null,Gu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(su=null),tt(n),t=t.stateNode,R&&typeof R.onCommitFiberRoot==`function`)try{R.onCommitFiberRoot(Fe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.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{P.T=t,F.p=i}}du&3&&Ku(),cd(e),i=e.pendingLanes,n&261930&&i&42?e===gu?hu++:(hu=0,gu=e):hu=0,ld(0,!1)}}function Gu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ca(t)))}function Ku(){return Hu(),Uu(),Wu(),qu()}function qu(){if(cu!==5)return!1;var e=lu,t=fu;fu=0;var n=tt(du),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=pu,pu=null;var o=lu,s=du;if(cu=0,uu=lu=null,du=0,H&6)throw Error(i(331));var c=H;if(H|=4,Rl(o.current),Al(o,o.current,s,n),H=c,ld(0,!1),R&&typeof R.onPostCommitFiberRoot==`function`)try{R.onPostCommitFiberRoot(Fe,o)}catch{}return!0}finally{F.p=a,P.T=r,Gu(e,t)}}function Ju(e,t,n){t=_i(n,t),t=ec(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(Ye(e,2),cd(e))}function Yu(e,t,n){if(e.tag===3)Ju(e,e,n);else for(;t!==null;){if(t.tag===3){Ju(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(su===null||!su.has(r))){e=_i(n,e),n=tc(2),r=Ua(t,n,2),r!==null&&(nc(n,r,t,e),Ye(r,2),cd(r));break}}t=t.return}}function Xu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hl;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)||(ql=!0,i.add(n),e=Zu.bind(null,e,t,n),t.then(e,e))}function Zu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ul===e&&(W&n)===n&&(Yl===4||Yl===3&&(W&62914560)===W&&300>Ee()-iu?!(H&2)&&Eu(e,0):Ql|=n,eu===W&&(eu=0)),cd(e)}function Qu(e,t){t===0&&(t=qe()),e=ni(e,t),e!==null&&(Ye(e,t),cd(e))}function $u(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qu(e,n)}function ed(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 td(e,t){return Se(e,t)}var nd=null,rd=null,id=!1,ad=!1,od=!1,sd=0;function cd(e){e!==rd&&e.next===null&&(rd===null?nd=rd=e:rd=rd.next=e),ad=!0,id||(id=!0,hd())}function ld(e,t){if(!od&&ad){od=!0;do for(var n=!1,r=nd;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-Le(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,md(r,a))}else a=W,a=Ge(r,r===Ul?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ke(r,a)||(n=!0,md(r,a));r=r.next}while(n);od=!1}}function ud(){dd()}function dd(){ad=id=!1;var e=0;sd!==0&&Xd()&&(e=sd);for(var t=Ee(),n=null,r=nd;r!==null;){var i=r.next,a=fd(r,t);a===0?(r.next=null,n===null?nd=i:n.next=i,i===null&&(rd=n)):(n=r,(e!==0||a&3)&&(ad=!0)),r=i}cu!==0&&cu!==5||ld(e,!1),sd!==0&&(sd=0)}function fd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Le(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=z(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ul,n=W,n=Ge(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(G===2||G===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ce(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ke(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ce(r),tt(n)){case 2:case 8:n=ke;break;case 32:n=Ae;break;case 268435456:n=Me;break;default:n=Ae}return r=pd.bind(null,e),n=Se(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ce(r),e.callbackPriority=2,e.callbackNode=null,2}function pd(e,t){if(cu!==0&&cu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ku()&&e.callbackNode!==n)return null;var r=W;return r=Ge(e,e===Ul?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(bu(e,r,t),fd(e,Ee()),e.callbackNode!=null&&e.callbackNode===n?pd.bind(null,e):null)}function md(e,t){if(Ku())return null;bu(e,t,!0)}function hd(){ef(function(){H&6?Se(Oe,ud):dd()})}function gd(){if(sd===0){var e=da;e===0&&(e=Ve,Ve<<=1,!(Ve&261888)&&(Ve=256)),sd=e}return sd}function _d(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Zt(``+e)}function vd(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 yd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=_d((i[ot]||null).action),o=r.submitter;o&&(t=(t=o[ot]||null)?_d(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new bn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(sd!==0){var e=o?vd(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?vd(i,o):new FormData(i),Es(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var bd=0;bd<qr.length;bd++){var xd=qr[bd];Jr(xd.toLowerCase(),`on`+(xd[0].toUpperCase()+xd.slice(1)))}Jr(zr,`onAnimationEnd`),Jr(Br,`onAnimationIteration`),Jr(Vr,`onAnimationStart`),Jr(`dblclick`,`onDoubleClick`),Jr(`focusin`,`onFocus`),Jr(`focusout`,`onBlur`),Jr(Hr,`onTransitionRun`),Jr(Ur,`onTransitionStart`),Jr(Wr,`onTransitionCancel`),Jr(Gr,`onTransitionEnd`),St(`onMouseEnter`,[`mouseout`,`mouseover`]),St(`onMouseLeave`,[`mouseout`,`mouseover`]),St(`onPointerEnter`,[`pointerout`,`pointerover`]),St(`onPointerLeave`,[`pointerout`,`pointerover`]),xt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),xt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),xt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),xt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),xt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),xt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Sd=`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(` `),Cd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Sd));function wd(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){Yr(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){Yr(e)}i.currentTarget=null,a=c}}}}function q(e,t){var n=t[ct];n===void 0&&(n=t[ct]=new Set);var r=e+`__bubble`;n.has(r)||(J(t,e,2,!1),n.add(r))}function Td(e,t,n){var r=0;t&&(r|=4),J(n,e,r,t)}var Ed=`_reactListening`+Math.random().toString(36).slice(2);function Dd(e){if(!e[Ed]){e[Ed]=!0,yt.forEach(function(t){t!==`selectionchange`&&(Cd.has(t)||Td(t,!1,e),Td(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ed]||(t[Ed]=!0,Td(`selectionchange`,!1,t))}}function J(e,t,n,r){switch(vp(t)){case 2:var i=fp;break;case 8:i=pp;break;default:i=mp}n=i.bind(null,t,n,e),i=void 0,!ln||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 Od(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=mt(s),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}s=s.parentNode}}r=r.return}on(function(){var r=a,i=en(n),o=[];a:{var s=Kr.get(e);if(s!==void 0){var l=bn,u=e;switch(e){case`keypress`:if(hn(n)===0)break a;case`keydown`:case`keyup`:l=Rn;break;case`focusin`:u=`focus`,l=kn;break;case`focusout`:u=`blur`,l=kn;break;case`beforeblur`:case`afterblur`:l=kn;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=Dn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=On;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Bn;break;case zr:case Br:case Vr:l=An;break;case Gr:l=Vn;break;case`scroll`:case`scrollend`:l=Sn;break;case`wheel`:l=Hn;break;case`copy`:case`cut`:case`paste`:l=jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=zn;break;case`toggle`:case`beforetoggle`:l=Un}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;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=sn(m,p),g!=null&&d.push(kd(m,g,h))),f)break;m=m.return}0<d.length&&(s=new l(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,s&&n!==$t&&(u=n.relatedTarget||n.fromElement)&&(mt(u)||u[st]))break a;if((l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?mt(u):null,u!==null&&(f=c(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Dn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=zn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?s:gt(l),h=u==null?s:gt(u),s=new d(g,m+`leave`,l,n,i),s.target=f,s.relatedTarget=h,g=null,mt(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=jd,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&&Md(o,s,l,d,!1),u!==null&&f!==null&&Md(o,f,u,d,!0)}}a:{if(s=r?gt(r):window,l=s.nodeName&&s.nodeName.toLowerCase(),l===`select`||l===`input`&&s.type===`file`)var v=lr;else if(rr(s))if(ur)v=yr;else{v=_r;var y=gr}else l=s.nodeName,!l||l.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&Jt(r.elementType)&&(v=lr):v=vr;if(v&&=v(e,r)){ir(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&Bt(s,`number`,s.value)}switch(y=r?gt(r):window,e){case`focusin`:(rr(y)||y.contentEditable===`true`)&&(kr=y,Ar=r,jr=null);break;case`focusout`:jr=Ar=kr=null;break;case`mousedown`:Mr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Mr=!1,Nr(o,n,i);break;case`selectionchange`:if(Or)break;case`keydown`:case`keyup`:Nr(o,n,i)}var b;if(Gn)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 $n?Zn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Jn&&n.locale!==`ko`&&($n||x!==`onCompositionStart`?x===`onCompositionEnd`&&$n&&(b=mn()):(dn=i,fn=`value`in dn?dn.value:dn.textContent,$n=!0)),y=Ad(r,x),0<y.length&&(x=new Mn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Qn(n),b!==null&&(x.data=b)))),(b=qn?er(e,n):tr(e,n))&&(x=Ad(r,`onBeforeInput`),0<x.length&&(y=new Mn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),yd(o,e,r,n,i)}wd(o,t)})}function kd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ad(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=sn(e,n),i!=null&&r.unshift(kd(e,i,a)),i=sn(e,t),i!=null&&r.push(kd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function jd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Md(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=sn(n,a),l!=null&&o.unshift(kd(n,l,c))):i||(l=sn(n,a),l!=null&&o.push(kd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Nd=/\r\n?/g,Pd=/\u0000|\uFFFD/g;function Fd(e){return(typeof e==`string`?e:``+e).replace(Nd,`
`).replace(Pd,``)}function Id(e,t){return t=Fd(t),Fd(e)===t}function Ld(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Wt(e,``+r);break;case`className`:Ot(e,`class`,r);break;case`tabIndex`:Ot(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ot(e,n,r);break;case`style`:qt(e,r,o);break;case`data`:if(t!==`object`){Ot(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=Zt(``+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`&&Ld(e,t,`name`,a.name,a,null),Ld(e,t,`formEncType`,a.formEncType,a,null),Ld(e,t,`formMethod`,a.formMethod,a,null),Ld(e,t,`formTarget`,a.formTarget,a,null)):(Ld(e,t,`encType`,a.encType,a,null),Ld(e,t,`method`,a.method,a,null),Ld(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Zt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Qt);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=Zt(``+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),Dt(e,`popover`,r);break;case`xlinkActuate`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Dt(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=Yt.get(n)||n,Dt(e,n,r))}}function Rd(e,t,n,r,a,o){switch(n){case`style`:qt(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`?Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Wt(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=Qt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!bt.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[ot]||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,``):Dt(e,n,r)}}}function zd(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:Ld(e,t,o,s,n,null)}}a&&Ld(e,t,`srcSet`,n.srcSet,n,null),r&&Ld(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:Ld(e,t,r,d,n,null)}}zt(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:Ld(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Vt(e,!!r,n,!0):Vt(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:Ld(e,t,s,c,n,null)}Ut(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:Ld(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<Sd.length;r++)q(Sd[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:Ld(e,t,u,r,n,null)}return;default:if(Jt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Rd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Ld(e,t,c,r,n,null))}function Bd(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)||Ld(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&&Ld(e,t,p,m,r,f)}}Rt(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)||Ld(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&&Ld(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Vt(e,!!n,n?[]:``,!1):Vt(e,!!n,t,!0)):Vt(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:Ld(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&&Ld(e,t,s,a,r,o)}Ht(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:Ld(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:Ld(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)&&Ld(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:Ld(e,t,u,p,r,m)}return;default:if(Jt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Rd(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||Rd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Ld(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||Ld(e,t,f,p,r,m)}function Vd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Hd(){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&&Vd(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&&Vd(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 Ud=null,Wd=null;function Gd(e){return e.nodeType===9?e:e.ownerDocument}function Kd(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 qd(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 Jd(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 Yd=null;function Xd(){var e=window.event;return e&&e.type===`popstate`?e===Yd?!1:(Yd=e,!0):(Yd=null,!1)}var Zd=typeof setTimeout==`function`?setTimeout:void 0,Qd=typeof clearTimeout==`function`?clearTimeout:void 0,$d=typeof Promise==`function`?Promise:void 0,ef=typeof queueMicrotask==`function`?queueMicrotask:$d===void 0?Zd:function(e){return $d.resolve(null).then(e).catch(tf)};function tf(e){setTimeout(function(){throw e})}function nf(e){return e===`head`}function rf(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),Lp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)vf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,vf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ft]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&vf(e.ownerDocument.body);n=i}while(n);Lp(t)}function af(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 of(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`:of(n),pt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function sf(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[ft])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=pf(e.nextSibling),e===null)break}return null}function cf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=pf(e.nextSibling),e===null))return null;return e}function lf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=pf(e.nextSibling),e===null))return null;return e}function uf(e){return e.data===`$?`||e.data===`$~`}function df(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function ff(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 pf(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 mf=null;function hf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return pf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function gf(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 _f(e,t,n){switch(t=Gd(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 vf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pt(e)}var yf=new Map,bf=new Set;function xf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Sf=F.d;F.d={f:Y,r:Cf,D:Ef,C:Df,L:Of,m:kf,X:jf,S:Af,M:Mf};function Y(){var e=Sf.f(),t=wu();return e||t}function Cf(e){var t=ht(e);t!==null&&t.tag===5&&t.type===`form`?Os(t):Sf.r(e)}var wf=typeof document>`u`?null:document;function Tf(e,t,n){var r=wf;if(r&&typeof t==`string`&&t){var i=Lt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bf.has(i)||(bf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),zd(t,`link`,e),vt(t),r.head.appendChild(t)))}}function Ef(e){Sf.D(e),Tf(`dns-prefetch`,e,null)}function Df(e,t){Sf.C(e,t),Tf(`preconnect`,e,t)}function Of(e,t,n){Sf.L(e,t,n);var r=wf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Lt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Lt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Lt(n.imageSizes)+`"]`)):i+=`[href="`+Lt(e)+`"]`;var a=i;switch(t){case`style`:a=Pf(e);break;case`script`:a=Rf(e)}yf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),yf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Ff(a))||t===`script`&&r.querySelector(zf(a))||(t=r.createElement(`link`),zd(t,`link`,e),vt(t),r.head.appendChild(t)))}}function kf(e,t){Sf.m(e,t);var n=wf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Lt(r)+`"][href="`+Lt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rf(e)}if(!yf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),yf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zf(a)))return}r=n.createElement(`link`),zd(r,`link`,e),vt(r),n.head.appendChild(r)}}}function Af(e,t,n){Sf.S(e,t,n);var r=wf;if(r&&e){var i=_t(r).hoistableStyles,a=Pf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Ff(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=yf.get(a))&&Hf(e,n);var c=o=r.createElement(`link`);vt(c),zd(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,Vf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jf(e,t){Sf.X(e,t);var n=wf;if(n&&e){var r=_t(n).hoistableScripts,i=Rf(e),a=r.get(i);a||(a=n.querySelector(zf(i)),a||(e=h({src:e,async:!0},t),(t=yf.get(i))&&Uf(e,t),a=n.createElement(`script`),vt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t){Sf.M(e,t);var n=wf;if(n&&e){var r=_t(n).hoistableScripts,i=Rf(e),a=r.get(i);a||(a=n.querySelector(zf(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=yf.get(i))&&Uf(e,t),a=n.createElement(`script`),vt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nf(e,t,n,r){var a=(a=ce.current)?xf(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=Pf(n.href),n=_t(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=Pf(n.href);var o=_t(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(Ff(e)))&&!o._p&&(s.instance=o,s.state.loading=5),yf.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},yf.set(e,n),o||Lf(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=Rf(n),n=_t(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 Pf(e){return`href="`+Lt(e)+`"`}function Ff(e){return`link[rel="stylesheet"][`+e+`]`}function If(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Lf(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}),zd(t,`link`,n),vt(t),e.head.appendChild(t))}function Rf(e){return`[src="`+Lt(e)+`"]`}function zf(e){return`script[async]`+e}function Bf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Lt(n.href)+`"]`);if(r)return t.instance=r,vt(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`),vt(r),zd(r,`style`,a),Vf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pf(n.href);var o=e.querySelector(Ff(a));if(o)return t.state.loading|=4,t.instance=o,vt(o),o;r=If(n),(a=yf.get(a))&&Hf(r,a),o=(e.ownerDocument||e).createElement(`link`),vt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),zd(o,`link`,r),t.state.loading|=4,Vf(o,n.precedence,e),t.instance=o;case`script`:return o=Rf(n.src),(a=e.querySelector(zf(o)))?(t.instance=a,vt(a),a):(r=n,(a=yf.get(o))&&(r=h({},n),Uf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),vt(a),zd(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,Vf(r,n.precedence,e));return t.instance}function Vf(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 Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Uf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wf=null;function Gf(e,t,n){if(Wf===null){var r=new Map,i=Wf=new Map;i.set(n,r)}else i=Wf,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[ft]||a[at]||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 Kf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qf(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 Jf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Yf(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=Pf(r.href),a=t.querySelector(Ff(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Qf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,vt(a);return}a=t.ownerDocument||t,r=If(r),(i=yf.get(i))&&Hf(r,i),a=a.createElement(`link`),vt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),zd(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=Qf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Xf=0;function Zf(e,t){return e.stylesheets&&e.count===0&&ep(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ep(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Xf===0&&(Xf=62500*Hd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ep(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Xf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Qf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ep(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var $f=null;function ep(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$f=new Map,t.forEach(tp,e),$f=null,Qf.call(e))}function tp(e,t){if(!(t.state.loading&4)){var n=$f.get(e);if(n)var r=n.get(null);else{n=new Map,$f.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=Qf.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 np={$$typeof:C,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function rp(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=Je(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Je(0),this.hiddenUpdates=Je(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 ip(e,t,n,r,i,a,o,s,c,l,u,d){return e=new rp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=si(3,null,null,t),e.current=a,a.stateNode=e,t=sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ba(a),e}function ap(e){return e?(e=ai,e):ai}function op(e,t,n,r,i,a){i=ap(i),r.context===null?r.context=i:r.pendingContext=i,r=Ha(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ua(e,r,t),n!==null&&(yu(n,e,t),Wa(n,e,t))}function sp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function cp(e,t){sp(e,t),(e=e.alternate)&&sp(e,t)}function lp(e){if(e.tag===13||e.tag===31){var t=ni(e,67108864);t!==null&&yu(t,e,67108864),cp(e,67108864)}}function up(e){if(e.tag===13||e.tag===31){var t=_u();t=et(t);var n=ni(e,t);n!==null&&yu(n,e,t),cp(e,t)}}var dp=!0;function fp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,mp(e,t,n,r)}finally{F.p=a,P.T=i}}function pp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,mp(e,t,n,r)}finally{F.p=a,P.T=i}}function mp(e,t,n,r){if(dp){var i=hp(r);if(i===null)Od(e,t,r,gp,n),Dp(e,r);else if(kp(i,e,t,n,r))r.stopPropagation();else if(Dp(e,r),t&4&&-1<Ep.indexOf(e)){for(;i!==null;){var a=ht(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=We(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Le(o);s.entanglements[1]|=c,o&=~c}cd(a),!(H&6)&&(K=Ee()+500,ld(0,!1))}}break;case 31:case 13:s=ni(a,2),s!==null&&yu(s,a,2),wu(),cp(a,2)}if(a=hp(r),a===null&&Od(e,t,r,gp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Od(e,t,r,null,n)}}function hp(e){return e=en(e),_p(e)}var gp=null;function _p(e){if(gp=null,e=mt(e),e!==null){var t=c(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=u(t),e!==null)return e;e=null}else if(n===31){if(e=d(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 gp=e,null}function vp(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(De()){case Oe:return 2;case ke:return 8;case Ae:case je:return 32;case Me:return 268435456;default:return 32}default:return 32}}var yp=!1,bp=null,xp=null,Sp=null,Cp=new Map,wp=new Map,Tp=[],Ep=`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 Dp(e,t){switch(e){case`focusin`:case`focusout`:bp=null;break;case`dragenter`:case`dragleave`:xp=null;break;case`mouseover`:case`mouseout`:Sp=null;break;case`pointerover`:case`pointerout`:Cp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:wp.delete(t.pointerId)}}function Op(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=ht(t),t!==null&&lp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function kp(e,t,n,r,i){switch(t){case`focusin`:return bp=Op(bp,e,t,n,r,i),!0;case`dragenter`:return xp=Op(xp,e,t,n,r,i),!0;case`mouseover`:return Sp=Op(Sp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Cp.set(a,Op(Cp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,wp.set(a,Op(wp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ap(e){var t=mt(e.target);if(t!==null){var n=c(t);if(n!==null){if(t=n.tag,t===13){if(t=u(n),t!==null){e.blockedOn=t,rt(e.priority,function(){up(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,rt(e.priority,function(){up(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 jp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=hp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$t=r,n.target.dispatchEvent(r),$t=null}else return t=ht(n),t!==null&&lp(t),e.blockedOn=n,!1;t.shift()}return!0}function Mp(e,t,n){jp(e)&&n.delete(t)}function Np(){yp=!1,bp!==null&&jp(bp)&&(bp=null),xp!==null&&jp(xp)&&(xp=null),Sp!==null&&jp(Sp)&&(Sp=null),Cp.forEach(Mp),wp.forEach(Mp)}function Pp(e,n){e.blockedOn===n&&(e.blockedOn=null,yp||(yp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Np)))}var Fp=null;function Ip(e){Fp!==e&&(Fp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Fp===e&&(Fp=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(_p(r||n)===null)continue;break}var a=ht(n);a!==null&&(e.splice(t,3),t-=3,Es(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Lp(e){function t(t){return Pp(t,e)}bp!==null&&Pp(bp,e),xp!==null&&Pp(xp,e),Sp!==null&&Pp(Sp,e),Cp.forEach(t),wp.forEach(t);for(var n=0;n<Tp.length;n++){var r=Tp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Tp.length&&(n=Tp[0],n.blockedOn===null);)Ap(n),n.blockedOn===null&&Tp.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[ot]||null;if(typeof a==`function`)o||Ip(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ot]||null)s=o.formAction;else if(_p(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Ip(n)}}}function Rp(){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 zp(e){this._internalRoot=e}Bp.prototype.render=zp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;op(n,_u(),e,t,null,null)},Bp.prototype.unmount=zp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;op(e.current,2,null,e,null,null),wu(),t[st]=null}};function Bp(e){this._internalRoot=e}Bp.prototype.unstable_scheduleHydration=function(e){if(e){var t=nt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Tp.length&&t!==0&&t<Tp[n].priority;n++);Tp.splice(n,0,e),n===0&&Ap(e)}};var Vp=n.version;if(Vp!==`19.2.5`)throw Error(i(527,Vp,`19.2.5`));F.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=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var Hp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Up=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Up.isDisabled&&Up.supportsFiber)try{Fe=Up.inject(Hp),R=Up}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(i(299));var n=!1,r=``,a=Ys,s=Xs,c=Zs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ip(e,1,!1,null,null,n,r,null,a,s,c,Rp),e[st]=t.current,Dd(e),new zp(t)},e.hydrateRoot=function(e,t,n){if(!o(e))throw Error(i(299));var r=!1,a=``,s=Ys,c=Xs,l=Zs,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=ip(e,1,!0,t,n??null,r,a,u,s,c,l,Rp),t.context=ap(null),n=t.current,r=_u(),r=et(r),a=Ha(r),a.callback=null,Ua(n,a,r),n=r,t.current.lanes=n,Ye(t,n),cd(t),e[st]=t.current,Dd(e),new Bp(t)},e.version=`19.2.5`})),d=t(((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=u()})),f=t(((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}}})),p=t(((e,t)=>{t.exports=function(e,t,n,r,i,a,o,s){if(!e){var c;if(t===void 0)c=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var l=[n,r,i,a,o,s],u=0;c=Error(t.replace(/%s/g,function(){return l[u++]})),c.name=`Invariant Violation`}throw c.framesToPop=1,c}}})),m=t(((e,t)=>{t.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!s(l))return!1;var u=e[l],d=t[l];if(i=n?n.call(r,u,d,l):void 0,i===!1||i===void 0&&u!==d)return!1}return!0}})),h=e(d(),1),g=e(a()),_=e(f()),v=e(p()),y=e(m()),b=(e=>(e.BASE=`base`,e.BODY=`body`,e.HEAD=`head`,e.HTML=`html`,e.LINK=`link`,e.META=`meta`,e.NOSCRIPT=`noscript`,e.SCRIPT=`script`,e.STYLE=`style`,e.TITLE=`title`,e.FRAGMENT=`Symbol(react.fragment)`,e))(b||{}),x={link:{rel:[`amphtml`,`canonical`,`alternate`]},script:{type:[`application/ld+json`]},meta:{charset:``,name:[`generator`,`robots`,`description`],property:[`og:type`,`og:title`,`og:url`,`og:image`,`og:image:alt`,`og:description`,`twitter:url`,`twitter:title`,`twitter:description`,`twitter:image`,`twitter:image:alt`,`twitter:card`,`twitter:site`]}},S=Object.values(b),C={accesskey:`accessKey`,charset:`charSet`,class:`className`,contenteditable:`contentEditable`,contextmenu:`contextMenu`,"http-equiv":`httpEquiv`,itemprop:`itemProp`,tabindex:`tabIndex`},w=Object.entries(C).reduce((e,[t,n])=>(e[n]=t,e),{}),T=`data-rh`,E={DEFAULT_TITLE:`defaultTitle`,DEFER:`defer`,ENCODE_SPECIAL_CHARACTERS:`encodeSpecialCharacters`,ON_CHANGE_CLIENT_STATE:`onChangeClientState`,TITLE_TEMPLATE:`titleTemplate`,PRIORITIZE_SEO_TAGS:`prioritizeSeoTags`},D=(e,t)=>{for(let n=e.length-1;n>=0;--n){let r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},O=e=>{let t=D(e,`title`),n=D(e,E.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join(``)),n&&t)return n.replace(/%s/g,()=>t);let r=D(e,E.DEFAULT_TITLE);return t||r||void 0},k=e=>D(e,E.ON_CHANGE_CLIENT_STATE)||(()=>{}),A=(e,t)=>t.filter(t=>t[e]!==void 0).map(t=>t[e]).reduce((e,t)=>({...e,...t}),{}),j=(e,t)=>t.filter(e=>e.base!==void 0).map(e=>e.base).reverse().reduce((t,n)=>{if(!t.length){let r=Object.keys(n);for(let i=0;i<r.length;i+=1){let a=r[i].toLowerCase();if(e.indexOf(a)!==-1&&n[a])return t.concat(n)}}return t},[]),ee=e=>console&&typeof console.warn==`function`&&console.warn(e),M=(e,t,n)=>{let r={};return n.filter(t=>Array.isArray(t[e])?!0:(t[e]!==void 0&&ee(`Helmet: ${e} should be of type "Array". Instead found type "${typeof t[e]}"`),!1)).map(t=>t[e]).reverse().reduce((e,n)=>{let i={};n.filter(e=>{let n,a=Object.keys(e);for(let r=0;r<a.length;r+=1){let i=a[r],o=i.toLowerCase();t.indexOf(o)!==-1&&!(n===`rel`&&e[n].toLowerCase()===`canonical`)&&!(o===`rel`&&e[o].toLowerCase()===`stylesheet`)&&(n=o),t.indexOf(i)!==-1&&(i===`innerHTML`||i===`cssText`||i===`itemprop`)&&(n=i)}if(!n||!e[n])return!1;let o=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),r[n][o]?!1:(i[n][o]=!0,!0)}).reverse().forEach(t=>e.push(t));let a=Object.keys(i);for(let e=0;e<a.length;e+=1){let t=a[e];r[t]={...r[t],...i[t]}}return e},[]).reverse()},N=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},te=e=>({baseTag:j([`href`],e),bodyAttributes:A(`bodyAttributes`,e),defer:D(e,E.DEFER),encode:D(e,E.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:A(`htmlAttributes`,e),linkTags:M(`link`,[`rel`,`href`],e),metaTags:M(`meta`,[`name`,`charset`,`http-equiv`,`property`,`itemprop`],e),noscriptTags:M(`noscript`,[`innerHTML`],e),onChangeClientState:k(e),scriptTags:M(`script`,[`src`,`innerHTML`],e),styleTags:M(`style`,[`cssText`],e),title:O(e),titleAttributes:A(`titleAttributes`,e),prioritizeSeoTags:N(e,E.PRIORITIZE_SEO_TAGS)}),P=e=>Array.isArray(e)?e.join(``):e,F=(e,t)=>{let n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},ne=(e,t)=>Array.isArray(e)?e.reduce((e,n)=>(F(n,t)?e.priority.push(n):e.default.push(n),e),{priority:[],default:[]}):{default:e,priority:[]},re=(e,t)=>({...e,[t]:void 0}),ie=[`noscript`,`script`,`style`],ae=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),I=e=>Object.keys(e).reduce((t,n)=>{let r=e[n]===void 0?`${n}`:`${n}="${e[n]}"`;return t?`${t} ${r}`:r},``),L=(e,t,n,r)=>{let i=I(n),a=P(t);return i?`<${e} ${T}="true" ${i}>${ae(a,r)}</${e}>`:`<${e} ${T}="true">${ae(a,r)}</${e}>`},oe=(e,t,n=!0)=>t.reduce((t,r)=>{let i=r,a=Object.keys(i).filter(e=>!(e===`innerHTML`||e===`cssText`)).reduce((e,t)=>{let r=i[t]===void 0?t:`${t}="${ae(i[t],n)}"`;return e?`${e} ${r}`:r},``),o=i.innerHTML||i.cssText||``;return`${t}<${e} ${T}="true" ${a}${ie.indexOf(e)===-1?`/>`:`>${o}</${e}>`}`},``),se=(e,t={})=>Object.keys(e).reduce((t,n)=>{let r=C[n];return t[r||n]=e[n],t},t),ce=(e,t,n)=>{let r=se(n,{key:t,[T]:!0});return[g.createElement(`title`,r,t)]},le=(e,t)=>t.map((t,n)=>{let r={key:n,[T]:!0};return Object.keys(t).forEach(e=>{let n=C[e]||e;n===`innerHTML`||n===`cssText`?r.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:r[n]=t[e]}),g.createElement(e,r)}),ue=(e,t,n=!0)=>{switch(e){case`title`:return{toComponent:()=>ce(e,t.title,t.titleAttributes),toString:()=>L(e,t.title,t.titleAttributes,n)};case`bodyAttributes`:case`htmlAttributes`:return{toComponent:()=>se(t),toString:()=>I(t)};default:return{toComponent:()=>le(e,t),toString:()=>oe(e,t,n)}}},de=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{let i=ne(e,x.meta),a=ne(t,x.link),o=ne(n,x.script);return{priorityMethods:{toComponent:()=>[...le(`meta`,i.priority),...le(`link`,a.priority),...le(`script`,o.priority)],toString:()=>`${ue(`meta`,i.priority,r)} ${ue(`link`,a.priority,r)} ${ue(`script`,o.priority,r)}`},metaTags:i.default,linkTags:a.default,scriptTags:o.default}},fe=e=>{let{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:i,noscriptTags:a,styleTags:o,title:s=``,titleAttributes:c,prioritizeSeoTags:l}=e,{linkTags:u,metaTags:d,scriptTags:f}=e,p={toComponent:()=>[],toString:()=>``};return l&&({priorityMethods:p,linkTags:u,metaTags:d,scriptTags:f}=de(e)),{priority:p,base:ue(`base`,t,r),bodyAttributes:ue(`bodyAttributes`,n,r),htmlAttributes:ue(`htmlAttributes`,i,r),link:ue(`link`,u,r),meta:ue(`meta`,d,r),noscript:ue(`noscript`,a,r),script:ue(`script`,f,r),style:ue(`style`,o,r),title:ue(`title`,{title:s,titleAttributes:c},r)}},pe=[],me=!!(typeof window<`u`&&window.document&&window.document.createElement),he=class{instances=[];canUseDOM=me;context;value={setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?pe:this.instances,add:e=>{(this.canUseDOM?pe:this.instances).push(e)},remove:e=>{let t=(this.canUseDOM?pe:this.instances).indexOf(e);(this.canUseDOM?pe:this.instances).splice(t,1)}}};constructor(e,t){this.context=e,this.canUseDOM=t||!1,t||(e.helmet=fe({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:``,titleAttributes:{}}))}},ge=parseInt(`19.2.5`.split(`.`)[0],10)>=19,_e=g.createContext({}),ve=class e extends g.Component{static canUseDOM=me;helmetData;constructor(t){super(t),ge?this.helmetData=null:this.helmetData=new he(this.props.context||{},e.canUseDOM)}render(){return ge?g.createElement(g.Fragment,null,this.props.children):g.createElement(_e.Provider,{value:this.helmetData.value},this.props.children)}},ye=(e,t)=>{let n=document.head||document.querySelector(`head`),r=n.querySelectorAll(`${e}[${T}]`),i=[].slice.call(r),a=[],o;return t&&t.length&&t.forEach(t=>{let n=document.createElement(e);for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))if(e===`innerHTML`)n.innerHTML=t.innerHTML;else if(e===`cssText`){let e=t.cssText;n.appendChild(document.createTextNode(e))}else{let r=e,i=t[r]===void 0?``:t[r];n.setAttribute(e,i)}n.setAttribute(T,`true`),i.some((e,t)=>(o=t,n.isEqualNode(e)))?i.splice(o,1):a.push(n)}),i.forEach(e=>e.parentNode?.removeChild(e)),a.forEach(e=>n.appendChild(e)),{oldTags:i,newTags:a}},be=(e,t)=>{let n=document.getElementsByTagName(e)[0];if(!n)return;let r=n.getAttribute(T),i=r?r.split(`,`):[],a=[...i],o=Object.keys(t);for(let e of o){let r=t[e]||``;n.getAttribute(e)!==r&&n.setAttribute(e,r),i.indexOf(e)===-1&&i.push(e);let o=a.indexOf(e);o!==-1&&a.splice(o,1)}for(let e=a.length-1;e>=0;--e)n.removeAttribute(a[e]);i.length===a.length?n.removeAttribute(T):n.getAttribute(T)!==o.join(`,`)&&n.setAttribute(T,o.join(`,`))},xe=(e,t)=>{e!==void 0&&document.title!==e&&(document.title=P(e)),be(`title`,t)},Se=(e,t)=>{let{baseTag:n,bodyAttributes:r,htmlAttributes:i,linkTags:a,metaTags:o,noscriptTags:s,onChangeClientState:c,scriptTags:l,styleTags:u,title:d,titleAttributes:f}=e;be(`body`,r),be(`html`,i),xe(d,f);let p={baseTag:ye(`base`,n),linkTags:ye(`link`,a),metaTags:ye(`meta`,o),noscriptTags:ye(`noscript`,s),scriptTags:ye(`script`,l),styleTags:ye(`style`,u)},m={},h={};Object.keys(p).forEach(e=>{let{newTags:t,oldTags:n}=p[e];t.length&&(m[e]=t),n.length&&(h[e]=p[e].oldTags)}),t&&t(),c(e,m,h)},Ce=null,we=e=>{Ce&&cancelAnimationFrame(Ce),e.defer?Ce=requestAnimationFrame(()=>{Se(e,()=>{Ce=null})}):(Se(e),Ce=null)},Te=class extends g.Component{rendered=!1;shouldComponentUpdate(e){return!(0,y.default)(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){let{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){let{helmetInstances:e,setHelmet:t}=this.props.context,n=null,r=te(e.get().map(e=>{let{context:t,...n}=e.props;return n}));ve.canUseDOM?we(r):fe&&(n=fe(r)),t(n)}init(){if(this.rendered)return;this.rendered=!0;let{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},Ee=[],De=e=>{let t={};for(let n of Object.keys(e))t[w[n]||n]=e[n];return t},Oe=e=>{let t={};for(let n of Object.keys(e)){let r=C[n];t[r||n]=e[n]}return t},ke=(e,t)=>{if(!me)return;let n=document.getElementsByTagName(e)[0];if(!n)return;let r=`data-rh-managed`,i=n.getAttribute(r),a=i?i.split(`,`):[],o=Object.keys(t);for(let e of a)o.includes(e)||n.removeAttribute(e);for(let e of o){let r=t[e];r==null||r===!1?n.removeAttribute(e):r===!0?n.setAttribute(e,``):n.setAttribute(e,String(r))}o.length>0?n.setAttribute(r,o.join(`,`)):n.removeAttribute(r)},Ae=()=>{let e={},t={};for(let n of Ee){let{htmlAttributes:r,bodyAttributes:i}=n.props;r&&Object.assign(e,De(r)),i&&Object.assign(t,De(i))}ke(`html`,e),ke(`body`,t)},je=class extends g.Component{componentDidMount(){Ee.push(this),Ae()}componentDidUpdate(){Ae()}componentWillUnmount(){let e=Ee.indexOf(this);e!==-1&&Ee.splice(e,1),Ae()}resolveTitle(){let{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(``):e):e||n||void 0}renderTitle(){let e=this.resolveTitle();if(e===void 0)return null;let t=this.props.titleAttributes||{};return g.createElement(`title`,Oe(t),e)}renderBase(){let{base:e}=this.props;return e?g.createElement(`base`,Oe(e)):null}renderMeta(){let{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>g.createElement(`meta`,{key:t,...Oe(e)}))}renderLink(){let{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>g.createElement(`link`,{key:t,...Oe(e)}))}renderScript(){let{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>{let{innerHTML:n,...r}=e,i=Oe(r);return n&&(i.dangerouslySetInnerHTML={__html:n}),g.createElement(`script`,{key:t,...i})})}renderStyle(){let{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>{let{cssText:n,...r}=e,i=Oe(r);return n&&(i.dangerouslySetInnerHTML={__html:n}),g.createElement(`style`,{key:t,...i})})}renderNoscript(){let{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((e,t)=>{let{innerHTML:n,...r}=e,i=Oe(r);return n&&(i.dangerouslySetInnerHTML={__html:n}),g.createElement(`noscript`,{key:t,...i})})}render(){return g.createElement(g.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},Me=class extends g.Component{static defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1};shouldComponentUpdate(e){return!(0,_.default)(re(this.props,`helmetData`),re(e,`helmetData`))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case`script`:case`noscript`:return{innerHTML:t};case`style`:return{cssText:t};default:throw Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case`title`:return{...t,[e.type]:r,titleAttributes:{...n}};case`body`:return{...t,bodyAttributes:{...n}};case`html`:return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(t=>{n={...n,[t]:e[t]}}),n}warnOnInvalidChildren(e,t){return(0,v.default)(S.some(t=>e.type===t),typeof e.type==`function`?`You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.`:`Only elements types ${S.join(`, `)} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),(0,v.default)(!t||typeof t==`string`||Array.isArray(t)&&!t.some(e=>typeof e!=`string`),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return g.Children.forEach(e,e=>{if(!e||!e.props)return;let{children:r,...i}=e.props,a=Object.keys(i).reduce((e,t)=>(e[w[t]||t]=i[t],e),{}),{type:o}=e;switch(typeof o==`symbol`?o=o.toString():this.warnOnInvalidChildren(e,r),o){case`Symbol(react.fragment)`:t=this.mapChildrenToProps(r,t);break;case`link`:case`meta`:case`noscript`:case`script`:case`style`:n=this.flattenArrayTypeChildren(e,n,a,r);break;default:t=this.mapObjectTypeChildren(e,t,a,r);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){let{children:e,...t}=this.props,n={...t},{helmetData:r}=t;return e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof he)&&(r=new he(r.context,!0),delete n.helmetData),ge?g.createElement(je,{...n}):r?g.createElement(Te,{...n,context:r.value}):g.createElement(_e.Consumer,null,e=>g.createElement(Te,{...n,context:e}))}},Ne=t((e=>{var t=a().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){return t.H.useMemoCache(e)}})),Pe=t(((e,t)=>{t.exports=Ne()})),Fe=e(l(),1),R=Pe(),Ie=`modulepreload`,Le=function(e){return`/`+e},Re={},ze=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=Le(t,n),t in Re)return;Re[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`:Ie,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)})},Be=e=>{throw TypeError(e)},Ve=(e,t,n)=>t.has(e)||Be(`Cannot `+n),He=(e,t,n)=>(Ve(e,t,`read from private field`),n?n.call(e):t.get(e)),Ue=(e,t,n)=>t.has(e)?Be(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),We=`popstate`;function Ge(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function Ke(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return Xe(``,{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:Ze(t)}return $e(t,n,null,e)}function z(e,t){if(e===!1||e==null)throw Error(t)}function qe(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Je(){return Math.random().toString(36).substring(2,10)}function Ye(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 Xe(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?Qe(t):t,state:n,key:t&&t.key||r||Je(),unstable_mask:i}}function Ze({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 Qe(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 $e(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=Ge(e)?e:Xe(h.location,e,t);n&&n(r,e),l=u()+1;let d=Ye(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=Ge(e)?e:Xe(h.location,e,t);n&&n(r,e),l=u();let i=Ye(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 et(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(We,d),c=e,()=>{i.removeEventListener(We,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 et(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),z(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:Ze(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}var tt,nt=class{constructor(e){if(Ue(this,tt,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(He(this,tt).has(e))return He(this,tt).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){He(this,tt).set(e,t)}};tt=new WeakMap;var rt=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function it(e){return rt.has(e)}var at=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function ot(e){return at.has(e)}function st(e){return e.index===!0}function ct(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(z(e.index!==!0||!e.children,`Cannot specify children on an index route`),z(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),st(e)){let n={...e,id:s};return r[s]=lt(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=lt(n,t(n)),e.children&&(n.children=ct(e.children,t,o,r,i)),n}})}function lt(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ut(e,t,n=`/`){return dt(e,t,n,!1)}function dt(e,t,n,r){let i=kt((typeof t==`string`?Qe(t):t).pathname||`/`,n);if(i==null)return null;let a=pt(e);ht(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=Ot(i);o=Tt(a[e],t,r)}return o}function ft(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 pt(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;z(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=Bt([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(z(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),pt(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Ct(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of mt(e.path))a(e,t,!0,n)}),t}function mt(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=mt(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 ht(e){e.sort((e,t)=>e.score===t.score?wt(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var gt=/^:[\w-]+$/,_t=3,vt=2,yt=1,bt=10,xt=-2,St=e=>e===`*`;function Ct(e,t){let n=e.split(`/`),r=n.length;return n.some(St)&&(r+=xt),t&&(r+=vt),n.filter(e=>!St(e)).reduce((e,t)=>e+(gt.test(t)?_t:t===``?yt:bt),r)}function wt(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 Tt(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=Et({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=Et({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:Bt([a,u.pathname]),pathnameBase:Ht(Bt([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=Bt([a,u.pathnameBase]))}return o}function Et(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Dt(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 Dt(e,t=!1,n=!0){qe(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 Ot(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return qe(!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 kt(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 At({basename:e,pathname:t}){return t===`/`?e:Bt([e,t])}var jt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mt=e=>jt.test(e);function Nt(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Qe(e):e,a;return n?(n=zt(n),a=n.startsWith(`/`)?Pt(n.substring(1),`/`):Pt(n,t)):a=t,{pathname:a,search:Ut(r),hash:Wt(i)}}function Pt(e,t){let n=Vt(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Ft(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 It(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Lt(e){let t=It(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Rt(e,t,n,r=!1){let i;typeof e==`string`?i=Qe(e):(i={...e},z(!i.pathname||!i.pathname.includes(`?`),Ft(`?`,`pathname`,`search`,i)),z(!i.pathname||!i.pathname.includes(`#`),Ft(`#`,`pathname`,`hash`,i)),z(!i.search||!i.search.includes(`#`),Ft(`#`,`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=Nt(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var zt=e=>e.replace(/\/\/+/g,`/`),Bt=e=>zt(e.join(`/`)),Vt=e=>e.replace(/\/+$/,``),Ht=e=>Vt(e).replace(/^\/*/,`/`),Ut=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Wt=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Gt=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 Kt(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function qt(e){return Bt(e.map(e=>e.route.path).filter(Boolean))||`/`}var Jt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Yt(e,t){let n=e;if(typeof n!=`string`||!jt.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Jt)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=kt(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{qe(!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 Xt=Symbol(`Uninstrumented`);function Zt(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=$t(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=$t(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[Xt]??i,a=$t(n[e],t,(...e)=>tn(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[Xt]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[Xt]??e,r=$t(n.middleware,t,(...e)=>tn(e[0]));return r?(r[Xt]=t,r):e})),r}function Qt(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[Xt]??e.navigate,r=$t(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?Ze(n):`.`,...nn(e,r??{})}});r&&(r[Xt]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[Xt]??e.fetch,r=$t(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...nn(e,i??{})}});r&&(r[Xt]=t,e.fetch=r)}return e}function $t(e,t,n){return e.length===0?null:async(...r)=>{let i=await en(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function en(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=en(e,t,n,r-1),a=await o,z(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 tn(e){let{request:t,context:n,params:r,unstable_pattern:i}=e;return{request:rn(t),params:{...r},unstable_pattern:i,context:an(n)}}function nn(e,t){return{currentUrl:Ze(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 rn(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function an(e){if(sn(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var on=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function sn(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`)===on}var cn=[`POST`,`PUT`,`PATCH`,`DELETE`],ln=new Set(cn),un=[`GET`,...cn],dn=new Set(un),fn=new Set([301,302,303,307,308]),pn=new Set([307,308]),mn={state:`idle`,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},hn={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},gn={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},_n=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),vn=`remix-router-transitions`,yn=Symbol(`ResetLoaderData`);function bn(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;z(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||_n,a=i;if(e.unstable_instrumentations){let t=e.unstable_instrumentations;a=e=>({...i(e),...Zt(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=ct(e.routes,a,void 0,o),c,l=e.basename||`/`;l.startsWith(`/`)||(l=`/${l}`);let u=e.dataStrategy||Ln,d={unstable_passThroughRequests:!1,...e.future},f=null,p=new Set,m=null,h=null,g=null,_=e.hydrationData!=null,v=ut(s,e.history.location,l),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=sr(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=or(s);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&Ge(v,s,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=Ge(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=>Tn(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=En(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:mn,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,k=!1,A=new Map,j=null,ee=!1,M=!1,N=new Set,te=new Map,P=0,F=-1,ne=new Map,re=new Set,ie=new Map,ae=new Map,I=new Set,L=new Map,oe,se=null;function ce(){if(f=e.history.listen(({action:t,location:n,delta:r})=>{if(oe){oe(),oe=void 0;return}qe(L.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=ze({currentLocation:w.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{oe=e});e.history.go(r*-1),Re(i,{state:`blocked`,location:n,proceed(){Re(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,gn),de({blockers:e})}}),E?.resolve(),E=null;return}return he(t,n)}),n){jr(t,A);let e=()=>Mr(t,A);t.addEventListener(`pagehide`,e),j=()=>t.removeEventListener(`pagehide`,e)}return w.initialized||he(`POP`,w.location,{initialHydration:!0}),C}function le(){f&&f(),j&&j(),p.clear(),O&&O.abort(),w.fetchers.forEach((e,t)=>je(t)),w.blockers.forEach((e,t)=>Le(t))}function ue(e){return p.add(e),()=>p.delete(e)}function de(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`&&(I.has(t)?n.push(t):r.push(t))}),I.forEach(e=>{!w.fetchers.has(e)&&!te.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=>je(e)),r.forEach(e=>w.fetchers.delete(e))}function fe(t,n,{flushSync:r}={}){let i=w.actionData!=null&&w.navigation.formMethod!=null&&Sr(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?rr(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,gn)));let u=ee?!1:We(t,n.matches||w.matches),d=D===!0||w.navigation.formMethod!=null&&Sr(w.navigation.formMethod)&&t.state?._isRedirect!==!0;c&&=(s=c,void 0),ee||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=A.get(w.location.pathname);e&&e.has(t.pathname)?f={currentLocation:w.location,nextLocation:t}:A.has(t.pathname)&&(f={currentLocation:t,nextLocation:w.location})}else if(k){let e=A.get(w.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),A.set(w.location.pathname,e)),f={currentLocation:w.location,nextLocation:t}}de({...n,actionData:a,loaderData:o,historyAction:T,location:t,initialized:!0,renderFallback:!1,navigation:mn,revalidation:`idle`,restoreScrollPosition:u,preventScrollReset:d,blockers:l},{viewTransitionOpts:f,flushSync:r===!0}),T=`POP`,D=!1,k=!1,ee=!1,M=!1,E?.resolve(),E=null,se?.resolve(),se=null}async function pe(t,n){if(E?.resolve(),E=null,typeof t==`number`){E||=Nr();let n=E.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=Cn(!1,Sn(w.location,w.matches,l,t,n?.fromRouteId,n?.relative),n),o;n?.unstable_mask&&(o={pathname:``,search:``,hash:``,...typeof n.unstable_mask==`string`?Qe(n.unstable_mask):{...w.location.unstable_mask,...n.unstable_mask}});let s=w.location,c=Xe(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&&Sr(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=ze({currentLocation:s,nextLocation:c,historyAction:d});if(m){Re(m,{state:`blocked`,location:c,proceed(){Re(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:c}),pe(t,n)},reset(){let e=new Map(w.blockers);e.set(m,gn),de({blockers:e})}});return}await he(d,c,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.unstable_defaultShouldRevalidate})}function me(){se||=Nr(),Ee(),de({revalidation:`loading`});let e=se.promise;return w.navigation.state===`submitting`?e:w.navigation.state===`idle`?(he(w.historyAction,w.location,{startUninterruptedRevalidation:!0}),e):(he(T||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:k===!0}),e)}async function he(t,n,r){O&&O.abort(),O=null,T=t,ee=(r&&r.startUninterruptedRevalidation)===!0,Ue(w.location,w.matches),D=(r&&r.preventScrollReset)===!0,k=(r&&r.enableViewTransition)===!0;let i=c||s,a=r&&r.overrideNavigation,o=r?.initialHydration&&w.matches&&w.matches.length>0&&!y?w.matches:ut(i,n,l),u=(r&&r.flushSync)===!0;if(o&&w.initialized&&!M&&ur(w.location,n)&&!(r&&r.submission&&Sr(r.submission.formMethod))){fe(n,{matches:o},{flushSync:u});return}let d=Ge(o,i,n.pathname);if(d.active&&d.matches&&(o=d.matches),!o){let{error:e,notFoundMatches:t,route:r}=Be(n.pathname);fe(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:u});return}O=new AbortController;let f=Zn(e.history,n,O.signal,r&&r.submission),p=e.getContext?await e.getContext():new nt,m;if(r&&r.pendingError)m=[ar(o).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Sr(r.submission.formMethod)){let t=await ge(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(hr(r)&&Kt(r.error)&&r.error.status===404){O=null,fe(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}o=t.matches||o,m=t.pendingActionResult,a=Er(n,r.submission),u=!1,d.active=!1,f=Zn(e.history,f.url,f.signal)}let{shortCircuited:h,matches:g,loaderData:_,errors:v}=await _e(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,fe(n,{matches:g||o,...ir(m),loaderData:_,errors:v}))}async function ge(t,n,i,c,u,d,f,p={}){if(Ee(),de({navigation:Dr(n,i)},{flushSync:p.flushSync===!0}),d){let e=await Ke(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}=or(s);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=ar(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}=Be(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let m,h=wr(c,n);if(!h.route.action&&!h.route.lazy)m={type:`error`,error:sr(405,{method:t.method,pathname:n.pathname,routeId:h.route.id})};else{let e=await we(t,n,Un(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(gr(m)){let n;return n=p&&p.replace!=null?p.replace:Xn(m.response.headers.get(`Location`),new URL(t.url),l,e.history)===w.location.pathname+w.location.search,await Ce(t,m,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(hr(m)){let e=ar(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 _e(t,n,i,u,d,f,p,m,h,g,_,v,y){let b=f||Er(n,p),x=p||m||Tr(b),S=!ee&&!g;if(d){if(S){let e=ve(v);de({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await Ke(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}=or(s);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=ar(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}=Be(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=c||s,{dsMatches:T,revalidatingFetchers:E}=wn(t,u,a,o,e.history,w,i,x,n,g?[]:r,g===!0,M,N,I,ie,re,C,l,e.patchRoutesOnNavigation!=null,v,y);if(F=++P,!e.dataStrategy&&!T.some(e=>e.shouldLoad)&&!T.some(e=>e.route.middleware&&e.route.middleware.length>0)&&E.length===0){let e=Fe();return fe(n,{matches:i,loaderData:{},errors:v&&hr(v[1])?{[v[0]]:v[1].error}:null,...ir(v),...e?{fetchers:new Map(w.fetchers)}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=ve(v);t!==void 0&&(e.actionData=t)}E.length>0&&(e.fetchers=ye(E)),de(e,{flushSync:_})}E.forEach(e=>{Ne(e.key),e.controller&&te.set(e.key,e.controller)});let D=()=>E.forEach(e=>Ne(e.key));O&&O.signal.addEventListener(`abort`,D);let{loaderResults:k,fetcherResults:A}=await Te(T,E,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener(`abort`,D),E.forEach(e=>te.delete(e.key));let j=cr(k);if(j)return await Ce(t,j.result,!0,{replace:h}),{shortCircuited:!0};if(j=cr(A),j)return re.add(j.key),await Ce(t,j.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:ne,errors:ae}=nr(w,i,k,v,E,A);g&&w.errors&&(ae={...w.errors,...ae});let L=Fe(),oe=R(F),se=L||oe||E.length>0;return{matches:i,loaderData:ne,errors:ae,...se?{fetchers:new Map(w.fetchers)}:{}}}function ve(e){if(e&&!hr(e[1]))return{[e[0]]:e[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function ye(e){return e.forEach(e=>{let t=w.fetchers.get(e.key),n=Or(void 0,t?t.data:void 0);w.fetchers.set(e.key,n)}),new Map(w.fetchers)}async function be(t,n,r,i){Ne(t);let a=(i&&i.flushSync)===!0,o=c||s,u=Sn(w.location,w.matches,l,r,n,i?.relative),d=ut(o,u,l),f=Ge(d,o,u);if(f.active&&f.matches&&(d=f.matches),!d){Oe(t,n,sr(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=Cn(!0,u,i);if(h){Oe(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new nt,_=(i&&i.preventScrollReset)===!0;if(m&&Sr(m.formMethod)){await xe(t,n,p,d,g,f.active,a,_,m,i&&i.unstable_defaultShouldRevalidate);return}ie.set(t,{routeId:n,path:p}),await Se(t,n,p,d,g,f.active,a,_,m)}async function xe(t,n,i,u,d,f,p,m,h,g){Ee(),ie.delete(t),De(t,kr(h,w.fetchers.get(t)),{flushSync:p});let _=new AbortController,v=Zn(e.history,i,_.signal,h);if(f){let e=await Ke(u,new URL(v.url).pathname,v.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Oe(t,n,e.error,{flushSync:p});return}else if(e.matches)u=e.matches;else{Oe(t,n,sr(404,{pathname:i}),{flushSync:p});return}}let y=wr(u,i);if(!y.route.action&&!y.route.lazy){Oe(t,n,sr(405,{method:h.formMethod,pathname:i,routeId:n}),{flushSync:p});return}te.set(t,_);let b=P,x=Un(a,o,v,i,u,y,r,d),S=await we(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){te.get(t)===_&&te.delete(t);return}if(I.has(t)){if(gr(C)||hr(C)){De(t,Ar(void 0));return}}else{if(gr(C))if(te.delete(t),F>b){De(t,Ar(void 0));return}else return re.add(t),De(t,Or(h)),Ce(v,C,!1,{fetcherSubmission:h,preventScrollReset:m});if(hr(C)){Oe(t,n,C.error);return}}let E=w.navigation.location||w.location,D=Zn(e.history,E,_.signal),k=c||s,A=w.navigation.state===`idle`?w.matches:ut(k,w.navigation.location,l);z(A,`Didn't find any matches after fetcher action`);let j=++P;ne.set(t,j);let ee=Or(h,C.data);w.fetchers.set(t,ee);let{dsMatches:ae,revalidatingFetchers:L}=wn(D,d,a,o,e.history,w,A,h,E,r,!1,M,N,I,ie,re,k,l,e.patchRoutesOnNavigation!=null,[y.route.id,C],g);L.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=w.fetchers.get(t),r=Or(void 0,n?n.data:void 0);w.fetchers.set(t,r),Ne(t),e.controller&&te.set(t,e.controller)}),de({fetchers:new Map(w.fetchers)});let oe=()=>L.forEach(e=>Ne(e.key));_.signal.addEventListener(`abort`,oe);let{loaderResults:se,fetcherResults:ce}=await Te(ae,L,D,E,d);if(_.signal.aborted)return;if(_.signal.removeEventListener(`abort`,oe),ne.delete(t),te.delete(t),L.forEach(e=>te.delete(e.key)),w.fetchers.has(t)){let e=Ar(C.data);w.fetchers.set(t,e)}let le=cr(se);if(le)return Ce(D,le.result,!1,{preventScrollReset:m});if(le=cr(ce),le)return re.add(le.key),Ce(D,le.result,!1,{preventScrollReset:m});let{loaderData:ue,errors:pe}=nr(w,A,se,void 0,L,ce);R(j),w.navigation.state===`loading`&&j>F?(z(T,`Expected pending action`),O&&O.abort(),fe(w.navigation.location,{matches:A,loaderData:ue,errors:pe,fetchers:new Map(w.fetchers)})):(de({errors:pe,loaderData:rr(w.loaderData,ue,A,pe),fetchers:new Map(w.fetchers)}),M=!1)}async function Se(t,n,i,s,c,l,u,d,f){let p=w.fetchers.get(t);De(t,Or(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Zn(e.history,i,m.signal);if(l){let e=await Ke(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Oe(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{Oe(t,n,sr(404,{pathname:i}),{flushSync:u});return}}let g=wr(s,i);te.set(t,m);let _=P,v=(await we(h,i,Un(a,o,h,i,s,g,r,c),c,t))[g.route.id];if(te.get(t)===m&&te.delete(t),!h.signal.aborted){if(I.has(t)){De(t,Ar(void 0));return}if(gr(v))if(F>_){De(t,Ar(void 0));return}else{re.add(t),await Ce(h,v,!1,{preventScrollReset:d});return}if(hr(v)){Oe(t,n,v.error);return}De(t,Ar(v.data))}}async function Ce(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:c,replace:u}={}){a||(E?.resolve(),E=null),i.response.headers.has(`X-Remix-Revalidate`)&&(M=!0);let d=i.response.headers.get(`Location`);z(d,`Expected a Location header on the redirect Response`),d=Xn(d,new URL(r.url),l,e.history);let f=Xe(w.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Mt(d)){let n=et(d,!0);e=n.origin!==t.location.origin||kt(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=Tr(w.navigation));let _=o||s;pn.has(i.response.status)&&_&&Sr(_.formMethod)?await he(p,f,{submission:{..._,formAction:d},preventScrollReset:c||D,enableViewTransition:a?k:void 0}):await he(p,f,{overrideNavigation:Er(f,o),fetcherSubmission:s,preventScrollReset:c||D,enableViewTransition:a?k:void 0})}async function we(e,t,n,r,i){let a,o={};try{a=await Wn(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(!Sr(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(mr(r)){let i=r.result;o[t]={type:`redirect`,response:Jn(i,e,t,n,l)}}else o[t]=await qn(r);return o}async function Te(e,t,n,r,i){let a=we(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await we(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:sr(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Ee(){M=!0,ie.forEach((e,t)=>{te.has(t)&&N.add(t),Ne(t)})}function De(e,t,n={}){w.fetchers.set(e,t),de({fetchers:new Map(w.fetchers)},{flushSync:(n&&n.flushSync)===!0})}function Oe(e,t,n,r={}){let i=ar(w.matches,t);je(e),de({errors:{[i.route.id]:n},fetchers:new Map(w.fetchers)},{flushSync:(r&&r.flushSync)===!0})}function ke(e){return ae.set(e,(ae.get(e)||0)+1),I.has(e)&&I.delete(e),w.fetchers.get(e)||hn}function Ae(e,t){Ne(e,t?.reason),De(e,Ar(null))}function je(e){let t=w.fetchers.get(e);te.has(e)&&!(t&&t.state===`loading`&&ne.has(e))&&Ne(e),ie.delete(e),ne.delete(e),re.delete(e),I.delete(e),N.delete(e),w.fetchers.delete(e)}function Me(e){let t=(ae.get(e)||0)-1;t<=0?(ae.delete(e),I.add(e)):ae.set(e,t),de({fetchers:new Map(w.fetchers)})}function Ne(e,t){let n=te.get(e);n&&(n.abort(t),te.delete(e))}function Pe(e){for(let t of e){let e=Ar(ke(t).data);w.fetchers.set(t,e)}}function Fe(){let e=[],t=!1;for(let n of re){let r=w.fetchers.get(n);z(r,`Expected fetcher: ${n}`),r.state===`loading`&&(re.delete(n),e.push(n),t=!0)}return Pe(e),t}function R(e){let t=[];for(let[n,r]of ne)if(r<e){let e=w.fetchers.get(n);z(e,`Expected fetcher: ${n}`),e.state===`loading`&&(Ne(n),ne.delete(n),t.push(n))}return Pe(t),t.length>0}function Ie(e,t){let n=w.blockers.get(e)||gn;return L.get(e)!==t&&L.set(e,t),n}function Le(e){w.blockers.delete(e),L.delete(e)}function Re(e,t){let n=w.blockers.get(e)||gn;z(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),de({blockers:r})}function ze({currentLocation:e,nextLocation:t,historyAction:n}){if(L.size===0)return;L.size>1&&qe(!1,`A router only supports one blocker at a time`);let r=Array.from(L.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 Be(e){let t=sr(404,{pathname:e}),{matches:n,route:r}=or(c||s);return{notFoundMatches:n,route:r,error:t}}function Ve(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===mn){_=!0;let e=We(w.location,w.matches);e!=null&&de({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function He(e,t){return h&&h(e,t.map(e=>ft(e,w.loaderData)))||e.key}function Ue(e,t){if(m&&g){let n=He(e,t);m[n]=g()}}function We(e,t){if(m){let n=He(e,t),r=m[n];if(typeof r==`number`)return r}return null}function Ge(t,n,r){if(e.patchRoutesOnNavigation){if(!t)return{active:!0,matches:dt(n,r,l,!0)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:dt(n,r,l,!0)}}return{active:!1,matches:null}}async function Ke(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||An(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=ut(d,n,l),m=null;if(p&&(Object.keys(p[0].params).length===0||(m=dt(d,n,l,!0),!(m&&u.length<m.length&&Je(u,m.slice(0,u.length))))))return{type:`success`,matches:p};if(m||=dt(d,n,l,!0),!m||Je(u,m))return{type:`success`,matches:null};u=m}}function Je(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function Ye(e){o={},c=ct(e,a,void 0,o)}function Ze(e,t,n=!1){let r=c==null;An(e,t,c||s,o,a,n),r&&(s=[...s],de({}))}return C={get basename(){return l},get future(){return d},get state(){return w},get routes(){return s},get window(){return t},initialize:ce,subscribe:ue,enableScrollRestoration:Ve,navigate:pe,fetch:be,revalidate:me,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ke,resetFetcher:Ae,deleteFetcher:Me,dispose:le,getBlocker:Ie,deleteBlocker:Le,patchRoutes:Ze,_internalFetchControllers:te,_internalSetRoutes:Ye,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){de(e)}},e.unstable_instrumentations&&(C=Qt(C,e.unstable_instrumentations.map(e=>e.router).filter(Boolean))),C}function xn(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Sn(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=Rt(r||`.`,Lt(o),kt(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Cr(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=At({basename:n,pathname:c.pathname})),Ze(c)}function Cn(e,t,n){if(!n||!xn(n))return{path:t};if(n.formMethod&&!xr(n.formMethod))return{path:t,error:sr(405,{method:n.formMethod})};let r=()=>({path:t,error:sr(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=lr(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Sr(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}
`,``):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(!Sr(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()}}}z(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=$n(n.formData),s=n.formData;else if(n.body instanceof FormData)o=$n(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=er(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=er(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(Sr(c.formMethod))return{path:t,submission:c};let l=Qe(t);return e&&l.search&&Cr(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:Ze(l),submission:c}}function wn(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b){let x=y?hr(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&&hr(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=qt(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(!Tn(s))f=!1;else if(u){let{shouldLoad:e}=En(s,a.loaderData,a.errors);f=e}else Dn(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Hn(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?On(a.matches[o],i)&&(p=!0):p=!0;let m={...D,defaultShouldRevalidate:p};return Hn(n,r,e,c,O,i,l,t,kn(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=ut(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=wr(y,e.path),S=new AbortController,C=Zn(i,e.path,S.signal),w=null;if(f.has(s))f.delete(s),w=Un(n,r,C,e.path,y,x,l,t);else if(m)d&&(w=Un(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};kn(x,a)&&(w=Un(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 Tn(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function En(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Tn(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 Dn(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function On(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function kn(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function An(e,t,n,r,i,a){let o;if(e){let t=r[e];z(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=>jn(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=ct(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]=ct([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 jn(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=>jn(e,t)))??!1:!1}var Mn=new WeakMap,Nn=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(z(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Mn.get(i);o||(o={},Mn.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=it(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)qe(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)qe(!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},Pn=new WeakMap;function Fn(e,t,n,r,i){let a=n[e.id];if(z(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Pn.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{z(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=ot(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?qe(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?qe(!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 Pn.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=Nn({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 In(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 Ln(e){return e.matches.some(e=>e.route.middleware)?Rn(e,()=>In(e)):In(e)}function Rn(e,t){return zn(e,t,e=>{if(br(e))throw e;return e},fr,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=ar(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 zn(e,t,n,r,i){let{matches:a,...o}=e;return await Bn(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Bn(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 Bn(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 Vn(e,t,n,r,i){let a=Nn({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=Fn(r.route,Sr(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Hn(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Vn(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?kn(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?kn(a,{...l,defaultShouldRevalidate:e}):kn(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Sr(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Sr(n.method)||!p)?Gn({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 Un(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Hn(e,t,n,r,qt(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Vn(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Wn(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:Qn(t,n),unstable_pattern:qt(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 Rn(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 Gn({request:e,path:t,unstable_pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Sr(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:Qn(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 sr(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 sr(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Kn(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 qn(e){let{result:t,type:n}=e;if(vr(t)){let e;try{e=await Kn(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Gt(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?_r(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:dr(t),statusCode:Kt(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Kt(t)?t.status:void 0}:_r(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 Jn(e,t,n,r,i){let a=e.headers.get(`Location`);if(z(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Mt(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Sn(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Yn=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Xn(e,t,n,r){if(Mt(e)){let r=e,i=r.startsWith(`//`)?new URL(t.protocol+r):new URL(r);if(Yn.includes(i.protocol))throw Error(`Invalid redirect location`);let a=kt(i.pathname,n)!=null;if(i.origin===t.origin&&a)return zt(i.pathname)+i.search+i.hash}try{let t=r.createURL(e);if(Yn.includes(t.protocol))throw Error(`Invalid redirect location`)}catch{}return e}function Zn(e,t,n,r){let i=e.createURL(lr(t)).toString(),a={signal:n};if(r&&Sr(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=$n(r.formData):a.body=r.formData}return new Request(i,a)}function Qn(e,t){let n=new URL(e.url),r=typeof t==`string`?Qe(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 $n(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function er(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function tr(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&hr(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(z(!gr(f),`Cannot handle redirect results in processLoaderData`),hr(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=ar(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=yn),c||(c=!0,s=Kt(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 nr(e,t,n,r,i,a){let{loaderData:o,errors:s}=tr(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(z(o,`Did not find corresponding fetcher result`),hr(o)){let t=ar(e.matches,r?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:o.error}),e.fetchers.delete(n)}else if(gr(o))z(!1,`Unhandled fetcher revalidation redirect`);else{let t=Ar(o.data);e.fetchers.set(n,t)}}),{loaderData:o,errors:s}}function rr(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==yn).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 ir(e){return e?hr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ar(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 or(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 sr(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 Gt(e||500,o,Error(s),!0)}function cr(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(gr(r))return{key:n,result:r}}}function lr(e){return Ze({...typeof e==`string`?Qe(e):e,hash:``})}function ur(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function dr(e){return new Gt(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function fr(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&pr(t))}function pr(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function mr(e){return vr(e.result)&&fn.has(e.result.status)}function hr(e){return e.type===`error`}function gr(e){return(e&&e.type)===`redirect`}function _r(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function vr(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function yr(e){return fn.has(e)}function br(e){return vr(e)&&yr(e.status)&&e.headers.has(`Location`)}function xr(e){return dn.has(e.toUpperCase())}function Sr(e){return ln.has(e.toUpperCase())}function Cr(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function wr(e,t){let n=typeof t==`string`?Qe(t).search:t.search;if(e[e.length-1].route.index&&Cr(n||``))return e[e.length-1];let r=It(e);return r[r.length-1]}function Tr(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 Er(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 Dr(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 Or(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 kr(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 Ar(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 jr(e,t){try{let n=e.sessionStorage.getItem(vn);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 Mr(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(vn,JSON.stringify(n))}catch(e){qe(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function Nr(){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 Pr=g.createContext(null);Pr.displayName=`DataRouter`;var Fr=g.createContext(null);Fr.displayName=`DataRouterState`;var Ir=g.createContext(!1);function Lr(){return g.useContext(Ir)}var Rr=g.createContext({isTransitioning:!1});Rr.displayName=`ViewTransition`;var zr=g.createContext(new Map);zr.displayName=`Fetchers`;var Br=g.createContext(null);Br.displayName=`Await`;var Vr=g.createContext(null);Vr.displayName=`Navigation`;var Hr=g.createContext(null);Hr.displayName=`Location`;var Ur=g.createContext({outlet:null,matches:[],isDataRoute:!1});Ur.displayName=`Route`;var Wr=g.createContext(null);Wr.displayName=`RouteError`;var Gr=`REACT_ROUTER_ERROR`,Kr=`REDIRECT`,qr=`ROUTE_ERROR_RESPONSE`;function Jr(e){if(e.startsWith(`${Gr}:${Kr}:{`))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 Yr(e){if(e.startsWith(`${Gr}:${qr}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Gt(t.status,t.statusText,t.data)}catch{}}function Xr(e,{relative:t}={}){z(Zr(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=g.useContext(Vr),{hash:i,pathname:a,search:o}=oi(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Bt([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Zr(){return g.useContext(Hr)!=null}function Qr(){return z(Zr(),`useLocation() may be used only in the context of a <Router> component.`),g.useContext(Hr).location}var $r=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function ei(e){g.useContext(Vr).static||g.useLayoutEffect(e)}function ti(){let{isDataRoute:e}=g.useContext(Ur);return e?wi():ni()}function ni(){z(Zr(),`useNavigate() may be used only in the context of a <Router> component.`);let e=g.useContext(Pr),{basename:t,navigator:n}=g.useContext(Vr),{matches:r}=g.useContext(Ur),{pathname:i}=Qr(),a=JSON.stringify(Lt(r)),o=g.useRef(!1);return ei(()=>{o.current=!0}),g.useCallback((r,s={})=>{if(qe(o.current,$r),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Rt(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Bt([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var ri=g.createContext(null);function ii(e){let t=g.useContext(Ur).outlet;return g.useMemo(()=>t&&g.createElement(ri.Provider,{value:e},t),[t,e])}function ai(){let{matches:e}=g.useContext(Ur),t=e[e.length-1];return t?t.params:{}}function oi(e,{relative:t}={}){let{matches:n}=g.useContext(Ur),{pathname:r}=Qr(),i=JSON.stringify(Lt(n));return g.useMemo(()=>Rt(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function si(e,t,n){z(Zr(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=g.useContext(Vr),{matches:i}=g.useContext(Ur),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||``;Ei(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.
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=Qr(),d;if(t){let e=typeof t==`string`?Qe(t):t;z(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=ut(e,{pathname:p});qe(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),qe(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=mi(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Bt([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Bt([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?g.createElement(Hr.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},h):h}function ci(){let e=Ci(),t=Kt(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=g.createElement(g.Fragment,null,g.createElement(`p`,null,`💿 Hey developer 👋`),g.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,g.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,g.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),g.createElement(g.Fragment,null,g.createElement(`h2`,null,`Unexpected Application Error!`),g.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?g.createElement(`pre`,{style:i},n):null,o)}var li=g.createElement(ci,null),ui=class extends g.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=Yr(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:g.createElement(Ur.Provider,{value:this.props.routeContext},g.createElement(Wr.Provider,{value:e,children:this.props.component}));return this.context?g.createElement(fi,{error:e},t):t}};ui.contextType=Ir;var di=new WeakMap;function fi({children:e,error:t}){let{basename:n}=g.useContext(Vr);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Jr(t.digest);if(e){let r=di.get(t);if(r)throw r;let i=Yt(e.location,n);if(Jt&&!di.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 di.set(t,n),n}return g.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function pi({routeContext:e,match:t,children:n}){let r=g.useContext(Pr);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(Ur.Provider,{value:e},n)}function mi(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);z(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:qt(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||li,o&&(s<0&&c===0?(Ei(`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?g.createElement(n.route.Component,null):n.route.element?n.route.element:e,g.createElement(pi,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?g.createElement(ui,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function hi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gi(e){let t=g.useContext(Pr);return z(t,hi(e)),t}function _i(e){let t=g.useContext(Fr);return z(t,hi(e)),t}function vi(e){let t=g.useContext(Ur);return z(t,hi(e)),t}function yi(e){let t=vi(e),n=t.matches[t.matches.length-1];return z(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function bi(){return yi(`useRouteId`)}function xi(){return _i(`useNavigation`).navigation}function Si(){let{matches:e,loaderData:t}=_i(`useMatches`);return g.useMemo(()=>e.map(e=>ft(e,t)),[e,t])}function Ci(){let e=g.useContext(Wr),t=_i(`useRouteError`),n=yi(`useRouteError`);return e===void 0?t.errors?.[n]:e}function wi(){let{router:e}=gi(`useNavigate`),t=yi(`useNavigate`),n=g.useRef(!1);return ei(()=>{n.current=!0}),g.useCallback(async(r,i={})=>{qe(n.current,$r),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Ti={};function Ei(e,t,n){!t&&!Ti[e]&&(Ti[e]=!0,qe(!1,n))}var Di={};function Oi(e,t){!e&&!Di[t]&&(Di[t]=!0,console.warn(t))}var ki=g.useOptimistic,Ai=()=>void 0;function ji(e){return ki?ki(e):[e,Ai]}function Mi(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&qe(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:g.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&qe(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:g.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&qe(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:g.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Ni=[`HydrateFallback`,`hydrateFallbackElement`],B=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 Pi({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){r=Lr()||r;let[i,a]=g.useState(e.state),[o,s]=ji(i),[c,l]=g.useState(),[u,d]=g.useState({isTransitioning:!1}),[f,p]=g.useState(),[m,h]=g.useState(),[_,v]=g.useState(),y=g.useRef(new Map),b=g.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:_})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},unstable_pattern:qt(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),o.forEach(e=>y.current.delete(e)),Oi(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 b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Oi(_==null||b,"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."),!_||!b){t&&u?t(()=>a(i)):r===!1?a(i):g.startTransition(()=>{r===!0&&s(e=>Fi(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.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(),v({state:i,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,m,f,r,s,n]);g.useLayoutEffect(()=>e.subscribe(b),[e,b]);let x=o.initialized;g.useLayoutEffect(()=>{!x&&e.state.initialized&&b(e.state,{deletedFetchers:[],flushSync:!1,newErrors:null})},[x,b,e.state]),g.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new B)},[u]),g.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):g.startTransition(()=>{r===!0&&s(e=>Fi(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]),g.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),g.useEffect(()=>{!u.isTransitioning&&_&&(l(_.state),d({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[u.isTransitioning,_]);let S=g.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]),C=e.basename||`/`,w=g.useMemo(()=>({router:e,navigator:S,static:!1,basename:C,onError:n}),[e,S,C,n]);return g.createElement(g.Fragment,null,g.createElement(Pr.Provider,{value:w},g.createElement(Fr.Provider,{value:o},g.createElement(zr.Provider,{value:y.current},g.createElement(Rr.Provider,{value:u},g.createElement(zi,{basename:C,location:o.location,navigationType:o.historyAction,navigator:S,unstable_useTransitions:r},g.createElement(Ii,{routes:e.routes,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function Fi(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 Ii=g.memo(Li);function Li({routes:e,future:t,state:n,isStatic:r,onError:i}){return si(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function Ri(e){return ii(e.context)}function zi({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){z(!Zr(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=g.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Qe(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:m}=n,h=g.useMemo(()=>{let e=kt(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 qe(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:g.createElement(Vr.Provider,{value:c},g.createElement(Hr.Provider,{children:t,value:h}))}g.Component;var Bi=`get`,Vi=`application/x-www-form-urlencoded`;function Hi(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Ui(e){return Hi(e)&&e.tagName.toLowerCase()===`button`}function Wi(e){return Hi(e)&&e.tagName.toLowerCase()===`form`}function Gi(e){return Hi(e)&&e.tagName.toLowerCase()===`input`}function Ki(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qi(e,t){return e.button===0&&(!t||t===`_self`)&&!Ki(e)}var Ji=null;function Yi(){if(Ji===null)try{new FormData(document.createElement(`form`),0),Ji=!1}catch{Ji=!0}return Ji}var Xi=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Zi(e){return e!=null&&!Xi.has(e)?(qe(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Vi}"`),null):e}function Qi(e,t){let n,r,i,a,o;if(Wi(e)){let o=e.getAttribute(`action`);r=o?kt(o,t):null,n=e.getAttribute(`method`)||Bi,i=Zi(e.getAttribute(`enctype`))||Vi,a=new FormData(e)}else if(Ui(e)||Gi(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?kt(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Bi,i=Zi(e.getAttribute(`formenctype`))||Zi(o.getAttribute(`enctype`))||Vi,a=new FormData(o,e),!Yi()){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(Hi(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Bi,r=null,i=Vi,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 $i={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},ea=/[&><\u2028\u2029]/g;function ta(e){return e.replace(ea,e=>$i[e])}function na(e,t){if(e===!1||e==null)throw Error(t)}function ra(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&&kt(i.pathname,t)===`/`?i.pathname=`${Vt(t)}/_root.${r}`:i.pathname=`${Vt(i.pathname)}.${r}`,i}async function ia(e,t){if(e.id in t)return t[e.id];try{let n=await ze(()=>import(e.module),[]);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 aa(e){return e!=null&&typeof e.page==`string`}function oa(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 sa(e,t,n){return fa((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await ia(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(oa).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function ca(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 la(e,t,{includeHydrateFallback:n}={}){return ua(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 ua(e){return[...new Set(e)]}function da(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function fa(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!aa(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(da(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function pa(){let e=g.useContext(Pr);return na(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function ma(){let e=g.useContext(Fr);return na(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var ha=g.createContext(void 0);ha.displayName=`FrameworkContext`;function ga(){let e=g.useContext(ha);return na(e,`You must render this element inside a <HydratedRouter> element`),e}function _a(e,t){let n=g.useContext(ha),[r,i]=g.useState(!1),[a,o]=g.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=g.useRef(null);g.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]),g.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:va(s,p),onBlur:va(c,m),onMouseEnter:va(l,p),onMouseLeave:va(u,m),onTouchStart:va(d,p)}]:[a,f,{}]:[!1,f,{}]}function va(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ya({page:e,...t}){let n=Lr(),{router:r}=pa(),i=g.useMemo(()=>ut(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?g.createElement(xa,{page:e,matches:i,...t}):g.createElement(Sa,{page:e,matches:i,...t}):null}function ba(e){let{manifest:t,routeModules:n}=ga(),[r,i]=g.useState([]);return g.useEffect(()=>{let r=!1;return sa(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function xa({page:e,matches:t,...n}){let r=Qr(),{future:i}=ga(),{basename:a}=pa(),o=g.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=ra(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 g.createElement(g.Fragment,null,o.map(e=>g.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Sa({page:e,matches:t,...n}){let r=Qr(),{future:i,manifest:a,routeModules:o}=ga(),{basename:s}=pa(),{loaderData:c,matches:l}=ma(),u=g.useMemo(()=>ca(e,t,l,a,r,`data`),[e,t,l,a,r]),d=g.useMemo(()=>ca(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=g.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=ra(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=g.useMemo(()=>la(d,a),[d,a]),m=ba(d);return g.createElement(g.Fragment,null,f.map(e=>g.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>g.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>g.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Ca(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}g.Component;var wa=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{wa&&(window.__reactRouterVersion=`7.14.1`)}catch{}function Ta(e,t){return bn({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:Ke({window:t?.window}),hydrationData:t?.hydrationData||Ea(),routes:e,mapRouteProperties:Mi,hydrationRouteProperties:Ni,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function Ea(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Da(e.errors)}),e}function Da(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 Gt(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 Oa({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=g.useState({action:n.action,location:n.location}),o=g.useCallback(e=>{r===!1?a(e):g.startTransition(()=>a(e))},[r]);return g.useLayoutEffect(()=>n.listen(o),[n,o]),g.createElement(zi,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}Oa.displayName=`unstable_HistoryRouter`;var ka=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Aa=g.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:_,unstable_useTransitions:v}=g.useContext(Vr),y=typeof l==`string`&&ka.test(l),b=Yt(l,h);l=b.to;let x=Xr(l,{relative:r}),S=Qr(),C=null;if(o){let e=Rt(o,[],S.unstable_mask?S.unstable_mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Bt([h,e.pathname])),C=_.createHref(e)}let[w,T,E]=_a(n,p),D=La(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=g.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:Ca(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?g.createElement(g.Fragment,null,A,g.createElement(ya,{page:x})):A});Aa.displayName=`Link`;var ja=g.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=oi(a,{relative:c.relative}),d=Qr(),f=g.useContext(Fr),{navigator:p,basename:m}=g.useContext(Vr),h=f!=null&&qa(u)&&o===!0,_=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&m&&(y=kt(y,m)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return g.createElement(Aa,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});ja.displayName=`NavLink`;var Ma=g.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Bi,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=g.useContext(Vr),_=Ba(),v=Va(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&ka.test(s);return g.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>_(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?g.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});Ma.displayName=`Form`;function Na({getKey:e,storageKey:t,...n}){let r=g.useContext(ha),{basename:i}=g.useContext(Vr),a=Qr(),o=Si();Ga({getKey:e,storageKey:t});let s=g.useMemo(()=>{if(!r||!e)return null;let t=Wa(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 g.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${ta(JSON.stringify(t||Ha))}, ${ta(JSON.stringify(s))})`}})}Na.displayName=`ScrollRestoration`;function Pa(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Fa(e){let t=g.useContext(Pr);return z(t,Pa(e)),t}function Ia(e){let t=g.useContext(Fr);return z(t,Pa(e)),t}function La(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=ti(),d=Qr(),f=oi(e,{relative:o});return g.useCallback(p=>{if(qi(p,t)){p.preventDefault();let t=n===void 0?Ze(d)===Ze(f):n,m=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?g.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var Ra=0,za=()=>`__${String(++Ra)}__`;function Ba(){let{router:e}=Fa(`useSubmit`),{basename:t}=g.useContext(Vr),n=bi(),r=e.fetch,i=e.navigate;return g.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Qi(e,t);a.navigate===!1?await r(a.fetcherKey||za(),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 Va(e,{relative:t}={}){let{basename:n}=g.useContext(Vr),r=g.useContext(Ur);z(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...oi(e||`.`,{relative:t})},o=Qr();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:Bt([n,a.pathname])),Ze(a)}var Ha=`react-router-scroll-positions`,Ua={};function Wa(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:kt(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Ga({getKey:e,storageKey:t}={}){let{router:n}=Fa(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Ia(`useScrollRestoration`),{basename:a}=g.useContext(Vr),o=Qr(),s=Si(),c=xi();g.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Ka(g.useCallback(()=>{if(c.state===`idle`){let t=Wa(o,s,a,e);Ua[t]=window.scrollY}try{sessionStorage.setItem(t||Ha,JSON.stringify(Ua))}catch(e){qe(!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`&&(g.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Ha);e&&(Ua=JSON.parse(e))}catch{}},[t]),g.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Ua,()=>window.scrollY,e?(t,n)=>Wa(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),g.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{qe(!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 Ka(e,t){let{capture:n}=t||{};g.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function qa(e,{relative:t}={}){let n=g.useContext(Rr);z(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Fa(`useViewTransitionState`),i=oi(e,{relative:t});if(!n.isTransitioning)return!1;let a=kt(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=kt(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Et(i.pathname,o)!=null||Et(i.pathname,a)!=null}function Ja(e){return g.createElement(Pi,{flushSync:Fe.flushSync,...e})}var Ya=class e extends Error{static kind=`ClerkError`;clerkError=!0;code;longMessage;docsUrl;cause;get name(){return this.constructor.name}constructor(t){super(new.target.formatMessage(new.target.kind,t.message,t.code,t.docsUrl),{cause:t.cause}),Object.setPrototypeOf(this,e.prototype),this.code=t.code,this.docsUrl=t.docsUrl,this.longMessage=t.longMessage,this.cause=t.cause}toString(){return`[${this.name}]\nMessage:${this.message}`}static formatMessage(e,t,n,r){let i=`Clerk:`,a=new RegExp(i.replace(` `,`\\s*`),`i`);return t=t.replace(a,``),t=`${i} ${t.trim()}\n\n(code="${n}")\n\n`,r&&(t+=`\n\nDocs: ${r}`),t}},Xa=class e extends Ya{static kind=`ClerkRuntimeError`;clerkRuntimeError=!0;constructor(t,n){super({...n,message:t}),Object.setPrototypeOf(this,e.prototype)}},Za=Object.freeze({InvalidProxyUrlErrorMessage:`The proxyUrl passed to Clerk is invalid. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})`,InvalidPublishableKeyErrorMessage:`The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})`,MissingPublishableKeyErrorMessage:`Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.`,MissingSecretKeyErrorMessage:`Missing secretKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.`,MissingClerkProvider:`{{source}} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider`});function Qa({packageName:e,customMessages:t}){let n=e;function r(e,t){if(!t)return`${n}: ${e}`;let r=e,i=e.matchAll(/{{([a-zA-Z0-9-_]+)}}/g);for(let e of i){let n=(t[e[1]]||``).toString();r=r.replace(`{{${e[1]}}}`,n)}return`${n}: ${r}`}let i={...Za,...t};return{setPackageName({packageName:e}){return typeof e==`string`&&(n=e),this},setMessages({customMessages:e}){return Object.assign(i,e||{}),this},throwInvalidPublishableKeyError(e){throw Error(r(i.InvalidPublishableKeyErrorMessage,e))},throwInvalidProxyUrl(e){throw Error(r(i.InvalidProxyUrlErrorMessage,e))},throwMissingPublishableKeyError(){throw Error(r(i.MissingPublishableKeyErrorMessage))},throwMissingSecretKeyError(){throw Error(r(i.MissingSecretKeyErrorMessage))},throwMissingClerkProviderError(e){throw Error(r(i.MissingClerkProvider,e))},throw(e){throw Error(r(e))}}}var $a=[`.lcl.dev`,`.stg.dev`,`.lclstage.dev`,`.stgstage.dev`,`.dev.lclclerk.com`,`.stg.lclclerk.com`,`.accounts.lclclerk.com`,`accountsstage.dev`,`accounts.dev`],eo=e=>typeof atob<`u`&&typeof atob==`function`?atob(e):globalThis.Buffer===void 0?e:globalThis.Buffer.from(e,`base64`).toString(),to=`pk_live_`,no=`pk_test_`;function ro(e){if(!e.endsWith(`$`))return!1;let t=e.slice(0,-1);return t.includes(`$`)?!1:t.includes(`.`)}function io(e,t={}){if(e||=``,!e||!ao(e)){if(t.fatal&&!e)throw Error(`Publishable key is missing. Ensure that your publishable key is correctly configured. Double-check your environment configuration for your keys, or access them here: https://dashboard.clerk.com/last-active?path=api-keys`);if(t.fatal&&!ao(e))throw Error(`Publishable key not valid.`);return null}let n=e.startsWith(to)?`production`:`development`,r;try{r=eo(e.split(`_`)[2])}catch{if(t.fatal)throw Error(`Publishable key not valid: Failed to decode key.`);return null}if(!ro(r)){if(t.fatal)throw Error(`Publishable key not valid: Decoded key has invalid format.`);return null}let i=r.slice(0,-1);return t.proxyUrl?i=t.proxyUrl:n!==`development`&&t.domain&&t.isSatellite&&(i=`clerk.${t.domain}`),{instanceType:n,frontendApi:i}}function ao(e=``){try{if(!(e.startsWith(to)||e.startsWith(no)))return!1;let t=e.split(`_`);if(t.length!==3)return!1;let n=t[2];return n?ro(eo(n)):!1}catch{return!1}}function oo(){let e=new Map;return{isDevOrStagingUrl:t=>{if(!t)return!1;let n=typeof t==`string`?t:t.hostname,r=e.get(n);return r===void 0&&(r=$a.some(e=>n.endsWith(e)),e.set(n,r)),r}}}var so={strict_mfa:{afterMinutes:10,level:`multi_factor`},strict:{afterMinutes:10,level:`second_factor`},moderate:{afterMinutes:60,level:`second_factor`},lax:{afterMinutes:1440,level:`second_factor`}},co=new Set([`first_factor`,`second_factor`,`multi_factor`]),lo=new Set([`strict_mfa`,`strict`,`moderate`,`lax`]),uo=new Set([`o`,`org`,`organization`]),fo=new Set([`u`,`user`]),V=e=>typeof e==`number`&&e>0,po=e=>co.has(e),mo=e=>lo.has(e),ho=e=>e.replace(/^(org:)*/,`org:`),go=(e,t)=>{let{orgId:n,orgRole:r,orgPermissions:i}=t;return!e.role&&!e.permission||!n||!r||!i?null:e.permission?i.includes(ho(e.permission)):e.role?ho(r)===ho(e.role):null},_o=(e,t)=>{let{org:n,user:r}=yo(e),[i,a]=t.split(`:`),o=a!==void 0,s=i,c=a||i;if(o&&!uo.has(s)&&!fo.has(s))throw Error(`Invalid scope: ${s}`);if(o){if(uo.has(s))return n.includes(c);if(fo.has(s))return r.includes(c)}return[...n,...r].includes(c)},vo=(e,t)=>{let{features:n,plans:r}=t;return e.feature&&n?_o(n,e.feature):e.plan&&r?_o(r,e.plan):null},yo=e=>{let t=[],n=[];if(!e)return{org:t,user:n};let r=e.split(`,`);for(let e=0;e<r.length;e++){let i=r[e].trim(),a=i.indexOf(`:`);if(a===-1)throw Error(`Invalid claim element (missing colon): ${i}`);let o=i.slice(0,a),s=i.slice(a+1);o===`o`?t.push(s):o===`u`?n.push(s):(o===`ou`||o===`uo`)&&(t.push(s),n.push(s))}return{org:t,user:n}},bo=e=>{if(!e)return!1;let t=e=>typeof e==`string`?so[e]:e,n=typeof e==`string`&&mo(e),r=typeof e==`object`&&po(e.level)&&V(e.afterMinutes);return n||r?t.bind(null,e):!1},xo=(e,{factorVerificationAge:t})=>{if(!e.reverification||!t)return null;let n=bo(e.reverification);if(!n)return null;let{level:r,afterMinutes:i}=n(),[a,o]=t,s=a===-1?null:i>a,c=o===-1?null:i>o;switch(r){case`first_factor`:return s;case`second_factor`:return o===-1?s:c;case`multi_factor`:return o===-1?s:s&&c}},So=e=>t=>{if(!e.userId)return!1;let n=vo(t,e),r=go(t,e),i=xo(t,e);return[n||r,i].some(e=>e===null)?[n||r,i].some(e=>e===!0):[n||r,i].every(e=>e===!0)},Co=({authObject:{sessionId:e,sessionStatus:t,userId:n,actor:r,orgId:i,orgRole:a,orgSlug:o,signOut:s,getToken:c,has:l,sessionClaims:u},options:{treatPendingAsSignedOut:d=!0}})=>{if(e===void 0&&n===void 0)return{actor:void 0,getToken:c,has:()=>!1,isLoaded:!1,isSignedIn:void 0,orgId:void 0,orgRole:void 0,orgSlug:void 0,sessionClaims:void 0,sessionId:e,signOut:s,userId:n};if(e===null&&n===null)return{actor:null,getToken:c,has:()=>!1,isLoaded:!0,isSignedIn:!1,orgId:null,orgRole:null,orgSlug:null,sessionClaims:null,sessionId:e,signOut:s,userId:n};if(d&&t===`pending`)return{actor:null,getToken:c,has:()=>!1,isLoaded:!0,isSignedIn:!1,orgId:null,orgRole:null,orgSlug:null,sessionClaims:null,sessionId:null,signOut:s,userId:null};if(e&&u&&n&&i&&a)return{actor:r||null,getToken:c,has:l,isLoaded:!0,isSignedIn:!0,orgId:i,orgRole:a,orgSlug:o||null,sessionClaims:u,sessionId:e,signOut:s,userId:n};if(e&&u&&n&&!i)return{actor:r||null,getToken:c,has:l,isLoaded:!0,isSignedIn:!0,orgId:null,orgRole:null,orgSlug:null,sessionClaims:u,sessionId:e,signOut:s,userId:n}},wo=(e,t,n)=>!e&&n?To(n):Eo(t),To=e=>{let t=e.userId,n=e.user,r=e.sessionId,i=e.sessionStatus,a=e.sessionClaims;return{userId:t,user:n,sessionId:r,session:e.session,sessionStatus:i,sessionClaims:a,organization:e.organization,orgId:e.orgId,orgRole:e.orgRole,orgPermissions:e.orgPermissions,orgSlug:e.orgSlug,actor:e.actor,factorVerificationAge:e.factorVerificationAge}},Eo=e=>{let t=e.user?e.user.id:e.user,n=e.user,r=e.session?e.session.id:e.session,i=e.session,a=e.session?.status,o=e.session?e.session.lastActiveToken?.jwt?.claims:null,s=e.session?e.session.factorVerificationAge:null,c=i?.actor,l=e.organization,u=e.organization?e.organization.id:e.organization,d=l?.slug,f=l&&n?.organizationMemberships?.find(e=>e.organization.id===u),p=f&&f.permissions;return{userId:t,user:n,sessionId:r,session:i,sessionStatus:a,sessionClaims:o,organization:l,orgId:u,orgRole:f&&f.role,orgSlug:d,orgPermissions:p,actor:c,factorVerificationAge:s}},Do=`METHOD_CALLED`,Oo=.1;function ko(e,t){return{event:Do,eventSamplingRate:Oo,payload:{method:e,...t}}}var Ao=`ClerkJS:`;function jo(){throw Error(`${Ao} Clerk instance not found. Make sure Clerk is initialized before using any Clerk components.`)}var Mo=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(){}},No={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Po=new class{#e=No;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 Fo(e){setTimeout(e,0)}var Io=typeof window>`u`||`Deno`in globalThis;function Lo(){}function Ro(e){return typeof e==`number`&&e>=0&&e!==1/0}function zo(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Bo(e,t){return typeof e==`function`?e(t):e}function Vo(e,t){return typeof e==`function`?e(t):e}var Ho=Object.prototype.hasOwnProperty;function Uo(e,t){if(e===t)return e;let n=Go(e)&&Go(t);if(!n&&!(Ko(e)&&Ko(t)))return t;let r=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),a=i.length,o=n?Array(a):{},s=0;for(let c=0;c<a;c++){let a=n?c:i[c],l=e[a],u=t[a];if(l===u){o[a]=l,(n?c<r:Ho.call(e,a))&&s++;continue}if(l===null||u===null||typeof l!=`object`||typeof u!=`object`){o[a]=u;continue}let d=Uo(l,u);o[a]=d,d===l&&s++}return r===a&&s===r?e:o}function Wo(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 Go(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ko(e){if(!qo(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!qo(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function qo(e){return Object.prototype.toString.call(e)===`[object Object]`}function Jo(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Uo(e,t)}function Yo(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Xo(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Zo=Symbol();function Qo(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Zo?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function $o(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 es=new class extends Mo{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Io&&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`}};function ts(){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 ns=Fo;function rs(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ns,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 is=rs(),as=new class extends Mo{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Io&&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 os(e){return(e??`online`)===`online`?as.isOnline():!0}function ss(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:os(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}var cs=class extends Mo{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=ts(),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),us(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ds(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ds(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 Vo(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&&!Wo(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&fs(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Vo(this.options.enabled,this.#t)!==Vo(t.enabled,this.#t)||Bo(this.options.staleTime,this.#t)!==Bo(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Vo(this.options.enabled,this.#t)!==Vo(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 ms(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(Lo)),t}#g(){this.#b();let e=Bo(this.options.staleTime,this.#t);if(Io||this.#r.isStale||!Ro(e))return;let t=zo(this.#r.dataUpdatedAt,e)+1;this.#d=Po.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,!(Io||Vo(this.options.enabled,this.#t)===!1||!Ro(this.#p)||this.#p===0)&&(this.#f=Po.setInterval(()=>{(this.options.refetchIntervalInBackground||es.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(Po.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(Po.clearInterval(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&&us(e,t),o=i&&fs(e,n,t,r);(a||o)&&(l={...l,...ss(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=Jo(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=Jo(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:l.dataUpdateCount>0||l.errorUpdateCount>0,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:ps(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Vo(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=e=>{x.status===`error`?e.reject(x.error):x.data!==void 0&&e.resolve(x.data)},r=()=>{t(this.#o=x.promise=ts())},i=this.#o;switch(i.status){case`pending`:e.queryHash===n.queryHash&&t(i);break;case`fulfilled`:(x.status===`error`||x.data!==i.value)&&r();break;case`rejected`:(x.status!==`error`||x.error!==i.reason)&&r();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),!Wo(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){is.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function ls(e,t){return Vo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function us(e,t){return ls(e,t)||e.state.data!==void 0&&ds(e,t,t.refetchOnMount)}function ds(e,t,n){if(Vo(t.enabled,e)!==!1&&Bo(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&ps(e,t)}return!1}function fs(e,t,n,r){return(e!==t||Vo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&ps(e,n)}function ps(e,t){return Vo(t.enabled,e)!==!1&&e.isStaleByTime(Bo(t.staleTime,e))}function ms(e,t){return!Wo(e.getCurrentResult(),t)}function hs(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=>{$o(e,()=>t.signal,()=>n=!0)},u=Qo(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?Xo:Yo;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?_s:gs,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:gs(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 gs(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 _s(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function vs(e,t){return t?gs(e,t)!=null:!1}function ys(e,t){return!t||!e.getPreviousPageParam?!1:_s(e,t)!=null}var bs=class extends cs{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:hs()})}getOptimisticResult(e){return e.behavior=hs(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:vs(t,n.data),hasPreviousPage:ys(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},xs=Object.prototype.hasOwnProperty;function Ss(e,t,n){for(n of e.keys())if(Cs(n,t))return n}function Cs(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Cs(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i==`object`&&(i=Ss(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i==`object`&&(i=Ss(t,i),!i)||!Cs(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e==`object`){for(n in r=0,e)if(xs.call(e,n)&&++r&&!xs.call(t,n)||!(n in t)||!Cs(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function ws(e,t){if(!e)throw Error(typeof t==`string`?t:`${t.displayName} not found`)}var Ts=(e,t)=>{let{assertCtxFn:n=ws}=t||{},r=g.createContext(void 0);return r.displayName=e,[r,()=>{let t=g.useContext(r);return n(t,`${e} not found`),t.value},()=>{let e=g.useContext(r);return e?e.value:{}}]},[Es,Ds]=Ts(`ClerkInstanceContext`),[Os,ks]=Ts(`InitialStateContext`);function As({children:e,initialState:t}){let[n]=(0,g.useState)(t),r=g.useMemo(()=>({value:n}),[n]);return g.createElement(Os.Provider,{value:r},e)}function js(){let e=ks();if(e instanceof Promise){if(`use`in g.default&&typeof g.use==`function`)return g.use(e);throw Error(`initialState cannot be a promise if React version is less than 19`)}return e}g.createContext({});var[Ms,Ns]=Ts(`CheckoutContext`),Ps=({children:e,...t})=>g.createElement(Ms.Provider,{value:{value:t}},e);function Fs(e){if(!g.useContext(Es)){if(typeof e==`function`){e();return}throw Error(`${e} can only be used within the <ClerkProvider /> component.
Possible fixes:
1. Ensure that the <ClerkProvider /> is correctly wrapping your application where this component is used.
2. Check for multiple versions of the \`@clerk/shared\` package in your project. Use a tool like \`npm ls @clerk/shared\` to identify multiple versions, and update your dependencies to only rely on one.
Learn more: https://clerk.com/docs/components/clerk-provider`.trim())}}var Is={USER_MEMBERSHIPS_KEY:`userMemberships`,USER_INVITATIONS_KEY:`userInvitations`,USER_SUGGESTIONS_KEY:`userSuggestions`,DOMAINS_KEY:`domains`,MEMBERSHIP_REQUESTS_KEY:`membershipRequests`,MEMBERSHIPS_KEY:`memberships`,INVITATIONS_KEY:`invitations`,PLANS_KEY:`billing-plans`,SUBSCRIPTION_KEY:`billing-subscription`,PAYMENT_METHODS_KEY:`billing-payment-methods`,PAYMENT_ATTEMPTS_KEY:`billing-payment-attempts`,STATEMENTS_KEY:`billing-statements`,API_KEYS_KEY:`apiKeys`,ORGANIZATION_CREATION_DEFAULTS_KEY:`organizationCreationDefaults`,OAUTH_CONSENT_INFO_KEY:`oauthConsentInfo`};function Ls(e){return{queryKey:[e.stablePrefix,e.authenticated,e.tracked,e.untracked],invalidationKey:[e.stablePrefix,e.authenticated,e.tracked],stableKey:e.stablePrefix,authenticated:e.authenticated}}function Rs(e){if(e)return function(e){return e}}function zs(e){let t=function(){},n;return n=new Proxy(t,{get(t,r){if(r!==`then`)return r===`toString`?()=>`[${e}]`:r===Symbol.toPrimitive?()=>0:n},apply(){return n},construct(){return n},has(){return!1},set(){return!1}}),n}var Bs=zs(`ClerkMockQueryClient`),Vs=()=>{let e=Ds(),t=e.__internal_queryClient,[,n]=(0,g.useState)(typeof t==`object`&&`__tag`in t&&t.__tag===`clerk-rq-client`);(0,g.useEffect)(()=>{let t=()=>n(!0);return e.on(`queryClientStatus`,t),()=>{e.off(`queryClientStatus`,t)}},[e,n]);let r=typeof t==`object`&&`__tag`in t&&t.__tag===`clerk-rq-client`;return[t?.client||Bs,r]};function Hs(e,t){let[n,r]=Vs(),i=r?n.defaultQueryOptions(e):e;i._optimisticResults=`optimistic`;let a=g.useMemo(()=>new t(n,i),[n]),o=a.getOptimisticResult(i),s=e.subscribed!==!1;return g.useSyncExternalStore(g.useCallback(e=>{let t=s?a.subscribe(is.batchCalls(e)):Lo;return a.updateResult(),t},[a,s]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),g.useEffect(()=>{a.setOptions(i)},[i,a]),r?i.notifyOnChangeProps?o:a.trackResult(o):{data:void 0,error:null,isLoading:!1,isFetching:!1,status:`pending`}}function Us(e){return Hs(e,bs)}function Ws(e){return Hs(e,cs)}function Gs(e){let t=(0,g.useRef)(e),n=(0,g.useRef)(null);return t.current!==e&&(n.current=t.current,t.current=e),n.current}var Ks=e=>[e,`${e}-inf`];function qs(e){let{isSignedOut:t,stableKeys:n,authenticated:r=!0,onCleanup:i}=e,a=(0,g.useRef)(n),[o]=Vs(),s=Gs(!t);(0,g.useEffect)(()=>{r===!0&&s&&t===!0&&(o.removeQueries({predicate:e=>{let[t,n]=e.queryKey;return n===!0&&typeof t==`string`&&(Array.isArray(a.current)?a.current.includes(t):a.current===t)}}),i?.())},[r,t,s,o])}var Js=(e,t)=>{let n=typeof e==`boolean`&&e,r=(0,g.useRef)(n?t.initialPage:e?.initialPage??t.initialPage),i=(0,g.useRef)(n?t.pageSize:e?.pageSize??t.pageSize),a={};for(let r of Object.keys(t))a[r]=n?t[r]:e?.[r]??t[r];return{...a,initialPage:r.current,pageSize:i.current}};function Ys(e,t){return(e-1)*t}function Xs(e,t,n){return Math.ceil((e-t)/n)}function Zs(e,t,n,r){return e-t>n*r}function Qs(e,t,n){return(e-1)*t>n}var $s=e=>{let{fetcher:t,config:n,keys:r}=e,[i,a]=(0,g.useState)(n.initialPage??1),o=(0,g.useRef)(n.initialPage??1),s=(0,g.useRef)(n.pageSize??10),c=n.enabled??!0,l=n.isSignedIn,u=n.infinite??!1,d=n.__experimental_mode===`cache`,f=n.keepPreviousData??!1,[p]=Vs(),m=c&&!!t&&!d&&l!==!1,[h,_]=(0,g.useState)(0),v=(0,g.useCallback)(e=>{_(e)},[]),y=(0,g.useMemo)(()=>{let[e,t,n,a]=r.queryKey;return[e,t,n,{...a,args:{...a.args,initialPage:i,pageSize:s.current}}]},[r.queryKey,i]),b=Ws({queryKey:y,queryFn:({queryKey:e})=>{let{args:n}=e[3];if(t)return t(n)},staleTime:6e4,enabled:m&&!u,placeholderData:Rs(f)}),x=(0,g.useMemo)(()=>{let[e,t,n,i]=r.queryKey;return[e+`-inf`,t,n,i]},[r.queryKey]),S=Us({queryKey:x,initialPageParam:n.initialPage??1,getNextPageParam:(e,t,r)=>{let i=e?.total_count??0;return(t.length+(n.initialPage?n.initialPage-1:0))*(n.pageSize??10)<i?r+1:void 0},queryFn:({pageParam:e,queryKey:n})=>{let{args:r}=n[3];if(t)return t({...r,initialPage:e,pageSize:s.current})},staleTime:6e4,enabled:m&&u});qs({isSignedOut:l===!1,authenticated:r.authenticated,stableKeys:Ks(r.stableKey),onCleanup:()=>{a(o.current),Promise.resolve().then(()=>v(e=>e+1))}});let{data:C,count:w,page:T}=(0,g.useMemo)(()=>{if(u){let e=p.getQueryData(x),t=m?S.data?.pages??e?.pages??[]:e?.pages??[],n=Array.isArray(t)?t.filter(Boolean):[];return{data:n.map(e=>e?.data).flat().filter(Boolean)??[],count:n[n.length-1]?.total_count??0,page:n.length>0?n.length:o.current}}let e=m?b.data??p.getQueryData(y):p.getQueryData(y);return{data:Array.isArray(e?.data)?e.data:[],count:typeof e?.total_count==`number`?e.total_count:0,page:i}},[m,h,u,S.data?.pages,b.data,p,x,y,i]),E=(0,g.useCallback)(e=>{if(u){let t=typeof e==`function`?e(T):e,n=Math.max(0,t),r=p.getQueryData(x);n-(S.data?.pages??r?.pages??[]).length>0&&S.fetchNextPage({cancelRefetch:!1});return}return a(e)},[S,T,u,p,x]),D=u?S.isLoading:b.isLoading,O=u?S.isFetching:b.isFetching,k=(u?S.error:b.error)??null,A=!!k,j=(0,g.useCallback)(()=>{if(u){S.fetchNextPage({cancelRefetch:!1});return}a(e=>Math.max(0,e+1))},[S,u]),ee=(0,g.useCallback)(()=>{u||a(e=>Math.max(0,e-1))},[u]),M=Ys(o.current,s.current);return{data:C,count:w,error:k,isLoading:D,isFetching:O,isError:A,page:T,pageCount:Xs(w,M,s.current),fetchPage:E,fetchNext:j,fetchPrevious:ee,hasNextPage:u?!!S.hasNextPage:Zs(w,M,T,s.current),hasPreviousPage:u?!!S.hasPreviousPage:Qs(T,s.current,M),revalidate:async()=>{await p.invalidateQueries({queryKey:r.invalidationKey});let[e,...t]=r.invalidationKey;return p.invalidateQueries({queryKey:[e+`-inf`,...t]})},setData:e=>u?(p.setQueryData(x,(t={})=>{let n=Array.isArray(t?.pages)?t.pages:[],r=typeof e==`function`?e(n):e;return{...t,pages:r}}),v(e=>e+1),Promise.resolve()):(p.setQueryData(y,(t={data:[],total_count:0})=>typeof e==`function`?e(t):e),v(e=>e+1),Promise.resolve())}};function ec(){let e=Ds(),t=js(),n=(0,g.useCallback)(()=>t?.user,[t?.user]);return(0,g.useSyncExternalStore)((0,g.useCallback)(t=>e.addListener(t,{skipInitialEmit:!0}),[e]),(0,g.useCallback)(()=>!e.loaded||!e.__internal_lastEmittedResources?n():e.__internal_lastEmittedResources.user,[e,n]),n)}function tc(){let e=Ds(),t=js(),n=(0,g.useCallback)(()=>t?.organization,[t?.organization]);return(0,g.useSyncExternalStore)((0,g.useCallback)(t=>e.addListener(t,{skipInitialEmit:!0}),[e]),(0,g.useCallback)(()=>!e.loaded||!e.__internal_lastEmittedResources?n():e.__internal_lastEmittedResources.organization,[e,n]),n)}typeof window<`u`?g.useLayoutEffect:g.useEffect;var nc=`useUser`;function rc(){Fs(nc);let e=ec();return Ds().telemetry?.record(ko(nc)),e===void 0?{isLoaded:!1,isSignedIn:void 0,user:void 0}:e===null?{isLoaded:!0,isSignedIn:!1,user:null}:{isLoaded:!0,isSignedIn:!0,user:e}}var ic=Cs;function ac(e){let t=Ds(),n=e?.enabled??!0,r=t.__internal_environment,i=ec(),a=tc(),o=r?.commerceSettings.billing.user.enabled,s=r?.commerceSettings.billing.organization.enabled,c=e?.for===`organization`?s:e?.for===`user`?o:o||s,l=e?.for===`organization`,u=e?.authenticated??!0?(l?!!a?.id:!0)&&!!i?.id:!0;return c&&n&&t.loaded&&u}function oc({hookName:e,resourceType:t,useFetcher:n,options:r}){return function(i){let{for:a,enabled:o,...s}=i||{},c=a||`user`;Fs(e);let l=n(c),u=Js(s,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1,__experimental_mode:void 0}),d=Ds(),f=ec(),p=tc();d.telemetry?.record(ko(e));let m=c===`organization`,h=ac({for:c,enabled:o,authenticated:!r?.unauthenticated}),g=s===void 0?void 0:{initialPage:u.initialPage,pageSize:u.pageSize,...r?.unauthenticated?{}:m?{orgId:p?.id}:{}},_=!!g&&d.loaded&&!!h;return $s({fetcher:l,config:{keepPreviousData:u.keepPreviousData,infinite:u.infinite,enabled:_,...r?.unauthenticated?{}:{isSignedIn:f!==null},__experimental_mode:u.__experimental_mode,initialPage:u.initialPage,pageSize:u.pageSize},keys:Ls({stablePrefix:t,authenticated:!r?.unauthenticated,tracked:r?.unauthenticated?{for:c}:{userId:f?.id,...m?{orgId:p?.id}:{}},untracked:{args:g}})})}}oc({hookName:`useStatements`,resourceType:Is.STATEMENTS_KEY,useFetcher:()=>{let e=Ds();if(e.loaded)return e.billing.getStatements}}),oc({hookName:`usePaymentAttempts`,resourceType:Is.PAYMENT_ATTEMPTS_KEY,useFetcher:()=>{let e=Ds();if(e.loaded)return e.billing.getPaymentAttempts}}),oc({hookName:`usePaymentMethods`,resourceType:Is.PAYMENT_METHODS_KEY,useFetcher:e=>{let t=tc(),n=ec();return e===`organization`?t?.getPaymentMethods:n?.getPaymentMethods}}),oc({hookName:`usePlans`,resourceType:Is.PLANS_KEY,useFetcher:e=>{let t=Ds();if(t.loaded)return n=>t.billing.getPlans({...n,for:e})},options:{unauthenticated:!0}});function sc(e){e||jo()}function cc(e){let t=e.clerk;if(sc(t),e.initialState instanceof Promise&&!(`use`in g.default&&typeof g.use==`function`))throw Error(`initialState cannot be a promise if React version is less than 19`);let n=g.useMemo(()=>({value:t}),[e.clerkStatus]);return g.createElement(As,{initialState:e.initialState},g.createElement(Es.Provider,{value:n},g.createElement(Ps,{value:void 0},e.children)))}var lc=e=>{let t=(0,g.useRef)(e);return(0,g.useEffect)(()=>{t.current=e},[e]),t.current},uc=(e,t,n)=>{let r=!!n,i=(0,g.useRef)(n);(0,g.useEffect)(()=>{i.current=n},[n]),(0,g.useEffect)(()=>{if(!r||!e)return()=>{};let n=(...e)=>{i.current&&i.current(...e)};return e.on(t,n),()=>{e.off(t,n)}},[r,t,e,i])},dc=g.createContext(null);dc.displayName=`ElementsContext`;var fc=(e,t)=>{if(!e)throw Error(`Could not find Elements context; You need to wrap the part of your app that ${t} in an <Elements> provider.`);return e},pc=e=>typeof e==`object`&&!!e,mc=(e,t,n)=>pc(e)?Object.keys(e).reduce((r,i)=>{let a=!pc(t)||!gc(e[i],t[i]);return n.includes(i)?(a&&console.warn(`Unsupported prop change: options.${i} is not a mutable property.`),r):a?{...r||{},[i]:e[i]}:r},null):null,hc=`[object Object]`,gc=(e,t)=>{if(!pc(e)||!pc(t))return e===t;let n=Array.isArray(e);if(n!==Array.isArray(t))return!1;let r=Object.prototype.toString.call(e)===hc;if(r!==(Object.prototype.toString.call(t)===hc))return!1;if(!r&&!n)return e===t;let i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;let o={};for(let e=0;e<i.length;e+=1)o[i[e]]=!0;for(let e=0;e<a.length;e+=1)o[a[e]]=!0;let s=Object.keys(o);if(s.length!==i.length)return!1;let c=e,l=t;return s.every(e=>gc(c[e],l[e]))},_c=e=>fc(g.useContext(dc),e),vc=e=>e.charAt(0).toUpperCase()+e.slice(1);((e,t)=>{let n=`${vc(e)}Element`,r=t?e=>{_c(`mounts <${n}>`);let{id:t,className:r}=e;return g.createElement(`div`,{id:t,className:r})}:({id:t,className:r,fallback:i,options:a={},onBlur:o,onFocus:s,onReady:c,onChange:l,onEscape:u,onClick:d,onLoadError:f,onLoaderStart:p,onNetworksChange:m,onConfirm:h,onCancel:_,onShippingAddressChange:v,onShippingRateChange:y})=>{let b=_c(`mounts <${n}>`),x=`elements`in b?b.elements:null,[S,C]=g.useState(null),w=g.useRef(null),T=g.useRef(null),[E,D]=(0,g.useState)(!1);uc(S,`blur`,o),uc(S,`focus`,s),uc(S,`escape`,u),uc(S,`click`,d),uc(S,`loaderror`,f),uc(S,`loaderstart`,p),uc(S,`networkschange`,m),uc(S,`confirm`,h),uc(S,`cancel`,_),uc(S,`shippingaddresschange`,v),uc(S,`shippingratechange`,y),uc(S,`change`,l);let O;c&&(O=()=>{D(!0),c(S)}),uc(S,`ready`,O),g.useLayoutEffect(()=>{if(w.current===null&&T.current!==null&&x){let t=null;x&&(t=x.create(e,a)),w.current=t,C(t),t&&t.mount(T.current)}},[x,a]);let k=lc(a);return g.useEffect(()=>{if(!w.current)return;let e=mc(a,k,[`paymentRequest`]);e&&`update`in w.current&&w.current.update(e)},[a,k]),g.useLayoutEffect(()=>()=>{if(w.current&&typeof w.current.destroy==`function`)try{w.current.destroy(),w.current=null}catch{}},[]),g.createElement(g.Fragment,null,!E&&i,g.createElement(`div`,{id:t,style:{height:E?`unset`:`0px`,visibility:E?`visible`:`hidden`},className:r,ref:T}))};return r.displayName=n,r.__elementType=e,r})(`payment`,typeof window>`u`);var[yc,bc]=Ts(`PaymentElementContext`),[xc,Sc]=Ts(`StripeUtilsContext`),[Cc,,wc]=Ts(`PortalProvider`),Tc=({children:e,getContainer:t})=>{let n=g.useMemo(()=>({value:{getContainer:t}}),[t]);return g.createElement(Cc.Provider,{value:n},e)};Tc.displayName=`UNSAFE_PortalProvider`;var Ec=()=>{let e=wc();return e&&`getContainer`in e&&e.getContainer?e.getContainer:()=>null},Dc=Qa({packageName:`@clerk/react`});function Oc(e){Dc.setMessages(e).setPackageName(e)}var kc=Ds,Ac=e=>{Fs(()=>{Dc.throwMissingClerkProviderError({source:e})})},jc=()=>{try{return!1}catch{}return!1},Mc=()=>{try{return!1}catch{}return!1},Nc=()=>{try{return!0}catch{}return!1};function Pc(e,t,n){if(typeof e==`function`)return e(t);if(e!==void 0)return e;if(n!==void 0)return n}var Fc=e=>{jc()&&console.error(`Clerk: ${e}`)},Ic=e=>!!e?.cloudflare?.env,Lc=e=>!!e?.env,Rc=(e,t)=>{if(typeof process<`u`&&typeof{}[e]==`string`)return{}[e];if(typeof{BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_CLERK_PUBLISHABLE_KEY:`pk_live_Y2xlcmsuY2F1dGlvbmxhYnMuY29tJA`,VITE_SANITY_DATASET:`production`,VITE_SANITY_PROJECT_ID:`f1tnubeb`}[e]==`string`)return{BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_CLERK_PUBLISHABLE_KEY:`pk_live_Y2xlcmsuY2F1dGlvbmxhYnMuY29tJA`,VITE_SANITY_DATASET:`production`,VITE_SANITY_PROJECT_ID:`f1tnubeb`}[e];if(Ic(t))return t.cloudflare.env[e]||``;if(Lc(t))return t.env[e]||``;if(t&&typeof t[e]==`string`)return t[e];try{return globalThis[e]}catch{}return``},zc=(e,...t)=>{let n={...e};for(let e of t)delete n[e];return n};function Bc(){return typeof window<`u`}new RegExp(`bot.spider.crawl.APIs-Google.AdsBot.Googlebot.mediapartners.Google Favicon.FeedFetcher.Google-Read-Aloud.DuplexWeb-Google.googleweblight.bing.yandex.baidu.duckduck.yahoo.ecosia.ia_archiver.facebook.instagram.pinterest.reddit.slack.twitter.whatsapp.youtube.semrush`.split(`.`).join(`|`),`i`);var Vc=`You've added multiple <ClerkProvider> components in your React component tree. Wrap your components in a single <ClerkProvider>.`,Hc=e=>`You've passed multiple children components to <${e}/>. You can only pass a single child component or text.`,Uc=`Invalid state. Feel free to submit a bug or reach out to support here: https://clerk.com/support`,Wc=`Unsupported usage of isSatellite, domain or proxyUrl. The usage of isSatellite, domain or proxyUrl as function is not supported in non-browser environments.`,Gc="<UserProfile.Page /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",Kc="<UserProfile.Link /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",qc="<OrganizationProfile.Page /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",Jc="<OrganizationProfile.Link /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",Yc=e=>`<${e} /> can only accept <${e}.Page /> and <${e}.Link /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.`,Xc=e=>`Missing props. <${e}.Page /> component requires the following props: url, label, labelIcon, alongside with children to be rendered inside the page.`,Zc=e=>`Missing props. <${e}.Link /> component requires the following props: url, label and labelIcon.`,Qc=`<UserButton /> can only accept <UserButton.UserProfilePage />, <UserButton.UserProfileLink /> and <UserButton.MenuItems /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.`,$c=`<UserButton.MenuItems /> component can only accept <UserButton.Action /> and <UserButton.Link /> as its children. Any other provided component will be ignored. Additionally, please ensure that the component is rendered in a client component.`,el="<UserButton.MenuItems /> component needs to be a direct child of `<UserButton />`.",tl="<UserButton.Action /> component needs to be a direct child of `<UserButton.MenuItems />`.",nl="<UserButton.Link /> component needs to be a direct child of `<UserButton.MenuItems />`.",rl=`Missing props. <UserButton.Link /> component requires the following props: href, label and labelIcon.`,il=`Missing props. <UserButton.Action /> component requires the following props: label.`,al=e=>t=>{try{return g.Children.only(e)}catch{return Dc.throw(Hc(t))}},ol=(e,t)=>(e||=t,typeof e==`string`&&(e=g.createElement(`button`,null,e)),e),sl=e=>(...t)=>{if(e&&typeof e==`function`)return e(...t)},cl=e=>Rc(`VITE_${e}`)||Rc(e),ll=(e,t)=>e===void 0?cl(t)||void 0:e,ul=e=>{let t=ll(e.publishableKey,`CLERK_PUBLISHABLE_KEY`);return{...e,...t!==void 0&&{publishableKey:t}}};function dl(e){return typeof e==`function`}var fl=new Map;function pl(e,t,n=1){g.useEffect(()=>{let r=fl.get(e)||0;return r==n?Dc.throw(t):(fl.set(e,r+1),()=>{fl.set(e,(fl.get(e)||1)-1)})},[])}function ml(e,t,n){let r=e.displayName||e.name||t||`Component`,i=r=>(pl(t,n),g.createElement(e,{...r}));return i.displayName=`withMaxAllowedInstancesGuard(${r})`,i}var hl=e=>{let[t,n]=(0,g.useState)(new Map);return e.map(e=>({id:e.id,mount:t=>n(n=>new Map(n).set(String(e.id),t)),unmount:()=>n(t=>{let n=new Map(t);return n.set(String(e.id),null),n}),portal:()=>{let n=t.get(String(e.id));return n?(0,Fe.createPortal)(e.component,n):null}}))},gl=(e,t)=>!!e&&g.isValidElement(e)&&e?.type===t,_l=(e,t)=>bl({children:e,reorderItemsLabels:[`account`,`security`,`billing`,`apiKeys`],LinkComponent:Rl,PageComponent:Ll,MenuItemsComponent:Hl,componentName:`UserProfile`},t),vl=(e,t)=>bl({children:e,reorderItemsLabels:[`general`,`members`,`billing`,`apiKeys`],LinkComponent:Wl,PageComponent:G,componentName:`OrganizationProfile`},t),yl=e=>{let t=[],n=[Wl,G,Hl,Ll,Rl];return g.Children.forEach(e,e=>{n.some(t=>gl(e,t))||t.push(e)}),t},bl=(e,t)=>{let{children:n,LinkComponent:r,PageComponent:i,MenuItemsComponent:a,reorderItemsLabels:o,componentName:s}=e,{allowForAnyChildren:c=!1}=t||{},l=[];g.Children.forEach(n,e=>{if(!gl(e,i)&&!gl(e,r)&&!gl(e,a)){e&&!c&&Fc(Yc(s));return}let{props:t}=e,{children:n,label:u,url:d,labelIcon:f}=t;if(gl(e,i))if(xl(t,o))l.push({label:u});else if(Sl(t))l.push({label:u,labelIcon:f,children:n,url:d});else{Fc(Xc(s));return}if(gl(e,r))if(Cl(t))l.push({label:u,labelIcon:f,url:d});else{Fc(Zc(s));return}});let u=[],d=[],f=[];l.forEach((e,t)=>{if(Sl(e)){u.push({component:e.children,id:t}),d.push({component:e.labelIcon,id:t});return}Cl(e)&&f.push({component:e.labelIcon,id:t})});let p=hl(u),m=hl(d),h=hl(f),_=[],v=[];return l.forEach((e,t)=>{if(xl(e,o)){_.push({label:e.label});return}if(Sl(e)){let{portal:n,mount:r,unmount:i}=p.find(e=>e.id===t),{portal:a,mount:o,unmount:s}=m.find(e=>e.id===t);_.push({label:e.label,url:e.url,mount:r,unmount:i,mountIcon:o,unmountIcon:s}),v.push(n),v.push(a);return}if(Cl(e)){let{portal:n,mount:r,unmount:i}=h.find(e=>e.id===t);_.push({label:e.label,url:e.url,mountIcon:r,unmountIcon:i}),v.push(n);return}}),{customPages:_,customPagesPortals:v}},xl=(e,t)=>{let{children:n,label:r,url:i,labelIcon:a}=e;return!n&&!i&&!a&&t.some(e=>e===r)},Sl=e=>{let{children:t,label:n,url:r,labelIcon:i}=e;return!!t&&!!r&&!!i&&!!n},Cl=e=>{let{children:t,label:n,url:r,labelIcon:i}=e;return!t&&!!r&&!!i&&!!n},wl=(e,t)=>Tl({children:e,reorderItemsLabels:[`manageAccount`,`signOut`],MenuItemsComponent:Hl,MenuActionComponent:H,MenuLinkComponent:Ul,UserProfileLinkComponent:Rl,UserProfilePageComponent:Ll,allowForAnyChildren:t?.allowForAnyChildren??!1}),Tl=({children:e,MenuItemsComponent:t,MenuActionComponent:n,MenuLinkComponent:r,UserProfileLinkComponent:i,UserProfilePageComponent:a,reorderItemsLabels:o,allowForAnyChildren:s=!1})=>{let c=[],l=[],u=[];g.Children.forEach(e,e=>{if(!gl(e,t)&&!gl(e,i)&&!gl(e,a)){e&&!s&&Fc(Qc);return}if(gl(e,i)||gl(e,a))return;let{props:l}=e;g.Children.forEach(l.children,e=>{if(!gl(e,n)&&!gl(e,r)){e&&Fc($c);return}let{props:t}=e,{label:i,labelIcon:a,href:s,onClick:l,open:u}=t;if(gl(e,n))if(El(t,o))c.push({label:i});else if(Dl(t)){let e={label:i,labelIcon:a};if(l!==void 0)c.push({...e,onClick:l});else if(u!==void 0)c.push({...e,open:u.startsWith(`/`)?u:`/${u}`});else{Fc(`Custom menu item must have either onClick or open property`);return}}else{Fc(il);return}if(gl(e,r))if(Ol(t))c.push({label:i,labelIcon:a,href:s});else{Fc(rl);return}})});let d=[],f=[];c.forEach((e,t)=>{Dl(e)&&d.push({component:e.labelIcon,id:t}),Ol(e)&&f.push({component:e.labelIcon,id:t})});let p=hl(d),m=hl(f);return c.forEach((e,t)=>{if(El(e,o)&&l.push({label:e.label}),Dl(e)){let{portal:n,mount:r,unmount:i}=p.find(e=>e.id===t),a={label:e.label,mountIcon:r,unmountIcon:i};`onClick`in e?a.onClick=e.onClick:`open`in e&&(a.open=e.open),l.push(a),u.push(n)}if(Ol(e)){let{portal:n,mount:r,unmount:i}=m.find(e=>e.id===t);l.push({label:e.label,href:e.href,mountIcon:r,unmountIcon:i}),u.push(n)}}),{customMenuItems:l,customMenuItemsPortals:u}},El=(e,t)=>{let{children:n,label:r,onClick:i,labelIcon:a}=e;return!n&&!i&&!a&&t.some(e=>e===r)},Dl=e=>{let{label:t,labelIcon:n,onClick:r,open:i}=e;return!!n&&!!t&&(typeof r==`function`||typeof i==`string`)},Ol=e=>{let{label:t,href:n,labelIcon:r}=e;return!!n&&!!r&&!!t},kl=(e=>{let t=e?.isReady;return n=>new Promise((r,i)=>{let{root:a=document==null?void 0:document.body,selector:o,timeout:s=0}=n;if(!a){i(Error(`No root element provided`));return}let c=a;if(o&&(c=a?.querySelector(o)),t(c,o)){r();return}let l=new MutationObserver(n=>{for(let i of n)if(!c&&o&&(c=a?.querySelector(o)),(e.childList&&i.type===`childList`||e.attributes&&i.type===`attributes`)&&t(c,o)){l.disconnect(),r();return}});l.observe(a,e),s>0&&setTimeout(()=>{l.disconnect(),i(Error(`Timeout waiting for ${o}`))},s)})})({childList:!0,subtree:!0,isReady:(e,t)=>!!e?.childElementCount&&(e?.matches)?.call(e,t)&&e.childElementCount>0});function Al(e,t){let n=(0,g.useRef)(),[r,i]=(0,g.useState)(`rendering`);return(0,g.useEffect)(()=>{if(!e)throw Error(`Clerk: no component name provided, unable to detect mount.`);if(typeof window<`u`&&!n.current){let r=`[data-clerk-component="${e}"]`,a=t?.selector;n.current=kl({selector:a?r+a:r}).then(()=>{i(`rendered`)}).catch(()=>{i(`error`)})}},[e,t?.selector]),r}var jl=e=>`mount`in e,Ml=e=>`open`in e,Nl=e=>e?.map(({mountIcon:e,unmountIcon:t,...n})=>n),Pl=class extends g.PureComponent{constructor(){super(...arguments),this.rootRef=g.createRef()}componentDidUpdate(e){if(!jl(e)||!jl(this.props))return;let t=zc(e.props,`customPages`,`customMenuItems`,`children`),n=zc(this.props.props,`customPages`,`customMenuItems`,`children`),r=t.customPages?.length!==n.customPages?.length,i=t.customMenuItems?.length!==n.customMenuItems?.length,a=Nl(e.props.customMenuItems),o=Nl(this.props.props.customMenuItems);(!ic(t,n)||!ic(a,o)||r||i)&&this.rootRef.current&&this.props.updateProps({node:this.rootRef.current,props:this.props.props})}componentDidMount(){this.rootRef.current&&(jl(this.props)&&this.props.mount(this.rootRef.current,this.props.props),Ml(this.props)&&this.props.open(this.props.props))}componentWillUnmount(){this.rootRef.current&&(jl(this.props)&&this.props.unmount(this.rootRef.current),Ml(this.props)&&this.props.close())}render(){let{hideRootHtmlElement:e=!1}=this.props,t={ref:this.rootRef,...this.props.rootProps,...this.props.component&&{"data-clerk-component":this.props.component}};return g.createElement(g.Fragment,null,!e&&g.createElement(`div`,{...t}),this.props.children)}},Fl=(e,t)=>{let n=(typeof t==`string`?t:t?.component)||e.displayName||e.name||`Component`;e.displayName=n;let r=typeof t==`string`?void 0:t,i=t=>{Ac(n||`withClerk`);let i=kc(),a=Ec();return!i.loaded&&!r?.renderWhileLoading?null:g.createElement(e,{getContainer:a,...t,component:n,clerk:i})};return i.displayName=`withClerk(${n})`,i},Il=e=>g.createElement(g.Fragment,null,(e?.customPagesPortals)?.map((e,t)=>(0,g.createElement)(e,{key:t})),(e?.customMenuItemsPortals)?.map((e,t)=>(0,g.createElement)(e,{key:t})));Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return g.createElement(g.Fragment,null,i&&n,e.loaded&&g.createElement(Pl,{component:t,mount:e.mountSignIn,unmount:e.unmountSignIn,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`SignIn`,renderWhileLoading:!0}),Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return g.createElement(g.Fragment,null,i&&n,e.loaded&&g.createElement(Pl,{component:t,mount:e.mountSignUp,unmount:e.unmountSignUp,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`SignUp`,renderWhileLoading:!0});function Ll({children:e}){return Fc(Gc),g.createElement(g.Fragment,null,e)}function Rl({children:e}){return Fc(Kc),g.createElement(g.Fragment,null,e)}var zl=Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}},{customPages:o,customPagesPortals:s}=_l(r.children);return g.createElement(g.Fragment,null,i&&n,g.createElement(Pl,{component:t,mount:e.mountUserProfile,unmount:e.unmountUserProfile,updateProps:e.__internal_updateProps,props:{...r,customPages:o},rootProps:a},g.createElement(Il,{customPagesPortals:s})))},{component:`UserProfile`,renderWhileLoading:!0});Object.assign(zl,{Page:Ll,Link:Rl});var Bl=(0,g.createContext)({mount:()=>{},unmount:()=>{},updateProps:()=>{}}),Vl=Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}},{customPages:o,customPagesPortals:s}=_l(r.children,{allowForAnyChildren:!!r.__experimental_asProvider}),c={...r.userProfileProps,customPages:o},{customMenuItems:l,customMenuItemsPortals:u}=wl(r.children,{allowForAnyChildren:!!r.__experimental_asProvider}),d=yl(r.children),f={mount:e.mountUserButton,unmount:e.unmountUserButton,updateProps:e.__internal_updateProps,props:{...r,userProfileProps:c,customMenuItems:l}},p={customPagesPortals:s,customMenuItemsPortals:u};return g.createElement(Bl.Provider,{value:f},i&&n,e.loaded&&g.createElement(Pl,{component:t,...f,hideRootHtmlElement:!!r.__experimental_asProvider,rootProps:a},r.__experimental_asProvider?d:null,g.createElement(Il,{...p})))},{component:`UserButton`,renderWhileLoading:!0});function Hl({children:e}){return Fc(el),g.createElement(g.Fragment,null,e)}function H({children:e}){return Fc(tl),g.createElement(g.Fragment,null,e)}function Ul({children:e}){return Fc(nl),g.createElement(g.Fragment,null,e)}function U(e){let t=(0,g.useContext)(Bl),n={...t,props:{...t.props,...e}};return g.createElement(Pl,{...n})}var W=Object.assign(Vl,{UserProfilePage:Ll,UserProfileLink:Rl,MenuItems:Hl,Action:H,Link:Ul,__experimental_Outlet:U});function G({children:e}){return Fc(qc),g.createElement(g.Fragment,null,e)}function Wl({children:e}){return Fc(Jc),g.createElement(g.Fragment,null,e)}var Gl=Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}},{customPages:o,customPagesPortals:s}=vl(r.children);return g.createElement(g.Fragment,null,i&&n,e.loaded&&g.createElement(Pl,{component:t,mount:e.mountOrganizationProfile,unmount:e.unmountOrganizationProfile,updateProps:e.__internal_updateProps,props:{...r,customPages:o},rootProps:a},g.createElement(Il,{customPagesPortals:s})))},{component:`OrganizationProfile`,renderWhileLoading:!0});Object.assign(Gl,{Page:G,Link:Wl}),Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return g.createElement(g.Fragment,null,i&&n,e.loaded&&g.createElement(Pl,{component:t,mount:e.mountCreateOrganization,unmount:e.unmountCreateOrganization,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`CreateOrganization`,renderWhileLoading:!0});var Kl=(0,g.createContext)({mount:()=>{},unmount:()=>{},updateProps:()=>{}}),ql=Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}},{customPages:o,customPagesPortals:s}=vl(r.children,{allowForAnyChildren:!!r.__experimental_asProvider}),c={...r.organizationProfileProps,customPages:o},l=yl(r.children),u={mount:e.mountOrganizationSwitcher,unmount:e.unmountOrganizationSwitcher,updateProps:e.__internal_updateProps,props:{...r,organizationProfileProps:c},rootProps:a,component:t};return e.__experimental_prefetchOrganizationSwitcher(),g.createElement(Kl.Provider,{value:u},g.createElement(g.Fragment,null,i&&n,e.loaded&&g.createElement(Pl,{...u,hideRootHtmlElement:!!r.__experimental_asProvider},r.__experimental_asProvider?l:null,g.createElement(Il,{customPagesPortals:s}))))},{component:`OrganizationSwitcher`,renderWhileLoading:!0});function Jl(e){let t=(0,g.useContext)(Kl),n={...t,props:{...t.props,...e}};return g.createElement(Pl,{...n})}Object.assign(ql,{OrganizationProfilePage:G,OrganizationProfileLink:Wl,__experimental_Outlet:Jl}),Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return g.createElement(g.Fragment,null,i&&n,e.loaded&&g.createElement(Pl,{component:t,mount:e.mountOrganizationList,unmount:e.unmountOrganizationList,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`OrganizationList`,renderWhileLoading:!0}),Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return g.createElement(g.Fragment,null,i&&n,e.loaded&&g.createElement(Pl,{component:t,open:e.openGoogleOneTap,close:e.closeGoogleOneTap,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`GoogleOneTap`,renderWhileLoading:!0}),Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return g.createElement(g.Fragment,null,i&&n,e.loaded&&g.createElement(Pl,{component:t,mount:e.mountWaitlist,unmount:e.unmountWaitlist,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`Waitlist`,renderWhileLoading:!0}),Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t,{selector:`[data-component-status="ready"]`})===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return g.createElement(g.Fragment,null,i&&n,e.loaded&&g.createElement(Pl,{component:t,mount:e.mountPricingTable,unmount:e.unmountPricingTable,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`PricingTable`,renderWhileLoading:!0}),Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return g.createElement(g.Fragment,null,i&&n,e.loaded&&g.createElement(Pl,{component:t,mount:e.mountAPIKeys,unmount:e.unmountAPIKeys,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`ApiKeys`,renderWhileLoading:!0}),Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return g.createElement(g.Fragment,null,i&&n,e.loaded&&g.createElement(Pl,{component:t,mount:e.__internal_mountOAuthConsent,unmount:e.__internal_unmountOAuthConsent,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`OAuthConsent`,renderWhileLoading:!0}),Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return g.createElement(g.Fragment,null,i&&n,e.loaded&&g.createElement(Pl,{component:t,mount:e.mountUserAvatar,unmount:e.unmountUserAvatar,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`UserAvatar`,renderWhileLoading:!0}),Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return g.createElement(g.Fragment,null,i&&n,e.loaded&&g.createElement(Pl,{component:t,mount:e.mountTaskChooseOrganization,unmount:e.unmountTaskChooseOrganization,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`TaskChooseOrganization`,renderWhileLoading:!0}),Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return g.createElement(g.Fragment,null,i&&n,e.loaded&&g.createElement(Pl,{component:t,mount:e.mountTaskResetPassword,unmount:e.unmountTaskResetPassword,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`TaskResetPassword`,renderWhileLoading:!0}),Fl(({clerk:e,component:t,fallback:n,...r})=>{let i=Al(t)===`rendering`||!e.loaded,a={...i&&n&&{style:{display:`none`}}};return g.createElement(g.Fragment,null,i&&n,e.loaded&&g.createElement(Pl,{component:t,mount:e.mountTaskSetupMFA,unmount:e.unmountTaskSetupMFA,updateProps:e.__internal_updateProps,props:r,rootProps:a}))},{component:`TaskSetupMFA`,renderWhileLoading:!0});var Yl={actor:void 0,factorVerificationAge:null,orgId:void 0,orgPermissions:void 0,orgRole:void 0,orgSlug:void 0,sessionClaims:void 0,sessionId:void 0,sessionStatus:void 0,userId:void 0};function Xl(){let e=Ds(),t=js(),n=(0,g.useCallback)(()=>t,[t]),r=(0,g.useSyncExternalStore)((0,g.useCallback)(t=>e.addListener(t,{skipInitialEmit:!0}),[e]),(0,g.useCallback)(()=>!e.loaded||!e.__internal_lastEmittedResources?n():e.__internal_lastEmittedResources,[e,n]),n);return(0,g.useMemo)(()=>r?Zl(Ql(r)?wo(!1,{},r):wo(!0,r,void 0)):Yl,[r])}function Zl(e){return{sessionId:e.sessionId,sessionStatus:e.sessionStatus,sessionClaims:e.sessionClaims,userId:e.userId,actor:e.actor,orgId:e.orgId,orgRole:e.orgRole,orgSlug:e.orgSlug,orgPermissions:e.orgPermissions,factorVerificationAge:e.factorVerificationAge}}function Ql(e){return!(`client`in e)}var $l=e=>new Promise(t=>{let n=r=>{[`ready`,`degraded`].includes(r)&&(t(),e.off(`status`,n))};e.on(`status`,n,{notify:!0})}),eu=e=>async t=>{if(!Bc())throw new Xa(`useAuth().getToken() can only be used in browser environments. To access auth data server-side, see the Auth object reference doc: https://clerk.com/docs/reference/backend/types/auth-object`,{code:`clerk_runtime_not_browser`});return await $l(e),e.session?e.session.getToken(t):null},tu=e=>async(...t)=>(await $l(e),e.signOut(...t)),nu=(e={})=>{var t;Ac(`useAuth`);let{treatPendingAsSignedOut:n}=e??{},r=Xl(),i=kc(),a=(0,g.useCallback)(eu(i),[i]),o=(0,g.useCallback)(tu(i),[i]);return(t=i.telemetry)==null||t.record(ko(`useAuth`,{treatPendingAsSignedOut:n})),ru({...r,getToken:a,signOut:o},{treatPendingAsSignedOut:n})};function ru(e,{treatPendingAsSignedOut:t=!0}={}){let{userId:n,orgId:r,orgRole:i,has:a,signOut:o,getToken:s,orgPermissions:c,factorVerificationAge:l,sessionClaims:u}=e??{},d=(0,g.useCallback)(e=>a?a(e):So({userId:n,orgId:r,orgRole:i,orgPermissions:c,factorVerificationAge:l,features:u?.fea||``,plans:u?.pla||``})(e),[a,n,r,i,c,l,u]);return Co({authObject:{...e,getToken:s,signOut:o,has:d},options:{treatPendingAsSignedOut:t}})||Dc.throw(Uc)}var iu=e=>{throw TypeError(e)},au=(e,t,n)=>t.has(e)||iu(`Cannot `+n),K=(e,t,n)=>(au(e,t,`read from private field`),n?n.call(e):t.get(e)),ou=(e,t,n)=>t.has(e)?iu(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),su=(e,t,n,r)=>(au(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),cu=(e,t,n)=>(au(e,t,`access private method`),n),lu=[[18,0,-1,0],[19,0,0,3],[19,1,1,4],[19,2,2,3],[19,3,3,0]],uu=new Set,du=(e,t,n)=>{let r=Mc()||Nc(),i=n??e;uu.has(i)||r||(uu.add(i),console.warn(`Clerk - DEPRECATION WARNING: "${e}" is deprecated and will be removed in the next major release.\n${t}`))};function fu(e){let t=e.match(/^(\d+)\.(\d+)\.(\d+)/);if(!t)return null;let[,n,r,i]=t;return{major:parseInt(n,10),minor:parseInt(r,10),patch:parseInt(i,10)}}function pu(e,t){let{major:n,minor:r,patch:i}=e;return t.some(([e,t,a,o])=>n===e?a===-1?r>t||r===t&&i>=o:r===a&&i>=o:!1)}function mu(e,t){let n=fu(e);return n?pu(n,t):!1}var hu=(e,t,n,r,i)=>{let{notify:a}=i||{},o=e.get(n);o||(o=[],e.set(n,o)),o.push(r),a&&t.has(n)&&r(t.get(n))},gu=(e,t,n)=>(e.get(t)||[]).map(e=>e(n)),_u=(e,t,n)=>{let r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},vu=()=>{let e=new Map,t=new Map,n=new Map;return{on:(...n)=>hu(e,t,...n),prioritizedOn:(...e)=>hu(n,t,...e),emit:(r,i)=>{t.set(r,i),gu(n,r,i),gu(e,r,i)},off:(...t)=>_u(e,...t),prioritizedOff:(...e)=>_u(n,...e),internal:{retrieveListeners:t=>e.get(t)||[]}}},yu={Status:`status`},bu=()=>vu(),xu={initialDelay:125,maxDelayBetweenRetries:0,factor:2,shouldRetry:(e,t)=>t<5,retryImmediately:!1,jitter:!0},Su=100,Cu=async e=>new Promise(t=>setTimeout(t,e)),wu=(e,t)=>t?e*(1+Math.random()):e,Tu=e=>{let t=0,n=()=>{let n=e.initialDelay*e.factor**+t;return n=wu(n,e.jitter),Math.min(e.maxDelayBetweenRetries||n,n)};return async()=>{await Cu(n()),t++}},Eu=async(e,t={})=>{let n=0,{shouldRetry:r,initialDelay:i,maxDelayBetweenRetries:a,factor:o,retryImmediately:s,jitter:c,onBeforeRetry:l}={...xu,...t},u=Tu({initialDelay:i,maxDelayBetweenRetries:a,factor:o,jitter:c});for(;;)try{return await e()}catch(e){if(n++,!r(e,n))throw e;l&&await l(n),s&&n===1?await Cu(wu(Su,c)):await u()}},Du=`loadScript cannot be called when document does not exist`,Ou=`loadScript cannot be called without a src`;async function ku(e=``,t){let{async:n,defer:r,beforeLoad:i,crossOrigin:a,nonce:o}=t||{};return Eu(()=>new Promise((t,s)=>{e||s(Error(Ou)),(!document||!document.body)&&s(Error(Du));let c=document.createElement(`script`);a&&c.setAttribute(`crossorigin`,a),c.async=n||!1,c.defer=r||!1,c.addEventListener(`load`,()=>{c.remove(),t(c)}),c.addEventListener(`error`,t=>{c.remove(),s(t.error??Error(`failed to load script: ${e}`))}),c.src=e,c.nonce=o,i?.(c),document.body.appendChild(c)}),{shouldRetry:(e,t)=>t<=5})}function Au(e){return e?ju(e)||Mu(e):!0}function ju(e){return/^http(s)?:\/\//.test(e||``)}function Mu(e){return e.startsWith(`/`)}function Nu(e){return e?Mu(e)?new URL(e,window.location.origin).toString():e:``}function Pu(e){if(!e)return``;let t;if(e.match(/^(clerk\.)+\w*$/))t=/(clerk\.)*(?=clerk\.)/;else if(e.match(/\.clerk.accounts/))return e;else t=/^(clerk\.)*/gi;return`clerk.${e.replace(t,``)}`}var Fu=(e,t=`6.7.3`)=>{if(e)return e;let n=Iu(t);return n?n===`snapshot`?t:n:Lu(t)},Iu=e=>e.trim().replace(/^v/,``).match(/-(.+?)(\.|$)/)?.[1],Lu=e=>e.trim().replace(/^v/,``).split(`.`)[0],{isDevOrStagingUrl:Ru}=oo(),zu=Qa({packageName:`@clerk/shared`});function Bu(e){return typeof window>`u`||!window[e]?!1:!!window[e]}var Vu=()=>Bu(`Clerk`),Hu=()=>Bu(`__internal_ClerkUICtor`);function Uu(e){if(typeof window>`u`||!window.performance)return!1;let t=performance.getEntriesByName(e,`resource`);if(t.length===0)return!1;let n=t[t.length-1];return n.transferSize===0&&n.decodedBodySize===0&&(n.responseEnd===0||n.responseEnd>0&&n.responseStart>0||`responseStatus`in n&&(n.responseStatus>=400||n.responseStatus===0))}var Wu=async e=>{let t=e?.scriptLoadTimeout??15e3,n=e=>new Xa(`Failed to load Clerk JS`+(e?.message?`, ${e.message}`:``),{code:`failed_to_load_clerk_js`,cause:e});if(Vu())return null;if(!e?.publishableKey)return zu.throwMissingPublishableKeyError(),null;let r=Ku(e),i=document.querySelector(`script[data-clerk-js-script]`);if(i)if(Uu(r))i.remove();else try{return await Qu(t,Vu,n(),i),null}catch{i.remove()}let a=Qu(t,Vu,n());return ku(r,{async:!0,crossOrigin:`anonymous`,nonce:e.nonce,beforeLoad:Xu(Ju(e))}).catch(e=>{throw n(e)}),a},Gu=async e=>{let t=e?.scriptLoadTimeout??15e3,n=e=>new Xa(`Failed to load Clerk UI`+(e?.message?`, ${e.message}`:``),{code:`failed_to_load_clerk_ui`,cause:e});if(Hu())return null;if(!e?.publishableKey)return zu.throwMissingPublishableKeyError(),null;let r=qu(e),i=document.querySelector(`script[data-clerk-ui-script]`);if(i)if(Uu(r))i.remove();else try{return await Qu(t,Hu,n(),i),null}catch{i.remove()}let a=Qu(t,Hu,n());return ku(r,{async:!0,crossOrigin:`anonymous`,nonce:e.nonce,beforeLoad:Xu(Yu(e))}).catch(e=>{throw n(e)}),a},Ku=e=>{let{__internal_clerkJSUrl:t,__internal_clerkJSVersion:n,proxyUrl:r,domain:i,publishableKey:a}=e;return t||`https://${Zu({publishableKey:a,proxyUrl:r,domain:i})}/npm/@clerk/clerk-js@${Fu(n)}/dist/clerk.browser.js`},qu=e=>{let{__internal_clerkUIUrl:t,__internal_clerkUIVersion:n,proxyUrl:r,domain:i,publishableKey:a}=e;return t||`https://${Zu({publishableKey:a,proxyUrl:r,domain:i})}/npm/@clerk/ui@${Fu(n,`1.6.2`)}/dist/ui.browser.js`},Ju=e=>{let t={};return e.publishableKey&&(t[`data-clerk-publishable-key`]=e.publishableKey),e.proxyUrl&&(t[`data-clerk-proxy-url`]=e.proxyUrl),e.domain&&(t[`data-clerk-domain`]=e.domain),e.nonce&&(t.nonce=e.nonce),t},Yu=e=>Ju(e),Xu=e=>t=>{for(let n in e)t.setAttribute(n,e[n])},Zu=e=>{let{proxyUrl:t,domain:n,publishableKey:r}=e;return t&&Au(t)?Nu(t).replace(/http(s)?:\/\//,``):n&&!Ru(io(r)?.frontendApi||``)?Pu(n):io(r)?.frontendApi||``};function Qu(e,t,n,r){return new Promise((i,a)=>{let o=!1,s=(e,t)=>{clearTimeout(e),clearInterval(t)};r?.addEventListener(`error`,()=>{s(l,u),a(n)});let c=()=>{o||t()&&(o=!0,s(l,u),i(null))},l=setTimeout(()=>{o||(o=!0,s(l,u),t()?i(null):a(n))},e);c();let u=setInterval(()=>{if(o){clearInterval(u);return}c()},100)})}function $u(e){zu.setPackageName({packageName:e})}var ed=({children:e})=>(Ac(`ClerkLoaded`),kc().loaded?e:null),td=({children:e})=>(Ac(`ClerkLoading`),kc().status===`loading`?e:null),nd=({children:e,fallback:t,treatPendingAsSignedOut:n,when:r})=>{Ac(`Show`);let{has:i,isLoaded:a,userId:o}=nu({treatPendingAsSignedOut:n});if(!a)return null;let s=r,c=e,l=t??null;return s===`signed-out`?o?l:c:o&&(s===`signed-in`||rd(s,i))?c:l};function rd(e,t){return typeof e==`function`?e(t):t(e)}Fl(({clerk:e,...t})=>{let{client:n,session:r}=e,i=(n.signedInSessions?.length??0)>0;return g.useEffect(()=>{r===null&&i?e.redirectToAfterSignOut():e.redirectToSignIn(t)},[]),null},`RedirectToSignIn`),Fl(({clerk:e,...t})=>(g.useEffect(()=>{e.redirectToSignUp(t)},[]),null),`RedirectToSignUp`),Fl(({clerk:e,...t})=>(g.useEffect(()=>{e.redirectToTasks(t)},[]),null),`RedirectToTasks`),Fl(({clerk:e})=>(g.useEffect(()=>{du(`RedirectToUserProfile`,"Use the `redirectToUserProfile()` method instead."),e.redirectToUserProfile()},[]),null),`RedirectToUserProfile`),Fl(({clerk:e})=>(g.useEffect(()=>{du(`RedirectToOrganizationProfile`,"Use the `redirectToOrganizationProfile()` method instead."),e.redirectToOrganizationProfile()},[]),null),`RedirectToOrganizationProfile`),Fl(({clerk:e})=>(g.useEffect(()=>{du(`RedirectToCreateOrganization`,"Use the `redirectToCreateOrganization()` method instead."),e.redirectToCreateOrganization()},[]),null),`RedirectToCreateOrganization`),Fl(({clerk:e,...t})=>(g.useEffect(()=>{e.handleRedirectCallback(t)},[]),null),`AuthenticateWithRedirectCallback`);function id(){try{return mu(`19.2.5`,lu)}catch{return!1}}var ad=id(),od=()=>({fields:{identifier:null,password:null,code:null},raw:null,global:null}),sd=()=>({fields:{firstName:null,lastName:null,emailAddress:null,phoneNumber:null,password:null,username:null,code:null,captcha:null,legalAccepted:null},raw:null,global:null}),cd=()=>({fields:{emailAddress:null},raw:null,global:null}),ld=()=>({pathRoot:``,attempts:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,message:null,status:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient(){return!1},reload(){throw Error(`reload() called before Clerk is loaded`)},__internal_toSnapshot(){return{object:`verification`,id:``,attempts:null,error:{code:``,message:``},expire_at:null,externalVerificationRedirectURL:null,nonce:null,message:null,status:null,strategy:null,verified_at_client:null}}}),ud=()=>({...ld(),supportedStrategies:[],nextAction:``,reload(){throw Error(`reload() called before Clerk is loaded`)},__internal_toSnapshot(){return{...ld().__internal_toSnapshot(),next_action:this.nextAction,supported_strategies:this.supportedStrategies}}}),dd=class{constructor(e){this.isomorphicClerk=e,this.signInSignalProxy=this.buildSignInProxy(),this.signUpSignalProxy=this.buildSignUpProxy(),this.waitlistSignalProxy=this.buildWaitlistProxy()}signInSignal(){return this.signInSignalProxy}signUpSignal(){return this.signUpSignalProxy}waitlistSignal(){return this.waitlistSignalProxy}get __internal_waitlist(){return this.state.__internal_waitlist}checkoutSignal(e){return this.buildCheckoutProxy(e)}buildSignInProxy(){let e=this.gateProperty.bind(this),t=()=>this.client.signIn.__internal_future;return{errors:od(),fetchStatus:`idle`,signIn:{status:`needs_identifier`,availableStrategies:[],get isTransferable(){return e(t,`isTransferable`,!1)},get id(){return e(t,`id`,void 0)},get supportedFirstFactors(){return e(t,`supportedFirstFactors`,[])},get supportedSecondFactors(){return e(t,`supportedSecondFactors`,[])},get secondFactorVerification(){return e(t,`secondFactorVerification`,{status:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,attempts:null,message:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient:()=>!1,__internal_toSnapshot:()=>{throw Error(`__internal_toSnapshot called before Clerk is loaded`)},pathRoot:``,reload:()=>{throw Error(`__internal_toSnapshot called before Clerk is loaded`)}})},get identifier(){return e(t,`identifier`,null)},get createdSessionId(){return e(t,`createdSessionId`,null)},get userData(){return e(t,`userData`,{})},get firstFactorVerification(){return e(t,`firstFactorVerification`,{status:null,error:null,expireAt:null,externalVerificationRedirectURL:null,nonce:null,attempts:null,message:null,strategy:null,verifiedAtClient:null,verifiedFromTheSameClient:()=>!1,__internal_toSnapshot:()=>{throw Error(`__internal_toSnapshot called before Clerk is loaded`)},pathRoot:``,reload:()=>{throw Error(`__internal_toSnapshot called before Clerk is loaded`)}})},get canBeDiscarded(){return e(t,`canBeDiscarded`,!1)},create:this.gateMethod(t,`create`),password:this.gateMethod(t,`password`),sso:this.gateMethod(t,`sso`),finalize:this.gateMethod(t,`finalize`),reset:this.gateMethod(t,`reset`),emailCode:this.wrapMethods(()=>t().emailCode,[`sendCode`,`verifyCode`]),emailLink:this.wrapStruct(()=>t().emailLink,[`sendLink`,`waitForVerification`],[`verification`],{verification:null}),resetPasswordEmailCode:this.wrapMethods(()=>t().resetPasswordEmailCode,[`sendCode`,`verifyCode`,`submitPassword`]),resetPasswordPhoneCode:this.wrapMethods(()=>t().resetPasswordPhoneCode,[`sendCode`,`verifyCode`,`submitPassword`]),phoneCode:this.wrapMethods(()=>t().phoneCode,[`sendCode`,`verifyCode`]),mfa:this.wrapMethods(()=>t().mfa,[`sendPhoneCode`,`verifyPhoneCode`,`sendEmailCode`,`verifyEmailCode`,`verifyTOTP`,`verifyBackupCode`]),ticket:this.gateMethod(t,`ticket`),passkey:this.gateMethod(t,`passkey`),web3:this.gateMethod(t,`web3`)}}}buildSignUpProxy(){let e=this.gateProperty.bind(this),t=this.gateMethod.bind(this),n=()=>this.client.signUp.__internal_future;return{errors:sd(),fetchStatus:`idle`,signUp:{get id(){return e(n,`id`,void 0)},get requiredFields(){return e(n,`requiredFields`,[])},get optionalFields(){return e(n,`optionalFields`,[])},get missingFields(){return e(n,`missingFields`,[])},get username(){return e(n,`username`,null)},get firstName(){return e(n,`firstName`,null)},get lastName(){return e(n,`lastName`,null)},get emailAddress(){return e(n,`emailAddress`,null)},get phoneNumber(){return e(n,`phoneNumber`,null)},get web3Wallet(){return e(n,`web3Wallet`,null)},get hasPassword(){return e(n,`hasPassword`,!1)},get unsafeMetadata(){return e(n,`unsafeMetadata`,{})},get createdSessionId(){return e(n,`createdSessionId`,null)},get createdUserId(){return e(n,`createdUserId`,null)},get abandonAt(){return e(n,`abandonAt`,null)},get legalAcceptedAt(){return e(n,`legalAcceptedAt`,null)},get locale(){return e(n,`locale`,null)},get status(){return e(n,`status`,`missing_requirements`)},get unverifiedFields(){return e(n,`unverifiedFields`,[])},get isTransferable(){return e(n,`isTransferable`,!1)},get canBeDiscarded(){return e(n,`canBeDiscarded`,!1)},create:t(n,`create`),update:t(n,`update`),sso:t(n,`sso`),password:t(n,`password`),ticket:t(n,`ticket`),web3:t(n,`web3`),finalize:t(n,`finalize`),reset:t(n,`reset`),verifications:this.wrapStruct(()=>n().verifications,[`sendEmailCode`,`verifyEmailCode`,`sendEmailLink`,`waitForEmailLinkVerification`,`sendPhoneCode`,`verifyPhoneCode`],[`emailAddress`,`phoneNumber`,`web3Wallet`,`externalAccount`,`emailLinkVerification`],{emailAddress:ud(),phoneNumber:ud(),web3Wallet:ud(),externalAccount:ud(),emailLinkVerification:null})}}}buildWaitlistProxy(){let e=this.gateProperty.bind(this),t=this.gateMethod.bind(this),n=()=>this.state.__internal_waitlist;return{errors:cd(),fetchStatus:`idle`,waitlist:{pathRoot:`/waitlist`,get id(){return e(n,`id`,``)},get createdAt(){return e(n,`createdAt`,null)},get updatedAt(){return e(n,`updatedAt`,null)},join:t(n,`join`),reload:t(n,`reload`)}}}buildCheckoutProxy(e){let t=this.gateProperty.bind(this),n=()=>this.checkout(e),r=()=>n().checkout;return{errors:{raw:null,global:null},fetchStatus:`idle`,checkout:{get status(){return t(r,`status`,`needs_initialization`)},get externalClientSecret(){return t(r,`externalClientSecret`,null)},get externalGatewayId(){return t(r,`externalGatewayId`,null)},get paymentMethod(){return t(r,`paymentMethod`,null)},get plan(){return t(r,`plan`,null)},get planPeriod(){return t(r,`planPeriod`,null)},get totals(){return t(r,`totals`,null)},get isImmediatePlanChange(){return t(r,`isImmediatePlanChange`,!1)},get freeTrialEndsAt(){return t(r,`freeTrialEndsAt`,null)},get payer(){return t(r,`payer`,null)},get planPeriodStart(){return t(r,`planPeriodStart`,null)},get needsPaymentMethod(){return t(r,`needsPaymentMethod`,null)},start:this.gateMethod(r,`start`),confirm:this.gateMethod(r,`confirm`),finalize:this.gateMethod(r,`finalize`)}}}__internal_effect(e){throw Error(`__internal_effect called before Clerk is loaded`)}__internal_computed(e){throw Error(`__internal_computed called before Clerk is loaded`)}get state(){let e=this.isomorphicClerk.__internal_state;if(!e)throw Error(`Clerk state not ready`);return e}get client(){let e=this.isomorphicClerk.client;if(!e)throw Error(`Clerk client not ready`);return e}get checkout(){let e=this.isomorphicClerk.__experimental_checkout;if(!e)throw Error(`Clerk checkout not ready`);return e}gateProperty(e,t,n){return!Bc()||!this.isomorphicClerk.loaded?n:e()[t]}gateMethod(e,t){return(async(...n)=>{if(!Bc())return Dc.throw(`Attempted to call a method (${t}) that is not supported on the server.`);this.isomorphicClerk.loaded||await new Promise(e=>this.isomorphicClerk.addOnLoaded(e));let r=e();return r[t].apply(r,n)})}wrapMethods(e,t){return Object.fromEntries(t.map(t=>[t,this.gateMethod(e,t)]))}wrapStruct(e,t,n,r){let i={};for(let n of t)i[n]=this.gateMethod(e,n);for(let t of n)Object.defineProperty(i,t,{get:()=>this.gateProperty(e,t,r[t]),enumerable:!0});return i}};globalThis.__BUILD_DISABLE_RHC__===void 0&&(globalThis.__BUILD_DISABLE_RHC__=!1);var fd={name:`@clerk/react`,version:`6.4.2`,environment:`production`},pd,md,hd,gd,_d,vd,yd,bd,xd,Sd=class e{constructor(e){ou(this,bd),this.clerkjs=null,this.preopenOneTap=null,this.preopenUserVerification=null,this.preopenEnableOrganizationsPrompt=null,this.preopenSignIn=null,this.preopenCheckout=null,this.preopenPlanDetails=null,this.preopenSubscriptionDetails=null,this.preopenSignUp=null,this.preopenUserProfile=null,this.preopenOrganizationProfile=null,this.preopenCreateOrganization=null,this.preOpenWaitlist=null,this.premountSignInNodes=new Map,this.premountSignUpNodes=new Map,this.premountUserAvatarNodes=new Map,this.premountUserProfileNodes=new Map,this.premountUserButtonNodes=new Map,this.premountOrganizationProfileNodes=new Map,this.premountCreateOrganizationNodes=new Map,this.premountOrganizationSwitcherNodes=new Map,this.premountOrganizationListNodes=new Map,this.premountMethodCalls=new Map,this.premountWaitlistNodes=new Map,this.premountPricingTableNodes=new Map,this.premountAPIKeysNodes=new Map,this.premountOAuthConsentNodes=new Map,this.premountTaskChooseOrganizationNodes=new Map,this.premountTaskResetPasswordNodes=new Map,this.premountTaskSetupMFANodes=new Map,this.premountAddListenerCalls=new Map,this.loadedListeners=[],ou(this,pd,`loading`),ou(this,md),ou(this,hd),ou(this,gd),ou(this,_d,bu()),ou(this,vd),this.buildSignInUrl=e=>{let t=()=>this.clerkjs?.buildSignInUrl(e)||``;if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`buildSignInUrl`,t)},this.buildSignUpUrl=e=>{let t=()=>this.clerkjs?.buildSignUpUrl(e)||``;if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`buildSignUpUrl`,t)},this.buildAfterSignInUrl=(...e)=>{let t=()=>this.clerkjs?.buildAfterSignInUrl(...e)||``;if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`buildAfterSignInUrl`,t)},this.buildAfterSignUpUrl=(...e)=>{let t=()=>this.clerkjs?.buildAfterSignUpUrl(...e)||``;if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`buildAfterSignUpUrl`,t)},this.buildAfterSignOutUrl=()=>{let e=()=>this.clerkjs?.buildAfterSignOutUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildAfterSignOutUrl`,e)},this.buildNewSubscriptionRedirectUrl=()=>{let e=()=>this.clerkjs?.buildNewSubscriptionRedirectUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildNewSubscriptionRedirectUrl`,e)},this.buildAfterMultiSessionSingleSignOutUrl=()=>{let e=()=>this.clerkjs?.buildAfterMultiSessionSingleSignOutUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildAfterMultiSessionSingleSignOutUrl`,e)},this.buildUserProfileUrl=()=>{let e=()=>this.clerkjs?.buildUserProfileUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildUserProfileUrl`,e)},this.buildCreateOrganizationUrl=()=>{let e=()=>this.clerkjs?.buildCreateOrganizationUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildCreateOrganizationUrl`,e)},this.buildOrganizationProfileUrl=()=>{let e=()=>this.clerkjs?.buildOrganizationProfileUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildOrganizationProfileUrl`,e)},this.buildWaitlistUrl=()=>{let e=()=>this.clerkjs?.buildWaitlistUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildWaitlistUrl`,e)},this.buildTasksUrl=()=>{let e=()=>this.clerkjs?.buildTasksUrl()||``;if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`buildTasksUrl`,e)},this.buildUrlWithAuth=e=>{let t=()=>this.clerkjs?.buildUrlWithAuth(e)||``;if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`buildUrlWithAuth`,t)},this.handleUnauthenticated=async()=>{let e=()=>this.clerkjs?.handleUnauthenticated();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set(`handleUnauthenticated`,e)},this.on=(...e)=>{if(this.clerkjs?.on)return this.clerkjs.on(...e);K(this,_d).on(...e)},this.off=(...e)=>{if(this.clerkjs?.off)return this.clerkjs.off(...e);K(this,_d).off(...e)},this.addOnLoaded=e=>{this.loadedListeners.push(e),this.loaded&&this.emitLoaded()},this.emitLoaded=()=>{this.loadedListeners.forEach(e=>e()),this.loadedListeners=[]},this.beforeLoad=e=>{if(!e)throw Error(`Failed to hydrate latest Clerk JS`)},this.replayInterceptedInvocations=e=>{var t,n;if(!e)throw Error(`Failed to hydrate latest Clerk JS`);return this.clerkjs=e,this.premountMethodCalls.forEach(e=>e()),this.premountAddListenerCalls.forEach((t,n)=>{t.handlers.nativeUnsubscribe=e.addListener(n,t.options)}),(t=K(this,_d).internal.retrieveListeners(`status`))==null||t.forEach(e=>{this.on(`status`,e,{notify:!0})}),(n=K(this,_d).internal.retrieveListeners(`queryClientStatus`))==null||n.forEach(e=>{this.on(`queryClientStatus`,e,{notify:!0})}),this.preopenSignIn!==null&&e.openSignIn(this.preopenSignIn),this.preopenCheckout!==null&&e.__internal_openCheckout(this.preopenCheckout),this.preopenPlanDetails!==null&&e.__internal_openPlanDetails(this.preopenPlanDetails),this.preopenSubscriptionDetails!==null&&e.__internal_openSubscriptionDetails(this.preopenSubscriptionDetails),this.preopenSignUp!==null&&e.openSignUp(this.preopenSignUp),this.preopenUserProfile!==null&&e.openUserProfile(this.preopenUserProfile),this.preopenUserVerification!==null&&e.__internal_openReverification(this.preopenUserVerification),this.preopenOneTap!==null&&e.openGoogleOneTap(this.preopenOneTap),this.preopenOrganizationProfile!==null&&e.openOrganizationProfile(this.preopenOrganizationProfile),this.preopenCreateOrganization!==null&&e.openCreateOrganization(this.preopenCreateOrganization),this.preOpenWaitlist!==null&&e.openWaitlist(this.preOpenWaitlist),this.preopenEnableOrganizationsPrompt&&e.__internal_openEnableOrganizationsPrompt(this.preopenEnableOrganizationsPrompt),this.premountSignInNodes.forEach((t,n)=>{e.mountSignIn(n,t)}),this.premountSignUpNodes.forEach((t,n)=>{e.mountSignUp(n,t)}),this.premountUserProfileNodes.forEach((t,n)=>{e.mountUserProfile(n,t)}),this.premountUserAvatarNodes.forEach((t,n)=>{e.mountUserAvatar(n,t)}),this.premountUserButtonNodes.forEach((t,n)=>{e.mountUserButton(n,t)}),this.premountOrganizationListNodes.forEach((t,n)=>{e.mountOrganizationList(n,t)}),this.premountWaitlistNodes.forEach((t,n)=>{e.mountWaitlist(n,t)}),this.premountPricingTableNodes.forEach((t,n)=>{e.mountPricingTable(n,t)}),this.premountAPIKeysNodes.forEach((t,n)=>{e.mountAPIKeys(n,t)}),this.premountOAuthConsentNodes.forEach((t,n)=>{e.__internal_mountOAuthConsent(n,t)}),this.premountTaskChooseOrganizationNodes.forEach((t,n)=>{e.mountTaskChooseOrganization(n,t)}),this.premountTaskResetPasswordNodes.forEach((t,n)=>{e.mountTaskResetPassword(n,t)}),this.premountTaskSetupMFANodes.forEach((t,n)=>{e.mountTaskSetupMFA(n,t)}),this.clerkjs.status===void 0&&K(this,_d).emit(yu.Status,`ready`),this.emitLoaded(),this.clerkjs},this.__experimental_checkout=(...e)=>this.loaded&&this.clerkjs?this.clerkjs.__experimental_checkout(...e):K(this,vd).checkoutSignal(...e),this.__internal_updateProps=async e=>{let t=await cu(this,bd,xd).call(this);if(t&&`__internal_updateProps`in t)return t.__internal_updateProps(e)},this.setActive=e=>this.clerkjs?this.clerkjs.setActive(e):Promise.reject(),this.openSignIn=e=>{this.clerkjs&&this.loaded?this.clerkjs.openSignIn(e):this.preopenSignIn=e},this.closeSignIn=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeSignIn():this.preopenSignIn=null},this.__internal_openCheckout=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openCheckout(e):this.preopenCheckout=e},this.__internal_closeCheckout=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeCheckout():this.preopenCheckout=null},this.__internal_openPlanDetails=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openPlanDetails(e):this.preopenPlanDetails=e},this.__internal_closePlanDetails=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closePlanDetails():this.preopenPlanDetails=null},this.__internal_openSubscriptionDetails=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openSubscriptionDetails(e):this.preopenSubscriptionDetails=e??null},this.__internal_closeSubscriptionDetails=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeSubscriptionDetails():this.preopenSubscriptionDetails=null},this.__internal_openReverification=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openReverification(e):this.preopenUserVerification=e},this.__internal_closeReverification=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeReverification():this.preopenUserVerification=null},this.__internal_openEnableOrganizationsPrompt=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_openEnableOrganizationsPrompt(e):this.preopenEnableOrganizationsPrompt=e},this.__internal_closeEnableOrganizationsPrompt=()=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_closeEnableOrganizationsPrompt():this.preopenEnableOrganizationsPrompt=null},this.openGoogleOneTap=e=>{this.clerkjs&&this.loaded?this.clerkjs.openGoogleOneTap(e):this.preopenOneTap=e},this.closeGoogleOneTap=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeGoogleOneTap():this.preopenOneTap=null},this.openUserProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.openUserProfile(e):this.preopenUserProfile=e},this.closeUserProfile=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeUserProfile():this.preopenUserProfile=null},this.openOrganizationProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.openOrganizationProfile(e):this.preopenOrganizationProfile=e},this.closeOrganizationProfile=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeOrganizationProfile():this.preopenOrganizationProfile=null},this.openCreateOrganization=e=>{this.clerkjs&&this.loaded?this.clerkjs.openCreateOrganization(e):this.preopenCreateOrganization=e},this.closeCreateOrganization=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeCreateOrganization():this.preopenCreateOrganization=null},this.openWaitlist=e=>{this.clerkjs&&this.loaded?this.clerkjs.openWaitlist(e):this.preOpenWaitlist=e},this.closeWaitlist=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeWaitlist():this.preOpenWaitlist=null},this.openSignUp=e=>{this.clerkjs&&this.loaded?this.clerkjs.openSignUp(e):this.preopenSignUp=e},this.closeSignUp=()=>{this.clerkjs&&this.loaded?this.clerkjs.closeSignUp():this.preopenSignUp=null},this.mountSignIn=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountSignIn(e,t):this.premountSignInNodes.set(e,t)},this.unmountSignIn=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountSignIn(e):this.premountSignInNodes.delete(e)},this.mountSignUp=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountSignUp(e,t):this.premountSignUpNodes.set(e,t)},this.unmountSignUp=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountSignUp(e):this.premountSignUpNodes.delete(e)},this.mountUserAvatar=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserAvatar(e,t):this.premountUserAvatarNodes.set(e,t)},this.unmountUserAvatar=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserAvatar(e):this.premountUserAvatarNodes.delete(e)},this.mountUserProfile=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserProfile(e,t):this.premountUserProfileNodes.set(e,t)},this.unmountUserProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserProfile(e):this.premountUserProfileNodes.delete(e)},this.mountOrganizationProfile=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationProfile(e,t):this.premountOrganizationProfileNodes.set(e,t)},this.unmountOrganizationProfile=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationProfile(e):this.premountOrganizationProfileNodes.delete(e)},this.mountCreateOrganization=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountCreateOrganization(e,t):this.premountCreateOrganizationNodes.set(e,t)},this.unmountCreateOrganization=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountCreateOrganization(e):this.premountCreateOrganizationNodes.delete(e)},this.mountOrganizationSwitcher=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationSwitcher(e,t):this.premountOrganizationSwitcherNodes.set(e,t)},this.unmountOrganizationSwitcher=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationSwitcher(e):this.premountOrganizationSwitcherNodes.delete(e)},this.__experimental_prefetchOrganizationSwitcher=()=>{let e=()=>this.clerkjs?.__experimental_prefetchOrganizationSwitcher();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set(`__experimental_prefetchOrganizationSwitcher`,e)},this.mountOrganizationList=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountOrganizationList(e,t):this.premountOrganizationListNodes.set(e,t)},this.unmountOrganizationList=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountOrganizationList(e):this.premountOrganizationListNodes.delete(e)},this.mountUserButton=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountUserButton(e,t):this.premountUserButtonNodes.set(e,t)},this.unmountUserButton=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountUserButton(e):this.premountUserButtonNodes.delete(e)},this.mountWaitlist=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountWaitlist(e,t):this.premountWaitlistNodes.set(e,t)},this.unmountWaitlist=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountWaitlist(e):this.premountWaitlistNodes.delete(e)},this.mountPricingTable=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountPricingTable(e,t):this.premountPricingTableNodes.set(e,t)},this.unmountPricingTable=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountPricingTable(e):this.premountPricingTableNodes.delete(e)},this.mountAPIKeys=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountAPIKeys(e,t):this.premountAPIKeysNodes.set(e,t)},this.unmountAPIKeys=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountAPIKeys(e):this.premountAPIKeysNodes.delete(e)},this.__internal_mountOAuthConsent=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_mountOAuthConsent(e,t):this.premountOAuthConsentNodes.set(e,t)},this.__internal_unmountOAuthConsent=e=>{this.clerkjs&&this.loaded?this.clerkjs.__internal_unmountOAuthConsent(e):this.premountOAuthConsentNodes.delete(e)},this.mountTaskChooseOrganization=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskChooseOrganization(e,t):this.premountTaskChooseOrganizationNodes.set(e,t)},this.unmountTaskChooseOrganization=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskChooseOrganization(e):this.premountTaskChooseOrganizationNodes.delete(e)},this.mountTaskResetPassword=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskResetPassword(e,t):this.premountTaskResetPasswordNodes.set(e,t)},this.unmountTaskResetPassword=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskResetPassword(e):this.premountTaskResetPasswordNodes.delete(e)},this.mountTaskSetupMFA=(e,t)=>{this.clerkjs&&this.loaded?this.clerkjs.mountTaskSetupMFA(e,t):this.premountTaskSetupMFANodes.set(e,t)},this.unmountTaskSetupMFA=e=>{this.clerkjs&&this.loaded?this.clerkjs.unmountTaskSetupMFA(e):this.premountTaskSetupMFANodes.delete(e)},this.addListener=(e,t)=>{if(this.clerkjs)return this.clerkjs.addListener(e,t);{let n=()=>{var t,n;let r=this.premountAddListenerCalls.get(e);r?.handlers&&((n=r==null?void 0:(t=r.handlers).nativeUnsubscribe)==null||n.call(t),this.premountAddListenerCalls.delete(e))};return this.premountAddListenerCalls.set(e,{options:t,handlers:{unsubscribe:n,nativeUnsubscribe:void 0}}),n}},this.navigate=e=>{let t=()=>this.clerkjs?.navigate(e);this.clerkjs&&this.loaded?t():this.premountMethodCalls.set(`navigate`,t)},this.redirectWithAuth=async(...e)=>{let t=()=>this.clerkjs?.redirectWithAuth(...e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`redirectWithAuth`,t)},this.redirectToSignIn=async e=>{let t=()=>this.clerkjs?.redirectToSignIn(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`redirectToSignIn`,t)},this.redirectToSignUp=async e=>{let t=()=>this.clerkjs?.redirectToSignUp(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`redirectToSignUp`,t)},this.redirectToUserProfile=async()=>{let e=()=>this.clerkjs?.redirectToUserProfile();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`redirectToUserProfile`,e)},this.redirectToAfterSignUp=()=>{let e=()=>this.clerkjs?.redirectToAfterSignUp();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`redirectToAfterSignUp`,e)},this.redirectToAfterSignIn=()=>{let e=()=>this.clerkjs?.redirectToAfterSignIn();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set(`redirectToAfterSignIn`,e)},this.redirectToAfterSignOut=()=>{let e=()=>this.clerkjs?.redirectToAfterSignOut();this.clerkjs&&this.loaded?e():this.premountMethodCalls.set(`redirectToAfterSignOut`,e)},this.redirectToOrganizationProfile=async()=>{let e=()=>this.clerkjs?.redirectToOrganizationProfile();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`redirectToOrganizationProfile`,e)},this.redirectToCreateOrganization=async()=>{let e=()=>this.clerkjs?.redirectToCreateOrganization();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`redirectToCreateOrganization`,e)},this.redirectToWaitlist=async()=>{let e=()=>this.clerkjs?.redirectToWaitlist();if(this.clerkjs&&this.loaded)return e();this.premountMethodCalls.set(`redirectToWaitlist`,e)},this.redirectToTasks=async e=>{let t=()=>this.clerkjs?.redirectToTasks(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`redirectToTasks`,t)},this.handleRedirectCallback=async e=>{var t;let n=()=>this.clerkjs?.handleRedirectCallback(e);this.clerkjs&&this.loaded?(t=n())==null||t.catch(()=>{}):this.premountMethodCalls.set(`handleRedirectCallback`,n)},this.handleGoogleOneTapCallback=async(e,t)=>{var n;let r=()=>this.clerkjs?.handleGoogleOneTapCallback(e,t);this.clerkjs&&this.loaded?(n=r())==null||n.catch(()=>{}):this.premountMethodCalls.set(`handleGoogleOneTapCallback`,r)},this.handleEmailLinkVerification=async e=>{let t=()=>this.clerkjs?.handleEmailLinkVerification(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`handleEmailLinkVerification`,t)},this.authenticateWithMetamask=async e=>{let t=()=>this.clerkjs?.authenticateWithMetamask(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithMetamask`,t)},this.authenticateWithCoinbaseWallet=async e=>{let t=()=>this.clerkjs?.authenticateWithCoinbaseWallet(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithCoinbaseWallet`,t)},this.authenticateWithBase=async e=>{let t=()=>this.clerkjs?.authenticateWithBase(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithBase`,t)},this.authenticateWithOKXWallet=async e=>{let t=()=>this.clerkjs?.authenticateWithOKXWallet(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithOKXWallet`,t)},this.authenticateWithSolana=async e=>{let t=()=>this.clerkjs?.authenticateWithSolana(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithSolana`,t)},this.authenticateWithWeb3=async e=>{let t=()=>this.clerkjs?.authenticateWithWeb3(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`authenticateWithWeb3`,t)},this.authenticateWithGoogleOneTap=async e=>(await cu(this,bd,xd).call(this)).authenticateWithGoogleOneTap(e),this.__internal_loadStripeJs=async()=>(await cu(this,bd,xd).call(this)).__internal_loadStripeJs(),this.createOrganization=async e=>{let t=()=>this.clerkjs?.createOrganization(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`createOrganization`,t)},this.getOrganization=async e=>{let t=()=>this.clerkjs?.getOrganization(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`getOrganization`,t)},this.joinWaitlist=async e=>{let t=()=>this.clerkjs?.joinWaitlist(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`joinWaitlist`,t)},this.signOut=async(...e)=>{let t=()=>this.clerkjs?.signOut(...e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`signOut`,t)},this.__internal_attemptToEnableEnvironmentSetting=e=>{let t=()=>this.clerkjs?.__internal_attemptToEnableEnvironmentSetting(e);if(this.clerkjs&&this.loaded)return t();this.premountMethodCalls.set(`__internal_attemptToEnableEnvironmentSetting`,t)},su(this,gd,e?.publishableKey),su(this,hd,e?.proxyUrl),su(this,md,e?.domain),this.options=e,this.Clerk=e?.Clerk||null,this.mode=Bc()?`browser`:`server`,su(this,vd,new dd(this)),this.options.sdkMetadata||(this.options.sdkMetadata=fd),K(this,_d).emit(yu.Status,`loading`),K(this,_d).prioritizedOn(yu.Status,e=>su(this,pd,e)),K(this,gd)&&this.options.experimental?.runtimeEnvironment===`headless`&&this.options.Clerk?this.loadHeadlessClerk():K(this,gd)&&this.getEntryChunks()}get publishableKey(){return K(this,gd)}get loaded(){return this.clerkjs?.loaded||!1}get status(){return this.clerkjs?this.clerkjs?.status||(this.clerkjs.loaded?`ready`:`loading`):K(this,pd)}static getOrCreateInstance(t){return(!Bc()||!K(this,yd)||t.Clerk&&K(this,yd).Clerk!==t.Clerk||K(this,yd).publishableKey!==t.publishableKey)&&su(this,yd,new e(t)),K(this,yd)}static clearInstance(){su(this,yd,null)}get domain(){return typeof window<`u`&&window.location?Pc(K(this,md),new URL(window.location.href),``):typeof K(this,md)==`function`?Dc.throw(Wc):K(this,md)||``}get proxyUrl(){return typeof window<`u`&&window.location?Pc(K(this,hd),new URL(window.location.href),``):typeof K(this,hd)==`function`?Dc.throw(Wc):K(this,hd)||``}__internal_getOption(e){return this.clerkjs?.__internal_getOption?this.clerkjs?.__internal_getOption(e):this.options[e]}loadHeadlessClerk(){let e=dl(this.options.Clerk)?new this.options.Clerk(K(this,gd),{proxyUrl:this.proxyUrl,domain:this.domain}):this.options.Clerk;if(!e){K(this,_d).emit(yu.Status,`error`);return}let t=()=>{this.replayInterceptedInvocations(e)};e.loaded?t():e.load(this.options).then(()=>t()).catch(e=>{K(this,_d).emit(yu.Status,`error`),this.emitLoaded()})}get sdkMetadata(){return this.clerkjs?.sdkMetadata||this.options.sdkMetadata||void 0}get instanceType(){return this.clerkjs?.instanceType}get frontendApi(){return this.clerkjs?.frontendApi||``}get isStandardBrowser(){return this.clerkjs?.isStandardBrowser||this.options.standardBrowser||!1}get __internal_queryClient(){return this.clerkjs?.__internal_queryClient}get isSatellite(){return typeof window<`u`&&window.location?Pc(this.options.isSatellite,new URL(window.location.href),!1):typeof this.options.isSatellite==`function`?Dc.throw(Wc):!1}async getEntryChunks(){if(!(this.mode!==`browser`||this.loaded)){typeof window<`u`&&(window.__clerk_publishable_key=K(this,gd),window.__clerk_proxy_url=this.proxyUrl,window.__clerk_domain=this.domain);try{let e=await this.getClerkJsEntryChunk();if(!e.loaded){this.beforeLoad(e);let t=this.options.standardBrowser!==!1&&!this.options.Clerk||this.options.ui?.ClerkUI?await this.getClerkUIEntryChunk():void 0;await e.load({...this.options,ui:{...this.options.ui,ClerkUI:t}})}e.loaded&&this.replayInterceptedInvocations(e)}catch(e){let t=e;K(this,_d).emit(yu.Status,`error`),console.error(t.stack||t.message||t);return}}}async getClerkJsEntryChunk(){if((!this.options.Clerk||this.options.__internal_clerkJSUrl)&&!__BUILD_DISABLE_RHC__&&await Wu({...this.options,publishableKey:K(this,gd),proxyUrl:this.proxyUrl,domain:this.domain,nonce:this.options.nonce}),this.options.Clerk&&!this.options.__internal_clerkJSUrl&&(global.Clerk=dl(this.options.Clerk)?new this.options.Clerk(K(this,gd),{proxyUrl:this.proxyUrl,domain:this.domain}):this.options.Clerk),!global.Clerk)throw Error(`Failed to download latest ClerkJS. Contact support@clerk.com.`);return global.Clerk}async getClerkUIEntryChunk(){let e=this.options.ui,t=!!this.options.__internal_clerkUIUrl;if(e?.ClerkUI&&!t)return e.ClerkUI;if(!((e||this.options.prefetchUI===!1)&&!t)){if(await Gu({...this.options,publishableKey:K(this,gd),proxyUrl:this.proxyUrl,domain:this.domain,nonce:this.options.nonce}),!global.__internal_ClerkUICtor)throw Error(`Failed to download latest Clerk UI. Contact support@clerk.com.`);return global.__internal_ClerkUICtor}}get version(){return this.clerkjs?.version}get client(){if(this.clerkjs)return this.clerkjs.client}get session(){if(this.clerkjs)return this.clerkjs.session}get user(){if(this.clerkjs)return this.clerkjs.user}get organization(){if(this.clerkjs)return this.clerkjs.organization}get telemetry(){if(this.clerkjs)return this.clerkjs.telemetry}get __internal_environment(){if(this.clerkjs)return this.clerkjs.__internal_environment}get isSignedIn(){return this.clerkjs?this.clerkjs.isSignedIn:!1}get billing(){return this.clerkjs?.billing}get __internal_state(){return this.loaded&&this.clerkjs?this.clerkjs.__internal_state:K(this,vd)}get apiKeys(){return this.clerkjs?.apiKeys}get oauthApplication(){return this.clerkjs?.oauthApplication}__internal_setEnvironment(...e){if(this.clerkjs&&`__internal_setEnvironment`in this.clerkjs)this.clerkjs.__internal_setEnvironment(e);else return}get __internal_lastEmittedResources(){return this.clerkjs?.__internal_lastEmittedResources}};pd=new WeakMap,md=new WeakMap,hd=new WeakMap,gd=new WeakMap,_d=new WeakMap,vd=new WeakMap,yd=new WeakMap,bd=new WeakSet,xd=function(){return new Promise(e=>{this.addOnLoaded(()=>e(this.clerkjs))})},ou(Sd,yd);var Cd=Sd;function wd(e){let{initialState:t,children:n,...r}=e,{isomorphicClerk:i,clerkStatus:a}=Ed(ul(r));return g.createElement(cc,{initialState:t,clerk:i,clerkStatus:a},n)}var q=ml(wd,`ClerkProvider`,Vc);q.displayName=`ClerkProvider`;var Td=ad?`shared`:``,Ed=e=>{let t=g.useMemo(()=>({clerkUIVariant:Td,...e}),[e]),n=g.useRef(Cd.getOrCreateInstance(t)),[r,i]=g.useState(n.current.status);return g.useEffect(()=>{n.current.__internal_updateProps({appearance:e.appearance})},[e.appearance]),g.useEffect(()=>{n.current.__internal_updateProps({options:e})},[e.localization]),g.useEffect(()=>(n.current.on(`status`,i),()=>{n.current&&n.current.off(`status`,i),Cd.clearInstance()}),[]),{isomorphicClerk:n.current,clerkStatus:r}},Dd=t((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})),J=e(t(((e,t)=>{t.exports=Dd()}))(),1);if(typeof window<`u`&&!window.global&&(window.global=typeof global>`u`?window:global),globalThis.__clerkSharedModules){let e=globalThis.__clerkSharedModules.react?.version;e&&e!==`19.2.5`&&console.warn(`[@clerk/ui/register] React version mismatch detected. Already registered: ${e}, current import: 19.2.5. This may cause issues with the shared @clerk/ui variant.`)}else globalThis.__clerkSharedModules={react:g,"react-dom":Fe,"react-dom/client":h,"react/jsx-runtime":J};var Od=Fl(({clerk:e,children:t,...n})=>{let{appearance:r,getContainer:i,component:a,signUpFallbackRedirectUrl:o,forceRedirectUrl:s,fallbackRedirectUrl:c,signUpForceRedirectUrl:l,mode:u,initialValues:d,withSignUp:f,oauthFlow:p,...m}=n;t=ol(t,`Sign in`);let h=al(t)(`SignInButton`),_=()=>{let t={forceRedirectUrl:s,fallbackRedirectUrl:c,signUpFallbackRedirectUrl:o,signUpForceRedirectUrl:l,initialValues:d,withSignUp:f,oauthFlow:p};return u===`modal`?e.openSignIn({...t,appearance:r,getContainer:i}):e.redirectToSignIn({...t,signInFallbackRedirectUrl:c,signInForceRedirectUrl:s})},v=async e=>(h&&typeof h==`object`&&`props`in h&&await sl(h.props.onClick)(e),_()),y={...m,onClick:v};return g.cloneElement(h,y)},{component:`SignInButton`,renderWhileLoading:!0});Fl(({clerk:e,children:t,...n})=>{let{redirectUrl:r,getContainer:i,component:a,...o}=n;t=ol(t,`Sign in with Metamask`);let s=al(t)(`SignInWithMetamaskButton`),c=async()=>{async function t(){await e.authenticateWithMetamask({redirectUrl:r||void 0})}t()},l=async e=>(await sl(s.props.onClick)(e),c()),u={...o,onClick:l};return g.cloneElement(s,u)},{component:`SignInWithMetamask`,renderWhileLoading:!0}),Fl(({clerk:e,children:t,...n})=>{let{redirectUrl:r=`/`,sessionId:i,signOutOptions:a,getContainer:o,component:s,...c}=n;a&&du("SignOutButton `signOutOptions`","Use the `redirectUrl` and `sessionId` props directly instead."),t=ol(t,`Sign out`);let l=al(t)(`SignOutButton`),u=()=>e.signOut({redirectUrl:r,...i!==void 0&&{sessionId:i},...a}),d=async e=>(await sl(l.props.onClick)(e),u()),f={...c,onClick:d};return g.cloneElement(l,f)},{component:`SignOutButton`,renderWhileLoading:!0});var kd=Fl(({clerk:e,children:t,...n})=>{let{appearance:r,unsafeMetadata:i,getContainer:a,component:o,fallbackRedirectUrl:s,forceRedirectUrl:c,signInFallbackRedirectUrl:l,signInForceRedirectUrl:u,mode:d,initialValues:f,oauthFlow:p,...m}=n;t=ol(t,`Sign up`);let h=al(t)(`SignUpButton`),_=()=>{let t={fallbackRedirectUrl:s,forceRedirectUrl:c,signInFallbackRedirectUrl:l,signInForceRedirectUrl:u,initialValues:f,oauthFlow:p};return d===`modal`?e.openSignUp({...t,appearance:r,unsafeMetadata:i,getContainer:a}):e.redirectToSignUp({...t,signUpFallbackRedirectUrl:s,signUpForceRedirectUrl:c})},v=async e=>(h&&typeof h==`object`&&`props`in h&&await sl(h.props.onClick)(e),_()),y={...m,onClick:v};return g.cloneElement(h,y)},{component:`SignUpButton`,renderWhileLoading:!0});Oc({packageName:`@clerk/react`}),$u(`@clerk/react`);function Ad(e){if(typeof window>`u`||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function jd(e){return typeof window<`u`&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Md(e){let t=null;return()=>(t??=e(),t)}var Nd=Md(function(){return jd(/^Mac/i)}),Pd=Md(function(){return jd(/^iPhone/i)}),Fd=Md(function(){return jd(/^iPad/i)||Nd()&&navigator.maxTouchPoints>1}),Id=Md(function(){return Pd()||Fd()}),Ld=Md(function(){return Ad(/AppleWebKit/i)&&!Rd()}),Rd=Md(function(){return Ad(/Chrome/i)}),zd=Md(function(){return Ad(/Android/i)}),Bd=Md(function(){return Ad(/Firefox/i)});function Vd(e){if(Ud())e.focus({preventScroll:!0});else{let t=Wd(e);e.focus(),Gd(t)}}var Hd=null;function Ud(){if(Hd==null){Hd=!1;try{document.createElement(`div`).focus({get preventScroll(){return Hd=!0,!0}})}catch{}}return Hd}function Wd(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Gd(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Kd(e,t,n=!0){let{metaKey:r,ctrlKey:i,altKey:a,shiftKey:o}=t;Bd()&&window.event?.type?.startsWith(`key`)&&e.target===`_blank`&&(Nd()?r=!0:i=!0);let s=Ld()&&Nd()&&!Fd()?new KeyboardEvent(`keydown`,{keyIdentifier:`Enter`,metaKey:r,ctrlKey:i,altKey:a,shiftKey:o}):new MouseEvent(`click`,{metaKey:r,ctrlKey:i,altKey:a,shiftKey:o,detail:1,bubbles:!0,cancelable:!0});Kd.isOpening=n,Vd(e),e.dispatchEvent(s),Kd.isOpening=!1}Kd.isOpening=!1;var qd=typeof document<`u`?g.useLayoutEffect:()=>{},Jd={prefix:String(Math.round(Math.random()*1e10)),current:0},Yd=g.createContext(Jd),Xd=g.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement;var Zd=new WeakMap;function Qd(e=!1){let t=(0,g.useContext)(Yd),n=(0,g.useRef)(null);if(n.current===null&&!e){let e=g.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let n=Zd.get(e);n==null?Zd.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,Zd.delete(e))}n.current=++t.current}return n.current}function $d(e){let t=(0,g.useContext)(Yd),n=Qd(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function ef(e){let t=g.useId(),[n]=(0,g.useState)(of()),r=n?`react-aria`:`react-aria${Jd.prefix}`;return e||`${r}-${t}`}var tf=typeof g.useId==`function`?ef:$d;function nf(){return!1}function rf(){return!0}function af(e){return()=>{}}function of(){return typeof g.useSyncExternalStore==`function`?g.useSyncExternalStore(af,nf,rf):(0,g.useContext)(Xd)}function sf(e){let[t,n]=(0,g.useState)(e),r=(0,g.useRef)(t),i=(0,g.useRef)(null),a=(0,g.useRef)(()=>{if(!i.current)return;let e=i.current.next();if(e.done){i.current=null;return}r.current===e.value?a.current():n(e.value)});return qd(()=>{r.current=t,i.current&&a.current()}),[t,(0,g.useCallback)(e=>{i.current=e(r.current),a.current()},[a])]}var cf=!!(typeof window<`u`&&window.document&&window.document.createElement),lf=new Map,uf;typeof FinalizationRegistry<`u`&&(uf=new FinalizationRegistry(e=>{lf.delete(e)}));function df(e){let[t,n]=(0,g.useState)(e),r=(0,g.useRef)(null),i=tf(t),a=(0,g.useRef)(null);if(uf&&uf.register(a,i),cf){let e=lf.get(i);e&&!e.includes(r)?e.push(r):lf.set(i,[r])}return qd(()=>{let e=i;return()=>{uf&&uf.unregister(a),lf.delete(e)}},[i]),(0,g.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),i}function ff(e,t){if(e===t)return e;let n=lf.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=lf.get(t);return r?(r.forEach(t=>t.current=e),e):t}function pf(e=[]){let t=df(),[n,r]=sf(t),i=(0,g.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return qd(i,[t,i,...e]),n}function mf(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}var hf=e=>e?.ownerDocument??document,gf=e=>e&&`window`in e&&e.window===e?e:hf(e).defaultView||window;function _f(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function vf(e){return _f(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&`host`in e}var yf=!1;function bf(){return yf}function xf(e,t){if(!bf())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n=n.tagName===`SLOT`&&n.assignedSlot?n.assignedSlot.parentNode:vf(n)?n.host:n.parentNode}return!1}var Sf=(e=document)=>{if(!bf())return e.activeElement;let t=e.activeElement;for(;t&&`shadowRoot`in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function Y(e){if(bf()&&e.target instanceof Element&&e.target.shadowRoot){if(`composedPath`in e)return e.composedPath()[0]??null;if(`composedPath`in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return e.target}function Cf(e){if(!e)return!1;let t=e.getRootNode(),n=gf(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return!1;let r=t.activeElement;return r!=null&&e.contains(r)}var wf=class{constructor(e,t,n,r){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.shadowRoot;if(t){let e=this._doc.createTreeWalker(t,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(e),NodeFilter.FILTER_ACCEPT}else if(typeof this.filter==`function`)return this.filter(e);else if(this.filter?.acceptNode)return this.filter.acceptNode(e);else if(this.filter===null)return NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=t,this.filter=r??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=t,this._walkerStack.unshift(e.createTreeWalker(t,n,this._acceptNode));let i=t.shadowRoot;if(i){let e=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(e)}}get currentNode(){return this._currentNode}set currentNode(e){if(!xf(this.root,e))throw Error(`Cannot set currentNode to a node that is not contained by the root node.`);let t=[],n=e,r=e;for(this._currentNode=e;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let e=n,i=this._doc.createTreeWalker(e,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),n=r=e.host}else n=n.parentNode;let i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),this._walkerStack=t}get doc(){return this._doc}firstChild(){let e=this.currentNode,t=this.nextNode();return xf(e,t)?(t&&(this.currentNode=t),t):(this.currentNode=e,null)}lastChild(){let e=this._walkerStack[0].lastChild();return e&&(this.currentNode=e),e}nextNode(){let e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let t;if(typeof this.filter==`function`?t=this.filter(e):this.filter?.acceptNode&&(t=this.filter.acceptNode(e)),t===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let n=this.nextNode();return n&&(this.currentNode=n),n}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.nextNode();return e&&(this.currentNode=e),e}else return null}previousNode(){let e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}else return null;return null}let t=e.previousNode();if(t){if(t.shadowRoot){let e;if(typeof this.filter==`function`?e=this.filter(t):this.filter?.acceptNode&&(e=this.filter.acceptNode(t)),e===NodeFilter.FILTER_ACCEPT)return t&&(this.currentNode=t),t;let n=this.lastChild();return n&&(this.currentNode=n),n}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}};function Tf(e,t,n,r){return bf()?new wf(e,t,n,r):e.createTreeWalker(t,n,r)}function Ef(...e){return e.length===1&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=Df(e,t);return n||=typeof r==`function`,r});if(n)return()=>{r.forEach((t,n)=>{typeof t==`function`?t():Df(e[n],null)})}}}function Df(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Of(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Of(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function kf(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Of(e))&&(r&&(r+=` `),r+=t);return r}function Af(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],i=r[e];typeof n==`function`&&typeof i==`function`&&e[0]===`o`&&e[1]===`n`&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=mf(n,i):(e===`className`||e===`UNSAFE_className`)&&typeof n==`string`&&typeof i==`string`?t[e]=kf(n,i):e===`id`&&n&&i?t.id=ff(n,i):e===`ref`&&n&&i?t.ref=Ef(n,i):t[e]=i===void 0?n:i}}return t}var jf=new Set([`id`]),Mf=new Set([`aria-label`,`aria-labelledby`,`aria-describedby`,`aria-details`]),Nf=new Set([`href`,`hrefLang`,`target`,`rel`,`download`,`ping`,`referrerPolicy`]),Pf=new Set([`dir`,`lang`,`hidden`,`inert`,`translate`]),Ff=new Set(`onClick.onAuxClick.onContextMenu.onDoubleClick.onMouseDown.onMouseEnter.onMouseLeave.onMouseMove.onMouseOut.onMouseOver.onMouseUp.onTouchCancel.onTouchEnd.onTouchMove.onTouchStart.onPointerDown.onPointerMove.onPointerUp.onPointerCancel.onPointerEnter.onPointerLeave.onPointerOver.onPointerOut.onGotPointerCapture.onLostPointerCapture.onScroll.onWheel.onAnimationStart.onAnimationEnd.onAnimationIteration.onTransitionCancel.onTransitionEnd.onTransitionRun.onTransitionStart`.split(`.`)),If=/^(data-.*)$/;function Lf(e,t={}){let{labelable:n,isLink:r,global:i,events:a=i,propNames:o}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(jf.has(t)||n&&Mf.has(t)||r&&Nf.has(t)||i&&Pf.has(t)||a&&(Ff.has(t)||t.endsWith(`Capture`)&&Ff.has(t.slice(0,-7)))||o?.has(t)||If.test(t))&&(s[t]=e[t]);return s}var Rf=new Map,zf=new Set;function Bf(){if(typeof window>`u`)return;function e(e){return`propertyName`in e}let t=t=>{let r=Y(t);if(!e(t)||!r)return;let i=Rf.get(r);i||(i=new Set,Rf.set(r,i),r.addEventListener(`transitioncancel`,n,{once:!0})),i.add(t.propertyName)},n=t=>{let r=Y(t);if(!e(t)||!r)return;let i=Rf.get(r);if(i&&(i.delete(t.propertyName),i.size===0&&(r.removeEventListener(`transitioncancel`,n),Rf.delete(r)),Rf.size===0)){for(let e of zf)e();zf.clear()}};document.body.addEventListener(`transitionrun`,t),document.body.addEventListener(`transitionend`,n)}typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,Bf):Bf());function Vf(){for(let[e]of Rf)`isConnected`in e&&!e.isConnected&&Rf.delete(e)}function Hf(e){requestAnimationFrame(()=>{Vf(),Rf.size===0?e():zf.add(e)})}function Uf(){let e=(0,g.useRef)(new Map),t=(0,g.useCallback)((t,n,r,i)=>{let a=i?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,a,i)},[]),n=(0,g.useCallback)((t,n,r,i)=>{let a=e.current.get(r)?.fn||r;t.removeEventListener(n,a,i),e.current.delete(r)},[]),r=(0,g.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,g.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Wf(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=df(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(` `):i&&=i.trim().split(/\s+/).join(` `),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function Gf(e){let t=(0,g.useRef)(null),n=(0,g.useRef)(void 0),r=(0,g.useCallback)(t=>{if(typeof e==`function`){let n=e,r=n(t);return()=>{typeof r==`function`?r():n(null)}}else if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,g.useMemo)(()=>({get current(){return t.current},set current(e){t.current=e,n.current&&=(n.current(),void 0),e!=null&&(n.current=r(e))}}),[r])}var Kf=g.useInsertionEffect??qd;function qf(e){let t=(0,g.useRef)(null);return Kf(()=>{t.current=e},[e]),(0,g.useCallback)((...e)=>{let n=t.current;return n?.(...e)},[])}function Jf(){return window.ResizeObserver!==void 0}function Yf(e){let{ref:t,box:n,onResize:r}=e,i=qf(r);(0,g.useEffect)(()=>{let e=t?.current;if(e)if(Jf()){let t=new window.ResizeObserver(e=>{e.length&&i()});return t.observe(e,{box:n}),()=>{e&&t.unobserve(e)}}else return window.addEventListener(`resize`,i,!1),()=>{window.removeEventListener(`resize`,i,!1)}},[t,n])}function Xf(e,t){qd(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Zf(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=document.scrollingElement||document.documentElement,i=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return e===r&&n.overflow!==`hidden`&&(i=!0),i&&t&&(i=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),i}function Qf(e,t){let n=e;for(Zf(n,t)&&(n=n.parentElement);n&&!Zf(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}var $f=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function ep(e){return e instanceof HTMLInputElement&&!$f.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}var tp=typeof document<`u`&&window.visualViewport;function np(){let e=of(),[t,n]=(0,g.useState)(()=>e?{width:0,height:0}:rp());return(0,g.useEffect)(()=>{let e=e=>{n(t=>e.width===t.width&&e.height===t.height?t:e)},t=()=>{tp&&tp.scale>1||e(rp())},r,i=t=>{tp&&tp.scale>1||ep(Y(t))&&(r=requestAnimationFrame(()=>{let t=Sf();(!t||!ep(t))&&e({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})}))};return e(rp()),Id()&&window.addEventListener(`blur`,i,!0),tp?tp.addEventListener(`resize`,t):window.addEventListener(`resize`,t),()=>{cancelAnimationFrame(r),Id()&&window.removeEventListener(`blur`,i,!0),tp?tp.removeEventListener(`resize`,t):window.removeEventListener(`resize`,t)}},[]),t}function rp(){return{width:tp?Math.min(tp.width*tp.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:tp?tp.height*tp.scale:document.documentElement.clientHeight}}function ip(e){return e.pointerType===``&&e.isTrusted?!0:zd()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function ap(e){return!zd()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`}function op(e,t=!0){let[n,r]=(0,g.useState)(!0),i=n&&t;return qd(()=>{if(i&&e.current&&`getAnimations`in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,i]),cp(e,i,(0,g.useCallback)(()=>r(!1),[])),i}function sp(e,t){let[n,r]=(0,g.useState)(t?`open`:`closed`);switch(n){case`open`:t||r(`exiting`);break;case`closed`:case`exiting`:t&&r(`open`);break}let i=n===`exiting`;return cp(e,i,(0,g.useCallback)(()=>{r(e=>e===`exiting`?`closed`:e)},[])),i}function cp(e,t,n){qd(()=>{if(t&&e.current){if(!(`getAnimations`in e.current)){n();return}let t=e.current.getAnimations();if(t.length===0){n();return}let r=!1;return Promise.allSettled(t.map(e=>e.finished)).then(()=>{r||(0,Fe.flushSync)(()=>{n()})}),()=>{r=!0}}},[e,t,n])}var lp=typeof Element<`u`&&`checkVisibility`in Element.prototype;function up(e){let t=gf(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!==`none`&&r!==`hidden`&&r!==`collapse`;if(i){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);i=n!==`none`&&r!==`hidden`&&r!==`collapse`}return i}function dp(e,t){return!e.hasAttribute(`hidden`)&&!e.hasAttribute(`data-react-aria-prevent-focus`)&&(e.nodeName===`DETAILS`&&t&&t.nodeName!==`SUMMARY`?e.hasAttribute(`open`):!0)}function fp(e,t){return lp?e.checkVisibility({visibilityProperty:!0})&&!e.closest(`[data-react-aria-prevent-focus]`):e.nodeName!==`#comment`&&up(e)&&dp(e,t)&&(!e.parentElement||fp(e.parentElement,e))}var pp=[`input:not([disabled]):not([type=hidden])`,`select:not([disabled])`,`textarea:not([disabled])`,`button:not([disabled])`,`a[href]`,`area[href]`,`summary`,`iframe`,`object`,`embed`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable^="false"])`,`permission`],mp=pp.join(`:not([hidden]),`)+`,[tabindex]:not([disabled]):not([hidden])`;pp.push(`[tabindex]:not([tabindex="-1"]):not([disabled])`);var hp=pp.join(`:not([hidden]):not([tabindex="-1"]),`);function gp(e,t){return e.matches(mp)&&!vp(e)&&(t?.skipVisibilityCheck||fp(e))}function _p(e){return e.matches(hp)&&fp(e)&&!vp(e)}function vp(e){let t=e;for(;t!=null;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function yp(e){return e?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}var bp=new WeakMap;function xp(e){let t=e??(typeof document<`u`?document:void 0);if(!t)return yp(t);if(bp.has(t))return bp.get(t);let n=t.querySelector(`meta[property="csp-nonce"]`),r=n&&n instanceof gf(n).HTMLMetaElement&&(n.nonce||n.content)||yp(t)||void 0;return r!==void 0&&bp.set(t,r),r}function Sp(e,t,n){let{render:r,...i}=t,a=(0,g.useRef)(null),o=(0,g.useMemo)(()=>Ef(n,a),[n,a]);qd(()=>{},[e,r]);let s={...i,ref:o};return r?r(s,void 0):(0,J.jsx)(e,{...s})}var Cp={},wp=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=Cp[t];return n||(n=(0,g.forwardRef)(Sp.bind(null,t)),Cp[t]=n),n}}),Tp=/\s+/g,Ep=e=>typeof e!=`string`||!e?e:e.replace(Tp,` `).trim(),Dp=(...e)=>{let t=[],n=e=>{if(!e&&e!==0&&e!==0n)return;if(Array.isArray(e)){for(let t=0,r=e.length;t<r;t++)n(e[t]);return}let r=typeof e;if(r===`string`||r===`number`||r===`bigint`){if(r===`number`&&e!==e)return;t.push(String(e))}else if(r===`object`){let n=Object.keys(e);for(let r=0,i=n.length;r<i;r++){let i=n[r];e[i]&&t.push(i)}}};for(let t=0,r=e.length;t<r;t++){let r=e[t];r!=null&&n(r)}return t.length>0?Ep(t.join(` `)):void 0},Op=e=>e===!1?`false`:e===!0?`true`:e===0?`0`:e,kp=e=>{if(!e||typeof e!=`object`)return!0;for(let t in e)return!1;return!0},Ap=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){let a=n[i];if(!r.includes(a)||e[a]!==t[a])return!1}return!0},jp=(e,t)=>{for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let r=t[n];n in e?e[n]=Dp(e[n],r):e[n]=r}return e},Mp=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)?Mp(r,t):r&&t.push(r)}},Np=(...e)=>{let t=[];Mp(e,t);let n=[];for(let e=0;e<t.length;e++)t[e]&&n.push(t[e]);return n},Pp=(e,t)=>{let n={};for(let r in e){let i=e[r];if(r in t){let e=t[r];Array.isArray(i)||Array.isArray(e)?n[r]=Np(e,i):typeof i==`object`&&typeof e==`object`&&i&&e?n[r]=Pp(i,e):n[r]=e+` `+i}else n[r]=i}for(let r in t)r in e||(n[r]=t[r]);return n},Fp={twMerge:!0,twMergeConfig:{}};function Ip(){let e=null,t={},n=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(t){e=t},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(e){t=e},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(e){n=e},reset(){e=null,t={},n=!1}}}var Lp=Ip(),Rp=e=>{let t=(t,n)=>{let{extend:r=null,slots:i={},variants:a={},compoundVariants:o=[],compoundSlots:s=[],defaultVariants:c={}}=t,l={...Fp,...n},u=r?.base?Dp(r.base,t?.base):t?.base,d=r?.variants&&!kp(r.variants)?Pp(a,r.variants):a,f=r?.defaultVariants&&!kp(r.defaultVariants)?{...r.defaultVariants,...c}:c;!kp(l.twMergeConfig)&&!Ap(l.twMergeConfig,Lp.cachedTwMergeConfig)&&(Lp.didTwMergeConfigChange=!0,Lp.cachedTwMergeConfig=l.twMergeConfig);let p=kp(r?.slots),m=kp(i)?{}:{base:Dp(t?.base,p&&r?.base),...i},h=p?m:jp({...r?.slots},kp(m)?{base:t?.base}:m),g=kp(r?.compoundVariants)?o:Np(r?.compoundVariants,o),_=t=>{if(kp(d)&&kp(i)&&p)return e(u,t?.class,t?.className)(l);if(g&&!Array.isArray(g))throw TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof g}`);if(s&&!Array.isArray(s))throw TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof s}`);let n=(e,n=d,r=null,i=null)=>{let a=n[e];if(!a||kp(a))return null;let o=i?.[e]??t?.[e];if(o===null)return null;let s=Op(o);if(typeof s==`object`)return null;let c=f?.[e];return a[(s??Op(c))||`false`]},r=()=>{if(!d)return null;let e=Object.keys(d),t=[];for(let r=0;r<e.length;r++){let i=n(e[r],d);i&&t.push(i)}return t},a=(e,t)=>{if(!d||typeof d!=`object`)return null;let r=[];for(let i in d){let a=n(i,d,e,t),o=e===`base`&&typeof a==`string`?a:a&&a[e];o&&r.push(o)}return r},o={};for(let e in t){let n=t[e];n!==void 0&&(o[e]=n)}let c=(e,n)=>{let r=typeof t?.[e]==`object`?{[e]:t[e]?.initial}:{};return{...f,...o,...r,...n}},m=(e=[],t)=>{let n=[],r=e.length;for(let i=0;i<r;i++){let{class:r,className:a,...o}=e[i],s=!0,l=c(null,t);for(let e in o){let t=o[e],n=l[e];if(Array.isArray(t)){if(!t.includes(n)){s=!1;break}}else{if((t==null||t===!1)&&(n==null||n===!1))continue;if(n!==t){s=!1;break}}}s&&(r&&n.push(r),a&&n.push(a))}return n},_=t=>{let n=m(g,t);if(!Array.isArray(n))return n;let r={},i=e;for(let e=0;e<n.length;e++){let t=n[e];if(typeof t==`string`)r.base=i(r.base,t)(l);else if(typeof t==`object`)for(let e in t)r[e]=i(r[e],t[e])(l)}return r},v=e=>{if(s.length<1)return null;let t={},n=c(null,e);for(let e=0;e<s.length;e++){let{slots:r=[],class:i,className:a,...o}=s[e];if(!kp(o)){let e=!0;for(let t in o){let r=n[t],i=o[t];if(r===void 0||(Array.isArray(i)?!i.includes(r):i!==r)){e=!1;break}}if(!e)continue}for(let e=0;e<r.length;e++){let n=r[e];t[n]||(t[n]=[]),t[n].push([i,a])}}return t};if(!kp(i)||!p){let t={};if(typeof h==`object`&&!kp(h)){let n=e;for(let e in h)t[e]=t=>{let r=_(t),i=v(t);return n(h[e],a(e,t),r?r[e]:void 0,i?i[e]:void 0,t?.class,t?.className)(l)}}return t}return e(u,r(),m(g),t?.class,t?.className)(l)};return _.variantKeys=(()=>{if(!(!d||typeof d!=`object`))return Object.keys(d)})(),_.extend=r,_.base=u,_.slots=h,_.variants=d,_.defaultVariants=f,_.compoundSlots=s,_.compoundVariants=g,_};return{tv:t,createTV:e=>(n,r)=>t(n,r?Pp(e,r):e)}},zp=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Bp=(e,t)=>({classGroupId:e,validator:t}),Vp=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Hp=`-`,Up=[],Wp=`arbitrary..`,Gp=e=>{let t=Jp(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return qp(e);let n=e.split(Hp);return Kp(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?zp(i,t):t:i||Up}return n[e]||Up}}},Kp=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Kp(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Hp):e.slice(t).join(Hp),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},qp=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Wp+r:void 0})(),Jp=e=>{let{theme:t,classGroups:n}=e;return Yp(n,t)},Yp=(e,t)=>{let n=Vp();for(let r in e){let i=e[r];Xp(i,n,r,t)}return n},Xp=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Zp(i,t,n,r)}},Zp=(e,t,n,r)=>{if(typeof e==`string`){Qp(e,t,n);return}if(typeof e==`function`){$p(e,t,n,r);return}em(e,t,n,r)},Qp=(e,t,n)=>{let r=e===``?t:tm(t,e);r.classGroupId=n},$p=(e,t,n,r)=>{if(nm(e)){Xp(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Bp(n,e))},em=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Xp(o,tm(t,a),n,r)}},tm=(e,t)=>{let n=e,r=t.split(Hp),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Vp(),n.nextPart.set(t,i)),n=i}return n},nm=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,rm=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},im=`!`,am=`:`,om=[],sm=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),cm=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===am){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(im)?(c=s.slice(0,-1),l=!0):s.startsWith(im)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return sm(t,l,c,u)};if(t){let e=t+am,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):sm(om,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},lm=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},um=e=>({cache:rm(e.cacheSize),parseClassName:cm(e),sortModifiers:lm(e),...Gp(e)}),dm=/\s+/,fm=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(dm),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+im:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},pm=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=mm(n))&&(i&&(i+=` `),i+=r);return i},mm=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=mm(e[r]))&&(n&&(n+=` `),n+=t);return n},hm=(e,...t)=>{let n,r,i,a,o=o=>(n=um(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=fm(e,n);return i(e,a),a};return a=o,(...e)=>a(pm(...e))},gm=[],_m=e=>{let t=t=>t[e]||gm;return t.isThemeGetter=!0,t},vm=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ym=/^\((?:(\w[\w-]*):)?(.+)\)$/i,bm=/^\d+\/\d+$/,xm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sm=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Cm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Tm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Em=e=>bm.test(e),X=e=>!!e&&!Number.isNaN(Number(e)),Dm=e=>!!e&&Number.isInteger(Number(e)),Om=e=>e.endsWith(`%`)&&X(e.slice(0,-1)),km=e=>xm.test(e),Am=()=>!0,jm=e=>Sm.test(e)&&!Cm.test(e),Mm=()=>!1,Nm=e=>wm.test(e),Pm=e=>Tm.test(e),Fm=e=>!Z(e)&&!Q(e),Im=e=>Jm(e,Qm,Mm),Z=e=>vm.test(e),Lm=e=>Jm(e,$m,jm),Rm=e=>Jm(e,eh,X),zm=e=>Jm(e,Xm,Mm),Bm=e=>Jm(e,Zm,Pm),Vm=e=>Jm(e,nh,Nm),Q=e=>ym.test(e),Hm=e=>Ym(e,$m),Um=e=>Ym(e,th),Wm=e=>Ym(e,Xm),Gm=e=>Ym(e,Qm),Km=e=>Ym(e,Zm),qm=e=>Ym(e,nh,!0),Jm=(e,t,n)=>{let r=vm.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ym=(e,t,n=!1)=>{let r=ym.exec(e);return r?r[1]?t(r[1]):n:!1},Xm=e=>e===`position`||e===`percentage`,Zm=e=>e===`image`||e===`url`,Qm=e=>e===`length`||e===`size`||e===`bg-size`,$m=e=>e===`length`,eh=e=>e===`number`,th=e=>e===`family-name`,nh=e=>e===`shadow`,rh=()=>{let e=_m(`color`),t=_m(`font`),n=_m(`text`),r=_m(`font-weight`),i=_m(`tracking`),a=_m(`leading`),o=_m(`breakpoint`),s=_m(`container`),c=_m(`spacing`),l=_m(`radius`),u=_m(`shadow`),d=_m(`inset-shadow`),f=_m(`text-shadow`),p=_m(`drop-shadow`),m=_m(`blur`),h=_m(`perspective`),g=_m(`aspect`),_=_m(`ease`),v=_m(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Q,Z],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Q,Z,c],T=()=>[Em,`full`,`auto`,...w()],E=()=>[Dm,`none`,`subgrid`,Q,Z],D=()=>[`auto`,{span:[`full`,Dm,Q,Z]},Dm,Q,Z],O=()=>[Dm,`auto`,Q,Z],k=()=>[`auto`,`min`,`max`,`fr`,Q,Z],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ee=()=>[`auto`,...w()],M=()=>[Em,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[e,Q,Z],te=()=>[...b(),Wm,zm,{position:[Q,Z]}],P=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],F=()=>[`auto`,`cover`,`contain`,Gm,Im,{size:[Q,Z]}],ne=()=>[Om,Hm,Lm],re=()=>[``,`none`,`full`,l,Q,Z],ie=()=>[``,X,Hm,Lm],ae=()=>[`solid`,`dashed`,`dotted`,`double`],I=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],L=()=>[X,Om,Wm,zm],oe=()=>[``,`none`,m,Q,Z],se=()=>[`none`,X,Q,Z],ce=()=>[`none`,X,Q,Z],le=()=>[X,Q,Z],ue=()=>[Em,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[km],breakpoint:[km],color:[Am],container:[km],"drop-shadow":[km],ease:[`in`,`out`,`in-out`],font:[Fm],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[km],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[km],shadow:[km],spacing:[`px`,X],text:[km],"text-shadow":[km],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Em,Z,Q,g]}],container:[`container`],columns:[{columns:[X,Z,Q,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Dm,`auto`,Q,Z]}],basis:[{basis:[Em,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[X,Em,`auto`,`initial`,`none`,Z]}],grow:[{grow:[``,X,Q,Z]}],shrink:[{shrink:[``,X,Q,Z]}],order:[{order:[Dm,`first`,`last`,`none`,Q,Z]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:M()}],w:[{w:[s,`screen`,...M()]}],"min-w":[{"min-w":[s,`screen`,`none`,...M()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...M()]}],h:[{h:[`screen`,`lh`,...M()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...M()]}],"max-h":[{"max-h":[`screen`,`lh`,...M()]}],"font-size":[{text:[`base`,n,Hm,Lm]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Q,Rm]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Om,Z]}],"font-family":[{font:[Um,Z,t]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Q,Z]}],"line-clamp":[{"line-clamp":[X,`none`,Q,Rm]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Q,Z]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Q,Z]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ae(),`wavy`]}],"text-decoration-thickness":[{decoration:[X,`from-font`,`auto`,Q,Lm]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[X,`auto`,Q,Z]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Q,Z]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Q,Z]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:F()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Dm,Q,Z],radial:[``,Q,Z],conic:[Dm,Q,Z]},Km,Bm]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ae(),`hidden`,`none`]}],"divide-style":[{divide:[...ae(),`hidden`,`none`]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...ae(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[X,Q,Z]}],"outline-w":[{outline:[``,X,Hm,Lm]}],"outline-color":[{outline:N()}],shadow:[{shadow:[``,`none`,u,qm,Vm]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":[`none`,d,qm,Vm]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:ie()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[X,Lm]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":[`none`,f,qm,Vm]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[X,Q,Z]}],"mix-blend":[{"mix-blend":[...I(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":I()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[X]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[Q,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[X]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Q,Z]}],filter:[{filter:[``,`none`,Q,Z]}],blur:[{blur:oe()}],brightness:[{brightness:[X,Q,Z]}],contrast:[{contrast:[X,Q,Z]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,qm,Vm]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:[``,X,Q,Z]}],"hue-rotate":[{"hue-rotate":[X,Q,Z]}],invert:[{invert:[``,X,Q,Z]}],saturate:[{saturate:[X,Q,Z]}],sepia:[{sepia:[``,X,Q,Z]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Q,Z]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[X,Q,Z]}],"backdrop-contrast":[{"backdrop-contrast":[X,Q,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,X,Q,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[X,Q,Z]}],"backdrop-invert":[{"backdrop-invert":[``,X,Q,Z]}],"backdrop-opacity":[{"backdrop-opacity":[X,Q,Z]}],"backdrop-saturate":[{"backdrop-saturate":[X,Q,Z]}],"backdrop-sepia":[{"backdrop-sepia":[``,X,Q,Z]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Q,Z]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[X,`initial`,Q,Z]}],ease:[{ease:[`linear`,`initial`,_,Q,Z]}],delay:[{delay:[X,Q,Z]}],animate:[{animate:[`none`,v,Q,Z]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Q,Z]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":[`scale-3d`],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[Q,Z,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":[`translate-none`],accent:[{accent:N()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Q,Z]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Q,Z]}],fill:[{fill:[`none`,...N()]}],"stroke-w":[{stroke:[X,Hm,Lm,Rm]}],stroke:[{stroke:[`none`,...N()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},ih=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:a={}})=>(ah(e,`cacheSize`,t),ah(e,`prefix`,n),ah(e,`experimentalParseClassName`,r),oh(e.theme,a.theme),oh(e.classGroups,a.classGroups),oh(e.conflictingClassGroups,a.conflictingClassGroups),oh(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),ah(e,`orderSensitiveModifiers`,a.orderSensitiveModifiers),sh(e.theme,i.theme),sh(e.classGroups,i.classGroups),sh(e.conflictingClassGroups,i.conflictingClassGroups),sh(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),ch(e,i,`orderSensitiveModifiers`),e),ah=(e,t,n)=>{n!==void 0&&(e[t]=n)},oh=(e,t)=>{if(t)for(let n in t)ah(e,n,t[n])},sh=(e,t)=>{if(t)for(let n in t)ch(e,t,n)},ch=(e,t,n)=>{let r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},lh=(e,...t)=>typeof e==`function`?hm(rh,e,...t):hm(()=>ih(rh(),e),...t),uh=hm(rh),dh=e=>kp(e)?uh:lh({...e,extend:{theme:e.theme,classGroups:e.classGroups,conflictingClassGroupModifiers:e.conflictingClassGroupModifiers,conflictingClassGroups:e.conflictingClassGroups,...e.extend}}),fh=(e,t)=>{let n=Dp(e);return!n||!(t?.twMerge??!0)?n:((!Lp.cachedTwMerge||Lp.didTwMergeConfigChange)&&(Lp.didTwMergeConfigChange=!1,Lp.cachedTwMerge=dh(Lp.cachedTwMergeConfig)),Lp.cachedTwMerge(n)||void 0)},{createTV:ph,tv:mh}=Rp((...e)=>t=>fh(e,t)),hh=mh({defaultVariants:{status:`default`},slots:{base:`alert`,content:`alert__content`,description:`alert__description`,indicator:`alert__indicator`,title:`alert__title`},variants:{status:{accent:{base:`alert--accent`},danger:{base:`alert--danger`},default:{base:`alert--default`},success:{base:`alert--success`},warning:{base:`alert--warning`}}}}),gh=mh({defaultVariants:{size:`md`,status:`danger`,variant:`opaque`},slots:{backdrop:`alert-dialog__backdrop`,body:`alert-dialog__body`,closeTrigger:`alert-dialog__close-trigger`,container:`alert-dialog__container`,dialog:`alert-dialog__dialog`,footer:`alert-dialog__footer`,header:`alert-dialog__header`,heading:`alert-dialog__heading`,icon:`alert-dialog__icon`,trigger:`alert-dialog__trigger`},variants:{size:{cover:{dialog:`alert-dialog__dialog--cover`},lg:{dialog:`alert-dialog__dialog--lg`},md:{dialog:`alert-dialog__dialog--md`},sm:{dialog:`alert-dialog__dialog--sm`},xs:{dialog:`alert-dialog__dialog--xs`}},status:{accent:{icon:`alert-dialog__icon--accent`},danger:{icon:`alert-dialog__icon--danger`},default:{icon:`alert-dialog__icon--default`},success:{icon:`alert-dialog__icon--success`},warning:{icon:`alert-dialog__icon--warning`}},variant:{blur:{backdrop:`alert-dialog__backdrop--blur`},opaque:{backdrop:`alert-dialog__backdrop--opaque`},transparent:{backdrop:`alert-dialog__backdrop--transparent`}}}}),_h=mh({base:`button`,defaultVariants:{fullWidth:!1,isIconOnly:!1,size:`md`,variant:`primary`},variants:{fullWidth:{false:``,true:`button--full-width`},isIconOnly:{true:`button--icon-only`},size:{lg:`button--lg`,md:`button--md`,sm:`button--sm`},variant:{danger:`button--danger`,"danger-soft":`button--danger-soft`,ghost:`button--ghost`,outline:`button--outline`,primary:`button--primary`,secondary:`button--secondary`,tertiary:`button--tertiary`}}}),vh=mh({base:`close-button`,defaultVariants:{variant:`default`},variants:{variant:{default:`close-button--default`}}}),yh=Symbol(`default`);function bh({values:e,children:t}){for(let[n,r]of e)t=g.createElement(n.Provider,{value:r},t);return t}function xh(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s,render:c}=e;return(0,g.useMemo)(()=>{let e,l,u;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,l=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,u=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:l||o?{...o,...l}:void 0,children:u??a,"data-rac":``,render:c?e=>c(e,s):void 0}},[t,n,r,i,a,o,s,c])}function Sh(e,t){return n=>t(typeof e==`function`?e(n):e,n)}function Ch(e,t){let n=(0,g.useContext)(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||yh;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function wh(e,t,n){let{ref:r,...i}=Ch(n,e.slot)||{},a=Gf((0,g.useMemo)(()=>Ef(t,r),[t,r])),o=Af(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(typeof i.style==`function`||typeof e.style==`function`?o.style=t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:o.style={...i.style,...e.style}),[o,a]}function Th(e,t,n){let{render:r,...i}=t,a=(0,g.useRef)(null),o=(0,g.useMemo)(()=>Ef(n,a),[n,a]);qd(()=>{},[e,r]);let s={...i,ref:o};return r?r(s,void 0):g.createElement(e,s)}var Eh={},Dh=new Proxy({},{get(e,t){if(typeof t!=`string`)return;let n=Eh[t];return n||(n=(0,g.forwardRef)(Th.bind(null,t)),Eh[t]=n),n}});typeof HTMLTemplateElement<`u`&&(Object.defineProperty(HTMLTemplateElement.prototype,`firstChild`,{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,`appendChild`,{configurable:!0,enumerable:!0,value:function(e){return this.content.appendChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,`removeChild`,{configurable:!0,enumerable:!0,value:function(e){return this.content.removeChild(e)}}),Object.defineProperty(HTMLTemplateElement.prototype,`insertBefore`,{configurable:!0,enumerable:!0,value:function(e,t){return this.content.insertBefore(e,t)}}));var Oh=(0,g.createContext)(!1);function kh(e){let t=(t,n)=>(0,g.useContext)(Oh)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,g.forwardRef)(t)}var Ah=new Set([`Arab`,`Syrc`,`Samr`,`Mand`,`Thaa`,`Mend`,`Nkoo`,`Adlm`,`Rohg`,`Hebr`]),jh=new Set([`ae`,`ar`,`arc`,`bcc`,`bqi`,`ckb`,`dv`,`fa`,`glk`,`he`,`ku`,`mzn`,`nqo`,`pnb`,`ps`,`sd`,`ug`,`ur`,`yi`]);function Mh(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n=typeof t.getTextInfo==`function`?t.getTextInfo():t.textInfo;if(n)return n.direction===`rtl`;if(t.script)return Ah.has(t.script)}let t=e.split(`-`)[0];return jh.has(t)}var Nh=Symbol.for(`react-aria.i18n.locale`);function Ph(){let e=typeof window<`u`&&window[Nh]||typeof navigator<`u`&&(navigator.language||navigator.userLanguage)||`en-US`;try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e=`en-US`}return{locale:e,direction:Mh(e)?`rtl`:`ltr`}}var Fh=Ph(),Ih=new Set;function Lh(){Fh=Ph();for(let e of Ih)e(Fh)}function Rh(){let e=of(),[t,n]=(0,g.useState)(Fh);return(0,g.useEffect)(()=>(Ih.size===0&&window.addEventListener(`languagechange`,Lh),Ih.add(n),()=>{Ih.delete(n),Ih.size===0&&window.removeEventListener(`languagechange`,Lh)}),[]),e?{locale:typeof window<`u`&&window[Nh]||`en-US`,direction:`ltr`}:t}var zh=g.createContext(null);function Bh(){let e=Rh();return(0,g.useContext)(zh)||e}var Vh=(0,g.createContext)(null),Hh=7e3,Uh=null;function Wh(e,t=`assertive`,n=Hh){Uh?Uh.announce(e,t,n):(Uh=new Gh,(typeof IS_REACT_ACT_ENVIRONMENT==`boolean`?IS_REACT_ACT_ENVIRONMENT:typeof jest<`u`)?Uh.announce(e,t,n):setTimeout(()=>{Uh?.isAttached()&&Uh?.announce(e,t,n)},100))}var Gh=class{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<`u`&&(this.node=document.createElement(`div`),this.node.dataset.liveAnnouncer=`true`,Object.assign(this.node.style,{border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`}),this.assertiveLog=this.createLog(`assertive`),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog(`polite`),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement(`div`);return t.setAttribute(`role`,`log`),t.setAttribute(`aria-live`,e),t.setAttribute(`aria-relevant`,`additions`),t}destroy(){this.node&&=(document.body.removeChild(this.node),null)}announce(e,t=`assertive`,n=Hh){if(!this.node)return;let r=document.createElement(`div`);typeof e==`object`?(r.setAttribute(`role`,`img`),r.setAttribute(`aria-labelledby`,e[`aria-labelledby`])):r.textContent=e,t===`assertive`?this.assertiveLog?.appendChild(r):this.politeLog?.appendChild(r),e!==``&&setTimeout(()=>{r.remove()},n)}clear(e){this.node&&((!e||e===`assertive`)&&this.assertiveLog&&(this.assertiveLog.innerHTML=``),(!e||e===`polite`)&&this.politeLog&&(this.politeLog.innerHTML=``))}};function Kh(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function qh(e,t){Object.defineProperty(e,`target`,{value:t}),Object.defineProperty(e,`currentTarget`,{value:t})}function Jh(e){let t=(0,g.useRef)({isFocused:!1,observer:null});return qd(()=>{let e=t.current;return()=>{e.observer&&=(e.observer.disconnect(),null)}},[]),(0,g.useCallback)(n=>{let r=Y(n);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r;n.addEventListener(`focusout`,r=>{if(t.current.isFocused=!1,n.disabled){let t=Kh(r);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){t.current.observer?.disconnect();let e=n===Sf()?null:Sf();n.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:e})),n.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:[`disabled`]})}},[e])}var Yh=!1;function Xh(e){for(;e&&!gp(e,{skipVisibilityCheck:!0});)e=e.parentElement;let t=gf(e),n=t.document.activeElement;if(!n||n===e)return;Yh=!0;let r=!1,i=e=>{(Y(e)===n||r)&&e.stopImmediatePropagation()},a=t=>{(Y(t)===n||r)&&(t.stopImmediatePropagation(),!e&&!r&&(r=!0,Vd(n),c()))},o=t=>{(Y(t)===e||r)&&t.stopImmediatePropagation()},s=t=>{(Y(t)===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,Vd(n),c()))};t.addEventListener(`blur`,i,!0),t.addEventListener(`focusout`,a,!0),t.addEventListener(`focusin`,s,!0),t.addEventListener(`focus`,o,!0);let c=()=>{cancelAnimationFrame(l),t.removeEventListener(`blur`,i,!0),t.removeEventListener(`focusout`,a,!0),t.removeEventListener(`focusin`,s,!0),t.removeEventListener(`focus`,o,!0),Yh=!1,r=!1},l=requestAnimationFrame(c);return c}var Zh=null,Qh=new Set,$h=new Map,eg=!1,tg=!1,ng={Tab:!0,Escape:!0};function rg(e,t){for(let n of Qh)n(e,t)}function ig(e){return!(e.metaKey||!Nd()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}function ag(e){eg=!0,!Kd.isOpening&&ig(e)&&(Zh=`keyboard`,rg(`keyboard`,e))}function og(e){Zh=`pointer`,`pointerType`in e&&e.pointerType,(e.type===`mousedown`||e.type===`pointerdown`)&&(eg=!0,rg(`pointer`,e))}function sg(e){!Kd.isOpening&&ip(e)&&(eg=!0,Zh=`virtual`)}function cg(e){let t=gf(Y(e)),n=hf(Y(e));Y(e)===t||Y(e)===n||Yh||!e.isTrusted||(!eg&&!tg&&(Zh=`virtual`,rg(`virtual`,e)),eg=!1,tg=!1)}function lg(){Yh||(eg=!1,tg=!0)}function ug(e){if(typeof window>`u`||typeof document>`u`)return;let t=gf(e),n=hf(e);if($h.get(t))return;let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){eg=!0,r.apply(this,arguments)},n.addEventListener(`keydown`,ag,!0),n.addEventListener(`keyup`,ag,!0),n.addEventListener(`click`,sg,!0),t.addEventListener(`focus`,cg,!0),t.addEventListener(`blur`,lg,!1),typeof PointerEvent<`u`&&(n.addEventListener(`pointerdown`,og,!0),n.addEventListener(`pointermove`,og,!0),n.addEventListener(`pointerup`,og,!0)),t.addEventListener(`beforeunload`,()=>{dg(e)},{once:!0}),$h.set(t,{focus:r})}var dg=(e,t)=>{let n=gf(e),r=hf(e);t&&r.removeEventListener(`DOMContentLoaded`,t),$h.has(n)&&(n.HTMLElement.prototype.focus=$h.get(n).focus,r.removeEventListener(`keydown`,ag,!0),r.removeEventListener(`keyup`,ag,!0),r.removeEventListener(`click`,sg,!0),n.removeEventListener(`focus`,cg,!0),n.removeEventListener(`blur`,lg,!1),typeof PointerEvent<`u`&&(r.removeEventListener(`pointerdown`,og,!0),r.removeEventListener(`pointermove`,og,!0),r.removeEventListener(`pointerup`,og,!0)),$h.delete(n))};function fg(e){let t=hf(e),n;return t.readyState===`loading`?(n=()=>{ug(e)},t.addEventListener(`DOMContentLoaded`,n)):ug(e),()=>dg(e,n)}typeof document<`u`&&fg();function pg(){return Zh!==`pointer`}function mg(){return Zh}var hg=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function gg(e,t,n){let r=n?Y(n):void 0,i=hf(r),a=gf(r),o=a===void 0?HTMLInputElement:a.HTMLInputElement,s=a===void 0?HTMLTextAreaElement:a.HTMLTextAreaElement,c=a===void 0?HTMLElement:a.HTMLElement,l=a===void 0?KeyboardEvent:a.KeyboardEvent,u=Sf(i);return e=e||u instanceof o&&!hg.has(u.type)||u instanceof s||u instanceof c&&u.isContentEditable,!(e&&t===`keyboard`&&n instanceof l&&!ng[n.key])}function _g(e,t,n){ug(),(0,g.useEffect)(()=>{if(n?.enabled===!1)return;let t=(t,r)=>{gg(!!n?.isTextInput,t,r)&&e(pg())};return Qh.add(t),()=>{Qh.delete(t)}},t)}function vg(e){if(!e.isConnected)return;let t=hf(e);if(mg()===`virtual`){let n=Sf(t);Hf(()=>{let r=Sf(t);(r===n||r===t.body)&&e.isConnected&&Vd(e)})}else Vd(e)}function yg(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e,a=(0,g.useCallback)(e=>{if(Y(e)===e.currentTarget)return r&&r(e),i&&i(!1),!0},[r,i]),o=Jh(a),s=(0,g.useCallback)(e=>{let t=Y(e),r=hf(t),a=r?Sf(r):Sf();t===e.currentTarget&&t===a&&(n&&n(e),i&&i(!0),o(e))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?a:void 0}}}function bg(e){if(!e)return;let t=!0;return n=>{e({...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}}),t&&n.stopPropagation()}}function xg(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:bg(e.onKeyDown),onKeyUp:bg(e.onKeyUp)}}}var Sg=g.createContext(null);function Cg(e){let t=(0,g.useContext)(Sg)||{};Xf(t,e);let{ref:n,...r}=t;return r}function wg(e,t){let{focusProps:n}=yg(e),{keyboardProps:r}=xg(e),i=Af(n,r),a=Cg(t),o=e.isDisabled?{}:a,s=(0,g.useRef)(e.autoFocus);(0,g.useEffect)(()=>{s.current&&t.current&&vg(t.current),s.current=!1},[t]);let c=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(c=void 0),{focusableProps:Af({...i,tabIndex:c},o)}}var Tg=`default`,Eg=``,Dg=new WeakMap;function Og(e){if(Id()){if(Tg===`default`){let t=hf(e);Eg=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect=`none`}Tg=`disabled`}else if(e instanceof HTMLElement||e instanceof SVGElement){let t=`userSelect`in e.style?`userSelect`:`webkitUserSelect`;Dg.set(e,e.style[t]),e.style[t]=`none`}}function kg(e){if(Id()){if(Tg!==`disabled`)return;Tg=`restoring`,setTimeout(()=>{Hf(()=>{if(Tg===`restoring`){let t=hf(e);t.documentElement.style.webkitUserSelect===`none`&&(t.documentElement.style.webkitUserSelect=Eg||``),Eg=``,Tg=`default`}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&Dg.has(e)){let t=Dg.get(e),n=`userSelect`in e.style?`userSelect`:`webkitUserSelect`;e.style[n]===`none`&&(e.style[n]=t),e.getAttribute(`style`)===``&&e.removeAttribute(`style`),Dg.delete(e)}}var Ag=g.createContext({register:()=>{}});Ag.displayName=`PressResponderContext`;function jg(e){let t=(0,g.useContext)(Ag);if(t){let{register:n,ref:r,...i}=t;e=Af(i,e),n()}return Xf(t,e.ref),e}var Mg=class{#e;constructor(e,t,n,r){this.#e=!0;let i=(r?.target??n.currentTarget)?.getBoundingClientRect(),a,o=0,s,c=null;n.clientX!=null&&n.clientY!=null&&(s=n.clientX,c=n.clientY),i&&(s!=null&&c!=null?(a=s-i.left,o=c-i.top):(a=i.width/2,o=i.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=a,this.y=o,this.key=n.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}},Ng=Symbol(`linkClicked`),Pg=`react-aria-pressable-style`,Fg=`data-react-aria-pressable`;function Ig(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:a,onClick:o,isDisabled:s,isPressed:c,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:d,ref:f,...p}=jg(e),[m,h]=(0,g.useState)(!1),_=(0,g.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:v,removeAllGlobalListeners:y}=Uf(),b=(0,g.useCallback)((e,t)=>{let i=_.current;if(s||i.didFirePressStart)return!1;let a=!0;if(i.isTriggeringEvent=!0,r){let n=new Mg(`pressstart`,t,e);r(n),a=n.shouldStopPropagation}return n&&n(!0),i.isTriggeringEvent=!1,i.didFirePressStart=!0,h(!0),a},[s,r,n]),x=(0,g.useCallback)((e,r,a=!0)=>{let o=_.current;if(!o.didFirePressStart)return!1;o.didFirePressStart=!1,o.isTriggeringEvent=!0;let c=!0;if(i){let t=new Mg(`pressend`,r,e);i(t),c=t.shouldStopPropagation}if(n&&n(!1),h(!1),t&&a&&!s){let n=new Mg(`press`,r,e);t(n),c&&=n.shouldStopPropagation}return o.isTriggeringEvent=!1,c},[s,i,n,t]),S=qf(x),C=qf((0,g.useCallback)((e,t)=>{let n=_.current;if(s)return!1;if(a){n.isTriggeringEvent=!0;let r=new Mg(`pressup`,t,e);return a(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0},[s,a])),w=(0,g.useCallback)(e=>{let t=_.current;if(t.isPressed&&t.target){t.didFirePressStart&&t.pointerType!=null&&x(zg(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,y(),d||kg(t.target);for(let e of t.disposables)e();t.disposables=[]}},[d,y,x]),T=qf(w),E=(0,g.useCallback)(e=>{u&&w(e)},[u,w]),D=(0,g.useCallback)(e=>{s||o?.(e)},[s,o]),O=(0,g.useCallback)((e,t)=>{if(!s&&o){let n=new MouseEvent(`click`,e);qh(n,t),o(Kh(n))}},[s,o]),k=(0,g.useMemo)(()=>{let e=_.current,t={onKeyDown(t){if(Rg(t.nativeEvent,t.currentTarget)&&xf(t.currentTarget,Y(t))){Vg(Y(t),t.key)&&t.preventDefault();let r=!0;!e.isPressed&&!t.repeat&&(e.target=t.currentTarget,e.isPressed=!0,e.pointerType=`keyboard`,r=b(t,`keyboard`));let i=t.currentTarget;v(hf(t.currentTarget),`keyup`,mf(t=>{Rg(t,i)&&!t.repeat&&xf(i,Y(t))&&e.target&&C(zg(e.target,t),`keyboard`)},n),!0),r&&t.stopPropagation(),t.metaKey&&Nd()&&e.metaKeyEvents?.set(t.key,t.nativeEvent)}else t.key===`Meta`&&(e.metaKeyEvents=new Map)},onClick(t){if(!(t&&!xf(t.currentTarget,Y(t)))&&t&&t.button===0&&!e.isTriggeringEvent&&!Kd.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&(e.pointerType===`virtual`||ip(t.nativeEvent))){let e=b(t,`virtual`),r=C(t,`virtual`),i=S(t,`virtual`);D(t),n=e&&r&&i}else if(e.isPressed&&e.pointerType!==`keyboard`){let r=e.pointerType||t.nativeEvent.pointerType||`virtual`,i=C(zg(t.currentTarget,t),r),a=S(zg(t.currentTarget,t),r,!0);n=i&&a,e.isOverTarget=!1,D(t),T(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{if(e.isPressed&&e.target&&Rg(t,e.target)){Vg(Y(t),t.key)&&t.preventDefault();let n=Y(t),r=xf(e.target,n);S(zg(e.target,t),`keyboard`,r),r&&O(t,e.target),y(),t.key!==`Enter`&&Lg(e.target)&&xf(e.target,n)&&!t[Ng]&&(t[Ng]=!0,Kd(e.target,t,!1)),e.isPressed=!1,e.metaKeyEvents?.delete(t.key)}else if(t.key===`Meta`&&e.metaKeyEvents?.size){let t=e.metaKeyEvents;e.metaKeyEvents=void 0;for(let n of t.values())e.target?.dispatchEvent(new KeyboardEvent(`keyup`,n))}};if(typeof PointerEvent<`u`){t.onPointerDown=t=>{if(t.button!==0||!xf(t.currentTarget,Y(t)))return;if(ap(t.nativeEvent)){e.pointerType=`virtual`;return}e.pointerType=t.pointerType;let i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||Og(e.target),i=b(t,e.pointerType);let a=Y(t);`releasePointerCapture`in a&&(`hasPointerCapture`in a?a.hasPointerCapture(t.pointerId)&&a.releasePointerCapture(t.pointerId):a.releasePointerCapture(t.pointerId)),v(hf(t.currentTarget),`pointerup`,n,!1),v(hf(t.currentTarget),`pointercancel`,r,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(xf(t.currentTarget,Y(t))&&t.button===0){if(l){let n=Xh(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{!xf(t.currentTarget,Y(t))||e.pointerType===`virtual`||t.button===0&&!e.isPressed&&C(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,b(zg(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,S(zg(e.target,t),e.pointerType,!1),E(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&t.button===0&&e.target){if(xf(e.target,Y(t))&&e.pointerType!=null){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?T(t):(Vd(e.target),e.target.click()))},80);v(t.currentTarget,`click`,()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else T(t);e.isOverTarget=!1}},r=e=>{T(e)};t.onDragStart=e=>{xf(e.currentTarget,Y(e))&&T(e)}}return t},[v,s,l,y,d,E,b,D,O]);return(0,g.useEffect)(()=>{if(!f)return;let e=hf(f.current);if(!e||!e.head||e.getElementById(Pg))return;let t=e.createElement(`style`);t.id=Pg;let n=xp(e);n&&(t.nonce=n),t.textContent=`
@layer {
[${Fg}] {
touch-action: pan-x pan-y pinch-zoom;
}
}
`.trim(),e.head.prepend(t)},[f]),(0,g.useEffect)(()=>{let e=_.current;return()=>{d||kg(e.target??void 0);for(let t of e.disposables)t();e.disposables=[]}},[d]),{isPressed:c||m,pressProps:Af(p,k,{[Fg]:!0})}}function Lg(e){return e.tagName===`A`&&e.hasAttribute(`href`)}function Rg(e,t){let{key:n,code:r}=e,i=t,a=i.getAttribute(`role`);return(n===`Enter`||n===` `||n===`Spacebar`||r===`Space`)&&!(i instanceof gf(i).HTMLInputElement&&!Ug(i,n)||i instanceof gf(i).HTMLTextAreaElement||i.isContentEditable)&&!((a===`link`||!a&&Lg(i))&&n!==`Enter`)}function zg(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r,key:t.key}}function Bg(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!==`submit`&&e.type!==`reset`:!Lg(e)}function Vg(e,t){return e instanceof HTMLInputElement?!Ug(e,t):Bg(e)}var Hg=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function Ug(e,t){return e.type===`checkbox`||e.type===`radio`?t===` `:Hg.has(e.type)}function Wg(e,t){let{elementType:n=`button`,isDisabled:r,onPress:i,onPressStart:a,onPressEnd:o,onPressUp:s,onPressChange:c,preventFocusOnPress:l,allowFocusWhenDisabled:u,onClick:d,href:f,target:p,rel:m,type:h=`button`}=e,g;g=n===`button`?{type:h,disabled:r,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:`button`,href:n===`a`&&!r?f:void 0,target:n===`a`?p:void 0,type:n===`input`?h:void 0,disabled:n===`input`?r:void 0,"aria-disabled":!r||n===`input`?void 0:r,rel:n===`a`?m:void 0};let{pressProps:_,isPressed:v}=Ig({onPressStart:a,onPressEnd:o,onPressChange:c,onPress:i,onPressUp:s,onClick:d,isDisabled:r,preventFocusOnPress:l,ref:t}),{focusableProps:y}=wg(e,t);u&&(y.tabIndex=r?-1:y.tabIndex);let b=Af(y,_,Lf(e,{labelable:!0}));return{isPressed:v,buttonProps:Af(g,b,{"aria-haspopup":e[`aria-haspopup`],"aria-expanded":e[`aria-expanded`],"aria-controls":e[`aria-controls`],"aria-pressed":e[`aria-pressed`],"aria-current":e[`aria-current`],"aria-disabled":e[`aria-disabled`]})}}function Gg(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=(0,g.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=Uf(),c=(0,g.useCallback)(e=>{xf(e.currentTarget,Y(e))&&a.current.isFocusWithin&&!xf(e.currentTarget,e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(e),i&&i(!1))},[n,i,a,s]),l=Jh(c),u=(0,g.useCallback)(e=>{if(!xf(e.currentTarget,Y(e)))return;let t=Y(e),n=hf(t),s=Sf(n);if(!a.current.isFocusWithin&&s===t){r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,l(e);let t=e.currentTarget;o(n,`focus`,e=>{let r=Y(e);if(a.current.isFocusWithin&&!xf(t,r)){let e=new n.defaultView.FocusEvent(`blur`,{relatedTarget:r});qh(e,t),c(Kh(e))}},{capture:!0})}},[r,i,l,o,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:c}}}function Kg(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=(0,g.useRef)({isFocused:!1,isFocusVisible:t||pg()}),[a,o]=(0,g.useState)(!1),[s,c]=(0,g.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),l=(0,g.useCallback)(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),u=(0,g.useCallback)(e=>{i.current.isFocused=e,i.current.isFocusVisible=pg(),o(e),l()},[l]);_g(e=>{i.current.isFocusVisible=e,l()},[n,a],{enabled:a,isTextInput:n});let{focusProps:d}=yg({isDisabled:r,onFocusChange:u}),{focusWithinProps:f}=Gg({isDisabled:!r,onFocusWithinChange:u});return{isFocused:a,isFocusVisible:s,focusProps:r?f:d}}var qg=!1,Jg=0;function Yg(){qg=!0,setTimeout(()=>{qg=!1},500)}function Xg(e){e.pointerType===`touch`&&Yg()}function Zg(){let e=hf(null);if(e!==void 0)return Jg===0&&typeof PointerEvent<`u`&&e.addEventListener(`pointerup`,Xg),Jg++,()=>{Jg--,!(Jg>0)&&typeof PointerEvent<`u`&&e.removeEventListener(`pointerup`,Xg)}}function Qg(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,o]=(0,g.useState)(!1),s=(0,g.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:``,target:null}).current;(0,g.useEffect)(Zg,[]);let{addGlobalListener:c,removeAllGlobalListeners:l}=Uf(),{hoverProps:u,triggerHoverEnd:d}=(0,g.useMemo)(()=>{let e=(e,r)=>{if(s.pointerType=r,i||r===`touch`||s.isHovered||!xf(e.currentTarget,Y(e)))return;s.isHovered=!0;let l=e.currentTarget;s.target=l,c(hf(Y(e)),`pointerover`,e=>{s.isHovered&&s.target&&!xf(s.target,Y(e))&&a(e,e.pointerType)},{capture:!0}),t&&t({type:`hoverstart`,target:l,pointerType:r}),n&&n(!0),o(!0)},a=(e,t)=>{let i=s.target;s.pointerType=``,s.target=null,!(t===`touch`||!s.isHovered||!i)&&(s.isHovered=!1,l(),r&&r({type:`hoverend`,target:i,pointerType:t}),n&&n(!1),o(!1))},u={};return typeof PointerEvent<`u`&&(u.onPointerEnter=t=>{qg&&t.pointerType===`mouse`||e(t,t.pointerType)},u.onPointerLeave=e=>{!i&&xf(e.currentTarget,Y(e))&&a(e,e.pointerType)}),{hoverProps:u,triggerHoverEnd:a}},[t,n,r,i,s,c,l]);return(0,g.useEffect)(()=>{i&&d({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:u,isHovered:a}}var $g=(0,g.createContext)({}),e_=kh(function(e,t){[e,t]=wh(e,t,$g);let n=e,{isPending:r}=n,{buttonProps:i,isPressed:a}=Wg(e,t);i=n_(i,r);let{focusProps:o,isFocused:s,isFocusVisible:c}=Kg(e),{hoverProps:l,isHovered:u}=Qg({...e,isDisabled:e.isDisabled||r}),d={isHovered:u,isPressed:(n.isPressed||a)&&!r,isFocused:s,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:r??!1},f=xh({...e,values:d,defaultClassName:`react-aria-Button`}),p=df(i.id),m=df(),h=i[`aria-labelledby`];r&&(h?h=`${h} ${m}`:i[`aria-label`]&&(h=`${p} ${m}`));let _=(0,g.useRef)(r);(0,g.useEffect)(()=>{let e={"aria-labelledby":h||p};(!_.current&&s&&r||_.current&&s&&!r)&&Wh(e,`assertive`),_.current=r},[r,s,h,p]);let v=Lf(e,{global:!0});return delete v.onClick,g.createElement(Dh.button,{...Af(v,f,i,o,l),type:i.type===`submit`&&r?`button`:i.type,id:p,ref:t,"aria-labelledby":h,slot:e.slot||void 0,"aria-disabled":r?`true`:i[`aria-disabled`],"data-disabled":e.isDisabled||void 0,"data-pressed":d.isPressed||void 0,"data-hovered":u||void 0,"data-focused":s||void 0,"data-pending":r||void 0,"data-focus-visible":c||void 0},g.createElement(Vh.Provider,{value:{id:m}},f.children))}),t_=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;function n_(e,t){if(t){for(let t in e)t.startsWith(`on`)&&!t_.test(t)&&(e[t]=void 0);e.href=void 0,e.target=void 0}return e}var r_=typeof document<`u`?g.useInsertionEffect??g.useLayoutEffect:()=>{};function i_(e,t,n){let[r,i]=(0,g.useState)(e||t),a=(0,g.useRef)(r),o=(0,g.useRef)(e!==void 0),s=e!==void 0;(0,g.useEffect)(()=>{o.current,o.current=s},[s]);let c=s?e:r;r_(()=>{a.current=c});let[,l]=(0,g.useReducer)(()=>({}),{});return[c,(0,g.useCallback)((e,...t)=>{let r=typeof e==`function`?e(a.current):e;Object.is(a.current,r)||(a.current=r,i(r),l(),n?.(r,...t))},[n])]}var a_=(0,g.createContext)({}),o_=(0,g.forwardRef)(function(e,t){[e,t]=wh(e,t,a_);let{children:n,level:r=3,className:i,...a}=e,o=Dh[`h${r}`];return g.createElement(o,{...a,ref:t,className:i??`react-aria-Heading`},n)});function s_(e,t){return Sh(e,(e,n)=>Dp(typeof t==`function`?t(n)??``:t??``,e??``)??``)}var c_=(e,t,n)=>typeof e==`function`?e({...n??{},className:t}):t,l_=e=>(0,J.jsx)(`svg`,{"aria-hidden":`true`,"aria-label":`Close icon`,fill:`none`,height:16,role:`presentation`,viewBox:`0 0 16 16`,width:16,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,J.jsx)(`path`,{clipRule:`evenodd`,d:`M3.47 3.47a.75.75 0 0 1 1.06 0L8 6.94l3.47-3.47a.75.75 0 1 1 1.06 1.06L9.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06L8 9.06l-3.47 3.47a.75.75 0 0 1-1.06-1.06L6.94 8 3.47 4.53a.75.75 0 0 1 0-1.06Z`,fill:`currentColor`,fillRule:`evenodd`})}),u_=e=>(0,J.jsx)(`svg`,{"aria-hidden":`true`,"aria-label":`Info icon`,fill:`none`,height:16,role:`presentation`,viewBox:`0 0 16 16`,width:16,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,J.jsx)(`path`,{clipRule:`evenodd`,d:`M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z`,fill:`currentColor`,fillRule:`evenodd`})}),d_=e=>(0,J.jsx)(`svg`,{"aria-hidden":`true`,"aria-label":`Warning icon`,fill:`none`,height:16,role:`presentation`,viewBox:`0 0 16 16`,width:16,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,J.jsx)(`path`,{clipRule:`evenodd`,d:`M7.134 2.994L2.217 11.5a1 1 0 0 0 .866 1.5h9.834a1 1 0 0 0 .866-1.5L8.866 2.993a1 1 0 0 0-1.732 0m3.03-.75c-.962-1.665-3.366-1.665-4.329 0L.918 10.749c-.963 1.666.24 3.751 2.165 3.751h9.834c1.925 0 3.128-2.085 2.164-3.751zM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2A.75.75 0 0 1 8 5m1 5.75a1 1 0 1 1-2 0a1 1 0 0 1 2 0`,fill:`currentColor`,fillRule:`evenodd`})}),f_=e=>(0,J.jsx)(`svg`,{"aria-hidden":`true`,"aria-label":`Danger icon`,fill:`none`,height:16,role:`presentation`,viewBox:`0 0 16 16`,width:16,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,J.jsx)(`path`,{clipRule:`evenodd`,d:`M8 13.5a5.5 5.5 0 1 0 0-11a5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0M8.75 5a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0z`,fill:`currentColor`,fillRule:`evenodd`})}),p_=e=>(0,J.jsx)(`svg`,{"aria-hidden":`true`,"aria-label":`Success icon`,fill:`none`,height:16,role:`presentation`,viewBox:`0 0 16 16`,width:16,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,J.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 8a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0m-3.9-1.55a.75.75 0 1 0-1.2-.9L7.419 8.858L6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08z`,fill:`currentColor`,fillRule:`evenodd`})}),m_=(0,g.createContext)({}),h_=typeof HTMLElement<`u`&&`inert`in HTMLElement.prototype;function g_(e){return e.dataset.liveAnnouncer===`true`||e.dataset.reactAriaTopLayer!==void 0}var __=new WeakMap,v_=[];function y_(e,t){let n=gf(e?.[0]),r=t instanceof n.Element?{root:t}:t,i=r?.root??document.body,a=r?.shouldUseInert&&h_,o=new Set(e),s=new Set,c=e=>a&&e instanceof n.HTMLElement?e.inert:e.getAttribute(`aria-hidden`)===`true`,l=(e,t)=>{a&&e instanceof n.HTMLElement?e.inert=t:t?e.setAttribute(`aria-hidden`,`true`):(e.removeAttribute(`aria-hidden`),e instanceof n.HTMLElement&&(e.inert=!1))},u=new Set;if(bf())for(let t of e){let e=t;for(;e&&e!==i;){let t=e.getRootNode();`shadowRoot`in t&&u.add(t.shadowRoot),e=t.parentNode}}let d=e=>{for(let t of e.querySelectorAll(`[data-live-announcer], [data-react-aria-top-layer]`))o.add(t);let t=e=>{if(s.has(e)||o.has(e)||e.parentElement&&s.has(e.parentElement)&&e.parentElement.getAttribute(`role`)!==`row`)return NodeFilter.FILTER_REJECT;for(let t of o)if(xf(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},n=Tf(hf(e),e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),r=t(e);if(r===NodeFilter.FILTER_ACCEPT&&f(e),r!==NodeFilter.FILTER_REJECT){let e=n.nextNode();for(;e!=null;)f(e),e=n.nextNode()}},f=e=>{let t=__.get(e)??0;c(e)&&t===0||(t===0&&l(e,!0),s.add(e),__.set(e,t+1))};v_.length&&v_[v_.length-1].disconnect(),d(i);let p=new MutationObserver(e=>{for(let t of e)if(t.type===`childList`){if(t.target.isConnected&&![...o,...s].some(e=>xf(e,t.target)))for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&g_(e)?o.add(e):e instanceof Element&&d(e);if(bf()){for(let e of u)if(!e.isConnected){p.disconnect();break}}}});p.observe(i,{childList:!0,subtree:!0});let m=new Set;if(bf())for(let e of u){let t=new MutationObserver(e=>{for(let t of e)if(t.type===`childList`){if(t.target.isConnected&&![...o,...s].some(e=>xf(e,t.target)))for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&g_(e)?o.add(e):e instanceof Element&&d(e);if(bf()){for(let e of u)if(!e.isConnected){p.disconnect();break}}}});t.observe(e,{childList:!0,subtree:!0}),m.add(t)}let h={visibleNodes:o,hiddenNodes:s,observe(){p.observe(i,{childList:!0,subtree:!0})},disconnect(){p.disconnect()}};return v_.push(h),()=>{if(p.disconnect(),bf())for(let e of m)e.disconnect();for(let e of s){let t=__.get(e);t!=null&&(t===1?(l(e,!1),__.delete(e)):__.set(e,t-1))}h===v_[v_.length-1]?(v_.pop(),v_.length&&v_[v_.length-1].observe()):v_.splice(v_.indexOf(h),1)}}var b_=new WeakMap,x_=g.createContext(null),S_=`react-aria-focus-scope-restore`,C_=null;function w_(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,a=(0,g.useRef)(null),o=(0,g.useRef)(null),s=(0,g.useRef)([]),{parentNode:c}=(0,g.useContext)(x_)||{},l=(0,g.useMemo)(()=>new K_({scopeRef:s}),[s]);qd(()=>{let e=c||q_.root;if(q_.getTreeNode(e.scopeRef)&&C_&&!F_(C_,e.scopeRef)){let t=q_.getTreeNode(C_);t&&(e=t)}e.addChild(l),q_.addNode(l)},[l,c]),qd(()=>{let e=q_.getTreeNode(s);e&&(e.contain=!!n)},[n]),qd(()=>{let e=a.current?.nextSibling,t=[],n=e=>e.stopPropagation();for(;e&&e!==o.current;)t.push(e),e.addEventListener(S_,n),e=e.nextSibling;return s.current=t,()=>{for(let e of t)e.removeEventListener(S_,n)}},[t]),B_(s,r,n),A_(s,n),H_(s,r,n),z_(s,i),(0,g.useEffect)(()=>{let e=Sf(hf(s.current?s.current[0]:void 0)),t=null;if(M_(e,s.current)){for(let n of q_.traverse())n.scopeRef&&M_(e,n.scopeRef.current)&&(t=n);t===q_.getTreeNode(s)&&(C_=t.scopeRef)}},[s]),qd(()=>()=>{let e=q_.getTreeNode(s)?.parent?.scopeRef??null;(s===C_||F_(s,C_))&&(!e||q_.getTreeNode(e))&&(C_=e),q_.removeTreeNode(s)},[s]);let u=(0,g.useMemo)(()=>T_(s),[]),d=(0,g.useMemo)(()=>({focusManager:u,parentNode:l}),[l,u]);return g.createElement(x_.Provider,{value:d},g.createElement(`span`,{"data-focus-scope-start":!0,hidden:!0,ref:a}),t,g.createElement(`span`,{"data-focus-scope-end":!0,hidden:!0,ref:o}))}function T_(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,s=r||Sf(hf(n[0]??void 0)),c=n[0].previousElementSibling,l=W_(E_(n),{tabbable:i,accept:o},n);l.currentNode=M_(s,n)?s:c;let u=l.nextNode();return!u&&a&&(l.currentNode=c,u=l.nextNode()),u&&I_(u,!0),u},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,s=r||Sf(hf(n[0]??void 0)),c=n[n.length-1].nextElementSibling,l=W_(E_(n),{tabbable:i,accept:o},n);l.currentNode=M_(s,n)?s:c;let u=l.previousNode();return!u&&a&&(l.currentNode=c,u=l.previousNode()),u&&I_(u,!0),u},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=W_(E_(n),{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let o=a.nextNode();return o&&I_(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=W_(E_(n),{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let o=a.previousNode();return o&&I_(o,!0),o}}}function E_(e){return e[0].parentElement}function D_(e){let t=q_.getTreeNode(C_);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function O_(e){if(!e.form)return Array.from(hf(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),n=gf(e);return t instanceof n.RadioNodeList?Array.from(t).filter(e=>e instanceof n.HTMLInputElement):t instanceof n.HTMLInputElement?[t]:[]}function k_(e){if(e.checked)return!0;let t=O_(e);return t.length>0&&!t.some(e=>e.checked)}function A_(e,t){let n=(0,g.useRef)(void 0),r=(0,g.useRef)(void 0);qd(()=>{let i=e.current;if(!t){r.current&&=(cancelAnimationFrame(r.current),void 0);return}let a=hf(i?i[0]:void 0),o=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!D_(e)||t.isComposing)return;let n=Sf(a),r=e.current;if(!r||!M_(n,r))return;let i=W_(E_(r),{tabbable:!0},r);if(!n)return;i.currentNode=n;let o=t.shiftKey?i.previousNode():i.nextNode();o||=(i.currentNode=t.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,t.shiftKey?i.previousNode():i.nextNode()),t.preventDefault(),o&&(I_(o,!0),o instanceof gf(o).HTMLInputElement&&o.select())},s=t=>{(!C_||F_(C_,e))&&M_(Y(t),e.current)?(C_=e,n.current=Y(t)):D_(e)&&!N_(Y(t),e)?n.current?n.current.focus():C_&&C_.current&&R_(C_.current):D_(e)&&(n.current=Y(t))},c=t=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let r=mg(),i=(r===`virtual`||r===null)&&zd()&&Rd(),o=Sf(a);if(!i&&o&&D_(e)&&!N_(o,e)){C_=e;let r=Y(t);r&&r.isConnected?(n.current=r,n.current?.focus()):C_.current&&R_(C_.current)}})};return a.addEventListener(`keydown`,o,!1),a.addEventListener(`focusin`,s,!1),i?.forEach(e=>e.addEventListener(`focusin`,s,!1)),i?.forEach(e=>e.addEventListener(`focusout`,c,!1)),()=>{a.removeEventListener(`keydown`,o,!1),a.removeEventListener(`focusin`,s,!1),i?.forEach(e=>e.removeEventListener(`focusin`,s,!1)),i?.forEach(e=>e.removeEventListener(`focusout`,c,!1))}},[e,t]),qd(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function j_(e){return N_(e)}function M_(e,t){return!e||!t?!1:t.some(t=>xf(t,e))}function N_(e,t=null){if(e instanceof Element&&e.closest(`[data-react-aria-top-layer]`))return!0;for(let{scopeRef:n}of q_.traverse(q_.getTreeNode(t)))if(n&&M_(e,n.current))return!0;return!1}function P_(e){return N_(e,C_)}function F_(e,t){let n=q_.getTreeNode(t)?.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function I_(e,t=!1){if(e!=null&&!t)try{vg(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function L_(e,t=!0){let n=e[0].previousElementSibling,r=E_(e),i=W_(r,{tabbable:t},e);i.currentNode=n;let a=i.nextNode();return t&&!a&&(r=E_(e),i=W_(r,{tabbable:!1},e),i.currentNode=n,a=i.nextNode()),a}function R_(e,t=!0){I_(L_(e,t))}function z_(e,t){let n=g.useRef(t);(0,g.useEffect)(()=>{n.current&&(C_=e,!M_(Sf(hf(e.current?e.current[0]:void 0)),C_.current)&&e.current&&R_(e.current)),n.current=!1},[e])}function B_(e,t,n){qd(()=>{if(t||n)return;let r=e.current,i=hf(r?r[0]:void 0),a=t=>{let n=Y(t);M_(n,e.current)?C_=e:j_(n)||(C_=null)};return i.addEventListener(`focusin`,a,!1),r?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),r?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,t,n])}function V_(e){let t=q_.getTreeNode(C_);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function H_(e,t,n){let r=(0,g.useRef)(typeof document<`u`?Sf(hf(e.current?e.current[0]:void 0)):null);qd(()=>{let r=e.current,i=hf(r?r[0]:void 0);if(!t||n)return;let a=()=>{(!C_||F_(C_,e))&&M_(Sf(i),e.current)&&(C_=e)};return i.addEventListener(`focusin`,a,!1),r?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),r?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,n]),qd(()=>{let r=hf(e.current?e.current[0]:void 0);if(!t)return;let i=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!D_(e)||t.isComposing)return;let n=r.activeElement;if(!N_(n,e)||!V_(e))return;let i=q_.getTreeNode(e);if(!i)return;let a=i.nodeToRestore,o=W_(r.body,{tabbable:!0});o.currentNode=n;let s=t.shiftKey?o.previousNode():o.nextNode();if((!a||!a.isConnected||a===r.body)&&(a=void 0,i.nodeToRestore=void 0),(!s||!N_(s,e))&&a){o.currentNode=a;do s=t.shiftKey?o.previousNode():o.nextNode();while(N_(s,e));t.preventDefault(),t.stopPropagation(),s?I_(s,!0):j_(a)?I_(a,!0):n.blur()}};return n||r.addEventListener(`keydown`,i,!0),()=>{n||r.removeEventListener(`keydown`,i,!0)}},[e,t,n]),qd(()=>{let n=hf(e.current?e.current[0]:void 0);if(!t)return;let i=q_.getTreeNode(e);if(i)return i.nodeToRestore=r.current??void 0,()=>{let r=q_.getTreeNode(e);if(!r)return;let i=r.nodeToRestore,a=Sf(n);if(t&&i&&(a&&N_(a,e)||a===n.body&&V_(e))){let t=q_.clone();requestAnimationFrame(()=>{if(n.activeElement===n.body){let n=t.getTreeNode(e);for(;n;){if(n.nodeToRestore&&n.nodeToRestore.isConnected){U_(n.nodeToRestore);return}n=n.parent}for(n=t.getTreeNode(e);n;){if(n.scopeRef&&n.scopeRef.current&&q_.getTreeNode(n.scopeRef)){U_(L_(n.scopeRef.current,!0));return}n=n.parent}}})}}},[e,t])}function U_(e){e.dispatchEvent(new CustomEvent(S_,{bubbles:!0,cancelable:!0}))&&I_(e)}function W_(e,t,n){let r=t?.tabbable?_p:gp,i=hf(e?.nodeType===Node.ELEMENT_NODE?e:null),a=Tf(i,e||i,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return xf(t?.from,e)||t?.tabbable&&e.tagName===`INPUT`&&e.getAttribute(`type`)===`radio`&&(!k_(e)||a.currentNode.tagName===`INPUT`&&a.currentNode.type===`radio`&&a.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:r(e)&&(!n||M_(e,n))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(a.currentNode=t.from),a}var G_=class e{constructor(){this.fastMap=new Map,this.root=new K_({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(t??null);if(!r)return;let i=new K_({scopeRef:e});r.addChild(i),i.parent=r,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&M_(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let t=new e;for(let e of this.traverse())t.addTreeNode(e.scopeRef,e.parent?.scopeRef??null,e.nodeToRestore);return t}},K_=class{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}},q_=new G_;function J_(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,a=(0,g.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),o=qf(e=>{n&&Y_(e,t)&&(i&&i(e),a.current.isPointerDown=!0)}),s=qf(e=>{n&&n(e)});(0,g.useEffect)(()=>{let e=a.current;if(r)return;let n=t.current,i=hf(n);if(typeof PointerEvent<`u`){let n=n=>{e.isPointerDown&&Y_(n,t)&&s(n),e.isPointerDown=!1};return i.addEventListener(`pointerdown`,o,!0),i.addEventListener(`click`,n,!0),()=>{i.removeEventListener(`pointerdown`,o,!0),i.removeEventListener(`click`,n,!0)}}},[t,r])}function Y_(e,t){if(e.button>0)return!1;let n=Y(e);if(n){let e=n.ownerDocument;if(!e||!xf(e.documentElement,n)||n.closest(`[data-react-aria-top-layer]`))return!1}return t.current?!e.composedPath().includes(t.current):!1}var X_=[];function Z_(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:a=!1,isKeyboardDismissDisabled:o=!1,shouldCloseOnInteractOutside:s}=e,c=(0,g.useRef)(void 0);(0,g.useEffect)(()=>{if(i&&!X_.includes(t))return X_.push(t),()=>{let e=X_.indexOf(t);e>=0&&X_.splice(e,1)}},[i,t]);let l=()=>{X_[X_.length-1]===t&&n&&n()},u=e=>{let n=X_[X_.length-1];c.current=n,(!s||s(Y(e)))&&n===t&&e.stopPropagation()},d=e=>{(!s||s(Y(e)))&&(X_[X_.length-1]===t&&e.stopPropagation(),c.current===t&&l()),c.current=void 0},f=e=>{e.key===`Escape`&&!o&&!e.nativeEvent.isComposing&&(e.stopPropagation(),e.preventDefault(),l())};J_({ref:t,onInteractOutside:a&&i?d:void 0,onInteractOutsideStart:u});let{focusWithinProps:p}=Gg({isDisabled:!r,onBlurWithin:e=>{!e.relatedTarget||P_(e.relatedTarget)||(!s||s(e.relatedTarget))&&n?.()}});return{overlayProps:{onKeyDown:f,...p},underlayProps:{}}}var Q_=typeof document<`u`&&window.visualViewport,$_=0,ev;function tv(e={}){let{isDisabled:t}=e;qd(()=>{if(!t)return $_++,$_===1&&(ev=Id()?rv():nv()),()=>{$_--,$_===0&&ev()}},[t])}function nv(){let e=window.innerWidth-document.documentElement.clientWidth;return mf(e>0&&(`scrollbarGutter`in document.documentElement.style?iv(document.documentElement,`scrollbarGutter`,`stable`):iv(document.documentElement,`paddingRight`,`${e}px`)),iv(document.documentElement,`overflow`,`hidden`))}function rv(){let e=iv(document.documentElement,`overflow`,`hidden`),t,n=!1,r=e=>{let r=Y(e);t=Zf(r)?r:Qf(r,!0),n=!1;let i=r.ownerDocument.defaultView.getSelection();i&&!i.isCollapsed&&i.containsNode(r,!0)&&(n=!0),e.composedPath().some(e=>e instanceof HTMLInputElement&&e.type===`range`)&&(n=!0),`selectionStart`in r&&`selectionEnd`in r&&r.selectionStart<r.selectionEnd&&r.ownerDocument.activeElement===r&&(n=!0)},i=document.createElement(`style`),a=xp();a&&(i.nonce=a),i.textContent=`@layer {
* {
overscroll-behavior: contain;
}
}`,document.head.prepend(i);let o=e=>{if(!(e.touches.length===2||n)){if(!t||t===document.documentElement||t===document.body){e.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&e.preventDefault()}},s=e=>{let t=Y(e),n=e.relatedTarget;n&&ep(n)?(n.focus({preventScroll:!0}),ov(n,ep(t))):n||(t.parentElement?.closest(`[tabindex]`))?.focus({preventScroll:!0})},c=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(e){let t=Sf(),n=t!=null&&ep(t);c.call(this,{...e,preventScroll:!0}),(!e||!e.preventScroll)&&ov(this,n)};let l=mf(av(document,`touchstart`,r,{passive:!1,capture:!0}),av(document,`touchmove`,o,{passive:!1,capture:!0}),av(document,`blur`,s,!0));return()=>{e(),l(),i.remove(),HTMLElement.prototype.focus=c}}function iv(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function av(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ov(e,t){t||!Q_?sv(e):Q_.addEventListener(`resize`,()=>sv(e),{once:!0})}function sv(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=Qf(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top<t.top||r.bottom>t.top+n.clientHeight){let n=t.bottom;Q_&&(n=Math.min(n,Q_.offsetTop+Q_.height));let i=r.top-t.top-((n-t.top)/2-r.height/2);e.scrollTo({top:Math.max(0,Math.min(e.scrollHeight-e.clientHeight,e.scrollTop+i)),behavior:`smooth`})}}n=e.parentElement}}var cv={};cv={dismiss:`تجاهل`};var lv={};lv={dismiss:`ОтхвърлÑне`};var uv={};uv={dismiss:`Odstranit`};var dv={};dv={dismiss:`Luk`};var fv={};fv={dismiss:`Schließen`};var pv={};pv={dismiss:`ΑπόÏÏιψη`};var mv={};mv={dismiss:`Dismiss`};var hv={};hv={dismiss:`Descartar`};var gv={};gv={dismiss:`Lõpeta`};var _v={};_v={dismiss:`Hylkää`};var vv={};vv={dismiss:`Rejeter`};var yv={};yv={dismiss:`התעל×`};var bv={};bv={dismiss:`Odbaci`};var xv={};xv={dismiss:`ElutasÃtás`};var Sv={};Sv={dismiss:`Ignora`};var Cv={};Cv={dismiss:`é–‰ã˜ã‚‹`};var wv={};wv={dismiss:`무시`};var Tv={};Tv={dismiss:`Atmesti`};var Ev={};Ev={dismiss:`NerÄdÄ«t`};var Dv={};Dv={dismiss:`Lukk`};var Ov={};Ov={dismiss:`Negeren`};var kv={};kv={dismiss:`Zignoruj`};var Av={};Av={dismiss:`Descartar`};var jv={};jv={dismiss:`Dispensar`};var Mv={};Mv={dismiss:`Revocare`};var Nv={};Nv={dismiss:`ПропуÑтить`};var Pv={};Pv={dismiss:`ZruÅ¡iÅ¥`};var Fv={};Fv={dismiss:`Opusti`};var Iv={};Iv={dismiss:`Odbaci`};var Lv={};Lv={dismiss:`Avvisa`};var Rv={};Rv={dismiss:`Kapat`};var zv={};zv={dismiss:`СкаÑувати`};var Bv={};Bv={dismiss:`å–æ¶ˆ`};var Vv={};Vv={dismiss:`關閉`};var Hv={};Hv={"ar-AE":cv,"bg-BG":lv,"cs-CZ":uv,"da-DK":dv,"de-DE":fv,"el-GR":pv,"en-US":mv,"es-ES":hv,"et-EE":gv,"fi-FI":_v,"fr-FR":vv,"he-IL":yv,"hr-HR":bv,"hu-HU":xv,"it-IT":Sv,"ja-JP":Cv,"ko-KR":wv,"lt-LT":Tv,"lv-LV":Ev,"nb-NO":Dv,"nl-NL":Ov,"pl-PL":kv,"pt-BR":Av,"pt-PT":jv,"ro-RO":Mv,"ru-RU":Nv,"sk-SK":Pv,"sl-SI":Fv,"sr-SP":Iv,"sv-SE":Lv,"tr-TR":Rv,"uk-UA":zv,"zh-CN":Bv,"zh-TW":Vv};var Uv=Symbol.for(`react-aria.i18n.locale`),Wv=Symbol.for(`react-aria.i18n.strings`),Gv=void 0,Kv=class e{constructor(e,t=`en-US`){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=qv(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(t){if(typeof window>`u`)return null;let n=window[Uv];if(Gv===void 0){let t=window[Wv];if(!t)return null;Gv={};for(let r in t)Gv[r]=new e({[n]:t[r]},n)}let r=Gv?.[t];if(!r)throw Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}};function qv(e,t,n=`en-US`){if(t[e])return t[e];let r=Jv(e);if(t[r])return t[r];for(let e in t)if(e.startsWith(r+`-`))return t[e];return t[n]}function Jv(e){return Intl.Locale?new Intl.Locale(e).language:e.split(`-`)[0]}var Yv=new Map,Xv=new Map,Zv=class{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return typeof n==`function`?n(t,this):n}plural(e,t,n=`cardinal`){let r=t[`=`+e];if(r)return typeof r==`function`?r():r;let i=this.locale+`:`+n,a=Yv.get(i);return a||(a=new Intl.PluralRules(this.locale,{type:n}),Yv.set(i,a)),r=t[a.select(e)]||t.other,typeof r==`function`?r():r}number(e){let t=Xv.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),Xv.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return typeof n==`function`?n():n}},Qv=new WeakMap;function $v(e){let t=Qv.get(e);return t||(t=new Kv(e),Qv.set(e,t)),t}function ey(e,t){return t&&Kv.getGlobalDictionaryForPackage(t)||$v(e)}function ty(e,t){let{locale:n}=Bh(),r=ey(e,t);return(0,g.useMemo)(()=>new Zv(n,r),[n,r])}var ny={border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`};function ry(e={}){let{style:t,isFocusable:n}=e,[r,i]=(0,g.useState)(!1),{focusWithinProps:a}=Gg({isDisabled:!n,onFocusWithinChange:e=>i(e)}),o=(0,g.useMemo)(()=>r?t:t?{...ny,...t}:ny,[r]);return{visuallyHiddenProps:{...a,style:o}}}function iy(e){let{children:t,elementType:n=`div`,isFocusable:r,style:i,...a}=e,{visuallyHiddenProps:o}=ry(e);return g.createElement(n,Af(a,o),t)}function ay(e){return e&&e.__esModule?e.default:e}function oy(e){let{onDismiss:t,...n}=e,r=Wf(n,ty(ay(Hv),`@react-aria/overlays`).format(`dismiss`)),i=()=>{t&&t()};return g.createElement(iy,null,g.createElement(`button`,{...r,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}var sy=g.forwardRef(({children:e,...t},n)=>{let r=(0,g.useRef)(!1),i=(0,g.useContext)(Ag),a=Af(i||{},{...t,register(){r.current=!0,i&&i.register()}});return a.ref=Gf(n||i?.ref),Xf(i,a.ref),(0,g.useEffect)(()=>{r.current||=!0},[]),g.createElement(Ag.Provider,{value:a},e)});function cy({children:e}){let t=(0,g.useMemo)(()=>({register:()=>{}}),[]);return g.createElement(Ag.Provider,{value:t},e)}var ly=(0,g.createContext)({});function uy(){return(0,g.useContext)(ly)??{}}var dy=g.createContext(null);function fy(e){let t=of(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,a]=(0,g.useState)(!1),o=(0,g.useMemo)(()=>({contain:i,setContain:a}),[i,a]),{getContainer:s}=uy();if(!e.portalContainer&&s&&(n=s()),!n)return null;let c=e.children;return e.disableFocusManagement||(c=g.createElement(w_,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},c)),c=g.createElement(dy.Provider,{value:o},g.createElement(cy,null,c)),Fe.createPortal(c,n)}function py(){let e=(0,g.useContext)(dy)?.setContain;qd(()=>{e?.(!0)},[e])}function my(e){let[t,n]=i_(e.isOpen,e.defaultOpen||!1,e.onOpenChange);return{isOpen:t,setOpen:n,open:(0,g.useCallback)(()=>{n(!0)},[n]),close:(0,g.useCallback)(()=>{n(!1)},[n]),toggle:(0,g.useCallback)(()=>{n(!t)},[n,t])}}var hy=(0,g.createContext)(null),gy=class{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}},_y=class extends gy{filter(e,t,n){let[r,i]=vy(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}};(class extends gy{static{this.type=`header`}}),class extends gy{static{this.type=`loader`}},class extends _y{static{this.type=`item`}filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}},class extends _y{static{this.type=`section`}filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};function vy(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}function yy(e,t,n){let{type:r}=e,{isOpen:i}=t;(0,g.useEffect)(()=>{n&&n.current&&b_.set(n.current,t.close)});let a;r===`menu`?a=!0:r===`listbox`&&(a=`listbox`);let o=df();return{triggerProps:{"aria-haspopup":a,"aria-expanded":i,"aria-controls":i?o:void 0,onPress:t.toggle},overlayProps:{id:o}}}function by(e){let t=my(e),[n,r]=(0,g.useState)(null),[i,a]=(0,g.useState)([]),o=()=>{a([]),t.close()},s=(e,t)=>{a(n=>t>n.length?n:[...n.slice(0,t),e])},c=(e,t)=>{a(n=>n[t]===e?n.slice(0,t):n)};return{focusStrategy:n,...t,open(e=null){r(e),t.open()},toggle(e=null){r(e),t.toggle()},close(){o()},expandedKeysStack:i,openSubmenu:s,closeSubmenu:c}}var xy=(0,g.createContext)(null);(class extends gy{static{this.type=`submenutrigger`}filter(e,t,n){let r=e.getItem(this.firstChildKey);if(r&&n(r.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}});function Sy(e,t){let{role:n=`dialog`}=e,r=pf();r=e[`aria-label`]?void 0:r;let i=(0,g.useRef)(!1);return(0,g.useEffect)(()=>{if(t.current&&!Cf(t.current)){vg(t.current);let e=setTimeout(()=>{(Sf()===t.current||Sf()===document.body)&&(i.current=!0,t.current&&(t.current.blur(),vg(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),py(),(0,g.useRef)(!1),(0,g.useEffect)(()=>{}),{dialogProps:{...Lf(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e[`aria-labelledby`]||r,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:r}}}var Cy=(0,g.createContext)(null),wy=(0,g.createContext)(null);function Ty(e){let t=by(e),n=(0,g.useRef)(null),{triggerProps:r,overlayProps:i}=yy({type:`dialog`},t,n),[a,o]=(0,g.useState)(null);return Yf({ref:n,onResize:(0,g.useCallback)(()=>{n.current&&o(n.current.offsetWidth+`px`)},[n])}),r.id=df(),i[`aria-labelledby`]=r.id,g.createElement(bh,{values:[[wy,t],[xy,t],[Cy,i],[hy,{trigger:`DialogTrigger`,triggerRef:n,"aria-labelledby":i[`aria-labelledby`],style:{"--trigger-width":a}}]]},g.createElement(sy,{...r,ref:n,isPressed:t.isOpen},e.children))}var Ey=(0,g.forwardRef)(function(e,t){let n=e[`aria-labelledby`];[e,t]=wh(e,t,Cy);let{dialogProps:r,titleProps:i}=Sy({...e,"aria-labelledby":n},t),a=(0,g.useContext)(wy);!r[`aria-label`]&&!r[`aria-labelledby`]&&e[`aria-labelledby`]&&(r[`aria-labelledby`]=e[`aria-labelledby`]);let o=xh({defaultClassName:`react-aria-Dialog`,className:e.className,style:e.style,children:e.children,values:{close:a?.close||(()=>{})}}),s=Lf(e,{global:!0});return g.createElement(Dh.section,{...Af(s,o,r),render:e.render,ref:t,slot:e.slot||void 0},g.createElement(bh,{values:[[a_,{slots:{[yh]:{},title:{...i,level:2}}}],[$g,{slots:{[yh]:{},close:{onPress:()=>a?.close()}}}]]},o.children))});function Dy(e,t,n){let{overlayProps:r,underlayProps:i}=Z_({...e,isOpen:t.isOpen,onClose:t.close},n);return tv({isDisabled:!t.isOpen}),py(),(0,g.useEffect)(()=>{if(t.isOpen&&n.current)return y_([n.current],{shouldUseInert:!0})},[t.isOpen,n]),{modalProps:Af(r),underlayProps:i}}var Oy=(0,g.createContext)(null),ky=(0,g.createContext)(null),Ay=(0,g.forwardRef)(function(e,t){if((0,g.useContext)(ky))return g.createElement(Py,{...e,modalRef:t},e.children);let{isDismissable:n,isKeyboardDismissDisabled:r,isOpen:i,defaultOpen:a,onOpenChange:o,children:s,isEntering:c,isExiting:l,UNSTABLE_portalContainer:u,shouldCloseOnInteractOutside:d,...f}=e;return g.createElement(My,{isDismissable:n,isKeyboardDismissDisabled:r,isOpen:i,defaultOpen:a,onOpenChange:o,isEntering:c,isExiting:l,UNSTABLE_portalContainer:u,shouldCloseOnInteractOutside:d},g.createElement(Py,{...f,modalRef:t},s))});function jy(e,t){[e,t]=wh(e,t,Oy);let n=(0,g.useContext)(wy),r=my(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?r:n,a=Gf(t),o=(0,g.useRef)(null),s=sp(a,i.isOpen),c=sp(o,i.isOpen),l=s||c||e.isExiting||!1,u=of();return!i.isOpen&&!l||u?null:g.createElement(Ny,{...e,state:i,isExiting:l,overlayRef:a,modalRef:o})}var My=(0,g.forwardRef)(jy);function Ny({UNSTABLE_portalContainer:e,...t}){let n=t.modalRef,{state:r}=t,{modalProps:i,underlayProps:a}=Dy(t,r,n),o=op(t.overlayRef)||t.isEntering||!1,s=xh({...t,defaultClassName:`react-aria-ModalOverlay`,values:{isEntering:o,isExiting:t.isExiting,state:r}}),c=np(),l,u;if(typeof document<`u`){let e=Zf(document.body)?document.body:document.scrollingElement||document.documentElement,t=e.getBoundingClientRect().width%1,n=e.getBoundingClientRect().height%1;l=e.scrollWidth-t,u=e.scrollHeight-n}let d={...s.style,"--visual-viewport-width":c.width+`px`,"--visual-viewport-height":c.height+`px`,"--page-width":l===void 0?void 0:l+`px`,"--page-height":u===void 0?void 0:u+`px`};return g.createElement(fy,{isExiting:t.isExiting,portalContainer:e},g.createElement(Dh.div,{...Af(Lf(t,{global:!0}),a),...s,style:d,ref:t.overlayRef,"data-entering":o||void 0,"data-exiting":t.isExiting||void 0},g.createElement(bh,{values:[[ky,{modalProps:i,modalRef:n,isExiting:t.isExiting,isDismissable:t.isDismissable}],[wy,r]]},s.children)))}function Py(e){let{modalProps:t,modalRef:n,isExiting:r,isDismissable:i}=(0,g.useContext)(ky),a=(0,g.useContext)(wy),o=Gf((0,g.useMemo)(()=>Ef(e.modalRef,n),[e.modalRef,n])),s=op(o),c=xh({...e,defaultClassName:`react-aria-Modal`,values:{isEntering:s,isExiting:r,state:a}});return g.createElement(Dh.div,{...Af(Lf(e,{global:!0}),t),...c,ref:o,"data-entering":s||void 0,"data-exiting":r||void 0},i&&g.createElement(oy,{onDismiss:a.close}),c.children)}var Fy=g.forwardRef(({children:e,...t},n)=>{n=Gf(n);let{pressProps:r}=Ig({...t,ref:n}),{focusableProps:i}=wg(t,n),a=g.Children.only(e);(0,g.useEffect)(()=>{},[n,t.isDisabled]);let o=a.props.ref;return g.cloneElement(a,{...Af(r,i,a.props),ref:Ef(o,n)})}),Iy=({children:e,className:t,slot:n,style:r,variant:i,...a})=>(0,J.jsx)(e_,{"aria-label":`Close`,className:s_(t,(0,g.useMemo)(()=>vh({variant:i}),[i])),"data-slot":`close-button`,slot:n,style:r,...a,children:t=>typeof e==`function`?e(t):e??(0,J.jsx)(l_,{"data-slot":`close-button-icon`})}),Ly=Object.assign(Iy,{Root:Iy}),Ry=(0,g.createContext)({}),zy=({children:e,...t})=>(0,J.jsx)(Ry,{value:(0,g.useMemo)(()=>({slots:gh(),placement:void 0}),[]),children:(0,J.jsx)(Ty,{"data-slot":`alert-dialog-root`,...t,children:e})}),By=Object.assign(zy,{Root:zy,Trigger:({children:e,className:t,...n})=>{let{slots:r}=(0,g.useContext)(Ry);return(0,J.jsx)(Fy,{children:(0,J.jsx)(`div`,{className:c_(r?.trigger,t),"data-slot":`alert-dialog-trigger`,role:`button`,...n,children:e})})},Backdrop:({children:e,className:t,isDismissable:n=!1,isKeyboardDismissDisabled:r=!0,onClick:i,variant:a,...o})=>{let{slots:s}=(0,g.useContext)(Ry),c=(0,g.useMemo)(()=>gh({variant:a}),[a]),l=(0,g.useMemo)(()=>({slots:{...s,...c}}),[s,c]);return(0,J.jsx)(My,{className:s_(t,c?.backdrop()),"data-slot":`alert-dialog-backdrop`,isDismissable:n,isKeyboardDismissDisabled:r,onClick:e=>{e.stopPropagation(),i?.(e)},...o,children:t=>(0,J.jsxs)(Ry,{value:l,children:[typeof e==`function`?e(t):e,` `]})})},Container:({children:e,className:t,placement:n=`auto`,size:r,...i})=>{let{slots:a}=(0,g.useContext)(Ry),o=(0,g.useMemo)(()=>gh({size:r}),[r]),s=(0,g.useMemo)(()=>({placement:n,slots:{...a,...o}}),[n,a,o]);return(0,J.jsx)(Ay,{className:s_(t,o?.container()),"data-placement":n,"data-slot":`alert-dialog-container`,...i,children:t=>(0,J.jsx)(Ry,{value:s,children:typeof e==`function`?e(t):e})})},Dialog:({children:e,className:t,...n})=>{let{placement:r,slots:i}=(0,g.useContext)(Ry);return(0,J.jsx)(Ey,{className:c_(i?.dialog,t),"data-placement":r,"data-slot":`alert-dialog-dialog`,role:`alertdialog`,...n,children:e})},Header:({children:e,className:t,...n})=>{let{slots:r}=(0,g.useContext)(Ry);return(0,J.jsx)(`div`,{className:c_(r?.header,t),"data-slot":`alert-dialog-header`,...n,children:e})},Heading:({children:e,className:t,...n})=>{let{slots:r}=(0,g.useContext)(Ry);return(0,J.jsx)(o_,{className:c_(r?.heading,t),"data-slot":`alert-dialog-heading`,slot:`title`,...n,children:e})},Body:({children:e,className:t,...n})=>{let{slots:r}=(0,g.useContext)(Ry);return(0,J.jsx)(`div`,{className:c_(r?.body,t),"data-slot":`alert-dialog-body`,...n,children:e})},Footer:({children:e,className:t,...n})=>{let{slots:r}=(0,g.useContext)(Ry);return(0,J.jsx)(`div`,{className:c_(r?.footer,t),"data-slot":`alert-dialog-footer`,...n,children:e})},Icon:({children:e,className:t,status:n=`danger`,...r})=>{let i=(0,g.useMemo)(()=>gh({status:n}),[n]),a=()=>{switch(n){case`default`:return(0,J.jsx)(u_,{"data-slot":`alert-dialog-default-icon`});case`accent`:return(0,J.jsx)(u_,{"data-slot":`alert-dialog-default-icon`});case`success`:return(0,J.jsx)(p_,{"data-slot":`alert-dialog-default-icon`});case`warning`:return(0,J.jsx)(d_,{"data-slot":`alert-dialog-default-icon`});case`danger`:return(0,J.jsx)(f_,{"data-slot":`alert-dialog-default-icon`});default:return(0,J.jsx)(f_,{"data-slot":`alert-dialog-default-icon`})}};return(0,J.jsx)(wp.div,{className:i?.icon({className:t}),"data-slot":`alert-dialog-icon`,...r,children:e??a()})},CloseTrigger:({className:e,...t})=>{let{slots:n}=(0,g.useContext)(Ry);return(0,J.jsx)(Ly,{className:s_(e,n?.closeTrigger()),"data-slot":`alert-dialog-close-trigger`,slot:`close`,...t})}}),Vy=(0,g.createContext)({}),Hy=`__button_group_child`,Uy=({children:e,className:t,fullWidth:n,isDisabled:r,isIconOnly:i,size:a,slot:o,style:s,variant:c,[Hy]:l,...u})=>{let d=(0,g.useContext)(Vy),f=l===!0,p=a??(f?d?.size:void 0),m=c??(f?d?.variant:void 0),h=r??(f?d?.isDisabled:void 0);return(0,J.jsx)(e_,{className:s_(t,_h({fullWidth:n??(f?d?.fullWidth:void 0),isIconOnly:i,size:p,variant:m})),"data-slot":`button`,isDisabled:h,slot:o,style:s,...u,children:t=>typeof e==`function`?e(t):e})},Wy=Object.assign(Uy,{Root:Uy}),Gy=(0,g.createContext)({}),Ky=({children:e,className:t,status:n,...r})=>{let i=g.useMemo(()=>hh({status:n}),[n]);return(0,J.jsx)(Gy,{value:{slots:i,status:n},children:(0,J.jsx)(m_,{value:{variant:`default`},children:(0,J.jsx)(wp.div,{className:i?.base({className:t}),"data-slot":`alert-root`,...r,children:e})})})},qy=Object.assign(Ky,{Root:Ky,Indicator:({children:e,className:t,...n})=>{let{slots:r,status:i}=(0,g.useContext)(Gy),a=()=>{switch(i){case`accent`:return(0,J.jsx)(u_,{"data-slot":`alert-default-icon`});case`success`:return(0,J.jsx)(p_,{"data-slot":`alert-default-icon`});case`warning`:return(0,J.jsx)(d_,{"data-slot":`alert-default-icon`});case`danger`:return(0,J.jsx)(f_,{"data-slot":`alert-default-icon`});default:return(0,J.jsx)(u_,{"data-slot":`alert-default-icon`})}};return(0,J.jsx)(wp.div,{className:c_(r?.indicator,t),"data-slot":`alert-indicator`,...n,children:e??a()})},Content:({children:e,className:t,...n})=>{let{slots:r}=(0,g.useContext)(Gy);return(0,J.jsx)(wp.div,{className:c_(r?.content,t),"data-slot":`alert-content`,...n,children:e})},Title:({children:e,className:t,...n})=>{let{slots:r}=(0,g.useContext)(Gy);return(0,J.jsx)(wp.p,{className:c_(r?.title,t),"data-slot":`alert-title`,...n,children:e})},Description:({children:e,className:t,...n})=>{let{slots:r}=(0,g.useContext)(Gy);return(0,J.jsx)(wp.span,{className:c_(r?.description,t),"data-slot":`alert-description`,...n,children:e})}}),Jy=function(e,t){return Jy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Jy(e,t)};function Yy(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Jy(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Xy(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function Zy(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Qy(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function $y(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function eb(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function tb(e){return this instanceof tb?(this.v=e,this):new tb(e)}function nb(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof tb?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function rb(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Qy==`function`?Qy(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}var ib=(e={})=>{let{defaultOpen:t=!1,isOpen:n,onOpenChange:r}=e,[i,a]=(0,g.useState)(t),o=n!==void 0,s=o?n:i,c=(0,g.useRef)(r);(0,g.useEffect)(()=>{c.current=r},[r]);let l=(0,g.useCallback)(e=>{c.current?.(e),o||a(e)},[o]),u=(0,g.useCallback)(()=>{l(!0)},[l]);return{close:(0,g.useCallback)(()=>{l(!1)},[l]),isOpen:s,open:u,setOpen:l,toggle:(0,g.useCallback)(()=>{l(!s)},[l,s])}},ab=function(e){return e.PRIMARY=`primary`,e.SECONDARY=`secondary`,e.FLAT=`flat`,e}({}),ob=e=>{let t=(0,R.c)(16),{text:n,leftIcon:r,rightIcon:i,onPress:a,variant:o,className:s,size:c,onClick:l,ref:u}=e,d=o===void 0?ab.PRIMARY:o,f=s===void 0?``:s,p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p={[ab.PRIMARY]:`bg-black text-white hover:bg-zinc-800`,[ab.SECONDARY]:`bg-transparent border-2 border-black text-black hover:bg-black hover:text-white`,[ab.FLAT]:`bg-zinc-100 text-black hover:bg-zinc-200`},t[0]=p):p=t[0];let m=`font-medium transition-all duration-200 ${p[d]||``} ${f}`,h;t[1]===a?h=t[2]:(h=e=>{a?.(e)},t[1]=a,t[2]=h);let g;t[3]===r?g=t[4]:(g=r&&(0,J.jsx)(`span`,{className:`mr-2`,children:r}),t[3]=r,t[4]=g);let _;t[5]===i?_=t[6]:(_=i&&(0,J.jsx)(`span`,{className:`ml-2`,children:i}),t[5]=i,t[6]=_);let v;return t[7]!==l||t[8]!==u||t[9]!==c||t[10]!==m||t[11]!==h||t[12]!==g||t[13]!==_||t[14]!==n?(v=(0,J.jsxs)(Wy,{className:m,size:c,onPress:h,onClick:l,ref:u,children:[g,n,_]}),t[7]=l,t[8]=u,t[9]=c,t[10]=m,t[11]=h,t[12]=g,t[13]=_,t[14]=n,t[15]=v):v=t[15],v},sb=()=>({logEvent:(e,t)=>{typeof window<`u`&&window.gtag&&window.gtag(`event`,e,t)}}),cb=function(e){return e.REDIRECT_TO_DASHBOARD=`redirect_to_dashboard`,e.SIMPLE_LOGIN=`simple_login`,e.INDIRECT_LOGIN=`indirect_login`,e}({}),lb=()=>{let e=(0,R.c)(34),{logEvent:t}=sb(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsx)(Aa,{to:`/`,className:`flex items-center cursor-pointer`,children:(0,J.jsx)(`span`,{className:`text-xl font-black tracking-tighter uppercase text-black`,children:`CautionLabs`})}),e[0]=n):n=e[0];let r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsxs)(Aa,{to:`/docs`,className:`hidden md:inline-block relative py-1 text-[10px] font-bold uppercase tracking-[0.1em] text-zinc-600 hover:text-black transition-colors group`,children:[`Docs`,(0,J.jsx)(`span`,{className:`absolute bottom-0 left-0 w-0 h-[1.5px] bg-black transition-all duration-300 group-hover:w-full`})]}),e[1]=r):r=e[1];let i;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsxs)(Aa,{to:`/solutions`,className:`hidden md:inline-block relative py-1 text-[10px] font-bold uppercase tracking-[0.1em] text-zinc-600 hover:text-black transition-colors group`,children:[`Solutions`,(0,J.jsx)(`span`,{className:`absolute bottom-0 left-0 w-0 h-[1.5px] bg-black transition-all duration-300 group-hover:w-full`})]}),e[2]=i):i=e[2];let a;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,J.jsxs)(Aa,{to:`/blogs`,className:`hidden md:inline-block relative py-1 text-[10px] font-bold uppercase tracking-[0.1em] text-zinc-600 hover:text-black transition-colors group`,children:[`Blogs`,(0,J.jsx)(`span`,{className:`absolute bottom-0 left-0 w-0 h-[1.5px] bg-black transition-all duration-300 group-hover:w-full`})]}),e[3]=a):a=e[3];let o;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,J.jsxs)(Aa,{to:`/purchase`,className:`hidden md:inline-block relative py-1 text-[10px] font-bold uppercase tracking-[0.1em] text-zinc-600 hover:text-black transition-colors group`,children:[`Buy Credits`,(0,J.jsx)(`span`,{className:`absolute bottom-0 left-0 w-0 h-[1.5px] bg-black transition-all duration-300 group-hover:w-full`})]}),e[4]=o):o=e[4];let s;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsx)(td,{children:(0,J.jsx)(`div`,{className:`h-8 w-8 animate-pulse bg-zinc-100 rounded-full`})}),e[5]=s):s=e[5];let c;e[6]===t?c=e[7]:(c=()=>{t(cb.SIMPLE_LOGIN)},e[6]=t,e[7]=c);let l;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,J.jsx)(Od,{mode:`modal`,children:(0,J.jsx)(ob,{text:`Login`,variant:ab.FLAT,size:`lg`})}),e[8]=l):l=e[8];let u;e[9]===c?u=e[10]:(u=(0,J.jsx)(`span`,{onClickCapture:c,children:l}),e[9]=c,e[10]=u);let d;e[11]===t?d=e[12]:(d=()=>{t(cb.SIMPLE_LOGIN)},e[11]=t,e[12]=d);let f;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,J.jsx)(kd,{mode:`modal`,children:(0,J.jsx)(ob,{text:`Sign Up`,variant:ab.PRIMARY,size:`lg`})}),e[13]=f):f=e[13];let p;e[14]===d?p=e[15]:(p=(0,J.jsx)(`span`,{onClickCapture:d,children:f}),e[14]=d,e[15]=p);let m;e[16]!==p||e[17]!==u?(m=(0,J.jsx)(nd,{when:`signed-out`,children:(0,J.jsxs)(`div`,{className:`flex items-center gap-3`,children:[u,p]})}),e[16]=p,e[17]=u,e[18]=m):m=e[18];let h;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,J.jsxs)(Aa,{to:`/credits`,className:`relative py-1 text-[10px] font-bold uppercase tracking-[0.1em] text-zinc-600 hover:text-black transition-colors group`,children:[`Credits`,(0,J.jsx)(`span`,{className:`absolute bottom-0 left-0 w-0 h-[1.5px] bg-black transition-all duration-300 group-hover:w-full`})]}),e[19]=h):h=e[19];let g;e[20]===t?g=e[21]:(g=()=>{t(cb.REDIRECT_TO_DASHBOARD,{source:`navbar`})},e[20]=t,e[21]=g);let _;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,J.jsx)(`span`,{className:`absolute bottom-0 left-0 w-0 h-[1.5px] bg-black transition-all duration-300 group-hover:w-full`}),e[22]=_):_=e[22];let v;e[23]===g?v=e[24]:(v=(0,J.jsxs)(Aa,{to:`/api-keys`,onClick:g,className:`relative py-1 text-[10px] font-bold uppercase tracking-[0.1em] text-zinc-600 hover:text-black transition-colors group`,children:[`API Keys`,_]}),e[23]=g,e[24]=v);let y;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,J.jsx)(W,{}),e[25]=y):y=e[25];let b;e[26]===v?b=e[27]:(b=(0,J.jsx)(nd,{when:`signed-in`,children:(0,J.jsxs)(`div`,{className:`flex items-center gap-6`,children:[h,v,y]})}),e[26]=v,e[27]=b);let x;e[28]!==m||e[29]!==b?(x=(0,J.jsxs)(`div`,{className:`flex items-center gap-4 md:gap-8`,children:[r,i,a,o,s,(0,J.jsxs)(ed,{children:[m,b]})]}),e[28]=m,e[29]=b,e[30]=x):x=e[30];let S;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,J.jsx)(`div`,{className:`md:hidden`,children:(0,J.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,J.jsx)(`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`}),(0,J.jsx)(`line`,{x1:`4`,x2:`20`,y1:`6`,y2:`6`}),(0,J.jsx)(`line`,{x1:`4`,x2:`20`,y1:`18`,y2:`18`})]})}),e[31]=S):S=e[31];let C;return e[32]===x?C=e[33]:(C=(0,J.jsx)(`nav`,{className:`fixed top-0 left-0 right-0 z-50 bg-white/80 backdrop-blur-md border-b border-zinc-100`,children:(0,J.jsxs)(`div`,{className:`max-w-7xl mx-auto px-6 h-20 flex items-center justify-between`,children:[n,x,S]})}),e[32]=x,e[33]=C),C},ub=()=>{let e=(0,R.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(`div`,{className:`text-xl font-black uppercase tracking-tighter text-black`,children:`CautionLabs`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsxs)(`div`,{className:`flex flex-col items-center md:items-start space-y-2`,children:[t,(0,J.jsxs)(`div`,{className:`text-xs text-zinc-400 font-medium`,children:[`© `,new Date().getFullYear(),` CautionLabs. All rights reserved.`]})]}),e[1]=n):n=e[1];let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(`footer`,{className:`py-12 px-6 border-t border-zinc-100 bg-white mt-auto`,children:(0,J.jsxs)(`div`,{className:`max-w-7xl mx-auto flex flex-col md:flex-row justify-between items-center gap-8`,children:[n,(0,J.jsxs)(`div`,{className:`flex items-center gap-8 text-[10px] font-bold uppercase tracking-[0.15em] text-zinc-400`,children:[(0,J.jsx)(Aa,{to:`/docs`,className:`hover:text-black transition-colors`,children:`API Docs`}),(0,J.jsx)(Aa,{to:`/solutions`,className:`hover:text-black transition-colors`,children:`Solutions`})]})]})}),e[2]=r):r=e[2],r},db=()=>{let e=(0,R.c)(21),{getToken:t}=nu(),n;e[0]===t?n=e[1]:(n=async(e,t)=>{throw Error(`VITE_API_BASE_URL is not set. Check your .env.development file.`)},e[0]=t,e[1]=n);let r=n,i;e[2]===r?i=e[3]:(i=async(e,t,n)=>r(`/users/create`,{method:`POST`,body:JSON.stringify({email:e,firstName:t,lastName:n})}),e[2]=r,e[3]=i);let a=i,o;e[4]===r?o=e[5]:(o=async()=>r(`/api-keys`,{method:`GET`}),e[4]=r,e[5]=o);let s=o,c;e[6]===r?c=e[7]:(c=async e=>r(`/api-keys`,{method:`POST`,body:JSON.stringify({message:e?.trim()||void 0})}),e[6]=r,e[7]=c);let l=c,u;e[8]===r?u=e[9]:(u=async e=>r(`/api-keys`,{method:`DELETE`,body:JSON.stringify({apiKey:e})}),e[8]=r,e[9]=u);let d=u,f;e[10]===r?f=e[11]:(f=async()=>r(`/users/credits`,{method:`GET`}),e[10]=r,e[11]=f);let p=f,m;e[12]===r?m=e[13]:(m=async e=>r(`/payment/checkout`,{method:`POST`,body:JSON.stringify({amount:e})}),e[12]=r,e[13]=m);let h=m,g;return e[14]!==l||e[15]!==h||e[16]!==a||e[17]!==d||e[18]!==s||e[19]!==p?(g={createUser:a,getApiKeys:s,createApiKey:l,deleteApiKey:d,getCredits:p,createCheckoutSession:h},e[14]=l,e[15]=h,e[16]=a,e[17]=d,e[18]=s,e[19]=p,e[20]=g):g=e[20],g},fb=()=>{let{isSignedIn:e,user:t}=rc(),{createUser:n}=db();return(0,g.useEffect)(()=>{(async()=>{if(e)try{let e=t.primaryEmailAddress?.emailAddress;console.dir(t,{depth:null});let{firstName:r,lastName:i}=t;e&&r&&i&&await n(e,r,i)}catch(e){console.error(`Failed to sync user with backend:`,e)}})()},[e,t,n]),null},pb=()=>{let e=(0,R.c)(3),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(fb,{}),n=(0,J.jsx)(lb,{}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsxs)(`div`,{className:`flex flex-col min-h-screen bg-white`,children:[t,n,(0,J.jsx)(`main`,{className:`flex-grow pt-20`,children:(0,J.jsx)(Ri,{})}),(0,J.jsx)(ub,{})]}),e[2]=r):r=e[2],r},mb=()=>{let e=(0,R.c)(7),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(`div`,{className:`absolute top-0 left-1/2 -translate-x-1/2 w-[1000px] h-[600px] bg-zinc-50 rounded-full blur-[120px] -z-10 opacity-50`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsx)(`div`,{className:`inline-block py-1 px-3 border border-black/10 bg-zinc-50 text-[10px] sm:text-xs font-bold tracking-[0.2em] uppercase text-black mb-4`,children:`Advanced Text Moderation`}),e[1]=n):n=e[1];let r,i,a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsxs)(`h1`,{className:`text-5xl md:text-7xl font-black tracking-tight leading-[1.1] text-black`,children:[`Safeguard your `,(0,J.jsx)(`br`,{}),(0,J.jsx)(`span`,{className:`text-zinc-400`,children:`digital space.`})]}),i=(0,J.jsx)(`p`,{className:`text-xl md:text-2xl text-zinc-500 max-w-2xl mx-auto font-medium`,children:`Powerful, AI-driven text moderation built for modern internet. Detect and categorize risks in content in real-time.`}),a=(0,J.jsx)(`div`,{className:`flex flex-col sm:flex-row items-center justify-center gap-4 pt-4`}),e[2]=r,e[3]=i,e[4]=a):(r=e[2],i=e[3],a=e[4]);let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,J.jsxs)(`div`,{className:`max-w-4xl mx-auto space-y-8 animate-in fade-in slide-in-from-bottom-8 duration-1000`,children:[n,r,i,a,(0,J.jsx)(`div`,{className:`pt-20 opacity-20`,children:(0,J.jsxs)(`svg`,{width:`100%`,height:`40`,viewBox:`0 0 1200 40`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,className:`w-full max-w-3xl mx-auto`,children:[(0,J.jsx)(`path`,{d:`M0 20H1200`,stroke:`black`,strokeWidth:`0.5`,strokeDasharray:`10 10`}),(0,J.jsx)(`circle`,{cx:`600`,cy:`20`,r:`4`,fill:`black`})]})})]}),e[5]=o):o=e[5];let s;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsxs)(`section`,{className:`relative py-24 px-6 flex flex-col items-center justify-center text-center bg-white border-b border-zinc-100 overflow-hidden`,children:[t,o,(0,J.jsxs)(`div`,{className:`absolute bottom-12 left-1/2 -translate-x-1/2 flex flex-col items-center gap-3`,children:[(0,J.jsx)(`div`,{className:`w-[30px] h-[50px] border-2 border-black/10 rounded-full flex justify-center p-2 bg-white/50 backdrop-blur-sm`,children:(0,J.jsx)(`div`,{className:`w-1.5 h-1.5 bg-black rounded-full animate-bounce-slow`})}),(0,J.jsx)(`span`,{className:`text-[10px] uppercase tracking-[0.4em] font-black text-black/20`,children:`Scroll`})]})]}),e[6]=s):s=e[6],s},hb=e=>{let t=(0,R.c)(11),{title:n,description:r,icon:i,className:a}=e,o=`
p-12 bg-white border border-zinc-200
hover:border-black transition-colors duration-300
group flex flex-col items-center text-center
${a===void 0?``:a}
`,s;t[0]===i?s=t[1]:(s=i&&(0,J.jsx)(`div`,{className:`mb-8 text-black group-hover:scale-110 transition-transform duration-500`,children:i}),t[0]=i,t[1]=s);let c;t[2]===n?c=t[3]:(c=(0,J.jsx)(`h3`,{className:`text-3xl font-black mb-6 text-black tracking-tight uppercase italic underline decoration-1 underline-offset-8`,children:n}),t[2]=n,t[3]=c);let l;t[4]===r?l=t[5]:(l=(0,J.jsx)(`p`,{className:`text-lg text-zinc-500 leading-relaxed max-w-sm`,children:r}),t[4]=r,t[5]=l);let u;return t[6]!==o||t[7]!==s||t[8]!==c||t[9]!==l?(u=(0,J.jsxs)(`div`,{className:o,children:[s,c,l]}),t[6]=o,t[7]=s,t[8]=c,t[9]=l,t[10]=u):u=t[10],u},gb=()=>{let e=(0,R.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={title:`Text Moderation`,description:`Sophisticated detection and categorization of toxicity, high risks and harmful content across multiple languages.`,icon:(0,J.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`48`,height:`48`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,J.jsx)(`path`,{d:`M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10`})}),link:`/solutions/toxicity-detection`},e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=[t,{title:`Real-time API`,description:`Ultra-low latency API designed for high-throughput communities and seamless integration.`,icon:(0,J.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`48`,height:`48`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,J.jsx)(`path`,{d:`M13 2L3 14h9l-1 8 10-12h-9l1-8z`})}),link:`/solutions/spam-detection`}],e[1]=n):n=e[1];let r=n,i;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsx)(`section`,{className:`py-24 px-6 bg-white max-w-7xl mx-auto`,children:(0,J.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-12`,children:r.map(_b)})}),e[2]=i):i=e[2],i};function _b(e,t){return(0,J.jsx)(Aa,{to:e.link,className:`no-underline`,children:(0,J.jsx)(hb,{title:e.title,description:e.description,icon:e.icon})},t)}var vb=`CautionLabs`,yb=`https://cautionlabs.com`,bb=`CautionLabs - Moderation API`,xb=`Safeguard your digital space with CautionLabs. Powerful moderation built for the modern internet. Detect and categorize risks, toxicity, and harmful content in real-time.`,Sb=`https://cdn.cautionlabs.com/transparentlabicon.webp`,Cb=()=>{let e=(0,R.c)(22),t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(`html`,{lang:`en`}),n=(0,J.jsx)(`title`,{children:bb}),p=(0,J.jsx)(`meta`,{name:`description`,content:xb}),m=(0,J.jsx)(`meta`,{name:`keywords`,content:`moderation API, content moderation, real-time moderation, toxicity detection, online community safety, CautionLabs`}),h=(0,J.jsx)(`meta`,{name:`robots`,content:`index, follow`}),g=(0,J.jsx)(`link`,{rel:`canonical`,href:yb}),_=(0,J.jsx)(`meta`,{property:`og:locale`,content:`en_US`}),v=(0,J.jsx)(`meta`,{property:`og:site_name`,content:vb}),y=(0,J.jsx)(`meta`,{property:`og:type`,content:`website`}),b=(0,J.jsx)(`meta`,{property:`og:url`,content:yb}),r=(0,J.jsx)(`meta`,{property:`og:title`,content:bb}),i=(0,J.jsx)(`meta`,{property:`og:description`,content:xb}),a=(0,J.jsx)(`meta`,{property:`og:image`,content:Sb}),o=(0,J.jsx)(`meta`,{property:`og:image:alt`,content:`CautionLabs`}),s=(0,J.jsx)(`meta`,{name:`twitter:card`,content:`summary_large_image`}),c=(0,J.jsx)(`meta`,{name:`twitter:url`,content:yb}),l=(0,J.jsx)(`meta`,{name:`twitter:title`,content:bb}),u=(0,J.jsx)(`meta`,{name:`twitter:description`,content:xb}),d=(0,J.jsx)(`meta`,{name:`twitter:image`,content:Sb}),f=(0,J.jsx)(`meta`,{name:`theme-color`,content:`#ffffff`}),e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=a,e[5]=o,e[6]=s,e[7]=c,e[8]=l,e[9]=u,e[10]=d,e[11]=f,e[12]=p,e[13]=m,e[14]=h,e[15]=g,e[16]=_,e[17]=v,e[18]=y,e[19]=b):(t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=e[9],d=e[10],f=e[11],p=e[12],m=e[13],h=e[14],g=e[15],_=e[16],v=e[17],y=e[18],b=e[19]);let x;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,J.jsx)(`script`,{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`WebSite`,name:vb,url:yb,description:xb,publisher:{"@type":`Organization`,name:vb,logo:{"@type":`ImageObject`,url:Sb}}})}),e[20]=x):x=e[20];let S;return e[21]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,J.jsxs)(Me,{prioritizeSeoTags:!0,children:[t,n,p,m,h,g,_,v,y,b,r,i,a,o,s,c,l,u,d,f,x,(0,J.jsx)(`script`,{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`Organization`,name:vb,url:yb,logo:Sb,description:`Advance Moderation for modern communities and platforms.`})})]}),e[21]=S):S=e[21],S},wb=()=>{let e=(0,R.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Cb,{}),(0,J.jsx)(mb,{}),(0,J.jsx)(gb,{})]}),e[0]=t):t=e[0],t},Tb=[{slug:`toxicity-detection`,name:`Toxicity`,tagline:`Toxicity Detection`,headline:`Detect Toxic Content`,headlineAccent:`Before It Spreads.`,description:`Identify abusive, hostile, and toxic language in real-time. Protect your community from harmful interactions with AI-powered toxicity scoring.`,metaTitle:`Toxicity Detection API — Content Moderation | CautionLabs`,metaDescription:`Detect toxic and abusive language in real-time with CautionLabs AI. Score content on a 0-1 toxicity scale. Start free.`,keywords:`toxicity detection API, toxic content filter, AI toxicity scoring, abusive language detection, online safety`,icon:`🛡ï¸`,color:`#ef4444`,problemTitle:`Toxic Content Destroys Communities`,problemDescription:`Unchecked toxicity drives away users, increases churn, and creates hostile environments. Users abandon platforms after encountering toxic behavior. Manual moderation cannot keep up with the scale of modern digital platforms.`,features:[{title:`Multi-layered Detection`,description:`Goes beyond keyword matching to understand context, sarcasm, and coded language.`},{title:`Continuous Scoring`,description:`Returns a 0–1 confidence score, letting you set your own thresholds for different contexts.`},{title:`Context-Aware`,description:`Understands conversational context to distinguish between genuine toxicity and casual speech.`}],useCases:[{industry:`Social Media`,example:`Filter toxic comments and replies in real-time feeds`},{industry:`Gaming`,example:`Moderate in-game chat to maintain fair play environments`},{industry:`Forums`,example:`Auto-flag toxic posts before they escalate into flame wars`}],apiField:`toxic`,apiDescription:`General toxicity score from 0 (safe) to 1 (highly toxic)`},{slug:`profanity-detection`,name:`Profanity`,tagline:`Profanity Filter`,headline:`Filter Explicit Language`,headlineAccent:`Instantly.`,description:`Catch profanity, slurs, and vulgar expressions across languages. Keep your platform clean with intelligent, context-aware profanity filtering.`,metaTitle:`Profanity Filter API — Profanity Detection | CautionLabs`,metaDescription:`Intelligent profanity detection API that catches explicit language, slurs, and vulgar expressions. Context-aware, multi-language. Start free.`,keywords:`profanity filter API, bad word filter, explicit language detection, swear word filter, content moderation`,icon:`🚫`,color:`#f97316`,problemTitle:`Profanity Undermines Brand Safety`,problemDescription:`Explicit language in user-generated content can damage your brand reputation and alienate advertisers. Simple word lists fail to catch creative misspellings, unicode tricks, and contextual profanity.`,features:[{title:`Beyond Word Lists`,description:`AI-powered detection catches creative misspellings, leetspeak, and unicode obfuscation.`},{title:`Multi-Language Support`,description:`Detects profanity across multiple languages and cultural contexts.`},{title:`Contextual Awareness`,description:`Distinguishes between profanity used aggressively vs. casual slang to reduce false positives.`}],useCases:[{industry:`E-commerce`,example:`Clean product reviews and Q&A sections automatically`},{industry:`Education`,example:`Maintain safe language in student collaboration platforms`},{industry:`Streaming`,example:`Filter live chat profanity during broadcasts in real-time`}],apiField:`profanity`,apiDescription:`Profanity confidence score from 0 (clean) to 1 (highly explicit)`},{slug:`hate-speech-detection`,name:`Hate Speech`,tagline:`Hate Speech Detection`,headline:`Eliminate Hate Speech`,headlineAccent:`At Scale.`,description:`Detect hateful content targeting identity groups based on race, religion, gender, and more. Build inclusive communities with precision hate speech analysis.`,metaTitle:`Hate Speech Detection API | CautionLabs`,metaDescription:`Detect hate speech targeting identity groups with CautionLabs AI API. Real-time analysis for race, religion, gender-based hatred. Start free.`,keywords:`hate speech detection API, hate content filter, racist content detection, anti-hate AI, content safety`,icon:`âš–ï¸`,color:`#dc2626`,problemTitle:`Hate Speech Has No Place Online`,problemDescription:`Hateful content creates hostile environments and can have real-world consequences. Platforms face regulatory pressure to remove hate speech quickly. Manual review is too slow — automated detection is essential.`,features:[{title:`Identity-Aware`,description:`Detects hate targeting race, ethnicity, religion, gender, sexual orientation, and disability.`},{title:`Implicit Hate Detection`,description:`Catches coded language, dog whistles, and veiled hate that keyword filters miss.`},{title:`Regulatory Compliance`,description:`Helps meet requirements under the Digital Services Act, NetzDG, and similar legislation.`}],useCases:[{industry:`Social Platforms`,example:`Auto-remove hateful posts before they go viral`},{industry:`News Sites`,example:`Moderate comment sections to maintain civil discourse`},{industry:`Enterprise`,example:`Monitor internal communications for workplace hate speech`}],apiField:`hate`,apiDescription:`Hate speech score from 0 (no hate) to 1 (strong hate)`},{slug:`harassment-detection`,name:`Harassment`,tagline:`Harassment Detection`,headline:`Stop Online Harassment`,headlineAccent:`In Real-Time.`,description:`Identify bullying, intimidation, and targeted attacks before they escalate. Protect your users with intelligent harassment detection powered by AI.`,metaTitle:`Harassment Detection API — Anti-Bullying Filter | CautionLabs`,metaDescription:`Detect online harassment, bullying, and targeted attacks in real-time. AI-powered API with 0-1 scoring. Protect your users. Start free.`,keywords:`harassment detection API, cyberbullying detection, anti-bullying filter, online harassment AI, targeted attack detection`,icon:`🎯`,color:`#e11d48`,problemTitle:`Harassment Silences Your Users`,problemDescription:`Online harassment causes real psychological harm. Many internet users have experienced harassment, and they leave platforms permanently. Proactive detection is the only way to protect your community at scale.`,features:[{title:`Pattern Recognition`,description:`Identifies repeated targeting, pile-on attacks, and coordinated harassment campaigns.`},{title:`Severity Grading`,description:`Grades harassment from mild teasing to severe threats, so you can respond proportionally.`},{title:`Direct & Indirect`,description:`Catches both overt attacks and subtle, indirect harassment like passive-aggressive undermining.`}],useCases:[{industry:`Gaming`,example:`Detect toxic player behavior and griefing in chat`},{industry:`Social Media`,example:`Identify and flag coordinated pile-on harassment campaigns`},{industry:`Workplace Tools`,example:`Monitor for workplace bullying in messaging platforms`}],apiField:`harassment`,apiDescription:`Harassment score from 0 (safe) to 1 (severe harassment)`},{slug:`self-harm-detection`,name:`Self-Harm`,tagline:`Self-Harm Detection`,headline:`Detect Self-Harm Content`,headlineAccent:`Save Lives.`,description:`Identify content promoting or describing self-injury and suicidal ideation. Enable early intervention with sensitive, accurate AI detection.`,metaTitle:`Self-Harm Detection API — Content Safety | CautionLabs`,metaDescription:`Detect self-harm and suicidal content with CautionLabs AI API. Sensitive, accurate detection enables early intervention. Protect vulnerable users.`,keywords:`self-harm detection API, suicide prevention content filter, self-injury detection, content safety AI, mental health moderation`,icon:`💜`,color:`#a855f7`,problemTitle:`Self-Harm Content Requires Immediate Action`,problemDescription:`Content glorifying or instructing self-harm can trigger vulnerable individuals. Platforms have a duty of care to detect and respond to such content immediately. Every minute matters.`,features:[{title:`Sensitive Detection`,description:`Trained to distinguish between harm promotion and recovery/support discussions.`},{title:`Urgency Scoring`,description:`Flags imminent-risk content differently from general mentions, enabling priority response.`},{title:`Crisis Integration`,description:`Pair with crisis hotline resources to provide immediate support to at-risk users.`}],useCases:[{industry:`Social Media`,example:`Flag at-risk posts and surface crisis resources to the user`},{industry:`Healthcare`,example:`Monitor patient forums for signs of self-harm ideation`},{industry:`Education`,example:`Protect student platforms with early warning detection`}],apiField:`self_harm`,apiDescription:`Self-harm content score from 0 (safe) to 1 (high risk)`},{slug:`adult-content-detection`,name:`Adult Content`,tagline:`Adult Content Detection`,headline:`Filter Adult Content`,headlineAccent:`Automatically.`,description:`Detect sexually explicit and suggestive material in user text. Maintain platform standards and advertiser confidence with precise adult content scoring.`,metaTitle:`Adult Content Detection API — NSFW Text Filter | CautionLabs`,metaDescription:`Detect NSFW and sexually explicit text content with CautionLabs AI API. Protect minors, maintain brand safety, and comply with regulations.`,keywords:`NSFW detection API, adult content filter, explicit text detection, sexual content moderation, brand safety API`,icon:`🔞`,color:`#ec4899`,problemTitle:`Adult Content Risks Brand Safety & Compliance`,problemDescription:`Unfiltered adult content damages brand reputation, drives away advertisers, and creates legal liability. Age-gating alone is insufficient — you need proactive detection at the content level.`,features:[{title:`Nuanced Detection`,description:`Distinguishes between clinical/educational content and genuinely explicit material.`},{title:`Suggestive vs. Explicit`,description:`Graduated scoring lets you set different thresholds for suggestive and explicitly sexual content.`},{title:`Advertiser Safe`,description:`Keep ad-supported content in brand-safe zones with configurable sensitivity levels.`}],useCases:[{industry:`UGC Platforms`,example:`Auto-filter explicit text in posts, bios, and messages`},{industry:`Dating Apps`,example:`Enforce community guidelines while allowing appropriate content`},{industry:`Ad Tech`,example:`Ensure ad placements never appear near explicit content`}],apiField:`adult`,apiDescription:`Adult content score from 0 (safe) to 1 (highly explicit)`},{slug:`violence-detection`,name:`Violence`,tagline:`Violence Detection`,headline:`Detect Violent Content`,headlineAccent:`Proactively.`,description:`Identify graphic violence, threats of physical harm, and glorification of violence. Keep your platform safe with real-time violence detection.`,metaTitle:`Violence Detection API — Threat & Violence Filter | CautionLabs`,metaDescription:`Detect violent content, graphic descriptions, and physical threats in text with CautionLabs AI. Real-time 0-1 scoring. Start free.`,keywords:`violence detection API, violent content filter, threat detection, graphic violence AI, content safety`,icon:`âš”ï¸`,color:`#b91c1c`,problemTitle:`Violent Content Creates Real-World Harm`,problemDescription:`Violent content can incite real-world violence, traumatize users, and expose platforms to legal liability. From graphic descriptions to veiled threats, AI detection catches what manual review misses.`,features:[{title:`Threat Detection`,description:`Identifies direct threats, indirect threats, and conditional threats of physical harm.`},{title:`Graphic Content Scoring`,description:`Scores graphic descriptions of violence separately from threats, enabling nuanced policies.`},{title:`Glorification Detection`,description:`Catches content that celebrates or glorifies violence, even without explicit descriptions.`}],useCases:[{industry:`News Platforms`,example:`Filter graphic user comments on sensitive stories`},{industry:`Social Media`,example:`Detect and remove threats before they become incidents`},{industry:`Gaming`,example:`Moderate player threats that cross the line from gameplay to real harm`}],apiField:`violence`,apiDescription:`Violence score from 0 (non-violent) to 1 (graphic/threatening)`},{slug:`drug-content-detection`,name:`Drug Content`,tagline:`Drug Content Detection`,headline:`Detect Drug-Related Content`,headlineAccent:`With Precision.`,description:`Identify content promoting, glorifying, or facilitating illegal drug use. Maintain compliance and community safety with AI-powered drug content analysis.`,metaTitle:`Drug Content Detection API — Substance Abuse Filter | CautionLabs`,metaDescription:`Detect drug-related content, substance promotion, and illegal drug discussions with CautionLabs AI API. Maintain compliance effortlessly.`,keywords:`drug content detection API, substance abuse filter, drug promotion detection, content compliance, illegal drug content AI`,icon:`💊`,color:`#16a34a`,problemTitle:`Drug Content Creates Compliance Risk`,problemDescription:`Content promoting illegal substances violates platform policies and regulatory requirements. From casual drug glorification to outright sales solicitation, platforms need proactive detection to stay compliant.`,features:[{title:`Promotion vs. Discussion`,description:`Distinguishes between drug promotion/glorification and educational or harm-reduction content.`},{title:`Sales Detection`,description:`Catches coded language used in drug solicitation and marketplace activity.`},{title:`Substance Classification`,description:`Identifies references to specific substance categories for granular policy enforcement.`}],useCases:[{industry:`Social Media`,example:`Detect and remove drug promotion and sales solicitation`},{industry:`Marketplaces`,example:`Catch coded drug listings that evade keyword filters`},{industry:`Youth Platforms`,example:`Protect minors from drug-related content and solicitation`}],apiField:`drugs`,apiDescription:`Drug content score from 0 (safe) to 1 (drug-related)`},{slug:`weapons-detection`,name:`Weapons`,tagline:`Weapons Content Detection`,headline:`Detect Weapons Content`,headlineAccent:`Protect Your Platform.`,description:`Identify content promoting dangerous weapons, illegal sales, and weapons-related threats. Safeguard your community with real-time weapons content detection.`,metaTitle:`Weapons Content Detection API — Safety Filter | CautionLabs`,metaDescription:`Detect weapons-related content, illegal sales, and dangerous weapons promotion with CautionLabs AI. Real-time detection API. Start free.`,keywords:`weapons detection API, gun content filter, weapons content moderation, illegal weapons detection, firearms content AI`,icon:`🔫`,color:`#78716c`,problemTitle:`Weapons Content Requires Vigilant Moderation`,problemDescription:`Content promoting weapons sales, manufacturing, or use poses serious safety and legal risks. Platforms must detect weapons-related content proactively to prevent harm and maintain community trust.`,features:[{title:`Sales Detection`,description:`Catches illegal weapons sales, trades, and solicitation across text content.`},{title:`Manufacturing Content`,description:`Detects instructions for weapons manufacturing and modification, including 3D printing.`},{title:`Threat Context`,description:`Identifies when weapons mentions escalate to genuine threats requiring immediate action.`}],useCases:[{industry:`Marketplaces`,example:`Prevent illegal weapons listings and coded sales posts`},{industry:`Social Media`,example:`Flag weapons-related threats for law enforcement review`},{industry:`Forums`,example:`Moderate weapons discussions to separate legal hobby content from dangerous posts`}],apiField:`weapons`,apiDescription:`Weapons content score from 0 (safe) to 1 (weapons-related)`},{slug:`pii-detection`,name:`PII Detection`,tagline:`PII Detection`,headline:`Detect Personal Information`,headlineAccent:`Prevent Data Leaks.`,description:`Identify exposed personal information like emails, phone numbers, SSNs, and addresses in user content. Prevent data leaks and ensure privacy compliance.`,metaTitle:`PII Detection API — Personal Data Protection | CautionLabs`,metaDescription:`Detect PII like emails, phone numbers, SSNs, and addresses in text with CautionLabs AI. Real-time scanning for GDPR/CCPA compliance.`,keywords:`PII detection API, personal data detection, GDPR compliance, email detection, SSN detection, data leak prevention`,icon:`🔒`,color:`#2563eb`,problemTitle:`Leaked PII Means Regulatory Fines & Lost Trust`,problemDescription:`Users accidentally share personal data in public posts, chats, and forums. Under GDPR, CCPA, and other regulations, platforms face massive fines for failing to protect personal information. Proactive detection is essential.`,features:[{title:`Multi-Type Detection`,description:`Catches emails, phone numbers, SSNs, addresses, credit card numbers, and more.`},{title:`Compliance Ready`,description:`Designed for GDPR, CCPA, HIPAA, and other privacy regulation compliance workflows.`},{title:`Auto-Redaction Ready`,description:`Pair with your redaction pipeline to automatically mask detected PII before it goes public.`}],useCases:[{industry:`Healthcare`,example:`Prevent patient data leakage in support forums and chat`},{industry:`Finance`,example:`Detect account numbers and SSNs shared in customer communications`},{industry:`Social Media`,example:`Auto-detect and warn users before they post personal information publicly`}],apiField:`pii`,apiDescription:`PII presence score from 0 (clean) to 1 (contains PII)`},{slug:`spam-detection`,name:`Spam`,tagline:`Spam Detection`,headline:`Eliminate Spam`,headlineAccent:`Effortlessly.`,description:`Detect unsolicited promotional content, repetitive messages, and bot-generated spam. Keep your platform clean and your signal-to-noise ratio high.`,metaTitle:`Spam Detection API — Anti-Spam Filter | CautionLabs`,metaDescription:`Detect and filter spam, promotional content, and bot messages with CautionLabs AI API. Real-time scoring. Start free.`,keywords:`spam detection API, anti-spam filter, bot detection, promotional content filter, content quality AI`,icon:`📧`,color:`#eab308`,problemTitle:`Spam Drowns Out Real Conversations`,problemDescription:`Spam floods platforms with noise — promotional links, bot-generated content, and repetitive messages degrade user experience. Users leave platforms where spam overwhelms genuine interaction.`,features:[{title:`Bot Detection`,description:`Identifies bot-generated content patterns including template spam and auto-generated messages.`},{title:`Promotional Scoring`,description:`Detects unsolicited promotional content disguised as genuine posts or reviews.`},{title:`Duplicate Detection`,description:`Catches repetitive content across multiple users or accounts, typical of spam campaigns.`}],useCases:[{industry:`Forums`,example:`Auto-filter spam posts and bot accounts in real-time`},{industry:`E-commerce`,example:`Detect fake reviews and promotional spam in ratings`},{industry:`Messaging`,example:`Block spam messages before they reach users in chat applications`}],apiField:`spam`,apiDescription:`Spam confidence score from 0 (genuine) to 1 (definite spam)`},{slug:`minor-safety-detection`,name:`Minor Safety`,tagline:`Minor Safety Detection`,headline:`Protect Minors`,headlineAccent:`Zero Compromise.`,description:`Detect content that endangers children and minors. From predatory behavior to exploitative material — safeguard the most vulnerable with critical-priority detection.`,metaTitle:`Minor Safety Detection API — Child Protection | CautionLabs`,metaDescription:`Detect content endangering minors with CautionLabs AI API. Identify predatory behavior, grooming, and exploitative content. Zero tolerance.`,keywords:`child safety API, minor protection, CSAM detection, grooming detection, child exploitation filter, online child safety`,icon:`👶`,color:`#0ea5e9`,problemTitle:`Protecting Minors Is Non-Negotiable`,problemDescription:`Content endangering children is the highest-priority moderation challenge. Platforms face criminal liability, regulatory action, and irreparable brand damage for failure to detect and remove exploitative content targeting minors.`,features:[{title:`Grooming Detection`,description:`Identifies predatory communication patterns and grooming behavior in conversations.`},{title:`Age-Inappropriate Content`,description:`Flags content inappropriate for minor audiences, even if not technically illegal.`},{title:`Critical Priority`,description:`Highest-priority flagging with immediate alert capabilities for emergency response teams.`}],useCases:[{industry:`Social Media`,example:`Detect grooming patterns in DMs and comments targeting young users`},{industry:`Gaming`,example:`Monitor in-game chat for predatory behavior toward minor players`},{industry:`Education`,example:`Ensure student platforms remain safe from exploitative content`}],apiField:`minor`,apiDescription:`Minor safety risk score from 0 (safe) to 1 (critical risk)`}],Eb=e=>Tb.find(t=>t.slug===e),Db=e=>{let t=(0,R.c)(20),{field:n,description:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsxs)(`div`,{className:`flex items-center gap-2 mb-4 pb-4 border-b border-zinc-800`,children:[(0,J.jsx)(`div`,{className:`w-3 h-3 rounded-full bg-red-500/80`}),(0,J.jsx)(`div`,{className:`w-3 h-3 rounded-full bg-yellow-500/80`}),(0,J.jsx)(`div`,{className:`w-3 h-3 rounded-full bg-green-500/80`}),(0,J.jsx)(`span`,{className:`ml-2 text-zinc-500 text-xs`,children:`api-request.sh`})]}),t[0]=i):i=t[0];let a=`# Analyze text for `+n+` content`,o;t[1]===a?o=t[2]:(o=(0,J.jsx)(`span`,{className:`code-comment`,children:a}),t[1]=a,t[2]=o);let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsx)(`span`,{className:`code-keyword`,children:`curl`}),t[3]=s):s=t[3];let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,J.jsx)(`span`,{className:`code-string`,children:`POST`}),t[4]=c):c=t[4];let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,J.jsx)(`span`,{className:`code-url`,children:`https://api.cautionlabs.com/v1/moderate`}),t[5]=l):l=t[5];let u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,J.jsx)(`span`,{className:`code-string`,children:`"Authorization: Bearer YOUR_API_KEY"`}),t[6]=u):u=t[6];let d;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,J.jsx)(`span`,{className:`code-string`,children:`"Content-Type: application/json"`}),t[7]=d):d=t[7];let f;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,J.jsx)(`span`,{className:`code-string`,children:`'{"text": "Your content to analyze"}'`}),t[8]=f):f=t[8];let p;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,J.jsx)(`span`,{className:`code-comment`,children:`// Response`}),t[9]=p):p=t[9];let m;t[10]===n?m=t[11]:(m=(0,J.jsxs)(`span`,{className:`code-key`,children:[`"`,n,`"`]}),t[10]=n,t[11]=m);let h;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,J.jsx)(`span`,{className:`code-number`,children:`0.87`}),t[12]=h):h=t[12];let g=`// `+r,_;t[13]===g?_=t[14]:(_=(0,J.jsx)(`span`,{className:`code-comment`,children:g}),t[13]=g,t[14]=_);let v;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,J.jsx)(`span`,{className:`code-comment`,children:`// ... other category scores`}),t[15]=v):v=t[15];let y;return t[16]!==m||t[17]!==_||t[18]!==o?(y=(0,J.jsxs)(`div`,{className:`solution-code-block p-6 md:p-8`,children:[i,(0,J.jsxs)(`pre`,{className:`whitespace-pre-wrap`,children:[o,`
`,s,` -X `,c,` `,l,` \\
-H `,u,` \\
-H `,d,` \\
-d `,f,`
`,p,`
`,`{
`,` `,m,`: `,h,` `,_,`
`,v,`
}`]})]}),t[16]=m,t[17]=_,t[18]=o,t[19]=y):y=t[19],y},Ob=()=>{let{slug:e}=ai(),t=Eb(e??``),{logEvent:n}=sb();if(!t)return(0,J.jsx)(`div`,{className:`min-h-[60vh] flex items-center justify-center`,children:(0,J.jsxs)(`div`,{className:`text-center`,children:[(0,J.jsx)(`h1`,{className:`text-4xl font-black text-black mb-4`,children:`Page Not Found`}),(0,J.jsx)(`p`,{className:`text-zinc-500 mb-8`,children:`This solution page doesn't exist.`}),(0,J.jsx)(Aa,{to:`/`,className:`text-sm font-bold uppercase tracking-widest text-black border-b-2 border-black pb-1 hover:opacity-60 transition-opacity`,children:`Go Home`})]})});let r={"@context":`https://schema.org`,"@type":`SoftwareApplication`,name:`CautionLabs ${t.name} Detection`,applicationCategory:`DeveloperApplication`,operatingSystem:`Web API`,description:t.description,url:`https://cautionlabs.com/solutions/${t.slug}`,offers:{"@type":`Offer`,price:`0`,priceCurrency:`USD`,description:`Free tier available`},provider:{"@type":`Organization`,name:`CautionLabs`,url:`https://cautionlabs.com`}},i=Tb.filter(e=>e.slug!==t.slug);return(0,J.jsxs)(`article`,{children:[(0,J.jsxs)(Me,{children:[(0,J.jsx)(`title`,{children:t.metaTitle}),(0,J.jsx)(`meta`,{name:`description`,content:t.metaDescription}),(0,J.jsx)(`meta`,{name:`keywords`,content:t.keywords}),(0,J.jsx)(`link`,{rel:`canonical`,href:`https://cautionlabs.com/solutions/${t.slug}`}),(0,J.jsx)(`meta`,{property:`og:type`,content:`website`}),(0,J.jsx)(`meta`,{property:`og:url`,content:`https://cautionlabs.com/solutions/${t.slug}`}),(0,J.jsx)(`meta`,{property:`og:title`,content:t.metaTitle}),(0,J.jsx)(`meta`,{property:`og:description`,content:t.metaDescription}),(0,J.jsx)(`meta`,{property:`og:image`,content:`https://cdn.cautionlabs.com/transparentlabicon.webp`}),(0,J.jsx)(`meta`,{property:`og:site_name`,content:`CautionLabs`}),(0,J.jsx)(`meta`,{name:`twitter:card`,content:`summary_large_image`}),(0,J.jsx)(`meta`,{name:`twitter:title`,content:t.metaTitle}),(0,J.jsx)(`meta`,{name:`twitter:description`,content:t.metaDescription}),(0,J.jsx)(`meta`,{name:`twitter:image`,content:`https://cdn.cautionlabs.com/transparentlabicon.webp`}),(0,J.jsx)(`script`,{type:`application/ld+json`,children:JSON.stringify(r)})]}),(0,J.jsxs)(`section`,{id:`hero`,className:`relative py-28 md:py-36 px-6 flex flex-col items-center justify-center text-center bg-white border-b border-zinc-100 overflow-hidden`,children:[(0,J.jsx)(`div`,{className:`solution-hero-orb absolute top-0 left-1/2 w-[800px] h-[500px] rounded-full blur-[120px] -z-10`,style:{background:`radial-gradient(circle, ${t.color}15 0%, transparent 70%)`}}),(0,J.jsxs)(`div`,{className:`max-w-4xl mx-auto space-y-8`,children:[(0,J.jsx)(`div`,{className:`inline-block py-1.5 px-4 border border-black/10 bg-zinc-50 text-[10px] sm:text-xs font-bold tracking-[0.2em] uppercase text-black mb-2`,children:t.tagline}),(0,J.jsxs)(`h1`,{className:`text-5xl md:text-7xl lg:text-8xl font-black tracking-tight leading-[1.05] text-black`,children:[t.headline,` `,(0,J.jsx)(`br`,{}),(0,J.jsx)(`span`,{className:`text-zinc-400`,children:t.headlineAccent})]}),(0,J.jsx)(`p`,{className:`text-lg md:text-xl text-zinc-500 max-w-2xl mx-auto font-medium leading-relaxed`,children:t.description}),(0,J.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-center justify-center gap-4 pt-4`,children:[(0,J.jsx)(nd,{when:`signed-out`,children:(0,J.jsx)(`span`,{onClickCapture:()=>{n(cb.INDIRECT_LOGIN,{source:`category_page_hero`,slug:e})},children:(0,J.jsx)(kd,{mode:`modal`,children:(0,J.jsx)(ob,{text:`Get Started Free`,variant:ab.PRIMARY,size:`lg`})})})}),(0,J.jsx)(nd,{when:`signed-in`,children:(0,J.jsx)(Aa,{to:`/api-keys`,onClick:()=>{n(cb.REDIRECT_TO_DASHBOARD,{source:`category_page`,slug:e})},children:(0,J.jsx)(ob,{text:`Go to Dashboard`,variant:ab.PRIMARY,size:`lg`})})})]})]}),(0,J.jsx)(`div`,{className:`absolute bottom-8 left-1/2 -translate-x-1/2 flex flex-col items-center gap-3`,children:(0,J.jsx)(`div`,{className:`w-[28px] h-[44px] border-2 border-black/10 rounded-full flex justify-center p-2 bg-white/50 backdrop-blur-sm`,children:(0,J.jsx)(`div`,{className:`w-1.5 h-1.5 bg-black rounded-full animate-bounce-slow`})})})]}),(0,J.jsx)(`section`,{id:`problem`,className:`py-20 md:py-28 px-6 bg-white`,children:(0,J.jsxs)(`div`,{className:`max-w-4xl mx-auto text-center space-y-6`,children:[(0,J.jsx)(`h2`,{className:`text-3xl md:text-5xl font-black tracking-tight text-black`,children:t.problemTitle}),(0,J.jsx)(`p`,{className:`text-lg md:text-xl text-zinc-500 max-w-3xl mx-auto leading-relaxed`,children:t.problemDescription})]})}),(0,J.jsx)(`section`,{id:`features`,className:`py-20 md:py-28 px-6 bg-white`,children:(0,J.jsxs)(`div`,{className:`max-w-6xl mx-auto`,children:[(0,J.jsxs)(`div`,{className:`text-center mb-16`,children:[(0,J.jsx)(`div`,{className:`inline-block py-1 px-3 border border-black/10 bg-zinc-50 text-[10px] font-bold tracking-[0.2em] uppercase text-black mb-4`,children:`Capabilities`}),(0,J.jsx)(`h2`,{className:`text-3xl md:text-5xl font-black tracking-tight text-black`,children:`How It Works`})]}),(0,J.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-8`,children:t.features.map((e,n)=>(0,J.jsxs)(`div`,{className:`solution-feature-card solution-fade-up solution-delay-${n%3+1} p-8 md:p-10 bg-white border border-zinc-200 flex flex-col`,children:[(0,J.jsx)(`div`,{className:`text-3xl mb-6`,children:t.icon}),(0,J.jsx)(`h3`,{className:`text-xl font-black text-black tracking-tight mb-3 uppercase`,children:e.title}),(0,J.jsx)(`p`,{className:`text-base text-zinc-500 leading-relaxed`,children:e.description})]},n))})]})}),(0,J.jsx)(`section`,{id:`api`,className:`py-20 md:py-28 px-6 bg-zinc-50 border-y border-zinc-100`,children:(0,J.jsx)(`div`,{className:`max-w-5xl mx-auto`,children:(0,J.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-12 items-center`,children:[(0,J.jsxs)(`div`,{className:`space-y-6`,children:[(0,J.jsx)(`div`,{className:`inline-block py-1 px-3 border border-black/10 bg-white text-[10px] font-bold tracking-[0.2em] uppercase text-black`,children:`Integration`}),(0,J.jsxs)(`h2`,{className:`text-3xl md:text-4xl font-black tracking-tight text-black`,children:[`One API Call. `,(0,J.jsx)(`br`,{}),(0,J.jsx)(`span`,{className:`text-zinc-400`,children:`Instant Results.`})]}),(0,J.jsxs)(`p`,{className:`text-lg text-zinc-500 leading-relaxed`,children:[`Integrate `,t.name.toLowerCase(),` detection in minutes. Send text, get a 0–1 confidence score for `,(0,J.jsx)(`strong`,{className:`text-black`,children:t.apiField}),` `,`along with all 12 moderation categories in a single response.`]}),(0,J.jsxs)(`div`,{className:`flex gap-4 pt-2`,children:[(0,J.jsx)(nd,{when:`signed-out`,children:(0,J.jsx)(`span`,{onClickCapture:()=>{n(cb.INDIRECT_LOGIN,{source:`category_page_api_section`,slug:e})},children:(0,J.jsx)(kd,{mode:`modal`,children:(0,J.jsx)(ob,{text:`Get API Key`,variant:ab.PRIMARY,size:`lg`})})})}),(0,J.jsx)(nd,{when:`signed-in`,children:(0,J.jsx)(Aa,{to:`/api-keys`,onClick:()=>{n(cb.REDIRECT_TO_DASHBOARD,{source:`category_page`,slug:e})},children:(0,J.jsx)(ob,{text:`Get API Key`,variant:ab.PRIMARY,size:`lg`})})})]})]}),(0,J.jsx)(Db,{field:t.apiField,description:t.apiDescription})]})})}),(0,J.jsx)(`section`,{id:`use-cases`,className:`py-20 md:py-28 px-6 bg-white`,children:(0,J.jsxs)(`div`,{className:`max-w-5xl mx-auto`,children:[(0,J.jsxs)(`div`,{className:`text-center mb-16`,children:[(0,J.jsx)(`div`,{className:`inline-block py-1 px-3 border border-black/10 bg-zinc-50 text-[10px] font-bold tracking-[0.2em] uppercase text-black mb-4`,children:`Use Cases`}),(0,J.jsx)(`h2`,{className:`text-3xl md:text-5xl font-black tracking-tight text-black`,children:`Built for Every Platform`})]}),(0,J.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-8`,children:t.useCases.map((e,t)=>(0,J.jsxs)(`div`,{className:`solution-fade-up solution-delay-${t%3+1} p-8 border border-zinc-200 bg-white hover:border-black transition-colors duration-300`,children:[(0,J.jsx)(`div`,{className:`inline-block py-1.5 px-4 bg-black text-white text-[10px] font-bold tracking-[0.2em] uppercase mb-6`,children:e.industry}),(0,J.jsx)(`p`,{className:`text-base text-zinc-600 leading-relaxed`,children:e.example})]},t))})]})}),(0,J.jsx)(`section`,{id:`related`,className:`py-16 md:py-20 px-6 bg-zinc-50 border-t border-zinc-100`,children:(0,J.jsxs)(`div`,{className:`max-w-6xl mx-auto`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between mb-8`,children:[(0,J.jsx)(`h2`,{className:`text-xl font-black tracking-tight text-black uppercase`,children:`Explore All Solutions`}),(0,J.jsx)(Aa,{to:`/solutions`,className:`text-[10px] font-bold uppercase tracking-[0.2em] text-zinc-400 hover:text-black transition-colors`,children:`View All →`})]}),(0,J.jsx)(`div`,{className:`grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4`,children:i.map(e=>(0,J.jsxs)(Aa,{to:`/solutions/${e.slug}`,className:`group p-5 border border-zinc-200 bg-white hover:border-black transition-all duration-300 flex items-center gap-3`,children:[(0,J.jsx)(`span`,{className:`text-2xl`,children:e.icon}),(0,J.jsx)(`span`,{className:`text-sm font-bold text-black group-hover:underline underline-offset-4`,children:e.name})]},e.slug))})]})}),(0,J.jsx)(`section`,{id:`cta`,className:`solution-cta-banner py-20 md:py-28 px-6`,children:(0,J.jsxs)(`div`,{className:`max-w-3xl mx-auto text-center space-y-6 relative z-10`,children:[(0,J.jsx)(`h2`,{className:`text-3xl md:text-5xl font-black tracking-tight`,style:{color:`#ffffff`},children:`Start Moderating in Minutes`}),(0,J.jsxs)(`p`,{className:`text-lg text-zinc-400 max-w-xl mx-auto`,children:[`Get your API key and integrate `,t.name.toLowerCase(),` detection into your platform today. Free tier included.`]}),(0,J.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-center justify-center gap-4 pt-4`,children:[(0,J.jsx)(nd,{when:`signed-out`,children:(0,J.jsx)(`span`,{onClickCapture:()=>{n(cb.INDIRECT_LOGIN,{source:`category_page_cta`,slug:e})},children:(0,J.jsx)(kd,{mode:`modal`,children:(0,J.jsx)(`button`,{className:`px-10 py-4 bg-white text-black font-bold text-sm uppercase tracking-widest hover:bg-zinc-100 transition-colors cursor-pointer`,children:`Get Started Free`})})})}),(0,J.jsx)(nd,{when:`signed-in`,children:(0,J.jsx)(Aa,{to:`/api-keys`,onClick:()=>{n(cb.REDIRECT_TO_DASHBOARD,{source:`category_page`,slug:e})},className:`px-10 py-4 bg-white text-black font-bold text-sm uppercase tracking-widest hover:bg-zinc-100 transition-colors`,children:`Go to Dashboard`})})]})]})})]})},kb=()=>{let e=(0,R.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsxs)(Me,{children:[(0,J.jsx)(`title`,{children:`AI Content Moderation Solutions — CautionLabs`}),(0,J.jsx)(`meta`,{name:`description`,content:`Explore CautionLabs' 12 AI-powered content moderation solutions. From toxicity and hate speech to PII detection and minor safety — one API, total coverage.`}),(0,J.jsx)(`meta`,{name:`keywords`,content:`AI content moderation, moderation API, toxicity detection, hate speech filter, PII detection, content safety solutions`}),(0,J.jsx)(`link`,{rel:`canonical`,href:`https://cautionlabs.com/solutions`}),(0,J.jsx)(`meta`,{property:`og:type`,content:`website`}),(0,J.jsx)(`meta`,{property:`og:url`,content:`https://cautionlabs.com/solutions`}),(0,J.jsx)(`meta`,{property:`og:title`,content:`AI Content Moderation Solutions — CautionLabs`}),(0,J.jsx)(`meta`,{property:`og:description`,content:`Explore CautionLabs' 12 AI-powered content moderation solutions. One API, total coverage.`}),(0,J.jsx)(`meta`,{property:`og:image`,content:`https://cdn.cautionlabs.com/transparentlabicon.webp`}),(0,J.jsx)(`meta`,{property:`og:site_name`,content:`CautionLabs`})]}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsx)(`div`,{className:`absolute top-0 left-1/2 -translate-x-1/2 w-[1000px] h-[600px] bg-zinc-50 rounded-full blur-[120px] -z-10 opacity-50`}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(`div`,{className:`inline-block py-1.5 px-4 border border-black/10 bg-zinc-50 text-[10px] sm:text-xs font-bold tracking-[0.2em] uppercase text-black mb-2`,children:`Solutions`}),e[2]=r):r=e[2];let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsxs)(`div`,{className:`max-w-4xl mx-auto space-y-8`,children:[r,(0,J.jsxs)(`h1`,{className:`text-5xl md:text-7xl font-black tracking-tight leading-[1.05] text-black`,children:[`12 Risk Categories. `,(0,J.jsx)(`br`,{}),(0,J.jsx)(`span`,{className:`text-zinc-400`,children:`One API Call.`})]}),(0,J.jsx)(`p`,{className:`text-lg md:text-xl text-zinc-500 max-w-2xl mx-auto font-medium leading-relaxed`,children:`Comprehensive AI-powered content moderation covering every dimension of online safety. Explore each solution below.`})]}),e[3]=i):i=e[3];let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,J.jsxs)(`section`,{className:`relative py-28 md:py-36 px-6 flex flex-col items-center justify-center text-center bg-white border-b border-zinc-100 overflow-hidden`,children:[n,i,(0,J.jsx)(`div`,{className:`absolute bottom-8 left-1/2 -translate-x-1/2 flex flex-col items-center gap-3`,children:(0,J.jsx)(`div`,{className:`w-[28px] h-[44px] border-2 border-black/10 rounded-full flex justify-center p-2 bg-white/50 backdrop-blur-sm`,children:(0,J.jsx)(`div`,{className:`w-1.5 h-1.5 bg-black rounded-full animate-bounce-slow`})})})]}),e[4]=a):a=e[4];let o;return e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,J.jsxs)(J.Fragment,{children:[t,a,(0,J.jsx)(`section`,{className:`py-20 md:py-28 px-6 bg-white`,children:(0,J.jsx)(`div`,{className:`max-w-6xl mx-auto`,children:(0,J.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6`,children:Tb.map(Ab)})})})]}),e[5]=o):o=e[5],o};function Ab(e,t){return(0,J.jsxs)(Aa,{to:`/solutions/${e.slug}`,className:`solution-feature-card solution-fade-up solution-delay-${t%3+1} group p-8 md:p-10 border border-zinc-200 bg-white flex flex-col no-underline`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-4 mb-6`,children:[(0,J.jsx)(`span`,{className:`text-3xl`,children:e.icon}),(0,J.jsx)(`div`,{className:`w-2 h-2 rounded-full`,style:{backgroundColor:e.color}})]}),(0,J.jsx)(`h2`,{className:`text-xl font-black text-black tracking-tight mb-3 uppercase group-hover:underline underline-offset-8 decoration-1`,children:e.name}),(0,J.jsx)(`p`,{className:`text-sm text-zinc-500 leading-relaxed flex-grow`,children:e.description}),(0,J.jsx)(`div`,{className:`mt-6 text-[10px] font-bold uppercase tracking-[0.2em] text-zinc-400 group-hover:text-black transition-colors`,children:`Learn more →`})]},e.slug)}var jb=e=>`${e.slice(0,7)}••••••••${e.slice(-4)}`,Mb=()=>{let e=(0,R.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,J.jsx)(`path`,{d:`M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z`}),(0,J.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]}),e[0]=t):t=e[0],t},Nb=()=>{let e=(0,R.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,J.jsx)(`path`,{d:`M9.88 9.88a3 3 0 1 0 4.24 4.24`}),(0,J.jsx)(`path`,{d:`M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68`}),(0,J.jsx)(`path`,{d:`M6.61 6.61A13.52 13.52 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61`}),(0,J.jsx)(`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`})]}),e[0]=t):t=e[0],t},Pb=()=>{let e=(0,R.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,J.jsx)(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),(0,J.jsx)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]}),e[0]=t):t=e[0],t},Fb=()=>{let e=(0,R.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`text-emerald-500`,children:(0,J.jsx)(`polyline`,{points:`20 6 9 17 4 12`})}),e[0]=t):t=e[0],t},Ib=()=>{let e=(0,R.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,J.jsx)(`path`,{d:`M3 6h18`}),(0,J.jsx)(`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`}),(0,J.jsx)(`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`}),(0,J.jsx)(`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`}),(0,J.jsx)(`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`})]}),e[0]=t):t=e[0],t},Lb=e=>new Date(e).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`}),Rb=e=>{let t=(0,R.c)(44),{apiKey:n,createdAt:r,message:i,defaultVisible:a,onDelete:o}=e,[s,c]=(0,g.useState)(a===void 0?!1:a),[l,u]=(0,g.useState)(!1),d;t[0]===n?d=t[1]:(d=()=>{navigator.clipboard.writeText(n),u(!0),setTimeout(()=>{u(!1)},2e3)},t[0]=n,t[1]=d);let f=d,p;t[2]===i?p=t[3]:(p=i?(0,J.jsx)(`p`,{className:`text-sm font-semibold text-black truncate`,children:i}):(0,J.jsx)(`p`,{className:`text-sm text-zinc-400 italic`,children:`No message`}),t[2]=i,t[3]=p);let m;t[4]===r?m=t[5]:(m=Lb(r),t[4]=r,t[5]=m);let h;t[6]===m?h=t[7]:(h=(0,J.jsxs)(`p`,{className:`text-xs text-zinc-400`,children:[`Created `,m]}),t[6]=m,t[7]=h);let _;t[8]!==p||t[9]!==h?(_=(0,J.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[p,h]}),t[8]=p,t[9]=h,t[10]=_):_=t[10];let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,J.jsx)(`span`,{className:`text-[9px] bg-emerald-50 text-emerald-600 border border-emerald-100 px-2 py-0.5 rounded-full font-black tracking-widest uppercase shrink-0`,children:`Active`}),t[11]=v):v=t[11];let y;t[12]===_?y=t[13]:(y=(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[_,v]}),t[12]=_,t[13]=y);let b=`flex-1 font-mono text-sm sm:text-base truncate transition-all ${s?`text-black font-semibold`:`text-zinc-300 tracking-[0.35em]`}`,x;t[14]!==n||t[15]!==s?(x=s?n:jb(n),t[14]=n,t[15]=s,t[16]=x):x=t[16];let S;t[17]!==x||t[18]!==b?(S=(0,J.jsx)(`p`,{className:b,children:x}),t[17]=x,t[18]=b,t[19]=S):S=t[19];let C;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>{c(zb)},t[20]=C):C=t[20];let w=s?`Hide key`:`Show key`,T;t[21]===s?T=t[22]:(T=s?(0,J.jsx)(Nb,{}):(0,J.jsx)(Mb,{}),t[21]=s,t[22]=T);let E;t[23]!==w||t[24]!==T?(E=(0,J.jsx)(`button`,{type:`button`,onClick:C,className:`p-2.5 rounded-xl text-zinc-400 hover:text-black hover:bg-zinc-100 transition-all active:scale-95`,title:w,children:T}),t[23]=w,t[24]=T,t[25]=E):E=t[25];let D;t[26]===l?D=t[27]:(D=l?(0,J.jsx)(Fb,{}):(0,J.jsx)(Pb,{}),t[26]=l,t[27]=D);let O;t[28]!==f||t[29]!==D?(O=(0,J.jsx)(`button`,{type:`button`,onClick:f,className:`p-2.5 rounded-xl text-zinc-400 hover:text-black hover:bg-zinc-100 transition-all active:scale-95`,title:`Copy key`,children:D}),t[28]=f,t[29]=D,t[30]=O):O=t[30];let k;t[31]!==E||t[32]!==O?(k=(0,J.jsxs)(`div`,{className:`flex items-center gap-0.5 shrink-0`,children:[E,O]}),t[31]=E,t[32]=O,t[33]=k):k=t[33];let A;t[34]!==S||t[35]!==k?(A=(0,J.jsxs)(`div`,{className:`flex items-center gap-3 min-h-[3.5rem] bg-zinc-50/80 border border-zinc-200 rounded-2xl px-4 sm:px-5 transition-colors hover:border-zinc-300 hover:bg-white`,children:[S,k]}),t[34]=S,t[35]=k,t[36]=A):A=t[36];let j;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,J.jsx)(Ib,{}),t[37]=j):j=t[37];let ee;t[38]===o?ee=t[39]:(ee=(0,J.jsx)(`div`,{className:`flex justify-end`,children:(0,J.jsx)(ob,{text:`Delete`,variant:ab.SECONDARY,leftIcon:j,onPress:o,size:`md`,className:`!border-red-200 !text-red-600 hover:!bg-red-50 rounded-xl`})}),t[38]=o,t[39]=ee);let M;return t[40]!==A||t[41]!==ee||t[42]!==y?(M=(0,J.jsxs)(`li`,{className:`flex flex-col gap-4 py-6 border-b border-zinc-100 last:border-0 first:pt-0`,children:[y,A,ee]}),t[40]=A,t[41]=ee,t[42]=y,t[43]=M):M=t[43],M};function zb(e){return!e}var Bb=()=>{let e=(0,R.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,J.jsx)(`path`,{d:`M5 12h14`}),(0,J.jsx)(`path`,{d:`M12 5v14`})]}),e[0]=t):t=e[0],t},Vb=e=>{let t=(0,R.c)(17),{creating:n,onCreate:r}=e,[i,a]=(0,g.useState)(``),o;t[0]!==i||t[1]!==r?(o=()=>{r(i),a(``)},t[0]=i,t[1]=r,t[2]=o):o=t[2];let s=o,c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,J.jsxs)(`label`,{htmlFor:`api-key-message`,className:`text-sm font-bold tracking-wide text-zinc-700 uppercase`,children:[`Message `,(0,J.jsx)(`span`,{className:`text-zinc-400 font-medium normal-case`,children:`(optional)`})]}),t[3]=c):c=t[3];let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=e=>{a(e.target.value)},t[4]=l):l=t[4];let u;t[5]===i?u=t[6]:(u=(0,J.jsx)(`input`,{id:`api-key-message`,type:`text`,placeholder:`e.g. Production server, CI pipeline...`,value:i,onChange:l,maxLength:120,className:`w-full h-14 bg-zinc-50 border border-zinc-200 rounded-2xl px-5 text-base text-black placeholder-zinc-400 focus:outline-none focus:border-black focus:bg-white transition-all`}),t[5]=i,t[6]=u);let d;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,J.jsx)(`p`,{className:`text-xs text-zinc-400`,children:`A short label to identify this key later.`}),t[7]=d):d=t[7];let f;t[8]===u?f=t[9]:(f=(0,J.jsxs)(`div`,{className:`space-y-2`,children:[c,u,d]}),t[8]=u,t[9]=f);let p=n?`Creating...`:`Create API Key`,m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,J.jsx)(Bb,{}),t[10]=m):m=t[10];let h;t[11]!==s||t[12]!==p?(h=(0,J.jsx)(ob,{text:p,variant:ab.PRIMARY,leftIcon:m,onPress:s,size:`lg`,className:`self-start px-12 h-14 text-sm font-black tracking-[0.1em] uppercase rounded-2xl`}),t[11]=s,t[12]=p,t[13]=h):h=t[13];let _;return t[14]!==f||t[15]!==h?(_=(0,J.jsxs)(`div`,{className:`flex flex-col gap-4 pb-6 border-b border-zinc-100`,children:[f,h]}),t[14]=f,t[15]=h,t[16]=_):_=t[16],_},Hb=e=>{let t=(0,R.c)(23),{isOpen:n,onOpenChange:r,maskedKey:i,keyMessage:a,loading:o,onConfirm:s}=e,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,J.jsxs)(By.Header,{children:[(0,J.jsx)(By.Icon,{status:`danger`}),(0,J.jsx)(By.Heading,{children:`Delete API key?`})]}),t[0]=c):c=t[0];let l;t[1]!==a||t[2]!==i?(l=(0,J.jsx)(By.Body,{children:(0,J.jsx)(`p`,{className:`text-sm text-zinc-600 leading-relaxed`,children:a?(0,J.jsxs)(J.Fragment,{children:[`Delete `,(0,J.jsx)(`span`,{className:`font-semibold text-black`,children:a}),` (`,(0,J.jsx)(`code`,{className:`font-mono text-xs bg-zinc-100 px-1.5 py-0.5 rounded`,children:i}),`)? Any integration using this key will stop working immediately.`]}):(0,J.jsxs)(J.Fragment,{children:[`This will permanently revoke`,` `,(0,J.jsx)(`code`,{className:`font-mono text-xs bg-zinc-100 px-1.5 py-0.5 rounded`,children:i}),`. Any integration using this key will stop working immediately.`]})})}),t[1]=a,t[2]=i,t[3]=l):l=t[3];let u;t[4]===r?u=t[5]:(u=()=>{r(!1)},t[4]=r,t[5]=u);let d;t[6]!==o||t[7]!==u?(d=(0,J.jsx)(Wy,{variant:`secondary`,onPress:u,isDisabled:o,children:`Cancel`}),t[6]=o,t[7]=u,t[8]=d):d=t[8];let f=o?`Deleting...`:`Delete key`,p;t[9]!==o||t[10]!==s||t[11]!==f?(p=(0,J.jsx)(Wy,{variant:`danger`,onPress:s,isDisabled:o,children:f}),t[9]=o,t[10]=s,t[11]=f,t[12]=p):p=t[12];let m;t[13]!==d||t[14]!==p?(m=(0,J.jsxs)(By.Footer,{children:[d,p]}),t[13]=d,t[14]=p,t[15]=m):m=t[15];let h;t[16]!==l||t[17]!==m?(h=(0,J.jsx)(By.Container,{children:(0,J.jsxs)(By.Dialog,{children:[c,l,m]})}),t[16]=l,t[17]=m,t[18]=h):h=t[18];let g;return t[19]!==n||t[20]!==r||t[21]!==h?(g=(0,J.jsx)(By.Backdrop,{isOpen:n,onOpenChange:r,children:h}),t[19]=n,t[20]=r,t[21]=h,t[22]=g):g=t[22],g},Ub=e=>{let t=(0,R.c)(6),{status:n,message:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsx)(qy.Indicator,{}),t[0]=i):i=t[0];let a;t[1]===r?a=t[2]:(a=(0,J.jsx)(qy.Content,{children:(0,J.jsx)(qy.Description,{children:r})}),t[1]=r,t[2]=a);let o;return t[3]!==n||t[4]!==a?(o=(0,J.jsxs)(qy,{status:n,children:[i,a]}),t[3]=n,t[4]=a,t[5]=o):o=t[5],o},Wb=e=>{let t=(0,R.c)(6),{className:n}=e,r,i,a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}),i=(0,J.jsx)(`path`,{d:`M21 3v5h-5`}),a=(0,J.jsx)(`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}),o=(0,J.jsx)(`path`,{d:`M8 16H3v5`}),t[0]=r,t[1]=i,t[2]=a,t[3]=o):(r=t[0],i=t[1],a=t[2],o=t[3]);let s;return t[4]===n?s=t[5]:(s=(0,J.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,className:n,children:[r,i,a,o]}),t[4]=n,t[5]=s),s},Gb=()=>{let{getApiKeys:e,createApiKey:t,deleteApiKey:n}=db(),r=ib(),[i,a]=(0,g.useState)([]),[o,s]=(0,g.useState)(null),[c,l]=(0,g.useState)(null),[u,d]=(0,g.useState)(!0),[f,p]=(0,g.useState)(!1),[m,h]=(0,g.useState)(!1),[_,v]=(0,g.useState)(null),y=async(t=!1)=>{d(!0),v(null);try{let n=await e();a(n.apiKeys),t&&n.message&&v({status:`success`,message:n.message})}catch(e){v({status:`danger`,message:e instanceof Error?e.message:`Failed to load API keys`})}finally{d(!1)}};(0,g.useEffect)(()=>{let t=!1;return(async()=>{d(!0),v(null);try{let n=await e();t||a(n.apiKeys)}catch(e){t||v({status:`danger`,message:e instanceof Error?e.message:`Failed to load API keys`})}finally{t||d(!1)}})(),()=>{t=!0}},[e]);let b=async e=>{p(!0),v(null);try{let n=await t(e);a(e=>[{apiKey:n.apiKey,createdAt:n.createdAt,message:n.keyMessage??null},...e]),s(n.apiKey),v({status:`success`,message:n.message})}catch(e){v({status:`danger`,message:e instanceof Error?e.message:`Failed to create API key`})}finally{p(!1)}},x=e=>{l(e),r.open()},S=async()=>{if(c){h(!0),v(null);try{let e=await n(c);a(e=>e.filter(e=>e.apiKey!==c)),o===c&&s(null),r.close(),l(null),v({status:`success`,message:e.message})}catch(e){v({status:`danger`,message:e instanceof Error?e.message:`Failed to delete API key`})}finally{h(!1)}}},C=i.find(e=>e.apiKey===c);return(0,J.jsxs)(`div`,{className:`min-h-screen pt-32 pb-24 px-6 relative overflow-hidden bg-white text-black`,children:[(0,J.jsx)(`div`,{className:`absolute top-0 left-1/2 -translate-x-1/2 w-[1000px] h-[600px] bg-zinc-50 rounded-full blur-[120px] -z-10 opacity-60`}),(0,J.jsxs)(`div`,{className:`max-w-3xl mx-auto space-y-12 animate-in fade-in slide-in-from-bottom-8 duration-1000`,children:[(0,J.jsxs)(`div`,{className:`space-y-4`,children:[(0,J.jsx)(`div`,{className:`inline-block py-1 px-3 border border-black/10 bg-zinc-50 text-[10px] font-bold tracking-[0.2em] uppercase text-black`,children:`Developer Console`}),(0,J.jsxs)(`h2`,{className:`text-5xl md:text-6xl font-black tracking-tight leading-tight`,children:[`API Key `,(0,J.jsx)(`br`,{}),(0,J.jsx)(`span`,{className:`text-zinc-400`,children:`Management.`})]}),(0,J.jsx)(`p`,{className:`text-lg text-zinc-500 max-w-xl font-medium leading-relaxed`,children:`View, copy, and manage your secret keys for the CautionLabs API.`})]}),(0,J.jsxs)(`div`,{className:`bg-white border border-zinc-100 p-10 rounded-3xl relative overflow-hidden`,children:[(0,J.jsx)(`div`,{className:`absolute top-0 left-0 w-1.5 h-full bg-black`}),(0,J.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,J.jsx)(Vb,{creating:f,onCreate:e=>void b(e)}),_&&(0,J.jsx)(Ub,{status:_.status,message:_.message}),(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,J.jsx)(`h3`,{className:`text-xl font-bold tracking-tight`,children:`Your API Keys`}),(0,J.jsxs)(`button`,{type:`button`,onClick:()=>void y(!0),className:`text-[10px] font-bold uppercase tracking-widest text-zinc-400 hover:text-black flex items-center gap-2 transition-colors`,children:[(0,J.jsx)(Wb,{}),`Refresh`]})]}),u?(0,J.jsx)(`p`,{className:`text-zinc-300 animate-pulse py-4`,children:`Loading keys...`}):i.length===0?(0,J.jsx)(`p`,{className:`text-zinc-400 italic py-4`,children:`No API keys yet.`}):(0,J.jsx)(`ul`,{children:i.map(e=>(0,J.jsx)(Rb,{apiKey:e.apiKey,createdAt:e.createdAt,message:e.message,defaultVisible:e.apiKey===o,onDelete:()=>{x(e.apiKey)}},e.apiKey))})]})]})]}),(0,J.jsx)(Hb,{isOpen:r.isOpen,onOpenChange:e=>{r.setOpen(e),e||l(null)},maskedKey:c?jb(c):``,keyMessage:C?.message,loading:m,onConfirm:()=>void S()})]})},Kb=e=>{let t=(0,R.c)(4),{children:n}=e,{isSignedIn:r,isLoaded:i}=nu();if(!i)return null;if(!r){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(`div`,{className:`inline-block py-1 px-3 bg-zinc-50 text-[10px] font-bold tracking-[0.2em] uppercase text-black`,children:`Access Restricted`}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsx)(`div`,{className:`min-h-screen flex flex-col items-center justify-center p-6 text-center bg-white`,children:(0,J.jsxs)(`div`,{className:`max-w-md space-y-6 animate-in fade-in slide-in-from-bottom-4 duration-1000`,children:[e,(0,J.jsxs)(`h2`,{className:`text-4xl font-black tracking-tight text-black`,children:[`Please sign in to `,(0,J.jsx)(`br`,{}),(0,J.jsx)(`span`,{className:`text-zinc-400`,children:`continue.`})]}),(0,J.jsxs)(`p`,{className:`text-zinc-500 font-medium`,children:[`You need to be authenticated to access this page.`,` `]})]})}),t[1]=n):n=t[1],n}let a;return t[2]===n?a=t[3]:(a=(0,J.jsx)(J.Fragment,{children:n}),t[2]=n,t[3]=a),a},qb=!(typeof navigator>`u`)&&navigator.product===`ReactNative`,Jb={timeout:qb?6e4:12e4},Yb=function(e){let t={...Jb,...typeof e==`string`?{url:e}:e};if(t.timeout=Zb(t.timeout),t.query){let{url:e,searchParams:n}=function(e){let t=e.indexOf(`?`);if(t===-1)return{url:e,searchParams:new URLSearchParams};let n=e.slice(0,t),r=e.slice(t+1);if(!qb)return{url:n,searchParams:new URLSearchParams(r)};if(typeof decodeURIComponent!=`function`)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let i=new URLSearchParams;for(let e of r.split(`&`)){let[t,n]=e.split(`=`);t&&i.append(Xb(t),Xb(n||``))}return{url:n,searchParams:i}}(t.url);for(let[r,i]of Object.entries(t.query)){if(i!==void 0)if(Array.isArray(i))for(let e of i)n.append(r,e);else n.append(r,i);let a=n.toString();a&&(t.url=`${e}?${a}`)}}return t.method=t.body&&!t.method?`POST`:(t.method||`GET`).toUpperCase(),t};function Xb(e){return decodeURIComponent(e.replace(/\+/g,` `))}function Zb(e){if(!1===e||e===0)return!1;if(e.connect||e.socket)return e;let t=Number(e);return isNaN(t)?Zb(Jb.timeout):{connect:t,socket:t}}var Qb=/^https?:\/\//i,$b=function(e){if(!Qb.test(e.url))throw Error(`"${e.url}" is not a valid URL`)};function ex(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var tx=[`request`,`response`,`progress`,`error`,`abort`],nx=[`processOptions`,`validateOptions`,`interceptRequest`,`finalizeOptions`,`onRequest`,`onResponse`,`onError`,`onReturn`,`onHeaders`];function rx(e,t){let n=[],r=nx.reduce((e,t)=>(e[t]=e[t]||[],e),{processOptions:[Yb],validateOptions:[$b]});function i(e){let n=tx.reduce((e,t)=>(e[t]=function(){let e=Object.create(null),t=0;return{publish:function(t){for(let n in e)e[n](t)},subscribe:function(n){let r=t++;return e[r]=n,function(){delete e[r]}}}}(),e),{}),i=(e=>function(t,n,...r){let i=t===`onError`,a=n;for(let n=0;n<e[t].length&&(a=(0,e[t][n])(a,...r),!i||a);n++);return a})(r),a=i(`processOptions`,e);i(`validateOptions`,a);let o={options:a,channels:n,applyMiddleware:i},s,c=n.request.subscribe(e=>{s=t(e,(t,r)=>((e,t,r)=>{let a=e,o=t;if(!a)try{o=i(`onResponse`,t,r)}catch(e){o=null,a=e}a&&=i(`onError`,a,r),a?n.error.publish(a):o&&n.response.publish(o)})(t,r,e))});n.abort.subscribe(()=>{c(),s&&s.abort()});let l=i(`onReturn`,n,o);return l===n&&n.request.publish(o),l}return i.use=function(e){if(!e)throw Error(`Tried to add middleware that resolved to falsey value`);if(typeof e==`function`)throw Error(`Tried to add middleware that was a function. It probably expects you to pass options to it.`);if(e.onReturn&&r.onReturn.length>0)throw Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return nx.forEach(t=>{e[t]&&r[t].push(e[t])}),n.push(e),i},i.clone=()=>rx(n,t),e.forEach(i.use),i}var ix,ax,ox=ex(function(){if(ax)return ix;ax=1;var e=function(e){return e.replace(/^\s+|\s+$/g,``)},t=function(e){return Object.prototype.toString.call(e)===`[object Array]`};return ix=function(n){if(!n)return{};for(var r=Object.create(null),i=e(n).split(`
`),a=0;a<i.length;a++){var o=i[a],s=o.indexOf(`:`),c=e(o.slice(0,s)).toLowerCase(),l=e(o.slice(s+1));typeof r[c]>`u`?r[c]=l:t(r[c])?r[c].push(l):r[c]=[r[c],l]}return r}}()),sx=class{onabort;onerror;onreadystatechange;ontimeout;readyState=0;response;responseText=``;responseType=``;status;statusText;withCredentials;#e;#t;#n;#r={};#i;#a={};#o;open(e,t,n){this.#e=e,this.#t=t,this.#n=``,this.readyState=1,this.onreadystatechange?.(),this.#i=void 0}abort(){this.#i&&this.#i.abort()}getAllResponseHeaders(){return this.#n}setRequestHeader(e,t){this.#r[e]=t}setInit(e,t=!0){this.#a=e,this.#o=t}send(e){let t=this.responseType!==`arraybuffer`,n={...this.#a,method:this.#e,headers:this.#r,body:e};typeof AbortController==`function`&&this.#o&&(this.#i=new AbortController,typeof EventTarget<`u`&&this.#i.signal instanceof EventTarget&&(n.signal=this.#i.signal)),typeof document<`u`&&(n.credentials=this.withCredentials?`include`:`omit`),fetch(this.#t,n).then(e=>(e.headers.forEach((e,t)=>{this.#n+=`${t}: ${e}\r\n`}),this.status=e.status,this.statusText=e.statusText,this.readyState=3,this.onreadystatechange?.(),t?e.text():e.arrayBuffer())).then(e=>{typeof e==`string`?this.responseText=e:this.response=e,this.readyState=4,this.onreadystatechange?.()}).catch(e=>{e.name===`AbortError`?this.onabort?.():this.onerror?.(e)})}},cx=typeof XMLHttpRequest==`function`?`xhr`:`fetch`,lx=cx===`xhr`?XMLHttpRequest:sx,ux=(e,t)=>{let n=e.options,r=e.applyMiddleware(`finalizeOptions`,n),i={},a=e.applyMiddleware(`interceptRequest`,void 0,{adapter:cx,context:e});if(a){let e=setTimeout(t,0,null,a);return{abort:()=>clearTimeout(e)}}let o=new lx;o instanceof sx&&typeof r.fetch==`object`&&o.setInit(r.fetch,r.useAbortSignal??!0);let s=r.headers,c=r.timeout,l=!1,u=!1,d=!1;if(o.onerror=e=>{m(o instanceof sx?e instanceof Error?e:Error(`Request error while attempting to reach is ${r.url}`,{cause:e}):Error(`Request error while attempting to reach is ${r.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:``}`))},o.ontimeout=e=>{m(Error(`Request timeout while attempting to reach ${r.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:``}`))},o.onabort=()=>{p(!0),l=!0},o.onreadystatechange=function(){c&&(p(),i.socket=setTimeout(()=>f(`ESOCKETTIMEDOUT`),c.socket)),!l&&o&&o.readyState===4&&o.status!==0&&function(){if(!(l||u||d)){if(o.status===0)return void m(Error(`Unknown XHR error`));p(),u=!0,t(null,{body:o.response||(o.responseType===``||o.responseType===`text`?o.responseText:``),url:r.url,method:r.method,headers:ox(o.getAllResponseHeaders()),statusCode:o.status,statusMessage:o.statusText})}}()},o.open(r.method,r.url,!0),o.withCredentials=!!r.withCredentials,s&&o.setRequestHeader)for(let e in s)s.hasOwnProperty(e)&&o.setRequestHeader(e,s[e]);return r.rawBody&&(o.responseType=`arraybuffer`),e.applyMiddleware(`onRequest`,{options:r,adapter:cx,request:o,context:e}),o.send(r.body||null),c&&(i.connect=setTimeout(()=>f(`ETIMEDOUT`),c.connect)),{abort:function(){l=!0,o&&o.abort()}};function f(t){d=!0,o.abort();let n=Error(t===`ESOCKETTIMEDOUT`?`Socket timed out on request to ${r.url}`:`Connection timed out on request to ${r.url}`);n.code=t,e.channels.error.publish(n)}function p(e){(e||l||o&&o.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function m(e){if(u)return;p(!0),u=!0,o=null;let n=e||Error(`Network error while attempting to reach ${r.url}`);n.isNetworkError=!0,n.request=r,t(n)}},dx=(e=[],t=ux)=>rx(e,t);function fx(e){return{}}var px,mx,hx,gx,_x,vx={exports:{}};_x||(_x=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+t[0]+(this.useColors?`%c `:` `)+`+`+e.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;t.splice(1,0,n,`color: inherit`);let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem(`debug`,e):t.storage.removeItem(`debug`)}catch{}},t.load=function(){let e;try{e=t.storage.getItem(`debug`)||t.storage.getItem(`DEBUG`)}catch{}return!e&&typeof process<`u`&&`env`in process&&(e={}.DEBUG),e},t.useColors=function(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch{}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`),t.log=console.debug||console.log||(()=>{}),e.exports=(gx?hx:(gx=1,hx=function(e){function t(e){let r,i,a,o=null;function s(...e){if(!s.enabled)return;let n=s,i=Number(new Date);n.diff=i-(r||i),n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,i)=>{if(r===`%%`)return`%`;a++;let o=t.formatters[i];if(typeof o==`function`){let t=e[a];r=o.call(n,t),e.splice(a,1),a--}return r}),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,`enabled`,{enumerable:!0,configurable:!1,get:()=>o===null?(i!==t.namespaces&&(i=t.namespaces,a=t.enabled(e)),a):o,set:e=>{o=e}}),typeof t.init==`function`&&t.init(s),s}function n(e,n){let r=t(this.namespace+(typeof n>`u`?`:`:n)+e);return r.log=this.log,r}function r(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]===`*`))t[r]===`*`?(i=r,a=n,r++):(n++,r++);else{if(i===-1)return!1;r=i+1,a++,n=a}for(;r<t.length&&t[r]===`*`;)r++;return r===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){let e=[...t.names,...t.skips.map(e=>`-`+e)].join(`,`);return t.enable(``),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];let n=(typeof e==`string`?e:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of n)e[0]===`-`?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(let n of t.skips)if(r(e,n))return!1;for(let n of t.names)if(r(e,n))return!0;return!1},t.humanize=function(){if(mx)return px;mx=1;var e=1e3,t=60*e,n=60*t,r=24*n,i=7*r;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+` `+r+(i?`s`:``)}return px=function(o,s){s||={};var c,l,u=typeof o;if(u===`string`&&o.length>0)return function(a){if(!((a=String(a)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(o){var s=parseFloat(o[1]);switch((o[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return 315576e5*s;case`weeks`:case`week`:case`w`:return s*i;case`days`:case`day`:case`d`:return s*r;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return s*n;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return s*t;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return s*e;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return s;default:return}}}}(o);if(u===`number`&&isFinite(o))return s.long?(c=o,(l=Math.abs(c))>=r?a(c,l,r,`day`):l>=n?a(c,l,n,`hour`):l>=t?a(c,l,t,`minute`):l>=e?a(c,l,e,`second`):c+` ms`):function(i){var a=Math.abs(i);return a>=r?Math.round(i/r)+`d`:a>=n?Math.round(i/n)+`h`:a>=t?Math.round(i/t)+`m`:a>=e?Math.round(i/e)+`s`:i+`ms`}(o);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(o))}}(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}))(t);let{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}}(vx,vx.exports)),vx.exports;var yx=typeof Buffer>`u`?()=>!1:e=>Buffer.isBuffer(e);function bx(e){return Object.prototype.toString.call(e)===`[object Object]`}function xx(e){if(!1===bx(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!1===bx(n)||!1===n.hasOwnProperty(`isPrototypeOf`))}var Sx=[`boolean`,`string`,`number`];function Cx(){return{processOptions:e=>{let t=e.body;return!t||typeof t.pipe==`function`||yx(t)||Sx.indexOf(typeof t)===-1&&!Array.isArray(t)&&!xx(t)?e:Object.assign({},e,{body:JSON.stringify(e.body),headers:Object.assign({},e.headers,{"Content-Type":`application/json`})})}}}function wx(e){return{onResponse:n=>{let r=n.headers[`content-type`]||``,i=e&&e.force||r.indexOf(`application/json`)!==-1;return n.body&&r&&i?Object.assign({},n,{body:t(n.body)}):n},processOptions:e=>Object.assign({},e,{headers:Object.assign({Accept:`application/json`},e.headers)})};function t(e){try{return JSON.parse(e)}catch(e){throw e.message=`Failed to parsed response body as JSON: ${e.message}`,e}}}var Tx={};typeof globalThis<`u`?Tx=globalThis:typeof window<`u`?Tx=window:typeof global<`u`?Tx=global:typeof self<`u`&&(Tx=self);var Ex=Tx;function Dx(e={}){let t=e.implementation||Ex.Observable;if(!t)throw Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:(e,n)=>new t(t=>(e.error.subscribe(e=>t.error(e)),e.progress.subscribe(e=>t.next(Object.assign({type:`progress`},e))),e.response.subscribe(e=>{t.next(Object.assign({type:`response`},e)),t.complete()}),e.request.publish(n),()=>e.abort.publish()))}}function Ox(){return{onRequest:e=>{if(e.adapter!==`xhr`)return;let t=e.request,n=e.context;function r(e){return t=>{let r=t.lengthComputable?t.loaded/t.total*100:-1;n.channels.progress.publish({stage:e,percent:r,total:t.total,loaded:t.loaded,lengthComputable:t.lengthComputable})}}`upload`in t&&`onprogress`in t.upload&&(t.upload.onprogress=r(`upload`)),`onprogress`in t&&(t.onprogress=r(`download`))}}}var kx=(e={})=>{let t=e.implementation||Promise;if(!t)throw Error("`Promise` is not available in global scope, and no implementation was passed");return{onReturn:(n,r)=>new t((t,i)=>{let a=r.options.cancelToken;a&&a.promise.then(e=>{n.abort.publish(e),i(e)}),n.error.subscribe(i),n.response.subscribe(n=>{t(e.onlyBody?n.body:n)}),setTimeout(()=>{try{n.request.publish(r)}catch(e){i(e)}},0)})}},Ax=class{__CANCEL__=!0;message;constructor(e){this.message=e}toString(){return`Cancel`+(this.message?`: ${this.message}`:``)}},jx=class e{promise;reason;constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t=null;this.promise=new Promise(e=>{t=e}),e(e=>{this.reason||(this.reason=new Ax(e),t(this.reason))})}static source=()=>{let t;return{token:new e(e=>{t=e}),cancel:t}}};kx.Cancel=Ax,kx.CancelToken=jx,kx.isCancel=e=>!(!e||!e?.__CANCEL__);var Mx=(e,t,n)=>(n.method===`GET`||n.method===`HEAD`)&&(e.isNetworkError||!1);function Nx(e){return 100*2**e+100*Math.random()}var Px=(e={})=>(e=>{let t=e.maxRetries||5,n=e.retryDelay||Nx,r=e.shouldRetry;return{onError:(e,i)=>{let a=i.options,o=a.maxRetries||t,s=a.retryDelay||n,c=a.shouldRetry||r,l=a.attemptNumber||0;if((u=a.body)!==null&&typeof u==`object`&&typeof u.pipe==`function`||!c(e,l,a)||l>=o)return e;var u;let d=Object.assign({},i,{options:Object.assign({},a,{attemptNumber:l+1})});return setTimeout(()=>i.channels.request.publish(d),s(l)),null}}})({shouldRetry:Mx,...e});Px.shouldRetry=Mx,Fx=fx;var Fx;function Ix(e){return typeof e==`function`}function Lx(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Rx=Lx(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription:
`+t.map(function(e,t){return t+1+`) `+e.toString()}).join(`
`):``,this.name=`UnsubscriptionError`,this.errors=t}});function zx(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Bx=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=Qy(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this);var c=this.initialTeardown;if(Ix(c))try{c()}catch(e){i=e instanceof Rx?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Qy(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{Ux(f)}catch(e){i??=[],e instanceof Rx?i=eb(eb([],$y(i)),$y(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new Rx(i)}},e.prototype.add=function(t){if(t&&t!==this)if(this.closed)Ux(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&zx(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&zx(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),Vx=Bx.EMPTY;function Hx(e){return e instanceof Bx||e&&`closed`in e&&Ix(e.remove)&&Ix(e.add)&&Ix(e.unsubscribe)}function Ux(e){Ix(e)?e():e.unsubscribe()}var Wx={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Gx={setTimeout:function(e,t){var n=[...arguments].slice(2),r=Gx.delegate;return r?.setTimeout?r.setTimeout.apply(r,eb([e,t],$y(n))):setTimeout.apply(void 0,eb([e,t],$y(n)))},clearTimeout:function(e){return(Gx.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Kx(e){Gx.setTimeout(function(){var t=Wx.onUnhandledError;if(t)t(e);else throw e})}function qx(){}var Jx=(function(){return Zx(`C`,void 0,void 0)})();function Yx(e){return Zx(`E`,void 0,e)}function Xx(e){return Zx(`N`,e,void 0)}function Zx(e,t,n){return{kind:e,value:t,error:n}}var Qx=null;function $x(e){if(Wx.useDeprecatedSynchronousErrorHandling){var t=!Qx;if(t&&(Qx={errorThrown:!1,error:null}),e(),t){var n=Qx,r=n.errorThrown,i=n.error;if(Qx=null,r)throw i}}else e()}function eS(e){Wx.useDeprecatedSynchronousErrorHandling&&Qx&&(Qx.errorThrown=!0,Qx.error=e)}var tS=function(e){Yy(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Hx(t)&&t.add(n)):n.destination=lS,n}return t.create=function(e,t,n){return new aS(e,t,n)},t.prototype.next=function(e){this.isStopped?cS(Xx(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?cS(Yx(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?cS(Jx,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Bx),nS=Function.prototype.bind;function rS(e,t){return nS.call(e,t)}var iS=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){oS(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){oS(e)}else oS(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){oS(e)}},e}(),aS=function(e){Yy(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(Ix(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&Wx.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&rS(t.next,o),error:t.error&&rS(t.error,o),complete:t.complete&&rS(t.complete,o)}):a=t}return i.destination=new iS(a),i}return t}(tS);function oS(e){Wx.useDeprecatedSynchronousErrorHandling?eS(e):Kx(e)}function sS(e){throw e}function cS(e,t){var n=Wx.onStoppedNotification;n&&Gx.setTimeout(function(){return n(e,t)})}var lS={closed:!0,next:qx,error:sS,complete:qx},uS=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function dS(e){return e}function fS(){return pS([...arguments])}function pS(e){return e.length===0?dS:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var mS=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=_S(e)?e:new aS(e,t,n);return $x(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=hS(t),new t(function(t,r){var i=new aS({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[uS]=function(){return this},e.prototype.pipe=function(){return pS([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=hS(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function hS(e){return e??Wx.Promise??Promise}function gS(e){return e&&Ix(e.next)&&Ix(e.error)&&Ix(e.complete)}function _S(e){return e&&e instanceof tS||gS(e)&&Hx(e)}function vS(e){return Ix(e?.lift)}function yS(e){return function(t){if(vS(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function bS(e,t,n,r,i){return new xS(e,t,n,r,i)}var xS=function(e){Yy(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(tS),SS=Lx(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),CS=function(e){Yy(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new wS(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new SS},t.prototype.next=function(e){var t=this;$x(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=Qy(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;$x(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;$x(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,`observed`,{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?Vx:(this.currentObservers=null,a.push(e),new Bx(function(){t.currentObservers=null,zx(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new mS;return e.source=this,e},t.create=function(e,t){return new wS(e,t)},t}(mS),wS=function(e){Yy(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??Vx},t}(CS),TS={now:function(){return(TS.delegate||Date).now()},delegate:void 0},ES=function(e){Yy(t,e);function t(t,n,r){t===void 0&&(t=1/0),n===void 0&&(n=1/0),r===void 0&&(r=TS);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this,r=n._infiniteTimeWindow,i=n._buffer.slice(),a=0;a<i.length&&!e.closed;a+=r?1:2)e.next(i[a]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,c=1;c<r.length&&r[c]<=o;c+=2)s=c;s&&r.splice(0,s+1)}},t}(CS),DS=function(e){Yy(t,e);function t(t,n){return e.call(this)||this}return t.prototype.schedule=function(e,t){return t===void 0&&(t=0),this},t}(Bx),OS={setInterval:function(e,t){var n=[...arguments].slice(2),r=OS.delegate;return r?.setInterval?r.setInterval.apply(r,eb([e,t],$y(n))):setInterval.apply(void 0,eb([e,t],$y(n)))},clearInterval:function(e){return(OS.delegate?.clearInterval||clearInterval)(e)},delegate:void 0},kS=function(e){Yy(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return t.prototype.schedule=function(e,t){if(t===void 0&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id??this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return n===void 0&&(n=0),OS.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(n===void 0&&(n=0),n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&OS.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error(`executing a cancelled action`);this.pending=!1;var n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r;try{this.work(e)}catch(e){n=!0,r=e||Error(`Scheduled action threw falsy error`)}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this,n=t.id,r=t.scheduler,i=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,zx(i,this),n!=null&&(this.id=this.recycleAsyncId(r,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(DS),AS=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=TS.now,e}(),jS=new(function(e){Yy(t,e);function t(t,n){n===void 0&&(n=AS.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return t.prototype.flush=function(e){var t=this.actions;if(this._active){t.push(e);return}var n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}},t}(AS))(kS),MS=new mS(function(e){return e.complete()});function NS(e){return e&&Ix(e.schedule)}function PS(e){return e[e.length-1]}function FS(e){return Ix(PS(e))?e.pop():void 0}function IS(e){return NS(PS(e))?e.pop():void 0}function LS(e,t){return typeof PS(e)==`number`?e.pop():t}var RS=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function zS(e){return Ix(e?.then)}function BS(e){return Ix(e[uS])}function VS(e){return Symbol.asyncIterator&&Ix(e?.[Symbol.asyncIterator])}function HS(e){return TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function US(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var WS=US();function GS(e){return Ix(e?.[WS])}function KS(e){return nb(this,arguments,function(){var t,n,r,i;return Zy(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,tb(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,tb(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,tb(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function qS(e){return Ix(e?.getReader)}function JS(e){if(e instanceof mS)return e;if(e!=null){if(BS(e))return YS(e);if(RS(e))return XS(e);if(zS(e))return ZS(e);if(VS(e))return $S(e);if(GS(e))return QS(e);if(qS(e))return eC(e)}throw HS(e)}function YS(e){return new mS(function(t){var n=e[uS]();if(Ix(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function XS(e){return new mS(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function ZS(e){return new mS(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,Kx)})}function QS(e){return new mS(function(t){var n,r;try{for(var i=Qy(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function $S(e){return new mS(function(t){tC(e,t).catch(function(e){return t.error(e)})})}function eC(e){return $S(KS(e))}function tC(e,t){var n,r,i,a;return Xy(this,void 0,void 0,function(){var o,s;return Zy(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=rb(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function nC(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function rC(e,t){return t===void 0&&(t=0),yS(function(n,r){n.subscribe(bS(r,function(n){return nC(r,e,function(){return r.next(n)},t)},function(){return nC(r,e,function(){return r.complete()},t)},function(n){return nC(r,e,function(){return r.error(n)},t)}))})}function iC(e,t){return t===void 0&&(t=0),yS(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function aC(e,t){return JS(e).pipe(iC(t),rC(t))}function oC(e,t){return JS(e).pipe(iC(t),rC(t))}function sC(e,t){return new mS(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function cC(e,t){return new mS(function(n){var r;return nC(n,t,function(){r=e[WS](),nC(n,t,function(){var e,t,i;try{e=r.next(),t=e.value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return Ix(r?.return)&&r.return()}})}function lC(e,t){if(!e)throw Error(`Iterable cannot be null`);return new mS(function(n){nC(n,t,function(){var r=e[Symbol.asyncIterator]();nC(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function uC(e,t){return lC(KS(e),t)}function dC(e,t){if(e!=null){if(BS(e))return aC(e,t);if(RS(e))return sC(e,t);if(zS(e))return oC(e,t);if(VS(e))return lC(e,t);if(GS(e))return cC(e,t);if(qS(e))return uC(e,t)}throw HS(e)}function fC(e,t){return t?dC(e,t):JS(e)}function pC(){var e=[...arguments];return fC(e,IS(e))}function mC(e,t){var n=Ix(e)?e:function(){return e},r=function(e){return e.error(n())};return new mS(t?function(e){return t.schedule(r,0,e)}:r)}function hC(e){return!!e&&(e instanceof mS||Ix(e.lift)&&Ix(e.subscribe))}var gC=Lx(function(e){return function(){e(this),this.name=`EmptyError`,this.message=`no elements in sequence`}});function $(e,t){var n=typeof t==`object`;return new Promise(function(r,i){var a=!1,o;e.subscribe({next:function(e){o=e,a=!0},error:i,complete:function(){a?r(o):n?r(t.defaultValue):i(new gC)}})})}function _C(e,t){var n=typeof t==`object`;return new Promise(function(r,i){var a=new aS({next:function(e){r(e),a.unsubscribe()},error:i,complete:function(){n?r(t.defaultValue):i(new gC)}});e.subscribe(a)})}function vC(e){return e instanceof Date&&!isNaN(e)}function yC(e,t){return yS(function(n,r){var i=0;n.subscribe(bS(r,function(n){r.next(e.call(t,n,i++))}))})}var bC=Array.isArray;function xC(e,t){return bC(t)?e.apply(void 0,eb([],$y(t))):e(t)}function SC(e){return yC(function(t){return xC(e,t)})}function CC(e,t,n){return n===void 0&&(n=dS),function(r){wC(t,function(){for(var i=e.length,a=Array(i),o=i,s=i,c=function(i){wC(t,function(){var c=fC(e[i],t),l=!1;c.subscribe(bS(r,function(e){a[i]=e,l||(l=!0,s--),s||r.next(n(a.slice()))},function(){--o||r.complete()}))},r)},l=0;l<i;l++)c(l)},r)}}function wC(e,t,n){e?nC(n,e,t):t()}function TC(e,t,n,r,i,a,o,s){var c=[],l=0,u=0,d=!1,f=function(){d&&!c.length&&!l&&t.complete()},p=function(e){return l<r?m(e):c.push(e)},m=function(e){a&&t.next(e),l++;var s=!1;JS(n(e,u++)).subscribe(bS(t,function(e){i?.(e),a?p(e):t.next(e)},function(){s=!0},void 0,function(){if(s)try{l--;for(var e=function(){var e=c.shift();o?nC(t,o,function(){return m(e)}):m(e)};c.length&&l<r;)e();f()}catch(e){t.error(e)}}))};return e.subscribe(bS(t,p,function(){d=!0,f()})),function(){s?.()}}function EC(e,t,n){return n===void 0&&(n=1/0),Ix(t)?EC(function(n,r){return yC(function(e,i){return t(n,e,r,i)})(JS(e(n,r)))},n):(typeof t==`number`&&(n=t),yS(function(t,r){return TC(t,r,e,n)}))}function DC(e){return e===void 0&&(e=1/0),EC(dS,e)}function OC(){return DC(1)}function kC(){var e=[...arguments];return OC()(fC(e,IS(e)))}function AC(e){return new mS(function(t){JS(e()).subscribe(t)})}function jC(e,t,n){e===void 0&&(e=0),n===void 0&&(n=jS);var r=-1;return t!=null&&(NS(t)?n=t:r=t),new mS(function(t){var i=vC(e)?+e-n.now():e;i<0&&(i=0);var a=0;return n.schedule(function(){t.closed||(t.next(a++),0<=r?this.schedule(void 0,r):t.complete())},i)})}function MC(){var e=[...arguments],t=IS(e),n=LS(e,1/0),r=e;return r.length?r.length===1?JS(r[0]):DC(n)(fC(r,t)):MS}var NC=Array.isArray;function PC(e){return e.length===1&&NC(e[0])?e[0]:e}function FC(e,t){return yS(function(n,r){var i=0;n.subscribe(bS(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}function IC(e){return yS(function(t,n){var r=null,i=!1,a;r=t.subscribe(bS(n,void 0,void 0,function(o){a=JS(e(o,IC(e)(t))),r?(r.unsubscribe(),r=null,a.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,a.subscribe(n))})}function LC(){var e=[...arguments],t=FS(e);return t?fS(LC.apply(void 0,eb([],$y(e))),SC(t)):yS(function(t,n){CC(eb([t],$y(PC(e))))(n)})}function RC(){var e=[...arguments];return LC.apply(void 0,eb([],$y(e)))}function zC(e){return yS(function(t,n){try{t.subscribe(n)}finally{n.add(e)}})}function BC(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new CS}:t,r=e.resetOnError,i=r===void 0?!0:r,a=e.resetOnComplete,o=a===void 0?!0:a,s=e.resetOnRefCountZero,c=s===void 0?!0:s;return function(e){var t,r,a,s=0,l=!1,u=!1,d=function(){r?.unsubscribe(),r=void 0},f=function(){d(),t=a=void 0,l=u=!1},p=function(){var e=t;f(),e?.unsubscribe()};return yS(function(e,m){s++,!u&&!l&&d();var h=a??=n();m.add(function(){s--,s===0&&!u&&!l&&(r=VC(p,c))}),h.subscribe(m),!t&&s>0&&(t=new aS({next:function(e){return h.next(e)},error:function(e){u=!0,d(),r=VC(f,i,e),h.error(e)},complete:function(){l=!0,d(),r=VC(f,o),h.complete()}}),JS(e).subscribe(t))})(e)}}function VC(e,t){var n=[...arguments].slice(2);if(t===!0){e();return}if(t!==!1){var r=new aS({next:function(){r.unsubscribe(),e()}});return JS(t.apply(void 0,eb([],$y(n)))).subscribe(r)}}function HC(e,t,n){var r,i,a,o,s=!1;return e&&typeof e==`object`?(r=e.bufferSize,o=r===void 0?1/0:r,i=e.windowTime,t=i===void 0?1/0:i,a=e.refCount,s=a===void 0?!1:a,n=e.scheduler):o=e??1/0,BC({connector:function(){return new ES(o,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})}function UC(e,t,n){var r=Ix(e)||t||n?{next:e,error:t,complete:n}:e;return r?yS(function(e,t){var n;(n=r.subscribe)==null||n.call(r);var i=!0;e.subscribe(bS(t,function(e){var n;(n=r.next)==null||n.call(r,e),t.next(e)},function(){var e;i=!1,(e=r.complete)==null||e.call(r),t.complete()},function(e){var n;i=!1,(n=r.error)==null||n.call(r,e),t.error(e)},function(){var e,t;i&&((e=r.unsubscribe)==null||e.call(r)),(t=r.finalize)==null||t.call(r)}))}):dS}var WC=`drafts`,GC=`versions`,KC=`.`,qC=`${WC}${KC}`,JC=`${GC}${KC}`;function YC(e){return e.startsWith(qC)}function XC(e){return e.startsWith(JC)}function ZC(e){return XC(e)?qC+ew(e):YC(e)?e:qC+e}function QC(e,t){if(t===`drafts`||t===`published`)throw Error(`Version can not be "published" or "drafts"`);return`${JC}${t}${KC}${ew(e)}`}function $C(e){if(!XC(e))return;let[t,n]=e.split(KC);return n}function ew(e){return XC(e)?e.split(KC).slice(2).join(KC):YC(e)?e.slice(qC.length):e}var tw=e=>crypto.getRandomValues(new Uint8Array(e)),nw=(e,t,n)=>{let r=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*r*t/e.length);return(a=t)=>{let o=``;for(;;){let t=n(i),s=i|0;for(;s--;)if(o+=e[t[s]&r]||``,o.length===a)return o}}},rw=(e,t=21)=>nw(e,t,tw),iw=/\r\n|[\n\r\u2028\u2029]/;function aw(e,t,n){let r=e.split(iw),{start:i,end:a,markerLines:o}=ow({start:sw(t.start,r),end:t.end?sw(t.end,r):void 0},r),s=`${a}`.length;return e.split(iw,a).slice(i,a).map((e,t)=>{let r=i+1+t,a=` ${` ${r}`.slice(-s)} |`,c=o[r],l=!o[r+1];if(!c)return` ${a}${e.length>0?` ${e}`:``}`;let u=``;if(Array.isArray(c)){let t=e.slice(0,Math.max(c[0]-1,0)).replace(/[^\t]/g,` `),r=c[1]||1;u=[`
`,a.replace(/\d/g,` `),` `,t,`^`.repeat(r)].join(``),l&&n&&(u+=` `+n)}return[`>`,a,e.length>0?` ${e}`:``,u].join(``)}).join(`
`)}function ow(e,t){let n={...e.start},r={...n,...e.end},i=n.line??-1,a=n.column??0,o=r.line,s=r.column,c=Math.max(i-3,0),l=Math.min(t.length,o+3);i===-1&&(c=0),o===-1&&(l=t.length);let u=o-i,d={};if(u)for(let e=0;e<=u;e++){let n=e+i;a?e===0?d[n]=[a,t[n-1].length-a+1]:e===u?d[n]=[0,s]:d[n]=[0,t[n-e].length]:d[n]=!0}else a===s?a?d[i]=[a,0]:d[i]=!0:d[i]=[a,s-a];return{start:c,end:l,markerLines:d}}function sw(e,t){let n=0;for(let r=0;r<t.length;r++){let i=t[r].length+1;if(n+i>e)return{line:r+1,column:e-n};n+=i}return{line:t.length,column:t[t.length-1]?.length??0}}var cw=5,lw=class extends Error{response;statusCode=400;responseBody;traceId;details;constructor(e,t){let n=dw(e,t);super(n.message),Object.assign(this,n)}},uw=class extends Error{response;statusCode=500;responseBody;traceId;details;constructor(e){let t=dw(e);super(t.message),Object.assign(this,t)}};function dw(e,t){let n=e.body,i={response:e,statusCode:e.statusCode,responseBody:vw(n,e),traceId:_w(e),message:``,details:void 0};if(!r(n))return i.message=`${gw(e,n)}${yw(i.traceId)}`,i;let a=n.error;if(typeof a==`string`&&typeof n.message==`string`)return i.message=`${a} - ${n.message}${yw(i.traceId)}`,i;if(typeof a!=`object`||!a)return typeof a==`string`?i.message=`${a}${yw(i.traceId)}`:typeof n.message==`string`?i.message=`${n.message}${yw(i.traceId)}`:i.message=`${gw(e,n)}${yw(i.traceId)}`,i;if(fw(a)||pw(a)){let e=a.items||[],t=e.slice(0,cw).map(e=>e.error?.description).filter(Boolean),r=t.length?`:
- ${t.join(`
- `)}`:``;return e.length>cw&&(r+=`
...and ${e.length-cw} more`),i.message=`${a.description}${yw(i.traceId)}${r}`,i.details=n.error,i}if(mw(a)){let e=t?.options?.query?.tag;return i.message=hw(a,e,i.traceId),i.details=n.error,i}return`description`in a&&typeof a.description==`string`?(i.message=`${a.description}${yw(i.traceId)}`,i.details=a,i):(i.message=`${gw(e,n)}${yw(i.traceId)}`,i)}function fw(e){return`type`in e&&e.type===`mutationError`&&`description`in e&&typeof e.description==`string`}function pw(e){return`type`in e&&e.type===`actionError`&&`description`in e&&typeof e.description==`string`}function mw(e){return r(e)&&e.type===`queryParseError`&&typeof e.query==`string`&&typeof e.start==`number`&&typeof e.end==`number`}function hw(e,t,n){let{query:r,start:i,end:a,description:o}=e,s=n?`
(traceId: ${n})`:``;if(!r||typeof i>`u`)return`GROQ query parse error: ${o}${s}`;let c=t?`
Tag: ${t}`:``;return`GROQ query parse error:
${aw(r,{start:i,end:a},o)}${c}${s}`}function gw(e,t){let n=typeof t==`string`?` (${bw(t,100)})`:``,r=e.statusMessage?` ${e.statusMessage}`:``;return`${e.method}-request to ${e.url} resulted in HTTP ${e.statusCode}${r}${n}`}function _w(e){let t=e?.headers?.traceparent;if(t)return t.split(`-`)[1]}function vw(e,t){return(t.headers[`content-type`]||``).toLowerCase().indexOf(`application/json`)===-1?e:JSON.stringify(e,null,2)}function yw(e){return e?` (traceId: ${e})`:``}function bw(e,t){return e.length>t?`${e.slice(0,t)}\u2026`:e}var xw=class extends Error{projectId;addOriginUrl;constructor({projectId:e}){super(`CorsOriginError`),this.name=`CorsOriginError`,this.projectId=e;let t=new URL(`https://sanity.io/manage/project/${e}/api`);if(typeof location<`u`){let{origin:e}=location;t.searchParams.set(`cors`,`add`),t.searchParams.set(`origin`,e),this.addOriginUrl=t,this.message=`The current origin is not allowed to connect to the Live Content API. Add it here: ${t}`}else this.message=`The current origin is not allowed to connect to the Live Content API. Change your configuration here: ${t}`}},Sw={onResponse:(e,t)=>{if(e.statusCode>=500)throw new uw(e);if(e.statusCode>=400)throw new lw(e,t);return e}};function Cw(e={}){let t={},n=t=>e.ignoreWarnings===void 0?!1:(Array.isArray(e.ignoreWarnings)?e.ignoreWarnings:[e.ignoreWarnings]).some(e=>typeof e==`string`?t.includes(e):e instanceof RegExp?e.test(t):!1);return{onResponse:e=>{let r=e.headers[`x-sanity-warning`],i=Array.isArray(r)?r:[r];for(let e of i)!e||t[e]||n(e)||(t[e]=!0,console.warn(e));return e}}}function ww(e,t={}){return dx([Px({shouldRetry:Tw}),...e,Cw(t),Cx(),wx(),Ox(),Sw,Dx({implementation:mS})])}function Tw(e,t,n){if(n.maxRetries===0)return!1;let r=n.method===`GET`||n.method===`HEAD`,i=(n.uri||n.url).startsWith(`/data/query`),a=e.response&&(e.response.statusCode===429||e.response.statusCode===502||e.response.statusCode===503);return(r||i)&&a?!0:Px.shouldRetry(e,t,n)}var Ew=`https://www.sanity.io/help/`;function Dw(e){return Ew+e}var Ow=[`image`,`file`],kw=[`before`,`after`,`replace`],Aw=e=>{if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(e))throw Error(`Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters`)},jw=e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")},Mw=e=>{if(Ow.indexOf(e)===-1)throw Error(`Invalid asset type: ${e}. Must be one of ${Ow.join(`, `)}`)},Nw=(e,t)=>{if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},Pw=(e,t)=>{if(typeof t!=`string`||!/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(t)||t.includes(`..`))throw Error(`${e}(): "${t}" is not a valid document ID`)},Fw=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);Pw(e,t._id)},Iw=(e,t)=>{if(typeof t!=`string`)throw Error(`\`${e}()\`: \`${t}\` is not a valid document type`)},Lw=(e,t)=>{if(!t._type)throw Error(`\`${e}()\` requires that the document contains a type (\`_type\` property)`);Iw(e,t._type)},Rw=(e,t)=>{if(t._id&&t._id!==e)throw Error(`The provided document ID (\`${t._id}\`) does not match the generated version ID (\`${e}\`)`)},zw=(e,t,n)=>{let r=`insert(at, selector, items)`;if(kw.indexOf(e)===-1){let e=kw.map(e=>`"${e}"`).join(`, `);throw Error(`${r} takes an "at"-argument which is one of: ${e}`)}if(typeof t!=`string`)throw Error(`${r} takes a "selector"-argument which must be a string`);if(!Array.isArray(n))throw Error(`${r} takes an "items"-argument which must be an array`)},Bw=e=>{if(e.dataset)return e.dataset;let t=e.resource;if(t&&t.type===`dataset`){let e=t.id.split(`.`);if(e.length!==2)throw Error(`Dataset resource ID must be in the format "project.dataset"`);return e[1]}throw Error("`dataset` must be provided to perform queries")},Vw=e=>{if(typeof e!=`string`||!/^[a-z0-9._-]{1,75}$/i.test(e))throw Error(`Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.`);return e},Hw=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:n,id:r}=t;switch(n){case`dataset`:if(r.split(`.`).length!==2)throw Error(`Dataset resource ID must be in the format "project.dataset"`);return;case`dashboard`:case`media-library`:case`canvas`:return;default:throw Error(`Unsupported resource type: ${n.toString()}`)}},Uw=(e,t)=>{if(t.resource)throw Error(`\`${e}\` does not support resource-based operations`)};function Ww(e){let t=!1,n;return(...r)=>(t||=(n=e(...r),!0),n)}var Gw=e=>Ww((...t)=>console.warn(e.join(` `),...t)),Kw=Gw(["Because you set `withCredentials` to true, we will override your `useCdn`",`setting to be false since (cookie-based) credentials are never set on the CDN`]),qw=Gw(["Since you haven't set a value for `useCdn`, we will deliver content using our",`global, edge-cached API-CDN. If you wish to have content delivered faster, set`,"`useCdn: false` to use the Live API. Note: You may incur higher costs using the live API."]),Jw=Gw(["The Sanity client is configured with the `perspective` set to `drafts` or `previewDrafts`, which doesn't support the API-CDN.","The Live API will be used instead. Set `useCdn: false` in your configuration to hide this warning."]),Yw=Gw(["The `previewDrafts` perspective has been renamed to `drafts` and will be removed in a future API version"]),Xw=Gw([`You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.`,`See ${Dw(`js-client-browser-token`)} for more information and how to hide this warning.`]),Zw=Gw(["You have configured Sanity client to use a token, but also provided `withCredentials: true`.","This is no longer supported - only token will be used - remove `withCredentials: true`."]),Qw=Gw([`Using the Sanity client without specifying an API version is deprecated.`,`See ${Dw(`js-client-api-version`)}`]);Gw(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]);var $w=Gw(["You have called `createVersion()` with a defined `document`. The recommended approach is to provide a `baseId` and `releaseId` instead."]),eT=Gw(["The `~experimental_resource` configuration property has been renamed to `resource`.","Please update your client configuration to use `resource` instead. Support for `~experimental_resource` will be removed in a future version."]),tT=`apicdn.sanity.io`,nT={apiHost:`https://api.sanity.io`,apiVersion:`1`,useProjectHostname:!0,stega:{enabled:!1}},rT=[`localhost`,`127.0.0.1`,`0.0.0.0`],iT=e=>rT.indexOf(e)!==-1;function aT(e){if(e===`1`||e===`X`)return;let t=new Date(e);if(!(/^\d{4}-\d{2}-\d{2}$/.test(e)&&t instanceof Date&&t.getTime()>0))throw Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}function oT(e){if(Array.isArray(e)&&e.length>1&&e.includes(`raw`))throw TypeError(`Invalid API perspective value: "raw". The raw-perspective can not be combined with other perspectives`)}var sT=(e,t)=>{let n={...t,...e,stega:{...typeof t.stega==`boolean`?{enabled:t.stega}:t.stega||nT.stega,...typeof e.stega==`boolean`?{enabled:e.stega}:e.stega||{}}};n.apiVersion||Qw();let r={...nT,...n};r[`~experimental_resource`]&&!r.resource&&(eT(),r.resource=r[`~experimental_resource`]);let i=r.resource,a=r.useProjectHostname&&!i;if(typeof Promise>`u`){let e=Dw(`js-client-promise-polyfill`);throw Error(`No native Promise-implementation found, polyfill needed - see ${e}`)}if(a&&!r.projectId)throw Error("Configuration must contain `projectId`");if(i&&Hw(r),typeof r.perspective<`u`&&oT(r.perspective),`encodeSourceMap`in r)throw Error(`It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMap' is not supported in '@sanity/client'. Did you mean 'stega.enabled'?`);if(`encodeSourceMapAtPath`in r)throw Error(`It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMapAtPath' is not supported in '@sanity/client'. Did you mean 'stega.filter'?`);if(typeof r.stega.enabled!=`boolean`)throw Error(`stega.enabled must be a boolean, received ${r.stega.enabled}`);if(r.stega.enabled&&r.stega.studioUrl===void 0)throw Error(`stega.studioUrl must be defined when stega.enabled is true`);if(r.stega.enabled&&typeof r.stega.studioUrl!=`string`&&typeof r.stega.studioUrl!=`function`)throw Error(`stega.studioUrl must be a string or a function, received ${r.stega.studioUrl}`);let o=typeof window<`u`&&window.location&&window.location.hostname,s=o&&iT(window.location.hostname),c=!!r.token;r.withCredentials&&c&&(Zw(),r.withCredentials=!1),o&&s&&c&&r.ignoreBrowserTokenWarning!==!0?Xw():typeof r.useCdn>`u`&&qw(),a&&jw(r.projectId),r.dataset&&Aw(r.dataset),`requestTagPrefix`in r&&(r.requestTagPrefix=r.requestTagPrefix?Vw(r.requestTagPrefix).replace(/\.+$/,``):void 0),r.apiVersion=`${r.apiVersion}`.replace(/^v/,``),r.isDefaultApi=r.apiHost===nT.apiHost,r.useCdn===!0&&r.withCredentials&&Kw(),r.useCdn=r.useCdn!==!1&&!r.withCredentials,aT(r.apiVersion);let l=r.apiHost.split(`://`,2),u=l[0],d=l[1],f=r.isDefaultApi?tT:d;return a?(r.url=`${u}://${r.projectId}.${d}/v${r.apiVersion}`,r.cdnUrl=`${u}://${r.projectId}.${f}/v${r.apiVersion}`):(r.url=`${r.apiHost}/v${r.apiVersion}`,r.cdnUrl=r.url),r},cT=class extends Error{name=`ConnectionFailedError`},lT=class extends Error{name=`DisconnectError`;reason;constructor(e,t,n={}){super(e,n),this.reason=t}},uT=class extends Error{name=`ChannelError`;data;constructor(e,t){super(e),this.data=t}},dT=class extends Error{name=`MessageError`;data;constructor(e,t,n={}){super(e,n),this.data=t}},fT=class extends Error{name=`MessageParseError`},pT=[`channelError`,`disconnect`];function mT(e,t){return AC(()=>{let t=e();return hC(t)?t:pC(t)}).pipe(EC(e=>hT(e,t)))}function hT(e,t){return new mS(n=>{let r=t.includes(`open`),i=t.includes(`reconnect`);function a(t){if(`data`in t){let[e,r]=gT(t);n.error(e?new fT(`Unable to parse EventSource error message`,{cause:r}):new dT((r?.data).message,r));return}e.readyState===e.CLOSED?n.error(new cT(`EventSource connection failed`)):i&&n.next({type:`reconnect`})}function o(){n.next({type:`open`})}function s(t){let[r,i]=gT(t);if(r){n.error(new fT(`Unable to parse EventSource message`,{cause:r}));return}if(t.type===`channelError`){let t=new URL(e.url).searchParams.get(`tag`);n.error(new uT(_T(i?.data,t),i.data));return}if(t.type===`disconnect`){n.error(new lT(`Server disconnected client: ${i.data?.reason||`unknown error`}`));return}n.next({type:t.type,id:t.lastEventId,...i.data?{data:i.data}:{}})}e.addEventListener(`error`,a),r&&e.addEventListener(`open`,o);let c=[...new Set([...pT,...t])].filter(e=>e!==`error`&&e!==`open`&&e!==`reconnect`);return c.forEach(t=>e.addEventListener(t,s)),()=>{e.removeEventListener(`error`,a),r&&e.removeEventListener(`open`,o),c.forEach(t=>e.removeEventListener(t,s)),e.close()}})}function gT(e){try{let t=typeof e.data==`string`&&JSON.parse(e.data);return[null,{type:e.type,id:e.lastEventId,...vT(t)?{}:{data:t}}]}catch(e){return[e,null]}}function _T(e,t){let n=e.error;return n?mw(n)?hw(n,t):n.description?n.description:typeof n==`string`?n:JSON.stringify(n,null,2):e.message||`Unknown listener error`}function vT(e){for(let t in e)return!1;return!0}function yT(e){if(typeof e==`string`)return{id:e};if(Array.isArray(e))return{query:`*[_id in $ids]`,params:{ids:e}};if(typeof e==`object`&&e&&`query`in e&&typeof e.query==`string`)return`params`in e&&typeof e.params==`object`&&e.params!==null?{query:e.query,params:e.params}:{query:e.query};let t=[`* Document ID (<docId>)`,`* Array of document IDs`,"* Object containing `query`"].join(`
`);throw Error(`Unknown selection - must be one of:
${t}`)}var bT=class{selection;operations;constructor(e,t={}){this.selection=e,this.operations=t}set(e){return this._assign(`set`,e)}setIfMissing(e){return this._assign(`setIfMissing`,e)}diffMatchPatch(e){return Nw(`diffMatchPatch`,e),this._assign(`diffMatchPatch`,e)}unset(e){if(!Array.isArray(e))throw Error(`unset(attrs) takes an array of attributes to unset, non-array given`);return this.operations=Object.assign({},this.operations,{unset:e}),this}inc(e){return this._assign(`inc`,e)}dec(e){return this._assign(`dec`,e)}insert(e,t,n){return zw(e,t,n),this._assign(`insert`,{[e]:t,items:n})}append(e,t){return this.insert(`after`,`${e}[-1]`,t)}prepend(e,t){return this.insert(`before`,`${e}[0]`,t)}splice(e,t,n,r){let i=typeof n>`u`||n===-1,a=t<0?t-1:t,o=i?-1:Math.max(0,t+n),s=`${e}[${a}:${a<0&&o>=0?``:o}]`;return this.insert(`replace`,s,r||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...yT(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,n=!0){return Nw(e,t),this.operations=Object.assign({},this.operations,{[e]:Object.assign({},n&&this.operations[e]||{},t)}),this}_set(e,t){return this._assign(e,t,!1)}},xT=class e extends bT{#e;constructor(e,t,n){super(e,t),this.#e=n}clone(){return new e(this.selection,{...this.operations},this.#e)}commit(e){if(!this.#e)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=typeof this.selection==`string`,n=Object.assign({returnFirst:t,returnDocuments:!0},e);return this.#e.mutate({patch:this.serialize()},n)}},ST=class e extends bT{#e;constructor(e,t,n){super(e,t),this.#e=n}clone(){return new e(this.selection,{...this.operations},this.#e)}commit(e){if(!this.#e)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=typeof this.selection==`string`,n=Object.assign({returnFirst:t,returnDocuments:!0},e);return this.#e.mutate({patch:this.serialize()},n)}},CT={returnDocuments:!1},wT=class{operations;trxId;constructor(e=[],t){this.operations=e,this.trxId=t}create(e){return Nw(`create`,e),this._add({create:e})}createIfNotExists(e){let t=`createIfNotExists`;return Nw(t,e),Fw(t,e),this._add({[t]:e})}createOrReplace(e){let t=`createOrReplace`;return Nw(t,e),Fw(t,e),this._add({[t]:e})}delete(e){return Pw(`delete`,e),this._add({delete:{id:e}})}transactionId(e){return e?(this.trxId=e,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(e){return this.operations.push(e),this}},TT=class e extends wT{#e;constructor(e,t,n){super(e,n),this.#e=t}clone(){return new e([...this.operations],this.#e,this.trxId)}commit(e){if(!this.#e)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#e.mutate(this.serialize(),Object.assign({transactionId:this.trxId},CT,e||{}))}patch(e,t){let n=typeof t==`function`,r=typeof e!=`string`&&e instanceof ST,i=typeof e==`object`&&(`query`in e||`id`in e);if(r)return this._add({patch:e.serialize()});if(n){let n=t(new ST(e,{},this.#e));if(!(n instanceof ST))throw Error("function passed to `patch()` must return the patch");return this._add({patch:n.serialize()})}if(i){let n=new ST(e,t||{},this.#e);return this._add({patch:n.serialize()})}return this._add({patch:{id:e,...t}})}},ET=class e extends wT{#e;constructor(e,t,n){super(e,n),this.#e=t}clone(){return new e([...this.operations],this.#e,this.trxId)}commit(e){if(!this.#e)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#e.mutate(this.serialize(),Object.assign({transactionId:this.trxId},CT,e||{}))}patch(e,t){let n=typeof t==`function`;if(typeof e!=`string`&&e instanceof xT)return this._add({patch:e.serialize()});if(n){let n=t(new xT(e,{},this.#e));if(!(n instanceof xT))throw Error("function passed to `patch()` must return the patch");return this._add({patch:n.serialize()})}return this._add({patch:{id:e,...t}})}},DT=`X-Sanity-Project-ID`;function OT(e,t={}){let n={};e.headers&&Object.assign(n,e.headers);let r=t.token||e.token;r&&(n.Authorization=`Bearer ${r}`),!t.useGlobalApi&&!e.useProjectHostname&&e.projectId&&(n[DT]=e.projectId);let i=!!(typeof t.withCredentials>`u`?e.withCredentials:t.withCredentials),a=typeof t.timeout>`u`?e.timeout:t.timeout;return Object.assign({},t,{headers:Object.assign({},n,t.headers||{}),timeout:typeof a>`u`?300*1e3:a,proxy:t.proxy||e.proxy,json:!0,withCredentials:i,fetch:typeof t.fetch==`object`&&typeof e.fetch==`object`?{...e.fetch,...t.fetch}:t.fetch||e.fetch})}var kT=({query:e,params:t={},options:n={}})=>{let r=new URLSearchParams,{tag:i,includeMutations:a,returnQuery:o,...s}=n;i&&r.append(`tag`,i),r.append(`query`,e);for(let[e,n]of Object.entries(t))n!==void 0&&r.append(`$${e}`,JSON.stringify(n));for(let[e,t]of Object.entries(s))t&&r.append(e,`${t}`);return o===!1&&r.append(`returnQuery`,`false`),a===!1&&r.append(`includeMutations`,`false`),`?${r}`},AT=(e,t)=>e===!1?void 0:typeof e>`u`?t:e,jT=(e={})=>({dryRun:e.dryRun,returnIds:!0,returnDocuments:AT(e.returnDocuments,!0),visibility:e.visibility||`sync`,autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}),MT=e=>e.type===`response`,NT=e=>e.body,PT=(e,t)=>e.reduce((e,n)=>(e[t(n)]=n,e),Object.create(null)),FT=11264;function IT(e,t,r,i,a={},o={}){let s=`stega`in o?{...r||{},...typeof o.stega==`boolean`?{enabled:o.stega}:o.stega||{}}:r,c=s.enabled?n(a):a,l=o.filterResponse===!1?e=>e:e=>e.result,{cache:u,next:d,...f}={useAbortSignal:typeof o.signal<`u`,resultSourceMap:s.enabled?`withKeyArraySelector`:o.resultSourceMap,...o,returnQuery:o.filterResponse===!1&&o.returnQuery!==!1},p=typeof u<`u`||typeof d<`u`?{...f,fetch:{cache:u,next:d}}:f,m=XT(e,t,`query`,{query:i,params:c},p);return s.enabled?m.pipe(RC(fC(ze(()=>import(`./stegaEncodeSourceMap-BheWRINd.js`).then(function(e){return e.stegaEncodeSourceMap$1}),__vite__mapDeps([0,1])).then(({stegaEncodeSourceMap:e})=>e))),yC(([e,t])=>{let n=t(e.result,e.resultSourceMap,s);return l({...e,result:n})})):m.pipe(yC(l))}function LT(e,t,n,r={}){return aE(e,t,{uri:sE(e,`doc`,(()=>{if(!r.releaseId)return n;let e=$C(n);if(!e){if(YC(n))throw Error(`The document ID (\`${n}\`) is a draft, but \`options.releaseId\` is set as \`${r.releaseId}\``);return QC(n,r.releaseId)}if(e!==r.releaseId)throw Error(`The document ID (\`${n}\`) is already a version of \`${e}\` release, but this does not match the provided \`options.releaseId\` (\`${r.releaseId}\`)`);return n})()),json:!0,tag:r.tag,signal:r.signal,query:r.includeAllVersions===void 0?void 0:{includeAllVersions:r.includeAllVersions}}).pipe(FC(MT),yC(e=>{let t=e.body.documents;return t?r.includeAllVersions?t:t[0]:r.includeAllVersions?[]:void 0}))}function RT(e,t,n,r={}){return aE(e,t,{uri:sE(e,`doc`,n.join(`,`)),json:!0,tag:r.tag,signal:r.signal}).pipe(FC(MT),yC(e=>{let t=PT(e.body.documents||[],e=>e._id);return n.map(e=>t[e]||null)}))}function zT(e,t,n,r={}){return XT(e,t,`query`,{query:`*[sanity::partOfRelease($releaseId)]`,params:{releaseId:n}},r)}function BT(e,t,n,r){return Fw(`createIfNotExists`,n),ZT(e,t,n,`createIfNotExists`,r)}function VT(e,t,n,r){return Fw(`createOrReplace`,n),ZT(e,t,n,`createOrReplace`,r)}function HT(e,t,n,r,i){return Fw(`createVersion`,n),Lw(`createVersion`,n),$w(),YT(e,t,{actionType:`sanity.action.document.version.create`,publishedId:r,document:n},i)}function UT(e,t,n,r,i,a,o){if(!r)throw Error("`createVersion()` requires `baseId` when no `document` is provided");if(!n)throw Error("`createVersion()` requires `publishedId` when `baseId` is provided");return Pw(`createVersion`,r),Pw(`createVersion`,n),YT(e,t,{actionType:`sanity.action.document.version.create`,publishedId:n,baseId:r,versionId:i?QC(n,i):ZC(n),ifBaseRevisionId:a},o)}function WT(e,t,n,r){return XT(e,t,`mutate`,{mutations:[{delete:yT(n)}]},r)}function GT(e,t,n,r=!1,i){return YT(e,t,{actionType:`sanity.action.document.version.discard`,versionId:n,purge:r},i)}function KT(e,t,n,r){return Fw(`replaceVersion`,n),Lw(`replaceVersion`,n),YT(e,t,{actionType:`sanity.action.document.version.replace`,document:n},r)}function qT(e,t,n,r,i){return YT(e,t,{actionType:`sanity.action.document.version.unpublish`,versionId:n,publishedId:r},i)}function JT(e,t,n,r){let i;return i=n instanceof ST||n instanceof xT?{patch:n.serialize()}:n instanceof TT||n instanceof ET?n.serialize():n,XT(e,t,`mutate`,{mutations:Array.isArray(i)?i:[i],transactionId:r&&r.transactionId||void 0},r)}function YT(e,t,n,r){return XT(e,t,`actions`,{actions:Array.isArray(n)?n:[n],transactionId:r&&r.transactionId||void 0,skipCrossDatasetReferenceValidation:r&&r.skipCrossDatasetReferenceValidation||void 0,dryRun:r&&r.dryRun||void 0},r)}function XT(e,t,n,r,i={}){let a=n===`mutate`,o=n===`actions`,s=n===`query`,c=a||o?``:kT(r),l=!a&&!o&&c.length<FT,u=l?c:``,d=i.returnFirst,{timeout:f,token:p,tag:m,headers:h,returnQuery:g,lastLiveEventId:_,cacheMode:v}=i,y=sE(e,n,u);return aE(e,t,{method:l?`GET`:`POST`,uri:y,json:!0,body:l?void 0:r,query:a&&jT(i),timeout:f,headers:h,token:p,tag:m,returnQuery:g,perspective:i.perspective,resultSourceMap:i.resultSourceMap,lastLiveEventId:Array.isArray(_)?_[0]:_,cacheMode:v,canUseCdn:s,signal:i.signal,fetch:i.fetch,useAbortSignal:i.useAbortSignal,useCdn:i.useCdn}).pipe(FC(MT),yC(NT),yC(e=>{if(!a)return e;let t=e.results||[];if(i.returnDocuments)return d?t[0]&&t[0].document:t.map(e=>e.document);let n=d?`documentId`:`documentIds`,r=d?t[0]&&t[0].id:t.map(e=>e.id);return{transactionId:e.transactionId,results:t,[n]:r}}))}function ZT(e,t,n,r,i={}){let a={[r]:n},o=Object.assign({returnFirst:!0,returnDocuments:!0},i);return XT(e,t,`mutate`,{mutations:[a]},o)}var QT=e=>{let t=e.config();return t.dataset!==void 0&&t.projectId!==void 0||t.resource!==void 0},$T=(e,t)=>QT(e)&&t.startsWith(sE(e,`query`)),eE=(e,t)=>QT(e)&&t.startsWith(sE(e,`mutate`)),tE=(e,t)=>QT(e)&&t.startsWith(sE(e,`doc`,``)),nE=(e,t)=>QT(e)&&t.startsWith(sE(e,`listen`)),rE=(e,t)=>QT(e)&&t.startsWith(sE(e,`history`,``)),iE=(e,t)=>t.startsWith(`/data/`)||$T(e,t)||eE(e,t)||tE(e,t)||nE(e,t)||rE(e,t);function aE(e,t,n){let r=n.url||n.uri,i=e.config(),a=typeof n.canUseCdn>`u`?[`GET`,`HEAD`].indexOf(n.method||`GET`)>=0&&iE(e,r):n.canUseCdn,o=(n.useCdn??i.useCdn)&&a,s=n.tag&&i.requestTagPrefix?[i.requestTagPrefix,n.tag].join(`.`):n.tag||i.requestTagPrefix;if(s&&n.tag!==null&&(n.query={tag:Vw(s),...n.query}),[`GET`,`HEAD`,`POST`].indexOf(n.method||`GET`)>=0&&$T(e,r)){let e=n.resultSourceMap??i.resultSourceMap;e!==void 0&&e!==!1&&(n.query={resultSourceMap:e,...n.query});let t=n.perspective||i.perspective;typeof t<`u`&&(t===`previewDrafts`&&Yw(),oT(t),n.query={perspective:Array.isArray(t)?t.join(`,`):t,...n.query},(Array.isArray(t)&&t.length>0||t===`previewDrafts`||t===`drafts`)&&o&&(o=!1,Jw())),n.lastLiveEventId&&(n.query={...n.query,lastLiveEventId:n.lastLiveEventId}),n.returnQuery===!1&&(n.query={returnQuery:`false`,...n.query}),o&&n.cacheMode==`noStale`&&(n.query={cacheMode:`noStale`,...n.query})}let c=OT(i,Object.assign({},n,{url:cE(e,r,o)})),l=new mS(e=>t(c,i.requester).subscribe(e));return n.signal?l.pipe(lE(n.signal)):l}function oE(e,t,n){return aE(e,t,n).pipe(FC(e=>e.type===`response`),yC(e=>e.body))}function sE(e,t,n){let r=e.config();if(r.resource)return Hw(r),`${fE(r)}/${n===void 0?t:`${t}/${n}`}`.replace(/\/($|\?)/,`$1`);let i=`/${t}/${Bw(r)}`;return`/data${n===void 0?i:`${i}/${n}`}`.replace(/\/($|\?)/,`$1`)}function cE(e,t,n=!1){let{url:r,cdnUrl:i}=e.config();return`${n?i:r}/${t.replace(/^\//,``)}`}function lE(e){return t=>new mS(n=>{let r=()=>n.error(dE(e));if(e&&e.aborted){r();return}let i=t.subscribe(n);return e.addEventListener(`abort`,r),()=>{e.removeEventListener(`abort`,r),i.unsubscribe()}})}var uE=!!globalThis.DOMException;function dE(e){if(uE)return new DOMException(e?.reason??`The operation was aborted.`,`AbortError`);let t=Error(e?.reason??`The operation was aborted.`);return t.name=`AbortError`,t}var fE=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:n,id:r}=t;switch(n){case`dataset`:{let e=r.split(`.`);if(e.length!==2)throw Error(`Dataset ID must be in the format "project.dataset"`);return`/projects/${e[0]}/datasets/${e[1]}`}case`canvas`:return`/canvases/${r}`;case`media-library`:return`/media-libraries/${r}`;case`dashboard`:return`/dashboards/${r}`;default:throw Error(`Unsupported resource type: ${n.toString()}`)}};function pE(e,t,n){return oE(e,t,{method:`POST`,uri:`/agent/action/generate/${Bw(e.config())}`,body:n})}function mE(e,t,n){return oE(e,t,{method:`POST`,uri:`/agent/action/patch/${Bw(e.config())}`,body:n})}function hE(e,t,n){return oE(e,t,{method:`POST`,uri:`/agent/action/prompt/${Bw(e.config())}`,body:n})}function gE(e,t,n){return oE(e,t,{method:`POST`,uri:`/agent/action/transform/${Bw(e.config())}`,body:n})}function _E(e,t,n){return oE(e,t,{method:`POST`,uri:`/agent/action/translate/${Bw(e.config())}`,body:n})}var vE=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}generate(e){return pE(this.#e,this.#t,e)}transform(e){return gE(this.#e,this.#t,e)}translate(e){return _E(this.#e,this.#t,e)}},yE=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}generate(e){return $(pE(this.#e,this.#t,e))}transform(e){return $(gE(this.#e,this.#t,e))}translate(e){return $(_E(this.#e,this.#t,e))}prompt(e){return $(hE(this.#e,this.#t,e))}patch(e){return $(mE(this.#e,this.#t,e))}},bE=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}upload(e,t,n){return SE(this.#e,this.#t,e,t,n)}},xE=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}upload(e,t,n){return $(SE(this.#e,this.#t,e,t,n).pipe(FC(e=>e.type===`response`),yC(e=>e.body.document)))}};function SE(e,t,n,r,i={}){Mw(n);let a=i.extract||void 0;a&&!a.length&&(a=[`none`]);let o=e.config(),s=wE(i,r),{tag:c,label:l,title:u,description:d,creditLine:f,filename:p,source:m}=s,h=o.resource?.type===`media-library`,g=h?{title:u,filename:p}:{label:l,title:u,description:d,filename:p,meta:a,creditLine:f};return m&&!h&&(g.sourceId=m.id,g.sourceName=m.name,g.sourceUrl=m.url),aE(e,t,{tag:c,method:`POST`,timeout:s.timeout||0,uri:CE(o,n),headers:s.contentType?{"Content-Type":s.contentType}:{},query:g,body:r})}function CE(e,t){let n=t===`image`?`images`:`files`,r=e.resource;if(r){let{type:e,id:t}=r;switch(e){case`dataset`:throw Error("Assets are not supported for dataset resources, yet. Configure the client with `{projectId: <projectId>, dataset: <datasetId>}` instead.");case`canvas`:return`/canvases/${t}/assets/${n}`;case`media-library`:return`/media-libraries/${t}/upload`;case`dashboard`:return`/dashboards/${t}/assets/${n}`;default:throw Error(`Unsupported resource type: ${e.toString()}`)}}return`assets/${n}/${Bw(e)}`}function wE(e,t){return typeof File>`u`||!(t instanceof File)?e:Object.assign({filename:e.preserveFilename===!1?void 0:t.name,contentType:t.type},e)}var TE=(e,t)=>Object.keys(t).concat(Object.keys(e)).reduce((n,r)=>(n[r]=typeof e[r]>`u`?t[r]:e[r],n),{}),EE=(e,t)=>t.reduce((t,n)=>(typeof e[n]>`u`||(t[n]=e[n]),t),{}),DE=AC(()=>ze(()=>import(`./browser-C0hijO98.js`).then(t=>e(t.default,1)),__vite__mapDeps([2,3]))).pipe(yC(({default:e})=>e),HC(1));function OE(){return function(e){return e.pipe(IC((e,t)=>e instanceof cT?kC(pC({type:`reconnect`}),jC(1e3).pipe(EC(()=>t))):mC(()=>e)))}}var kE=14800,AE=[`includePreviousRevision`,`includeResult`,`includeMutations`,`includeAllVersions`,`visibility`,`effectFormat`,`enableResume`,`tag`],jE={includeResult:!0};function ME(e,t,n={}){let{url:r,token:i,withCredentials:a,requestTagPrefix:o,headers:s}=this.config(),c=n.tag&&o?[o,n.tag].join(`.`):n.tag,l={...TE(n,jE),tag:c},u=kT({query:e,params:t,options:{tag:c,...EE(l,AE)}}),d=`${r}${sE(this,`listen`,u)}`;if(d.length>kE)return mC(()=>Error(`Query too large for listener`));let f=l.events?l.events:[`mutation`],p={};return a&&(p.withCredentials=!0),(i||s)&&(p.headers={},i&&(p.headers.Authorization=`Bearer ${i}`),s&&Object.assign(p.headers,s)),mT(()=>(typeof EventSource>`u`||p.headers?DE:pC(EventSource)).pipe(yC(e=>new e(d,p))),f).pipe(OE(),FC(e=>f.includes(e.type)),yC(e=>({type:e.type,...`data`in e?e.data:{}})))}function NE(e,t){return PE(typeof e==`function`?{predicate:e,...t}:e)}function PE(e){return t=>{let n,r=!1,{predicate:i,...a}=e;return MC(t.pipe(UC(t=>{e.predicate(t)&&(r=!0,n=t)}),zC(()=>{r=!1,n=void 0}),BC(a)),new mS(e=>{r&&e.next(n),e.complete()}))}}var FE=`2021-03-25`,IE=class{#e;constructor(e){this.#e=e}events({includeDrafts:e=!1,tag:t,waitFor:n}={}){let{projectId:r,apiVersion:i,token:a,withCredentials:o,requestTagPrefix:s,headers:c}=this.#e.config(),l=i.replace(/^v/,``);if(l!==`X`&&l<FE)throw Error(`The live events API requires API version ${FE} or later. The current API version is ${l}. Please update your API version to use this feature.`);if(e&&!a&&!o)throw Error(`The live events API requires a token or withCredentials when 'includeDrafts: true'. Please update your client configuration. The token should have the lowest possible access role.`);let u=sE(this.#e,`live/events`),d=new URL(this.#e.getUrl(u,!1)),f=t&&s?[s,t].join(`.`):t;f&&d.searchParams.set(`tag`,f),e&&d.searchParams.set(`includeDrafts`,`true`),n&&d.searchParams.set(`waitFor`,n);let p={};e&&o&&(p.withCredentials=!0),(e&&a||c)&&(p.headers={},e&&a&&(p.headers.Authorization=`Bearer ${a}`),c&&Object.assign(p.headers,c));let m=`${d.href}::${JSON.stringify(p)}`,h=RE.get(m);if(h)return h;let g=mT(()=>(typeof EventSource>`u`||p.headers?DE:pC(EventSource)).pipe(yC(e=>new e(d.href,p))),[`message`,`restart`,`welcome`,`reconnect`,`goaway`]),_=LE(d,{method:`OPTIONS`,mode:`cors`,credentials:p.withCredentials?`include`:`omit`,headers:p.headers}).pipe(IC(()=>{throw new xw({projectId:r})})),v=g.pipe(OE(),EC(e=>e.type===`reconnect`?_.pipe(EC(()=>pC(e))):pC(e)),IC(e=>_.pipe(EC(()=>{throw e}))),yC(e=>{if(e.type===`message`){let{data:t,...n}=e;return{...n,tags:t.tags}}return e})).pipe(zC(()=>RE.delete(m)),NE({predicate:e=>e.type===`welcome`}));return RE.set(m,v),v}};function LE(e,t){return new mS(n=>{let r=new AbortController,i=r.signal;return fetch(e,{...t,signal:r.signal}).then(e=>{n.next(e),n.complete()},e=>{i.aborted||n.error(e)}),()=>r.abort()})}var RE=new Map,zE=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}create(e,t){return HE(this.#e,this.#t,`PUT`,e,t)}edit(e,t){return HE(this.#e,this.#t,`PATCH`,e,t)}delete(e){return HE(this.#e,this.#t,`DELETE`,e)}list(){Uw(`dataset`,this.#e.config());let e=this.#e.config(),t=e.projectId,n=`/datasets`;return e.useProjectHostname===!1&&(n=`/projects/${t}/datasets`),oE(this.#e,this.#t,{uri:n,tag:null})}getEmbeddingsSettings(e){return Uw(`dataset`,this.#e.config()),Aw(e),oE(this.#e,this.#t,{uri:VE(this.#e,e),tag:null})}editEmbeddingsSettings(e,t){return Uw(`dataset`,this.#e.config()),Aw(e),oE(this.#e,this.#t,{method:`PUT`,uri:VE(this.#e,e),body:t,tag:null})}},BE=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}create(e,t){return Uw(`dataset`,this.#e.config()),$(HE(this.#e,this.#t,`PUT`,e,t))}edit(e,t){return Uw(`dataset`,this.#e.config()),$(HE(this.#e,this.#t,`PATCH`,e,t))}delete(e){return Uw(`dataset`,this.#e.config()),$(HE(this.#e,this.#t,`DELETE`,e))}list(){Uw(`dataset`,this.#e.config());let e=this.#e.config(),t=e.projectId,n=`/datasets`;return e.useProjectHostname===!1&&(n=`/projects/${t}/datasets`),$(oE(this.#e,this.#t,{uri:n,tag:null}))}getEmbeddingsSettings(e){return Uw(`dataset`,this.#e.config()),Aw(e),$(oE(this.#e,this.#t,{uri:VE(this.#e,e),tag:null}))}editEmbeddingsSettings(e,t){return Uw(`dataset`,this.#e.config()),Aw(e),$(oE(this.#e,this.#t,{method:`PUT`,uri:VE(this.#e,e),body:t,tag:null}))}};function VE(e,t){let n=e.config();return n.useProjectHostname===!1?`/projects/${n.projectId}/datasets/${t}/settings/embeddings`:`/datasets/${t}/settings/embeddings`}function HE(e,t,n,r,i){return Uw(`dataset`,e.config()),Aw(r),oE(e,t,{method:n,uri:`/datasets/${r}`,body:i,tag:null})}var UE=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}getPlaybackInfo(e,t={}){let n=this.#e.config(),r=(n.resource||n[`~experimental_resource`])?.id,{instanceId:i,libraryId:a}=qE(e),o=a||r;if(!o)throw Error(`Could not determine Media Library ID - you need to provide a valid Media Library ID in the client config or a Media Library GDR`);let s=JE(i,o),c=YE(t);return oE(this.#e,this.#t,{method:`GET`,uri:s,query:c})}},WE=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}getPlaybackInfo(e,t={}){return $(new UE(this.#e.observable,this.#t).getPlaybackInfo(e,t))}},GE=/^media-library:(ml[^:]+):([^:]+)$/;function KE(e){return typeof e==`object`&&`_ref`in e}function qE(e){let t=KE(e)?e._ref:e,n=GE.exec(t);if(n){let[,e,t]=n;return{libraryId:e,instanceId:t}}if(typeof e==`string`&&e.startsWith(`video-`))return{instanceId:e};throw Error(`Invalid video asset instance identifier "${t}": must be a valid video instance id or a Global Dataset Reference (GDR) to the video asset in the Media Library`)}function JE(e,t){return`/media-libraries/${t}/video/${e}/playback-info`}function YE(e){let t={};if(e.transformations){let{thumbnail:n,animated:r,storyboard:i}=e.transformations;n&&(n.width&&(t.thumbnailWidth=n.width),n.height&&(t.thumbnailHeight=n.height),n.time!==void 0&&(t.thumbnailTime=n.time),n.fit&&(t.thumbnailFit=n.fit),n.format&&(t.thumbnailFormat=n.format)),r&&(r.width&&(t.animatedWidth=r.width),r.height&&(t.animatedHeight=r.height),r.start!==void 0&&(t.animatedStart=r.start),r.end!==void 0&&(t.animatedEnd=r.end),r.fps&&(t.animatedFps=r.fps),r.format&&(t.animatedFormat=r.format)),i&&i.format&&(t.storyboardFormat=i.format)}return e.expiration&&(t.expiration=e.expiration),t}var XE=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers=`false`),e?.includeFeatures===!1&&(t.includeFeatures=`false`),e?.organizationId&&(t.organizationId=e.organizationId),e?.onlyExplicitMembership&&(t.onlyExplicitMembership=`true`),oE(this.#e,this.#t,{uri:`/projects`,query:t})}getById(e){return oE(this.#e,this.#t,{uri:`/projects/${e}`})}},ZE=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers=`false`),e?.includeFeatures===!1&&(t.includeFeatures=`false`),e?.organizationId&&(t.organizationId=e.organizationId),e?.onlyExplicitMembership&&(t.onlyExplicitMembership=`true`),$(oE(this.#e,this.#t,{uri:`/projects`,query:t}))}getById(e){return $(oE(this.#e,this.#t,{uri:`/projects/${e}`}))}},QE=rw(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`,8),$E=(e,t)=>t?QC(e,t):ZC(e);function eD(e,{releaseId:t,publishedId:n,document:r}){if(n&&r._id){let e=$E(n,t);return Rw(e,r),e}if(r._id){let n=YC(r._id),i=XC(r._id);if(!n&&!i)throw Error(`\`${e}()\` requires a document with an \`_id\` that is a version or draft ID`);if(t){if(n)throw Error(`\`${e}()\` was called with a document ID (\`${r._id}\`) that is a draft ID, but a release ID (\`${t}\`) was also provided.`);let i=$C(r._id);if(i!==t)throw Error(`\`${e}()\` was called with a document ID (\`${r._id}\`) that is a version ID, but the release ID (\`${t}\`) does not match the document's version ID (\`${i}\`).`)}return r._id}if(n)return $E(n,t);throw Error(`\`${e}()\` requires either a publishedId or a document with an \`_id\``)}var tD=(e,t)=>{if(typeof e==`object`&&e&&(`releaseId`in e||`metadata`in e)){let{releaseId:n=QE(),metadata:r={}}=e;return[n,r,t]}return[QE(),{},e]},nD=(e,t)=>{let[n,r,i]=tD(e,t);return{action:{actionType:`sanity.action.release.create`,releaseId:n,metadata:{...r,releaseType:r.releaseType||`undecided`}},options:i}},rD=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get({releaseId:e},t){return LT(this.#e,this.#t,`_.releases.${e}`,t)}create(e,t){let{action:n,options:r}=nD(e,t),{releaseId:i,metadata:a}=n;return YT(this.#e,this.#t,n,r).pipe(yC(e=>({...e,releaseId:i,metadata:a})))}edit({releaseId:e,patch:t},n){let r={actionType:`sanity.action.release.edit`,releaseId:e,patch:t};return YT(this.#e,this.#t,r,n)}publish({releaseId:e},t){let n={actionType:`sanity.action.release.publish`,releaseId:e};return YT(this.#e,this.#t,n,t)}archive({releaseId:e},t){let n={actionType:`sanity.action.release.archive`,releaseId:e};return YT(this.#e,this.#t,n,t)}unarchive({releaseId:e},t){let n={actionType:`sanity.action.release.unarchive`,releaseId:e};return YT(this.#e,this.#t,n,t)}schedule({releaseId:e,publishAt:t},n){let r={actionType:`sanity.action.release.schedule`,releaseId:e,publishAt:t};return YT(this.#e,this.#t,r,n)}unschedule({releaseId:e},t){let n={actionType:`sanity.action.release.unschedule`,releaseId:e};return YT(this.#e,this.#t,n,t)}delete({releaseId:e},t){let n={actionType:`sanity.action.release.delete`,releaseId:e};return YT(this.#e,this.#t,n,t)}fetchDocuments({releaseId:e},t){return zT(this.#e,this.#t,e,t)}},iD=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}get({releaseId:e},t){return $(LT(this.#e,this.#t,`_.releases.${e}`,t))}async create(e,t){let{action:n,options:r}=nD(e,t),{releaseId:i,metadata:a}=n;return{...await $(YT(this.#e,this.#t,n,r)),releaseId:i,metadata:a}}edit({releaseId:e,patch:t},n){let r={actionType:`sanity.action.release.edit`,releaseId:e,patch:t};return $(YT(this.#e,this.#t,r,n))}publish({releaseId:e},t){let n={actionType:`sanity.action.release.publish`,releaseId:e};return $(YT(this.#e,this.#t,n,t))}archive({releaseId:e},t){let n={actionType:`sanity.action.release.archive`,releaseId:e};return $(YT(this.#e,this.#t,n,t))}unarchive({releaseId:e},t){let n={actionType:`sanity.action.release.unarchive`,releaseId:e};return $(YT(this.#e,this.#t,n,t))}schedule({releaseId:e,publishAt:t},n){let r={actionType:`sanity.action.release.schedule`,releaseId:e,publishAt:t};return $(YT(this.#e,this.#t,r,n))}unschedule({releaseId:e},t){let n={actionType:`sanity.action.release.unschedule`,releaseId:e};return $(YT(this.#e,this.#t,n,t))}delete({releaseId:e},t){let n={actionType:`sanity.action.release.delete`,releaseId:e};return $(YT(this.#e,this.#t,n,t))}fetchDocuments({releaseId:e},t){return $(zT(this.#e,this.#t,e,t))}},aD=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}getById(e){return oE(this.#e,this.#t,{uri:`/users/${e}`})}},oD=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}getById(e){return $(oE(this.#e,this.#t,{uri:`/users/${e}`}))}},sD=class e{assets;datasets;live;mediaLibrary;projects;users;agent;releases;#e;#t;#n;listen=ME;constructor(e,t=nT){this.config(t),this.#t=e;let n=t._requestHandler;this.#n=n?(()=>{let r;return(i,a)=>{let o=i;return r||=new cD(e,{...t,_requestHandler:void 0}),n(o,t=>e(t,a),r)}})():e,this.assets=new bE(this,this.#n),this.datasets=new zE(this,this.#n),this.live=new IE(this),this.mediaLibrary={video:new UE(this,this.#n)},this.projects=new XE(this,this.#n),this.users=new aD(this,this.#n),this.agent={action:new vE(this,this.#n)},this.releases=new rD(this,this.#n)}clone(){return new e(this.#t,this.config())}config(e){if(e===void 0)return{...this.#e};if(this.#e&&this.#e.allowReconfigure===!1)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.#e=sT(e,this.#e||{}),this}withConfig(t){let n=this.config();return new e(this.#t,{...n,...t,stega:{...n.stega||{},...typeof t?.stega==`boolean`?{enabled:t.stega}:t?.stega||{}}})}fetch(e,t,n){return IT(this,this.#n,this.#e.stega,e,t,n)}getDocument(e,t){if(t?.includeAllVersions===!0)return LT(this,this.#n,e,{...t,includeAllVersions:!0});let n={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&`includeAllVersions`in t?{includeAllVersions:!1}:{}};return LT(this,this.#n,e,n)}getDocuments(e,t){return RT(this,this.#n,e,t)}create(e,t){return ZT(this,this.#n,e,`create`,t)}createIfNotExists(e,t){return BT(this,this.#n,e,t)}createOrReplace(e,t){return VT(this,this.#n,e,t)}createVersion({document:e,publishedId:t,releaseId:n,baseId:r,ifBaseRevisionId:i},a){if(!e)return UT(this,this.#n,t,r,n,i,a);let o=eD(`createVersion`,{document:e,publishedId:t,releaseId:n}),s={...e,_id:o},c=t||ew(e._id);return HT(this,this.#n,s,c,a)}delete(e,t){return WT(this,this.#n,e,t)}discardVersion({releaseId:e,publishedId:t},n,r){let i=$E(t,e);return GT(this,this.#n,i,n,r)}replaceVersion({document:e,publishedId:t,releaseId:n},r){let i=eD(`replaceVersion`,{document:e,publishedId:t,releaseId:n}),a={...e,_id:i};return KT(this,this.#n,a,r)}unpublishVersion({releaseId:e,publishedId:t},n){let r=QC(t,e);return qT(this,this.#n,r,t,n)}mutate(e,t){return JT(this,this.#n,e,t)}patch(e,t){return new xT(e,t,this)}transaction(e){return new ET(e,this)}action(e,t){return YT(this,this.#n,e,t)}request(e){return oE(this,this.#n,e)}getUrl(e,t){return cE(this,e,t)}getDataUrl(e,t){return sE(this,e,t)}},cD=class e{assets;datasets;live;mediaLibrary;projects;users;agent;releases;observable;#e;#t;#n;listen=ME;constructor(t,n=nT){this.config(n),this.#t=t;let r=n._requestHandler;this.#n=r?(()=>{let i;return(a,o)=>{let s=a;return i||=new e(t,{...n,_requestHandler:void 0}),r(s,e=>t(e,o),i)}})():t,this.assets=new xE(this,this.#n),this.datasets=new BE(this,this.#n),this.live=new IE(this),this.mediaLibrary={video:new WE(this,this.#n)},this.projects=new ZE(this,this.#n),this.users=new oD(this,this.#n),this.agent={action:new yE(this,this.#n)},this.releases=new iD(this,this.#n),this.observable=new sD(t,n)}clone(){return new e(this.#t,this.config())}config(e){if(e===void 0)return{...this.#e};if(this.#e&&this.#e.allowReconfigure===!1)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(e),this.#e=sT(e,this.#e||{}),this}withConfig(t){let n=this.config();return new e(this.#t,{...n,...t,stega:{...n.stega||{},...typeof t?.stega==`boolean`?{enabled:t.stega}:t?.stega||{}}})}fetch(e,t,n){return $(IT(this,this.#n,this.#e.stega,e,t,n))}getDocument(e,t){if(t?.includeAllVersions===!0)return $(LT(this,this.#n,e,{...t,includeAllVersions:!0}));let n={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&`includeAllVersions`in t?{includeAllVersions:!1}:{}};return $(LT(this,this.#n,e,n))}getDocuments(e,t){return $(RT(this,this.#n,e,t))}create(e,t){return $(ZT(this,this.#n,e,`create`,t))}createIfNotExists(e,t){return $(BT(this,this.#n,e,t))}createOrReplace(e,t){return $(VT(this,this.#n,e,t))}createVersion({document:e,publishedId:t,releaseId:n,baseId:r,ifBaseRevisionId:i},a){if(!e)return _C(UT(this,this.#n,t,r,n,i,a));let o=eD(`createVersion`,{document:e,publishedId:t,releaseId:n}),s={...e,_id:o},c=t||ew(e._id);return _C(HT(this,this.#n,s,c,a))}delete(e,t){return $(WT(this,this.#n,e,t))}discardVersion({releaseId:e,publishedId:t},n,r){let i=$E(t,e);return $(GT(this,this.#n,i,n,r))}replaceVersion({document:e,publishedId:t,releaseId:n},r){let i=eD(`replaceVersion`,{document:e,publishedId:t,releaseId:n}),a={...e,_id:i};return _C(KT(this,this.#n,a,r))}unpublishVersion({releaseId:e,publishedId:t},n){let r=QC(t,e);return $(qT(this,this.#n,r,t,n))}mutate(e,t){return $(JT(this,this.#n,e,t))}patch(e,t){return new ST(e,t,this)}transaction(e){return new TT(e,this)}action(e,t){return $(YT(this,this.#n,e,t))}request(e){return $(oE(this,this.#n,e))}dataRequest(e,t,n){return $(XT(this,this.#n,e,t,n))}getUrl(e,t){return cE(this,e,t)}getDataUrl(e,t){return sE(this,e,t)}};function lD(e,t){return{requester:ww(e),createClient:n=>{let r=ww(e,{ignoreWarnings:n.ignoreWarnings});return new t((e,t)=>(t||r)({maxRedirects:0,maxRetries:n.maxRetries,retryDelay:n.retryDelay,lineage:n.lineage,...e}),n)}}}var uD=lD([],cD);uD.requester;var dD=uD.createClient,fD=`image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg`;function pD(e){let[,t,n,r]=e.split(`-`);if(!t||!n||!r)throw Error(`Malformed asset _ref '${e}'. Expected an id like "${fD}".`);let[i,a]=n.split(`x`),o=+i,s=+a;if(!(isFinite(o)&&isFinite(s)))throw Error(`Malformed asset _ref '${e}'. Expected an id like "${fD}".`);return{id:t,width:o,height:s,format:r}}var mD=e=>{let t=e;return t?typeof t._ref==`string`:!1},hD=e=>{let t=e;return t?typeof t._id==`string`:!1},gD=e=>{let t=e;return t&&t.asset?typeof t.asset.url==`string`:!1},_D=e=>{if(typeof e==`object`&&e){let t=e;return t._upload&&(!t.asset||!t.asset._ref)}return!1};function vD(e){if(!e)return null;let t;if(typeof e==`string`&&yD(e))t={asset:{_ref:bD(e)}};else if(typeof e==`string`)t={asset:{_ref:e}};else if(mD(e))t={asset:e};else if(hD(e))t={asset:{_ref:e._id||``}};else if(gD(e))t={asset:{_ref:bD(e.asset.url)}};else if(typeof e.asset==`object`)t={...e};else return null;let n=e;return n.crop&&(t.crop=n.crop),n.hotspot&&(t.hotspot=n.hotspot),xD(t)}function yD(e){return/^https?:\/\//.test(`${e}`)}function bD(e){return`image-${e.split(`/`).slice(-1)[0]}`.replace(/\.([a-z]+)$/,`-$1`)}function xD(e){if(e.crop&&e.hotspot)return e;let t={...e};return t.crop||={left:0,top:0,bottom:0,right:0},t.hotspot||={x:.5,y:.5,height:1,width:1},t}var SD=[[`width`,`w`],[`height`,`h`],[`format`,`fm`],[`download`,`dl`],[`blur`,`blur`],[`sharpen`,`sharp`],[`invert`,`invert`],[`orientation`,`or`],[`minHeight`,`min-h`],[`maxHeight`,`max-h`],[`minWidth`,`min-w`],[`maxWidth`,`max-w`],[`quality`,`q`],[`fit`,`fit`],[`crop`,`crop`],[`saturation`,`sat`],[`auto`,`auto`],[`dpr`,`dpr`],[`pad`,`pad`],[`frame`,`frame`]];function CD(e){let t={...e||{}},n=t.source;delete t.source;let r=vD(n);if(!r){if(n&&_D(n))return`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8HwQACfsD/QNViZkAAAAASUVORK5CYII=`;throw Error(`Unable to resolve image URL from source (${JSON.stringify(n)})`)}let i=pD(r.asset._ref||r.asset._id||``),a=Math.round(r.crop.left*i.width),o=Math.round(r.crop.top*i.height),s={left:a,top:o,width:Math.round(i.width-r.crop.right*i.width-a),height:Math.round(i.height-r.crop.bottom*i.height-o)},c=r.hotspot.height*i.height/2,l=r.hotspot.width*i.width/2,u=r.hotspot.x*i.width,d=r.hotspot.y*i.height,f={left:u-l,top:d-c,right:u+l,bottom:d+c};return t.rect||t.focalPoint||t.ignoreImageParams||t.crop||(t={...t,...TD({crop:s,hotspot:f},t)}),wD({...t,asset:i})}function wD(e){let t=(e.baseUrl||`https://cdn.sanity.io`).replace(/\/+$/,``),n=e.vanityName?`/${e.vanityName}`:``,r=`${e.asset.id}-${e.asset.width}x${e.asset.height}.${e.asset.format}${n}`,i;i=e.mediaLibraryId?`${t}/media-libraries/${e.mediaLibraryId}/images/${r}`:e.canvasId?`${t}/images/canvases/${e.canvasId}/${r}`:`${t}/images/${e.projectId}/${e.dataset}/${r}`;let a=[];if(e.rect){let{left:t,top:n,width:r,height:i}=e.rect;(t!==0||n!==0||i!==e.asset.height||r!==e.asset.width)&&a.push(`rect=${t},${n},${r},${i}`)}e.bg&&a.push(`bg=${e.bg}`),e.focalPoint&&(a.push(`fp-x=${e.focalPoint.x}`),a.push(`fp-y=${e.focalPoint.y}`));let o=[e.flipHorizontal&&`h`,e.flipVertical&&`v`].filter(Boolean).join(``);return o&&a.push(`flip=${o}`),SD.forEach(t=>{let[n,r]=t;typeof e[n]<`u`?a.push(`${r}=${encodeURIComponent(e[n])}`):typeof e[r]<`u`&&a.push(`${r}=${encodeURIComponent(e[r])}`)}),a.length===0?i:`${i}?${a.join(`&`)}`}function TD(e,t){let n,r=t.width,i=t.height;if(!(r&&i))return{width:r,height:i,rect:e.crop};let a=e.crop,o=e.hotspot,s=r/i;if(a.width/a.height>s){let e=Math.round(a.height),t=Math.round(e*s),r=Math.max(0,Math.round(a.top)),i=Math.round((o.right-o.left)/2+o.left),c=Math.max(0,Math.round(i-t/2));c<a.left?c=a.left:c+t>a.left+a.width&&(c=a.left+a.width-t),n={left:c,top:r,width:t,height:e}}else{let e=a.width,t=Math.round(e/s),r=Math.max(0,Math.round(a.left)),i=Math.round((o.bottom-o.top)/2+o.top),c=Math.max(0,Math.round(i-t/2));c<a.top?c=a.top:c+t>a.top+a.height&&(c=a.top+a.height-t),n={left:r,top:c,width:e,height:t}}return{width:r,height:i,rect:n}}var ED=[`clip`,`crop`,`fill`,`fillmax`,`max`,`scale`,`min`],DD=[`top`,`bottom`,`left`,`right`,`center`,`focalpoint`,`entropy`],OD=[`format`];function kD(e){return e&&`config`in e?typeof e.config==`function`:!1}function AD(e){return e&&`clientConfig`in e?typeof e.clientConfig==`object`:!1}function jD(e){let{apiHost:t,projectId:n,dataset:r}=e,i={baseUrl:(t||`https://api.sanity.io`).replace(/^https:\/\/api\./,`https://cdn.`)},a=e.resource??e[`~experimental_resource`];if(a?.type===`media-library`){if(typeof a.id!=`string`||a.id.length===0)throw Error(`Media library clients must include an id in "resource"`);return{...i,mediaLibraryId:a.id}}if(a?.type===`canvas`){if(typeof a.id!=`string`||a.id.length===0)throw Error(`Canvas clients must include an id in "resource"`);return{...i,canvasId:a.id}}if(a?.type===`dataset`){if(typeof a.id!=`string`||a.id.length===0)throw Error(`Dataset clients must include an id in "resource"`);let[e,t]=a.id.split(`.`);if(!e||!t)throw Error(`Dataset resource id must be in the format "projectId.dataset", got: `+a.id);return{...i,projectId:e,dataset:t}}return{...i,projectId:n,dataset:r}}function MD(e){let t=SD;for(let n of t){let[t,r]=n;if(e===t||e===r)return t}return e}function ND(e){let t={};return t=kD(e)?jD(e.config()):AD(e)?jD(e.clientConfig):e||{},t}function PD(e,t){return new e(null,ND(t))}function FD(e){return PD(LD,e)}function ID(e,t){let n=t.baseUrl||e.baseUrl,r={baseUrl:n};for(let e in t)if(t.hasOwnProperty(e)){let n=MD(e);r[n]=t[e]}return{baseUrl:n,...r}}var LD=class e{options;constructor(e,t){this.options=e?{...e.options||{},...t||{}}:{...t||{}}}withOptions(t){let n=ID(this.options,t);return new e(this,n)}image(e){return this.withOptions({source:e})}dataset(e){return this.withOptions({dataset:e})}projectId(e){return this.withOptions({projectId:e})}withClient(t){let n=ND(t),r={...this.options};return delete r.baseUrl,delete r.projectId,delete r.dataset,delete r.mediaLibraryId,delete r.canvasId,new e(null,{...n,...r})}bg(e){return this.withOptions({bg:e})}dpr(e){return this.withOptions(e&&e!==1?{dpr:e}:{})}width(e){return this.withOptions({width:e})}height(e){return this.withOptions({height:e})}focalPoint(e,t){return this.withOptions({focalPoint:{x:e,y:t}})}maxWidth(e){return this.withOptions({maxWidth:e})}minWidth(e){return this.withOptions({minWidth:e})}maxHeight(e){return this.withOptions({maxHeight:e})}minHeight(e){return this.withOptions({minHeight:e})}size(e,t){return this.withOptions({width:e,height:t})}blur(e){return this.withOptions({blur:e})}sharpen(e){return this.withOptions({sharpen:e})}rect(e,t,n,r){return this.withOptions({rect:{left:e,top:t,width:n,height:r}})}format(e){return this.withOptions({format:e})}invert(e){return this.withOptions({invert:e})}orientation(e){return this.withOptions({orientation:e})}quality(e){return this.withOptions({quality:e})}forceDownload(e){return this.withOptions({download:e})}flipHorizontal(){return this.withOptions({flipHorizontal:!0})}flipVertical(){return this.withOptions({flipVertical:!0})}ignoreImageParams(){return this.withOptions({ignoreImageParams:!0})}fit(e){if(ED.indexOf(e)===-1)throw Error(`Invalid fit mode "${e}"`);return this.withOptions({fit:e})}crop(e){if(DD.indexOf(e)===-1)throw Error(`Invalid crop mode "${e}"`);return this.withOptions({crop:e})}saturation(e){return this.withOptions({saturation:e})}auto(e){if(OD.indexOf(e)===-1)throw Error(`Invalid auto mode "${e}"`);return this.withOptions({auto:e})}pad(e){return this.withOptions({pad:e})}vanityName(e){return this.withOptions({vanityName:e})}frame(e){if(e!==1)throw Error(`Invalid frame value "${e}"`);return this.withOptions({frame:e})}url(){return CD(this.options)}toString(){return this.url()}};function RD(e){let t=!1,n;return(...r)=>(t||=(n=e(...r),!0),n)}(e=>RD((...t)=>{console.warn(e.join(` `),...t)}))(["The default export of @sanity/image-url has been deprecated. Use the named export `createImageUrlBuilder` instead."]);var zD=dD({projectId:`f1tnubeb`,dataset:`production`,useCdn:!0,apiVersion:`2024-03-01`}),BD=FD(zD);function VD(e){return BD.image(e)}async function HD(){return zD.fetch(`*[_type == "post"] | order(publishedAt desc) {
_id,
title,
slug,
author->{name},
mainImage,
publishedAt,
"categories": categories[]->{title},
body,
seo
}`)}async function UD(e){return zD.fetch(`*[_type == "post" && slug.current == $slug][0] {
_id,
title,
slug,
author->{name},
mainImage,
publishedAt,
"categories": categories[]->{title},
body,
seo
}`,{slug:e})}var WD=e=>{let t=(0,R.c)(35),{post:n}=e,r;t[0]===n.mainImage?r=t[1]:(r=n.mainImage?VD(n.mainImage).width(800).height(500).url():``,t[0]=n.mainImage,t[1]=r);let i=r,a=`/blogs/${n.slug.current}`,o;t[2]!==i||t[3]!==n.title?(o=(0,J.jsx)(`div`,{className:`relative w-full aspect-[16/10] overflow-hidden bg-zinc-50`,children:i?(0,J.jsx)(`img`,{src:i,alt:n.title,className:`absolute inset-0 w-full h-full object-cover transition-transform duration-700 group-hover:scale-105`}):(0,J.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-br from-zinc-100 to-zinc-200`})}),t[2]=i,t[3]=n.title,t[4]=o):o=t[4];let s=n.categories?.[0]?.title??`Engineering`,c;t[5]===s?c=t[6]:(c=(0,J.jsx)(`span`,{className:`text-xs font-bold uppercase tracking-widest text-indigo-600`,children:s}),t[5]=s,t[6]=c);let l;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,J.jsx)(`span`,{className:`w-1 h-1 rounded-full bg-zinc-300`}),t[7]=l):l=t[7];let u=n.publishedAt,d;t[8]===n.publishedAt?d=t[9]:(d=new Date(n.publishedAt).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),t[8]=n.publishedAt,t[9]=d);let f;t[10]!==n.publishedAt||t[11]!==d?(f=(0,J.jsx)(`time`,{className:`text-xs font-medium text-zinc-500`,dateTime:u,children:d}),t[10]=n.publishedAt,t[11]=d,t[12]=f):f=t[12];let p;t[13]!==c||t[14]!==f?(p=(0,J.jsxs)(`div`,{className:`flex items-center gap-2 mb-4`,children:[c,l,f]}),t[13]=c,t[14]=f,t[15]=p):p=t[15];let m;t[16]===n.title?m=t[17]:(m=(0,J.jsx)(`h3`,{className:`text-xl md:text-2xl font-black tracking-tight text-zinc-900 leading-tight mb-4 group-hover:text-indigo-600 transition-colors`,children:n.title}),t[16]=n.title,t[17]=m);let h=n.author?.name?n.author.name[0]:`C`,g;t[18]===h?g=t[19]:(g=(0,J.jsx)(`div`,{className:`w-8 h-8 rounded-full bg-gradient-to-tr from-indigo-500 to-purple-500 flex items-center justify-center text-white font-bold text-xs`,children:h}),t[18]=h,t[19]=g);let _=n.author?.name??`CautionLabs Team`,v;t[20]===_?v=t[21]:(v=(0,J.jsx)(`span`,{className:`text-sm font-semibold text-zinc-700`,children:_}),t[20]=_,t[21]=v);let y;t[22]!==g||t[23]!==v?(y=(0,J.jsxs)(`div`,{className:`mt-auto flex items-center gap-3`,children:[g,v]}),t[22]=g,t[23]=v,t[24]=y):y=t[24];let b;t[25]!==p||t[26]!==m||t[27]!==y?(b=(0,J.jsxs)(`div`,{className:`flex flex-col flex-grow p-6 md:p-8`,children:[p,m,y]}),t[25]=p,t[26]=m,t[27]=y,t[28]=b):b=t[28];let x;t[29]!==b||t[30]!==o?(x=(0,J.jsxs)(`article`,{className:`flex flex-col h-full bg-white rounded-2xl border border-zinc-100 overflow-hidden hover:shadow-2xl hover:shadow-black/5 transition-all duration-300 transform group-hover:-translate-y-2`,children:[o,b]}),t[29]=b,t[30]=o,t[31]=x):x=t[31];let S;return t[32]!==x||t[33]!==a?(S=(0,J.jsx)(Aa,{to:a,className:`group block focus:outline-none focus:ring-4 focus:ring-indigo-500/20 rounded-2xl`,children:x}),t[32]=x,t[33]=a,t[34]=S):S=t[34],S},GD=()=>{let[e,t]=(0,g.useState)([]),[n,r]=(0,g.useState)(!0);return(0,g.useEffect)(()=>{(async()=>{try{t(await HD())}catch(e){console.error(`Failed to fetch blogs:`,e)}finally{r(!1)}})()},[]),(0,J.jsxs)(`div`,{className:`min-h-[calc(100vh-80px)] bg-white text-black py-16 md:py-24`,children:[(0,J.jsxs)(Me,{children:[(0,J.jsx)(`title`,{children:`Insights & Engineering | CautionLabs`}),(0,J.jsx)(`meta`,{name:`description`,content:`Deep dives into AI, moderation, product strategy, and engineering practices by the CautionLabs team.`}),(0,J.jsx)(`link`,{rel:`canonical`,href:`https://cautionlabs.com/blogs`}),(0,J.jsx)(`meta`,{property:`og:type`,content:`website`}),(0,J.jsx)(`meta`,{property:`og:url`,content:`https://cautionlabs.com/blogs`}),(0,J.jsx)(`meta`,{property:`og:title`,content:`Insights & Engineering | CautionLabs`}),(0,J.jsx)(`meta`,{property:`og:description`,content:`Deep dives into AI, moderation, product strategy, and engineering practices by the CautionLabs team.`}),(0,J.jsx)(`meta`,{property:`og:image`,content:`https://cautionlabs.com/og-image.png`}),(0,J.jsx)(`meta`,{name:`twitter:card`,content:`summary_large_image`}),(0,J.jsx)(`meta`,{name:`twitter:title`,content:`Insights & Engineering | CautionLabs`}),(0,J.jsx)(`meta`,{name:`twitter:description`,content:`Deep dives into AI, moderation, product strategy, and engineering practices by the CautionLabs team.`}),(0,J.jsx)(`meta`,{name:`twitter:image`,content:`https://cautionlabs.com/og-image.png`})]}),(0,J.jsxs)(`div`,{className:`max-w-7xl mx-auto px-6`,children:[(0,J.jsxs)(`div`,{className:`mb-16 md:mb-24 text-center max-w-3xl mx-auto`,children:[(0,J.jsxs)(`h1`,{className:`text-5xl md:text-7xl font-black tracking-tighter mb-6 leading-none`,children:[`Insights & `,(0,J.jsx)(`br`,{className:`hidden md:block`}),` Engineering`]}),(0,J.jsx)(`p`,{className:`text-lg md:text-xl text-zinc-500 font-medium leading-relaxed`,children:`Thoughts on building scalable moderation systems, AI safety, and modern software architecture.`})]}),n?(0,J.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 md:gap-12 animate-pulse`,children:[1,2,3,4,5,6].map(e=>(0,J.jsx)(`div`,{className:`aspect-[3/4] bg-zinc-100 rounded-2xl`},e))}):(0,J.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 md:gap-12`,children:e.map(e=>(0,J.jsx)(WD,{post:e},e._id))}),!n&&e.length===0&&(0,J.jsx)(`div`,{className:`text-center py-20`,children:(0,J.jsx)(`h3`,{className:`text-2xl font-bold text-zinc-400`,children:`No blogs found.`})})]})]})};function KD(e){return e._type===`span`&&`text`in e&&typeof e.text==`string`&&(e.marks===void 0||Array.isArray(e.marks)&&e.marks.every(e=>typeof e==`string`))}function qD(e){return typeof e._type==`string`&&e._type[0]!==`@`&&(!(`markDefs`in e)||!e.markDefs||Array.isArray(e.markDefs)&&e.markDefs.every(e=>typeof e._key==`string`))&&`children`in e&&Array.isArray(e.children)&&e.children.every(e=>typeof e==`object`&&`_type`in e)}function JD(e){return qD(e)&&`listItem`in e&&typeof e.listItem==`string`&&(e.level===void 0||typeof e.level==`number`)}function YD(e){return e._type===`@list`}function XD(e){return e._type===`@span`}function ZD(e){return e._type===`@text`}var QD=[`strong`,`em`,`code`,`underline`,`strike-through`];function $D(e,t,n){if(!KD(e)||!e.marks||!e.marks.length)return[];let r=e.marks.slice(),i={};return r.forEach(e=>{i[e]=1;for(let r=t+1;r<n.length;r++){let t=n[r];if(t&&KD(t)&&Array.isArray(t.marks)&&t.marks.indexOf(e)!==-1)i[e]++;else break}}),r.sort((e,t)=>eO(i,e,t))}function eO(e,t,n){let r=e[t],i=e[n];if(r!==i)return i-r;let a=QD.indexOf(t),o=QD.indexOf(n);return a===o?t.localeCompare(n):a-o}function tO(e){let{children:t}=e,n=e.markDefs??[];if(!t||!t.length)return[];let r=t.map($D),i={_type:`@span`,children:[],markType:`<unknown>`},a=[i];for(let e=0;e<t.length;e++){let i=t[e];if(!i)continue;let o=r[e]||[],s=1;if(a.length>1)for(;s<a.length;s++){let e=a[s]?.markKey||``,t=o.indexOf(e);if(t===-1)break;o.splice(t,1)}a=a.slice(0,s);let c=a[a.length-1];if(c){for(let e of o){let t=n?.find(t=>t._key===e),r={_type:`@span`,_key:i._key,children:[],markDef:t,markType:t?t._type:e,markKey:e};c.children.push(r),a.push(r),c=r}if(KD(i)){let e=i.text.split(`
`);for(let t=e.length;t-- >1;)e.splice(t,0,`
`);c.children=c.children.concat(e.map(e=>({_type:`@text`,text:e})))}else c.children=c.children.concat(i)}}return i.children}function nO(e,t){let n=[],r;for(let i=0;i<e.length;i++){let a=e[i];if(a){if(!JD(a)){n.push(a),r=void 0;continue}if(!r){r=iO(a,i,t),n.push(r);continue}if(rO(a,r)){r.children.push(a);continue}if((a.level||1)>r.level){let e=iO(a,i,t);if(t===`html`){let t=r.children[r.children.length-1],n={...t,children:[...t.children,e]};r.children[r.children.length-1]=n}else r.children.push(e);r=e;continue}if((a.level||1)<r.level){let e=n[n.length-1],o=e&&aO(e,a);if(o){r=o,r.children.push(a);continue}r=iO(a,i,t),n.push(r);continue}if(a.listItem!==r.listItem){let e=n[n.length-1],o=e&&aO(e,{level:a.level||1});if(o&&o.listItem===a.listItem){r=o,r.children.push(a);continue}else{r=iO(a,i,t),n.push(r);continue}}console.warn(`Unknown state encountered for block`,a),n.push(a)}}return n}function rO(e,t){return(e.level||1)===t.level&&e.listItem===t.listItem}function iO(e,t,n){return{_type:`@list`,_key:`${e._key||`${t}`}-parent`,mode:n,level:e.level||1,listItem:e.listItem,children:[e]}}function aO(e,t){let n=t.level||1,r=t.listItem||`normal`,i=typeof t.listItem==`string`;if(YD(e)&&(e.level||1)===n&&i&&(e.listItem||`normal`)===r)return e;if(!(`children`in e))return;let a=e.children[e.children.length-1];return a&&!KD(a)?aO(a,t):void 0}function oO(e){let t=``;return e.children.forEach(e=>{ZD(e)?t+=e.text:XD(e)&&(t+=oO(e))}),t}var sO={number:({children:e})=>(0,J.jsx)(`ol`,{children:e}),bullet:({children:e})=>(0,J.jsx)(`ul`,{children:e})},cO=({children:e})=>(0,J.jsx)(`li`,{children:e}),lO=({children:e,value:t})=>(0,J.jsx)(`a`,{href:t?.href,children:e}),uO={textDecoration:`underline`},dO={em:({children:e})=>(0,J.jsx)(`em`,{children:e}),strong:({children:e})=>(0,J.jsx)(`strong`,{children:e}),code:({children:e})=>(0,J.jsx)(`code`,{children:e}),underline:({children:e})=>(0,J.jsx)(`span`,{style:uO,children:e}),"strike-through":({children:e})=>(0,J.jsx)(`del`,{children:e}),link:lO},fO=(e,t)=>`[@portabletext/react] Unknown ${e}, specify a component for it in the \`components.${t}\` prop`,pO=e=>fO(`block type "${e}"`,`types`),mO=e=>fO(`mark type "${e}"`,`marks`),hO=e=>fO(`block style "${e}"`,`block`),gO=e=>fO(`list style "${e}"`,`list`),_O=e=>fO(`list item style "${e}"`,`listItem`);function vO(e){console.warn(e)}var yO={display:`none`},bO={types:{},block:{normal:({children:e})=>(0,J.jsx)(`p`,{children:e}),blockquote:({children:e})=>(0,J.jsx)(`blockquote`,{children:e}),h1:({children:e})=>(0,J.jsx)(`h1`,{children:e}),h2:({children:e})=>(0,J.jsx)(`h2`,{children:e}),h3:({children:e})=>(0,J.jsx)(`h3`,{children:e}),h4:({children:e})=>(0,J.jsx)(`h4`,{children:e}),h5:({children:e})=>(0,J.jsx)(`h5`,{children:e}),h6:({children:e})=>(0,J.jsx)(`h6`,{children:e})},marks:dO,list:sO,listItem:cO,hardBreak:()=>(0,J.jsx)(`br`,{}),unknownType:({value:e,isInline:t})=>{let n=pO(e._type);return(0,J.jsx)(t?`span`:`div`,{style:yO,children:n})},unknownMark:({markType:e,children:t})=>(0,J.jsx)(`span`,{className:`unknown__pt__mark__${e}`,children:t}),unknownList:({children:e})=>(0,J.jsx)(`ul`,{children:e}),unknownListItem:({children:e})=>(0,J.jsx)(`li`,{children:e}),unknownBlockStyle:({children:e})=>(0,J.jsx)(`p`,{children:e})};function xO(e,t){let{block:n,list:r,listItem:i,marks:a,types:o,...s}=t;return{...e,block:SO(e,t,`block`),list:SO(e,t,`list`),listItem:SO(e,t,`listItem`),marks:SO(e,t,`marks`),types:SO(e,t,`types`),...s}}function SO(e,t,n){let r=t[n],i=e[n];return typeof r==`function`||r&&typeof i==`function`?r:r?{...i,...r}:i}function CO({value:e,components:t,listNestingMode:n,onMissingComponent:r=vO}){let i=r||EO,a;a=Array.isArray(e)?e:e==null?[]:[e];let o=nO(a,n||`html`),s=(0,g.useMemo)(()=>t?xO(bO,t):bO,[t]),c=(0,g.useMemo)(()=>wO(s,i),[s,i]);return(0,J.jsx)(J.Fragment,{children:o.map((e,t)=>c({node:e,index:t,isInline:!1,renderNode:c}))})}var wO=(e,t)=>{function n(e){let{node:t,index:n,isInline:d}=e,f=t._key||`node-${n}`;return YD(t)?a(t,n,f):JD(t)?i(t,n,f):XD(t)?o(t,n,f):r(t)?u(t,n,f,d):qD(t)?s(t,n,f,d):ZD(t)?c(t,f):l(t,n,f,d)}function r(t){return t._type in e.types}function i(r,i,a){let o=TO({node:r,index:i,isInline:!1,renderNode:n}),s=e.listItem,c=(typeof s==`function`?s:s[r.listItem])||e.unknownListItem;if(c===e.unknownListItem){let e=r.listItem||`bullet`;t(_O(e),{type:e,nodeType:`listItemStyle`})}let l=o.children;if(r.style&&r.style!==`normal`){let{listItem:e,...t}=r;l=n({node:t,index:i,isInline:!1,renderNode:n})}return(0,J.jsx)(c,{value:r,index:i,isInline:!1,renderNode:n,children:l},a)}function a(r,i,a){let o=r.children.map((e,t)=>n({node:e._key?e:{...e,_key:`li-${i}-${t}`},index:t,isInline:!1,renderNode:n})),s=e.list,c=(typeof s==`function`?s:s[r.listItem])||e.unknownList;if(c===e.unknownList){let e=r.listItem||`bullet`;t(gO(e),{nodeType:`listStyle`,type:e})}return(0,J.jsx)(c,{value:r,index:i,isInline:!1,renderNode:n,children:o},a)}function o(r,i,a){let{markDef:o,markType:s,markKey:c}=r,l=e.marks[s]||e.unknownMark,u=r.children.map((e,t)=>n({node:e,index:t,isInline:!0,renderNode:n}));return l===e.unknownMark&&t(mO(s),{nodeType:`mark`,type:s}),(0,J.jsx)(l,{text:oO(r),value:o,markType:s,markKey:c,renderNode:n,children:u},a)}function s(r,i,a,o){let{_key:s,...c}=TO({node:r,index:i,isInline:o,renderNode:n}),l=c.node.style||`normal`,u=(typeof e.block==`function`?e.block:e.block[l])||e.unknownBlockStyle;return u===e.unknownBlockStyle&&t(hO(l),{nodeType:`blockStyle`,type:l}),(0,J.jsx)(u,{...c,value:c.node,renderNode:n},a)}function c(t,n){if(t.text===`
`){let t=e.hardBreak;return t?(0,J.jsx)(t,{},n):`
`}return t.text}function l(r,i,a,o){let s={value:r,isInline:o,index:i,renderNode:n};t(pO(r._type),{nodeType:`block`,type:r._type});let c=e.unknownType;return(0,J.jsx)(c,{...s},a)}function u(t,r,i,a){let o={value:t,isInline:a,index:r,renderNode:n},s=e.types[t._type];return s?(0,J.jsx)(s,{...o},i):null}return n};function TO(e){let{node:t,index:n,isInline:r,renderNode:i}=e,a=tO(t).map((e,t)=>i({node:e,isInline:!0,index:t,renderNode:i}));return{_key:t._key||`block-${n}`,children:a,index:n,isInline:r,node:t}}function EO(){}var DO=()=>{let{slug:e}=ai(),[t,n]=(0,g.useState)(null),[r,i]=(0,g.useState)(!0);return(0,g.useEffect)(()=>{(async()=>{if(e)try{n(await UD(e))}catch(e){console.error(`Failed to fetch post:`,e)}finally{i(!1)}})()},[e]),r?(0,J.jsx)(`div`,{className:`min-h screen bg-white py-24 flex items-center justify-center`,children:(0,J.jsx)(`div`,{className:`w-12 h-12 border-4 border-zinc-100 border-t-indigo-600 rounded-full animate-spin`})}):t?(0,J.jsxs)(`article`,{className:`min-h-screen bg-white py-16 md:py-24`,children:[(0,J.jsxs)(Me,{children:[(0,J.jsx)(`title`,{children:t.title}),(0,J.jsx)(`meta`,{name:`description`,content:t.seo?.metaDescription??t.title}),t.seo?.keywords&&t.seo.keywords.length>0&&(0,J.jsx)(`meta`,{name:`keywords`,content:t.seo.keywords.join(`, `)}),(0,J.jsx)(`link`,{rel:`canonical`,href:`https://cautionlabs.com/blogs/${t.slug.current}`}),(0,J.jsx)(`meta`,{property:`og:type`,content:`article`}),(0,J.jsx)(`meta`,{property:`og:url`,content:`https://cautionlabs.com/blogs/${t.slug.current}`}),(0,J.jsx)(`meta`,{property:`og:title`,content:t.title}),(0,J.jsx)(`meta`,{property:`og:description`,content:t.seo?.metaDescription??t.title}),t.seo?.seoImage?(0,J.jsx)(`meta`,{property:`og:image`,content:VD(t.seo.seoImage).width(1200).url()}):t.mainImage&&(0,J.jsx)(`meta`,{property:`og:image`,content:VD(t.mainImage).width(1200).url()}),(0,J.jsx)(`meta`,{name:`twitter:card`,content:`summary_large_image`}),(0,J.jsx)(`meta`,{name:`twitter:title`,content:t.title}),(0,J.jsx)(`meta`,{name:`twitter:description`,content:t.seo?.metaDescription??t.title}),t.seo?.seoImage?(0,J.jsx)(`meta`,{name:`twitter:image`,content:VD(t.seo.seoImage).width(1200).url()}):t.mainImage&&(0,J.jsx)(`meta`,{name:`twitter:image`,content:VD(t.mainImage).width(1200).url()}),(0,J.jsx)(`script`,{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`BlogPosting`,headline:t.title,description:t.seo?.metaDescription??t.title,author:{"@type":`Person`,name:t.author?.name??`CautionLabs Team`},publisher:{"@type":`Organization`,name:`Caution Labs`,logo:{"@type":`ImageObject`,url:`https://cautionlabs.com/logo.png`}},datePublished:t.publishedAt,dateModified:t.publishedAt,mainEntityOfPage:{"@type":`WebPage`,"@id":`https://cautionlabs.com/blogs/${t.slug.current}`},keywords:t.seo?.keywords??[],image:t.seo?.seoImage?VD(t.seo.seoImage).width(1200).url():t.mainImage?VD(t.mainImage).width(1200).url():`https://cautionlabs.com/og-image.png`})})]}),(0,J.jsxs)(`div`,{className:`max-w-3xl mx-auto px-6`,children:[(0,J.jsxs)(Aa,{to:`/blogs`,className:`inline-flex items-center gap-2 text-sm font-bold text-zinc-400 hover:text-black transition-colors mb-12 group`,children:[(0,J.jsx)(`span`,{className:`transform group-hover:-translate-x-1 transition-transform`,children:`â†`}),`Back to Insights`]}),(0,J.jsxs)(`header`,{className:`mb-12`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,J.jsx)(`span`,{className:`px-3 py-1 bg-indigo-50 text-indigo-600 text-[10px] font-bold uppercase tracking-widest rounded-full`,children:t.categories?.[0]?.title??`Engineering`}),(0,J.jsx)(`span`,{className:`text-zinc-300 text-xs`,children:`•`}),(0,J.jsx)(`time`,{className:`text-zinc-500 text-xs font-semibold uppercase tracking-wider`,children:new Date(t.publishedAt).toLocaleDateString(`en-US`,{month:`long`,day:`numeric`,year:`numeric`})})]}),(0,J.jsx)(`h1`,{className:`text-4xl md:text-6xl font-black tracking-tighter text-zinc-900 leading-[1.1] mb-8`,children:t.title}),(0,J.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,J.jsx)(`div`,{className:`w-12 h-12 rounded-full bg-gradient-to-tr from-indigo-500 to-purple-500 flex items-center justify-center text-white font-bold text-lg`,children:t.author?.name?t.author.name[0]:`C`}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`div`,{className:`text-zinc-900 font-bold`,children:t.author?.name??`CautionLabs Team`}),(0,J.jsx)(`div`,{className:`text-zinc-500 text-sm font-medium`,children:`Core Contributor`})]})]})]}),t.mainImage&&(0,J.jsx)(`div`,{className:`relative aspect-[16/9] mb-12 rounded-3xl overflow-hidden shadow-2xl shadow-indigo-500/10`,children:(0,J.jsx)(`img`,{src:VD(t.mainImage).width(1200).url(),alt:t.title,className:`absolute inset-0 w-full h-full object-cover`})}),(0,J.jsx)(`div`,{className:`prose prose-lg prose-zinc max-w-none`,children:(0,J.jsx)(CO,{value:t.body,components:{block:{h2:({children:e})=>(0,J.jsx)(`h2`,{className:`text-3xl font-black tracking-tight text-zinc-900 mt-16 mb-6`,children:e}),h3:({children:e})=>(0,J.jsx)(`h3`,{className:`text-2xl font-black tracking-tight text-zinc-900 mt-12 mb-4`,children:e}),normal:({children:e})=>(0,J.jsx)(`p`,{className:`text-zinc-600 leading-relaxed mb-6 font-medium`,children:e})},list:{bullet:({children:e})=>(0,J.jsx)(`ul`,{className:`list-disc list-inside mb-8 space-y-3 text-zinc-600 font-medium ml-4`,children:e})}}})}),(0,J.jsx)(`footer`,{className:`mt-24 pt-12 border-t border-zinc-100`,children:(0,J.jsxs)(`div`,{className:`bg-zinc-50 rounded-3xl p-8 md:p-12 text-center`,children:[(0,J.jsx)(`h3`,{className:`text-2xl font-black mb-4`,children:`Want more insights?`}),(0,J.jsx)(`p`,{className:`text-zinc-500 font-medium mb-8`,children:`Stay updated with the latest in moderation and platform safety.`}),(0,J.jsx)(Aa,{to:`/blogs`,className:`inline-flex h-14 items-center px-8 bg-black text-white font-bold rounded-full hover:scale-105 transition-transform`,children:`Back to Overview`})]})})]})]}):(0,J.jsxs)(`div`,{className:`min-h-screen bg-white py-24 px-6 text-center`,children:[(0,J.jsx)(`h1`,{className:`text-4xl font-black mb-6`,children:`Post Not Found`}),(0,J.jsx)(Aa,{to:`/blogs`,className:`text-indigo-600 font-bold hover:underline`,children:`↠Back to all blogs`})]})},OO=()=>{let e=(0,R.c)(7),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsxs)(Me,{children:[(0,J.jsx)(`title`,{children:`404 - Page Not Found | CautionLabs`}),(0,J.jsx)(`meta`,{name:`robots`,content:`noindex, follow`})]}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsx)(`div`,{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] rounded-full blur-[120px] -z-10`,style:{background:`radial-gradient(circle, rgba(0,0,0,0.03) 0%, transparent 70%)`}}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(`div`,{className:`inline-block py-1.5 px-4 border border-black/10 bg-zinc-50 text-[10px] sm:text-xs font-bold tracking-[0.2em] uppercase text-black mb-2 shadow-sm rounded-full`,children:`Error 404`}),e[2]=r):r=e[2];let i,a;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsxs)(`h1`,{className:`text-6xl md:text-8xl lg:text-9xl font-black tracking-tight leading-[1.05] text-black`,children:[`Page Not Found`,(0,J.jsx)(`span`,{className:`text-red-500`,children:`.`})]}),a=(0,J.jsx)(`p`,{className:`text-lg md:text-xl text-zinc-500 max-w-lg mx-auto font-medium leading-relaxed`,children:`The page you are looking for doesn't exist, has been moved, or is temporarily unavailable. Let's get you back on track.`}),e[3]=i,e[4]=a):(i=e[3],a=e[4]);let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,J.jsx)(Aa,{to:`/`,children:(0,J.jsx)(ob,{text:`Return to Homepage`,variant:ab.PRIMARY,size:`lg`})}),e[5]=o):o=e[5];let s;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsxs)(J.Fragment,{children:[t,(0,J.jsxs)(`section`,{className:`min-h-[80vh] flex flex-col items-center justify-center text-center px-6 bg-white overflow-hidden relative border-b border-zinc-100`,children:[n,(0,J.jsxs)(`div`,{className:`space-y-8 animate-fade-up`,children:[r,i,a,(0,J.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-center justify-center gap-4 pt-8`,children:[o,(0,J.jsx)(Aa,{to:`/solutions`,children:(0,J.jsx)(ob,{text:`Explore Solutions`,variant:ab.SECONDARY,size:`lg`})})]})]})]})]}),e[6]=s):s=e[6],s},kO=()=>{let{createCheckoutSession:e}=db(),[t,n]=(0,g.useState)(``),[r,i]=(0,g.useState)(!1),[a,o]=(0,g.useState)(null),s=parseFloat(t),c=!isNaN(s)&&s>=5,l=async()=>{if(c){o(null),i(!0);try{let{checkoutUrl:t}=await e(s);window.location.href=t}catch{o(`Something went wrong. Please try again.`)}finally{i(!1)}}},u=c?Math.round(s*3e3).toLocaleString():null;return(0,J.jsxs)(`div`,{className:`min-h-screen pt-32 pb-24 px-6 relative overflow-hidden bg-white text-black`,children:[(0,J.jsx)(`div`,{className:`absolute top-0 left-1/2 -translate-x-1/2 w-[900px] h-[500px] bg-zinc-50 rounded-full blur-[120px] -z-10 opacity-70`}),(0,J.jsxs)(`div`,{className:`max-w-2xl mx-auto space-y-12 animate-in fade-in slide-in-from-bottom-8 duration-700`,children:[(0,J.jsxs)(`div`,{className:`space-y-4`,children:[(0,J.jsx)(`div`,{className:`inline-block py-1 px-3 border border-black/10 bg-zinc-50 text-[10px] font-bold tracking-[0.2em] uppercase text-black`,children:`Credits`}),(0,J.jsxs)(`h1`,{className:`text-5xl md:text-6xl font-black tracking-tight leading-tight`,children:[`Buy `,(0,J.jsx)(`br`,{}),(0,J.jsx)(`span`,{className:`text-zinc-400`,children:`Credits.`})]}),(0,J.jsxs)(`p`,{className:`text-lg text-zinc-500 max-w-xl font-medium leading-relaxed`,children:[`Credits power your content moderation requests. Enter any amount — the minimum is`,` `,(0,J.jsx)(`span`,{className:`text-black font-semibold`,children:`$5 USD`}),`.`]})]}),(0,J.jsxs)(`div`,{className:`bg-white border border-zinc-100 rounded-3xl p-10 relative overflow-hidden transition-all duration-500`,children:[(0,J.jsx)(`div`,{className:`absolute top-0 left-0 w-1.5 h-full bg-black`}),(0,J.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[(0,J.jsxs)(`div`,{className:`space-y-3`,children:[(0,J.jsx)(`label`,{className:`text-sm font-bold tracking-wide text-zinc-700 uppercase`,children:`Amount (USD)`}),(0,J.jsxs)(`div`,{className:`relative`,children:[(0,J.jsx)(`span`,{className:`absolute left-5 top-1/2 -translate-y-1/2 text-2xl font-black text-zinc-300 select-none`,children:`$`}),(0,J.jsx)(`input`,{id:`credit-amount`,type:`number`,min:5,step:`any`,placeholder:`0.00`,value:t,onChange:e=>{o(null),n(e.target.value)},className:`w-full h-20 bg-zinc-50 border border-zinc-200 rounded-2xl pl-12 pr-6 text-3xl font-black tracking-tight text-black placeholder-zinc-300 focus:outline-none focus:border-black focus:bg-white transition-all duration-300`})]}),(0,J.jsxs)(`div`,{className:`flex items-center justify-between px-1`,children:[(0,J.jsxs)(`p`,{className:`text-xs text-zinc-400`,children:[`Enter `,(0,J.jsx)(`span`,{className:`font-semibold`,children:`any amount`}),` — minimum $5.00`]}),u&&(0,J.jsxs)(`p`,{className:`text-xs font-bold text-zinc-600`,children:[`≈ `,(0,J.jsx)(`span`,{className:`text-black`,children:u}),` credits`]})]}),t!==``&&!isNaN(s)&&s<5&&(0,J.jsxs)(`div`,{className:`flex items-center gap-2 text-rose-500 text-sm font-semibold px-1`,children:[(0,J.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:[(0,J.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,J.jsx)(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`12`}),(0,J.jsx)(`line`,{x1:`12`,y1:`16`,x2:`12.01`,y2:`16`})]}),`Minimum amount is $5.00`]})]}),c&&(0,J.jsxs)(`div`,{className:`bg-zinc-50 border border-zinc-100 rounded-2xl p-6 space-y-3 transition-all duration-300`,children:[(0,J.jsx)(`p`,{className:`text-xs font-bold tracking-widest uppercase text-zinc-400`,children:`Order Summary`}),(0,J.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,J.jsx)(`span`,{className:`text-sm text-zinc-600 font-medium`,children:`Credits`}),(0,J.jsx)(`span`,{className:`font-black text-black`,children:u})]}),(0,J.jsxs)(`div`,{className:`flex items-center justify-between border-t border-zinc-200 pt-3`,children:[(0,J.jsx)(`span`,{className:`text-sm font-bold text-zinc-700`,children:`You pay`}),(0,J.jsxs)(`span`,{className:`text-xl font-black text-black`,children:[`$`,s.toFixed(2)]})]})]}),a&&(0,J.jsx)(`div`,{className:`bg-rose-50 border border-rose-100 rounded-2xl px-5 py-4 text-sm font-semibold text-rose-600`,children:a}),(0,J.jsx)(`button`,{id:`buy-credits-btn`,onClick:()=>{l()},disabled:!c||r,className:`w-full h-16 rounded-2xl text-sm font-black tracking-[0.12em] uppercase transition-all duration-300 flex items-center justify-center gap-3
${c&&!r?`bg-black text-white hover:bg-zinc-800 active:scale-[0.98] cursor-pointer`:`bg-zinc-100 text-zinc-400 cursor-not-allowed`}`,children:r?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`svg`,{className:`animate-spin`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:(0,J.jsx)(`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`})}),`Processing...`]}):`Buy Credits`}),(0,J.jsxs)(`p`,{className:`text-center text-xs text-zinc-400 leading-relaxed`,children:[`Powered by Dodo Payments — your payment is processed securely.`,(0,J.jsx)(`br`,{}),`Credits are added to your account instantly after payment.`]})]})]})]})]})},AO=e=>{let t=(0,R.c)(6),{className:n}=e,r,i,a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}),i=(0,J.jsx)(`path`,{d:`M21 3v5h-5`}),a=(0,J.jsx)(`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}),o=(0,J.jsx)(`path`,{d:`M8 16H3v5`}),t[0]=r,t[1]=i,t[2]=a,t[3]=o):(r=t[0],i=t[1],a=t[2],o=t[3]);let s;return t[4]===n?s=t[5]:(s=(0,J.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,className:n,children:[r,i,a,o]}),t[4]=n,t[5]=s),s},jO=e=>e?new Date(e).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}):null,MO=()=>{let{getCredits:e}=db(),[t,n]=(0,g.useState)(null),[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)(!0),[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(null),d=async(t=!1)=>{t?c(!0):o(!0),u(null);try{let r=await e();n(r.credits),i(r.updatedAt),t&&u({status:`success`,message:r.message})}catch(e){u({status:`danger`,message:e instanceof Error?e.message:`Failed to load credits`})}finally{o(!1),c(!1)}};return(0,g.useEffect)(()=>{let t=!1;return(async()=>{o(!0),u(null);try{let r=await e();t||(n(r.credits),i(r.updatedAt))}catch(e){t||u({status:`danger`,message:e instanceof Error?e.message:`Failed to load credits`})}finally{t||o(!1)}})(),()=>{t=!0}},[e]),(0,J.jsxs)(`div`,{className:`min-h-screen pt-32 pb-24 px-6 relative overflow-hidden bg-white text-black`,children:[(0,J.jsx)(`div`,{className:`absolute top-0 left-1/2 -translate-x-1/2 w-[900px] h-[500px] bg-zinc-50 rounded-full blur-[120px] -z-10 opacity-70`}),(0,J.jsxs)(`div`,{className:`max-w-2xl mx-auto space-y-12 animate-in fade-in slide-in-from-bottom-8 duration-700`,children:[(0,J.jsxs)(`div`,{className:`space-y-4`,children:[(0,J.jsx)(`div`,{className:`inline-block py-1 px-3 border border-black/10 bg-zinc-50 text-[10px] font-bold tracking-[0.2em] uppercase text-black`,children:`Account`}),(0,J.jsxs)(`h1`,{className:`text-5xl md:text-6xl font-black tracking-tight leading-tight`,children:[`Your `,(0,J.jsx)(`br`,{}),(0,J.jsx)(`span`,{className:`text-zinc-400`,children:`Credits.`})]}),(0,J.jsx)(`p`,{className:`text-lg text-zinc-500 max-w-xl font-medium leading-relaxed`,children:`Credits are used for content moderation API requests. Each request consumes credits from your balance.`})]}),(0,J.jsxs)(`div`,{className:`bg-white border border-zinc-100 rounded-3xl p-10 relative overflow-hidden`,children:[(0,J.jsx)(`div`,{className:`absolute top-0 left-0 w-1.5 h-full bg-black`}),(0,J.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,J.jsx)(`h2`,{className:`text-xl font-bold tracking-tight`,children:`Current balance`}),(0,J.jsxs)(`button`,{type:`button`,onClick:()=>void d(!0),className:`text-[10px] font-bold uppercase tracking-widest text-zinc-400 hover:text-black flex items-center gap-2 transition-colors`,children:[(0,J.jsx)(AO,{className:s?`animate-spin`:``}),`Refresh`]})]}),l&&(0,J.jsx)(Ub,{status:l.status,message:l.message}),(0,J.jsx)(`div`,{className:`bg-zinc-50 border border-zinc-200 rounded-2xl p-8 flex flex-col items-center justify-center gap-2 min-h-[10rem]`,children:a?(0,J.jsx)(`p`,{className:`text-zinc-300 animate-pulse text-lg`,children:`Loading balance...`}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`p`,{className:`text-5xl md:text-6xl font-black tracking-tight tabular-nums`,children:t?.toLocaleString()??`0`}),(0,J.jsx)(`p`,{className:`text-xs font-bold uppercase tracking-widest text-zinc-400`,children:`credits available`}),r&&(0,J.jsxs)(`p`,{className:`text-xs text-zinc-400 mt-2`,children:[`Last updated `,jO(r)]})]})}),(0,J.jsxs)(`div`,{className:`bg-zinc-50/80 border border-zinc-100 rounded-2xl p-6 space-y-2`,children:[(0,J.jsx)(`p`,{className:`text-xs font-bold tracking-widest uppercase text-zinc-400`,children:`Usage`}),(0,J.jsx)(`p`,{className:`text-sm text-zinc-600 leading-relaxed`,children:`Credits are deducted when you call the moderation API. If your balance reaches zero, requests will be rejected until you purchase more.`})]}),(0,J.jsx)(Aa,{to:`/purchase`,className:`self-start`,children:(0,J.jsx)(ob,{text:`Buy more credits`,variant:ab.PRIMARY,size:`lg`,className:`px-12 h-16 text-sm font-black tracking-[0.1em] uppercase rounded-2xl`})})]})]})]})]})},NO=`https://api.cautionlabs.com/v1`,PO=[{id:`introduction`,label:`Introduction`},{id:`quickstart`,label:`Quickstart`},{id:`authentication`,label:`Authentication`},{id:`moderate`,label:`Moderate text`},{id:`response-fields`,label:`Response fields`},{id:`errors`,label:`Errors`},{id:`rate-limits`,label:`Rate limits`},{id:`credits`,label:`Credits & billing`}],FO=Tb.map(e=>({field:e.apiField,name:e.name,description:e.apiDescription})),IO=[{status:400,code:`invalid_request`,description:"Missing or malformed request body (e.g. empty `text`)."},{status:401,code:`unauthorized`,description:`Missing, invalid, or revoked API key.`},{status:402,code:`insufficient_credits`,description:`Account has no remaining credits for moderation requests.`},{status:429,code:`rate_limit_exceeded`,description:`Too many requests. Retry after the time indicated in headers.`},{status:500,code:`internal_error`,description:`Unexpected server error. Retry with exponential backoff.`}],LO={quickstart:{curl:`curl -X POST ${NO}/moderate \\
-H "Authorization: Bearer YOUR_API_KEY" \\
-H "Content-Type: application/json" \\
-d '{"text": "Hello, world!"}'`,javascript:`const response = await fetch('${NO}/moderate', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ text: 'Hello, world!' }),
});
const scores = await response.json();
console.log(scores);`,python:`import requests
response = requests.post(
"${NO}/moderate",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={"text": "Hello, world!"},
)
scores = response.json()
print(scores)`},moderateRequest:{curl:`curl -X POST ${NO}/moderate \\
-H "Authorization: Bearer YOUR_API_KEY" \\
-H "Content-Type: application/json" \\
-d '{"text": "Your content to analyze"}'`,javascript:`const response = await fetch('${NO}/moderate', {
method: 'POST',
headers: {
Authorization: \`Bearer \${process.env.CAUTIONLABS_API_KEY}\`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'Your content to analyze',
}),
});
if (!response.ok) {
const err = await response.json();
throw new Error(err.message);
}
const result = await response.json();`,python:`import os
import requests
response = requests.post(
"${NO}/moderate",
headers={
"Authorization": f"Bearer {os.environ['CAUTIONLABS_API_KEY']}",
"Content-Type": "application/json",
},
json={"text": "Your content to analyze"},
timeout=30,
)
response.raise_for_status()
result = response.json()`},moderateResponse:{curl:`{
"toxic": 0.02,
"profanity": 0.05,
"hate": 0.01,
"harassment": 0.03,
"self_harm": 0.0,
"adult": 0.0,
"violence": 0.01,
"drugs": 0.0,
"weapons": 0.0,
"pii": 0.0,
"spam": 0.12,
"minor": 0.0
}`,javascript:`{
toxic: 0.02,
profanity: 0.05,
hate: 0.01,
harassment: 0.03,
self_harm: 0.0,
adult: 0.0,
violence: 0.01,
drugs: 0.0,
weapons: 0.0,
pii: 0.0,
spam: 0.12,
minor: 0.0,
}`,python:`{
"toxic": 0.02,
"profanity": 0.05,
"hate": 0.01,
"harassment": 0.03,
"self_harm": 0.0,
"adult": 0.0,
"violence": 0.01,
"drugs": 0.0,
"weapons": 0.0,
"pii": 0.0,
"spam": 0.12,
"minor": 0.0,
}`},errorResponse:{curl:`{
"error": {
"code": "insufficient_credits",
"message": "Your account has no remaining credits."
}
}`,javascript:`{
error: {
code: 'insufficient_credits',
message: 'Your account has no remaining credits.',
},
}`,python:`{
"error": {
"code": "insufficient_credits",
"message": "Your account has no remaining credits.",
}
}`}},RO=()=>{let e=(0,R.c)(7),[t,n]=(0,g.useState)(`introduction`),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=PO.map(zO).map(BO).filter(VO);if(e.length===0)return;let t=new IntersectionObserver(e=>{let t=e.filter(HO).sort(UO);t[0]?.target.id&&n(t[0].target.id)},{rootMargin:`-20% 0px -60% 0px`,threshold:[0,.25,.5]});return e.forEach(e=>{t.observe(e)}),()=>{t.disconnect()}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,g.useEffect)(r,i);let a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,J.jsx)(`p`,{className:`hidden lg:block text-[10px] font-bold uppercase tracking-[0.2em] text-zinc-400 mb-4 px-3`,children:`API Reference`}),e[2]=a):a=e[2];let o;e[3]===t?o=e[4]:(o=PO.map(e=>(0,J.jsx)(`a`,{href:`#${e.id}`,className:`docs-nav-link ${t===e.id?`active`:``}`,onClick:()=>{n(e.id)},children:e.label},e.id)),e[3]=t,e[4]=o);let s;return e[5]===o?s=e[6]:(s=(0,J.jsxs)(`aside`,{className:`docs-sidebar`,children:[a,(0,J.jsx)(`nav`,{"aria-label":`Documentation sections`,children:o})]}),e[5]=o,e[6]=s),s};function zO(e){return e.id}function BO(e){return document.getElementById(e)}function VO(e){return e!==null}function HO(e){return e.isIntersecting}function UO(e,t){return t.intersectionRatio-e.intersectionRatio}var WO=e=>{let t=(0,R.c)(7),{text:n}=e,[r,i]=(0,g.useState)(!1),a;t[0]===n?a=t[1]:(a=async()=>{try{await navigator.clipboard.writeText(n),i(!0),setTimeout(()=>{i(!1)},2e3)}catch{}},t[0]=n,t[1]=a);let o=a,s;t[2]===o?s=t[3]:(s=()=>void o(),t[2]=o,t[3]=s);let c=r?`Copied`:`Copy`,l;return t[4]!==s||t[5]!==c?(l=(0,J.jsx)(`button`,{type:`button`,onClick:s,className:`docs-copy-btn`,children:c}),t[4]=s,t[5]=c,t[6]=l):l=t[6],l},GO={curl:`cURL`,javascript:`JavaScript`,python:`Python`},KO=e=>{let t=(0,R.c)(13),{samples:n,defaultLang:r,showTabs:i}=e,a=r===void 0?`curl`:r,o=i===void 0?!0:i,[s,c]=(0,g.useState)(a),l=n[s],u;t[0]!==s||t[1]!==o?(u=o?(0,J.jsx)(`div`,{className:`docs-code-tab-list`,children:Object.keys(GO).map(e=>(0,J.jsx)(`button`,{type:`button`,className:`docs-code-tab ${s===e?`active`:``}`,onClick:()=>{c(e)},children:GO[e]},e))}):(0,J.jsx)(`span`,{className:`docs-code-tab active`,style:{border:`none`,cursor:`default`},children:`JSON`}),t[0]=s,t[1]=o,t[2]=u):u=t[2];let d;t[3]===l?d=t[4]:(d=(0,J.jsx)(WO,{text:l}),t[3]=l,t[4]=d);let f;t[5]!==u||t[6]!==d?(f=(0,J.jsxs)(`div`,{className:`docs-code-tabs`,children:[u,d]}),t[5]=u,t[6]=d,t[7]=f):f=t[7];let p;t[8]===l?p=t[9]:(p=(0,J.jsx)(`pre`,{className:`docs-code-pre`,children:(0,J.jsx)(`code`,{children:l})}),t[8]=l,t[9]=p);let m;return t[10]!==f||t[11]!==p?(m=(0,J.jsxs)(`div`,{className:`docs-code-panel`,children:[f,p]}),t[10]=f,t[11]=p,t[12]=m):m=t[12],m},qO=()=>{let e=(0,R.c)(65),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsxs)(Me,{children:[(0,J.jsx)(`title`,{children:`API Documentation — CautionLabs Content Moderation API`}),(0,J.jsx)(`meta`,{name:`description`,content:`Integrate CautionLabs content moderation in minutes. REST API reference for text analysis, authentication, response fields, and error codes.`}),(0,J.jsx)(`link`,{rel:`canonical`,href:`https://cautionlabs.com/docs`}),(0,J.jsx)(`meta`,{property:`og:title`,content:`CautionLabs API Documentation`}),(0,J.jsx)(`meta`,{property:`og:description`,content:`REST API reference for AI-powered content moderation. One endpoint, twelve category scores.`}),(0,J.jsx)(`meta`,{property:`og:url`,content:`https://cautionlabs.com/docs`})]}),e[0]=t):t=e[0];let n,r,i;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsx)(`div`,{className:`inline-block py-1 px-3 border border-black/10 bg-white text-[10px] font-bold tracking-[0.2em] uppercase text-black mb-6`,children:`API Reference`}),r=(0,J.jsx)(`h1`,{className:`text-4xl md:text-5xl font-black tracking-tight text-black mb-4`,children:`CautionLabs API`}),i=(0,J.jsx)(`p`,{className:`text-lg text-zinc-500 font-medium leading-relaxed max-w-2xl`,children:`Send text, get instant moderation scores across twelve harm categories. One endpoint, simple JSON, production-ready.`}),e[1]=n,e[2]=r,e[3]=i):(n=e[1],r=e[2],i=e[3]);let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,J.jsx)(`header`,{className:`docs-hero px-6 py-16 md:py-20`,children:(0,J.jsxs)(`div`,{className:`max-w-3xl mx-auto`,children:[n,r,i,(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 mt-8`,children:[(0,J.jsx)(`span`,{className:`docs-pill`,children:`REST`}),(0,J.jsx)(`span`,{className:`docs-pill`,children:`JSON`}),(0,J.jsx)(`span`,{className:`docs-pill`,children:`HTTPS`}),(0,J.jsx)(`code`,{className:`text-sm font-mono text-zinc-600 bg-zinc-100 px-3 py-1.5 rounded-md`,children:NO})]})]})}),e[4]=a):a=e[4];let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,J.jsx)(RO,{}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsx)(`h2`,{children:`Introduction`}),e[6]=s):s=e[6];let c;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,J.jsx)(`strong`,{className:`text-black font-semibold`,children:`0`}),e[7]=c):c=e[7];let l,u;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,J.jsxs)(`p`,{children:[`The CautionLabs API analyzes user-generated text and returns confidence scores from`,` `,c,` (safe) to`,` `,(0,J.jsx)(`strong`,{className:`text-black font-semibold`,children:`1`}),` (high confidence of violation) for each moderation category. Use it to filter chat, comments, reviews, UGC, and any text-heavy product surface.`]}),u=(0,J.jsx)(`p`,{children:`All requests are made over HTTPS. Responses are JSON. There is a single primary endpoint — no versioning sprawl, no graph of micro-endpoints to learn.`}),e[8]=l,e[9]=u):(l=e[8],u=e[9]);let d;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,J.jsx)(`strong`,{children:`Base URL:`}),e[10]=d):d=e[10];let f,p;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,J.jsx)(`code`,{children:NO}),p=(0,J.jsx)(`br`,{}),e[11]=f,e[12]=p):(f=e[11],p=e[12]);let m;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,J.jsx)(nd,{when:`signed-out`,children:(0,J.jsx)(kd,{mode:`modal`,children:(0,J.jsx)(`button`,{type:`button`,className:`docs-inline-link`,children:`Sign up free`})})}),e[13]=m):m=e[13];let h;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,J.jsxs)(`section`,{id:`introduction`,className:`docs-section`,children:[s,l,u,(0,J.jsxs)(`div`,{className:`docs-callout`,children:[d,` `,f,p,(0,J.jsxs)(`span`,{className:`text-zinc-500 mt-2 inline-block`,children:[`Need an API key?`,` `,m,(0,J.jsx)(nd,{when:`signed-in`,children:(0,J.jsx)(Aa,{to:`/api-keys`,className:`docs-inline-link`,children:`Get your API key`})}),` `,`from the dashboard.`]})]})]}),e[14]=h):h=e[14];let g,_;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,J.jsx)(`h2`,{children:`Quickstart`}),_=(0,J.jsx)(`p`,{children:`Make your first moderation request in under a minute.`}),e[15]=g,e[16]=_):(g=e[15],_=e[16]);let v;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,J.jsxs)(`li`,{children:[`Create a free account and copy your API key from the`,` `,(0,J.jsx)(Aa,{to:`/api-keys`,className:`docs-inline-link`,children:`API Keys`}),` `,`page.`]}),e[17]=v):v=e[17];let y;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,J.jsxs)(`li`,{children:[`Replace `,(0,J.jsx)(`code`,{children:`YOUR_API_KEY`}),` in the examples below.`]}),e[18]=y):y=e[18];let b;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,J.jsx)(`code`,{children:`POST`}),e[19]=b):b=e[19];let x;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,J.jsx)(`code`,{children:`/moderate`}),e[20]=x):x=e[20];let S;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,J.jsxs)(`section`,{id:`quickstart`,className:`docs-section`,children:[g,_,(0,J.jsxs)(`ol`,{className:`list-decimal pl-5 space-y-2 text-zinc-600 text-[0.9375rem] mb-6`,children:[v,y,(0,J.jsxs)(`li`,{children:[`Send a `,b,` request to `,x,` with a JSON body containing `,(0,J.jsx)(`code`,{children:`text`}),`.`]})]}),(0,J.jsx)(KO,{samples:LO.quickstart})]}),e[21]=S):S=e[21];let C;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,J.jsx)(`h2`,{children:`Authentication`}),e[22]=C):C=e[22];let w;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,J.jsxs)(`p`,{children:[`Authenticate every request with your API key in the `,(0,J.jsx)(`code`,{children:`Authorization`}),` header using the Bearer scheme:`]}),e[23]=w):w=e[23];let T,E,D,O;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,J.jsx)(KO,{samples:{curl:`Authorization: Bearer YOUR_API_KEY`,javascript:"headers: {\n Authorization: `Bearer ${process.env.CAUTIONLABS_API_KEY}`,\n}",python:`headers = {
"Authorization": f"Bearer {api_key}",
}`},showTabs:!1}),E=(0,J.jsx)(`h3`,{children:`Keep your key secure`}),D=(0,J.jsx)(`li`,{children:`Never expose API keys in client-side code or public repositories.`}),O=(0,J.jsx)(`li`,{children:`Call the API from your backend or a trusted proxy.`}),e[24]=T,e[25]=E,e[26]=D,e[27]=O):(T=e[24],E=e[25],D=e[26],O=e[27]);let k;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,J.jsxs)(`section`,{id:`authentication`,className:`docs-section`,children:[C,w,T,E,(0,J.jsxs)(`ul`,{children:[D,O,(0,J.jsxs)(`li`,{children:[`Rotate compromised keys immediately via`,` `,(0,J.jsx)(Aa,{to:`/api-keys`,className:`docs-inline-link`,children:`Roll API Key`}),` `,`in the dashboard.`]})]})]}),e[28]=k):k=e[28];let A,j;e[29]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,J.jsx)(`h2`,{children:`Moderate text`}),j=(0,J.jsx)(`p`,{children:`Analyze a string of text and receive scores for all twelve moderation categories.`}),e[29]=A,e[30]=j):(A=e[29],j=e[30]);let ee,M;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,J.jsxs)(`div`,{className:`docs-endpoint-header`,children:[(0,J.jsx)(`span`,{className:`docs-method docs-method-post`,children:`POST`}),(0,J.jsx)(`code`,{className:`docs-path`,children:`/moderate`})]}),M=(0,J.jsx)(`h3`,{children:`Request body`}),e[31]=ee,e[32]=M):(ee=e[31],M=e[32]);let N,te,P,F;e[33]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,J.jsx)(`div`,{className:`docs-table-wrap`,children:(0,J.jsxs)(`table`,{className:`docs-table`,children:[(0,J.jsx)(`thead`,{children:(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`th`,{children:`Field`}),(0,J.jsx)(`th`,{children:`Type`}),(0,J.jsx)(`th`,{children:`Required`}),(0,J.jsx)(`th`,{children:`Description`})]})}),(0,J.jsx)(`tbody`,{children:(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`td`,{children:(0,J.jsx)(`code`,{children:`text`})}),(0,J.jsx)(`td`,{children:`string`}),(0,J.jsx)(`td`,{children:`Yes`}),(0,J.jsx)(`td`,{children:`The text content to analyze. UTF-8 encoded.`})]})})]})}),te=(0,J.jsx)(`h3`,{children:`Example request`}),P=(0,J.jsx)(KO,{samples:LO.moderateRequest}),F=(0,J.jsx)(`h3`,{children:`Example response`}),e[33]=N,e[34]=te,e[35]=P,e[36]=F):(N=e[33],te=e[34],P=e[35],F=e[36]);let ne,re,ie;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,J.jsxs)(`p`,{children:[`Returns `,(0,J.jsx)(`code`,{children:`200 OK`}),` with a JSON object. Each key is a category field with a float score between 0 and 1.`]}),re=(0,J.jsx)(KO,{samples:LO.moderateResponse,defaultLang:`javascript`}),ie=(0,J.jsx)(`h3`,{children:`Headers`}),e[37]=ne,e[38]=re,e[39]=ie):(ne=e[37],re=e[38],ie=e[39]);let ae;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,J.jsxs)(`section`,{id:`moderate`,className:`docs-section`,children:[A,j,ee,M,N,te,P,F,ne,re,ie,(0,J.jsx)(`div`,{className:`docs-table-wrap`,children:(0,J.jsxs)(`table`,{className:`docs-table`,children:[(0,J.jsx)(`thead`,{children:(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`th`,{children:`Header`}),(0,J.jsx)(`th`,{children:`Required`}),(0,J.jsx)(`th`,{children:`Description`})]})}),(0,J.jsxs)(`tbody`,{children:[(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`td`,{children:(0,J.jsx)(`code`,{children:`Authorization`})}),(0,J.jsx)(`td`,{children:`Yes`}),(0,J.jsx)(`td`,{children:(0,J.jsx)(`code`,{children:`Bearer YOUR_API_KEY`})})]}),(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`td`,{children:(0,J.jsx)(`code`,{children:`Content-Type`})}),(0,J.jsx)(`td`,{children:`Yes`}),(0,J.jsx)(`td`,{children:(0,J.jsx)(`code`,{children:`application/json`})})]})]})]})})]}),e[40]=ae):ae=e[40];let I,L;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,J.jsx)(`h2`,{children:`Response fields`}),L=(0,J.jsx)(`p`,{children:`Every successful response includes all twelve category scores. Set your own thresholds per category based on your product's risk tolerance.`}),e[41]=I,e[42]=L):(I=e[41],L=e[42]);let oe;e[43]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,J.jsx)(`div`,{className:`docs-table-wrap`,children:(0,J.jsxs)(`table`,{className:`docs-table`,children:[(0,J.jsx)(`thead`,{children:(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`th`,{children:`Field`}),(0,J.jsx)(`th`,{children:`Category`}),(0,J.jsx)(`th`,{children:`Description`})]})}),(0,J.jsx)(`tbody`,{children:FO.map(JO)})]})}),e[43]=oe):oe=e[43];let se;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,J.jsx)(`strong`,{children:`Tip:`}),e[44]=se):se=e[44];let ce;e[45]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,J.jsx)(`code`,{children:`0.85`}),e[45]=ce):ce=e[45];let le;e[46]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,J.jsx)(`code`,{children:`toxic`}),e[46]=le):le=e[46];let ue;e[47]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,J.jsxs)(`section`,{id:`response-fields`,className:`docs-section`,children:[I,L,oe,(0,J.jsxs)(`div`,{className:`docs-callout`,children:[se,` Scores are continuous, not binary. A score of `,ce,` `,`on `,le,` means high confidence of toxic content; `,(0,J.jsx)(`code`,{children:`0.12`}),` is likely safe. Tune cutoffs per surface (e.g. stricter in DMs than in public posts).`]})]}),e[47]=ue):ue=e[47];let de;e[48]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,J.jsx)(`h2`,{children:`Errors`}),e[48]=de):de=e[48];let fe;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(fe=(0,J.jsx)(`code`,{children:`error`}),e[49]=fe):fe=e[49];let pe;e[50]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,J.jsx)(`code`,{children:`code`}),e[50]=pe):pe=e[50];let me,he;e[51]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,J.jsxs)(`p`,{children:[`Errors use standard HTTP status codes. The response body includes an`,` `,fe,` object with `,pe,` and `,(0,J.jsx)(`code`,{children:`message`}),` fields.`]}),he=(0,J.jsx)(KO,{samples:LO.errorResponse,defaultLang:`javascript`}),e[51]=me,e[52]=he):(me=e[51],he=e[52]);let ge;e[53]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,J.jsxs)(`section`,{id:`errors`,className:`docs-section`,children:[de,me,he,(0,J.jsx)(`div`,{className:`docs-table-wrap`,children:(0,J.jsxs)(`table`,{className:`docs-table`,children:[(0,J.jsx)(`thead`,{children:(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`th`,{children:`Status`}),(0,J.jsx)(`th`,{children:`Code`}),(0,J.jsx)(`th`,{children:`Description`})]})}),(0,J.jsx)(`tbody`,{children:IO.map(YO)})]})})]}),e[53]=ge):ge=e[53];let _e;e[54]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,J.jsx)(`h2`,{children:`Rate limits`}),e[54]=_e):_e=e[54];let ve;e[55]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,J.jsxs)(`p`,{children:[`Requests are rate-limited per API key to ensure fair usage and platform stability. When you exceed the limit, the API returns `,(0,J.jsx)(`code`,{children:`429 Too Many Requests`}),`.`]}),e[55]=ve):ve=e[55];let ye;e[56]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,J.jsxs)(`section`,{id:`rate-limits`,className:`docs-section`,children:[_e,ve,(0,J.jsxs)(`ul`,{children:[(0,J.jsxs)(`li`,{children:[`Check the `,(0,J.jsx)(`code`,{children:`Retry-After`}),` response header for when to retry.`]}),(0,J.jsx)(`li`,{children:`Implement exponential backoff in your client for transient errors.`}),(0,J.jsx)(`li`,{children:`High-volume needs? Contact us for enterprise limits after you're on a paid plan.`})]})]}),e[56]=ye):ye=e[56];let be,xe;e[57]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,J.jsx)(`h2`,{children:`Credits & billing`}),xe=(0,J.jsx)(`p`,{children:`Each moderation request consumes credits from your account balance. New accounts include a free tier to get started.`}),e[57]=be,e[58]=xe):(be=e[57],xe=e[58]);let Se,Ce;e[59]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,J.jsxs)(`li`,{children:[`Purchase additional credits from the`,` `,(0,J.jsx)(Aa,{to:`/purchase`,className:`docs-inline-link`,children:`Buy Credits`}),` `,`page (minimum $5 USD).`]}),Ce=(0,J.jsx)(`li`,{children:`Approximately 3,000 credits per $1 USD.`}),e[59]=Se,e[60]=Ce):(Se=e[59],Ce=e[60]);let we;e[61]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,J.jsx)(`code`,{children:`402 Payment Required`}),e[61]=we):we=e[61];let Te;e[62]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,J.jsxs)(`ul`,{children:[Se,Ce,(0,J.jsxs)(`li`,{children:[`When credits are exhausted, requests return `,we,` with code `,(0,J.jsx)(`code`,{children:`insufficient_credits`}),`.`]})]}),e[62]=Te):Te=e[62];let Ee;e[63]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,J.jsx)(nd,{when:`signed-out`,children:(0,J.jsx)(kd,{mode:`modal`,children:(0,J.jsx)(ob,{text:`Get API Key — Free`,variant:ab.PRIMARY,size:`lg`})})}),e[63]=Ee):Ee=e[63];let De;return e[64]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,J.jsxs)(`div`,{className:`docs-page bg-white`,children:[t,a,(0,J.jsxs)(`div`,{className:`docs-layout`,children:[o,(0,J.jsxs)(`main`,{className:`docs-main`,children:[h,S,k,ae,ue,ge,ye,(0,J.jsxs)(`section`,{id:`credits`,className:`docs-section`,children:[be,xe,Te,(0,J.jsxs)(`div`,{className:`mt-8 pt-8 border-t border-zinc-100`,children:[Ee,(0,J.jsx)(nd,{when:`signed-in`,children:(0,J.jsx)(Aa,{to:`/api-keys`,children:(0,J.jsx)(ob,{text:`Go to API Keys`,variant:ab.PRIMARY,size:`lg`})})})]})]})]})]})]}),e[64]=De):De=e[64],De};function JO(e){return(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`td`,{children:(0,J.jsx)(`code`,{children:e.field})}),(0,J.jsx)(`td`,{className:`font-medium text-black`,children:e.name}),(0,J.jsx)(`td`,{children:e.description})]},e.field)}function YO(e){return(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`td`,{children:(0,J.jsx)(`code`,{children:e.status})}),(0,J.jsx)(`td`,{children:(0,J.jsx)(`code`,{children:e.code})}),(0,J.jsx)(`td`,{children:e.description})]},e.code)}var XO=Ta([{path:`/`,element:(0,J.jsx)(()=>{let e=(0,R.c)(8),t=ti(),n,r;e[0]===t?(n=e[1],r=e[2]):(n=e=>t(e),r=e=>t(e,{replace:!0}),e[0]=t,e[1]=n,e[2]=r);let i,a;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsx)(fb,{}),a=(0,J.jsx)(Ri,{}),e[3]=i,e[4]=a):(i=e[3],a=e[4]);let o;return e[5]!==n||e[6]!==r?(o=(0,J.jsxs)(q,{publishableKey:`pk_live_Y2xlcmsuY2F1dGlvbmxhYnMuY29tJA`,afterSignOutUrl:`/`,routerPush:n,routerReplace:r,children:[i,a]}),e[5]=n,e[6]=r,e[7]=o):o=e[7],o},{}),children:[{element:(0,J.jsx)(pb,{}),children:[{path:`/`,element:(0,J.jsx)(wb,{})},{path:`/solutions`,element:(0,J.jsx)(kb,{})},{path:`/solutions/:slug`,element:(0,J.jsx)(Ob,{})},{path:`/docs`,element:(0,J.jsx)(qO,{})},{path:`/blogs`,element:(0,J.jsx)(GD,{})},{path:`/blogs/:slug`,element:(0,J.jsx)(DO,{})},{path:`/api-keys`,element:(0,J.jsx)(Kb,{children:(0,J.jsx)(Gb,{})})},{path:`/credits`,element:(0,J.jsx)(Kb,{children:(0,J.jsx)(MO,{})})},{path:`/purchase`,element:(0,J.jsx)(Kb,{children:(0,J.jsx)(kO,{})})},{path:`*`,element:(0,J.jsx)(OO,{})}]}]}]);function ZO(){let e=(0,R.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(Ja,{router:XO}),e[0]=t):t=e[0],t}var QO=document.getElementById(`root`);if(!QO)throw Error(`Failed to find the root element`);(0,h.createRoot)(QO).render((0,J.jsx)(g.StrictMode,{children:(0,J.jsx)(ve,{children:(0,J.jsx)(ZO,{})})}));