@knpkv/codecommit-web 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/index-DHUFjL8d.css +1 -0
- package/dist/client/assets/index-DfsN9fTl.js +90 -0
- package/dist/client/index.html +2 -2
- package/dist/main.js +4 -2
- package/dist/main.js.map +1 -1
- package/dist/server/Api.d.ts +56 -56
- package/dist/server/Server.d.ts.map +1 -1
- package/dist/server/Server.js +2 -1
- package/dist/server/Server.js.map +1 -1
- package/dist/server/handlers/accounts-live.d.ts +1 -1
- package/dist/server/handlers/accounts-live.d.ts.map +1 -1
- package/dist/server/handlers/audit-live.d.ts +1 -1
- package/dist/server/handlers/audit-live.d.ts.map +1 -1
- package/dist/server/handlers/config-live.d.ts +1 -1
- package/dist/server/handlers/config-live.d.ts.map +1 -1
- package/dist/server/handlers/config-live.js +8 -5
- package/dist/server/handlers/config-live.js.map +1 -1
- package/dist/server/handlers/events-live.d.ts +1 -1
- package/dist/server/handlers/events-live.d.ts.map +1 -1
- package/dist/server/handlers/events-live.js +8 -2
- package/dist/server/handlers/events-live.js.map +1 -1
- package/dist/server/handlers/notifications-live.d.ts +1 -1
- package/dist/server/handlers/notifications-live.d.ts.map +1 -1
- package/dist/server/handlers/notifications-live.js +3 -2
- package/dist/server/handlers/notifications-live.js.map +1 -1
- package/dist/server/handlers/permissions-live.d.ts +1 -1
- package/dist/server/handlers/permissions-live.d.ts.map +1 -1
- package/dist/server/handlers/permissions-live.js +2 -1
- package/dist/server/handlers/permissions-live.js.map +1 -1
- package/dist/server/handlers/prs-live.d.ts +1 -1
- package/dist/server/handlers/prs-live.d.ts.map +1 -1
- package/dist/server/handlers/prs-live.js +11 -10
- package/dist/server/handlers/prs-live.js.map +1 -1
- package/dist/server/handlers/sandbox-live.d.ts +1 -1
- package/dist/server/handlers/sandbox-live.d.ts.map +1 -1
- package/dist/server/handlers/sandbox-live.js +3 -2
- package/dist/server/handlers/sandbox-live.js.map +1 -1
- package/dist/server/handlers/stats-live.d.ts +1 -1
- package/dist/server/handlers/stats-live.d.ts.map +1 -1
- package/dist/server/handlers/subscriptions-live.d.ts +1 -1
- package/dist/server/handlers/subscriptions-live.d.ts.map +1 -1
- package/dist/tooling/production-prototype-boundary.d.ts +6 -0
- package/dist/tooling/production-prototype-boundary.d.ts.map +1 -0
- package/dist/tooling/production-prototype-boundary.js +21 -0
- package/dist/tooling/production-prototype-boundary.js.map +1 -0
- package/package.json +15 -15
- package/dist/client/assets/index-Dv7jNWIj.js +0 -90
- package/dist/client/assets/index-olbvD6Ke.css +0 -1
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(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 N(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,N(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,`$&/`)+`/`),N(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+=N(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+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(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 ee(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function P(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 F=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)},I={map:ee,forEach:function(e,t,n){ee(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ee(e,function(){t++}),t},toArray:function(e){return ee(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=I,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:P}},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,F)}catch(e){F(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.7`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=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 M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function ee(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?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?ee(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var P=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function ie(e){return{current:e}}function L(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function ae(e,t){re++,ne[re]=e.current,e.current=t}var oe=ie(null),se=ie(null),ce=ie(null),le=ie(null);function ue(e,t){switch(ae(ce,t),ae(se,e),ae(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ef(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ef(t),e=tf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}L(oe),ae(oe,e)}function de(){L(oe),L(se),L(ce)}function fe(e){e.memoizedState!==null&&ae(le,e);var t=oe.current,n=tf(t,e.type);t!==n&&(ae(se,e),ae(oe,n))}function pe(e){se.current===e&&(L(oe),L(se)),le.current===e&&(L(le),dp._currentValue=te)}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(`
|
|
2
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
-
`+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(`
|
|
4
|
-
`),l=s.split(`
|
|
5
|
-
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
-
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{_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`
|
|
7
|
-
Error generating stack: `+e.message+`
|
|
8
|
-
`+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,Ie=null;function Le(e){if(typeof Ne==`function`&&Pe(e),Ie&&typeof Ie.setStrictMode==`function`)try{Ie.setStrictMode(Fe,e)}catch{}}var Re=Math.clz32?Math.clz32:Ve,ze=Math.log,Be=Math.LN2;function Ve(e){return e>>>=0,e===0?32:31-(ze(e)/Be|0)|0}var He=256,Ue=262144,We=4194304;function Ge(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 Ke(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=Ge(n))):i=Ge(o):i=Ge(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ge(n))):i=Ge(o)):i=Ge(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 qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Je(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 Ye(){var e=We;return We<<=1,!(We&62914560)&&(We=4194304),e}function Xe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qe(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-Re(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&&$e(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function $e(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Re(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function et(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Re(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function tt(e,t){var n=t&-t;return n=n&42?1:nt(n),(n&(e.suspendedLanes|t))===0?n:0}function nt(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 rt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function it(){var e=I.p;return e===0?(e=window.event,e===void 0?32:Dp(e.type)):e}function at(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var ot=Math.random().toString(36).slice(2),st=`__reactFiber$`+ot,ct=`__reactProps$`+ot,lt=`__reactContainer$`+ot,ut=`__reactEvents$`+ot,dt=`__reactListeners$`+ot,ft=`__reactHandles$`+ot,pt=`__reactResources$`+ot,mt=`__reactMarker$`+ot;function ht(e){delete e[st],delete e[ct],delete e[ut],delete e[dt],delete e[ft]}function gt(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[lt]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=wf(e);e!==null;){if(n=e[st])return n;e=wf(e)}return t}e=n,n=e.parentNode}return null}function _t(e){if(e=e[st]||e[lt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function vt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function yt(e){var t=e[pt];return t||=e[pt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function bt(e){e[mt]=!0}var xt=new Set,St={};function Ct(e,t){wt(e,t),wt(e+`Capture`,t)}function wt(e,t){for(St[e]=t,e=0;e<t.length;e++)xt.add(t[e])}var Tt=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]*$`),Et={},Dt={};function Ot(e){return xe.call(Dt,e)?!0:xe.call(Et,e)?!1:Tt.test(e)?Dt[e]=!0:(Et[e]=!0,!1)}function kt(e,t,n){if(Ot(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 At(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 jt(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 Mt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Nt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Pt(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 Ft(e){if(!e._valueTracker){var t=Nt(e)?`checked`:`value`;e._valueTracker=Pt(e,t,``+e[t])}}function It(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Nt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Lt(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 Rt=/[\n"\\]/g;function zt(e){return e.replace(Rt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Bt(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=``+Mt(t)):e.value!==``+Mt(t)&&(e.value=``+Mt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ht(e,o,Mt(n)):Ht(e,o,Mt(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=``+Mt(s):e.removeAttribute(`name`)}function Vt(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)){Ft(e);return}n=n==null?``:``+Mt(n),t=t==null?n:``+Mt(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),Ft(e)}function Ht(e,t,n){t===`number`&&Lt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ut(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=``+Mt(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 Wt(e,t,n){if(t!=null&&(t=``+Mt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Mt(n)}function Gt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(P(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Mt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ft(e)}function Kt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt=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 Jt(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||qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Yt(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&&Jt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Jt(e,o,t[o])}function Xt(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 Zt=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`]]),Qt=/^[\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 $t(e){return Qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function en(){}var tn=null;function nn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rn=null,an=null;function on(e){var t=_t(e);if(t&&(e=t.stateNode)){var n=e[ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Bt(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="`+zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ct]||null;if(!a)throw Error(i(90));Bt(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&&It(r)}break a;case`textarea`:Wt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}var sn=!1;function cn(e,t,n){if(sn)return e(t,n);sn=!0;try{return e(t)}finally{if(sn=!1,(rn!==null||an!==null)&&(Au(),rn&&(t=rn,e=an,an=rn=null,on(t),e)))for(t=0;t<e.length;t++)on(e[t])}}function ln(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ct]||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 un=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),dn=!1;if(un)try{var fn={};Object.defineProperty(fn,"passive",{get:function(){dn=!0}}),window.addEventListener(`test`,fn,fn),window.removeEventListener(`test`,fn,fn)}catch{dn=!1}var pn=null,mn=null,hn=null;function gn(){if(hn)return hn;var e,t=mn,n=t.length,r,i=`value`in pn?pn.value:pn.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 hn=i.slice(e,1<r?1-r:void 0)}function _n(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 vn(){return!0}function yn(){return!1}function bn(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)?vn:yn,this.isPropagationStopped=yn,this}return m(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=vn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=vn)},persist:function(){},isPersistent:vn}),t}var xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sn=bn(xn),Cn=m({},xn,{view:0,detail:0}),wn=bn(Cn),Tn,En,Dn,On=m({},Cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zn,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!==Dn&&(Dn&&e.type===`mousemove`?(Tn=e.screenX-Dn.screenX,En=e.screenY-Dn.screenY):En=Tn=0,Dn=e),Tn)},movementY:function(e){return`movementY`in e?e.movementY:En}}),kn=bn(On),An=bn(m({},On,{dataTransfer:0})),jn=bn(m({},Cn,{relatedTarget:0})),Mn=bn(m({},xn,{animationName:0,elapsedTime:0,pseudoElement:0})),Nn=bn(m({},xn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Pn=bn(m({},xn,{data:0})),Fn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},In={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`},Ln={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Rn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ln[e])?!!t[e]:!1}function zn(){return Rn}var Bn=bn(m({},Cn,{key:function(e){if(e.key){var t=Fn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=_n(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?In[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zn,charCode:function(e){return e.type===`keypress`?_n(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?_n(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Vn=bn(m({},On,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Hn=bn(m({},Cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zn})),Un=bn(m({},xn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Wn=bn(m({},On,{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})),Gn=bn(m({},xn,{newState:0,oldState:0})),Kn=[9,13,27,32],qn=un&&`CompositionEvent`in window,Jn=null;un&&`documentMode`in document&&(Jn=document.documentMode);var Yn=un&&`TextEvent`in window&&!Jn,Xn=un&&(!qn||Jn&&8<Jn&&11>=Jn),Zn=` `,Qn=!1;function $n(e,t){switch(e){case`keyup`:return Kn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var tr=!1;function nr(e,t){switch(e){case`compositionend`:return er(t);case`keypress`:return t.which===32?(Qn=!0,Zn):null;case`textInput`:return e=t.data,e===Zn&&Qn?null:e;default:return null}}function rr(e,t){if(tr)return e===`compositionend`||!qn&&$n(e,t)?(e=gn(),hn=mn=pn=null,tr=!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 Xn&&t.locale!==`ko`?null:t.data;default:return null}}var ir={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 ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ir[e.type]:t===`textarea`}function or(e,t,n,r){rn?an?an.push(r):an=[r]:rn=r,t=Rd(t,`onChange`),0<t.length&&(n=new Sn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var sr=null,cr=null;function lr(e){Ad(e,0)}function ur(e){if(It(vt(e)))return e}function dr(e,t){if(e===`change`)return t}var fr=!1;if(un){var pr;if(un){var mr=`oninput`in document;if(!mr){var hr=document.createElement(`div`);hr.setAttribute(`oninput`,`return;`),mr=typeof hr.oninput==`function`}pr=mr}else pr=!1;fr=pr&&(!document.documentMode||9<document.documentMode)}function gr(){sr&&(sr.detachEvent(`onpropertychange`,_r),cr=sr=null)}function _r(e){if(e.propertyName===`value`&&ur(cr)){var t=[];or(t,cr,e,nn(e)),cn(lr,t)}}function vr(e,t,n){e===`focusin`?(gr(),sr=t,cr=n,sr.attachEvent(`onpropertychange`,_r)):e===`focusout`&&gr()}function yr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ur(cr)}function br(e,t){if(e===`click`)return ur(t)}function xr(e,t){if(e===`input`||e===`change`)return ur(t)}function Sr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Cr=typeof Object.is==`function`?Object.is:Sr;function wr(e,t){if(Cr(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)||!Cr(e[i],t[i]))return!1}return!0}function Tr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Er(e,t){var n=Tr(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=Tr(n)}}function Dr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Or(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lt(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=Lt(e.document)}return t}function kr(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 Ar=un&&`documentMode`in document&&11>=document.documentMode,jr=null,Mr=null,Nr=null,Pr=!1;function Fr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pr||jr==null||jr!==Lt(r)||(r=jr,`selectionStart`in r&&kr(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}),Nr&&wr(Nr,r)||(Nr=r,r=Rd(Mr,`onSelect`),0<r.length&&(t=new Sn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=jr)))}function Ir(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Lr={animationend:Ir(`Animation`,`AnimationEnd`),animationiteration:Ir(`Animation`,`AnimationIteration`),animationstart:Ir(`Animation`,`AnimationStart`),transitionrun:Ir(`Transition`,`TransitionRun`),transitionstart:Ir(`Transition`,`TransitionStart`),transitioncancel:Ir(`Transition`,`TransitionCancel`),transitionend:Ir(`Transition`,`TransitionEnd`)},Rr={},zr={};un&&(zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Lr.animationend.animation,delete Lr.animationiteration.animation,delete Lr.animationstart.animation),`TransitionEvent`in window||delete Lr.transitionend.transition);function Br(e){if(Rr[e])return Rr[e];if(!Lr[e])return e;var t=Lr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in zr)return Rr[e]=t[n];return e}var Vr=Br(`animationend`),Hr=Br(`animationiteration`),Ur=Br(`animationstart`),Wr=Br(`transitionrun`),Gr=Br(`transitionstart`),Kr=Br(`transitioncancel`),qr=Br(`transitionend`),Jr=new Map,Yr=`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(` `);Yr.push(`scrollEnd`);function Xr(e,t){Jr.set(e,t),Ct(t,[e])}var Zr=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)},Qr=[],$r=0,ei=0;function ti(){for(var e=$r,t=ei=$r=0;t<e;){var n=Qr[t];Qr[t++]=null;var r=Qr[t];Qr[t++]=null;var i=Qr[t];Qr[t++]=null;var a=Qr[t];if(Qr[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&&ai(n,i,a)}}function ni(e,t,n,r){Qr[$r++]=e,Qr[$r++]=t,Qr[$r++]=n,Qr[$r++]=r,ei|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ri(e,t,n,r){return ni(e,t,n,r),oi(e)}function ii(e,t){return ni(e,null,null,t),oi(e)}function ai(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-Re(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function oi(e){if(50<xu)throw xu=0,Su=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var si={};function ci(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 li(e,t,n,r){return new ci(e,t,n,r)}function ui(e){return e=e.prototype,!(!e||!e.isReactComponent)}function di(e,t){var n=e.alternate;return n===null?(n=li(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 fi(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 pi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ui(e)&&(s=1);else if(typeof e==`string`)s=np(e,n,oe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=li(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return mi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=li(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=li(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=li(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=li(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function mi(e,t,n,r){return e=li(7,e,r,t),e.lanes=n,e}function hi(e,t,n){return e=li(6,e,null,t),e.lanes=n,e}function gi(e){var t=li(18,null,null,0);return t.stateNode=e,t}function _i(e,t,n){return t=li(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var vi=new WeakMap;function yi(e,t){if(typeof e==`object`&&e){var n=vi.get(e);return n===void 0?(t={value:e,source:t,stack:be(t)},vi.set(e,t),t):n}return{value:e,source:t,stack:be(t)}}var bi=[],xi=0,Si=null,Ci=0,wi=[],Ti=0,Ei=null,Di=1,Oi=``;function ki(e,t){bi[xi++]=Ci,bi[xi++]=Si,Si=e,Ci=t}function Ai(e,t,n){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Ei=e;var r=Di;e=Oi;var i=32-Re(r)-1;r&=~(1<<i),n+=1;var a=32-Re(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Di=1<<32-Re(t)+i|n<<i|r,Oi=a+e}else Di=1<<a|n<<i|r,Oi=e}function ji(e){e.return!==null&&(ki(e,1),Ai(e,1,0))}function Mi(e){for(;e===Si;)Si=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null;for(;e===Ei;)Ei=wi[--Ti],wi[Ti]=null,Oi=wi[--Ti],wi[Ti]=null,Di=wi[--Ti],wi[Ti]=null}function Ni(e,t){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Di=t.id,Oi=t.overflow,Ei=e}var Pi=null,Fi=null,Ii=!1,Li=null,Ri=!1,zi=Error(i(519));function Bi(e){throw Ki(yi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),zi}function Vi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[st]=e,t[ct]=r,n){case`dialog`:jd(`cancel`,t),jd(`close`,t);break;case`iframe`:case`object`:case`embed`:jd(`load`,t);break;case`video`:case`audio`:for(n=0;n<Od.length;n++)jd(Od[n],t);break;case`source`:jd(`error`,t);break;case`img`:case`image`:case`link`:jd(`error`,t),jd(`load`,t);break;case`details`:jd(`toggle`,t);break;case`input`:jd(`invalid`,t),Vt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:jd(`invalid`,t);break;case`textarea`:jd(`invalid`,t),Gt(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||Wd(t.textContent,n)?(r.popover!=null&&(jd(`beforetoggle`,t),jd(`toggle`,t)),r.onScroll!=null&&jd(`scroll`,t),r.onScrollEnd!=null&&jd(`scrollend`,t),r.onClick!=null&&(t.onclick=en),t=!0):t=!1,t||Bi(e,!0)}function Hi(e){for(Pi=e.return;Pi;)switch(Pi.tag){case 5:case 31:case 13:Ri=!1;return;case 27:case 3:Ri=!0;return;default:Pi=Pi.return}}function Ui(e){if(e!==Pi)return!1;if(!Ii)return Hi(e),Ii=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||nf(e.type,e.memoizedProps)),n=!n),n&&Fi&&Bi(e),Hi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=Cf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=Cf(e)}else t===27?(t=Fi,df(e.type)?(e=Sf,Sf=null,Fi=e):Fi=t):Fi=Pi?xf(e.stateNode.nextSibling):null;return!0}function Wi(){Fi=Pi=null,Ii=!1}function Gi(){var e=Li;return e!==null&&(su===null?su=e:su.push.apply(su,e),Li=null),e}function Ki(e){Li===null?Li=[e]:Li.push(e)}var qi=ie(null),Ji=null,R=null;function Yi(e,t,n){ae(qi,t._currentValue),t._currentValue=n}function Xi(e){e._currentValue=qi.current,L(qi)}function Zi(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 Qi(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),Zi(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),Zi(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 $i(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;Cr(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=[dp]:e.push(dp))}a=a.return}e!==null&&Qi(t,e,n,r),t.flags|=262144}function ea(e){for(e=e.firstContext;e!==null;){if(!Cr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ta(e){Ji=e,R=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function na(e){return ra(Ji,e)}function z(e,t){return Ji===null&&ta(e),ra(e,t)}function ra(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},R===null){if(e===null)throw Error(i(308));R=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else R=R.next=t;return n}var ia=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()})}},aa=t.unstable_scheduleCallback,oa=t.unstable_NormalPriority,sa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ca(){return{controller:new ia,data:new Map,refCount:0}}function la(e){e.refCount--,e.refCount===0&&aa(oa,function(){e.controller.abort()})}var ua=null,da=0,fa=0,pa=null;function ma(e,t){if(ua===null){var n=ua=[];da=0,fa=Sd(),pa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return da++,t.then(ha,ha),t}function ha(){if(--da===0&&ua!==null){pa!==null&&(pa.status=`fulfilled`);var e=ua;ua=null,fa=0,pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ga(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 _a=F.S;F.S=function(e,t){uu=Ee(),typeof t==`object`&&t&&typeof t.then==`function`&&ma(e,t),_a!==null&&_a(e,t)};var va=ie(null);function ya(){var e=va.current;return e===null?Gl.pooledCache:e}function ba(e,t){t===null?ae(va,va.current):ae(va,t.pool)}function xa(){var e=ya();return e===null?null:{parent:sa._currentValue,pool:e}}var Sa=Error(i(460)),Ca=Error(i(474)),wa=Error(i(542)),Ta={then:function(){}};function Ea(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Da(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(en,en),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ja(e),e;default:if(typeof t.status==`string`)t.then(en,en);else{if(e=Gl,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,ja(e),e}throw ka=t,Sa}}function Oa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ka=e,Sa):e}}var ka=null;function Aa(){if(ka===null)throw Error(i(459));var e=ka;return ka=null,e}function ja(e){if(e===Sa||e===wa)throw Error(i(483))}var Ma=null,Na=0;function Pa(e){var t=Na;return Na+=1,Ma===null&&(Ma=[]),Da(Ma,e,t)}function Fa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ia(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 La(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=di(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=hi(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&&Oa(i)===t.type)?(t=a(t,n.props),Fa(t,n),t.return=e,t):(t=pi(n.type,n.key,n.props,null,e.mode,r),Fa(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=_i(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=mi(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=hi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=pi(t.type,t.key,t.props,null,e.mode,n),Fa(n,t),n.return=e,n;case v:return t=_i(t,e.mode,n),t.return=e,t;case O:return t=Oa(t),f(e,t,n)}if(P(t)||M(t))return t=mi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Pa(t),n);if(t.$$typeof===C)return f(e,z(e,t),n);Ia(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=Oa(n),p(e,t,n,r)}if(P(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Pa(n),r);if(n.$$typeof===C)return p(e,t,z(e,n),r);Ia(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=Oa(r),m(e,t,n,r,i)}if(P(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Pa(r),i);if(r.$$typeof===C)return m(e,t,n,z(t,r),i);Ia(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),Ii&&ki(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 Ii&&ki(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)}),Ii&&ki(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),Ii&&ki(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 Ii&&ki(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)}),Ii&&ki(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&&Oa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Fa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=mi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=pi(o.type,o.key,o.props,null,e.mode,c),Fa(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=_i(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Oa(o),b(e,r,o,c)}if(P(o))return h(e,r,o,c);if(M(o)){if(l=M(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,Pa(o),c);if(o.$$typeof===C)return b(e,r,z(e,o),c);Ia(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=hi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Na=0;var i=b(e,t,n,r);return Ma=null,i}catch(t){if(t===Sa||t===wa)throw t;var a=li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ra=La(!0),za=La(!1),Ba=!1;function Va(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ha(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 Ua(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Wl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=oi(e),ai(e,null,n),t}return ni(e,r,t,n),oi(e)}function Ga(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,et(e,n)}}function Ka(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 qa=!1;function Ja(){if(qa){var e=pa;if(e!==null)throw e}}function Ya(e,t,n,r){qa=!1;var i=e.updateQueue;Ba=!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?(ql&f)===f:(r&f)===f){f!==0&&f===fa&&(qa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Ba=!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),tu|=o,e.lanes=o,e.memoizedState=d}}function Xa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Za(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Xa(n[e],t)}var Qa=ie(null),$a=ie(0);function eo(e,t){e=$l,ae($a,e),ae(Qa,t),$l=e|t.baseLanes}function to(){ae($a,$l),ae(Qa,Qa.current)}function no(){$l=$a.current,L(Qa),L($a)}var ro=ie(null),io=null;function ao(e){var t=e.alternate;ae(uo,uo.current&1),ae(ro,e),io===null&&(t===null||Qa.current!==null||t.memoizedState!==null)&&(io=e)}function oo(e){ae(uo,uo.current),ae(ro,e),io===null&&(io=e)}function so(e){e.tag===22?(ae(uo,uo.current),ae(ro,e),io===null&&(io=e)):co(e)}function co(){ae(uo,uo.current),ae(ro,ro.current)}function lo(e){L(ro),io===e&&(io=null),L(uo)}var uo=ie(0);function fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||vf(n)||yf(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 po=0,mo=null,ho=null,go=null,_o=!1,vo=!1,yo=!1,bo=0,xo=0,So=null,Co=0;function wo(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Cr(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return po=a,mo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Us:Ws,yo=!1,a=n(r,i),yo=!1,vo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){F.H=Hs;var t=ho!==null&&ho.next!==null;if(po=0,go=ho=mo=null,_o=!1,xo=0,So=null,t)throw Error(i(300));e===null||sc||(e=e.dependencies,e!==null&&ea(e)&&(sc=!0))}function Oo(e,t,n,r){mo=e;var a=0;do{if(vo&&(So=null),xo=0,vo=!1,25<=a)throw Error(i(301));if(a+=1,go=ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=Gs,o=t(n,r)}while(vo);return o}function ko(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?Io(t):t,e=e.useState()[0],(ho===null?null:ho.memoizedState)!==e&&(mo.flags|=1024),t}function Ao(){var e=bo!==0;return bo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}po=0,go=ho=mo=null,vo=!1,xo=bo=0,So=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return go===null?mo.memoizedState=go=e:go=go.next=e,go}function Po(){if(ho===null){var e=mo.alternate;e=e===null?null:e.memoizedState}else e=ho.next;var t=go===null?mo.memoizedState:go.next;if(t!==null)go=t,ho=e;else{if(e===null)throw mo.alternate===null?Error(i(467)):Error(i(310));ho=e,e={memoizedState:ho.memoizedState,baseState:ho.baseState,baseQueue:ho.baseQueue,queue:ho.queue,next:null},go===null?mo.memoizedState=go=e:go=go.next=e}return go}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=xo;return xo+=1,So===null&&(So=[]),e=Da(So,e,t),t=mo,(go===null?t.memoizedState:go.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Us:Ws),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Io(e);if(e.$$typeof===C)return na(e)}throw Error(i(438,String(e)))}function Ro(e){var t=null,n=mo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=mo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Fo(),mo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){return Vo(Po(),ho,e)}function Vo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(po&f)===f:(ql&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===fa&&(d=!0);else if((po&p)===p){u=u.next,p===fa&&(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,mo.lanes|=p,tu|=p;f=u.action,yo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,mo.lanes|=f,tu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Cr(o,e.memoizedState)&&(sc=!0,d&&(n=pa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ho(e){var t=Po(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Cr(o,t.memoizedState)||(sc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Uo(e,t,n){var r=mo,a=Po(),o=Ii;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Cr((ho||a).memoizedState,n);if(s&&(a.memoizedState=n,sc=!0),a=a.queue,ms(Ko.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||go!==null&&go.memoizedState.tag&1){if(r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,a,n,t),null),Gl===null)throw Error(i(349));o||po&127||Wo(r,t,n)}return n}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=mo.updateQueue,t===null?(t=Fo(),mo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Cr(e,n)}catch{return!0}}function Jo(e){var t=ii(e,2);t!==null&&Tu(t,e,2)}function Yo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),yo){Le(!0);try{n()}finally{Le(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t}function Xo(e,t,n,r){return e.baseState=n,Vo(e,ho,typeof r==`function`?r:zo)}function Zo(e,t,n,r,a){if(zs(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)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),$o(e,t,s)}catch(n){ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),$o(e,t,a)}catch(n){ts(e,t,n)}}function $o(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){es(e,t,n)},function(n){return ts(e,t,n)}):es(e,t,n)}function es(e,t,n){t.status=`fulfilled`,t.value=n,ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qo(e,n)))}function ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ns(t),t=t.next;while(t!==r)}e.action=null}function ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rs(e,t){return t}function is(e,t){if(Ii){var n=Gl.formState;if(n!==null){a:{var r=mo;if(Ii){if(Fi){b:{for(var i=Fi,a=Ri;i.nodeType!==8;){if(!a){i=null;break b}if(i=xf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Fi=xf(i.nextSibling),r=i.data===`F!`;break a}}Bi(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:t},n.queue=r,n=Is.bind(null,mo,r),r.dispatch=n,r=Yo(!1),a=Rs.bind(null,mo,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zo.bind(null,mo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function as(e){return os(Po(),ho,e)}function os(e,t,n){if(t=Vo(e,t,rs)[0],e=Bo(zo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Io(t)}catch(e){throw e===Sa?wa:e}else r=t;t=Po();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(mo.flags|=2048,ls(9,{destroy:void 0},ss.bind(null,i,n),null)),[r,a,e]}function ss(e,t){e.action=t}function cs(e){var t=Po(),n=ho;if(n!==null)return os(t,n,e);Po(),t=t.memoizedState,n=Po();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ls(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=mo.updateQueue,t===null&&(t=Fo(),mo.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 us(){return Po().memoizedState}function ds(e,t,n,r){var i=No();mo.flags|=e,i.memoizedState=ls(1|t,{destroy:void 0},n,r===void 0?null:r)}function fs(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=i.memoizedState.inst;ho!==null&&r!==null&&To(r,ho.memoizedState.deps)?i.memoizedState=ls(t,a,n,r):(mo.flags|=e,i.memoizedState=ls(1|t,a,n,r))}function ps(e,t){ds(8390656,8,e,t)}function ms(e,t){fs(2048,8,e,t)}function hs(e){mo.flags|=4;var t=mo.updateQueue;if(t===null)t=Fo(),mo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function gs(e){var t=Po().memoizedState;return hs({ref:t,nextImpl:e}),function(){if(Wl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function _s(e,t){return fs(4,2,e,t)}function vs(e,t){return fs(4,4,e,t)}function ys(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 bs(e,t,n){n=n==null?null:n.concat([e]),fs(4,4,ys.bind(null,t,e),n)}function xs(){}function Ss(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),yo){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r}function ws(e,t,n){return n===void 0||po&1073741824&&!(ql&261930)?e.memoizedState=t:(e.memoizedState=n,e=wu(),mo.lanes|=e,tu|=e,n)}function Ts(e,t,n,r){return Cr(n,t)?n:Qa.current===null?!(po&42)||po&1073741824&&!(ql&261930)?(sc=!0,e.memoizedState=n):(e=wu(),mo.lanes|=e,tu|=e,t):(e=ws(e,n,r),Cr(e,t)||(sc=!0),e)}function Es(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};F.T=s,Rs(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ls(e,t,ga(c,r),Cu(e)):Ls(e,t,r,Cu(e))}catch(n){Ls(e,t,{then:function(){},status:`rejected`,reason:n},Cu())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function Ds(){}function Os(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ks(e).queue;Es(e,a,t,te,n===null?Ds:function(){return As(e),n(r)})}function ks(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function As(e){var t=ks(e);t.next===null&&(t=e.alternate.memoizedState),Ls(e,t.next.queue,{},Cu())}function js(){return na(dp)}function Ms(){return Po().memoizedState}function Ns(){return Po().memoizedState}function Ps(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Cu();e=Ua(n);var r=Wa(t,e,n);r!==null&&(Tu(r,t,n),Ga(r,t,n)),t={cache:ca()},e.payload=t;return}t=t.return}}function Fs(e,t,n){var r=Cu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zs(e)?Bs(t,n):(n=ri(e,t,n,r),n!==null&&(Tu(n,e,r),Vs(n,t,r)))}function Is(e,t,n){Ls(e,t,n,Cu())}function Ls(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(zs(e))Bs(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,Cr(s,o))return ni(e,t,i,0),Gl===null&&ti(),!1}catch{}if(n=ri(e,t,i,r),n!==null)return Tu(n,e,r),Vs(n,t,r),!0}return!1}function Rs(e,t,n,r){if(r={lane:2,revertLane:Sd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zs(e)){if(t)throw Error(i(479))}else t=ri(e,n,r,2),t!==null&&Tu(t,e,2)}function zs(e){var t=e.alternate;return e===mo||t!==null&&t===mo}function Bs(e,t){vo=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}var Hs={readContext:na,use:Lo,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useLayoutEffect:wo,useInsertionEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useSyncExternalStore:wo,useId:wo,useHostTransitionStatus:wo,useFormState:wo,useActionState:wo,useOptimistic:wo,useMemoCache:wo,useCacheRefresh:wo};Hs.useEffectEvent=wo;var Us={readContext:na,use:Lo,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:na,useEffect:ps,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ds(4194308,4,ys.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ds(4194308,4,e,t)},useInsertionEffect:function(e,t){ds(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(yo){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(yo){Le(!0);try{n(t)}finally{Le(!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=Fs.bind(null,mo,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Is.bind(null,mo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:xs,useDeferredValue:function(e,t){return ws(No(),e,t)},useTransition:function(){var e=Yo(!1);return e=Es.bind(null,mo,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=mo,a=No();if(Ii){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Gl===null)throw Error(i(349));ql&127||Wo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ps(Ko.bind(null,r,o,e),[e]),r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=Gl.identifierPrefix;if(Ii){var n=Oi,r=Di;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Co++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:js,useFormState:is,useActionState:is,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Rs.bind(null,mo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return No().memoizedState=Ps.bind(null,mo)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(Wl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ws={readContext:na,use:Lo,useCallback:Ss,useContext:na,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Bo,useRef:us,useState:function(){return Bo(zo)},useDebugValue:xs,useDeferredValue:function(e,t){return Ts(Po(),ho.memoizedState,e,t)},useTransition:function(){var e=Bo(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:as,useActionState:as,useOptimistic:function(e,t){return Xo(Po(),ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Ws.useEffectEvent=gs;var Gs={readContext:na,use:Lo,useCallback:Ss,useContext:na,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Ho,useRef:us,useState:function(){return Ho(zo)},useDebugValue:xs,useDeferredValue:function(e,t){var n=Po();return ho===null?ws(n,e,t):Ts(n,ho.memoizedState,e,t)},useTransition:function(){var e=Ho(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:cs,useActionState:cs,useOptimistic:function(e,t){var n=Po();return ho===null?(n.baseState=e,[e,n.queue.dispatch]):Xo(n,ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Gs.useEffectEvent=gs;function Ks(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Cu(),i=Ua(r);i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(Tu(t,e,r),Ga(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Cu(),i=Ua(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(Tu(t,e,r),Ga(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Cu(),r=Ua(n);r.tag=2,t!=null&&(r.callback=t),t=Wa(e,r,n),t!==null&&(Tu(t,e,n),Ga(t,e,n))}};function Js(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?!wr(n,r)||!wr(i,a):!0}function Ys(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&&qs.enqueueReplaceState(t,t.state,null)}function Xs(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=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Zs(e){Zr(e)}function Qs(e){console.error(e)}function $s(e){Zr(e)}function ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function tc(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 nc(e,t,n){return n=Ua(n),n.tag=3,n.payload={element:null},n.callback=function(){ec(e,t)},n}function rc(e){return e=Ua(e),e.tag=3,e}function ic(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(){tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){tc(t,n,r),typeof i!=`function`&&(pu===null?pu=new Set([this]):pu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ac(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&$i(t,n,a,!0),n=ro.current,n!==null){switch(n.tag){case 31:case 13:return io===null?Lu():n.alternate===null&&eu===0&&(eu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ta?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),nd(e,r,a)),!1;case 22:return n.flags|=65536,r===Ta?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)),nd(e,r,a)),!1}throw Error(i(435,n.tag))}return nd(e,r,a),Lu(),!1}if(Ii)return t=ro.current,t===null?(r!==zi&&(t=Error(i(423),{cause:r}),Ki(yi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=yi(r,n),a=nc(e.stateNode,r,a),Ka(e,a),eu!==4&&(eu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==zi&&(e=Error(i(422),{cause:r}),Ki(yi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=yi(o,n),ou===null?ou=[o]:ou.push(o),eu!==4&&(eu=2),t===null)return!0;r=yi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=nc(n.stateNode,r,e),Ka(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`&&(pu===null||!pu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=rc(a),ic(a,e,n,r),Ka(n,a),!1}n=n.return}while(n!==null);return!1}var oc=Error(i(461)),sc=!1;function cc(e,t,n,r){t.child=e===null?za(t,null,n,r):Ra(t,e.child,n,r)}function lc(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 ta(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!sc?(jo(e,t,i),Mc(e,t,i)):(Ii&&s&&ji(t),t.flags|=1,cc(e,t,r,i),t.child)}function uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ui(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,dc(e,t,a,r,i)):(e=pi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Nc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?wr:n,n(o,r)&&e.ref===t.ref)return Mc(e,t,i)}return t.flags|=1,e=di(a,r),e.ref=t.ref,e.return=t,t.child=e}function dc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(wr(a,r)&&e.ref===t.ref)if(sc=!1,t.pendingProps=r=a,Nc(e,i))e.flags&131072&&(sc=!0);else return t.lanes=e.lanes,Mc(e,t,i)}return vc(e,t,n,r,i)}function fc(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 mc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ba(t,a===null?null:a.cachePool),a===null?to():eo(t,a),so(t);else return r=t.lanes=536870912,mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ba(t,null),to(),co(t)):(ba(t,a.cachePool),eo(t,a),co(t),t.memoizedState=null);return cc(e,t,i,n),t.child}function pc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mc(e,t,n,r,i){var a=ya();return a=a===null?null:{parent:sa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ba(t,null),to(),so(t),e!==null&&$i(e,t,r,!0),t.childLanes=i,null}function hc(e,t){return t=Dc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gc(e,t,n){return Ra(t,e.child,null,n),e=hc(t,t.pendingProps),e.flags|=2,lo(t),t.memoizedState=null,e}function B(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ii){if(r.mode===`hidden`)return e=hc(t,r),t.lanes=536870912,pc(null,e);if(oo(t),(e=Fi)?(e=_f(e,Ri),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return hc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(oo(t),a)if(t.flags&256)t.flags&=-257,t=gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(sc||$i(e,t,n,!1),a=(n&e.childLanes)!==0,sc||a){if(r=Gl,r!==null&&(s=tt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ii(e,s),Tu(r,e,s),oc;Lu(),t=gc(e,t,n)}else e=o.treeContext,Fi=xf(s.nextSibling),Pi=t,Ii=!0,Li=null,Ri=!1,e!==null&&Ni(t,e),t=hc(t,r),t.flags|=4096;return t}return e=di(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function _c(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 vc(e,t,n,r,i){return ta(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!sc?(jo(e,t,i),Mc(e,t,i)):(Ii&&r&&ji(t),t.flags|=1,cc(e,t,n,i),t.child)}function yc(e,t,n,r,i,a){return ta(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!sc?(jo(e,t,a),Mc(e,t,a)):(Ii&&r&&ji(t),t.flags|=1,cc(e,t,n,a),t.child)}function bc(e,t,n,r,i){if(ta(t),t.stateNode===null){var a=si,o=n.contextType;typeof o==`object`&&o&&(a=na(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=qs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Va(t),o=n.contextType,a.context=typeof o==`object`&&o?na(o):si,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ks(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&&qs.enqueueReplaceState(a,a.state,null),Ya(t,r,a,i),Ja(),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=Xs(n,s);a.props=c;var l=a.context,u=n.contextType;o=si,typeof u==`object`&&u&&(o=na(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)&&Ys(t,a,r,o),Ba=!1;var f=t.memoizedState;a.state=f,Ya(t,r,a,i),Ja(),l=t.memoizedState,s||f!==l||Ba?(typeof d==`function`&&(Ks(t,n,d,r),l=t.memoizedState),(c=Ba||Js(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,Ha(e,t),o=t.memoizedProps,u=Xs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=si,typeof l==`object`&&l&&(c=na(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)&&Ys(t,a,r,c),Ba=!1,f=t.memoizedState,a.state=f,Ya(t,r,a,i),Ja();var p=t.memoizedState;o!==d||f!==p||Ba||e!==null&&e.dependencies!==null&&ea(e.dependencies)?(typeof s==`function`&&(Ks(t,n,s,r),p=t.memoizedState),(u=Ba||Js(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ea(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,_c(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=Ra(t,e.child,null,i),t.child=Ra(t,null,n,i)):cc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Mc(e,t,i),e}function xc(e,t,n,r){return Wi(),t.flags|=256,cc(e,t,n,r),t.child}var Sc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cc(e){return{baseLanes:e,cachePool:xa()}}function wc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=iu),e}function Tc(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:(uo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ii){if(a?ao(t):co(t),(e=Fi)?(e=_f(e,Ri),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw Bi(t);return yf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(co(t),a=t.mode,c=Dc({mode:`hidden`,children:c},a),r=mi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Cc(n),r.childLanes=wc(e,s,n),t.memoizedState=Sc,pc(null,r)):(ao(t),Ec(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ao(t),t.flags&=-257,t=Oc(e,t,n)):t.memoizedState===null?(co(t),c=r.fallback,a=t.mode,r=Dc({mode:`visible`,children:r.children},a),c=mi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ra(t,e.child,null,n),r=t.child,r.memoizedState=Cc(n),r.childLanes=wc(e,s,n),t.memoizedState=Sc,t=pc(null,r)):(co(t),t.child=e.child,t.flags|=128,t=null);else if(ao(t),yf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ki({value:r,source:null,stack:null}),t=Oc(e,t,n)}else if(sc||$i(e,t,n,!1),s=(n&e.childLanes)!==0,sc||s){if(s=Gl,s!==null&&(r=tt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ii(e,r),Tu(s,e,r),oc;vf(c)||Lu(),t=Oc(e,t,n)}else vf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Fi=xf(c.nextSibling),Pi=t,Ii=!0,Li=null,Ri=!1,e!==null&&Ni(t,e),t=Ec(t,r.children),t.flags|=4096);return t}return a?(co(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=di(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=mi(c,a,n,null),c.flags|=2):c=di(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,pc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Cc(n):(a=c.cachePool,a===null?a=xa():(l=sa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=wc(e,s,n),t.memoizedState=Sc,pc(e.child,r)):(ao(t),n=e.child,e=n.sibling,n=di(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 Ec(e,t){return t=Dc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Dc(e,t){return e=li(22,e,null,t),e.lanes=0,e}function Oc(e,t,n){return Ra(t,e.child,null,n),e=Ec(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function kc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Zi(e.return,t,n)}function Ac(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 jc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=uo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,ae(uo,o),cc(e,t,r,n),r=Ii?Ci:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&kc(e,n,t);else if(e.tag===19)kc(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&&fo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ac(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&&fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ac(t,!0,n,null,a,r);break;case`together`:Ac(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Mc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),tu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if($i(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=di(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=di(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Nc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ea(e))):!0}function Pc(e,t,n){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),Yi(t,sa,e.memoizedState.cache),Wi();break;case 27:case 5:fe(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:Yi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ao(t),e=Mc(e,t,n),e===null?null:e.sibling):Tc(e,t,n):(ao(t),t.flags|=128,null);ao(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=($i(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return jc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ae(uo,uo.current),r)break;return null;case 22:return t.lanes=0,fc(e,t,n,t.pendingProps);case 24:Yi(t,sa,e.memoizedState.cache)}return Mc(e,t,n)}function Fc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)sc=!0;else{if(!Nc(e,n)&&!(t.flags&128))return sc=!1,Pc(e,t,n);sc=!!(e.flags&131072)}else sc=!1,Ii&&t.flags&1048576&&Ai(t,Ci,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Oa(t.elementType),t.type=e,typeof e==`function`)ui(e)?(r=Xs(e,r),t.tag=1,t=bc(null,t,e,r,n)):(t.tag=0,t=vc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=lc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=uc(null,t,e,r,n);break a}}throw t=ee(e)||e,Error(i(306,t,``))}}return t;case 0:return vc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Xs(r,t.pendingProps),bc(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,Ha(e,t),Ya(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Yi(t,sa,r),r!==o.cache&&Qi(t,[sa],n,!0),Ja(),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=xc(e,t,r,n);break a}else if(r!==a){a=yi(Error(i(424)),t),Ki(a),t=xc(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(Fi=xf(e.firstChild),Pi=t,Ii=!0,Li=null,Ri=!0,n=za(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Wi(),r===a){t=Mc(e,t,n);break a}cc(e,t,r,n)}t=t.child}return t;case 26:return _c(e,t),e===null?(n=Hf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ii||(n=t.type,e=t.pendingProps,r=$d(ce.current).createElement(n),r[st]=t,r[ct]=e,qd(r,n,e),bt(r),t.stateNode=r):t.memoizedState=Hf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fe(t),e===null&&Ii&&(r=t.stateNode=Tf(t.type,t.pendingProps,ce.current),Pi=t,Ri=!0,a=Fi,df(t.type)?(Sf=a,Fi=xf(r.firstChild)):Fi=a),cc(e,t,t.pendingProps.children,n),_c(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ii&&((a=r=Fi)&&(r=hf(r,t.type,t.pendingProps,Ri),r===null?a=!1:(t.stateNode=r,Pi=t,Fi=xf(r.firstChild),Ri=!1,a=!0)),a||Bi(t)),fe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,nf(a,o)?r=null:s!==null&&nf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),dp._currentValue=a),_c(e,t),cc(e,t,r,n),t.child;case 6:return e===null&&Ii&&((e=n=Fi)&&(n=gf(n,t.pendingProps,Ri),n===null?e=!1:(t.stateNode=n,Pi=t,Fi=null,e=!0)),e||Bi(t)),null;case 13:return Tc(e,t,n);case 4:return ue(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ra(t,null,r,n):cc(e,t,r,n),t.child;case 11:return lc(e,t,t.type,t.pendingProps,n);case 7:return cc(e,t,t.pendingProps,n),t.child;case 8:return cc(e,t,t.pendingProps.children,n),t.child;case 12:return cc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Yi(t,t.type,r.value),cc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ta(t),a=na(a),r=r(a),t.flags|=1,cc(e,t,r,n),t.child;case 14:return uc(e,t,t.type,t.pendingProps,n);case 15:return dc(e,t,t.type,t.pendingProps,n);case 19:return jc(e,t,n);case 31:return B(e,t,n);case 22:return fc(e,t,n,t.pendingProps);case 24:return ta(t),r=na(sa),e===null?(a=ya(),a===null&&(a=Gl,o=ca(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Va(t),Yi(t,sa,a)):((e.lanes&n)!==0&&(Ha(e,t),Ya(t,null,null,n),Ja()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Yi(t,sa,r),r!==a.cache&&Qi(t,[sa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Yi(t,sa,r))),cc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ic(e){e.flags|=4}function Lc(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(Pu())e.flags|=8192;else throw ka=Ta,Ca}else e.flags&=-16777217}function Rc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!rp(t))if(Pu())e.flags|=8192;else throw ka=Ta,Ca}function zc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ye(),e.lanes|=t,au|=t)}function Bc(e,t){if(!Ii)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 Vc(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 Hc(e,t,n){var r=t.pendingProps;switch(Mi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vc(t),null;case 1:return Vc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Xi(sa),de(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ui(t)?Ic(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gi())),Vc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Ic(t),o===null?(Vc(t),Lc(t,a,null,r,n)):(Vc(t),Rc(t,o))):o?o===e.memoizedState?(Vc(t),t.flags&=-16777217):(Ic(t),Vc(t),Rc(t,o)):(e=e.memoizedProps,e!==r&&Ic(t),Vc(t),Lc(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&&Ic(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Vc(t),null}e=oe.current,Ui(t)?Vi(t,e):(e=Tf(a,r,n),t.stateNode=e,Ic(t))}return Vc(t),null;case 5:if(pe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ic(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Vc(t),null}if(o=oe.current,Ui(t))Vi(t,o);else{var s=$d(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[st]=t,o[ct]=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(qd(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&&Ic(t)}}return Vc(t),Lc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ic(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ce.current,Ui(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Pi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[st]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Wd(e.nodeValue,n)),e||Bi(t,!0)}else e=$d(e).createTextNode(r),e[st]=t,t.stateNode=e}return Vc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ui(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[st]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Vc(t),e=!1}else n=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(lo(t),t):(lo(t),null);if(t.flags&128)throw Error(i(558))}return Vc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ui(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[st]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Vc(t),a=!1}else a=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(lo(t),t):(lo(t),null)}return lo(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),zc(t,t.updateQueue),Vc(t),null);case 4:return de(),e===null&&Pd(t.stateNode.containerInfo),Vc(t),null;case 10:return Xi(t.type),Vc(t),null;case 19:if(L(uo),r=t.memoizedState,r===null)return Vc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Bc(r,!1);else{if(eu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=fo(e),o!==null){for(t.flags|=128,Bc(r,!1),e=o.updateQueue,t.updateQueue=e,zc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fi(n,e),n=n.sibling;return ae(uo,uo.current&1|2),Ii&&ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ee()>du&&(t.flags|=128,a=!0,Bc(r,!1),t.lanes=4194304)}else{if(!a)if(e=fo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,zc(t,e),Bc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ii)return Vc(t),null}else 2*Ee()-r.renderingStartTime>du&&n!==536870912&&(t.flags|=128,a=!0,Bc(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?(Vc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ee(),e.sibling=null,n=uo.current,ae(uo,a?n&1|2:n&1),Ii&&ki(t,r.treeForkCount),e);case 22:case 23:return lo(t),no(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Vc(t),t.subtreeFlags&6&&(t.flags|=8192)):Vc(t),n=t.updateQueue,n!==null&&zc(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&&L(va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Xi(sa),Vc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Uc(e,t){switch(Mi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xi(sa),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(lo(t),t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(lo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(uo),null;case 4:return de(),null;case 10:return Xi(t.type),null;case 22:case 23:return lo(t),no(),e!==null&&L(va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xi(sa),null;case 25:return null;default:return null}}function Wc(e,t){switch(Mi(t),t.tag){case 3:Xi(sa),de();break;case 26:case 27:case 5:pe(t);break;case 4:de();break;case 31:t.memoizedState!==null&&lo(t);break;case 13:lo(t);break;case 19:L(uo);break;case 10:Xi(t.type);break;case 22:case 23:lo(t),no(),e!==null&&L(va);break;case 24:Xi(sa)}}function Gc(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){td(t,t.return,e)}}function Kc(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){td(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){td(t,t.return,e)}}function qc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Za(t,n)}catch(t){td(e,e.return,t)}}}function Jc(e,t,n){n.props=Xs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){td(e,t,n)}}function Yc(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){td(e,t,n)}}function Xc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){td(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){td(e,t,n)}else n.current=null}function Zc(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){td(e,e.return,t)}}function Qc(e,t,n){try{var r=e.stateNode;Jd(r,e.type,n,t),r[ct]=t}catch(t){td(e,e.return,t)}}function $c(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&df(e.type)||e.tag===4}function el(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||$c(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&&df(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 tl(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=en));else if(r!==4&&(r===27&&df(e.type)&&(n=e.stateNode,t=null),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,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&&df(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);qd(t,r,n),t[st]=e,t[ct]=n}catch(t){td(e,e.return,t)}}var il=!1,al=!1,ol=!1,sl=typeof WeakSet==`function`?WeakSet:Set,cl=null;function ll(e,t){if(e=e.containerInfo,Zd=bp,e=Or(e),kr(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(Qd={focusedElem:e,selectionRange:n},bp=!1,cl=t;cl!==null;)if(t=cl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,cl=e;else for(;cl!==null;){switch(t=cl,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=Xs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){td(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)mf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:mf(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,cl=e;break}cl=t.return}}function ul(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Tl(e,n),r&4&&Gc(5,n);break;case 1:if(Tl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){td(n,n.return,e)}else{var i=Xs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){td(n,n.return,e)}}r&64&&qc(n),r&512&&Yc(n,n.return);break;case 3:if(Tl(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{Za(e,t)}catch(e){td(n,n.return,e)}}break;case 27:t===null&&r&4&&rl(n);case 26:case 5:Tl(e,n),t===null&&r&4&&Zc(n),r&512&&Yc(n,n.return);break;case 12:Tl(e,n);break;case 31:Tl(e,n),r&4&&gl(e,n);break;case 13:Tl(e,n),r&4&&_l(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=ad.bind(null,n),bf(e,n))));break;case 22:if(r=n.memoizedState!==null||il,!r){t=t!==null&&t.memoizedState!==null||al,i=il;var a=al;il=r,(al=t)&&!a?Dl(e,n,(n.subtreeFlags&8772)!=0):Tl(e,n),il=i,al=a}break;case 30:break;default:Tl(e,n)}}function dl(e){var t=e.alternate;t!==null&&(e.alternate=null,dl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ht(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 fl=null,pl=!1;function ml(e,t,n){for(n=n.child;n!==null;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(Ie&&typeof Ie.onCommitFiberUnmount==`function`)try{Ie.onCommitFiberUnmount(Fe,n)}catch{}switch(n.tag){case 26:al||Xc(n,t),ml(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:al||Xc(n,t);var r=fl,i=pl;df(n.type)&&(fl=n.stateNode,pl=!1),ml(e,t,n),Ef(n.stateNode),fl=r,pl=i;break;case 5:al||Xc(n,t);case 6:if(r=fl,i=pl,fl=null,ml(e,t,n),fl=r,pl=i,fl!==null)if(pl)try{(fl.nodeType===9?fl.body:fl.nodeName===`HTML`?fl.ownerDocument.body:fl).removeChild(n.stateNode)}catch(e){td(n,t,e)}else try{fl.removeChild(n.stateNode)}catch(e){td(n,t,e)}break;case 18:fl!==null&&(pl?(e=fl,ff(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Kp(e)):ff(fl,n.stateNode));break;case 4:r=fl,i=pl,fl=n.stateNode.containerInfo,pl=!0,ml(e,t,n),fl=r,pl=i;break;case 0:case 11:case 14:case 15:Kc(2,n,t),al||Kc(4,n,t),ml(e,t,n);break;case 1:al||(Xc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Jc(n,t,r)),ml(e,t,n);break;case 21:ml(e,t,n);break;case 22:al=(r=al)||n.memoizedState!==null,ml(e,t,n),al=r;break;default:ml(e,t,n)}}function gl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kp(e)}catch(e){td(t,t.return,e)}}}function _l(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kp(e)}catch(e){td(t,t.return,e)}}function vl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new sl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new sl),t;default:throw Error(i(435,e.tag))}}function yl(e,t){var n=vl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=od.bind(null,e,t);t.then(r,r)}})}function bl(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(df(c.type)){fl=c.stateNode,pl=!1;break a}break;case 5:fl=c.stateNode,pl=!1;break a;case 3:case 4:fl=c.stateNode.containerInfo,pl=!0;break a}c=c.return}if(fl===null)throw Error(i(160));hl(o,s,a),fl=null,pl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Sl(t,e),t=t.sibling}var xl=null;function Sl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:bl(t,e),Cl(e),r&4&&(Kc(3,e,e.return),Gc(3,e),Kc(5,e,e.return));break;case 1:bl(t,e),Cl(e),r&512&&(al||n===null||Xc(n,n.return)),r&64&&il&&(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=xl;if(bl(t,e),Cl(e),r&512&&(al||n===null||Xc(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[mt]||o[st]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),qd(o,r,n),o[st]=e,bt(o),r=o;break a;case`link`:var s=ep(`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),qd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=ep(`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),qd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[st]=e,bt(o),r=o}e.stateNode=r}else tp(a,e.type,e.stateNode);else e.stateNode=Yf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?tp(a,e.type,e.stateNode):Yf(a,r,e.memoizedProps))}break;case 27:bl(t,e),Cl(e),r&512&&(al||n===null||Xc(n,n.return)),n!==null&&r&4&&Qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(bl(t,e),Cl(e),r&512&&(al||n===null||Xc(n,n.return)),e.flags&32){a=e.stateNode;try{Kt(a,``)}catch(t){td(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Qc(e,a,n===null?a:n.memoizedProps)),r&1024&&(ol=!0);break;case 6:if(bl(t,e),Cl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){td(e,e.return,t)}}break;case 3:if($f=null,a=xl,xl=kf(t.containerInfo),bl(t,e),xl=a,Cl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Kp(t.containerInfo)}catch(t){td(e,e.return,t)}ol&&(ol=!1,wl(e));break;case 4:r=xl,xl=kf(e.stateNode.containerInfo),bl(t,e),Cl(e),xl=r;break;case 12:bl(t,e),Cl(e);break;case 31:bl(t,e),Cl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 13:bl(t,e),Cl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(lu=Ee()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=il,d=al;if(il=u||a,al=d||l,bl(t,e),al=d,il=u,Cl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||il||al||El(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){td(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){td(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?pf(m,!0):pf(l.stateNode,!1)}catch(e){td(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,yl(e,n))));break;case 19:bl(t,e),Cl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 30:break;case 21:break;default:bl(t,e),Cl(e)}}function Cl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if($c(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;nl(e,el(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Kt(o,``),n.flags&=-33),nl(e,el(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;tl(e,el(e),s);break;default:throw Error(i(161))}}catch(t){td(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;wl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Tl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ul(e,t.alternate,t),t=t.sibling}function El(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Kc(4,t,t.return),El(t);break;case 1:Xc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Jc(t,t.return,n),El(t);break;case 27:Ef(t.stateNode);case 26:case 5:Xc(t,t.return),El(t);break;case 22:t.memoizedState===null&&El(t);break;case 30:El(t);break;default:El(t)}e=e.sibling}}function Dl(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:Dl(i,a,n),Gc(4,a);break;case 1:if(Dl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){td(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++)Xa(c[i],s)}catch(e){td(r,r.return,e)}}n&&o&64&&qc(a),Yc(a,a.return);break;case 27:rl(a);case 26:case 5:Dl(i,a,n),n&&r===null&&o&4&&Zc(a),Yc(a,a.return);break;case 12:Dl(i,a,n);break;case 31:Dl(i,a,n),n&&o&4&&gl(i,a);break;case 13:Dl(i,a,n),n&&o&4&&_l(i,a);break;case 22:a.memoizedState===null&&Dl(i,a,n),Yc(a,a.return);break;case 30:break;default:Dl(i,a,n)}t=t.sibling}}function Ol(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&&la(n))}function kl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e))}function Al(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)jl(e,t,n,r),t=t.sibling}function jl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Al(e,t,n,r),i&2048&&Gc(9,t);break;case 1:Al(e,t,n,r);break;case 3:Al(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&&la(e)));break;case 12:if(i&2048){Al(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){td(t,t.return,e)}}else Al(e,t,n,r);break;case 31:Al(e,t,n,r);break;case 13:Al(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Al(e,t,n,r):(a._visibility|=2,Ml(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Al(e,t,n,r):Nl(e,t),i&2048&&Ol(o,t);break;case 24:Al(e,t,n,r),i&2048&&kl(t.alternate,t);break;default:Al(e,t,n,r)}}function Ml(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:Ml(a,o,s,c,i),Gc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ml(a,o,s,c,i)):u._visibility&2?Ml(a,o,s,c,i):Nl(a,o),i&&l&2048&&Ol(o.alternate,o);break;case 24:Ml(a,o,s,c,i),i&&l&2048&&kl(o.alternate,o);break;default:Ml(a,o,s,c,i)}t=t.sibling}}function Nl(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:Nl(n,r),i&2048&&Ol(r.alternate,r);break;case 24:Nl(n,r),i&2048&&kl(r.alternate,r);break;default:Nl(n,r)}t=t.sibling}}var Pl=8192;function Fl(e,t,n){if(e.subtreeFlags&Pl)for(e=e.child;e!==null;)Il(e,t,n),e=e.sibling}function Il(e,t,n){switch(e.tag){case 26:Fl(e,t,n),e.flags&Pl&&e.memoizedState!==null&&ip(n,xl,e.memoizedState,e.memoizedProps);break;case 5:Fl(e,t,n);break;case 3:case 4:var r=xl;xl=kf(e.stateNode.containerInfo),Fl(e,t,n),xl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Pl,Pl=16777216,Fl(e,t,n),Pl=r):Fl(e,t,n));break;default:Fl(e,t,n)}}function Ll(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 Rl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cl=r,Vl(r,e)}Ll(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zl(e),e=e.sibling}function zl(e){switch(e.tag){case 0:case 11:case 15:Rl(e),e.flags&2048&&Kc(9,e,e.return);break;case 3:Rl(e);break;case 12:Rl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bl(e)):Rl(e);break;default:Rl(e)}}function Bl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cl=r,Vl(r,e)}Ll(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Kc(8,t,t.return),Bl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Bl(t));break;default:Bl(t)}e=e.sibling}}function Vl(e,t){for(;cl!==null;){var n=cl;switch(n.tag){case 0:case 11:case 15:Kc(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:la(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,cl=r;else a:for(n=e;cl!==null;){r=cl;var i=r.sibling,a=r.return;if(dl(r),r===n){cl=null;break a}if(i!==null){i.return=a,cl=i;break a}cl=a}}}var Hl={getCacheForType:function(e){var t=na(sa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return na(sa).controller.signal}},Ul=typeof WeakMap==`function`?WeakMap:Map,Wl=0,Gl=null,Kl=null,ql=0,Jl=0,Yl=null,Xl=!1,Zl=!1,Ql=!1,$l=0,eu=0,tu=0,nu=0,ru=0,iu=0,au=0,ou=null,su=null,cu=!1,lu=0,uu=0,du=1/0,fu=null,pu=null,mu=0,hu=null,gu=null,_u=0,vu=0,yu=null,bu=null,xu=0,Su=null;function Cu(){return Wl&2&&ql!==0?ql&-ql:F.T===null?it():Sd()}function wu(){if(iu===0)if(!(ql&536870912)||Ii){var e=Ue;Ue<<=1,!(Ue&3932160)&&(Ue=262144),iu=e}else iu=536870912;return e=ro.current,e!==null&&(e.flags|=32),iu}function Tu(e,t,n){(e===Gl&&(Jl===2||Jl===9)||e.cancelPendingCommit!==null)&&(Mu(e,0),ku(e,ql,iu,!1)),Ze(e,n),(!(Wl&2)||e!==Gl)&&(e===Gl&&(!(Wl&2)&&(nu|=n),eu===4&&ku(e,ql,iu,!1)),md(e))}function Eu(e,t,n){if(Wl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||qe(e,t),a=r?Bu(e,t):Ru(e,t,!0),o=r;do{if(a===0){Zl&&!r&&ku(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Ou(n)){a=Ru(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=ou;var l=c.current.memoizedState.isDehydrated;if(l&&(Mu(c,s).flags|=256),s=Ru(c,s,!1),s!==2){if(Ql&&!l){c.errorRecoveryDisabledLanes|=o,nu|=o,a=4;break a}o=su,su=a,o!==null&&(su===null?su=o:su.push.apply(su,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Mu(e,0),ku(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:ku(r,t,iu,!Xl);break a;case 2:su=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=lu+300-Ee(),10<a)){if(ku(r,t,iu,!Xl),Ke(r,0,!0)!==0)break a;_u=t,r.timeoutHandle=of(Du.bind(null,r,n,su,fu,cu,t,iu,nu,au,Xl,o,`Throttled`,-0,0),a);break a}Du(r,n,su,fu,cu,t,iu,nu,au,Xl,o,null,-0,0)}}break}while(1);md(e)}function Du(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:en},Il(t,a,d);var m=(a&62914560)===a?lu-Ee():(a&4194048)===a?uu-Ee():0;if(m=op(d,m),m!==null){_u=a,e.cancelPendingCommit=m(qu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),ku(e,a,o,!l);return}}qu(e,t,a,n,r,i,o,s,c)}function Ou(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(!Cr(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 ku(e,t,n,r){t&=~ru,t&=~nu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Re(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&$e(e,n,t)}function Au(){return Wl&6?!0:(hd(0,!1),!1)}function ju(){if(Kl!==null){if(Jl===0)var e=Kl.return;else e=Kl,R=Ji=null,Mo(e),Ma=null,Na=0,e=Kl;for(;e!==null;)Wc(e.alternate,e),e=e.return;Kl=null}}function Mu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,sf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),_u=0,ju(),Gl=e,Kl=n=di(e.current,null),ql=t,Jl=0,Yl=null,Xl=!1,Zl=qe(e,t),Ql=!1,au=iu=ru=nu=tu=eu=0,su=ou=null,cu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Re(r),a=1<<i;t|=e[i],r&=~a}return $l=t,ti(),n}function Nu(e,t){mo=null,F.H=Hs,t===Sa||t===wa?(t=Aa(),Jl=3):t===Ca?(t=Aa(),Jl=4):Jl=t===oc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Yl=t,Kl===null&&(eu=1,ec(e,yi(t,e.current)))}function Pu(){var e=ro.current;return e===null?!0:(ql&4194048)===ql?io===null:(ql&62914560)===ql||ql&536870912?e===io:!1}function Fu(){var e=F.H;return F.H=Hs,e===null?Hs:e}function Iu(){var e=F.A;return F.A=Hl,e}function Lu(){eu=4,Xl||(ql&4194048)!==ql&&ro.current!==null||(Zl=!0),!(tu&134217727)&&!(nu&134217727)||Gl===null||ku(Gl,ql,iu,!1)}function Ru(e,t,n){var r=Wl;Wl|=2;var i=Fu(),a=Iu();(Gl!==e||ql!==t)&&(fu=null,Mu(e,t)),t=!1;var o=eu;a:do try{if(Jl!==0&&Kl!==null){var s=Kl,c=Yl;switch(Jl){case 8:ju(),o=6;break a;case 3:case 2:case 9:case 6:ro.current===null&&(t=!0);var l=Jl;if(Jl=0,Yl=null,Wu(e,s,c,l),n&&Zl){o=0;break a}break;default:l=Jl,Jl=0,Yl=null,Wu(e,s,c,l)}}zu(),o=eu;break}catch(t){Nu(e,t)}while(1);return t&&e.shellSuspendCounter++,R=Ji=null,Wl=r,F.H=i,F.A=a,Kl===null&&(Gl=null,ql=0,ti()),o}function zu(){for(;Kl!==null;)Hu(Kl)}function Bu(e,t){var n=Wl;Wl|=2;var r=Fu(),a=Iu();Gl!==e||ql!==t?(fu=null,du=Ee()+500,Mu(e,t)):Zl=qe(e,t);a:do try{if(Jl!==0&&Kl!==null){t=Kl;var o=Yl;b:switch(Jl){case 1:Jl=0,Yl=null,Wu(e,t,o,1);break;case 2:case 9:if(Ea(o)){Jl=0,Yl=null,Uu(t);break}t=function(){Jl!==2&&Jl!==9||Gl!==e||(Jl=7),md(e)},o.then(t,t);break a;case 3:Jl=7;break a;case 4:Jl=5;break a;case 7:Ea(o)?(Jl=0,Yl=null,Uu(t)):(Jl=0,Yl=null,Wu(e,t,o,7));break;case 5:var s=null;switch(Kl.tag){case 26:s=Kl.memoizedState;case 5:case 27:var c=Kl;if(s?rp(s):c.stateNode.complete){Jl=0,Yl=null;var l=c.sibling;if(l!==null)Kl=l;else{var u=c.return;u===null?Kl=null:(Kl=u,Gu(u))}break b}}Jl=0,Yl=null,Wu(e,t,o,5);break;case 6:Jl=0,Yl=null,Wu(e,t,o,6);break;case 8:ju(),eu=6;break a;default:throw Error(i(462))}}Vu();break}catch(t){Nu(e,t)}while(1);return R=Ji=null,F.H=r,F.A=a,Wl=n,Kl===null?(Gl=null,ql=0,ti(),eu):0}function Vu(){for(;Kl!==null&&!we();)Hu(Kl)}function Hu(e){var t=Fc(e.alternate,e,$l);e.memoizedProps=e.pendingProps,t===null?Gu(e):Kl=t}function Uu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=yc(n,t,t.pendingProps,t.type,void 0,ql);break;case 11:t=yc(n,t,t.pendingProps,t.type.render,t.ref,ql);break;case 5:Mo(t);default:Wc(n,t),t=Kl=fi(t,$l),t=Fc(n,t,$l)}e.memoizedProps=e.pendingProps,t===null?Gu(e):Kl=t}function Wu(e,t,n,r){R=Ji=null,Mo(t),Ma=null,Na=0;var i=t.return;try{if(ac(e,i,t,n,ql)){eu=1,ec(e,yi(n,e.current)),Kl=null;return}}catch(t){if(i!==null)throw Kl=i,t;eu=1,ec(e,yi(n,e.current)),Kl=null;return}t.flags&32768?(Ii||r===1?e=!0:Zl||ql&536870912?e=!1:(Xl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ro.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ku(t,e)):Gu(t)}function Gu(e){var t=e;do{if(t.flags&32768){Ku(t,Xl);return}e=t.return;var n=Hc(t.alternate,t,$l);if(n!==null){Kl=n;return}if(t=t.sibling,t!==null){Kl=t;return}Kl=t=e}while(t!==null);eu===0&&(eu=5)}function Ku(e,t){do{var n=Uc(e.alternate,e);if(n!==null){n.flags&=32767,Kl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Kl=e;return}Kl=e=n}while(e!==null);eu=6,Kl=null}function qu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Qu();while(mu!==0);if(Wl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ei,Qe(e,n,o,s,c,l),e===Gl&&(Kl=Gl=null,ql=0),gu=t,hu=e,_u=n,vu=o,yu=a,bu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,sd(Ae,function(){return $u(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=F.T,F.T=null,a=I.p,I.p=2,s=Wl,Wl|=4;try{ll(e,t,n)}finally{Wl=s,I.p=a,F.T=r}}mu=1,Ju(),Yu(),Xu()}}function Ju(){if(mu===1){mu=0;var e=hu,t=gu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Wl;Wl|=4;try{Sl(t,e);var a=Qd,o=Or(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Dr(s.ownerDocument.documentElement,s)){if(c!==null&&kr(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 _=Er(s,h),v=Er(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}}bp=!!Zd,Qd=Zd=null}finally{Wl=i,I.p=r,F.T=n}}e.current=t,mu=2}}function Yu(){if(mu===2){mu=0;var e=hu,t=gu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Wl;Wl|=4;try{ul(e,t.alternate,t)}finally{Wl=i,I.p=r,F.T=n}}mu=3}}function Xu(){if(mu===4||mu===3){mu=0,Te();var e=hu,t=gu,n=_u,r=bu;t.subtreeFlags&10256||t.flags&10256?mu=5:(mu=0,gu=hu=null,Zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(pu=null),rt(n),t=t.stateNode,Ie&&typeof Ie.onCommitFiberRoot==`function`)try{Ie.onCommitFiberRoot(Fe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=F.T,i=I.p,I.p=2,F.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{F.T=t,I.p=i}}_u&3&&Qu(),md(e),i=e.pendingLanes,n&261930&&i&42?e===Su?xu++:(xu=0,Su=e):xu=0,hd(0,!1)}}function Zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,la(t)))}function Qu(){return Ju(),Yu(),Xu(),$u()}function $u(){if(mu!==5)return!1;var e=hu,t=vu;vu=0;var n=rt(_u),r=F.T,a=I.p;try{I.p=32>n?32:n,F.T=null,n=yu,yu=null;var o=hu,s=_u;if(mu=0,gu=hu=null,_u=0,Wl&6)throw Error(i(331));var c=Wl;if(Wl|=4,zl(o.current),jl(o,o.current,s,n),Wl=c,hd(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot==`function`)try{Ie.onPostCommitFiberRoot(Fe,o)}catch{}return!0}finally{I.p=a,F.T=r,Zu(e,t)}}function ed(e,t,n){t=yi(n,t),t=nc(e.stateNode,t,2),e=Wa(e,t,2),e!==null&&(Ze(e,2),md(e))}function td(e,t,n){if(e.tag===3)ed(e,e,n);else for(;t!==null;){if(t.tag===3){ed(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(pu===null||!pu.has(r))){e=yi(n,e),n=rc(2),r=Wa(t,n,2),r!==null&&(ic(n,r,t,e),Ze(r,2),md(r));break}}t=t.return}}function nd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ul;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=rd.bind(null,e,t,n),t.then(e,e))}function rd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Gl===e&&(ql&n)===n&&(eu===4||eu===3&&(ql&62914560)===ql&&300>Ee()-lu?!(Wl&2)&&Mu(e,0):ru|=n,au===ql&&(au=0)),md(e)}function id(e,t){t===0&&(t=Ye()),e=ii(e,t),e!==null&&(Ze(e,t),md(e))}function ad(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),id(e,n)}function od(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),id(e,n)}function sd(e,t){return Se(e,t)}var cd=null,ld=null,ud=!1,dd=!1,fd=!1,pd=0;function md(e){e!==ld&&e.next===null&&(ld===null?cd=ld=e:ld=ld.next=e),dd=!0,ud||(ud=!0,xd())}function hd(e,t){if(!fd&&dd){fd=!0;do for(var n=!1,r=cd;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-Re(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,bd(r,a))}else a=ql,a=Ke(r,r===Gl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||qe(r,a)||(n=!0,bd(r,a));r=r.next}while(n);fd=!1}}function gd(){_d()}function _d(){dd=ud=!1;var e=0;pd!==0&&af()&&(e=pd);for(var t=Ee(),n=null,r=cd;r!==null;){var i=r.next,a=vd(r,t);a===0?(r.next=null,n===null?cd=i:n.next=i,i===null&&(ld=n)):(n=r,(e!==0||a&3)&&(dd=!0)),r=i}mu!==0&&mu!==5||hd(e,!1),pd!==0&&(pd=0)}function vd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Re(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Je(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Gl,n=ql,n=Ke(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Jl===2||Jl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ce(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||qe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ce(r),rt(n)){case 2:case 8:n=ke;break;case 32:n=Ae;break;case 268435456:n=Me;break;default:n=Ae}return r=yd.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 yd(e,t){if(mu!==0&&mu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Qu()&&e.callbackNode!==n)return null;var r=ql;return r=Ke(e,e===Gl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Eu(e,r,t),vd(e,Ee()),e.callbackNode!=null&&e.callbackNode===n?yd.bind(null,e):null)}function bd(e,t){if(Qu())return null;Eu(e,t,!0)}function xd(){lf(function(){Wl&6?Se(Oe,gd):_d()})}function Sd(){if(pd===0){var e=fa;e===0&&(e=He,He<<=1,!(He&261888)&&(He=256)),pd=e}return pd}function Cd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:$t(``+e)}function wd(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 Td(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Cd((i[ct]||null).action),o=r.submitter;o&&(t=(t=o[ct]||null)?Cd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Sn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(pd!==0){var e=o?wd(i,o):new FormData(i);Os(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?wd(i,o):new FormData(i),Os(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Ed=0;Ed<Yr.length;Ed++){var Dd=Yr[Ed];Xr(Dd.toLowerCase(),`on`+(Dd[0].toUpperCase()+Dd.slice(1)))}Xr(Vr,`onAnimationEnd`),Xr(Hr,`onAnimationIteration`),Xr(Ur,`onAnimationStart`),Xr(`dblclick`,`onDoubleClick`),Xr(`focusin`,`onFocus`),Xr(`focusout`,`onBlur`),Xr(Wr,`onTransitionRun`),Xr(Gr,`onTransitionStart`),Xr(Kr,`onTransitionCancel`),Xr(qr,`onTransitionEnd`),wt(`onMouseEnter`,[`mouseout`,`mouseover`]),wt(`onMouseLeave`,[`mouseout`,`mouseover`]),wt(`onPointerEnter`,[`pointerout`,`pointerover`]),wt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ct(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ct(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ct(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ct(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Od=`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(` `),kd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Od));function Ad(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){Zr(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){Zr(e)}i.currentTarget=null,a=c}}}}function jd(e,t){var n=t[ut];n===void 0&&(n=t[ut]=new Set);var r=e+`__bubble`;n.has(r)||(Fd(t,e,2,!1),n.add(r))}function Md(e,t,n){var r=0;t&&(r|=4),Fd(n,e,r,t)}var Nd=`_reactListening`+Math.random().toString(36).slice(2);function Pd(e){if(!e[Nd]){e[Nd]=!0,xt.forEach(function(t){t!==`selectionchange`&&(kd.has(t)||Md(t,!1,e),Md(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nd]||(t[Nd]=!0,Md(`selectionchange`,!1,t))}}function Fd(e,t,n,r){switch(Dp(t)){case 2:var i=xp;break;case 8:i=Sp;break;default:i=Cp}n=i.bind(null,t,n,e),i=void 0,!dn||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 Id(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=gt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}cn(function(){var r=a,i=nn(n),s=[];a:{var c=Jr.get(e);if(c!==void 0){var l=Sn,u=e;switch(e){case`keypress`:if(_n(n)===0)break a;case`keydown`:case`keyup`:l=Bn;break;case`focusin`:u=`focus`,l=jn;break;case`focusout`:u=`blur`,l=jn;break;case`beforeblur`:case`afterblur`:l=jn;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=kn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=An;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Hn;break;case Vr:case Hr:case Ur:l=Mn;break;case qr:l=Un;break;case`scroll`:case`scrollend`:l=wn;break;case`wheel`:l=Wn;break;case`copy`:case`cut`:case`paste`:l=Nn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Vn;break;case`toggle`:case`beforetoggle`:l=Gn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=ln(m,p),g!=null&&d.push(Ld(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==tn&&(u=n.relatedTarget||n.fromElement)&&(gt(u)||u[lt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?gt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=kn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Vn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:vt(l),h=u==null?c:vt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,gt(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=zd,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&&Bd(s,c,l,d,!1),u!==null&&f!==null&&Bd(s,f,u,d,!0)}}a:{if(c=r?vt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=dr;else if(ar(c))if(fr)v=xr;else{v=yr;var y=vr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Xt(r.elementType)&&(v=dr):v=br;if(v&&=v(e,r)){or(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ht(c,`number`,c.value)}switch(y=r?vt(r):window,e){case`focusin`:(ar(y)||y.contentEditable===`true`)&&(jr=y,Mr=r,Nr=null);break;case`focusout`:Nr=Mr=jr=null;break;case`mousedown`:Pr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Pr=!1,Fr(s,n,i);break;case`selectionchange`:if(Ar)break;case`keydown`:case`keyup`:Fr(s,n,i)}var b;if(qn)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 tr?$n(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Xn&&n.locale!==`ko`&&(tr||x!==`onCompositionStart`?x===`onCompositionEnd`&&tr&&(b=gn()):(pn=i,mn=`value`in pn?pn.value:pn.textContent,tr=!0)),y=Rd(r,x),0<y.length&&(x=new Pn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=er(n),b!==null&&(x.data=b)))),(b=Yn?nr(e,n):rr(e,n))&&(x=Rd(r,`onBeforeInput`),0<x.length&&(y=new Pn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Td(s,e,r,n,i)}Ad(s,t)})}function Ld(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Rd(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=ln(e,n),i!=null&&r.unshift(Ld(e,i,a)),i=ln(e,t),i!=null&&r.push(Ld(e,i,a))),e.tag===3)return r;e=e.return}return[]}function zd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Bd(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=ln(n,a),l!=null&&o.unshift(Ld(n,l,c))):i||(l=ln(n,a),l!=null&&o.push(Ld(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Vd=/\r\n?/g,Hd=/\u0000|\uFFFD/g;function Ud(e){return(typeof e==`string`?e:``+e).replace(Vd,`
|
|
9
|
-
`).replace(Hd,``)}function Wd(e,t){return t=Ud(t),Ud(e)===t}function Gd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Kt(e,``+r);break;case`className`:At(e,`class`,r);break;case`tabIndex`:At(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:At(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){At(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=$t(``+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`&&Gd(e,t,`name`,a.name,a,null),Gd(e,t,`formEncType`,a.formEncType,a,null),Gd(e,t,`formMethod`,a.formMethod,a,null),Gd(e,t,`formTarget`,a.formTarget,a,null)):(Gd(e,t,`encType`,a.encType,a,null),Gd(e,t,`method`,a.method,a,null),Gd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&jd(`scroll`,e);break;case`onScrollEnd`:r!=null&&jd(`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=$t(``+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`:jd(`beforetoggle`,e),jd(`toggle`,e),kt(e,`popover`,r);break;case`xlinkActuate`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:kt(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=Zt.get(n)||n,kt(e,n,r))}}function Kd(e,t,n,r,a,o){switch(n){case`style`:Yt(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`?Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Kt(e,``+r);break;case`onScroll`:r!=null&&jd(`scroll`,e);break;case`onScrollEnd`:r!=null&&jd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=en);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!St.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[ct]||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,``):kt(e,n,r)}}}function qd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:jd(`error`,e),jd(`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:Gd(e,t,o,s,n,null)}}a&&Gd(e,t,`srcSet`,n.srcSet,n,null),r&&Gd(e,t,`src`,n.src,n,null);return;case`input`:jd(`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:Gd(e,t,r,d,n,null)}}Vt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in jd(`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:Gd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ut(e,!!r,n,!0):Ut(e,!!r,t,!1);return;case`textarea`:for(s in jd(`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:Gd(e,t,s,c,n,null)}Gt(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:Gd(e,t,l,r,n,null)}return;case`dialog`:jd(`beforetoggle`,e),jd(`toggle`,e),jd(`cancel`,e),jd(`close`,e);break;case`iframe`:case`object`:jd(`load`,e);break;case`video`:case`audio`:for(r=0;r<Od.length;r++)jd(Od[r],e);break;case`image`:jd(`error`,e),jd(`load`,e);break;case`details`:jd(`toggle`,e);break;case`embed`:case`source`:case`link`:jd(`error`,e),jd(`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:Gd(e,t,u,r,n,null)}return;default:if(Xt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Kd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Gd(e,t,c,r,n,null))}function Jd(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)||Gd(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&&Gd(e,t,p,m,r,f)}}Bt(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)||Gd(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&&Gd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ut(e,!!n,n?[]:``,!1):Ut(e,!!n,t,!0)):Ut(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:Gd(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&&Gd(e,t,s,a,r,o)}Wt(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:Gd(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:Gd(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)&&Gd(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:Gd(e,t,u,p,r,m)}return;default:if(Xt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Kd(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||Kd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Gd(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||Gd(e,t,f,p,r,m)}function Yd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Xd(){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&&Yd(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&&Yd(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 Zd=null,Qd=null;function $d(e){return e.nodeType===9?e:e.ownerDocument}function ef(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 tf(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 nf(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 rf=null;function af(){var e=window.event;return e&&e.type===`popstate`?e===rf?!1:(rf=e,!0):(rf=null,!1)}var of=typeof setTimeout==`function`?setTimeout:void 0,sf=typeof clearTimeout==`function`?clearTimeout:void 0,cf=typeof Promise==`function`?Promise:void 0,lf=typeof queueMicrotask==`function`?queueMicrotask:cf===void 0?of:function(e){return cf.resolve(null).then(e).catch(uf)};function uf(e){setTimeout(function(){throw e})}function df(e){return e===`head`}function ff(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),Kp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Ef(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Ef(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Ef(e.ownerDocument.body);n=i}while(n);Kp(t)}function pf(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 mf(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`:mf(n),ht(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function hf(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[mt])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=xf(e.nextSibling),e===null)break}return null}function gf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=xf(e.nextSibling),e===null))return null;return e}function _f(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=xf(e.nextSibling),e===null))return null;return e}function vf(e){return e.data===`$?`||e.data===`$~`}function yf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function bf(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 xf(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 Sf=null;function Cf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return xf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function wf(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 Tf(e,t,n){switch(t=$d(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 Ef(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ht(e)}var Df=new Map,Of=new Set;function kf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Af=I.d;I.d={f:jf,r:Mf,D:Ff,C:If,L:Lf,m:Rf,X:Bf,S:zf,M:Vf};function jf(){var e=Af.f(),t=Au();return e||t}function Mf(e){var t=_t(e);t!==null&&t.tag===5&&t.type===`form`?As(t):Af.r(e)}var Nf=typeof document>`u`?null:document;function Pf(e,t,n){var r=Nf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Of.has(i)||(Of.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),qd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Ff(e){Af.D(e),Pf(`dns-prefetch`,e,null)}function If(e,t){Af.C(e,t),Pf(`preconnect`,e,t)}function Lf(e,t,n){Af.L(e,t,n);var r=Nf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=Uf(e);break;case`script`:a=qf(e)}Df.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Df.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Wf(a))||t===`script`&&r.querySelector(Jf(a))||(t=r.createElement(`link`),qd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Rf(e,t){Af.m(e,t);var n=Nf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=qf(e)}if(!Df.has(a)&&(e=m({rel:`modulepreload`,href:e},t),Df.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Jf(a)))return}r=n.createElement(`link`),qd(r,`link`,e),bt(r),n.head.appendChild(r)}}}function zf(e,t,n){Af.S(e,t,n);var r=Nf;if(r&&e){var i=yt(r).hoistableStyles,a=Uf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Wf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Df.get(a))&&Zf(e,n);var c=o=r.createElement(`link`);bt(c),qd(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,Xf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Bf(e,t){Af.X(e,t);var n=Nf;if(n&&e){var r=yt(n).hoistableScripts,i=qf(e),a=r.get(i);a||(a=n.querySelector(Jf(i)),a||(e=m({src:e,async:!0},t),(t=Df.get(i))&&Qf(e,t),a=n.createElement(`script`),bt(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Vf(e,t){Af.M(e,t);var n=Nf;if(n&&e){var r=yt(n).hoistableScripts,i=qf(e),a=r.get(i);a||(a=n.querySelector(Jf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=Df.get(i))&&Qf(e,t),a=n.createElement(`script`),bt(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hf(e,t,n,r){var a=(a=ce.current)?kf(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=Uf(n.href),n=yt(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=Uf(n.href);var o=yt(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(Wf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Df.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},Df.set(e,n),o||Kf(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=qf(n),n=yt(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 Uf(e){return`href="`+zt(e)+`"`}function Wf(e){return`link[rel="stylesheet"][`+e+`]`}function Gf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Kf(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}),qd(t,`link`,n),bt(t),e.head.appendChild(t))}function qf(e){return`[src="`+zt(e)+`"]`}function Jf(e){return`script[async]`+e}function Yf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,bt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),bt(r),qd(r,`style`,a),Xf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Uf(n.href);var o=e.querySelector(Wf(a));if(o)return t.state.loading|=4,t.instance=o,bt(o),o;r=Gf(n),(a=Df.get(a))&&Zf(r,a),o=(e.ownerDocument||e).createElement(`link`),bt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),qd(o,`link`,r),t.state.loading|=4,Xf(o,n.precedence,e),t.instance=o;case`script`:return o=qf(n.src),(a=e.querySelector(Jf(o)))?(t.instance=a,bt(a),a):(r=n,(a=Df.get(o))&&(r=m({},n),Qf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),bt(a),qd(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,Xf(r,n.precedence,e));return t.instance}function Xf(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 Zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var $f=null;function ep(e,t,n){if($f===null){var r=new Map,i=$f=new Map;i.set(n,r)}else i=$f,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[mt]||a[st]||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 tp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function np(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 rp(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ip(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=Uf(r.href),a=t.querySelector(Wf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=sp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,bt(a);return}a=t.ownerDocument||t,r=Gf(r),(i=Df.get(i))&&Zf(r,i),a=a.createElement(`link`),bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),qd(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=sp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ap=0;function op(e,t){return e.stylesheets&&e.count===0&&lp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&lp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ap===0&&(ap=62500*Xd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ap?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function sp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cp=null;function lp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,cp=new Map,t.forEach(up,e),cp=null,sp.call(e))}function up(e,t){if(!(t.state.loading&4)){var n=cp.get(e);if(n)var r=n.get(null);else{n=new Map,cp.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=sp.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 dp={$$typeof:C,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function fp(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=Xe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xe(0),this.hiddenUpdates=Xe(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 pp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new fp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=li(3,null,null,t),e.current=a,a.stateNode=e,t=ca(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Va(a),e}function mp(e){return e?(e=si,e):si}function hp(e,t,n,r,i,a){i=mp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ua(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Wa(e,r,t),n!==null&&(Tu(n,e,t),Ga(n,e,t))}function gp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _p(e,t){gp(e,t),(e=e.alternate)&&gp(e,t)}function vp(e){if(e.tag===13||e.tag===31){var t=ii(e,67108864);t!==null&&Tu(t,e,67108864),_p(e,67108864)}}function yp(e){if(e.tag===13||e.tag===31){var t=Cu();t=nt(t);var n=ii(e,t);n!==null&&Tu(n,e,t),_p(e,t)}}var bp=!0;function xp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,Cp(e,t,n,r)}finally{I.p=a,F.T=i}}function Sp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,Cp(e,t,n,r)}finally{I.p=a,F.T=i}}function Cp(e,t,n,r){if(bp){var i=wp(r);if(i===null)Id(e,t,r,Tp,n),Ip(e,r);else if(Rp(i,e,t,n,r))r.stopPropagation();else if(Ip(e,r),t&4&&-1<Fp.indexOf(e)){for(;i!==null;){var a=_t(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ge(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Re(o);s.entanglements[1]|=c,o&=~c}md(a),!(Wl&6)&&(du=Ee()+500,hd(0,!1))}}break;case 31:case 13:s=ii(a,2),s!==null&&Tu(s,a,2),Au(),_p(a,2)}if(a=wp(r),a===null&&Id(e,t,r,Tp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Id(e,t,r,null,n)}}function wp(e){return e=nn(e),Ep(e)}var Tp=null;function Ep(e){if(Tp=null,e=gt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Tp=e,null}function Dp(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 Op=!1,kp=null,Ap=null,jp=null,Mp=new Map,Np=new Map,Pp=[],Fp=`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 Ip(e,t){switch(e){case`focusin`:case`focusout`:kp=null;break;case`dragenter`:case`dragleave`:Ap=null;break;case`mouseover`:case`mouseout`:jp=null;break;case`pointerover`:case`pointerout`:Mp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Np.delete(t.pointerId)}}function Lp(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=_t(t),t!==null&&vp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Rp(e,t,n,r,i){switch(t){case`focusin`:return kp=Lp(kp,e,t,n,r,i),!0;case`dragenter`:return Ap=Lp(Ap,e,t,n,r,i),!0;case`mouseover`:return jp=Lp(jp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Mp.set(a,Lp(Mp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Np.set(a,Lp(Np.get(a)||null,e,t,n,r,i)),!0}return!1}function zp(e){var t=gt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,at(e.priority,function(){yp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,at(e.priority,function(){yp(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 Bp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tn=r,n.target.dispatchEvent(r),tn=null}else return t=_t(n),t!==null&&vp(t),e.blockedOn=n,!1;t.shift()}return!0}function Vp(e,t,n){Bp(e)&&n.delete(t)}function Hp(){Op=!1,kp!==null&&Bp(kp)&&(kp=null),Ap!==null&&Bp(Ap)&&(Ap=null),jp!==null&&Bp(jp)&&(jp=null),Mp.forEach(Vp),Np.forEach(Vp)}function Up(e,n){e.blockedOn===n&&(e.blockedOn=null,Op||(Op=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hp)))}var Wp=null;function Gp(e){Wp!==e&&(Wp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wp===e&&(Wp=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(Ep(r||n)===null)continue;break}var a=_t(n);a!==null&&(e.splice(t,3),t-=3,Os(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Kp(e){function t(t){return Up(t,e)}kp!==null&&Up(kp,e),Ap!==null&&Up(Ap,e),jp!==null&&Up(jp,e),Mp.forEach(t),Np.forEach(t);for(var n=0;n<Pp.length;n++){var r=Pp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Pp.length&&(n=Pp[0],n.blockedOn===null);)zp(n),n.blockedOn===null&&Pp.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[ct]||null;if(typeof a==`function`)o||Gp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ct]||null)s=o.formAction;else if(Ep(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Gp(n)}}}function qp(){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 Jp(e){this._internalRoot=e}Yp.prototype.render=Jp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;hp(n,Cu(),e,t,null,null)},Yp.prototype.unmount=Jp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hp(e.current,2,null,e,null,null),Au(),t[lt]=null}};function Yp(e){this._internalRoot=e}Yp.prototype.unstable_scheduleHydration=function(e){if(e){var t=it();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pp.length&&t!==0&&t<Pp[n].priority;n++);Pp.splice(n,0,e),n===0&&zp(e)}};var Xp=n.version;if(Xp!==`19.2.7`)throw Error(i(527,Xp,`19.2.7`));I.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=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Zp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Qp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qp.isDisabled&&Qp.supportsFiber)try{Fe=Qp.inject(Zp),Ie=Qp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Zs,s=Qs,c=$s;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=pp(e,1,!1,null,null,n,r,null,o,s,c,qp),e[lt]=t.current,Pd(e),new Jp(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,y=/^[\\/]{2}/;function b(e,t){return t+e.replace(/\\/g,`/`)}var x=`popstate`;function S(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function C(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return O(``,{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:k(t)}return j(t,n,null,e)}function w(e,t){if(e===!1||e==null)throw Error(t)}function T(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function E(){return Math.random().toString(36).substring(2,10)}function D(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function O(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?A(t):t,state:n,key:t&&t.key||r||E(),mask:i}}function k({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 A(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 j(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=S(e)?e:O(h.location,e,t);n&&n(r,e),l=u()+1;let d=D(r,l),f=h.createHref(r.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=S(e)?e:O(h.location,e,t);n&&n(r,e),l=u();let i=D(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return M(i,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(x,d),c=e,()=>{i.removeEventListener(x,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 M(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),w(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:k(t);return i=i.replace(/ $/,`%20`),!n&&y.test(i)&&(i=r+i),new URL(i,r)}var N=l(d(),1),ee=class{#e=new Map;constructor(e){if(e)for(let[t,n]of e)this.set(t,n)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){this.#e.set(e,t)}},P=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function F(e){return P.has(e)}var I=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function te(e){return I.has(e)}function ne(e){return e.index===!0}function re(e){let t={};return e.Component&&Object.assign(t,{element:N.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:N.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:N.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function ie(e,t=re,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(w(e.index!==!0||!e.children,`Cannot specify children on an index route`),w(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),ne(e)){let n={...e,id:s};return r[s]=L(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=L(n,t(n)),e.children&&(n.children=ie(e.children,t,o,r,i)),n}})}function L(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ae(e,t,n=`/`){return oe(e,t,n,!1)}function oe(e,t,n,r,i){let a=Ee((typeof t==`string`?A(t):t).pathname||`/`,n);if(a==null)return null;let o=i??ce(e),s=null,c=Te(a);for(let e=0;s==null&&e<o.length;++e)s=xe(o[e],c,r);return s}function se(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function ce(e){let t=le(e);return de(t),t}function le(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;w(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=Ie([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(w(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),le(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:ye(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=we(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ue(e.path))a(e,t,!0,n)}),t}function ue(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=ue(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 de(e){e.sort((e,t)=>e.score===t.score?be(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var fe=/^:[\w-]+$/,pe=3,me=2,he=1,ge=10,_e=-2,ve=e=>e===`*`;function ye(e,t){let n=e.split(`/`),r=n.length;return n.some(ve)&&(r+=_e),t&&(r+=me),n.filter(e=>!ve(e)).reduce((e,t)=>e+(fe.test(t)?pe:t===``?he:ge),r)}function be(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 xe(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={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Ce(u,l,s.matcher,s.compiledParams):Se(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Se({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Ie([a,d.pathname]),pathnameBase:Re(Ie([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=Ie([a,d.pathnameBase]))}return o}function Se(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=we(e.path,e.caseSensitive,e.end);return Ce(e,t,n,r)}function Ce(e,t,n,r){let 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 we(e,t=!1,n=!0){T(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 Te(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return T(!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 Ee(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 De({basename:e,pathname:t}){return t===`/`?e:Ie([e,t])}var Oe=e=>v.test(e);function ke(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?A(e):e,a;return n?(n=Fe(n),a=n.startsWith(`/`)?Ae(n.substring(1),`/`):Ae(n,t)):a=t,{pathname:a,search:ze(r),hash:Be(i)}}function Ae(e,t){let n=Le(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function je(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 Me(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ne(e){let t=Me(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Pe(e,t,n,r=!1){let i;typeof e==`string`?i=A(e):(i={...e},w(!i.pathname||!i.pathname.includes(`?`),je(`?`,`pathname`,`search`,i)),w(!i.pathname||!i.pathname.includes(`#`),je(`#`,`pathname`,`hash`,i)),w(!i.search||!i.search.includes(`#`),je(`#`,`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=ke(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Fe=e=>e.replace(/[\\/]{2,}/g,`/`),Ie=e=>Fe(e.join(`/`)),Le=e=>e.replace(/\/+$/,``),Re=e=>Le(e).replace(/^\/*/,`/`),ze=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Be=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ve=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],He=class{status;statusText;data;error;internal;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 Ue(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function We(e){return Ie(e.map(e=>e.route.path).filter(Boolean))||`/`}var Ge=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ke(e,t){let n=e;if(typeof n!=`string`||!v.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ge)try{let e=new URL(window.location.href),r=y.test(n)?new URL(b(n,e.protocol)):new URL(n),a=Ee(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{T(!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 qe=Symbol(`Uninstrumented`);function Je(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=Xe(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=Xe(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[qe]??i,a=Xe(n[e],t,(...e)=>Qe(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[qe]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[qe]??e,r=Xe(n.middleware,t,(...e)=>Qe(e[0]));return r?(r[qe]=t,r):e})),r}function Ye(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[qe]??e.navigate,r=Xe(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?k(n):`.`,...$e(e,r??{})}});r&&(r[qe]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[qe]??e.fetch,r=Xe(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...$e(e,i??{})}});r&&(r[qe]=t,e.fetch=r)}return e}function Xe(e,t,n){return e.length===0?null:async(...r)=>{let i=await Ze(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function Ze(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=Ze(e,t,n,r-1),a=await o,w(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 Qe(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:et(t),params:{...r},pattern:i,context:tt(n)}}function $e(e,t){return{currentUrl:k(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 et(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function tt(e){return{get:t=>e.get(t)}}var nt=[`POST`,`PUT`,`PATCH`,`DELETE`],rt=new Set(nt),it=[`GET`,...nt],at=new Set(it),ot=new Set([301,302,303,307,308]),st=new Set([307,308]),ct={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},lt={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ut={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},dt=`remix-router-transitions`,ft=Symbol(`ResetLoaderData`),pt=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=ce(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#n??this.#e}get branches(){return this.#r??this.#t}get hasHMRRoutes(){return this.#n!=null}setRoutes(e){this.#e=e,this.#t=ce(e)}setHmrRoutes(e){this.#n=e,this.#r=ce(e)}commitHmrRoutes(){this.#n&&(this.#e=this.#n,this.#t=this.#r,this.#n=void 0,this.#r=void 0)}};function mt(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;w(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties,a=i||(()=>({}));if(e.instrumentations){let t=e.instrumentations;a=e=>({...i?.(e),...Je(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new pt(ie(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||jt,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=oe(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=nn(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=tn(s.activeRoutes);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&ot(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=ot(null,s.activeRoutes,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=>yt(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=bt(e.route,t,n);S||=r.renderFallback,x&&=!r.shouldLoad})}let C,E={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:S,navigation:ct,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},D=`POP`,k=null,j=!1,N,P=!1,F=new Map,I=null,te=!1,ne=!1,re=new Set,L=new Map,ae=0,ce=-1,le=new Map,ue=new Set,de=new Map,fe=new Map,pe=new Set,me=new Map,he,ge=null;function _e(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(he){he(),he=void 0;return}T(me.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=et({currentLocation:E.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{he=e});e.history.go(r*-1),$e(i,{state:`blocked`,location:n,proceed(){$e(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(E.blockers);e.set(i,ut),be({blockers:e})}}),k?.resolve(),k=null;return}return we(t,n)}),n){Dn(t,F);let e=()=>On(t,F);t.addEventListener(`pagehide`,e),I=()=>t.removeEventListener(`pagehide`,e)}return E.initialized||we(`POP`,E.location,{initialHydration:!0}),C}function ve(){d&&d(),I&&I(),f.clear(),N&&N.abort(),E.fetchers.forEach((e,t)=>He(E.fetchers,t)),E.blockers.forEach((e,t)=>Qe(t))}function ye(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(E,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function be(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}),E={...E,...e};let n=[],r=[];E.fetchers.forEach((e,t)=>{e.state===`idle`&&(pe.has(t)?n.push(t):r.push(t))}),pe.forEach(e=>{!E.fetchers.has(e)&&!L.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(E,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>He(E.fetchers,e)),r.forEach(e=>E.fetchers.delete(e))}function xe(t,n,{flushSync:r}={}){let i=E.actionData!=null&&E.navigation.formMethod!=null&&vn(E.navigation.formMethod)&&E.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?E.actionData:null;let o=n.loaderData?Qt(E.loaderData,n.loaderData,n.matches||[],n.errors):E.loaderData,c=E.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,ut)));let l=te?!1:at(t,n.matches||E.matches),u=j===!0||E.navigation.formMethod!=null&&vn(E.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),te||D===`POP`||(D===`PUSH`?e.history.push(t,t.state):D===`REPLACE`&&e.history.replace(t,t.state));let d;if(D===`POP`){let e=F.get(E.location.pathname);e&&e.has(t.pathname)?d={currentLocation:E.location,nextLocation:t}:F.has(t.pathname)&&(d={currentLocation:t,nextLocation:E.location})}else if(P){let e=F.get(E.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),F.set(E.location.pathname,e)),d={currentLocation:E.location,nextLocation:t}}be({...n,actionData:a,loaderData:o,historyAction:D,location:t,initialized:!0,renderFallback:!1,navigation:ct,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),D=`POP`,j=!1,P=!1,te=!1,ne=!1,k?.resolve(),k=null,ge?.resolve(),ge=null}async function Se(t,n){if(k?.resolve(),k=null,typeof t==`number`){k||=kn();let n=k.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=_t(!1,gt(E.location,E.matches,c,t,n?.fromRouteId,n?.relative),n),o;n?.mask&&(o={pathname:``,search:``,hash:``,...typeof n.mask==`string`?A(n.mask):{...E.location.mask,...n.mask}});let s=E.location,l=O(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)};let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&vn(i.formMethod)&&i.formAction===E.location.pathname+E.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=et({currentLocation:s,nextLocation:l,historyAction:d});if(m){$e(m,{state:`blocked`,location:l,proceed(){$e(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),Se(t,n)},reset(){let e=new Map(E.blockers);e.set(m,ut),be({blockers:e})}});return}await we(d,l,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function Ce(){ge||=kn(),Le(),be({revalidation:`loading`});let e=ge.promise;return E.navigation.state===`submitting`?e:E.navigation.state===`idle`?(we(E.historyAction,E.location,{startUninterruptedRevalidation:!0}),e):(we(D||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation,enableViewTransition:P===!0}),e)}async function we(t,n,r){N&&N.abort(),N=null,D=t,te=(r&&r.startUninterruptedRevalidation)===!0,it(E.location,E.matches),j=(r&&r.preventScrollReset)===!0,P=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&E.matches&&E.matches.length>0&&!y?E.matches:oe(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&E.initialized&&!ne&&on(E.location,n)&&!(r&&r.submission&&vn(r.submission.formMethod))){xe(n,{matches:a},{flushSync:o});return}let l=ot(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),!a){let{error:e,notFoundMatches:t,route:r}=tt(n.pathname);xe(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;N=new AbortController;let d=Kt(e.history,n,N.signal,r&&r.submission),f=e.getContext?await e.getContext():new ee,p;if(r&&r.pendingError)p=[en(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&vn(r.submission.formMethod)){let i=await Te(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(dn(t)&&Ue(t.error)&&t.error.status===404){N=null,xe(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=Sn(n,a,t,r.submission),o=!1,l.active=!1,d=Kt(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await De(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(N=null,xe(n,{matches:h||a,...$t(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function Te(t,n,i,l,u,d,f,p,m={}){if(Le(),be({navigation:Cn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await dt(l,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}=tn(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=en(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=tt(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=bn(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:nn(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Fe(t,n,Lt(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(fn(h)){let n;return n=m&&m.replace!=null?m.replace:Gt(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===E.location.pathname+E.location.search,await Pe(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(dn(h)){let e=en(l,g.route.id);return(m&&m.replace)!==!0&&(D=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function De(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||Sn(n,i,l,p),x=p||m||xn(b),S=!te&&!g;if(d){if(S){let e=ke(v);be({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await dt(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}=tn(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=en(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}=tt(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=vt(t,u,a,o,e.history,E,i,x,n,g?[]:r,g===!0,ne,re,pe,de,ue,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(ce=++ae,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=new Map(E.fetchers),t=qe(e);return xe(n,{matches:i,loaderData:{},errors:v&&dn(v[1])?{[v[0]]:v[1].error}:null,...$t(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=ke(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=Ae(T)),be(e,{flushSync:_})}T.forEach(e=>{Ge(e.key),e.controller&&L.set(e.key,e.controller)});let D=()=>T.forEach(e=>Ge(e.key));N&&N.signal.addEventListener(`abort`,D);let{loaderResults:O,fetcherResults:k}=await Ie(w,T,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener(`abort`,D),T.forEach(e=>L.delete(e.key));let A=rn(O);if(A)return await Pe(t,A.result,!0,{replace:h}),{shortCircuited:!0};if(A=rn(k),A)return ue.add(A.key),await Pe(t,A.result,!0,{replace:h}),{shortCircuited:!0};let j=new Map(E.fetchers),{loaderData:M,errors:ee}=Zt(E,i,O,v,T,k,j);g&&E.errors&&(ee={...E.errors,...ee});let P=qe(j),F=Xe(ce,j),I=P||F||T.length>0;return{matches:i,loaderData:M,errors:ee,...I?{workingFetchers:j}:{}}}function ke(e){if(e&&!dn(e[1]))return{[e[0]]:e[1].data};if(E.actionData)return Object.keys(E.actionData).length===0?null:E.actionData}function Ae(e){let t=new Map(E.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=wn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function je(t,n,r,i){Ge(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=gt(E.location,E.matches,c,r,n,i?.relative),u=oe(o,l,c,!1,s.branches),d=ot(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){ze(t,n,nn(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=_t(!0,l,i);if(m){ze(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new ee,g=(i&&i.preventScrollReset)===!0;if(p&&vn(p.formMethod)){await Me(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}de.set(t,{routeId:n,path:f}),await Ne(t,n,f,u,h,d.active,a,g,p)}async function Me(t,n,i,l,u,d,f,p,m,h){Le(),de.delete(t),Re(t,Tn(m,E.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=Kt(e.history,i,g.signal,m);if(d){let e=await dt(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){ze(t,n,e.error,{flushSync:f});return}else if(e.matches)l=e.matches;else{ze(t,n,nn(404,{pathname:i}),{flushSync:f});return}}let v=bn(l,i);if(!v.route.action&&!v.route.lazy){ze(t,n,nn(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}L.set(t,g);let y=ae,b=Lt(a,o,_,i,l,v,r,u),x=await Fe(_,i,b,u,t),S=x[v.route.id];if(!S){for(let e of b)if(x[e.route.id]){S=x[e.route.id];break}}if(_.signal.aborted){L.get(t)===g&&L.delete(t);return}if(pe.has(t)){if(fn(S)||dn(S)){Re(t,En(void 0));return}}else{if(fn(S))if(L.delete(t),ce>y){Re(t,En(void 0));return}else return ue.add(t),Re(t,wn(m)),Pe(_,S,!1,{fetcherSubmission:m,preventScrollReset:p});if(dn(S)){ze(t,n,S.error);return}}let C=E.navigation.location||E.location,T=Kt(e.history,C,g.signal),O=s.activeRoutes,k=E.navigation.state===`idle`?E.matches:oe(O,E.navigation.location,c,!1,s.branches);w(k,`Didn't find any matches after fetcher action`);let A=++ae;le.set(t,A);let{dsMatches:j,revalidatingFetchers:M}=vt(T,u,a,o,e.history,E,k,m,C,r,!1,ne,re,pe,de,ue,O,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,S],h),ee=wn(m,S.data),P=new Map(E.fetchers);P.set(t,ee),M.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=P.get(t),r=wn(void 0,n?n.data:void 0);P.set(t,r),Ge(t),e.controller&&L.set(t,e.controller)}),be({fetchers:P});let F=()=>M.forEach(e=>Ge(e.key));g.signal.addEventListener(`abort`,F);let{loaderResults:I,fetcherResults:te}=await Ie(j,M,T,C,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,F),le.delete(t),L.delete(t),M.forEach(e=>L.delete(e.key));let ie=E.fetchers.has(t),se=e=>{if(!ie)return e;let n=new Map(e.fetchers);return n.set(t,En(S.data)),{...e,fetchers:n}},fe=rn(I);if(fe)return E=se(E),Pe(T,fe.result,!1,{preventScrollReset:p});if(fe=rn(te),fe)return ue.add(fe.key),E=se(E),Pe(T,fe.result,!1,{preventScrollReset:p});let me=new Map(E.fetchers);ie&&me.set(t,En(S.data));let{loaderData:he,errors:ge}=Zt(E,k,I,void 0,M,te,me);Xe(A,me),E.navigation.state===`loading`&&A>ce?(w(D,`Expected pending action`),N&&N.abort(),xe(E.navigation.location,{matches:k,loaderData:he,errors:ge,fetchers:me})):(be({errors:ge,loaderData:Qt(E.loaderData,he,k,ge),fetchers:me}),ne=!1)}async function Ne(t,n,i,s,c,l,u,d,f){let p=E.fetchers.get(t);Re(t,wn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Kt(e.history,i,m.signal);if(l){let e=await dt(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){ze(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{ze(t,n,nn(404,{pathname:i}),{flushSync:u});return}}let g=bn(s,i);L.set(t,m);let _=ae,v=await Fe(h,i,Lt(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(L.get(t)===m&&L.delete(t),!h.signal.aborted){if(pe.has(t)){Re(t,En(void 0));return}if(fn(y))if(ce>_){Re(t,En(void 0));return}else{ue.add(t),await Pe(h,y,!1,{preventScrollReset:d});return}if(dn(y)){ze(t,n,y.error);return}Re(t,En(y.data))}}async function Pe(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(k?.resolve(),k=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ne=!0);let d=i.response.headers.get(`Location`);w(d,`Expected a Location header on the redirect Response`),d=Gt(d,new URL(r.url),c,e.history);let f=O(E.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Oe(d)){let n=M(t,d,!0);e=n.origin!==t.location.origin||Ee(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}N=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=E.navigation;!o&&!s&&m&&h&&g&&(o=xn(E.navigation));let _=o||s;st.has(i.response.status)&&_&&vn(_.formMethod)?await we(p,f,{submission:{..._,formAction:d},preventScrollReset:l||j,enableViewTransition:a?P:void 0}):await we(p,f,{overrideNavigation:Sn(f,[],p,o),fetcherSubmission:s,preventScrollReset:l||j,enableViewTransition:a?P:void 0})}async function Fe(e,t,n,r,i){let a,o={};try{a=await Rt(l,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(!vn(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!E.loaderData.hasOwnProperty(e.route.id)&&(!E.errors||!E.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(un(r)){let i=r.result;o[t]={type:`redirect`,response:Ht(i,e,t,n,c)}}else o[t]=await Vt(r);return o}async function Ie(e,t,n,r,i){let a=Fe(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Fe(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:nn(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Le(){ne=!0,de.forEach((e,t)=>{L.has(t)&&re.add(t),Ge(t)})}function Re(e,t,n={}){let r=new Map(E.fetchers);r.set(e,t),be({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function ze(e,t,n,r={}){let i=en(E.matches,t),a=new Map(E.fetchers);He(a,e),be({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Be(e){return fe.set(e,(fe.get(e)||0)+1),pe.has(e)&&pe.delete(e),E.fetchers.get(e)||lt}function Ve(e,t){Ge(e,t?.reason),Re(e,En(null))}function He(e,t){let n=E.fetchers.get(t);L.has(t)&&!(n&&n.state===`loading`&&le.has(t))&&Ge(t),de.delete(t),le.delete(t),ue.delete(t),pe.delete(t),re.delete(t),e.delete(t)}function We(e){let t=(fe.get(e)||0)-1;t<=0?(fe.delete(e),pe.add(e)):fe.set(e,t),be({fetchers:new Map(E.fetchers)})}function Ge(e,t){let n=L.get(e);n&&(n.abort(t),L.delete(e))}function Ke(e,t){for(let n of e){let e=t.get(n);w(e,`Expected fetcher: ${n}`);let r=En(e.data);t.set(n,r)}}function qe(e){let t=[],n=!1;for(let r of ue){let i=e.get(r);w(i,`Expected fetcher: ${r}`),i.state===`loading`&&(ue.delete(r),t.push(r),n=!0)}return Ke(t,e),n}function Xe(e,t){let n=[];for(let[r,i]of le)if(i<e){let e=t.get(r);w(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Ge(r),le.delete(r),n.push(r))}return Ke(n,t),n.length>0}function Ze(e,t){let n=E.blockers.get(e)||ut;return me.get(e)!==t&&me.set(e,t),n}function Qe(e){E.blockers.delete(e),me.delete(e)}function $e(e,t){let n=E.blockers.get(e)||ut;w(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(E.blockers);r.set(e,t),be({blockers:r})}function et({currentLocation:e,nextLocation:t,historyAction:n}){if(me.size===0)return;me.size>1&&T(!1,`A router only supports one blocker at a time`);let r=Array.from(me.entries()),[i,a]=r[r.length-1],o=E.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function tt(e){let t=nn(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=tn(n);return{notFoundMatches:r,route:i,error:t}}function nt(e,t,n){if(m=e,g=t,h=n||null,!_&&E.navigation===ct){_=!0;let e=at(E.location,E.matches);e!=null&&be({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function rt(e,t){return h&&h(e,t.map(e=>se(e,E.loaderData)))||e.key}function it(e,t){if(m&&g){let n=rt(e,t);m[n]=g()}}function at(e,t){if(m){let n=rt(e,t),r=m[n];if(typeof r==`number`)return r}return null}function ot(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:oe(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:oe(n,r,c,!0,e)}}return{active:!1,matches:null}}async function dt(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||wt(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=oe(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=oe(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&ft(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=oe(s.activeRoutes,n,c,!0,u),!f||ft(l,f))return{type:`success`,matches:null};l=f}}function ft(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function mt(e){o={},s.setHmrRoutes(ie(e,a,void 0,o))}function ht(e,t,n=!1){wt(e,t,s,o,a,n),s.hasHMRRoutes||be({})}return C={get basename(){return c},get future(){return u},get state(){return E},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:_e,subscribe:ye,enableScrollRestoration:nt,navigate:Se,fetch:je,revalidate:Ce,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Be,resetFetcher:Ve,deleteFetcher:We,dispose:ve,getBlocker:Ze,deleteBlocker:Qe,patchRoutes:ht,_internalFetchControllers:L,_internalSetRoutes:mt,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){be(e)}},e.instrumentations&&(C=Ye(C,e.instrumentations.map(e=>e.router).filter(Boolean))),C}function ht(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function gt(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=Pe(r||`.`,Ne(o),Ee(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=yn(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=De({basename:n,pathname:c.pathname})),k(c)}function _t(e,t,n){if(!n||!ht(n))return{path:t};if(n.formMethod&&!_n(n.formMethod))return{path:t,error:nn(405,{method:n.formMethod})};let r=()=>({path:t,error:nn(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=an(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!vn(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}\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(!vn(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()}}}w(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Jt(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Jt(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Yt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Yt(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(vn(c.formMethod))return{path:t,submission:c};let l=A(t);return e&&l.search&&yn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:k(l),submission:c}}function vt(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?dn(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&dn(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=We(o),A=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!yt(s))f=!1;else if(u){let{shouldLoad:e}=bt(s,a.loaderData,a.errors);f=e}else xt(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return It(n,r,e,c,k,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?St(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p};return It(n,r,e,c,k,i,l,t,Ct(i,m),m,x)}),j=[];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,b=oe(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;j.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=bn(b,e.path),C=new AbortController,w=Kt(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=Lt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=Lt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:D?!1:d;let a={...O,defaultShouldRevalidate:i};Ct(S,a)&&(T=Lt(n,r,w,e.path,b,S,l,t,a))}T&&j.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:j}}function yt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function bt(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!yt(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 xt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function St(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Ct(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function wt(e,t,n,r,i,a){let o;if(e){let t=r[e];w(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>Tt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=ie(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]=ie([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})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function Tt(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=>Tt(e,t)))??!1:!1}var Et=new WeakMap,Dt=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(w(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Et.get(i);o||(o={},Et.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=F(e),n=i[e]!==void 0;if(t)T(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)T(!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},Ot=new WeakMap;function kt(e,t,n,r,i){let a=n[e.id];if(w(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Ot.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{w(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=te(e),o=a[e]!==void 0;i?T(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?T(!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 Ot.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=Dt({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 At(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 jt(e){return e.matches.some(e=>e.route.middleware)?Mt(e,()=>At(e)):At(e)}function Mt(e,t){return Nt(e,t,e=>{if(gn(e))throw e;return e},cn,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[en(r,a).route.id]:{type:`error`,result:t}}}}}async function Nt(e,t,n,r,i){let{matches:a,...o}=e;return await Pt(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Pt(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 Pt(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 Ft(e,t,n,r,i){let a=Dt({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=kt(r.route,vn(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function It(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Ft(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Ct(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Ct(a,{...l,defaultShouldRevalidate:e}):Ct(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!vn(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(vn(n.method)||!p)?zt({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function Lt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?It(e,t,n,r,We(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Ft(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Rt(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,url:qt(t,n),pattern:We(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 Mt(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 zt({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=vn(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,url:qt(e,t),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 nn(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 nn(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Bt(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 Vt(e){let{result:t,type:n}=e;if(mn(t)){let e;try{e=await Bt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new He(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?pn(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:sn(t),statusCode:Ue(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Ue(t)?t.status:void 0}:pn(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 Ht(e,t,n,r,i){let a=e.headers.get(`Location`);if(w(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Oe(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=gt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Ut=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Wt(e){try{return Ut.includes(new URL(e).protocol)}catch{return!1}}function Gt(e,t,n,r){if(Oe(e)){let r=e,i=y.test(r)?new URL(b(r,t.protocol)):new URL(r);if(Wt(i.toString()))throw Error(`Invalid redirect location`);let a=Ee(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Fe(i.pathname)+i.search+i.hash}try{if(Wt(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function Kt(e,t,n,r){let i=e.createURL(an(t)).toString(),a={signal:n};if(r&&vn(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=Jt(r.formData):a.body=r.formData}return new Request(i,a)}function qt(e,t){let n=new URL(e.url),r=typeof t==`string`?A(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);let i=e.toString();n.search=i?`?${i}`:``}else n.search=``;return n.hash=r.hash||``,n}function Jt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Yt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Xt(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&dn(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(w(!fn(f),`Cannot handle redirect results in processLoaderData`),dn(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=en(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=ft),c||(c=!0,s=Ue(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 Zt(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Xt(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 s=a[n];if(w(s,`Did not find corresponding fetcher result`),dn(s)){let t=en(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(fn(s))w(!1,`Unhandled fetcher revalidation redirect`);else{let e=En(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function Qt(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==ft).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 $t(e){return e?dn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function en(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function tn(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 nn(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 He(e||500,o,Error(s),!0)}function rn(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(fn(r))return{key:n,result:r}}}function an(e){return k({...typeof e==`string`?A(e):e,hash:``})}function on(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function sn(e){return new He(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function cn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&ln(t))}function ln(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function un(e){return mn(e.result)&&ot.has(e.result.status)}function dn(e){return e.type===`error`}function fn(e){return(e&&e.type)===`redirect`}function pn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function mn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function hn(e){return ot.has(e)}function gn(e){return mn(e)&&hn(e.status)&&e.headers.has(`Location`)}function _n(e){return at.has(e.toUpperCase())}function vn(e){return rt.has(e.toUpperCase())}function yn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function bn(e,t){let n=typeof t==`string`?A(t).search:t.search;if(e[e.length-1].route.index&&yn(n||``))return e[e.length-1];let r=Me(e);return r[r.length-1]}function xn(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 Sn(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Cn(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function wn(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 Tn(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 En(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 Dn(e,t){try{let n=e.sessionStorage.getItem(dt);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 On(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(dt,JSON.stringify(n))}catch(e){T(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function kn(){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 An=N.createContext(null);An.displayName=`DataRouter`;var jn=N.createContext(null);jn.displayName=`DataRouterState`;var Mn=N.createContext(!1);function Nn(){return N.useContext(Mn)}var Pn=N.createContext({isTransitioning:!1});Pn.displayName=`ViewTransition`;var Fn=N.createContext(new Map);Fn.displayName=`Fetchers`;var In=N.createContext(null);In.displayName=`Await`;var Ln=N.createContext(null);Ln.displayName=`Navigation`;var Rn=N.createContext(null);Rn.displayName=`Location`;var zn=N.createContext({outlet:null,matches:[],isDataRoute:!1});zn.displayName=`Route`;var Bn=N.createContext(null);Bn.displayName=`RouteError`;var Vn=`REACT_ROUTER_ERROR`,Hn=`REDIRECT`,Un=`ROUTE_ERROR_RESPONSE`;function Wn(e){if(e.startsWith(`${Vn}:${Hn}:{`))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 Gn(e){if(e.startsWith(`${Vn}:${Un}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new He(t.status,t.statusText,t.data)}catch{}}function Kn(e,{relative:t}={}){w(qn(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=N.useContext(Ln),{hash:i,pathname:a,search:o}=tr(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Ie([n,a])),r.createHref({pathname:s,search:o,hash:i})}function qn(){return N.useContext(Rn)!=null}function Jn(){return w(qn(),`useLocation() may be used only in the context of a <Router> component.`),N.useContext(Rn).location}var Yn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Xn(){let{isDataRoute:e}=N.useContext(zn);return e?yr():Zn()}function Zn(){w(qn(),`useNavigate() may be used only in the context of a <Router> component.`);let e=N.useContext(An),{basename:t,navigator:n}=N.useContext(Ln),{matches:r}=N.useContext(zn),{pathname:i}=Jn(),a=JSON.stringify(Ne(r)),o=N.useRef(!1);return N.useLayoutEffect(()=>{o.current=!0}),N.useCallback((r,s={})=>{if(T(o.current,Yn),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Pe(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Ie([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Qn=N.createContext(null);function $n(e){let t=N.useContext(zn).outlet;return N.useMemo(()=>t&&N.createElement(Qn.Provider,{value:e},t),[t,e])}function er(){let{matches:e}=N.useContext(zn);return e[e.length-1]?.params??{}}function tr(e,{relative:t}={}){let{matches:n}=N.useContext(zn),{pathname:r}=Jn(),i=JSON.stringify(Ne(n));return N.useMemo(()=>Pe(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function nr(e,t,n){w(qn(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=N.useContext(Ln),{matches:i}=N.useContext(zn),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=Jn(),l;if(t){let e=typeof t==`string`?A(t):t;w(s===`/`||e.pathname?.startsWith(s),`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 "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):ae(e,{pathname:d}),p=lr(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Ie([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:Ie([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?N.createElement(Rn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function rr(){let e=vr(),t=Ue(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return N.createElement(N.Fragment,null,N.createElement(`h2`,null,`Unexpected Application Error!`),N.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?N.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var ir=N.createElement(rr,null),ar=class extends N.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=Mn;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=Gn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:N.createElement(zn.Provider,{value:this.props.routeContext},N.createElement(Bn.Provider,{value:e,children:this.props.component}));return this.context?N.createElement(sr,{error:e},t):t}},or=new WeakMap;function sr({children:e,error:t}){let{basename:n}=N.useContext(Ln);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Wn(t.digest);if(e){let r=or.get(t);if(r)throw r;let i=Ke(e.location,n),a=i.absoluteURL||i.to;if(Wt(a))throw Error(`Invalid redirect location`);if(Ge&&!or.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw or.set(t,n),n}return N.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function cr({routeContext:e,match:t,children:n}){let r=N.useContext(An);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),N.createElement(zn.Provider,{value:e},n)}function lr(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);w(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??{},pattern:We(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||ir,o&&(s<0&&c===0?(xr(`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?N.createElement(n.route.Component,null):n.route.element?n.route.element:e,N.createElement(cr,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?N.createElement(ar,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function ur(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dr(e){let t=N.useContext(An);return w(t,ur(e)),t}function fr(e){let t=N.useContext(jn);return w(t,ur(e)),t}function pr(e){let t=N.useContext(zn);return w(t,ur(e)),t}function mr(e){let t=pr(e),n=t.matches[t.matches.length-1];return w(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function hr(){return mr(`useRouteId`)}function gr(){let e=fr(`useNavigation`);return N.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function _r(){let{matches:e,loaderData:t}=fr(`useMatches`);return N.useMemo(()=>e.map(e=>se(e,t)),[e,t])}function vr(){let e=N.useContext(Bn),t=fr(`useRouteError`),n=mr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function yr(){let{router:e}=dr(`useNavigate`),t=mr(`useNavigate`),n=N.useRef(!1);return N.useLayoutEffect(()=>{n.current=!0}),N.useCallback(async(r,i={})=>{T(n.current,Yn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var br={};function xr(e,t,n){!t&&!br[e]&&(br[e]=!0,T(!1,n))}var Sr={};function Cr(e,t){!e&&!Sr[t]&&(Sr[t]=!0,console.warn(t))}var wr=[`HydrateFallback`,`hydrateFallbackElement`],Tr=class{status=`pending`;promise;resolve;reject;constructor(){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 Er({router:e,flushSync:t,onError:n,useTransitions:r}){r=Nn()||r;let[i,a]=N.useState(e.state),[o,s]=(0,N.useOptimistic)(i),[c,l]=N.useState(),[u,d]=N.useState({isTransitioning:!1}),[f,p]=N.useState(),[m,h]=N.useState(),[g,_]=N.useState(),v=N.useRef(new Map),y=N.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:We(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),Cr(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Cr(g==null||y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!g||!y){t&&u?t(()=>a(i)):r===!1?a(i):N.startTransition(()=>{r===!0&&s(e=>Dr(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n));return}m?(f?.resolve(),m.skipTransition(),_({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);N.useLayoutEffect(()=>e.subscribe(y),[e,y]),N.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new Tr)},[u]),N.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):N.startTransition(()=>{r===!0&&s(e=>Dr(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]),N.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),N.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),_(void 0))},[u.isTransitioning,g]);let b=N.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]),x=e.basename||`/`,S=N.useMemo(()=>({router:e,navigator:b,static:!1,basename:x,onError:n}),[e,b,x,n]);return N.createElement(N.Fragment,null,N.createElement(An.Provider,{value:S},N.createElement(jn.Provider,{value:o},N.createElement(Fn.Provider,{value:v.current},N.createElement(Pn.Provider,{value:u},N.createElement(Mr,{basename:x,location:o.location,navigationType:o.historyAction,navigator:b,useTransitions:r},N.createElement(Or,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function Dr(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 Or=N.memo(kr);function kr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return nr(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Ar({to:e,replace:t,state:n,relative:r}){w(qn(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=N.useContext(Ln);T(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=N.useContext(zn),{pathname:o}=Jn(),s=Xn(),c=Pe(e,Ne(a),o,r===`path`),l=JSON.stringify(c);return N.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function jr(e){return $n(e.context)}function Mr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){w(!qn(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=N.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=A(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=N.useMemo(()=>{let e=Ee(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return T(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:N.createElement(Ln.Provider,{value:c},N.createElement(Rn.Provider,{children:t,value:h}))}N.Component;var Nr=`application/x-www-form-urlencoded`;function Pr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Fr(e){return Pr(e)&&e.tagName.toLowerCase()===`button`}function Ir(e){return Pr(e)&&e.tagName.toLowerCase()===`form`}function Lr(e){return Pr(e)&&e.tagName.toLowerCase()===`input`}function Rr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function zr(e,t){return e.button===0&&(!t||t===`_self`)&&!Rr(e)}function Br(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Vr(e,t){let n=Br(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Hr=null;function Ur(){if(Hr===null)try{new FormData(document.createElement(`form`),0),Hr=!1}catch{Hr=!0}return Hr}var Wr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Gr(e){return e!=null&&!Wr.has(e)?(T(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Nr}"`),null):e}function Kr(e,t){let n,r,i,a,o;if(Ir(e)){let o=e.getAttribute(`action`);r=o?Ee(o,t):null,n=e.getAttribute(`method`)||`get`,i=Gr(e.getAttribute(`enctype`))||Nr,a=new FormData(e)}else if(Fr(e)||Lr(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?Ee(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=Gr(e.getAttribute(`formenctype`))||Gr(o.getAttribute(`enctype`))||Nr,a=new FormData(o,e),!Ur()){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(Pr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=Nr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}var qr={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Jr=/[&><\u2028\u2029]/g;function Yr(e){return e.replace(Jr,e=>qr[e])}function Xr(e,t){if(e===!1||e==null)throw Error(t)}var Zr=`modulepreload`,Qr=function(e){return`/`+e},$r={},ei=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}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=Qr(t,n),t=s(t),t in $r)return;$r[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Zr,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.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)})};async function ti(e,t){if(e.id in t)return t[e.id];try{let n=await ei(()=>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 ni(e){return e!=null&&typeof e.page==`string`}function ri(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 ii(e,t,n){return li((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await ti(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(ri).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function ai(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 oi(e,t,{includeHydrateFallback:n}={}){return si(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 si(e){return[...new Set(e)]}function ci(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function li(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!ni(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(ci(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function ui(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname.endsWith(`/`)?n.pathname=`${n.pathname}_.${t}`:n.pathname=`${n.pathname}.${t}`,n}function di(){let e=N.useContext(An);return Xr(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function fi(){let e=N.useContext(jn);return Xr(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var pi=N.createContext(void 0);pi.displayName=`FrameworkContext`;function mi(){let e=N.useContext(pi);return Xr(e,`You must render this element inside a <HydratedRouter> element`),e}function hi(e,t){let n=N.useContext(pi),[r,i]=N.useState(!1),[a,o]=N.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=N.useRef(null);N.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]),N.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:gi(s,p),onBlur:gi(c,m),onMouseEnter:gi(l,p),onMouseLeave:gi(u,m),onTouchStart:gi(d,p)}]:[a,f,{}]:[!1,f,{}]}function gi(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function _i({page:e,...t}){let n=Nn(),{nonce:r}=mi(),{router:i}=di(),a=N.useMemo(()=>ae(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?N.createElement(yi,{page:e,matches:a,...t}):N.createElement(bi,{page:e,matches:a,...t})):null}function vi(e){let{manifest:t,routeModules:n}=mi(),[r,i]=N.useState([]);return N.useEffect(()=>{let r=!1;return ii(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function yi({page:e,matches:t,...n}){let r=Jn(),i=N.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=ui(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return N.createElement(N.Fragment,null,i.map(e=>N.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function bi({page:e,matches:t,...n}){let r=Jn(),{manifest:i,routeModules:a}=mi(),{loaderData:o,matches:s}=fi(),c=N.useMemo(()=>ai(e,t,s,i,r,`data`),[e,t,s,i,r]),l=N.useMemo(()=>ai(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=N.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=ui(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=N.useMemo(()=>oi(l,i),[l,i]),f=vi(l);return N.createElement(N.Fragment,null,u.map(e=>N.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>N.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>N.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function xi(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Si=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Si&&(window.__reactRouterVersion=`8.0.1`)}catch{}function Ci(e,t){return mt({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:C({window:t?.window}),hydrationData:t?.hydrationData||wi(),routes:e,mapRouteProperties:re,hydrationRouteProperties:wr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function wi(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Ti(e.errors)}),e}function Ti(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 He(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&Ve.includes(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 Ei({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=N.useState({action:n.action,location:n.location}),o=N.useCallback(e=>{r===!1?a(e):N.startTransition(()=>a(e))},[r]);return N.useLayoutEffect(()=>n.listen(o),[n,o]),N.createElement(Mr,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}Ei.displayName=`unstable_HistoryRouter`;var Di=N.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=N.useContext(Ln),y=typeof l==`string`&&v.test(l),b=Ke(l,h);l=b.to;let x=Kn(l,{relative:r}),S=Jn(),C=null;if(o){let e=Pe(o,[],S.mask?S.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Ie([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=hi(n,p),D=Pi(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=N.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:xi(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?N.createElement(N.Fragment,null,A,N.createElement(_i,{page:x})):A});Di.displayName=`Link`;var Oi=N.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=tr(a,{relative:c.relative}),d=Jn(),f=N.useContext(jn),{navigator:p,basename:m}=N.useContext(Ln),h=f!=null&&Gi(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=Ee(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return N.createElement(Di,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Oi.displayName=`NavLink`;var ki=N.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=N.useContext(Ln),g=Ri(),_=zi(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&v.test(s);return N.createElement(`form`,{ref:m,method:y,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?N.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});ki.displayName=`Form`;function Ai({getKey:e,storageKey:t,...n}){let r=N.useContext(pi),{basename:i}=N.useContext(Ln),a=Jn(),o=_r();Ui({getKey:e,storageKey:t});let s=N.useMemo(()=>{if(!r||!e)return null;let t=Hi(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 n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),N.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Yr(JSON.stringify(t||Bi))}, ${Yr(JSON.stringify(s))})`}})}Ai.displayName=`ScrollRestoration`;function ji(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mi(e){let t=N.useContext(An);return w(t,ji(e)),t}function Ni(e){let t=N.useContext(jn);return w(t,ji(e)),t}function Pi(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=Xn(),d=Jn(),f=tr(e,{relative:o});return N.useCallback(p=>{if(zr(p,t)){p.preventDefault();let t=n===void 0?k(d)===k(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?N.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Fi(e){T(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=N.useRef(Br(e)),n=N.useRef(!1),r=Jn(),i=N.useMemo(()=>Vr(r.search,n.current?null:t.current),[r.search]),a=Xn();return[i,N.useCallback((e,t)=>{let r=Br(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Ii=0,Li=()=>`__${String(++Ii)}__`;function Ri(){let{router:e}=Mi(`useSubmit`),{basename:t}=N.useContext(Ln),n=hr(),r=e.fetch,i=e.navigate;return N.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Kr(e,t);a.navigate===!1?await r(a.fetcherKey||Li(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.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 zi(e,{relative:t}={}){let{basename:n}=N.useContext(Ln),r=N.useContext(zn);w(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...tr(e||`.`,{relative:t})},o=Jn();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:Ie([n,a.pathname])),k(a)}var Bi=`react-router-scroll-positions`,Vi={};function Hi(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:Ee(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Ui({getKey:e,storageKey:t}={}){let{router:n}=Mi(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Ni(`useScrollRestoration`),{basename:a}=N.useContext(Ln),o=Jn(),s=_r(),c=gr();N.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Wi(N.useCallback(()=>{if(c.state===`idle`){let t=Hi(o,s,a,e);Vi[t]=window.scrollY}try{sessionStorage.setItem(t||Bi,JSON.stringify(Vi))}catch(e){T(!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`&&(N.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Bi);e&&(Vi=JSON.parse(e))}catch{}},[t]),N.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Vi,()=>window.scrollY,e?(t,n)=>Hi(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),N.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{T(!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 Wi(e,t){let{capture:n}=t||{};N.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Gi(e,{relative:t}={}){let n=N.useContext(Pn);w(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Mi(`useViewTransitionState`),i=tr(e,{relative:t});if(!n.isTransitioning)return!1;let a=Ee(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Ee(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Se(i.pathname,o)!=null||Se(i.pathname,a)!=null}var Ki=l(_(),1),qi={dockerDismissed:`codecommit-docker-dismissed`,grantedDismissed:`codecommit-granted-dismissed`,theme:`codecommit-theme`,desktopNotifications:`codecommit:desktopNotifications`,reminders:`codecommit:reminders`,reminderInterval:`codecommit:reminderInterval`},Ji=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),R=o(((e,t)=>{t.exports=Ji()}))(),Yi=(0,N.createContext)({theme:`system`,setTheme:()=>{}}),Xi=()=>{let e=localStorage.getItem(qi.theme);return e===`dark`||e===`light`||e===`system`?e:`system`};function Zi({children:e}){let[t,n]=(0,N.useState)(Xi),r=(0,N.useCallback)(e=>{localStorage.setItem(qi.theme,e),n(e)},[]);return(0,N.useEffect)(()=>{let e=document.documentElement,n=t===`system`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:t;e.classList.remove(`dark`,`light`),e.classList.add(n)},[t]),(0,N.useEffect)(()=>{if(t!==`system`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>{let t=document.documentElement;t.classList.remove(`dark`,`light`),t.classList.add(e.matches?`dark`:`light`)};return e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[t]),(0,R.jsx)(Yi,{value:{theme:t,setTheme:r},children:e})}function Qi(){return(0,N.useContext)(Yi)}var $i=l(h(),1),ea=(e,t)=>{switch(t.length){case 0:return e;case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let n=e;for(let e=0,r=t.length;e<r;e++)n=t[e](n);return n}}},ta={pipe(){return ea(this,arguments)}},na=function(){function e(){}return e.prototype=ta,e}(),z=function(e,t){if(typeof e==`function`)return function(){return e(arguments)?t.apply(this,arguments):e=>t(e,...arguments)};switch(e){case 0:case 1:throw RangeError(`Invalid arity ${e}`);case 2:return function(e,n){return arguments.length>=2?t(e,n):function(n){return t(n,e)}};case 3:return function(e,n,r){return arguments.length>=3?t(e,n,r):function(r){return t(r,e,n)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);let n=arguments;return function(e){return t(e,...n)}}}},ra=e=>e,ia=e=>()=>e,aa=ia(!0),oa=ia(!1),sa=ia(null),ca=ia(void 0),la=ca;function ua(e,...t){return ea(e,t)}function da(e,t,n,r,i,a,o,s,c){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return a(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return o(a(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return s(o(a(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return c(s(o(a(i(r(n(t(e.apply(this,arguments)))))))))}}}function fa(e){let t=new WeakMap;return n=>{if(t.has(n))return t.get(n);let r=e(n);return t.set(n,r),r}}var pa=e=>{let t=new Set(Reflect.ownKeys(e));if(e.constructor===Object)return t;e instanceof Error&&t.delete(`stack`);let n=Object.getPrototypeOf(e),r=n;for(;r!==null&&r!==Object.prototype;){let e=Reflect.ownKeys(r);for(let n=0;n<e.length;n++)t.add(e[n]);r=Object.getPrototypeOf(r)}return t.has(`constructor`)&&typeof e.constructor==`function`&&n===e.constructor.prototype&&t.delete(`constructor`),t},ma=new WeakSet;function ha(e){return typeof e==`string`}function ga(e){return typeof e==`number`}function _a(e){return typeof e==`boolean`}function va(e){return typeof e==`symbol`}function ya(e){return ha(e)||ga(e)||va(e)}function ba(e){return typeof e==`function`}function xa(e){return e!==void 0}function Sa(e){return e!=null}function Ca(e){return!1}function wa(e){return!0}function Ta(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ea(e){return typeof e==`object`&&!!e||ba(e)}var Da=z(2,(e,t)=>Ea(e)&&t in e),Oa=z(2,(e,t)=>Da(e,`_tag`)&&e._tag===t);function ka(e){return e instanceof Error}var Aa=`~effect/interfaces/Hash`,ja=e=>{switch(typeof e){case`number`:return Ia(e);case`bigint`:return La(e.toString(10));case`boolean`:return La(String(e));case`symbol`:return La(String(e));case`string`:return La(e);case`undefined`:return La(`undefined`);case`function`:case`object`:if(e===null)return La(`null`);if(e instanceof Date)return La(e.toISOString());if(e instanceof RegExp)return La(e.toString());{if(ma.has(e))return Ma(e);if(Ga.has(e))return Ga.get(e);let t=qa(e,()=>Fa(e)?e[Aa]():typeof e==`function`?Ma(e):Array.isArray(e)||ArrayBuffer.isView(e)?Va(e):e instanceof Map?Ha(e):e instanceof Set?Ua(e):za(e));return Ga.set(e,t),t}default:throw Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},Ma=e=>(Wa.has(e)||Wa.set(e,Ia(Math.floor(Math.random()*(2**53-1)))),Wa.get(e)),Na=z(2,(e,t)=>e*53^t),Pa=e=>e&3221225471|e>>>1&1073741824,Fa=e=>Da(e,Aa),Ia=e=>{if(e!==e)return La(`NaN`);if(e===1/0)return La(`Infinity`);if(e===-1/0)return La(`-Infinity`);let t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)t^=e/=4294967295;return Pa(t)},La=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return Pa(t)},Ra=(e,t)=>{let n=12289;for(let r of t)n^=Na(ja(r),ja(e[r]));return Pa(n)},za=e=>Ra(e,pa(e)),Ba=(e,t)=>n=>{let r=e;for(let e of n)r^=t(e);return Pa(r)},Va=Ba(6151,ja),Ha=Ba(La(`Map`),([e,t])=>Na(ja(e),ja(t))),Ua=Ba(La(`Set`),ja),Wa=new WeakMap,Ga=new WeakMap,Ka=new WeakSet;function qa(e,t){if(Ka.has(e))return La(`[Circular]`);Ka.add(e);let n=t();return Ka.delete(e),n}var Ja=`~effect/interfaces/Equal`;function Ya(){return arguments.length===1?e=>Xa(e,arguments[0]):Xa(arguments[0],arguments[1])}function Xa(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let n=typeof e;return n===typeof t?n===`number`&&e!==e&&t!==t?!0:n!==`object`&&n!==`function`||ma.has(e)||ma.has(t)?!1:to(e,t,eo):!1}function Za(e,t,n){let r=Qa.has(e),i=$a.has(t);if(r&&i)return!0;if(r||i)return!1;Qa.add(e),$a.add(t);let a=n();return Qa.delete(e),$a.delete(t),a}var Qa=new WeakSet,$a=new WeakSet;function eo(e,t){if(ja(e)!==ja(t))return!1;if(e instanceof Date)return t instanceof Date?e.toISOString()===t.toISOString():!1;if(e instanceof RegExp)return t instanceof RegExp?e.toString()===t.toString():!1;let n=uo(e),r=uo(t);if(n!==r)return!1;let i=n&&r;return typeof e==`function`&&!i?!1:Za(e,t,()=>i?e[Ja](t):Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:ro(e,t):ArrayBuffer.isView(e)?!ArrayBuffer.isView(t)||e.byteLength!==t.byteLength?!1:io(e,t):e instanceof Map?!(t instanceof Map)||e.size!==t.size?!1:so(e,t):e instanceof Set?!(t instanceof Set)||e.size!==t.size?!1:lo(e,t):ao(e,t))}function to(e,t,n){let r=no.get(e);if(!r)r=new WeakMap,no.set(e,r);else if(r.has(t))return r.get(t);let i=n(e,t);r.set(t,i);let a=no.get(t);return a||(a=new WeakMap,no.set(t,a)),a.set(e,i),i}var no=new WeakMap;function ro(e,t){for(let n=0;n<e.length;n++)if(!Xa(e[n],t[n]))return!1;return!0}function io(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function ao(e,t){let n=pa(e),r=pa(t);if(n.size!==r.size)return!1;for(let i of n)if(!r.has(i)||!Xa(e[i],t[i]))return!1;return!0}function oo(e,t){return function(n,r){for(let[i,a]of n){let n=!1;for(let[o,s]of r)if(e(i,o)&&t(a,s)){n=!0;break}if(!n)return!1}return!0}}var so=oo(Xa,Xa);function co(e){return function(t,n){for(let r of t){let t=!1;for(let i of n)if(e(r,i)){t=!0;break}if(!t)return!1}return!0}}var lo=co(Xa),uo=e=>Da(e,Ja),fo=()=>Ya,po=Symbol.for(`~effect/Redactable`),mo=e=>Da(e,po);function ho(e){return mo(e)?go(e):e}function go(e){return e[po](globalThis[`~effect/Fiber/currentFiber`]?.context??vo)}var _o=`~effect/Fiber/currentFiber`,vo={"~effect/Context":{},mapUnsafe:new Map,pipe(){return ea(this,arguments)}};function yo(e,t){let n=t?.space??0,r=new WeakSet,i=n?typeof n==`number`?` `.repeat(n):n:``,a=e=>i.repeat(e),o=(e,t)=>{let n=e?.constructor;return n&&n!==Object.prototype.constructor&&n.name?`${n.name}(${t})`:t},s=e=>{try{return Reflect.ownKeys(e)}catch{return[`[ownKeys threw]`]}};function c(e,n=0){if(Array.isArray(e)){if(r.has(e))return bo;if(r.add(e),!i||e.length<=1)return`[${e.map(e=>c(e,n)).join(`,`)}]`;let t=e.map(e=>c(e,n+1)).join(`,
|
|
10
|
-
`+a(n+1));return`[\n${a(n+1)}${t}\n${a(n)}]`}if(e instanceof Date)return Co(e);if(!t?.ignoreToString&&Da(e,`toString`)&&typeof e.toString==`function`&&e.toString!==Object.prototype.toString&&e.toString!==Array.prototype.toString){let t=wo(e);return e instanceof Error&&e.cause?`${t} (cause: ${c(e.cause,n)})`:t}if(typeof e==`string`)return JSON.stringify(e);if(typeof e==`number`||e==null||typeof e==`boolean`||typeof e==`symbol`)return String(e);if(typeof e==`bigint`)return String(e)+`n`;if(typeof e==`object`||typeof e==`function`){if(r.has(e))return bo;if(r.add(e),po in e)return yo(go(e));if(Symbol.iterator in e)return`${e.constructor.name}(${c(Array.from(e),n)})`;let t=s(e);return!i||t.length<=1?o(e,`{${t.map(t=>`${xo(t)}:${c(e[t],n)}`).join(`,`)}}`):o(e,`{\n${t.map(t=>`${a(n+1)}${xo(t)}: ${c(e[t],n+1)}`).join(`,
|
|
11
|
-
`)}\n${a(n)}}`)}return String(e)}return c(e,0)}var bo=`[Circular]`;function xo(e){return typeof e==`string`?JSON.stringify(e):String(e)}function So(e){return e.map(e=>`[${xo(e)}]`).join(``)}function Co(e){try{return e.toISOString()}catch{return`Invalid Date`}}function wo(e){try{let t=e.toString();return typeof t==`string`?t:String(t)}catch{return`[toString threw]`}}function To(e,t){let n=[];return JSON.stringify(e,function(e,t){let r=ho(t);if(typeof r!=`object`||!r)return r;for(;n.length>0&&n[n.length-1]!==this;)n.pop();if(!n.includes(r))return n.push(r),r},t?.space)}var Eo=Symbol.for(`nodejs.util.inspect.custom`),Do=e=>{try{if(Da(e,`toJSON`)&&ba(e.toJSON)&&e.toJSON.length===0)return e.toJSON();if(Array.isArray(e))return e.map(Do)}catch{return`[toJSON threw]`}return ho(e)},Oo={toJSON(){return Do(this)},[Eo](){return this.toJSON()},toString(){return yo(this.toJSON())}},ko=class{[Eo](){return this.toJSON()}toString(){return yo(this.toJSON())}},Ao=class e{called=!1;self;constructor(e){this.self=e}next(e){return this.called?{value:e,done:!0}:(this.called=!0,{value:this.self,done:!1})}[Symbol.iterator](){return new e(this.self)}},jo=(()=>{let e=`~effect/Utils/internal`,t={[e]:e=>e()},n={[e]:e=>{try{return e()}finally{}}};return t[e](()=>Error().stack)?.includes(e)===!0?t[e]:n[e]})(),Mo=`~effect/Effect`,No=`~effect/Exit`,Po={_A:ra,_E:ra,_R:ra},Fo=`${Mo}/identifier`,Io=`${Mo}/args`,Lo=`${Mo}/evaluate`,Ro=`${Mo}/successCont`,zo=`${Mo}/failureCont`,Bo=`${Mo}/ensureCont`,Vo=Symbol.for(`effect/Effect/Yield`),Ho={pipe(){return ea(this,arguments)},toJSON(){return{...this}},toString(){return yo(this.toJSON(),{ignoreToString:!0,space:2})},[Eo](){return this.toJSON()}},Uo={[Mo]:Po,...Ho,[Symbol.iterator](){return new Ao(this)},toJSON(){return{_id:`Effect`,op:this[Fo],...Io in this?{args:this[Io]}:void 0}}},Wo=e=>Da(e,Mo),Go=e=>Da(e,No),Ko=`~effect/Cause`,qo=`~effect/Cause/Reason`,Jo=e=>Da(e,Ko),Yo=e=>Da(e,qo),Xo=class{[Ko];reasons;constructor(e){this[Ko]=Ko,this.reasons=e}pipe(){return ea(this,arguments)}toJSON(){return{_id:`Cause`,failures:this.reasons.map(e=>e.toJSON())}}toString(){return`Cause(${yo(this.reasons)})`}[Eo](){return this.toJSON()}[Ja](e){return Jo(e)&&this.reasons.length===e.reasons.length&&this.reasons.every((t,n)=>Ya(t,e.reasons[n]))}[Aa](){return Va(this.reasons)}},Zo=new WeakMap,Qo=class{[qo];annotations;_tag;constructor(e,t,n){if(this[qo]=qo,this._tag=e,t!==$o&&typeof n==`object`&&n&&t.size>0){let e=Zo.get(n);e&&(t=new Map([...e,...t])),Zo.set(n,t)}this.annotations=t}annotate(e,t){if(e.mapUnsafe.size===0)return this;let n=new Map(this.annotations);e.mapUnsafe.forEach((e,r)=>{t?.overwrite!==!0&&n.has(r)||n.set(r,e)});let r=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return r.annotations=n,r}pipe(){return ea(this,arguments)}toString(){return yo(this)}[Eo](){return this.toString()}},$o=new Map,es=class extends Qo{error;constructor(e,t=$o){super(`Fail`,t,e),this.error=e}toString(){return`Fail(${yo(this.error)})`}toJSON(){return{_tag:`Fail`,error:this.error}}[Ja](e){return ss(e)&&Ya(this.error,e.error)&&Ya(this.annotations,e.annotations)}[Aa](){return Na(La(this._tag))(Na(ja(this.error))(ja(this.annotations)))}},ts=e=>new Xo(e),ns=new Xo([]),rs=e=>new Xo([new es(e)]),is=class extends Qo{defect;constructor(e,t=$o){super(`Die`,t,e),this.defect=e}toString(){return`Die(${yo(this.defect)})`}toJSON(){return{_tag:`Die`,defect:this.defect}}[Ja](e){return cs(e)&&Ya(this.defect,e.defect)&&Ya(this.annotations,e.annotations)}[Aa](){return Na(La(this._tag))(Na(ja(this.defect))(ja(this.annotations)))}},as=e=>new Xo([new is(e)]),os=z(e=>Jo(e[0]),(e,t,n)=>t.mapUnsafe.size===0?e:new Xo(e.reasons.map(e=>e.annotate(t,n)))),ss=e=>e._tag===`Fail`,cs=e=>e._tag===`Die`,ls=e=>e._tag===`Interrupt`;function us(e){return vs(`Effect.evaluate: Not implemented`)}var ds=e=>({...Uo,[Fo]:e.op,[Lo]:e[Lo]??us,[Ro]:e[Ro],[zo]:e[zo],[Bo]:e[Bo]}),fs=e=>{let t=ds(e);return function(){let n=Object.create(t);return n[Io]=e.single===!1?arguments:arguments[0],n}},ps=e=>{let t={...ds(e),[No]:No,_tag:e.op,get[e.prop](){return this[Io]},toString(){return`${e.op}(${yo(this[Io])})`},toJSON(){return{_id:`Exit`,_tag:e.op,[e.prop]:this[Io]}},[Ja](e){return Go(e)&&e._tag===this._tag&&Ya(this[Io],e[Io])},[Aa](){return Na(La(e.op),ja(this[Io]))}};return function(e){let n=Object.create(t);return n[Io]=e,n}},ms=ps({op:`Success`,prop:`value`,[Lo](e){let t=e.getCont(Ro);return t?t[Ro](this[Io],e,this):e.yieldWith(this)}}),hs={key:`effect/Cause/StackTrace`},gs=ps({op:`Failure`,prop:`cause`,[Lo](e){let t=this[Io],n=!1;e.currentStackFrame&&(t=os(t,{mapUnsafe:new Map([[hs.key,e.currentStackFrame]])}),n=!0);let r=e.getCont(zo);for(;e.interruptible&&e._interruptedCause&&r;)r=e.getCont(zo);return r?r[zo](t,e,n?void 0:this):e.yieldWith(n?this:gs(t))}}),_s=e=>gs(rs(e)),vs=e=>gs(as(e)),ys=fs({op:`WithFiber`,[Lo](e){return this[Io](e)}}),bs=function(){class e extends globalThis.Error{}let t=ds({op:`YieldableError`,[Lo](){return _s(this)}});return delete t.toString,Object.assign(e.prototype,t),e}(),xs=function(){let e=Symbol.for(`effect/Data/Error/plainArgs`);return class extends bs{constructor(t){super(t?.message,t?.cause?{cause:t.cause}:void 0),t&&(Object.assign(this,t),Object.defineProperty(this,e,{value:t,enumerable:!1}))}toJSON(){return{...this[e],...this}}}}(),Ss=e=>{class t extends xs{_tag=e}return t.prototype.name=e,t},Cs=`~effect/Cause/NoSuchElementError`,ws=class extends Ss(`NoSuchElementError`){[Cs]=Cs;constructor(e){super({message:e})}},Ts=`~effect/Cause/Done`,Es=e=>Da(e,Ts),Ds={[Ts]:Ts,_tag:`Done`,value:void 0},Os=e=>e===void 0?Ds:{[Ts]:Ts,_tag:`Done`,value:e},ks=_s(Ds),As=e=>e===void 0?ks:_s(Os(e)),js=e=>ds({op:e.label,[Lo]:e.evaluate}),Ms=Object.getOwnPropertyDescriptor,Ns=Object.prototype.hasOwnProperty,Ps=Object.isExtensible,Fs=(()=>{let e=Ms(Error,`stackTraceLimit`);return e===void 0?Ps(Error):Ns.call(e,`writable`)?e.writable===!0:e.set!==void 0})(),Is=()=>Error.stackTraceLimit,Ls=e=>{Fs&&(Error.stackTraceLimit=e)},Rs=e=>(t,n)=>t===n||e(t,n),zs=(e,t)=>e===t,Bs=()=>zs;function Vs(e){return Rs((t,n)=>{if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e[r](t[r],n[r]))return!1;return!0})}function Hs(e){return Rs((t,n)=>{if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1;return!0})}var Us=`~effect/data/Option`,Ws={[Us]:{_A:e=>e},...Ho,[Symbol.iterator](){return new Ao(this)}},Gs=Object.defineProperty(Object.assign(Object.create(Ws),{_tag:`Some`,_op:`Some`,[Ja](e){return Js(e)&&Xs(e)&&Ya(this.value,e.value)},[Aa](){return Na(ja(this._tag))(ja(this.value))},toString(){return`some(${yo(this.value)})`},toJSON(){return{_id:`Option`,_tag:this._tag,value:Do(this.value)}}}),"valueOrUndefined",{get(){return this.value}}),Ks=ja(`None`),qs=Object.assign(Object.create(Ws),{_tag:`None`,_op:`None`,valueOrUndefined:void 0,[Ja](e){return Js(e)&&Ys(e)},[Aa](){return Ks},toString(){return`none()`},toJSON(){return{_id:`Option`,_tag:this._tag}}}),Js=e=>Da(e,Us),Ys=e=>e._tag===`None`,Xs=e=>e._tag===`Some`,Zs=Object.create(qs),Qs=e=>{let t=Object.create(Gs);return t.value=e,t},$s=`~effect/data/Result`,ec={[$s]:{_A:e=>e,_E:e=>e},...Ho,[Symbol.iterator](){return new Ao(this)}},tc=Object.assign(Object.create(ec),{_tag:`Success`,_op:`Success`,[Ja](e){return rc(e)&&ac(e)&&Ya(this.success,e.success)},[Aa](){return Na(ja(this._tag))(ja(this.success))},toString(){return`success(${yo(this.success)})`},toJSON(){return{_id:`Result`,_tag:this._tag,value:Do(this.success)}}}),nc=Object.assign(Object.create(ec),{_tag:`Failure`,_op:`Failure`,[Ja](e){return rc(e)&&ic(e)&&Ya(this.failure,e.failure)},[Aa](){return Na(ja(this._tag))(ja(this.failure))},toString(){return`failure(${yo(this.failure)})`},toJSON(){return{_id:`Result`,_tag:this._tag,failure:Do(this.failure)}}}),rc=e=>Da(e,$s),ic=e=>e._tag===`Failure`,ac=e=>e._tag===`Success`,oc=e=>{let t=Object.create(nc);return t.failure=e,t},sc=e=>{let t=Object.create(tc);return t.success=e,t};function cc(e){return(t,n)=>t===n?0:e(t,n)}var lc=cc((e,t)=>globalThis.Number.isNaN(e)&&globalThis.Number.isNaN(t)?0:globalThis.Number.isNaN(e)?-1:globalThis.Number.isNaN(t)?1:e<t?-1:1),uc=z(2,(e,t)=>cc((n,r)=>e(t(n),t(r)))),dc=uc(lc,e=>e.getTime()),fc=e=>z(2,(t,n)=>e(t,n)===-1),pc=e=>z(2,(t,n)=>e(t,n)===1),mc=e=>z(2,(t,n)=>e(t,n)!==1),hc=e=>z(2,(t,n)=>e(t,n)!==-1),gc=()=>Zs,B=Qs,_c=Js,vc=Ys,yc=Xs,bc=z(2,(e,{onNone:t,onSome:n})=>vc(e)?t():n(e.value)),xc=z(2,(e,t)=>vc(e)?t():e.value),Sc=z(2,(e,t)=>vc(e)?t():e),Cc=e=>e==null?gc():B(e),wc=xc(sa),Tc=xc(ca),Ec=z(2,(e,t)=>{if(yc(e))return e.value;throw t()}),Dc=z(2,(e,t)=>vc(e)?gc():B(t(e.value))),Oc=z(2,(e,t)=>vc(e)?gc():t(e.value)),kc=z(2,(e,t)=>vc(e)?gc():Cc(t(e.value))),Ac=z(2,(e,t)=>vc(e)?gc():t(e.value)?B(e.value):gc()),jc=e=>Rs((t,n)=>vc(t)?vc(n):vc(n)?!1:e(t.value,n.value)),Mc=`~effect/Context/Service`,Nc=function(){let e=Is();Ls(2);let t=Error();Ls(e);function n(){}let r=n;return Object.setPrototypeOf(r,Pc),Object.defineProperty(r,"stack",{get(){return t.stack}}),arguments.length>0?(r.key=arguments[0],arguments[1]?.defaultValue&&(r[Fc]=Fc,r.defaultValue=arguments[1].defaultValue),r):function(e,t){return r.key=e,t?.make&&(r.make=t.make),r}},Pc={[Mc]:Mc,...js({label:`Service`,evaluate(e){return ms(qc(e.context,this))}}),toJSON(){return{_id:`Service`,key:this.key,stack:this.stack}},of(e){return e},context(e){return Uc(this,e)},use(e){return ys(t=>e(qc(t.context,this)))},useSync(e){return ys(t=>ms(e(qc(t.context,this))))}},Fc=`~effect/Context/Reference`,Ic=`~effect/Context`,Lc=e=>{let t=Object.create(Rc);return t.mapUnsafe=e,t.mutable=!1,t},Rc={...Ho,[Ic]:{_Services:e=>e},toJSON(){return{_id:`Context`,services:Array.from(this.mapUnsafe).map(([e,t])=>({key:e,value:t}))}},[Ja](e){if(!zc(e)||this.mapUnsafe.size!==e.mapUnsafe.size)return!1;for(let t of this.mapUnsafe.keys())if(!e.mapUnsafe.has(t)||!Ya(this.mapUnsafe.get(t),e.mapUnsafe.get(t)))return!1;return!0},[Aa](){return Ia(this.mapUnsafe.size)}},zc=e=>Da(e,Ic),Bc=e=>Da(e,Fc),Vc=()=>Hc,Hc=Lc(new Map),Uc=(e,t)=>Lc(new Map([[e.key,t]])),Wc=z(3,(e,t,n)=>el(e,e=>{e.set(t.key,n)})),Gc=z(3,(e,t,n)=>e.mapUnsafe.has(t.key)?e.mapUnsafe.get(t.key):Bc(t)?Xc(t):n()),Kc=z(2,(e,t)=>{if(!e.mapUnsafe.has(t.key)){if(Fc in t)return Xc(t);throw Zc(t)}return e.mapUnsafe.get(t.key)}),qc=Kc,Jc=(e,t)=>e.mapUnsafe.has(t.key)?e.mapUnsafe.get(t.key):Xc(t),Yc=`~effect/Context/defaultValue`,Xc=e=>Yc in e?e[Yc]:e[Yc]=e.defaultValue(),Zc=e=>{let t=Error(`Service not found${e.key?`: ${String(e.key)}`:``}`);if(e.stack){let n=e.stack.split(`
|
|
12
|
-
`);if(n.length>2){let e=n[2].match(/at (.*)/);e&&(t.message+=` (defined at ${e[1]})`)}}if(t.stack){let e=t.stack.split(`
|
|
13
|
-
`);e.splice(1,3),t.stack=e.join(`
|
|
14
|
-
`)}return t},Qc=z(2,(e,t)=>e.mapUnsafe.size===0?t:t.mapUnsafe.size===0?e:el(e,e=>{t.mapUnsafe.forEach((t,n)=>e.set(n,t))})),$c=(...e)=>{let t=new Map;for(let n=0;n<e.length;n++)e[n].mapUnsafe.forEach((e,n)=>{t.set(n,e)});return Lc(t)},el=(e,t)=>{if(e.mutable)return t(e.mapUnsafe),e;let n=new Map(e.mapUnsafe);return t(n),Lc(n)},tl=Nc,nl=e=>e.length>0,rl=sc,il=oc,al=rc,ol=ic,sl=ac,cl=z(2,(e,{onFailure:t,onSuccess:n})=>ol(e)?t(e.failure):n(e.success)),ll=Vs,ul=()=>({}),dl=z(2,(e,t)=>Object.hasOwn(e,t)),fl=z(2,(e,t)=>{let n={...e};for(let r of pl(e))n[r]=t(e[r],r);return n}),pl=e=>Object.keys(e),ml=e=>z(2,(t,n)=>{for(let r of pl(t))if(!dl(n,r)||!e(t[r],n[r]))return!1;return!0}),hl=e=>{let t=ml(e);return(e,n)=>t(e,n)&&t(n,e)},gl=globalThis.Array,_l=e=>gl.isArray(e)?e:gl.from(e),vl=e=>gl.isArray(e)?e:[e],yl=z(2,(e,t)=>[...e,t]),bl=z(2,(e,t)=>_l(e).concat(_l(t)));gl.isArray;var xl=nl,Sl=nl;function Cl(e,t){return e<0||e>=t.length}var wl=z(2,(e,t)=>{let n=Math.floor(t);if(Cl(n,e))throw Error(`Index out of bounds: ${n}`);return e[n]})(0),Tl=e=>e[e.length-1],El=e=>e.slice(1),Dl=z(3,(e,t,n)=>{let r=_l(e),i=_l(t);return Sl(r)?Sl(i)?Nl(n)(bl(r,i)):r:i}),Ol=z(2,(e,t)=>Dl(e,t,fo())),kl=()=>[],Al=e=>[e],jl=z(2,(e,t)=>e.map(t)),Ml=Hs,Nl=z(2,(e,t)=>{let n=_l(e);if(Sl(n)){let e=[wl(n)],r=El(n);for(let n of r)e.every(e=>!t(n,e))&&e.push(n);return e}return[]}),Pl=`~effect/time/Duration`,Fl=BigInt(0),Il=BigInt(1),Ll=BigInt(1e3),Rl=e=>BigInt(e<0?Math.ceil(e-.5):Math.floor(e+.5)),zl=e=>Rl(e*1e6),Bl=(e,t)=>e.includes(`.`)?Rl(Number(e)*Number(t)):BigInt(e)*t,Vl=/^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/,Hl=e=>{switch(typeof e){case`number`:return tu(e);case`bigint`:return eu(e);case`string`:{if(e===`Infinity`)return Ql;if(e===`-Infinity`)return $l;let t=Vl.exec(e);if(!t)break;let[n,r,i]=t;if(i===`nano`||i===`nanos`)return eu(Bl(r,Il));if(i===`micro`||i===`micros`)return eu(Bl(r,Ll));let a=Number(r);switch(i){case`milli`:case`millis`:return tu(a);case`second`:case`seconds`:return nu(a);case`minute`:case`minutes`:return ru(a);case`hour`:case`hours`:return iu(a);case`day`:case`days`:return au(a);case`week`:case`weeks`:return ou(a)}break}case`object`:{if(e===null)break;if(Pl in e)return e;if(Array.isArray(e))return e.length!==2||!e.every(ga)?Ul(e):Number.isNaN(e[0])||Number.isNaN(e[1])?Zl:e[0]===-1/0||e[1]===-1/0?$l:e[0]===1/0||e[1]===1/0?Ql:Jl(Rl(e[0]*1e9+e[1]));let t=e,n=0;return t.weeks&&(n+=t.weeks*6048e5),t.days&&(n+=t.days*864e5),t.hours&&(n+=t.hours*36e5),t.minutes&&(n+=t.minutes*6e4),t.seconds&&(n+=t.seconds*1e3),t.milliseconds&&(n+=t.milliseconds),!t.microseconds&&!t.nanoseconds?Jl(n):Jl(Rl(n*1e6+(t.microseconds??0)*1e3+(t.nanoseconds??0)))}}return Ul(e)},Ul=e=>{throw Error(`Invalid Input: ${e}`)},Wl={_tag:`Millis`,millis:0},Gl={_tag:`Infinity`},Kl={_tag:`NegativeInfinity`},ql={[Pl]:Pl,[Aa](){return za(this.value)},[Ja](e){return Yl(e)&&pu(this,e)},toString(){switch(this.value._tag){case`Infinity`:return`Infinity`;case`NegativeInfinity`:return`-Infinity`;case`Nanos`:return`${this.value.nanos} nanos`;case`Millis`:return`${this.value.millis} millis`}},toJSON(){switch(this.value._tag){case`Millis`:return{_id:`Duration`,_tag:`Millis`,millis:this.value.millis};case`Nanos`:return{_id:`Duration`,_tag:`Nanos`,nanos:String(this.value.nanos)};case`Infinity`:return{_id:`Duration`,_tag:`Infinity`};case`NegativeInfinity`:return{_id:`Duration`,_tag:`NegativeInfinity`}}},[Eo](){return this.toJSON()},pipe(){return ea(this,arguments)}},Jl=e=>{let t=Object.create(ql);return typeof e==`number`?isNaN(e)||e===0||Object.is(e,-0)?t.value=Wl:Number.isFinite(e)?Number.isInteger(e)?t.value={_tag:`Millis`,millis:e}:t.value={_tag:`Nanos`,nanos:zl(e)}:t.value=e>0?Gl:Kl:e===Fl?t.value=Wl:t.value={_tag:`Nanos`,nanos:e},t},Yl=e=>Da(e,Pl),Xl=e=>e.value._tag!==`Infinity`&&e.value._tag!==`NegativeInfinity`,Zl=Jl(0),Ql=Jl(1/0),$l=Jl(-1/0),eu=e=>Jl(e),tu=e=>Jl(e),nu=e=>Jl(e*1e3),ru=e=>Jl(e*6e4),iu=e=>Jl(e*36e5),au=e=>Jl(e*864e5),ou=e=>Jl(e*6048e5),su=e=>uu(Hl(e),{onMillis:ra,onNanos:e=>Number(e)/1e6,onInfinity:()=>1/0,onNegativeInfinity:()=>-1/0}),cu=e=>uu(Hl(e),{onMillis:e=>e/36e5,onNanos:e=>Number(e)/36e11,onInfinity:()=>1/0,onNegativeInfinity:()=>-1/0}),lu=e=>{let t=Hl(e);switch(t.value._tag){case`Infinity`:case`NegativeInfinity`:throw Error(`Cannot convert infinite duration to nanos`);case`Nanos`:return t.value.nanos;case`Millis`:return zl(t.value.millis)}},uu=z(2,(e,t)=>{switch(e.value._tag){case`Millis`:return t.onMillis(e.value.millis);case`Nanos`:return t.onNanos(e.value.nanos);case`Infinity`:return t.onInfinity();case`NegativeInfinity`:return(t.onNegativeInfinity??t.onInfinity)()}}),du=z(3,(e,t,n)=>e.value._tag===`Infinity`||e.value._tag===`NegativeInfinity`||t.value._tag===`Infinity`||t.value._tag===`NegativeInfinity`?n.onInfinity(e,t):e.value._tag===`Millis`?t.value._tag===`Millis`?n.onMillis(e.value.millis,t.value.millis):n.onNanos(lu(e),t.value.nanos):n.onNanos(e.value.nanos,lu(t))),fu=(e,t)=>du(e,t,{onMillis:(e,t)=>e===t,onNanos:(e,t)=>e===t,onInfinity:(e,t)=>e.value._tag===t.value._tag}),pu=z(2,(e,t)=>fu(e,t)),mu=z(2,(e,t)=>n=>{let r=e(n);if(ol(r))return il(n);let i=t(r.success);return ol(i)?il(n):i}),hu=e=>t=>{let n=e(t);return ol(n)?gc():B(n.success)},gu=tl(`effect/Scheduler`,{defaultValue:()=>new yu}),_u=`setImmediate`in globalThis?e=>{let t=globalThis.setImmediate(e);return()=>globalThis.clearImmediate(t)}:e=>{let t=setTimeout(e,0);return()=>clearTimeout(t)},vu=class{buckets=[];scheduleTask(e,t){let n=this.buckets,r=n.length,i,a=0;for(;a<r&&!(n[a][0]>t);a++)i=n[a];i&&i[0]===t?i[1].push(e):a===r?n.push([t,[e]]):n.splice(a,0,[t,[e]])}drain(){let e=this.buckets;return this.buckets=[],e}},yu=class{executionMode;setImmediate;constructor(e=`async`,t=_u){this.executionMode=e,this.setImmediate=t}shouldYield(e){return e.currentOpCount>=e.maxOpsBeforeYield}makeDispatcher(){return new bu(this.setImmediate)}},bu=class{tasks=new vu;running=void 0;setImmediate;constructor(e=_u){this.setImmediate=e}scheduleTask(e,t){this.tasks.scheduleTask(e,t),this.running===void 0&&(this.running=this.setImmediate(this.afterScheduled))}afterScheduled=()=>{this.running=void 0,this.runTasks()};runTasks(){let e=this.tasks.drain();for(let t=0;t<e.length;t++){let n=e[t][1];for(let e=0;e<n.length;e++)n[e]()}}flush(){for(;this.tasks.buckets.length>0;)this.running!==void 0&&(this.running(),this.running=void 0),this.runTasks()}},xu=tl(`effect/Scheduler/MaxOpsBeforeYield`,{defaultValue:()=>2048}),Su=tl(`effect/Scheduler/PreventSchedulerYield`,{defaultValue:()=>!1}),Cu=`effect/Tracer/ParentSpan`,wu=class extends Nc()(Cu){},Tu=e=>e,Eu=tl(`effect/Tracer/DisablePropagation`,{defaultValue:oa}),Du=tl(`effect/Tracer/CurrentTraceLevel`,{defaultValue:()=>`Info`}),Ou=tl(`effect/Tracer/MinimumTraceLevel`,{defaultValue:()=>`All`}),ku=`effect/Tracer`,Au=tl(ku,{defaultValue:()=>Tu({span:e=>new ju(e)})}),ju=class{_tag=`Span`;spanId;traceId=`native`;sampled;name;parent;annotations;links;startTime;kind;status;attributes;events=[];constructor(e){this.name=e.name,this.parent=e.parent,this.annotations=e.annotations,this.links=e.links,this.startTime=e.startTime,this.kind=e.kind,this.sampled=e.sampled,this.status={_tag:`Started`,startTime:e.startTime},this.attributes=new Map,this.traceId=Tc(e.parent)?.traceId??Mu(32),this.spanId=Mu(16)}end(e,t){this.status={_tag:`Ended`,endTime:e,exit:t,startTime:this.status.startTime}}attribute(e,t){this.attributes.set(e,t)}event(e,t,n){this.events.push([e,t,n??{}])}addLinks(e){this.links.push(...e)}},Mu=function(){return function(e){let t=``;for(let n=0;n<e;n++)t+=`abcdef0123456789`.charAt(Math.floor(Math.random()*16));return t}}(),Nu=`effect/observability/Metric/FiberRuntimeMetricsKey`,Pu=tl(`effect/References/CurrentConcurrency`,{defaultValue:()=>`unbounded`}),Fu=tl(`effect/References/CurrentStackFrame`,{defaultValue:ca}),Iu=tl(`effect/References/TracerEnabled`,{defaultValue:aa}),Lu=tl(`effect/References/TracerTimingEnabled`,{defaultValue:aa}),Ru=tl(`effect/References/TracerSpanAnnotations`,{defaultValue:()=>({})}),zu=tl(`effect/References/TracerSpanLinks`,{defaultValue:()=>[]}),Bu=tl(`effect/References/CurrentLogLevel`,{defaultValue:()=>`Info`}),Vu=tl(`effect/References/MinimumLogLevel`,{defaultValue:()=>`Info`}),Hu=e=>{if(e?.captureStackTrace===!1||e?.captureStackTrace!==void 0&&typeof e.captureStackTrace!=`boolean`)return e;let t=Is();Ls(3);let n=Error();return Ls(t),{...e,captureStackTrace:Uu(()=>n.stack)}},Uu=(e=>t=>{let n;return()=>{if(n!==void 0)return n;let r=t();if(!r)return;let i=r.split(`
|
|
15
|
-
`);if(i[e]!==void 0)return n=i[e].trim(),n}})(3),Wu=class extends Qo{fiberId;constructor(e,t=$o){super(`Interrupt`,t,`Interrupted`),this.fiberId=e}toString(){return`Interrupt(${this.fiberId})`}toJSON(){return{_tag:`Interrupt`,fiberId:this.fiberId}}[Ja](e){return ls(e)&&this.fiberId===e.fiberId&&this.annotations===e.annotations}[Aa](){return Na(La(`${this._tag}:${this.fiberId}`))(Ma(this.annotations))}},Gu=e=>new Wu(e),Ku=e=>new Xo([new Wu(e)]),qu=e=>{for(let t=0;t<e.reasons.length;t++){let n=e.reasons[t];if(n._tag===`Fail`)return rl(n.error)}return il(e)},Ju=hu(qu),Yu=e=>{let t=e.reasons.find(cs);return t?rl(t.defect):il(e)},Xu=e=>e.reasons.some(ls),Zu=e=>{let t;for(let n=0;n<e.reasons.length;n++){let r=e.reasons[n];r._tag===`Interrupt`&&(t??=new Set,r.fiberId!==void 0&&t.add(r.fiberId))}return t?rl(t):il(e)},Qu=z(2,(e,t)=>{if(e.reasons.length===0)return t;if(t.reasons.length===0)return e;let n=new Xo(Ol(e.reasons,t.reasons));return Ya(e,n)?e:n}),$u=z(2,(e,t)=>{let n=!1,r=e.reasons.map(e=>ss(e)?(n=!0,new es(t(e.error))):e);return n?ts(r):e}),ed=e=>{let t={Fail:[],Die:[],Interrupt:[]};for(let n=0;n<e.reasons.length;n++)t[e.reasons[n]._tag].push(e.reasons[n]);return t},td=e=>{let t=ed(e);return t.Fail.length>0?t.Fail[0].error:t.Die.length>0?t.Die[0].defect:t.Interrupt.length>0?new globalThis.Error(`All fibers interrupted without error`):new globalThis.Error(`Empty cause`)},nd=`~effect/Fiber/dev`,rd={_A:ra,_E:ra},id={id:0},ad=()=>globalThis[_o],od=class{constructor(e,t=!0){this[nd]=rd,this.setContext(e),this.id=++id.id,this.currentOpCount=0,this.currentLoopCount=0,this.interruptible=t,this._stack=[],this._observers=[],this._exit=void 0,this._children=void 0,this._interruptedCause=void 0,this._yielded=void 0,this.runtimeMetrics?.recordFiberStart(this.context)}[nd];id;interruptible;currentOpCount;currentLoopCount;_stack;_observers;_exit;_currentExit;_children;_interruptedCause;_yielded;context;currentScheduler;currentTracerContext;currentSpan;currentLogLevel;minimumLogLevel;currentStackFrame;runtimeMetrics;maxOpsBeforeYield;currentPreventYield;_dispatcher=void 0;get currentDispatcher(){return this._dispatcher??=this.currentScheduler.makeDispatcher()}getRef(e){return Jc(this.context,e)}addObserver(e){return this._exit?(e(this._exit),la):(this._observers.push(e),()=>{let t=this._observers.indexOf(e);t>=0&&this._observers.splice(t,1)})}interruptUnsafe(e,t){if(this._exit)return;let n=Ku(e);this.currentStackFrame&&(n=os(n,Uc(hs,this.currentStackFrame))),t&&(n=os(n,t)),this._interruptedCause=this._interruptedCause?Qu(this._interruptedCause,n):n,this.interruptible&&this.evaluate(_d(this._interruptedCause))}pollUnsafe(){return this._exit}evaluate(e){if(this._exit)return;if(this._yielded!==void 0){let e=this._yielded;this._yielded=void 0,e()}let t=this.runLoop(e);if(t===Vo)return;let n=sd.interruptChildren&&sd.interruptChildren(this);if(n!==void 0)return this.evaluate(Jd(n,()=>t));this._exit=t,this.runtimeMetrics?.recordFiberEnd(this.context,this._exit);for(let e=0;e<this._observers.length;e++)this._observers[e](t);this._observers.length=0}runLoop(e){let t=globalThis[_o];globalThis[_o]=this;let n=!1,r=e;this.currentOpCount=0;let i=++this.currentLoopCount;try{for(;;){if(this.currentOpCount++,!n&&!this.currentPreventYield&&this.currentScheduler.shouldYield(this)){n=!0;let e=r;r=Jd(Sd,()=>e)}if(r=this.currentTracerContext?this.currentTracerContext(r,this):r[Lo](this),i!==this.currentLoopCount)return Vo;if(r===Vo){let e=this._yielded;return No in e?(this._yielded=void 0,e):Vo}}}catch(e){return Da(r,Lo)?this.runLoop(vs(e)):vs(`Fiber.runLoop: Not a valid effect: ${String(r)}`)}finally{globalThis[_o]=t}}getCont(e){for(;;){let t=this._stack.pop();if(!t)return;let n=t[Bo]&&t[Bo](this);if(n)return n[e]=n,n;if(t[e])return t}}yieldWith(e){return this._yielded=e,Vo}children(){return this._children??=new Set}pipe(){return ea(this,arguments)}setContext(e){this.context=e;let t=this.getRef(gu);t!==this.currentScheduler&&(this.currentScheduler=t,this._dispatcher=void 0),this.currentSpan=e.mapUnsafe.get(Cu),this.currentLogLevel=this.getRef(Bu),this.minimumLogLevel=this.getRef(Vu),this.currentStackFrame=e.mapUnsafe.get(Fu.key),this.maxOpsBeforeYield=this.getRef(xu),this.currentPreventYield=this.getRef(Su),this.runtimeMetrics=e.mapUnsafe.get(Nu);let n=e.mapUnsafe.get(ku);this.currentTracerContext=n?n.context:void 0}get currentSpanLocal(){return this.currentSpan?._tag===`Span`?this.currentSpan:void 0}},sd={interruptChildren:void 0},cd=e=>{if(!e.currentStackFrame)return;let t=new Map;return t.set(hs.key,e.currentStackFrame),Lc(t)},ld=e=>{let t=e;return t._exit?gd(t._exit):Fd(n=>t._exit?n(gd(t._exit)):yd(e.addObserver(e=>n(gd(e)))))},ud=e=>Fd(t=>{let n=e[Symbol.iterator](),r=[],i;function a(){let e=n.next();for(;!e.done;){if(e.value._exit){r.push(e.value._exit),e=n.next();continue}i=e.value.addObserver(e=>{r.push(e),a()});return}t(gd(r))}return a(),yd(()=>i?.())}),dd=e=>{let t=e;return t._exit?t._exit:Fd(n=>t._exit?n(t._exit):yd(e.addObserver(n)))},fd=e=>Fd(t=>{let n=Array.from(e);if(n.length===0)return t(gd(kl()));let r=Array(n.length),i=kl(),a=0,o=!1;for(let e=0;e<n.length&&!o;e++)i.push(n[e].addObserver(s=>{if(a++,s._tag===`Failure`)return o=!0,i.forEach(e=>e()),t(s);r[e]=s.value,a===n.length&&t(gd(r))}))}),pd=e=>ys(t=>md(e,t.id)),md=z(e=>Da(e[0],nd),(e,t,n)=>ys(r=>{let i=cd(r);return i=i&&n?Qc(i,n):i??n,e.interruptUnsafe(t,i),qd(ld(e))})),hd=e=>ys(t=>{let n=cd(t);for(let r of e)r.interruptUnsafe(t.id,n);return qd(ud(e))}),gd=ms,_d=gs,vd=_s,yd=fs({op:`Sync`,[Lo](e){let t=this[Io](),n=e.getCont(Ro);return n?n[Ro](t,e):e.yieldWith(ms(t))}}),bd=fs({op:`Suspend`,[Lo](e){return this[Io]()}}),xd=cl({onFailure:vd,onSuccess:gd}),Sd=fs({op:`Yield`,[Lo](e){let t=!1;return e.currentDispatcher.scheduleTask(()=>{t||e.evaluate(sf)},this[Io]??0),e.yieldWith(()=>{t=!0})}})(0),Cd=e=>gd(B(e)),wd=gd(gc()),Td=e=>bd(()=>_d(jo(e))),Ed=e=>vs(e),Dd=e=>bd(()=>vd(jo(e))),Od=gd(void 0),kd=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new $p(e,`An error occurred in Effect.try`):e.catch;return bd(()=>{try{return gd(jo(t))}catch(e){return vd(jo(()=>n(e)))}})},Ad=e=>Nd(function(t,n){jo(()=>e(n)).then(e=>t(gd(e)),e=>t(Ed(e)))},e.length!==0),jd=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new $p(e,`An error occurred in Effect.tryPromise`):e.catch;return Nd(function(e,r){let i=t=>{try{e(vd(jo(()=>n(t))))}catch(t){e(Ed(t))}};try{jo(()=>t(r)).then(t=>e(gd(t)),i)}catch(e){i(e)}},t.length!==0)},Md=e=>ys(t=>e(t.id)),Nd=fs({op:`Async`,single:!1,[Lo](e){let t=jo(()=>this[Io][0].bind(e.currentScheduler)),n=!1,r=!1,i=this[Io][1]?new AbortController:void 0,a=t(t=>{n||(n=!0,r?e.evaluate(t):r=t)},i?.signal);return r===!1?(r=!0,e._yielded=()=>{n=!0},i===void 0&&a===void 0||e._stack.push(Pd(()=>(n=!0,i?.abort(),a??sf))),Vo):r}}),Pd=fs({op:`AsyncFinalizer`,[Bo](e){e.interruptible&&(e.interruptible=!1,e._stack.push(cp))},[zo](e,t){return Xu(e)?Jd(this[Io](),()=>_d(e)):_d(e)}}),Fd=e=>Nd(e,e.length>=2),Id=Fd(la),Ld=(...e)=>bd(()=>Hd(e.length===1?e[0]():e[1].call(e[0].self))),Rd=(e,...t)=>{let n=t.length===0?function(){return bd(()=>Hd(e.apply(this,arguments)))}:function(){let n=bd(()=>Hd(e.apply(this,arguments)));for(let e=0;e<t.length;e++)n=t[e](n,...arguments);return n};return zd(e.length,n)},zd=(e,t)=>Object.defineProperty(t,"length",{value:e,configurable:!0}),Bd=(e,...t)=>zd(e.length,t.length===0?function(){return Vd(()=>e.apply(this,arguments))}:function(){let n=Vd(()=>e.apply(this,arguments));for(let e of t)n=e(n);return n}),Vd=e=>{try{let t=e(),n;for(;;){let r=t.next(n);if(r.done)return gd(r.value);let i=r.value;if(i&&i._tag===`Success`){n=i.value;continue}else if(i&&i._tag===`Failure`)return r.value;else{let n=!0;return bd(()=>n?(n=!1,Jd(r.value,e=>Hd(t,e))):bd(()=>Hd(e())))}}}catch(e){return Ed(e)}},Hd=fs({op:`Iterator`,single:!1,[Ro](e,t){let n=this[Io][0];for(;;){let r=n.next(e);if(r.done)return gd(r.value);if(!Xd(r.value))return t._stack.push(this),r.value;if(r.value._tag===`Failure`)return r.value;e=r.value.value}},[Lo](e){return this[Ro](this[Io][1],e)}}),Ud=z(2,(e,t)=>{let n=gd(t);return Jd(e,e=>n)}),Wd=e=>$d(e,B),Gd=z(2,(e,t)=>Jd(e,e=>Wo(t)?t:jo(()=>t(e)))),Kd=z(2,(e,t)=>Jd(e,e=>Ud(Wo(t)?t:jo(()=>t(e)),e))),qd=e=>Jd(e,e=>sf),Jd=z(2,(e,t)=>{let n=Object.create(Yd);return n[Io]=e,n[Ro]=t.length===1?t:e=>t(e),n}),Yd=ds({op:`OnSuccess`,[Lo](e){return e._stack.push(this),this[Io]}}),Xd=e=>No in e,Zd=z(2,(e,t)=>Xd(e)?e._tag===`Success`?t(e.value):e:Jd(e,t)),Qd=e=>Jd(e,ra),$d=z(2,(e,t)=>Jd(e,e=>gd(jo(()=>t(e))))),ef=z(2,(e,t)=>Xd(e)?cf(e,t):$d(e,t)),tf=z(2,(e,t)=>Xd(e)?lf(e,t):Df(e,t)),nf=z(2,(e,t)=>Xd(e)?uf(e,t):Of(e,t)),rf=e=>gs(Ku(e)),af=e=>e._tag===`Success`,of=e=>e._tag===`Failure`?rl(e.cause):il(e),sf=ms(void 0),cf=z(2,(e,t)=>e._tag===`Success`?ms(t(e.value)):e),lf=z(2,(e,t)=>{if(e._tag===`Success`)return e;let n=qu(e.cause);return ol(n)?e:_s(t(n.success))}),uf=z(2,(e,t)=>{if(e._tag===`Success`)return ms(t.onSuccess(e.value));let n=qu(e.cause);return ol(n)?e:_s(t.onFailure(n.success))}),df=z(2,(e,t)=>af(e)?t:e),ff=e=>{let t=[];for(let n of e)n._tag===`Failure`&&t.push(...n.cause.reasons);return t.length===0?sf:gs(ts(t))},pf=z(2,(e,t)=>ys(n=>{let r=n.context,i=t(r);return r===i?e:(n.setContext(i),Xf(e,()=>{n.setContext(r)}))})),mf=z(3,(e,t,n)=>pf(e,e=>{let r=Kc(e,t),i=n(r);return r===i?e:Wc(e,t,i)})),hf=()=>gf,gf=ys(e=>gd(e.context)),_f=e=>ys(t=>e(t.context)),vf=z(2,(e,t)=>Xd(e)?e:pf(e,Qc(t))),yf=function(){return arguments.length===1?z(2,(e,t)=>bf(e,arguments[0],t)):z(3,(e,t,n)=>bf(e,t,n)).apply(this,arguments)},bf=(e,t,n)=>pf(e,e=>e.mapUnsafe.get(t.key)===n?e:Wc(e,t,n)),xf=z(2,(e,t)=>Jd(t,t=>t?Wd(e):wd)),Sf=z(e=>Wo(e[0]),(e,t)=>fp({while:aa,body:ia(t?.disableYield?e:Jd(e,e=>Sd)),step:la})),Cf=z(2,(e,t)=>{let n=Object.create(wf);return n[Io]=e,n[zo]=t.length===1?t:e=>t(e),n}),wf=ds({op:`OnFailure`,[Lo](e){return e._stack.push(this),this[Io]}}),Tf=z(3,(e,t,n)=>Cf(e,e=>{let r=t(e);return ol(r)?_d(r.failure):jo(()=>n(r.success,e))})),Ef=z(2,(e,t)=>Tf(e,qu,e=>t(e))),Df=z(2,(e,t)=>Ef(e,e=>Dd(()=>t(e)))),Of=z(2,(e,t)=>jf(e,{onFailure:e=>Dd(()=>t.onFailure(e)),onSuccess:e=>yd(()=>t.onSuccess(e))})),kf=z(2,(e,t)=>{let n=Object.create(Af);return n[Io]=e,n[Ro]=t.onSuccess.length===1?t.onSuccess:e=>t.onSuccess(e),n[zo]=t.onFailure.length===1?t.onFailure:e=>t.onFailure(e),n}),Af=ds({op:`OnSuccessAndFailure`,[Lo](e){return e._stack.push(this),this[Io]}}),jf=z(2,(e,t)=>kf(e,{onFailure:e=>{let n=e.reasons.find(ss);return n?jo(()=>t.onFailure(n.error)):_d(e)},onSuccess:t.onSuccess})),Mf=e=>Xd(e)?ms(e):Nf(e),Nf=fs({op:`Exit`,[Lo](e){return e._stack.push(this),this[Io]},[Ro](e,t,n){return gd(n??ms(e))},[zo](e,t,n){return gd(n??gs(e))}}),Pf=`~effect/Scope`,Ff=`~effect/Scope/Closeable`,If=Nc(`effect/Scope`),Lf=(e,t)=>bd(()=>Rf(e,t)??Od),Rf=(e,t)=>{if(e.state._tag===`Closed`)return;let n={_tag:`Closed`,exit:t};if(e.state._tag===`Empty`){e.state=n;return}let{finalizers:r}=e.state;if(e.state=n,r.size!==0)return r.size===1?r.values().next().value(t):zf(e,r,t)},zf=Rd(function*(e,t,n){let r=[],i=[],a=Array.from(t.values()),o=ad();for(let t=a.length-1;t>=0;t--){let s=a[t];e.strategy===`sequential`?r.push(yield*Mf(s(n))):i.push(vp(o,s(n),!0,!0,`inherit`))}return i.length>0&&(r=yield*ud(i)),yield*ff(r)}),Bf=(e,t)=>{let n=Gf(t);if(e.state._tag===`Closed`)return n.state=e.state,n;let r={};return Uf(e,r,e=>Lf(n,e)),Uf(n,r,t=>yd(()=>Wf(e,r))),n},Vf=(e,t)=>bd(()=>e.state._tag===`Closed`?t(e.state.exit):(Uf(e,{},t),Od)),Hf=(e,t)=>Vf(e,ia(t)),Uf=(e,t,n)=>{e.state._tag===`Empty`?e.state={_tag:`Open`,finalizers:new Map([[t,n]])}:e.state._tag===`Open`&&e.state.finalizers.set(t,n)},Wf=(e,t)=>{e.state._tag===`Open`&&e.state.finalizers.delete(t)},Gf=(e=`sequential`)=>({[Ff]:Ff,[Pf]:Pf,strategy:e,state:Kf}),Kf={_tag:`Empty`},qf=If,Jf=yf(If),Yf=e=>bd(()=>{let t=Gf();return Zf(e(t),e=>bd(()=>Rf(t,e)??Od))}),Xf=fs({op:`OnExit`,single:!1,[Lo](e){return e._stack.push(this),this[Io][0]},[Bo](e){e.interruptible&&this[Io][2]!==!0&&(e._stack.push(cp),e.interruptible=!1)},[Ro](e,t,n){n??=ms(e);let r=this[Io][1](n);return r?Jd(r,e=>n):n},[zo](e,t,n){n??=gs(e);let r=this[Io][1](n);return r?Jd(r,e=>n):n}}),Zf=z(2,Xf),Qf=z(3,(e,t,n)=>Zf(e,e=>{let r=t(e);return ol(r)?Od:n(r.success,e)})),$f=z(2,(e,t)=>Qf(e,of,t)),ep=z(3,(e,t,n)=>Zf(e,e=>{if(e._tag!==`Failure`)return Od;let r=t(e.cause);return ol(r)?Od:n(r.success,e.cause)})),tp=z(2,(e,t)=>ep(Zu,t)(e)),np=z(2,(e,t)=>yd(()=>{let n=su(Hl(t)),r=Number.isFinite(n),i=Fp(!1),a=0,o=!1,s,c=Jd(i.await,()=>s);return[ys(t=>{let l=t.getRef(Gp),u=r?l.currentTimeMillisUnsafe():0;return o||u<a?s??c:(o=!0,i.closeUnsafe(),s=void 0,Zf(e,e=>yd(()=>{o=!1,a=l.currentTimeMillisUnsafe()+n,s=e,i.openUnsafe()})))}),yd(()=>{a=0,i.closeUnsafe(),s=void 0})]})),rp=z(2,(e,t)=>$d(np(e,t),e=>e[0])),ip=e=>rp(e,Ql),ap=ys(e=>_d(Ku(e.id))),op=e=>ys(t=>t.interruptible?(t.interruptible=!1,t._stack.push(cp),e):e),sp=fs({op:`SetInterruptible`,[Bo](e){if(e.interruptible=this[Io],e._interruptedCause&&e.interruptible)return()=>_d(e._interruptedCause)}}),cp=sp(!0),lp=sp(!1),up=e=>ys(t=>t.interruptible?e:(t.interruptible=!0,t._stack.push(lp),t._interruptedCause?_d(t._interruptedCause):e)),dp=e=>ys(t=>t.interruptible?(t.interruptible=!1,t._stack.push(cp),e(up)):e(ra)),fp=fs({op:`While`,[Ro](e,t){return this[Io].step(e),this[Io].while()?(t._stack.push(this),this[Io].body()):sf},[Lo](e){return this[Io].while()?(e._stack.push(this),this[Io].body()):sf}}),pp=z(e=>typeof e[1]==`function`,(e,t,n)=>ys(r=>{let i=n?.concurrency===`inherit`?r.getRef(Pu):n?.concurrency??1,a=i===`unbounded`?1/0:Math.max(1,i);if(a===1)return mp(e,t,n);let o=_l(e),s=o.length;if(s===0)return n?.discard?Od:gd([]);let c=n?.discard?void 0:Array(s),l=_p({f:t,out:c},o,{concurrency:a});return l?Ud(l,c):gd(c)})),mp=(e,t,n)=>bd(()=>{let r=n?.discard?void 0:[],i=e[Symbol.iterator](),a=i.next(),o=0;return Ud(fp({while:()=>!a.done,body:()=>t(a.value,o++),step:e=>{r&&r.push(e),a=i.next()}}),r)}),hp=e=>{let t=e.onItem,n=e.step;return(e,r,i)=>{let a=i?.start??0,o=i?.end??r.length,s=i?.concurrency??1,c=!1,l,u,d,f=!1,p,m,h=()=>{let i=!1;for(;!p&&a<o;a++){let o=r[a],g=m??t(e,o,a);if(Xd(g)){if(p=n(e,o,g,a),p)break}else if(s===1)return Jd(Mf(g),t=>(p=n(e,o,t,a),a++,p??h()??Od));else if(l){m=void 0;let t=vp(l,g,!0,!0,`inherit`);if(t._exit){if(p=n(e,o,t._exit,a),p)break;continue}u?u.add(t):u=new Set([t]);let r=a;if(t.addObserver(a=>{if(u.delete(t),p){if(!f&&a._tag===`Failure`)for(let e of a.cause.reasons)if(e._tag===`Interrupt`)continue;else p._tag===`Failure`?p.cause.reasons.push(e):p=gs(ts([e]))}else{let t=n(e,o,a,r);t&&(p=t._tag===`Failure`?gs(ts(t.cause.reasons.slice())):t,h())}if(i){let e=h();e&&d(e)}else c&&u.size===0&&d(p??Od)}),u.size<s)continue;i=!0,a++;return}else return Fd(e=>{l=ad(),m=g,d=e;let t=h();return t?e(t):bd(()=>(p=sf,f=!0,u?hd(u):Od))})}if(c=!0,p){if(u&&u.size>0){let e=cd(l);u.forEach(t=>t.interruptUnsafe(l.id,e));return}if(d||p._tag===`Failure`)return p}else if(d)if(u)u.size===0&&d(Od);else return sf};return h()}},gp=()=>hp,_p=hp({onItem(e,t,n){return e.f(t,n)},step(e,t,n,r){if(n._tag===`Failure`)return n;e.out&&(e.out[r]=n.value)}}),vp=(e,t,n=!1,r=!1,i=!1)=>{let a=i===`inherit`?e.interruptible:!i,o=new od(e.context,a);return n?o.evaluate(t):e.currentDispatcher.scheduleTask(()=>o.evaluate(t),0),!r&&!o._exit&&(e.children().add(o),o.addObserver(()=>e._children.delete(o))),o},yp=z(e=>Wo(e[0]),(e,t)=>ys(n=>gd(vp(n,e,t?.startImmediately,!0,t?.uninterruptible)))),bp=z(e=>Wo(e[0]),(e,t,n)=>ys(r=>{let i=vp(r,e,n?.startImmediately,!0,n?.uninterruptible);if(!i._exit)if(t.state._tag!==`Closed`){let e={};Uf(t,e,()=>Md(e=>e===i.id?Od:pd(i))),i.addObserver(()=>Wf(t,e))}else i.interruptUnsafe(r.id,cd(r));return gd(i)})),xp=e=>(t,n)=>{let r=new od(n?.scheduler?Wc(e,gu,n.scheduler):e,n?.uninterruptible!==!0);if(r.evaluate(t),r._exit)return r;if(n?.signal)if(n.signal.aborted)r.interruptUnsafe();else{let e=()=>r.interruptUnsafe();n.signal.addEventListener(`abort`,e,{once:!0}),r.addObserver(()=>n.signal.removeEventListener(`abort`,e))}return n?.onFiberStart&&n.onFiberStart(r),r},Sp=z(2,(e,t)=>{if(e._exit)return e;if(t.state._tag===`Closed`)return e.interruptUnsafe(e.id),e;let n={};return Uf(t,n,()=>pd(e)),e.addObserver(()=>Wf(t,n)),e}),Cp=xp(Vc()),wp=e=>{let t=xp(e);return(e,n)=>{let r=t(e,n);return n?.onExit&&r.addObserver(n.onExit),e=>r.interruptUnsafe(e)}},Tp=e=>{let t=xp(e);return(e,n)=>{let r=t(e,n);return new Promise(e=>{r.addObserver(t=>e(t))})}},Ep=Tp(Vc()),Dp=(e=>{let t=Tp(e);return(e,n)=>t(e,n).then(e=>{if(e._tag===`Failure`)throw td(e.cause);return e.value})})(Vc()),Op=e=>{let t=xp(e);return e=>{if(Xd(e))return e;let n=t(e,{scheduler:new yu(`sync`)});return n.currentDispatcher?.flush(),n._exit??vs(new Zp(n))}},kp=Op(Vc()),Ap=e=>{let t=Op(e);return e=>{let n=t(e);if(n._tag===`Failure`)throw td(n.cause);return n.value}},jp=Ap(Vc()),Mp=gd(!0),Np=gd(!1),Pp=class{waiters=[];scheduled=!1;isOpen;constructor(e){this.isOpen=e}scheduleUnsafe(e){return this.scheduled||this.waiters.length===0?Mp:(this.scheduled=!0,e.currentDispatcher.scheduleTask(this.flushWaiters,0),Mp)}flushWaiters=()=>{this.scheduled=!1;let e=this.waiters;this.waiters=[];for(let t=0;t<e.length;t++)e[t](sf)};open=ys(e=>this.isOpen?Np:(this.isOpen=!0,this.scheduleUnsafe(e)));release=ys(e=>this.isOpen?Np:this.scheduleUnsafe(e));openUnsafe(){return this.isOpen?!1:(this.isOpen=!0,this.flushWaiters(),!0)}await=Fd(e=>this.isOpen?e(Od):(this.waiters.push(e),yd(()=>{let t=this.waiters.indexOf(e);t!==-1&&this.waiters.splice(t,1)})));closeUnsafe(){return this.isOpen?(this.isOpen=!1,!0):!1}close=yd(()=>this.closeUnsafe());whenOpen=e=>Jd(this.await,()=>e)},Fp=e=>new Pp(e??!1),Ip=BigInt(0),Lp={_tag:`Span`,spanId:`noop`,traceId:`noop`,sampled:!1,status:{_tag:`Ended`,startTime:Ip,endTime:Ip,exit:sf},attributes:new Map,links:[],kind:`internal`,attribute(){},event(){},end(){},addLinks(){}},Rp=e=>Object.assign(Object.create(Lp),e),zp=e=>e?qc(e.annotations,Eu)?e._tag===`Span`?zp(Tc(e.parent)):gc():B(e):gc(),Bp=(e,t,n)=>{let r=!e.getRef(Iu)||n?.annotations&&qc(n.annotations,Eu),i=n?.parent===void 0?n?.root?gc():zp(e.currentSpan):B(n.parent),a;if(r)a=Rp({name:t,parent:i,annotations:Wc(n?.annotations??Vc(),Eu,!0)});else{let r=e.getRef(Au),o=e.getRef(Gp),s=e.getRef(Lu),c=e.getRef(Ru),l=e.getRef(zu),u=n?.level??e.getRef(Du),d=n?.links===void 0?l.slice():[...l,...n.links];a=r.span({name:t,parent:i,annotations:n?.annotations??Vc(),links:d,startTime:s?o.currentTimeNanosUnsafe():BigInt(0),kind:n?.kind??`internal`,root:n?.root??vc(i),sampled:n?.sampled??(yc(i)&&i.value.sampled===!1?!1:!em(e.getRef(Ou),u))});for(let[e,t]of Object.entries(c))a.attribute(e,t);if(n?.attributes!==void 0)for(let[e,t]of Object.entries(n.attributes))a.attribute(e,t)}return a},Vp=(e,t)=>(t=typeof t==`function`?t:ca,mf(Fu,n=>({name:e,stack:t,parent:n}))),Hp=(e,...t)=>{let n=t.length===1?void 0:t[0],r=t[t.length-1];return ys(t=>{let i=Bp(t,e,n),a=t.getRef(Gp);return Zf(jo(()=>r(i)),e=>yd(()=>{i.status._tag!==`Ended`&&i.end(a.currentTimeNanosUnsafe(),e)}))})},Up=yf(wu),Wp=function(){let e=Wo(arguments[0]),t=e?arguments[1]:arguments[0],n=e?arguments[2]:arguments[1],r=ra;return t._tag===`Span`&&(n=Hu(n),r=Vp(t.name,n?.captureStackTrace)),e?Up(r(arguments[0]),t):e=>Up(r(e),t)},Gp=tl(`effect/Clock`,{defaultValue:()=>new qp}),Kp=2**31-1,qp=class{currentTimeMillisUnsafe(){return Date.now()}currentTimeMillis=yd(()=>this.currentTimeMillisUnsafe());currentTimeNanosUnsafe(){return Yp()}currentTimeNanos=yd(()=>this.currentTimeNanosUnsafe());sleep(e){let t=su(e);return t<=0?Sd:Fd(e=>{if(t>Kp)return;let n=setTimeout(()=>e(Od),t);return yd(()=>clearTimeout(n))})}},Jp=function(){let e=BigInt(1e6);if(typeof performance>`u`||performance.now===void 0)return()=>BigInt(Date.now())*e;let t;return()=>(t??=BigInt(Date.now())*e-BigInt(Math.round(performance.now()*1e6)),t+BigInt(Math.round(performance.now()*1e6)))}(),Yp=function(){let e=typeof process==`object`&&`hrtime`in process&&typeof process.hrtime.bigint==`function`?process.hrtime:void 0;if(!e)return Jp;let t=BigInt(Date.now())*BigInt(1e6)-e.bigint();return()=>t+e.bigint()}();Ss(`TimeoutError`),Ss(`IllegalArgumentError`),Ss(`ExceededCapacityError`);var Xp=`~effect/Cause/AsyncFiberError`,Zp=class extends Ss(`AsyncFiberError`){[Xp]=Xp;constructor(e){super({message:`An asynchronous Effect was executed with Effect.runSync`,fiber:e})}},Qp=`~effect/Cause/UnknownError`,$p=class extends Ss(`UnknownError`){[Qp]=Qp;constructor(e,t){super({message:t,cause:e})}},em=pc(uc(lc,e=>{switch(e){case`All`:return-(2**53-1);case`Fatal`:return 5e4;case`Error`:return 4e4;case`Warn`:return 3e4;case`Info`:return 2e4;case`Debug`:return 1e4;case`Trace`:return 0;case`None`:return 2**53-1}})),tm={bold:`1`,red:`31`,green:`32`,yellow:`33`,blue:`34`,cyan:`36`,white:`37`,gray:`90`,black:`30`,bgBrightRed:`101`};tm.gray,tm.blue,tm.green,tm.yellow,tm.red,tm.bgBrightRed,tm.black;var nm=Jo,rm=Yo,im=ss,am=ts,om=ns,sm=rs,cm=Ku,lm=e=>new es(e),um=e=>new is(e),dm=Gu,fm=$u,pm=Qu,mm=td,hm=qu,gm=Ju,_m=Yu,vm=Xu,ym=Zu,bm=ws,xm=Es,Sm=As;Nc()(`effect/Cause/StackTrace`),Nc()(`effect/Cause/InterruptorStackTrace`);var Cm=Go,wm=ms,Tm=gs,Em=_s,Dm=sf,Om=af,km={"~effect/Deferred":{_A:ra,_E:ra},pipe(){return ea(this,arguments)}},Am=()=>{let e=Object.create(km);return e.resumes=void 0,e.effect=void 0,e},jm=e=>Fd(t=>e.effect?t(e.effect):(e.resumes??=[],e.resumes.push(t),yd(()=>{let n=e.resumes.indexOf(t);e.resumes.splice(n,1)}))),Mm=z(2,(e,t)=>yd(()=>Fm(e,t))),Nm=z(2,(e,t)=>Mm(e,gs(t))),Pm=z(2,(e,t)=>Nm(e,Ku(t))),Fm=(e,t)=>{if(e.effect)return!1;if(e.effect=t,e.resumes){for(let n=0;n<e.resumes.length;n++)e.resumes[n](t);e.resumes=void 0}return!0},Im=If,Lm=Gf,Rm=Jf,zm=Vf,Bm=Hf,Vm=Bf,Hm=Lf,Um=`~effect/Layer`,Wm=`~effect/Layer/MemoMap`,Gm=(e,t)=>(e.observers++,Gd(Vf(t,t=>e.finalizer(t)),e.effect)),Km={[Um]:{_ROut:ra,_E:ra,_RIn:ra},pipe(){return ea(this,arguments)}},qm=e=>{let t=Object.create(Km);return t.build=e,t},Jm=e=>qm((t,n)=>{let r=Vm(n);return Zf(e(t,r),e=>e._tag===`Failure`?Hm(r,e):Od)}),Ym=e=>{let t=Jm((n,r)=>n.getOrElseMemoize(t,r,e));return t},Xm=(e,t,n,r)=>{let i=Lm(),a=Am(),o={observers:1,effect:jm(a),finalizer:n=>bd(()=>(o.observers--,o.observers===0?(e.map.delete(t),Hm(i,n)):Od))};return e.map.set(t,o),Vf(n,o.finalizer).pipe(Jd(()=>r(e,i)),Zf(e=>(o.effect=e,Mm(a,e))))},Zm=class{get[Wm](){return Wm}parent;constructor(e){this.parent=e}map=new Map;get(e,t){let n=this.map.get(e);return n?Gm(n,t):this.parent?.get(e,t)}getOrElseMemoize(e,t,n){return this.get(e,t)||Xm(this,e,t,n)}},Qm=()=>new Zm,$m=class extends Nc()(`effect/Layer/CurrentMemoMap`){static getOrCreate=Gc(this,Qm)},eh=z(3,(e,t,n)=>yf($d(e.build(t,n),Wc($m,t)),$m,t)),th=e=>qm(ia(gd(e))),nh=function(){return arguments.length===1?e=>rh(arguments[0],e):rh(arguments[0],arguments[1])},rh=(e,t)=>ih($d(t,t=>Uc(e,t))),ih=e=>Ym((t,n)=>Rm(e,n)),ah=e=>ih(Ud(e,Vc())),oh=(e,t,n)=>{let r=Vm(n,`parallel`);return pp(e,e=>e.build(t,Vm(r,`sequential`)),{concurrency:e.length}).pipe($d(e=>$c(...e)))},sh=(e,t,n)=>Jm((r,i)=>Jd(Array.isArray(t)?oh(t,r,i):t.build(r,i),t=>e.build(r,i).pipe(vf(t),$d(e=>n(e,t))))),ch=z(2,(e,t)=>sh(e,t,ra)),lh=z(2,(e,t)=>sh(e,t,(e,t)=>Qc(t,e))),uh=class extends na{constructor(e){super(),e&&Object.assign(this,e)}},dh=e=>class extends uh{_tag=e},fh=()=>new Proxy({},{get(e,t,n){return t===`$is`?Oa:t===`$match`?ph:e=>({...e,_tag:t})}});function ph(){if(arguments.length===1){let e=arguments[0];return function(t){return e[t._tag](t)}}let e=arguments[0];return arguments[1][e._tag](e)}var mh=Ss,hh=`~effect/time/DateTime`,gh=`~effect/time/DateTime/TimeZone`,_h={[hh]:hh,pipe(){return ea(this,arguments)},[Eo](){return this.toString()},toJSON(){return yh(this).toJSON()}};({..._h}),{..._h};var vh={[gh]:gh,[Eo](){return this.toString()}};({...vh}),{...vh};var yh=e=>new Date(e.epochMilliseconds),bh=z(2,(e,t)=>Tf(e,wh,e=>t(e))),xh=e=>e.reasons.some(Sh),Sh=e=>e._tag===`Fail`&&xm(e.error),Ch=mu(hm,e=>xm(e)?rl(e):il(e)),wh=mu(hm,e=>xm(e)?rl(e.value):il(e)),Th=e=>{let t=Ch(e);return ol(t)?Tm(t.failure):wm(t.success.value)},Eh=Wo,Dh=pp,Oh=fp,kh=Ad,Ah=jd,V=gd,jh=wd,Mh=Cd,Nh=bd,Ph=yd,Fh=Od,Ih=Fd,Lh=Id,Rh=Ld,zh=vd,Bh=_d,Vh=Td,Hh=Ed,Uh=kd,Wh=ys,Gh=xd,Kh=Jd,qh=Qd,Jh=Gd,Yh=Kd,Xh=Mf,Zh=$d,Qh=Ud,$h=qd,eg=Ef,tg=Cf,ng=xf,rg=kf,ig=hf,ag=_f,og=vf,sg=pf,cg=yf,lg=qf,ug=Yf,dg=$f,fg=Zf,pg=ip,mg=ap,hg=tp,gg=op,_g=dp,vg=Sf,yg=Hp,bg=Wp,xg=bp,Sg=yp,Cg=Cp,wg=xp,Tg=wp,Eg=Dp,Dg=Ep,Og=jp,kg=Ap,Ag=kp,jg=Rd;Nc()(`effect/Effect/Transaction`);var Mg=ef,Ng=tf,Pg=nf,Fg=Zd,Ig=Bd,Lg=`~effect/collections/Chunk`;function Rg(e,t,n,r,i){for(let a=t;a<Math.min(e.length,t+i);a++)n[r+a-t]=e[a];return n}var zg=[],Bg=e=>Rs((t,n)=>t.length===n.length&&Xg(t).every((t,r)=>e(t,Qg(n,r)))),Vg=Bg(Ya),Hg={[Lg]:{_A:e=>e},toString(){return`Chunk(${yo(Xg(this))})`},toJSON(){return{_id:`Chunk`,values:Do(Xg(this))}},[Eo](){return this.toJSON()},[Ja](e){return Wg(e)&&Vg(this,e)},[Aa](){return Va(Xg(this))},[Symbol.iterator](){switch(this.backing._tag){case`IArray`:return this.backing.array[Symbol.iterator]();case`IEmpty`:return zg[Symbol.iterator]();default:return Xg(this)[Symbol.iterator]()}},pipe(){return ea(this,arguments)}},Ug=e=>{let t=Object.create(Hg);switch(t.backing=e,e._tag){case`IEmpty`:t.length=0,t.depth=0,t.left=t,t.right=t;break;case`IConcat`:t.length=e.left.length+e.right.length,t.depth=1+Math.max(e.left.depth,e.right.depth),t.left=e.left,t.right=e.right;break;case`IArray`:t.length=e.array.length,t.depth=0,t.left=Gg,t.right=Gg;break;case`ISingleton`:t.length=1,t.depth=0,t.left=Gg,t.right=Gg;break;case`ISlice`:t.length=e.length,t.depth=e.chunk.depth+1,t.left=Gg,t.right=Gg;break}return t},Wg=e=>Da(e,Lg),Gg=Ug({_tag:`IEmpty`}),Kg=()=>Gg,qg=e=>Ug({_tag:`ISingleton`,a:e}),Jg=e=>Wg(e)?e:Zg(_l(e)),Yg=(e,t,n)=>{switch(e.backing._tag){case`IArray`:Rg(e.backing.array,0,t,n,e.length);break;case`IConcat`:Yg(e.left,t,n),Yg(e.right,t,n+e.left.length);break;case`ISingleton`:t[n]=e.backing.a;break;case`ISlice`:{let r=0,i=n;for(;r<e.length;)t[i]=Qg(e,r),r+=1,i+=1;break}}},Xg=e=>{switch(e.backing._tag){case`IEmpty`:return zg;case`IArray`:return e.backing.array;default:{let t=Array(e.length);return Yg(e,t,0),e.backing={_tag:`IArray`,array:t},e.left=Gg,e.right=Gg,e.depth=0,t}}},Zg=e=>e.length===0?Kg():e.length===1?qg(e[0]):Ug({_tag:`IArray`,array:e}),Qg=z(2,(e,t)=>{let n=Math.floor(t);switch(e.backing._tag){case`IEmpty`:throw Error(`Index out of bounds: ${n}`);case`ISingleton`:if(t!==0)throw Error(`Index out of bounds: ${n}`);return e.backing.a;case`IArray`:if(n>=e.length||n<0)throw Error(`Index out of bounds: ${n}`);return e.backing.array[n];case`IConcat`:return n<e.left.length?Qg(e.left,n):Qg(e.right,n-e.left.length);case`ISlice`:return Qg(e.backing.chunk,n+e.backing.offset)}}),$g=e=>e.length,e_=dd,t_=fd,n_=pd,r_=ad,i_=Sp,a_=Fp,o_=Symbol.for(`effect/MutableList/Empty`),s_=()=>({head:void 0,tail:void 0,length:0}),c_=()=>({array:[],mutable:!0,offset:0,next:void 0}),l_=(e,t)=>{e.tail?e.tail.mutable||(e.tail.next=c_(),e.tail=e.tail.next):e.head=e.tail=c_(),e.tail.array.push(t),e.length++},u_=e=>{e.head=e.tail=void 0,e.length=0},d_=(e,t)=>{if(t<=0||!e.head)return[];if(t=Math.min(t,e.length),t===e.length&&e.head?.offset===0&&!e.head.next){let t=e.head.array;return u_(e),t}let n=Array(t),r=0,i=e.head;for(;i;){for(;i.offset<i.array.length;)if(n[r++]=i.array[i.offset],i.mutable&&(i.array[i.offset]=void 0),i.offset++,r===t)return e.head=i,e.length-=t,e.length===0&&u_(e),n;i=i.next}return u_(e),n},f_=e=>d_(e,e.length),p_=e=>{if(!e.head)return o_;let t=e.head.array[e.head.offset];return e.head.mutable&&(e.head.array[e.head.offset]=void 0),e.head.offset++,e.length--,e.head.offset===e.head.array.length&&(e.head.next?e.head=e.head.next:u_(e)),t},m_=(e,t)=>{let n=[],r=e.head;for(;r;){for(let e=r.offset;e<r.array.length;e++)t(r.array[e],e)&&n.push(r.array[e]);r=r.next}e.head=e.tail={array:n,mutable:!0,offset:0,next:void 0},e.length=n.length},h_=(e,t)=>m_(e,e=>e!==t),g_=`~effect/MutableRef`,__={[g_]:g_,...Ho,toJSON(){return{_id:`MutableRef`,current:Do(this.current)}}},v_=e=>{let t=Object.create(__);return t.current=e,t},y_=z(2,(e,t)=>(e.current=t,e)),b_=`~effect/PubSub/Subscription`,x_=z(2,(e,t)=>e.shutdownFlag.current?!1:e.pubsub.publish(t)?(e.strategy.completeSubscribersUnsafe(e.pubsub,e.subscribers),!0):!1),S_=e=>gg(ag(t=>{let n=qc(t,Im),r=Vm(e.scope),i=E_(e.pubsub,e.subscribers,e.strategy);return Bm(r,C_(i)).pipe(Jh(zm(n,e=>Hm(r,e))),Qh(i))})),C_=e=>gg(Wh(t=>(y_(e.shutdownFlag,!0),Dh(f_(e.pollers),e=>Pm(e,t.id),{discard:!0,concurrency:`unbounded`}).pipe(Yh(()=>Ph(()=>{e.subscribers.delete(e.subscription),e.subscription.unsubscribe(),e.strategy.onPubSubEmptySpaceUnsafe(e.pubsub,e.subscribers)})),ng(e.shutdownHook.open),$h)))),w_=e=>Nh(function t(n){if(e.shutdownFlag.current)return mg;let r=e.pollers.length===0?e.subscription.pollUpTo(1/0):[];return n&&(r=n.concat(r)),e.strategy.onPubSubEmptySpaceUnsafe(e.pubsub,e.subscribers),e.replayWindow.remaining>0?V(e.replayWindow.takeAll().concat(r)):xl(r)?V(r):Kh(T_(e),e=>t([e]))}),T_=e=>{let t=Am(),n=e.subscribers.get(e.subscription);return n||(n=new Set,e.subscribers.set(e.subscription,n)),n.add(e.pollers),l_(e.pollers,t),e.strategy.completePollersUnsafe(e.pubsub,e.subscribers,e.subscription,e.pollers),hg(jm(t),()=>(h_(e.pollers,t),Fh))},E_=(e,t,n)=>new D_(e,t,e.subscribe(),s_(),a_(!1),v_(!1),n,e.replayWindow()),D_=class{[b_]={_A:ra};pubsub;subscribers;subscription;pollers;shutdownHook;shutdownFlag;strategy;replayWindow;constructor(e,t,n,r,i,a,o,s){this.pubsub=e,this.subscribers=t,this.subscription=n,this.pollers=r,this.shutdownHook=i,this.shutdownFlag=a,this.strategy=o,this.replayWindow=s}pipe(){return ea(this,arguments)}},O_=`~effect/Queue`,k_=`~effect/Queue/Enqueue`,A_=`~effect/Queue/Dequeue`,j_={_A:ra,_E:ra},M_={[O_]:j_,[k_]:j_,[A_]:j_,...Ho,toJSON(){return{_id:`effect/Queue`,state:this.state._tag,size:W_(this)}}},N_=e=>ys(t=>{let n=Object.create(M_);return n.dispatcher=t.currentDispatcher,n.capacity=e?.capacity??1/0,n.strategy=e?.strategy??`suspend`,n.messages=s_(),n.scheduleRunning=!1,n.state={_tag:`Open`,takers:new Set,offers:new Set,awaiters:new Set},gd(n)}),P_=e=>N_({capacity:e}),F_=(e,t)=>bd(()=>{if(e.state._tag!==`Open`)return G_;if(e.messages.length>=e.capacity)switch(e.strategy){case`dropping`:return G_;case`suspend`:return e.capacity<=0&&e.state.takers.size>0?(l_(e.messages,t),Y_(e),K_):Q_(e,t);case`sliding`:return p_(e.messages),l_(e.messages,t),K_}return l_(e.messages,t),X_(e),K_}),I_=(e,t)=>e.state._tag===`Open`?e.messages.length>=e.capacity?e.strategy===`sliding`?(p_(e.messages),l_(e.messages,t),!0):e.capacity<=0&&e.state.takers.size>0?(l_(e.messages,t),Y_(e),!0):!1:(l_(e.messages,t),X_(e),!0):!1,L_=z(2,(e,t)=>yd(()=>R_(e,t))),R_=(e,t)=>{if(e.state._tag!==`Open`)return!1;let n=df(gs(t),q_);return e.state.offers.size===0&&e.messages.length===0?(tv(e,n),!0):(e.state={...e.state,_tag:`Closing`,exit:n},!0)},z_=e=>yd(()=>{if(e.state._tag===`Done`)return!0;u_(e.messages);let t=e.state.offers;if(tv(e,e.state._tag===`Open`?J_:e.state.exit),t.size>0){for(let e of t)e._tag===`Single`?e.resume(G_):e.resume(ms(e.remaining.slice(e.offset)));t.clear()}return!0}),B_=e=>V_(e,1,1/0),V_=(e,t,n)=>bd(()=>Z_(e,t,n)??Gd(ev(e),V_(e,1,n))),H_=e=>bd(()=>U_(e)??Gd(ev(e),H_(e))),U_=e=>{if(e.state._tag===`Done`)return e.state.exit;if(e.messages.length>0){let t=p_(e.messages);return $_(e),ms(t)}else if(e.capacity<=0&&e.state.offers.size>0){e.capacity=1,$_(e),e.capacity=0;let t=p_(e.messages);return $_(e),ms(t)}},W_=e=>e.state._tag===`Done`?0:e.messages.length,G_=ms(!1),K_=ms(!0),q_=_s(Os()),J_=rf(),Y_=e=>{if(e.scheduleRunning=!1,!(e.state._tag===`Done`||e.state.takers.size===0)){for(let t of e.state.takers)if(e.state.takers.delete(t),t(sf),e.messages.length===0)break}},X_=e=>{e.scheduleRunning||e.state._tag===`Done`||e.state.takers.size===0||(e.scheduleRunning=!0,e.dispatcher.scheduleTask(()=>Y_(e),0))},Z_=(e,t,n)=>{if(e.state._tag===`Done`)return e.state.exit;if(n<=0||t<=0)return ms([]);if(e.capacity<=0&&e.state.offers.size>0){e.capacity=1,$_(e),e.capacity=0;let t=[p_(e.messages)];return $_(e),ms(t)}if(t=Math.min(t,e.capacity||1),t<=e.messages.length){let t=d_(e.messages,n);return $_(e),ms(t)}},Q_=(e,t)=>Fd(n=>{if(e.state._tag!==`Open`)return n(G_);let r={_tag:`Single`,message:t,resume:n};return e.state.offers.add(r),yd(()=>{e.state._tag===`Open`&&e.state.offers.delete(r)})}),$_=e=>{if(e.state._tag===`Done`)return xh(e.state.exit.cause);if(e.state.offers.size===0)return e.state._tag===`Closing`&&e.messages.length===0?(tv(e,e.state.exit),xh(e.state.exit.cause)):!1;let t=e.capacity-e.messages.length;for(let n of e.state.offers)if(t===0)break;else if(n._tag===`Single`)l_(e.messages,n.message),t--,n.resume(K_),e.state.offers.delete(n);else{for(;n.offset<n.remaining.length;n.offset++){if(t===0)return!1;l_(e.messages,n.remaining[n.offset]),t--}n.resume(ms([])),e.state.offers.delete(n)}return!1},ev=e=>Fd(t=>e.state._tag===`Done`?t(e.state.exit):(e.state.takers.add(t),yd(()=>{e.state._tag!==`Done`&&e.state.takers.delete(t)}))),tv=(e,t)=>{if(e.state._tag===`Done`)return;let n=e.state;e.state={_tag:`Done`,exit:t};for(let e of n.takers)e(t);n.takers.clear();for(let e of n.awaiters)e(t);n.awaiters.clear()},nv=e=>new rv(e),rv=class{waiters=new Set;taken=0;permits;constructor(e){this.permits=e}get free(){return this.permits-this.taken}take(e){let t=bd(()=>this.free<e?Fd(n=>{if(this.free>=e)return n(t);let r=()=>{this.free<e||(this.waiters.delete(r),n(t))};return this.waiters.add(r),yd(()=>{this.waiters.delete(r)})}):(this.taken+=e,gd(e)));return t}updateTakenUnsafe(e,t){return this.taken=t(this.taken),this.waiters.size>0&&e.currentDispatcher.scheduleTask(()=>{let e=this.waiters.values(),t=e.next();for(;t.done===!1&&this.free>0;)t.value(),t=e.next()},0),this.free}updateTaken(e){return ys(t=>gd(this.updateTakenUnsafe(t,e)))}resize(e){return ys(t=>(this.permits=e,this.free<0||this.updateTakenUnsafe(t,e=>e),Od))}release(e){return this.updateTaken(t=>t-e)}get releaseAll(){return this.updateTaken(e=>0)}withPermits(e){return t=>dp(n=>Jd(n(this.take(e)),e=>Xf(n(t),()=>{this.updateTakenUnsafe(ad(),t=>t-e)},!0)))}withPermit=this.withPermits(1);withPermitsIfAvailable(e){return t=>dp(n=>this.free<e?wd:(this.taken+=e,Xf(n(Wd(t)),()=>{this.updateTakenUnsafe(ad(),t=>t-e)},!0)))}},iv=`~effect/Channel`,av=e=>Da(e,iv),ov={[iv]:{_Env:ra,_InErr:ra,_InElem:ra,_OutErr:ra,_OutElem:ra},pipe(){return ea(this,arguments)}},sv=e=>{let t=Object.create(ov);return t.transform=(t,n)=>tg(e(t,n),e=>V(Bh(e))),t},cv=(e,t)=>sv((n,r)=>Kh(dv(e)(n,r),e=>t(e,r))),lv=e=>sv((t,n)=>e),uv=e=>sv(jg(function*(t,n){let r=Vm(n),i=e=>Hm(r,Th(e));return dg(yield*dg(e(t,n,r),i),i)})),dv=e=>e.transform,fv=(e,t,n)=>N_({capacity:n?.bufferSize,strategy:n?.strategy}).pipe(Yh(t=>Bm(e,z_(t))),Yh(n=>xg(Rm(t(n),e),e))),pv=(e,t)=>sv((n,r)=>Zh(fv(r,e,t),B_)),mv=e=>sv((t,n)=>Nh(()=>dv(e())(t,n))),hv=lv(V(Sm())),gv=e=>lv(V(zh(e))),_v=e=>lv(V(B_(e))),vv=e=>lv(V(hg(w_(e),()=>Sm()))),yv=e=>Ov(Zh(S_(e),vv)),bv=z(2,(e,t)=>cv(e,e=>Ph(()=>{let n=0;return Zh(e,e=>t(e,n++))}))),xv=e=>e===void 0||e!==`unbounded`&&e<=1,Sv=z(e=>av(e[0]),(e,t,n)=>xv(n?.concurrency)?Cv(e,t):wv(e,t,n)),Cv=(e,t)=>sv((n,r)=>{let i=0;return Zh(dv(e)(n,r),Kh(e=>t(e,i++)))}),wv=(e,t,n)=>uv(jg(function*(r,i,a){let o=0,s=yield*dv(e)(r,i),c=n.concurrency===`unbounded`?2**53-1:n.concurrency,l=yield*P_(0);yield*Bm(a,z_(l));let u=wg(yield*ig()),d=i_(a);if(n.unordered){let e=nv(c),n=ia(e.release(1)),r=rg({onFailure:e=>Kh(L_(l,e),n),onSuccess:e=>Kh(F_(l,e),n)});yield*e.take(1).pipe(Kh(()=>s),Kh(e=>(d(u(r(t(e,o++)))),Fh)),vg({disableYield:!0}),tg(t=>e.withPermits(c-1)(L_(l,t))),xg(a))}else{let e=yield*P_(c-2);yield*Bm(a,z_(l)),yield*H_(e).pipe(qh,Kh(e=>F_(l,e)),vg({disableYield:!0}),tg(e=>L_(l,e)),xg(a));let n,r=e=>{e._tag!==`Success`&&(n=e.cause,R_(l,e.cause))};yield*s.pipe(Kh(i=>{if(n)return Bh(n);let a=u(t(i,o++));return d(a),a.addObserver(r),F_(e,e_(a))}),vg({disableYield:!0}),tg(t=>F_(e,Tm(t)).pipe(Jh(L_(e,t)))),xg(a))}return H_(l)})),Tv=e=>cv(e,e=>{let t,n=0;return V(Nh(function r(){if(t===void 0)return Kh(e,e=>{switch(e.length){case 0:return r();case 1:return V(e[0]);default:return t=e,V(e[n++])}});let i=t[n++];return n>=t.length&&(t=void 0,n=0),V(i)}))}),Ev=z(2,(e,t)=>cv(e,e=>V(Kh(e,function n(r){let i=[];for(let e=0;e<r.length;e++)t(r[e])&&i.push(r[e]);return Sl(i)?V(i):Kh(e,n)})))),Dv=z(2,(e,t)=>sv((n,r)=>Kh(dv(e)(n,r),e=>dv(t)(e,r)))),Ov=e=>sv((t,n)=>{let r;return V(Nh(()=>r||e.pipe(Rm(n),Kh(e=>dv(e)(t,n)),Kh(e=>r=e))))}),kv=z(2,(e,t)=>uv((n,r,i)=>zm(i,t).pipe(Jh(dv(e)(n,r))))),Av=z(2,(e,t)=>kv(e,e=>t)),jv=(e,t,n)=>Nh(()=>{let r=Lm();return bh(Kh(dv(e)(Sm(),r),t),n||V).pipe(fg(e=>Hm(r,e)))}),Mv=z(2,(e,t)=>sv((n,r)=>Zh(og(dv(e)(n,r),t),og(t)))),Nv=z(2,(e,t)=>jv(e,e=>vg(Kh(e,t),{disableYield:!0}))),Pv=jg(function*(e){let t=nv(1),n=yield*ig(),r=qc(n,Im);return(yield*dv(e)(Sm(),r)).pipe(og(n),t.withPermits(1))},tg(e=>V(Bh(e)))),Fv=(e,t)=>dv(e)(Sm(),t),Iv=`~effect/collections/MutableHashMap`,Lv={[Iv]:Iv,[Symbol.iterator](){return this.backing[Symbol.iterator]()},toString(){return`MutableHashMap(${yo(Array.from(this))})`},toJSON(){return{_id:`MutableHashMap`,values:Do(Array.from(this))}},[Eo](){return this.toJSON()},pipe(){return ea(this,arguments)}},Rv=()=>{let e=Object.create(Lv);return e.backing=new Map,e.buckets=new Map,e},zv=z(2,(e,t)=>{if(e.backing.has(t))return B(e.backing.get(t));if(Vv(t))return gc();let n=Bv.get(e);if(n!==void 0)return e.backing.has(n)?B(e.backing.get(n)):gc();let r=ja(t),i=e.buckets.get(r);return i===void 0?gc():Hv(e,i,t)}),Bv=new WeakMap,Vv=e=>typeof e!=`object`&&typeof e!=`function`,Hv=(e,t,n)=>{for(let r=0,i=t.length;r<i;r++)if(Ya(n,t[r])){let i=t[r];return Bv.set(n,i),B(e.backing.get(i))}return gc()},Uv=z(3,(e,t,n)=>{if(e.backing.has(t)||Vv(t))return e.backing.set(t,n),e;let r=Bv.get(e);if(r!==void 0&&e.backing.has(r))return e.backing.set(r,n),e;let i=ja(t),a=e.buckets.get(i);return a===void 0?(e.buckets.set(i,[t]),e.backing.set(t,n),e):(r=Wv(a,t),r===void 0&&(a.push(t),r=t),e.backing.set(r,n),e)}),Wv=(e,t)=>{for(let n=0,r=e.length;n<r;n++)if(Ya(t,e[n]))return Bv.set(t,e[n]),e[n]},Gv=z(2,(e,t)=>{if(Vv(t))return e.backing.delete(t),e;let n=Bv.get(e)??t,r=ja(n),i=e.buckets.get(r);if(i===void 0)return e;for(let t=0,r=i.length;t<r;t++){let r=i[t];if(r===n||Ya(n,r)){e.backing.delete(r),i.splice(t,1);break}}return i.length===0&&e.buckets.delete(r),e}),Kv=`~effect/BigDecimal`,qv={[Kv]:Kv,[Aa](){let e=ey(this);return Na(ja(e.value),Ia(e.scale))},[Ja](e){return Jv(e)&&iy(this,e)},toString(){return`BigDecimal(${ay(this)})`},toJSON(){return{_id:`BigDecimal`,value:String(this.value),scale:this.scale}},[Eo](){return this.toJSON()},pipe(){return ea(this,arguments)}},Jv=e=>Da(e,Kv),Yv=(e,t)=>{let n=Object.create(qv);return n.value=e,n.scale=t,n},Xv=(e,t)=>{if(e!==Zv&&e%Qv===Zv)throw RangeError(`Value must be normalized`);let n=Yv(e,t);return n.normalized=n,n},Zv=BigInt(0),Qv=BigInt(10),$v=Xv(Zv,0),ey=e=>{if(e.normalized===void 0)if(e.value===Zv)e.normalized=$v;else{let t=`${e.value}`,n=0;for(let e=t.length-1;e>=0&&t[e]===`0`;e--)n++;n===0&&(e.normalized=e),e.normalized=Xv(BigInt(t.substring(0,t.length-n)),e.scale-n)}return e.normalized},ty=z(2,(e,t)=>t>e.scale?Yv(e.value*Qv**BigInt(t-e.scale),t):t<e.scale?Yv(e.value/Qv**BigInt(e.scale-t),t):e),ny=e=>e.value<Zv?Yv(-e.value,e.scale):e,ry=Rs((e,t)=>e.scale>t.scale?ty(t,e.scale).value===e.value:e.scale<t.scale?ty(e,t.scale).value===t.value:e.value===t.value),iy=z(2,(e,t)=>ry(e,t)),ay=e=>{let t=ey(e);if(Math.abs(t.scale)>=16)return oy(t);let n=t.value<Zv,r=n?`${t.value}`.substring(1):`${t.value}`,i,a;if(t.scale>=r.length)i=`0`,a=`0`.repeat(t.scale-r.length)+r;else{let e=r.length-t.scale;if(e>r.length){let t=e-r.length;i=`${r}${`0`.repeat(t)}`,a=``}else a=r.slice(e),i=r.slice(0,e)}let o=a===``?i:`${i}.${a}`;return n?`-${o}`:o},oy=e=>{if(sy(e))return`0e+0`;let t=ey(e),n=`${ny(t).value}`,r=n.slice(0,1),i=n.slice(1),a=`${cy(t)?`-`:``}${r}`;i!==``&&(a+=`.${i}`);let o=i.length-t.scale;return`${a}e${o>=0?`+`:``}${o}`},sy=e=>e.value===Zv,cy=e=>e.value<Zv;Nc()(`effect/DateTime/CurrentTimeZone`);var ly=`~effect/encoding/EncodingError`,uy=class extends mh(`EncodingError`){[ly]=ly},dy=e=>hy(typeof e==`string`?py.encode(e):e),fy=e=>{let t=my(e),n=t.length;if(n%4!=0)return il(new uy({kind:`Decode`,module:`Base64`,input:t,message:`Length must be a multiple of 4, but is ${n}`}));let r=t.indexOf(`=`);if(r!==-1&&(r<n-2||r===n-2&&t[n-1]!==`=`))return il(new uy({kind:`Decode`,module:`Base64`,input:t,message:`Found a '=' character, but it is not at the end`}));try{let e=t.endsWith(`==`)?2:+!!t.endsWith(`=`),r=new Uint8Array(n/4*3-e);for(let e=0,i=0;e<n;e+=4,i+=3){let n=gy(t.charCodeAt(e))<<18|gy(t.charCodeAt(e+1))<<12|gy(t.charCodeAt(e+2))<<6|gy(t.charCodeAt(e+3));r[i]=n>>16,r[i+1]=n>>8&255,r[i+2]=n&255}return rl(r)}catch(e){return il(new uy({kind:`Decode`,module:`Base64`,input:t,message:e instanceof Error?e.message:`Invalid input`}))}},py=new TextEncoder,my=e=>e.replace(/[\n\r]/g,``),hy=e=>{let t=e.length,n=``,r;for(r=2;r<t;r+=3)n+=_y[e[r-2]>>2],n+=_y[(e[r-2]&3)<<4|e[r-1]>>4],n+=_y[(e[r-1]&15)<<2|e[r]>>6],n+=_y[e[r]&63];return r===t+1&&(n+=_y[e[r-2]>>2],n+=_y[(e[r-2]&3)<<4],n+=`==`),r===t&&(n+=_y[e[r-2]>>2],n+=_y[(e[r-2]&3)<<4|e[r-1]>>4],n+=_y[(e[r-1]&15)<<2],n+=`=`),n};function gy(e){if(e>=vy.length)throw TypeError(`Invalid character ${String.fromCharCode(e)}`);let t=vy[e];if(t===255)throw TypeError(`Invalid character ${String.fromCharCode(e)}`);return t}var _y=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),vy=[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,62,255,255,255,63,52,53,54,55,56,57,58,59,60,61,255,255,255,0,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];function yy(e){return e.checks?e.checks[e.checks.length-1].annotations:e.annotations}function by(e){return t=>yy(t)?.[e]}var xy=by(`identifier`),Sy=by(`brands`),Cy=fa(e=>{let t=xy(e);return typeof t==`string`?t:e.getExpected(Cy)});function wy(e,t,n){return t===`__proto__`?Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}):e[t]=n,e}var Ty=new WeakMap,Ey=`~effect/data/Redacted`,Dy=e=>Da(e,Ey),Oy=(e,t)=>{let n=Object.create(ky);return t?.label&&(n.label=t.label),Ty.set(n,e),n},ky={[Ey]:{_A:e=>e},label:void 0,...Ho,toJSON(){return this.toString()},toString(){return`<redacted${ha(this.label)?`:`+this.label:``}>`},[Aa](){return ja(Ty.get(this))},[Ja](e){return Dy(e)&&Ya(Ty.get(this),Ty.get(e))}},Ay=`~effect/SchemaIssue/Issue`;function jy(e){return Da(e,Ay)}var My=class{[Ay]=Ay;toString(){return $y(this)}},Ny=class extends My{_tag=`Filter`;actual;filter;issue;constructor(e,t,n){super(),this.actual=e,this.filter=t,this.issue=n}},Py=class extends My{_tag=`Encoding`;ast;actual;issue;constructor(e,t,n){super(),this.ast=e,this.actual=t,this.issue=n}},Fy=class extends My{_tag=`Pointer`;path;issue;constructor(e,t){super(),this.path=e,this.issue=t}},Iy=class extends My{_tag=`MissingKey`;annotations;constructor(e){super(),this.annotations=e}},Ly=class extends My{_tag=`UnexpectedKey`;ast;actual;constructor(e,t){super(),this.ast=e,this.actual=t}},Ry=class extends My{_tag=`Composite`;ast;actual;issues;constructor(e,t,n){super(),this.ast=e,this.actual=t,this.issues=n}},zy=class extends My{_tag=`InvalidType`;ast;actual;constructor(e,t){super(),this.ast=e,this.actual=t}},By=class extends My{_tag=`InvalidValue`;actual;annotations;constructor(e,t){super(),this.actual=e,this.annotations=t}},Vy=class extends My{_tag=`Forbidden`;actual;annotations;constructor(e,t){super(),this.actual=e,this.annotations=t}},Hy=class extends My{_tag=`AnyOf`;ast;actual;issues;constructor(e,t,n){super(),this.ast=e,this.actual=t,this.issues=n}},Uy=class extends My{_tag=`OneOf`;ast;actual;successes;constructor(e,t,n){super(),this.ast=e,this.actual=t,this.successes=n}};function Wy(e,t){if(jy(t))return t;if(typeof t==`string`)return new By(B(e),{message:t});let n=typeof t.issue==`string`?new By(B(e),{message:t.issue}):t.issue;return new Fy(t.path,n)}function Gy(e,t){if(t!==void 0)return typeof t==`boolean`?t?void 0:new By(B(e)):Wy(e,t)}function Ky(e,t,n){return Array.isArray(n)?Sl(n)?n.length===1?Wy(e,n[0]):new Ry(t,B(e),jl(n,t=>Wy(e,t))):void 0:Gy(e,n)}var qy=e=>{let t=tb(e);if(t!==void 0)return t;switch(e._tag){case`InvalidType`:return Yy(Cy(e.ast),rb(e.actual));case`InvalidValue`:return`Invalid data ${rb(e.actual)}`;case`MissingKey`:return`Missing key`;case`UnexpectedKey`:return`Unexpected key with value ${yo(e.actual)}`;case`Forbidden`:return`Forbidden operation`;case`OneOf`:return`Expected exactly one member to match the input ${yo(e.actual)}`}},Jy=e=>tb(e.issue)??tb(e);function Yy(e,t){return`Expected ${e}, got ${t}`}function Xy(e,t,n,r){switch(e._tag){case`Filter`:{let i=r(e);if(i!==void 0)return[{path:t,message:i}];switch(e.issue._tag){case`InvalidValue`:return[{path:t,message:Yy(Zy(e.filter),yo(e.actual))}];default:return Xy(e.issue,t,n,r)}}case`Encoding`:return Xy(e.issue,t,n,r);case`Pointer`:return Xy(e.issue,[...t,...e.path],n,r);case`Composite`:return e.issues.flatMap(e=>Xy(e,t,n,r));case`AnyOf`:{let i=tb(e);return e.issues.length===0?i===void 0?[{path:t,message:Yy(Cy(e.ast),yo(e.actual))}]:[{path:t,message:i}]:e.issues.flatMap(e=>Xy(e,t,n,r))}default:return[{path:t,message:n(e)}]}}function Zy(e){let t=e.annotations?.expected;if(typeof t==`string`)return t;switch(e._tag){case`Filter`:return`<filter>`;case`FilterGroup`:return e.checks.map(e=>Zy(e)).join(` & `)}}function Qy(){return e=>Xy(e,[],qy,Jy).map(eb).join(`
|
|
16
|
-
`)}var $y=Qy();function eb(e){let t=e.message;if(e.path&&e.path.length>0){let n=So(e.path);t+=`\n at ${n}`}return t}function tb(e){switch(e._tag){case`InvalidType`:case`OneOf`:case`Composite`:case`AnyOf`:return nb(e.ast.annotations);case`InvalidValue`:case`Forbidden`:return nb(e.annotations);case`MissingKey`:return nb(e.annotations,`messageMissingKey`);case`UnexpectedKey`:return nb(e.ast.annotations,`messageUnexpectedKey`);case`Filter`:return nb(e.filter.annotations);case`Encoding`:return tb(e.issue)}}function nb(e,t=`message`){let n=e?.[t];if(typeof n==`string`)return n}function rb(e){return vc(e)?`no value provided`:yo(e.value)}function ib(e){let t;for(let n of e.reasons){if(!im(n)||!jy(n.error))return;t??=n.error}return t}function ab(e,t){let n=ib(e);if(n===void 0)throw Error(t,{cause:e});return n}var ob=class e extends na{run;constructor(e){super(),this.run=e}map(t){return new e((e,n)=>this.run(e,n).pipe(Mg(Dc(t))))}compose(t){return cb(this)?t:cb(t)?this:new e((e,n)=>this.run(e,n).pipe(Fg(e=>t.run(e,n))))}},sb=new ob(V);function cb(e){return e.run===sb.run}function lb(){return sb}function ub(e){return new ob((t,n)=>vc(t)?jh:e(t.value,n))}function db(e){return pb(Dc(e))}function fb(e){return ub((t,n)=>e(t,n).pipe(Mg(B)))}function pb(e){return new ob(t=>V(e(t)))}function mb(){return new ob(()=>jh)}function hb(e){return new ob(t=>{let n=Ac(t,xa);return yc(n)?V(n):Mg(e,B)})}function gb(){return db(globalThis.String)}function _b(){return db(globalThis.Number)}function vb(){return db(e=>new globalThis.Date(e))}function yb(e){return ub(t=>Uh({try:()=>B(JSON.parse(t,e?.reviver)),catch:e=>new By(B(t),{message:globalThis.String(e)})}))}function bb(e){return ub(t=>Uh({try:()=>B(JSON.stringify(t,e?.replacer,e?.space)),catch:e=>new By(B(t),{message:globalThis.String(e)})}))}function xb(){return db(dy)}function Sb(){return fb(e=>Ng(Gh(fy(e)),t=>new By(B(e),{message:t.message})))}var Cb=`~effect/SchemaTransformation/Transformation`,wb=class e{[Cb]=Cb;_tag=`Transformation`;decode;encode;constructor(e,t){this.decode=e,this.encode=t}flip(){return new e(this.encode,this.decode)}compose(t){return new e(this.decode.compose(t.decode),t.encode.compose(this.encode))}};function Tb(e){return Da(e,Cb)}var Eb=e=>Tb(e)?e:new wb(e.decode,e.encode);function Db(e){return new wb(fb(e.decode),fb(e.encode))}function Ob(e){return new wb(db(e.decode),db(e.encode))}var kb=new wb(lb(),lb());function Ab(){return kb}var jb=new wb(_b(),gb()),Mb=new wb(vb(),db(Co)),Nb=e=>Ta(e)&&typeof e.message==`string`,Pb=e=>{let t=Object.hasOwn(e,`cause`)?Error(e.message,{cause:Rb(e.cause)}):Error(e.message);return typeof e.name==`string`&&e.name!==`Error`&&(t.name=e.name),typeof e.stack==`string`&&(t.stack=e.stack),t},Fb=e=>{try{let t=To(e);return t===void 0?yo(e):JSON.parse(t)}catch{return yo(e)}},Ib=(e,t,n)=>{let r={name:e.name,message:typeof e.message==`string`?e.message:``};return t?.includeStack&&typeof e.stack==`string`&&(r.stack=e.stack),!t?.excludeCause&&e.cause!==void 0&&(r.cause=n(e.cause)),r},Lb=e=>{let t=new WeakSet,n=r=>{if(ka(r)){if(t.has(r))return`[Circular]`;t.add(r);let i=Ib(r,e,n);return t.delete(r),i}return Fb(r)};return n},Rb=e=>Nb(e)?Pb(e):e,zb=e=>Ob({decode:Rb,encode:Lb(e)}),Bb=new wb(Sb(),xb()),Vb=new wb(yb(),bb());function Hb(e){return t=>t._tag===e}var Ub=Hb(`Declaration`),Wb=Hb(`Null`),Gb=Hb(`Void`),Kb=Hb(`Never`),qb=Hb(`Literal`),Jb=Hb(`UniqueSymbol`),Yb=Hb(`Arrays`),Xb=Hb(`Objects`),Zb=Hb(`Union`),Qb=Hb(`Suspend`),$b=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},ex={},tx=class{isOptional;isMutable;defaultValue;annotations;constructor(e,t,n=void 0,r=void 0){this.isOptional=e,this.isMutable=t,this.defaultValue=n,this.annotations=r}},nx=`~effect/Schema`,rx=class{[nx]=nx;annotations;checks;encoding;context;constructor(e=void 0,t=void 0,n=void 0,r=void 0){this.annotations=e,this.checks=t,this.encoding=n,this.context=r}toString(){return`<${this._tag}>`}},ix=class e extends rx{_tag=`Declaration`;typeParameters;run;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.typeParameters=e,this.run=t,this.encodingChecks=o}getParser(){let e=this.run(this.typeParameters);return(t,n)=>vc(t)?jh:Mg(e(t.value,this,n),B)}_rebuild(t,n,r){let i=pS(this.typeParameters,t);return i===this.typeParameters&&n===this.checks&&r===this.encodingChecks?this:new e(i,this.run,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){let e=this.annotations?.expected;return typeof e==`string`?e:`<Declaration>`}},ax=new class extends rx{_tag=`Null`;getParser(){return DS(this,null)}getExpected(){return`null`}},ox=class extends rx{_tag=`Undefined`;getParser(){return DS(this,void 0)}toCodecJson(){return rS(this,[sx])}getExpected(){return`undefined`}},sx=new $b(ax,new wb(db(()=>void 0),db(()=>null))),cx=new ox,lx=new class extends rx{_tag=`Void`;getParser(){return DS(this,void 0)}toCodecJson(){return rS(this,[sx])}getExpected(){return`void`}},ux=new class extends rx{_tag=`Never`;getParser(){return OS(this,Ca)}getExpected(){return`never`}},dx=new class extends rx{_tag=`Unknown`;getParser(){return OS(this,wa)}getExpected(){return`unknown`}},fx=class extends rx{_tag=`Literal`;literal;constructor(e,t,n,r,i){if(super(t,n,r,i),typeof e==`number`&&!globalThis.Number.isFinite(e))throw Error(`A numeric literal must be finite, got ${yo(e)}`);this.literal=e}getParser(){return DS(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?px(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:px(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function px(e){let t=globalThis.String(e.literal);return rS(e,[new $b(new fx(t),new wb(db(()=>e.literal),db(()=>t)))])}var mx=new class extends rx{_tag=`String`;getParser(){return OS(this,ha)}matchPart(e,t){return kS(this,e,t)}getExpected(){return`string`}},hx=class extends rx{_tag=`Number`;getParser(){return OS(this,ga)}matchKey(e,t){return this._match(NS,e,t)}matchPart(e,t){return this._match(MS,e,t)}_match(e,t,n){return e.test(t)?kS(this,globalThis.Number(t),n):void 0}toCodecJson(){return this.checks&&(gx(this.checks,`isFinite`)||gx(this.checks,`isInt`))?this:rS(this,[qx])}toCodecStringTree(){return this.checks&&(gx(this.checks,`isFinite`)||gx(this.checks,`isInt`))?rS(this,[IS]):rS(this,[LS])}getExpected(){return`number`}};function gx(e,t){return e.some(e=>{switch(e._tag){case`Filter`:return e.annotations?.meta?._tag===t;case`FilterGroup`:return gx(e.checks,t)}})}var _x=new hx,vx=new class extends rx{_tag=`Boolean`;getParser(){return OS(this,_a)}getExpected(){return`boolean`}},yx=class e extends rx{_tag=`Arrays`;isMutable;elements;rest;encodingChecks;constructor(e,t,n,r,i,a,o,s){super(r,i,a,o),this.isMutable=e,this.elements=t,this.rest=n,this.encodingChecks=s;let c=t.findIndex(xS);if(c!==-1&&(t.slice(c+1).some(e=>!xS(e))||n.length>1))throw Error(`A required element cannot follow an optional element. ts(1257)`);if(n.length>1&&n.slice(1).some(xS))throw Error(`An optional element cannot follow a rest element. ts(1266)`)}getParser(e){let t=this,n=t.elements.map(t=>({ast:t,parser:e(t)})),r=t.rest.map(t=>({ast:t,parser:e(t)})),i=n.length,[a,...o]=r,s=o.length;function c(e,t){return t<i?n[t]:t>=e?o[t-e]:a}return Ig(function*(e,n){if(e._tag===`None`)return e;let r=e.value;if(!Array.isArray(r))return yield*zh(new zy(t,e));let a=r.length,o={ast:t,getParser:c,oinput:e,len:a,tailThreshold:xx(a,i,s),output:new globalThis.Array(a),issues:void 0,options:n},l=bx(o,r,{concurrency:Sx(n?.concurrency)?.concurrency,end:t.rest.length===0?i:Math.max(a,i+s)});if(l&&(yield*l),t.rest.length===0&&a>i)for(let s=i;s<=a-1;s++){let i=new Fy([s],new Ly(t,r[s]));if(n.errors===`all`)o.issues?o.issues.push(i):o.issues=[i];else return yield*zh(new Ry(t,e,[i]))}return o.issues?yield*zh(new Ry(t,e,o.issues)):B(o.output)})}_rebuild(t,n,r){let i=pS(this.elements,t),a=pS(this.rest,t);return i===this.elements&&a===this.rest&&n===this.checks&&r===this.encodingChecks?this:new e(this.isMutable,i,a,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}},bx=gp()({onItem(e,t,n){let r=n<e.len?B(t):gc();return e.getParser(e.tailThreshold,n).parser(r,e.options)},step(e,t,n,r){if(n._tag===`Failure`)return Cx(e,e.ast,r,n);if(n.value._tag===`Some`)e.output[r]=n.value.value;else{let t=e.getParser(e.tailThreshold,r);if(xS(t.ast))return;let n=new Fy([r],new Iy(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return Em(new Ry(e.ast,e.oinput,[n]))}}});function xx(e,t,n){return Math.max(t,e-n)}var Sx=e=>(e=e===`unbounded`?1/0:e??1,e>1?{concurrency:e}:void 0),Cx=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=ib(r.cause);if(i===void 0)return Tm(fm(r.cause,r=>new Ry(t,e.oinput,[new Fy([n],r)])));let a=new Fy([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return Em(new Ry(t,e.oinput,[a]))},wx=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function Tx(e,t,n=ex){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(AS(CS(t)))}var Ex=class{name;type;constructor(e,t){this.name=e,this.type=t}},Dx=class e{decode;encode;constructor(e,t){this.decode=e,this.encode=t}flip(){return new e(this.encode,this.decode)}};function Ox(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(Ox);default:return!1}}function kx(e){return Ox(e)&&Ox(CS(e))}var Ax=class{parameter;type;merge;constructor(e,t,n){if(!kx(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,this.merge=n,xS(t)&&!ES(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},jx=class e extends rx{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o;let s=e.map(e=>e.name).filter((e,t,n)=>n.indexOf(e)!==t);if(s.length>0)throw Error(`Duplicate identifiers: ${JSON.stringify(s)}. ts(2300)`)}getParser(e){let t=this,n=[],r=new Set,i=[];for(let a of t.propertySignatures)n.push(a.name),r.add(a.name),i.push({ps:a,parser:e(a.type),name:a.name,type:a.type});let a=t.indexSignatures.length;if(t.propertySignatures.length===0&&t.indexSignatures.length===0)return OS(t,Sa);let o=a>0?gp()({onItem:Ig(function*(n,[i,a]){let o=e(AS(a.parameter))(B(i),n.options),s=Xd(o)?o:yield*Xh(o);if(s._tag===`Failure`){let e=Cx(n,t,i,s);e&&(yield*e);return}let c=B(n.input[i]),l=e(a.type)(c,n.options),u=Xd(l)?l:yield*Xh(l);if(u._tag===`Failure`){let e=Cx(n,t,i,u);e&&(yield*e);return}else if(s.value._tag===`Some`&&u.value._tag===`Some`){let e=s.value.value;if(r.has(i)||r.has(e))return;let t=u.value.value;if(a.merge&&a.merge.decode&&Object.hasOwn(n.out,e)){let[r,i]=a.merge.decode.combine([e,n.out[e]],[e,t]);wy(n.out,r,i)}else wy(n.out,e,t)}}),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0;return Ig(function*(e,s){if(e._tag===`None`)return e;let c=e.value;if(!(typeof c==`object`&&c&&!Array.isArray(c)))return yield*zh(new zy(t,e));let l={},u={ast:t,oinput:e,input:c,out:l,issues:void 0,options:s},d=s.errors===`all`,f=s.onExcessProperty===`error`,p=s.onExcessProperty===`preserve`,m;if(t.indexSignatures.length===0&&(f||p)){m=Reflect.ownKeys(c);for(let n=0;n<m.length;n++){let i=m[n];if(!r.has(i))if(f){let n=new Fy([i],new Ly(t,c[i]));if(d){u.issues?u.issues.push(n):u.issues=[n];continue}else return yield*zh(new Ry(t,e,[n]))}else wy(l,i,c[i])}}let h=Sx(s?.concurrency),g=Mx(u,i,h);if(g&&(yield*g),o){let e=kl();for(let n=0;n<a;n++){let r=t.indexSignatures[n],i=Tx(c,r.parameter,s);for(let t=0;t<i.length;t++){let n=i[t];e.push([n,r])}}let n=o(u,e,h);n&&(yield*n)}if(u.issues)return yield*zh(new Ry(t,e,u.issues));if(s.propertyOrder===`original`){let e=(m??Reflect.ownKeys(c)).concat(n),t={};for(let n of e)Object.hasOwn(l,n)&&wy(t,n,l[n]);return B(t)}return B(l)})}_rebuild(t,n,r,i,a){let o=pS(this.propertySignatures,e=>{let n=t(e.type);return n===e.type?e:new Ex(e.name,n)}),s=pS(this.indexSignatures,e=>{let i=n(e.parameter),a=t(e.type),o=r?e.merge?.flip():e.merge;return i===e.parameter&&a===e.type&&o===e.merge?e:new Ax(i,a,o)});return o===this.propertySignatures&&s===this.indexSignatures&&i===this.checks&&a===this.encodingChecks?this:new e(o,s,this.annotations,i,void 0,this.context,a)}flip(e){return this._rebuild(e,e,!0,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,!1,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}},Mx=gp()({onItem(e,t){let n=Object.hasOwn(e.input,t.name)?B(e.input[t.name]):gc();return t.parser(n,e.options)},step(e,t,n){if(n._tag===`Failure`)return Cx(e,e.ast,t.name,n);if(n.value._tag===`Some`)wy(e.out,t.name,n.value.value);else if(!xS(t.type)){let n=new Fy([t.name],new Iy(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}else return Em(new Ry(e.ast,e.oinput,[n]))}}});function Nx(e,t){return e?t?[...e,...t]:e:t}function Px(e,t,n){return new jx(Reflect.ownKeys(e).map(t=>new Ex(t,e[t].ast)),[],n,t)}function Fx(e){return e.ast}function Ix(e,t=void 0){return new yx(!1,e.map(e=>e.ast),[],void 0,t)}function Lx(e,t,n){return new Wx(e.map(Fx),t,void 0,n)}function Rx(e){switch(e._tag){case`Null`:return[`null`];case`Undefined`:case`Void`:return[`undefined`];case`String`:case`TemplateLiteral`:return[`string`];case`Number`:return[`number`];case`Boolean`:return[`boolean`];case`Symbol`:case`UniqueSymbol`:return[`symbol`];case`BigInt`:return[`bigint`];case`Arrays`:return[`array`];case`ObjectKeyword`:return[`object`,`array`,`function`];case`Objects`:return e.propertySignatures.length||e.indexSignatures.length?[`object`]:[`object`,`array`];case`Enum`:return Array.from(new Set(e.enums.map(([,e])=>typeof e)));case`Literal`:return[typeof e.literal];case`Union`:return Array.from(new Set(e.types.flatMap(Rx)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function zx(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[`~sentinels`];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!xS(t)){if(qb(t))return[{key:e.name,literal:t.literal}];if(Jb(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>qb(e)&&!xS(e)?[{key:t,literal:e.literal}]:[]);case`Suspend`:return zx(e.thunk())}}var Bx=new WeakMap;function Vx(e){let t=Bx.get(e);if(t)return t;t={};for(let n of e){let e=CS(n);if(Kb(e))continue;let r=Rx(e),i=zx(e);t.byType??={};for(let e of r)(t.byType[e]??=[]).push(n);if(i.length>0){t.bySentinel??=new Map;for(let{key:e,literal:r}of i){let i=t.bySentinel.get(e);i||t.bySentinel.set(e,i=new Map);let a=i.get(r);a||i.set(r,a=[]),a.push(n)}}else{t.otherwise??={};for(let e of r)(t.otherwise[e]??=[]).push(n)}}return Bx.set(e,t),t}function Hx(e){return t=>{let n=CS(t);return n._tag===`Literal`?n.literal===e:n._tag===`UniqueSymbol`?n.symbol===e:!0}}function Ux(e,t){let n=Vx(t),r=e===null?`null`:Array.isArray(e)?`array`:typeof e;if(n.bySentinel){let t=n.otherwise?.[r]??[];if(r===`object`||r===`array`){for(let[r,i]of n.bySentinel)if(Object.hasOwn(e,r)){let n=i.get(e[r]);if(n)return[...n,...t].filter(Hx(e))}}return t}return(n.byType?.[r]??[]).filter(Hx(e))}var Wx=class e extends rx{_tag=`Union`;types;mode;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.mode=t,this.encodingChecks=o}getParser(e){let t=this;return(n,r)=>{if(n._tag===`None`)return V(n);let i=n.value,a=Ux(i,t.types),o={ast:t,recur:e,oinput:n,input:i,out:void 0,successes:[],issues:void 0,options:r},s=Gx(o,a,Sx(r?.concurrency));return s?Kh(s,e=>o.out?V(o.out):zh(new Hy(t,i,o.issues??[]))):o.out?V(o.out):zh(new Hy(t,i,o.issues??[]))}}_rebuild(t,n,r){let i=pS(this.types,t);return i===this.types&&n===this.checks&&r===this.encodingChecks?this:new e(i,this.mode,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=CS(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(qb);if(t.length>0)return`${Jx(n.isMutable)}[ ${t.map(t=>e(t)+Yx(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>qb(e.type));if(t.length>0)return`{ ${t.map(t=>`${Jx(t.type.context?.isMutable)}${xo(t.name)}${Yx(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}},Gx=gp()({onItem(e,t){return e.recur(t)(e.oinput,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=ib(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.ast.mode===`oneOf`)return e.successes.push(t),Em(new Uy(e.ast,e.input,e.successes));if(e.out=n.value,e.successes.push(t),e.ast.mode===`anyOf`)return Dm}}}),Kx=new Wx([new fx(`Infinity`),new fx(`-Infinity`),new fx(`NaN`)],`anyOf`),qx=new $b(new Wx([_x,Kx],`anyOf`),new wb(_b(),db(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function Jx(e){return e?``:`readonly `}function Yx(e){return e?`?`:``}function Xx(e){let t=!1,n;return()=>t?n:(n=e(),t=!0,n)}var Zx=class e extends rx{_tag=`Suspend`;thunk;constructor(e,t,n,r,i){if(n!==void 0)throw Error(`Cannot add checks to Suspend`);super(t,void 0,r,i),this.thunk=Xx(e)}getParser(e){return e(this.thunk())}recur(t){return new e(()=>t(this.thunk()),this.annotations,void 0,void 0,this.context)}getExpected(e){return e(this.thunk())}},Qx=class e extends na{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(t){return new e(this.run,{...this.annotations,...t},this.aborted)}abort(){return new e(this.run,this.annotations,!0)}and(e,t){return new $x([this,e],t)}},$x=class e extends na{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(t){return new e(this.checks,{...this.annotations,...t})}and(t,n){return new e([this,t],n)}};function eS(e,t,n=!1){return new Qx((t,n,r)=>Ky(t,n,e(t,n,r)),t,n)}function tS(e,t){let n=e.source;return eS(t=>e.test(t),{expected:`a string matching the RegExp ${n}`,meta:{_tag:`isPattern`,regExp:e},arbitrary:{constraint:{patterns:[e.source]}},...t})}function nS(e,t){let n=Object.getOwnPropertyDescriptors(e);return t(n),Object.create(Object.getPrototypeOf(e),n)}function rS(e,t){return e.encoding===t?e:nS(e,e=>{e.encoding.value=t})}function iS(e,t){return e.context===t?e:nS(e,e=>{e.context.value=t})}function aS(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return oS(e,yl(e.checks.slice(0,-1),n.annotate(t)))}return nS(e,e=>{e.annotations.value={...e.annotations.value,...t}})}function oS(e,t){if(e._tag===`Suspend`&&t!==void 0)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:nS(e,e=>{e.checks.value=t})}function sS(e,t){return oS(e,Nx(e.checks,t))}function cS(e,t){let n=e,r=n[n.length-1],i=t(r.to);return i===r.to?e:yl(e.slice(0,e.length-1),new $b(i,r.transformation))}function lS(e){return t=>t.encoding?rS(t,cS(t.encoding,e)):t}function uS(e){function t(n){return n.encoding?rS(n,cS(n.encoding,t)):e(n)}return fa(t)}function dS(e,t,n){let r=new $b(e,t);return rS(n,n.encoding?[...n.encoding,r]:[r])}function fS(e,t){let n=Sy(e);return aS(e,{brands:n?[...n,t]:[t]})}function pS(e,t){let n=!1,r=Array(e.length);for(let i=0;i<e.length;i++){let a=e[i],o=t(a);o!==a&&(n=!0),r[i]=o}return n?r:e}function mS(e,t){return iS(e,e.context?new tx(e.context.isOptional,e.context.isMutable,e.context.defaultValue,{...e.context.annotations,...t}):new tx(!1,!1,void 0,t))}var hS=lS(gS);function gS(e){return hS(iS(e,e.context?e.context.isOptional===!1?new tx(!0,e.context.isMutable,e.context.defaultValue,e.context.annotations):e.context:new tx(!0,!1)))}function _S(e,t){let n=[new $b(dx,new wb(hb(t),lb()))];return iS(e,e.context?new tx(e.context.isOptional,e.context.isMutable,n,e.context.annotations):new tx(!1,!1,n))}function vS(e,t,n){return dS(e,n,t)}function yS(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:ya(e.literal)&&t.push(e.literal);return;case`UniqueSymbol`:t.push(e.symbol);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)r(e.types[t]);return;default:n.push(e)}}return r(e),{literals:t,parameters:n}}function bS(e,t,n){let{literals:r,parameters:i}=yS(e);return new jx(r.map(e=>new Ex(e,t)),i.map(e=>new Ax(e,t,n)))}function xS(e){return e.context?.isOptional??!1}var SS=fa(e=>{if(e.encoding)return SS(rS(e,void 0));let t=e,n=t.recur?.(SS)??t,r=n.encodingChecks;return r?nS(n,t=>{t.encodingChecks.value=void 0,n===e&&(t.checks.value=Nx(n.checks,r))}):n}),CS=fa(e=>SS(TS(e)));function wS(e,t){let n=t,r=n.length,i=n[r-1],a=[new $b(TS(rS(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new $b(TS(n[e-1].to),n[e].transformation.flip()));let o=TS(i.to);return o.encoding?rS(o,[...o.encoding,...a]):rS(o,a)}var TS=fa(e=>{if(e.encoding)return wS(e,e.encoding);let t=e;return t.flip?.(TS)??t.recur?.(TS)??t});function ES(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(ES);default:return!1}}function DS(e,t){let n=Mh(t);return r=>r._tag===`None`?jh:r.value===t?n:zh(new zy(e,r))}function OS(e,t){return n=>n._tag===`None`?jh:t(n.value)?V(n):zh(new zy(e,n))}function kS(e,t,n){if(n?.disableChecks||e.checks===void 0)return t;let r=[];return RS(e.checks,t,r,e,n),r.length===0?t:void 0}var AS=uS(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(AS)}}),jS=uS(e=>{switch(e._tag){default:return e;case`Symbol`:case`UniqueSymbol`:return e.toCodecStringTree();case`Union`:return e.recur(jS)}}),MS=new globalThis.RegExp(`^${wx}$`),NS=new globalThis.RegExp(`(?:${wx}|Infinity|-Infinity|NaN)`);function PS(e){return tS(MS,{expected:`a string representing a finite number`,meta:{_tag:`isStringFinite`,regExp:MS},...e})}var FS=sS(mx,[PS()]),IS=new $b(FS,jb),LS=new $b(new Wx([FS,Kx],`anyOf`),jb);function RS(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`)RS(o.checks,t,n,r,i);else{let e=o.run(t,r,i);if(e&&(n.push(new Ny(t,o,e)),o.aborted||i?.errors!==`all`))return}}}var zS=`~effect/Schema/Class`,BS=`~structural`,VS=by;function HS(e){let t=new Set,n=new Set;return r(e);function r(e){if(e===null||typeof e==`string`||typeof e==`boolean`)return!0;if(typeof e==`number`)return globalThis.Number.isFinite(e);if(typeof e!=`object`||e===void 0||t.has(e))return!1;if(n.has(e))return!0;t.add(e);let i=Array.isArray(e)?e.every(r):Object.keys(e).every(t=>r(e[t]));return t.delete(e),i&&n.add(e),i}}var US=new ix([],()=>(e,t)=>HS(e)?V(e):zh(new zy(t,B(e))),{typeConstructor:{_tag:`effect/Json`},generation:{runtime:`Schema.Json`,Type:`Schema.Json`},expected:`JSON value`,toCodecJson:()=>new $b(dx,Ab()),toArbitrary:()=>e=>e.jsonValue()}),WS=new $b(ax,new wb(lb(),db(()=>null))),GS=new $b(US,Ab());function KS(e){let t=new Set;return n(e);function n(e){return e===void 0||typeof e==`string`?!0:typeof e!=`object`||!e||t.has(e)?!1:(t.add(e),Array.isArray(e)?e.every(n):Object.keys(e).every(t=>n(e[t])))}}var qS=new $b(new ix([],()=>(e,t)=>KS(e)?V(e):zh(new zy(t,B(e))),{expected:`StringTree`}),Ab()),JS=e=>e,YS=z(2,(e,t)=>e===void 0?void 0:t(e)),XS=fa(e=>{switch(e._tag){case`Declaration`:{let t=e.annotations?.[zS];if(ba(t)){let n=t(e.typeParameters),r=XS(n.to);return rS(e,r===n.to?[n]:[new $b(r,n.transformation)])}return e}case`Objects`:case`Arrays`:return e.recur(e=>{let t=e.context?.defaultValue;return t?rS(XS(e),t):XS(e)});case`Suspend`:return e.recur(XS);default:return e}});function ZS(e){let t=aC(XS(SS(e.ast)));return(e,n)=>t(e,n?.disableChecks?n?.parseOptions?{...n.parseOptions,disableChecks:!0}:{disableChecks:!0}:n?.parseOptions)}function QS(e){let t=ZS(e);return(e,n)=>{let r=Ag(t(e,n));return Om(r)?B(r.value):(ab(r.cause,`Option adapter can only return none for schema issues`),gc())}}function $S(e){let t=ZS(e);return(e,n)=>{let r=Ag(t(e,n));if(Om(r))return r.value;let i=ab(r.cause,`Constructor adapter can only throw schema issues`);throw Error(i.toString(),{cause:i})}}function eC(e,t){let n=aC(e.ast);return t===void 0?n:(e,r)=>n(e,iC(t,r))}function tC(e,t){return sC(eC(e,t))}var nC=tC;function rC(e,t){let n=aC(TS(e.ast));return t===void 0?n:(e,r)=>n(e,iC(t,r))}var iC=(e,t)=>t===void 0?e:{...e,...t};function aC(e){let t=lC(e);return(e,n)=>Fg(t(B(e),n??ex),e=>e._tag===`None`?zh(new By(e)):V(e.value))}function oC(e){return(t,n)=>Ag(e(t,n))}function sC(e){let t=oC(e);return(e,n)=>{let r=t(e,n);return Om(r)?B(r.value):(ab(r.cause,`Option adapter can only return none for schema issues`),gc())}}function cC(e,t){return tg(e,e=>Vh(()=>fm(e,t)))}var lC=fa(e=>{let t,n=e.checks,r=e.encoding,i=r,a=i?.length??0,o=e.encodingChecks,s=(n?n[n.length-1].annotations:e.annotations)?.parseOptions;if(!e.context&&!r&&!n&&!o)return(n,r)=>(t??=e.getParser(lC),s&&(r={...r,...s}),t(n,r));let c=Yb(e)||Xb(e)||Ub(e)&&e.typeParameters.length>0,l=n&&c?n.filter(e=>e.annotations?.[BS]):void 0;return(r,c)=>{s&&(c={...c,...s});let u;if(i){for(let e=a-1;e>=0;e--){let t=i[e],n=t.to,a=lC(n);if(u=u?Fg(u,e=>a(e,c)):a(r,c),t.transformation._tag===`Transformation`){let e=t.transformation.decode;u=Fg(u,t=>e.run(t,c))}else u=t.transformation.decode(u,c)}u=cC(u,t=>new Py(e,r,t))}t??=e.getParser(lC);let d=r=>{let i=t(r,c);return o&&!c?.disableChecks&&(i=Fg(i,t=>{if(yc(r)&&yc(t)){let t=[];if(RS(o,r.value,t,e,c),xl(t))return zh(new Ry(e,r,t))}return V(t)})),n&&!c?.disableChecks&&(c?.errors===`all`&&l&&l.length>0&&yc(r)&&(i=cC(i,t=>{let n=[];return RS(l,r.value,n,e,c),xl(n)?t._tag===`Composite`&&t.ast===e?new Ry(e,t.actual,[...t.issues,...n]):new Ry(e,r,[t,...n]):t})),i=Fg(i,t=>{if(yc(t)){let r=t.value,i=[];if(RS(n,r,i,e,c),xl(i))return zh(new Ry(e,t,i))}return V(t)})),i};return u?Fg(u,d):d(r)}}),uC=`~effect/Schema/Schema`,dC={[uC]:uC,pipe(){return ea(this,arguments)},annotate(e){return this.rebuild(aS(this.ast,e))},annotateKey(e){return this.rebuild(mS(this.ast,e))},check(...e){return this.rebuild(sS(this.ast,e))}};function fC(e,t){let n=Object.create(dC);return t&&Object.assign(n,t),n.ast=e,n.rebuild=e=>fC(e,t),n.makeEffect=(e,t)=>hC(ZS(n)(e,t)),n.make=$S(n),n.makeOption=QS(n),n}var pC=`~effect/Schema/SchemaError`,mC=class extends mh(`SchemaError`){[pC]=pC;constructor(e){super({issue:e})}get message(){return this.issue.toString()}toString(){return`SchemaError(${this.message})`}};function hC(e){return tg(e,e=>Vh(()=>fm(e,e=>new mC(e))))}function gC(e){return tg(e,e=>Vh(()=>fm(e,e=>e.issue)))}var _C=yC(vC);function vC(e){switch(e._tag){case`BigInt`:case`Symbol`:case`UniqueSymbol`:return 0;default:return 1}}function yC(e){return t=>{let n=new Map;for(let e=0;e<t.length;e++)n.set(CS(t[e]),e);let r=[...t].sort((t,r)=>{t=CS(t),r=CS(r);let i=e(t),a=e(r);return i===a?n.get(t)-n.get(r):i-a});return r.some((e,n)=>e!==t[n])?r:t}}var bC=uC;function xC(){return(e,t,n)=>PC(new ix(e.map(Fx),e=>t(e.map(e=>PC(e))),n))}function SC(e,t){return xC()([],()=>(t,n)=>e(t)?V(t):zh(new zy(n,B(t))),t)}function CC(e){return Da(e,pC)}function wC(e,t){let n=eC(e,t);return(e,t)=>hC(n(e,t))}var TC=wC;function EC(e,t){let n;for(let r of e.reasons){if(!im(r)||!CC(r.error))throw new globalThis.Error(t,{cause:e});n??=r.error}if(n===void 0)throw new globalThis.Error(t,{cause:e});return n}function DC(e){let t=Ag(e);if(Om(t))return t.value;throw EC(t.cause,`Sync adapter can only throw schema errors`)}var OC=nC;function kC(e,t){let n=wC(e,t);return(e,t)=>DC(n(e,t))}var AC=kC;function jC(e,t){let n=rC(e,t);return(e,t)=>hC(n(e,t))}function MC(e,t){let n=jC(e,t);return(e,t)=>DC(n(e,t))}var NC=MC,PC=fC;function FC(e){return Da(e,bC)&&e[bC]===bC}var IC=JS(e=>PC(gS(e.ast),{schema:e})),H=JS(e=>IC(tw(e))),LC=JS(e=>PC(SS(e.ast),{schema:e})),RC=JS(e=>PC(CS(e.ast),{schema:e}));function zC(e){let t=PC(new fx(e),{literal:e,transform(n){return t.pipe(aw(zC(n),{decode:db(()=>n),encode:db(()=>e)}))}});return t}var BC=PC(ux),VC=PC(dx),HC=PC(ax),UC=PC(cx),U=PC(mx),W=PC(_x),WC=PC(vx),GC=PC(lx);function KC(e,t){return PC(e,{fields:t,mapFields(e,t){let n=e(this.fields);return KC(Px(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function G(e){return KC(Px(e,void 0),e)}function qC(e,t,n){let r=n?.keyValueCombiner?.decode||n?.keyValueCombiner?.encode?new Dx(n.keyValueCombiner.decode,n.keyValueCombiner.encode):void 0;return PC(bS(e.ast,t.ast,r),{key:e,value:t})}function JC(e,t){return PC(e,{elements:t,mapElements(e,t){let n=e(this.elements);return JC(Ix(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function YC(e){return JC(Ix(e),e)}var K=JS(e=>PC(new yx(!1,[],[e.ast]),{value:e})),XC=JS(e=>PC(new yx(!1,[e.ast],[e.ast]),{value:e}));function ZC(e,t){return PC(e,{members:t,mapMembers(e,t){let n=e(this.members);return ZC(Lx(n,this.ast.mode,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function QC(e,t){return ZC(Lx(e,t?.mode??`anyOf`,void 0),e)}function $C(e){let t=e.map(zC);return PC(Lx(t,`anyOf`,void 0),{literals:e,members:t,mapMembers(e){return QC(e(this.members))},pick(e){return $C(e)},transform(e){return QC(t.map((t,n)=>t.transform(e[n])))}})}var ew=JS(e=>QC([e,HC])),tw=JS(e=>QC([e,UC]));function nw(e){return PC(new Zx(()=>e().ast))}function rw(...e){return t=>t.check(...e)}function iw(e){return t=>PC(fS(t.ast,e),{schema:t,identifier:e})}function aw(e,t){return n=>PC(vS(n.ast,e.ast,t?Eb(t):Ab()),{from:n,to:e})}function ow(e,t){return n=>t?aw(n,t)(e):aw(n)(e)}function sw(e){return t=>PC(_S(t.ast,gC(e)),{schema:t})}function cw(e,t){let n=t?.encodingStrategy===`omit`?mb():lb();return t=>IC(RC(t)).pipe(aw(t,{decode:hb(gC(e)),encode:n}))}function lw(e,t){return n=>LC(n).pipe(cw(e,t),ow(IC(n)))}function uw(e,t){let n=t?.encodingStrategy===`omit`?mb():lb();return t=>H(RC(t)).pipe(aw(t,{decode:hb(gC(e)),encode:n}))}function dw(e,t){return n=>LC(n).pipe(uw(e,t),ow(H(n)))}function fw(e){return zC(e).pipe(sw(V(e)))}function pw(e,t){return G({_tag:fw(e),...t})}function mw(e,t){return SC(t=>t instanceof e,t)}function hw(){return(e,t)=>new $b(e.ast,Eb(t))}var gw=eS,_w=tS;function vw(e){return gw(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,meta:{_tag:`isFinite`},arbitrary:{constraint:{noInfinity:!0,noNaN:!0}},...e})}function yw(e){let t=hc(e.order),n=e.formatter??yo;return(r,i)=>gw(e=>t(e,r),{expected:`a value greater than or equal to ${n(r)}`,arbitrary:{constraint:{ordered:{order:e.order,minimum:r}}},...e.annotate?.(r),...i})}function bw(e){let t=hc(e.order),n=pc(e.order),r=mc(e.order),i=fc(e.order),a=e.formatter??yo;return(o,s)=>{let c=o.exclusiveMinimum?n:t,l=o.exclusiveMaximum?i:r;return gw(e=>c(e,o.minimum)&&l(e,o.maximum),{expected:`a value between ${a(o.minimum)}${o.exclusiveMinimum?` (excluded)`:``} and ${a(o.maximum)}${o.exclusiveMaximum?` (excluded)`:``}`,arbitrary:{constraint:{ordered:{order:e.order,minimum:o.minimum,maximum:o.maximum,...o.exclusiveMinimum&&{exclusiveMinimum:!0},...o.exclusiveMaximum&&{exclusiveMaximum:!0}}}},...e.annotate?.(o),...s})}}var xw=yw({order:lc,annotate:e=>({meta:{_tag:`isGreaterThanOrEqualTo`,minimum:e}})}),Sw=bw({order:lc,annotate:e=>({meta:{_tag:`isBetween`,...e}})});function Cw(e){return PC(xC()([e],([e])=>(t,n,r)=>_c(t)?vc(t)?jh:Pg(eC(e)(t.value,r),{onSuccess:B,onFailure:e=>new Ry(n,B(t),[new Fy([`value`],e)])}):zh(new zy(n,B(t))),{typeConstructor:{_tag:`effect/Option`},generation:{runtime:`Schema.Option(?)`,Type:`Option.Option<?>`,importDeclaration:`import * as Option from "effect/Option"`},expected:`Option`,toCodec:([e])=>hw()(QC([G({_tag:zC(`Some`),value:e}),G({_tag:zC(`None`)})]),Ob({decode:e=>e._tag===`None`?gc():B(e.value),encode:e=>yc(e)?{_tag:`Some`,value:e.value}:{_tag:`None`}})),toArbitrary:([e])=>(t,n)=>{let r=t.constant(gc());return Iw(t,n,r,t.oneof(r,e.arbitrary.map(B)))},toEquivalence:([e])=>jc(e),toFormatter:([e])=>bc({onNone:()=>`none()`,onSome:t=>`some(${e(t)})`})}).ast,{value:e})}function ww(e,t){return PC(xC()([e,t],([e,t])=>(n,r,i)=>{if(!rm(n))return zh(new zy(r,B(n)));switch(n._tag){case`Fail`:return Pg(eC(e)(n.error,i),{onSuccess:lm,onFailure:e=>new Ry(r,B(n),[new Fy([`error`],e)])});case`Die`:return Pg(eC(t)(n.defect,i),{onSuccess:um,onFailure:e=>new Ry(r,B(n),[new Fy([`defect`],e)])});case`Interrupt`:return V(n)}},{typeConstructor:{_tag:`effect/Cause/Failure`},generation:{runtime:`Schema.CauseReason(?, ?)`,Type:`Cause.Failure<?, ?>`,importDeclaration:`import * as Cause from "effect/Cause"`},expected:`Cause.Failure`,toCodec:([e,t])=>hw()(QC([G({_tag:zC(`Fail`),error:e}),G({_tag:zC(`Die`),defect:t}),G({_tag:zC(`Interrupt`),fiberId:tw(Kw)})]),Ob({decode:e=>{switch(e._tag){case`Fail`:return lm(e.error);case`Die`:return um(e.defect);case`Interrupt`:return dm(e.fiberId)}},encode:ra})),toArbitrary:([e,t])=>Tw(e,t),toEquivalence:([e,t])=>Ew(e,t),toFormatter:([e,t])=>Dw(e,t)}).ast,{error:e,defect:t})}function Tw(e,t){return(n,r)=>{let i=n.constant(dm());return Iw(n,r,i,n.oneof(i,n.integer({min:1}).map(dm),e.arbitrary.map(e=>lm(e)),t.arbitrary.map(e=>um(e))))}}function Ew(e,t){return(n,r)=>{if(n._tag!==r._tag)return!1;switch(n._tag){case`Fail`:return e(n.error,r.error);case`Die`:return t(n.defect,r.defect);case`Interrupt`:return n.fiberId===r.fiberId}}}function Dw(e,t){return n=>{switch(n._tag){case`Fail`:return`Fail(${e(n.error)})`;case`Die`:return`Die(${t(n.defect)})`;case`Interrupt`:return`Interrupt`}}}function Ow(e,t){return PC(xC()([e,t],([e,t])=>{let n=K(ww(e,t));return(e,t,r)=>nm(e)?Pg(eC(n)(e.reasons,r),{onSuccess:am,onFailure:n=>new Ry(t,B(e),[new Fy([`failures`],n)])}):zh(new zy(t,B(e)))},{typeConstructor:{_tag:`effect/Cause`},generation:{runtime:`Schema.Cause(?, ?)`,Type:`Cause.Cause<?, ?>`,importDeclaration:`import * as Cause from "effect/Cause"`},expected:`Cause`,toCodec:([e,t])=>hw()(K(ww(e,t)),Ob({decode:am,encode:({reasons:e})=>e})),toArbitrary:([e,t])=>kw(e,t),toEquivalence:([e,t])=>Aw(e,t),toFormatter:([e,t])=>jw(e,t)}).ast,{error:e,defect:t})}function kw(e,t){return(n,r)=>{let i=Tw(e,t)(n,r);return Iw(n,r,n.constant(om),n.array(i.arbitrary).map(am))}}function Aw(e,t){let n=Hs(Ew(e,t));return(e,t)=>n(e.reasons,t.reasons)}function jw(e,t){let n=Dw(e,t);return e=>`Cause([${e.reasons.map(n).join(`, `)}])`}var Mw=e=>e?.includeStack===!0|(e?.excludeCause===!0?2:0),Nw=e=>{switch(e){case 0:return;case 1:return{includeStack:!0};case 2:return{excludeCause:!0};case 3:return{includeStack:!0,excludeCause:!0}}},Pw=[];function Fw(e){let t=Mw(e),n=Pw[t];if(n!==void 0)return n;let r=vT.pipe(aw(VC,zb(Nw(t))));return Pw[t]=r,r}function Iw(e,t,n,r){return{arbitrary:n===void 0||t.recursion===void 0?r:e.oneof(t.recursion,n,r),terminal:n}}function Lw(e,t,n,r){return r===void 0?e.array(t,n):e.uniqueArray(t,{...n,comparator:r})}function Rw(e,t,n,r,i,a){let o=t.constraint,s=o===void 0||o.minLength===void 0&&o.maxLength===void 0?void 0:{...o.minLength===void 0?{}:{minLength:o.minLength},...o.maxLength===void 0?{}:{maxLength:o.maxLength}};if(s?.minLength!==void 0&&s.maxLength!==void 0&&s.minLength>s.maxLength)throw new globalThis.Error(`Unable to derive an arbitrary for size constraints`);let c=s?.minLength??0,l=Iw(e,t,c===0?e.constant([]):r===void 0?void 0:Lw(e,r,{...s,maxLength:c},a),Lw(e,n,s,a));return{arbitrary:l.arbitrary.map(i),terminal:l.terminal?.map(i)}}function zw(e){return PC(xC()([e],([e])=>{let t=K(e);return(e,n,r)=>Wg(e)?Pg(eC(t)(_l(e),r),{onSuccess:Jg,onFailure:t=>new Ry(n,B(e),[new Fy([`values`],t)])}):zh(new zy(n,B(e)))},{typeConstructor:{_tag:`effect/Chunk`},generation:{runtime:`Schema.Chunk(?)`,Type:`Chunk.Chunk<?>`},expected:`Chunk`,toCodec:([e])=>hw()(K(e),Ob({decode:Jg,encode:_l})),toArbitrary:([e])=>(t,n)=>Rw(t,n,e.arbitrary,e.terminal,Jg),toEquivalence:([e])=>Bg(e),toFormatter:([e])=>t=>{let n=$g(t);return n===0?`Chunk(0) {}`:`Chunk(${n}) { ${globalThis.Array.from(t).sort().map(t=>`${e(t)}`).join(`, `)} }`}}).ast,{value:e})}globalThis.RegExp,globalThis.URL;function Bw(e,t,n,r){let i={...n};if(delete i.valid,(n?.valid||e?.valid)&&(i.noInvalidDate=!0),t?.minimum!==void 0){let e=r===void 0?t.minimum:r(t.minimum),n=t.exclusiveMinimum?new globalThis.Date(e.getTime()+1):e;(i.min===void 0||n.getTime()>i.min.getTime())&&(i.min=n)}if(t?.maximum!==void 0){let e=r===void 0?t.maximum:r(t.maximum),n=t.exclusiveMaximum?new globalThis.Date(e.getTime()-1):e;(i.max===void 0||n.getTime()<i.max.getTime())&&(i.max=n)}return i}var Vw=U.annotate({expected:`a string in ISO 8601 format that will be decoded as a Date`}),Hw=mw(globalThis.Date,{typeConstructor:{_tag:`Date`},generation:{runtime:`Schema.Date`,Type:`globalThis.Date`},expected:`Date`,toCodecJson:()=>hw()(Vw,Mb),toArbitrary:()=>(e,t)=>e.date(Bw(t?.constraint,t?.constraint?.ordered?.order===dc?t.constraint.ordered:void 0))}),Uw=Vw.pipe(aw(Hw,Mb)),Ww=Gw(VC);function Gw(e){return U.annotate({expected:`a string that will be decoded as JSON`,contentMediaType:`application/json`,contentSchema:CS(e.ast)}).pipe(aw(e,Vb))}globalThis.File,globalThis.FormData,globalThis.URLSearchParams;var Kw=W.check(vw()),qw=U.annotate({expected:`a string that will be decoded as a number`}).pipe(aw(W,jb)),Jw=U.annotate({expected:`a base64 encoded string that will be decoded as Uint8Array`,format:`byte`,contentEncoding:`base64`}),Yw=mw(globalThis.Uint8Array,{typeConstructor:{_tag:`Uint8Array`},generation:{runtime:`Schema.Uint8Array`,Type:`globalThis.Uint8Array`},expected:`Uint8Array`,toCodecJson:()=>hw()(Jw,Bb),toArbitrary:()=>e=>e.uint8Array()}),Xw=globalThis.Symbol.for(`immer-draftable`);function Zw(e,t,n,r,i){let a=eT(n,t,r),o=$w(t),s=class extends e{constructor(...[e,t]){e??={};let r=n.make(e,t);super({...e,...r},{...t,disableChecks:!0})}static[bC]=bC;get[o](){return o}static[Xw]=!0;static identifier=t;static fields=n.fields;static get ast(){return a(this).ast}static pipe(){return ea(this,arguments)}static rebuild(e){return a(this).rebuild(e)}static make(e,t){return new this(e,t)}static makeOption(e,t){return QS(a(this))(e??{},t)}static makeEffect(e,t){return a(this).makeEffect(e??{},t)}static annotate(e){return this.rebuild(aS(this.ast,e))}static annotateKey(e){return this.rebuild(mS(this.ast,e))}static check(...e){return this.rebuild(sS(this.ast,e))}static extend(e){return(t,r)=>{let a=tT(t)?t:G(t),o={...n.fields,...a.fields},s=Px(o,n.ast.checks,{identifier:e});return Zw(this,e,KC(sS(s,a.ast.checks),o),r,i)}}static mapFields(e,t){return n.mapFields(e,t)}};return i!==void 0&&Object.assign(s.prototype,i(t)),s}function Qw(e){return new wb(db(t=>new e(t)),lb())}function $w(e){return`~effect/Schema/Class/${e}`}function eT(e,t,n){let r;return i=>{if(r!==void 0)return r;let a=Qw(i);return r=aw(PC(new ix([e.ast],()=>(e,n)=>e instanceof i||Da(e,$w(t))?V(e):zh(new zy(n,B(e))),{identifier:t,[zS]:([e])=>new $b(e,a),toCodec:([e])=>new $b(e.ast,a),toArbitrary:([e])=>()=>({arbitrary:e.arbitrary.map(e=>new i(e)),terminal:e.terminal?.map(e=>new i(e))}),toFormatter:([e])=>t=>`${i.identifier}(${e(t)})`,"~sentinels":zx(e.ast),...n})),a)(e)}}function tT(e){return FC(e)}var nT=e=>(t,n)=>Zw(uh,e,tT(t)?t:G(t),n,e=>({toString(){return`${e}(${yo({...this})})`}})),rT=e=>(t,n)=>Zw(xs,e,tT(t)?t:G(t),n,e=>({name:e})),iT=e=>(t,n,r)=>{let i=tT(n)?n.mapFields(e=>({_tag:fw(t),...e}),{unsafePreserveChecks:!0}):pw(t,n);return rT(e??t)(i,r)};function aT(e){return PC(oT(e.ast),{schema:e})}var oT=uS(e=>{let t=sT(e,oT);return t!==e&&xS(e)?hS(t):t});function sT(e,t){switch(e._tag){case`Declaration`:{let n=e.annotations?.toCodecJson??e.annotations?.toCodec;if(ba(n)){let r=n(Ub(e)?e.typeParameters.map(e=>fC(CS(e))):[]),i=t(r.to);return rS(e,i===r.to?[r]:[new $b(i,r.transformation)])}return rS(e,[WS])}case`Unknown`:case`ObjectKeyword`:return rS(e,[GS]);case`Undefined`:case`Void`:case`Literal`:case`Number`:return e.toCodecJson();case`UniqueSymbol`:case`Symbol`:case`BigInt`:return e.toCodecStringTree();case`Objects`:if(e.propertySignatures.some(e=>typeof e.name!=`string`))throw new globalThis.Error(`Objects property names must be strings`,{cause:e});return e.recur(t,jS);case`Union`:{let n=_C(e.types);return n===e.types?e.recur(t):new Wx(n,e.mode,e.annotations,e.checks,e.encoding,e.context,e.encodingChecks).recur(t)}case`Arrays`:case`Suspend`:return e.recur(t)}return e}function cT(e){return PC(gT(e.ast),{schema:e})}function lT(e){switch(e._tag){case`Null`:case`Boolean`:case`Number`:case`BigInt`:case`Symbol`:case`UniqueSymbol`:return 0;default:return 1}}var uT=yC(lT);function dT(e,t,n){switch(e._tag){case`Declaration`:{let r=e.annotations?.toCodecJson??e.annotations?.toCodec;if(ba(r)){let n=r(Ub(e)?e.typeParameters.map(e=>PC(t(CS(e)))):[]),i=t(n.to);return rS(e,i===n.to?[n]:[new $b(i,n.transformation)])}return n(e)}case`Null`:return rS(e,[fT]);case`Boolean`:return rS(e,[pT]);case`Unknown`:case`ObjectKeyword`:return rS(e,[qS]);case`Enum`:case`Number`:case`Literal`:case`UniqueSymbol`:case`Symbol`:case`BigInt`:return e.toCodecStringTree();case`Objects`:if(e.propertySignatures.some(e=>typeof e.name!=`string`))throw new globalThis.Error(`Objects property names must be strings`,{cause:e});return e.recur(t,jS);case`Union`:{let n=uT(e.types);return n===e.types?e.recur(t):new Wx(n,e.mode,e.annotations,e.checks,e.encoding,e.context,e.encodingChecks).recur(t)}case`Arrays`:case`Suspend`:return e.recur(t)}return e}var fT=new $b(new fx(`null`),new wb(db(()=>null),db(()=>`null`))),pT=new $b(new Wx([new fx(`true`),new fx(`false`)],`anyOf`),new wb(db(e=>e===`true`),gb())),mT=`~effect/Schema/SERIALIZER_ENSURE_ARRAY`,hT=e=>Zb(e)&&e.annotations?.[mT]===!0,gT=uS(e=>{if(hT(e))return e;let t=dT(e,gT,e=>rS(e,[_T]));return t!==e&&xS(e)?hS(t):t}),_T=new $b(cx,new wb(lb(),db(()=>void 0))),vT=PC(US),yT=`~effect/Stream`,bT={_R:ra,_E:ra,_A:ra},xT={[yT]:bT,pipe(){return ea(this,arguments)}},ST=e=>{let t=Object.create(xT);return t.channel=e,t},CT=`~effect/Stream`,wT=e=>Da(e,CT),TT=ST,ET=(e,t)=>TT(sv((n,r)=>Kh(Fv(e.channel,r),e=>t(e,r)))),DT=e=>e.channel,OT=(e,t)=>TT(pv(e,t)),kT=TT(hv),AT=e=>TT(mv(()=>e().channel)),jT=e=>TT(gv(e)),MT=e=>TT(_v(e)),NT=e=>TT(yv(e)),PT=e=>TT(sv(jg(function*(t,n){let r=e.evaluate().getReader();return yield*Bm(n,e.releaseLockOnEnd?Ph(()=>r.releaseLock()):kh(()=>r.cancel().catch(la))),Kh(Ah({try:()=>r.read(),catch:t=>e.onError(t)}),({done:e,value:t})=>e?Sm():V(Al(t)))}))),FT=e=>TT(Ov(Zh(e,DT))),IT=z(2,(e,t)=>AT(()=>{let n=0;return TT(bv(e.channel,jl(e=>t(e,n++))))})),LT=z(e=>wT(e[0]),(e,t,n)=>e.channel.pipe(Tv,Sv(t,n),bv(Al),TT)),RT=z(2,(e,t)=>TT(Ev(DT(e),t))),zT=z(2,(e,t)=>TT(Dv(e.channel,t))),BT=z(e=>wT(e[0]),(e,t)=>AT(()=>{let n=new TextDecoder(t?.encoding);return IT(e,e=>n.decode(e,{stream:!0}))})),VT=z(2,(e,t)=>TT(Av(e.channel,t))),HT=z(2,(e,t)=>TT(Mv(e.channel,t))),UT=z(2,(e,t)=>Nv(e.channel,t)),WT=e=>Pv(e.channel),GT=z(e=>wT(e[0]),(e,t,n)=>{let r,i,a=a_(!1);return new ReadableStream({start(n){i=Cg(og(UT(e,e=>a.whenOpen(Ph(()=>{a.closeUnsafe();for(let t=0;t<e.length;t++)n.enqueue(e[t]);r(),r=void 0}))),t)),i.addObserver(e=>{e._tag===`Failure`?n.error(mm(e.cause)):n.close()})},pull(){return new Promise(e=>{r=e,a.openUnsafe()})},cancel(){if(i)return Eg($h(n_(i)))}},n?.strategy)}),KT=z(e=>wT(e[0]),(e,t)=>Zh(ig(),n=>GT(e,n,t))),qT=`~effect/SubscriptionRef`,JT=e=>Da(e,qT);({...Ho});var YT=e=>NT(e.pubsub),XT=e=>Ph(()=>e.value),ZT=(e,t)=>{e.value=t,x_(e.pubsub,t)},QT=z(2,(e,t)=>e.semaphore.withPermit(Ph(()=>ZT(e,t)))),$T=BigInt(1024);$T*$T*$T*$T*$T,Nc()(`effect/platform/FileSystem/WatchBackend`);var eE=class extends Nc()(`effect/reactivity/Reactivity`){},tE=Ph(()=>{let e=new Map,t=t=>{sE(t,t=>{let n=e.get(t);n!==void 0&&n.forEach(e=>e())})},n=e=>ag(n=>{let r=n.mapUnsafe.get(nE.key);return r?sE(e,e=>{r.add(e)}):t(e),Fh}),r=(e,t)=>Yh(t,n(e)),i=(t,n)=>{let r=[];return sE(t,t=>{r.push(t);let i=e.get(t);i===void 0&&(i=new Set,e.set(t,i)),i.add(n)}),()=>{for(let t=0;t<r.length;t++){let i=e.get(r[t]);i.delete(n),i.size===0&&e.delete(r[t])}}},a=(e,t)=>Rh(function*(){let n=yield*ig(),r=qc(n,Im),a=yield*N_(),o=da(wg(n),i_(r)),s=!1,c=!1,l=e=>{e._tag===`Failure`?R_(a,e.cause):I_(a,e.value),c?(c=!1,o(t).addObserver(l)):s=!1};function u(){if(s){c=!0;return}s=!0,o(t).addObserver(l)}return yield*Bm(r,Ph(i(e,u))),u(),a});return eE.of({mutation:r,query:a,stream:(e,t)=>a(e,t).pipe(Zh(MT),FT),invalidateUnsafe:t,invalidate:n,registerUnsafe:i,withBatch:t=>Nh(()=>{let n=new Set;return t.pipe(cg(nE,n),fg(t=>Ph(()=>{n.forEach(t=>{let n=e.get(t);n!==void 0&&n.forEach(e=>e())})})))})})}),nE=class extends Nc()(`effect/reactivity/Reactivity/PendingInvalidation`){},rE=z(2,(e,t)=>eE.use(n=>n.mutation(t,e))),iE=e=>eE.use(t=>t.invalidate(e)),aE=nh(eE)(tE);function oE(e){switch(typeof e){case`string`:case`number`:case`bigint`:case`boolean`:return String(e);default:return ja(e)}}var sE=(e,t)=>{if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(oE(e[n]));return}for(let n in e){t(n);let r=e[n];for(let e=0;e<r.length;e++)t(`${n}:${oE(r[e])}`)}},cE=`~effect/reactivity/AsyncResult`,lE=e=>Da(e,cE),uE={[cE]:{E:ra,A:ra},pipe(){return ea(this,arguments)},[Ja](e){if(this._tag!==e._tag||this.waiting!==e.waiting)return!1;switch(this._tag){case`Initial`:return!0;case`Success`:return Ya(this.value,e.value);case`Failure`:return Ya(this.cause,e.cause)}},[Aa](){let e=La(`${this._tag}:${this.waiting}`);return this._tag===`Initial`?e:Na(e)(this._tag===`Success`?ja(this.value):ja(this.cause))}},dE=(e,t)=>e._tag===`Success`?_E(e.value):bE(e.cause,{previous:t}),fE=e=>e._tag===`None`?hE(!0):SE(e.value),pE=e=>e._tag===`Initial`,mE=e=>e._tag!==`Initial`,hE=(e=!1)=>{let t=Object.create(uE);return t._tag=`Initial`,t.waiting=e,t},gE=e=>e._tag===`Success`,_E=(e,t)=>{let n=Object.create(uE);return n._tag=`Success`,n.value=e,n.waiting=t?.waiting??!1,n.timestamp=t?.timestamp??Date.now(),n},vE=e=>e._tag===`Failure`,yE=(e,t)=>{let n=Object.create(uE);return n._tag=`Failure`,n.cause=e,n.previousSuccess=t?.previousSuccess??gc(),n.waiting=t?.waiting??!1,n},bE=(e,t)=>yE(e,{previousSuccess:Oc(t.previous,e=>gE(e)?B(e):vE(e)?e.previousSuccess:gc()),waiting:t.waiting}),xE=(e,t)=>bE(sm(e),t),SE=(e,t)=>{if(e.waiting)return t?.touch?CE(e):e;let n=Object.assign(Object.create(uE),e);return n.waiting=!0,t?.touch&&gE(n)&&(n.timestamp=Date.now()),n},CE=e=>gE(e)?_E(e.value,{waiting:e.waiting}):e,wE=(e,t)=>e._tag===`Failure`?bE(e.cause,{previous:t,waiting:e.waiting}):e,TE=e=>e._tag===`Success`?B(e.value):e._tag===`Failure`?Dc(e.previousSuccess,e=>e.value):gc(),EE=e=>Ec(TE(e),()=>new bm(`AsyncResult.getOrThrow: no value found`)),DE=e=>{switch(e._tag){case`Success`:return wm(e.value);case`Failure`:return Tm(e.cause);default:return Em(new bm)}},OE=e=>new kE(e),kE=class{constructor(e){this.result=e}result;output=gc();when(e,t){if(vc(this.output)&&e(this.result)){let e=t(this.result);yc(e)&&(this.output=e)}return this}pipe(){return ea(this,arguments)}onWaiting(e){return this.when(e=>e.waiting,t=>B(e(t)))}onInitialOrWaiting(e){return this.when(e=>pE(e)||e.waiting,t=>B(e(t)))}onInitial(e){return this.when(pE,t=>B(e(t)))}onSuccess(e){return this.when(gE,t=>B(e(t.value,t)))}onFailure(e){return this.when(vE,t=>B(e(t.cause,t)))}onError(e){return this.onErrorIf(aa,e)}onErrorIf(e,t){return this.when(vE,n=>gm(n.cause).pipe(Ac(e),Dc(e=>t(e,n))))}onErrorTag(e,t){return this.onErrorIf(t=>Da(t,`_tag`)&&(Array.isArray(e)?e.includes(t._tag):t._tag===e),t)}onDefect(e){return this.when(vE,t=>{let n=_m(t.cause);return ol(n)?gc():B(e(n.success,t))})}onInterrupt(e){return this.when(vE,t=>{let n=ym(t.cause);return ol(n)?gc():B(e(n.success,t))})}orElse(e){return xc(this.output,e)}orNull(){return wc(this.output)}render(){if(yc(this.output))return this.output.value;if(vE(this.result))throw mm(this.result.cause);return null}exhaustive(){return this.render()}},AE=e=>{let t=e.success??BC,n=e.error??BC,r=xC()([t,Ow(n,Fw())],([e,t])=>(n,r,i)=>{if(!lE(n))return zh(new zy(r,B(n)));switch(n._tag){case`Initial`:return V(n);case`Success`:return Pg(eC(e)(n.value,i),{onSuccess:e=>_E(e,n),onFailure:e=>new Ry(r,B(n),[new Fy([`value`],e)])});case`Failure`:{let a=n.previousSuccess.pipe(Dc(t=>Pg(eC(e)(t.value,i),{onSuccess:e=>B(_E(e,t)),onFailure:e=>new Ry(r,B(n),[new Fy([`previousSuccess`,`value`],e)])})),xc(()=>jh)),o=Ng(eC(t)(n.cause,i),e=>new Ry(r,B(n),[new Fy([`cause`],e)]));return Fg(a,e=>Mg(o,t=>yE(t,{previousSuccess:e,waiting:n.waiting})))}}},{expected:`AsyncResult`,toCodec([e,t]){let n=pw(`Success`,{value:e,waiting:WC,timestamp:W});return hw()(QC([pw(`Initial`,{waiting:WC}),n,pw(`Failure`,{cause:t,previousSuccess:Cw(n),waiting:WC})]),Ob({decode:e=>{switch(e._tag){case`Initial`:return hE(e.waiting);case`Success`:return _E(e.value,{waiting:e.waiting,timestamp:e.timestamp});case`Failure`:return yE(e.cause,{previousSuccess:Dc(e.previousSuccess,e=>_E(e.value,e)),waiting:e.waiting})}},encode(e){switch(e._tag){case`Initial`:return{_tag:`Initial`,waiting:e.waiting};case`Success`:return{_tag:`Success`,value:e.value,waiting:e.waiting,timestamp:e.timestamp};case`Failure`:return{_tag:`Failure`,cause:e.cause,previousSuccess:e.previousSuccess,waiting:e.waiting}}}}))},toEquivalence:fo,toFormatter:([e,t])=>n=>{switch(n._tag){case`Success`:return`AsyncResult.Success(${e(n.value)}, ${n.waiting}, ${n.timestamp})`;case`Failure`:return`AsyncResult.Failure(${t(n.cause)}, ${n.waiting})`;case`Initial`:return`AsyncResult.Initial(${n.waiting}, ${n.waiting})`}}});return Object.assign(r,{success:t,error:n})},jE=`~effect/reactivity/AtomRegistry`,ME=e=>Da(e,jE),NE=e=>new BE(e?.initialValues,e?.scheduleTask,e?.timeoutResolution,e?.defaultIdleTTL),PE=Nc(jE),FE=z(e=>ME(e[0]),(e,t,n)=>{let r=n?.suspendOnWaiting??!1;return Ih(n=>{let i=e.get(t);if(i._tag!==`Initial`&&!(r&&i.waiting))return n(DE(i));let a=e.subscribe(t,e=>{e._tag!==`Initial`&&!(r&&e.waiting)&&(n(DE(e)),a())});return Ph(a)})}),IE={immediate:!0},LE=e=>{e()},RE=`~effect-atom/atom/Atom/Serializable`,zE=e=>RE in e?e[RE].key:e,BE=class{[jE];timeoutResolution;defaultIdleTTL;scheduler;schedulerAsync;dispatcher;onNodeAdded;onNodeRemoved;constructor(e,t,n,r){if(this[jE]=jE,this.scheduler=new yu(`sync`,t),this.schedulerAsync=new yu(`async`,t),this.dispatcher=this.schedulerAsync.makeDispatcher(),this.defaultIdleTTL=r,n===void 0&&r!==void 0?this.timeoutResolution=Math.round(r/2):this.timeoutResolution=n??1e3,e!==void 0)for(let[t,n]of e){let e=t;for(;e.initialValueTarget;)e=e.initialValueTarget;this.ensureNode(e).setInitialValue(n)}}nodes=new Map;preloadedSerializable=new Map;timeoutBuckets=new Map;nodeTimeoutBucket=new Map;disposed=!1;getNodes(){return this.nodes}get(e){return this.ensureNode(e).value()}set(e,t){e.write(this.ensureNode(e).writeContext,t)}setSerializable(e,t){this.preloadedSerializable.set(e,t)}modify(e,t){let n=this.ensureNode(e),r=t(n.value());return e.write(n.writeContext,r[1]),r[0]}update(e,t){let n=this.ensureNode(e);e.write(n.writeContext,t(n.value()))}refresh=e=>{e.refresh===void 0?this.invalidateAtom(e):e.refresh(this.refresh)};subscribe(e,t,n){let r=this.ensureNode(e);n?.immediate&&t(r.value());let i=r.subscribe(function(){t(r._value)});return()=>{i(),r.canBeRemoved&&this.scheduleNodeRemoval(r)}}mount(e){return this.subscribe(e,la,IE)}atomHasTtl(e){return!e.keepAlive&&e.idleTTL!==0&&(e.idleTTL!==void 0||this.defaultIdleTTL!==void 0)}ensureNode(e){let t=zE(e),n=this.nodes.get(t);if(n===void 0?(n=this.createNode(e),this.nodes.set(t,n),this.onNodeAdded?.(n)):this.atomHasTtl(e)&&this.removeNodeTimeout(n),typeof t==`string`&&this.preloadedSerializable.has(t)){let r=this.preloadedSerializable.get(t);this.preloadedSerializable.delete(t);let i=e[RE].decode(r);n.setValue(i)}return n}createNode(e){if(this.disposed)throw Error(`Cannot access Atom ${e}: registry is disposed`);return e.keepAlive||this.scheduleAtomRemoval(e),new UE(this,e)}invalidateAtom=e=>{this.ensureNode(e).invalidate()};scheduleAtomRemoval(e){this.dispatcher.scheduleTask(()=>{let t=this.nodes.get(zE(e));t!==void 0&&t.canBeRemoved&&this.removeNode(t)},0)}scheduleNodeRemoval(e){this.dispatcher.scheduleTask(()=>{e.canBeRemoved&&this.removeNode(e)},0)}removeNode(e){this.atomHasTtl(e.atom)?this.setNodeTimeout(e):(this.nodes.delete(zE(e.atom)),e.remove(),this.onNodeRemoved?.(e))}setNodeTimeout(e){if(this.nodeTimeoutBucket.has(e))return;let t=e.atom.idleTTL??this.defaultIdleTTL;if(this.#e!==null&&(t-=this.#e,t<=0)){this.nodes.delete(zE(e.atom)),e.remove(),this.onNodeRemoved?.(e);return}let n=Math.ceil(t/this.timeoutResolution)*this.timeoutResolution,r=Date.now()+n,i=r-r%this.timeoutResolution+this.timeoutResolution,a=this.timeoutBuckets.get(i);a===void 0&&(a=[new Set,setTimeout(()=>this.sweepBucket(i),i-Date.now())],this.timeoutBuckets.set(i,a)),a[0].add(e),this.nodeTimeoutBucket.set(e,i)}removeNodeTimeout(e){let t=this.nodeTimeoutBucket.get(e);if(t===void 0)return;this.nodeTimeoutBucket.delete(e),this.scheduleNodeRemoval(e);let[n,r]=this.timeoutBuckets.get(t);n.delete(e),n.size===0&&(clearTimeout(r),this.timeoutBuckets.delete(t))}#e=null;sweepBucket(e){let t=this.timeoutBuckets.get(e)[0];this.timeoutBuckets.delete(e),t.forEach(e=>{this.nodeTimeoutBucket.delete(e),e.canBeRemoved&&(this.nodes.delete(zE(e.atom)),this.onNodeRemoved?.(e),this.#e=e.atom.idleTTL??this.defaultIdleTTL,e.remove(),this.#e=null)})}reset(){this.timeoutBuckets.forEach(([,e])=>clearTimeout(e)),this.timeoutBuckets.clear(),this.nodeTimeoutBucket.clear(),this.nodes.forEach(e=>{e.remove(),this.onNodeRemoved?.(e)}),this.nodes.clear()}dispose(){this.disposed=!0,this.reset()}},VE={alive:1,initialized:2,waitingForValue:4},HE={uninitialized:VE.alive|VE.waitingForValue,stale:VE.alive|VE.initialized|VE.waitingForValue,valid:VE.alive|VE.initialized,removed:0},UE=class{constructor(e,t){this.registry=e,this.atom=t,this.writeContext=new qE(e,this)}registry;atom;state=HE.uninitialized;lifetime;writeContext;preserveInitialValueOnBuild=!1;parents=[];previousParents;children=[];listeners=new Set;skipInvalidation=!1;currentState(){switch(this.state){case HE.uninitialized:return`uninitialized`;case HE.stale:return`stale`;case HE.valid:return`valid`;default:return`removed`}}get canBeRemoved(){return!this.atom.keepAlive&&this.listeners.size===0&&this.children.length===0&&this.state!==0}_value=void 0;value(){if((this.state&VE.waitingForValue)!==0){this.lifetime=KE(this);let e=this.atom.read(this.lifetime);if((this.state&VE.waitingForValue)!==0&&(this.preserveInitialValueOnBuild?(this.preserveInitialValueOnBuild=!1,this.state=HE.valid):this.setValue(e)),this.previousParents){let e=this.previousParents;this.previousParents=void 0;for(let t=0;t<e.length;t++)e[t].removeChild(this),e[t].canBeRemoved&&this.registry.scheduleNodeRemoval(e[t])}}return this._value}valueOption(){return(this.state&VE.initialized)===0?gc():B(this._value)}setInitialValue(e){if((this.state&VE.initialized)===0){this.preserveInitialValueOnBuild=!0,this.state=HE.stale,this._value=e,YE.phase===JE.collect?YE.notify.add(this):this.notify();return}this.setValue(e)}setValue(e){if((this.state&VE.initialized)===0){this.state=HE.valid,this._value=e,YE.phase===JE.collect?YE.notify.add(this):this.notify();return}this.state=HE.valid,!Object.is(this._value,e)&&(this._value=e,this.skipInvalidation?this.skipInvalidation=!1:this.invalidateChildren(),this.listeners.size>0&&(YE.phase===JE.collect?YE.notify.add(this):this.notify()))}addParent(e){if(this.parents.push(e),this.previousParents!==void 0){let t=this.previousParents.indexOf(e);t!==-1&&(this.previousParents[t]=this.previousParents[this.previousParents.length-1],this.previousParents.pop()===void 0&&(this.previousParents=void 0))}e.children.indexOf(this)===-1&&(e.children.push(this),e.skipInvalidation&&=!1)}removeChild(e){let t=this.children.indexOf(e);t!==-1&&(this.children[t]=this.children[this.children.length-1],this.children.pop())}invalidate(){this.state===HE.valid&&(this.state=HE.stale,this.disposeLifetime()),YE.phase===JE.collect?YE.stale.push(this):this.atom.lazy&&this.listeners.size===0&&!WE(this.children)?(this.invalidateChildren(),this.skipInvalidation=!0):this.value()}invalidateChildren(){if(this.children.length===0)return;let e=this.children;this.children=[];for(let t=0;t<e.length;t++)e[t].invalidate()}notify(){this.listeners.forEach(LE),YE.phase===JE.commit&&YE.notify.delete(this)}disposeLifetime(){this.lifetime!==void 0&&(this.lifetime.dispose(),this.lifetime=void 0),this.parents.length!==0&&(this.previousParents=this.parents,this.parents=[])}remove(){if(this.state=HE.removed,this.listeners.clear(),this.lifetime===void 0||(this.disposeLifetime(),this.previousParents===void 0))return;let e=this.previousParents;this.previousParents=void 0;for(let t=0;t<e.length;t++)e[t].removeChild(this),e[t].canBeRemoved&&this.registry.removeNode(e[t])}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}};function WE(e){if(e.length===0)return!1;let t=e,n,r=0;for(;t!==void 0;){for(let e=0,r=t.length;e<r;e++){let r=t[e];if(!r.atom.lazy||r.listeners.size>0)return!0;r.children.length>0&&(n===void 0?n=[r.children]:n.push(r.children))}t=n?.[r++]}return!1}var GE={get registry(){return this.node.registry},addFinalizer(e){if(this.disposed)return e();this.finalizers??=[],this.finalizers.push(e)},get(e){if(this.disposed)return this.node.registry.get(e);let t=this.node.registry.ensureNode(e);return this.node.addParent(t),t.value()},result(e,t){if(this.disposed||this.isFn)return this.resultOnce(e,t);let n=this.get(e);if(t?.suspendOnWaiting&&n.waiting)return Lh;switch(n._tag){case`Initial`:return Lh;case`Failure`:return Tm(n.cause);case`Success`:return V(n.value)}},resultOnce(e,t){return Ih(n=>{let r=this.once(e);if(r._tag!==`Initial`&&!(t?.suspendOnWaiting&&r.waiting))return n(DE(r));let i=this.node.registry.subscribe(e,e=>{e._tag===`Initial`||t?.suspendOnWaiting&&e.waiting||(i(),n(DE(e)))},{immediate:!1});return Ph(i)})},setResult(e,t){return this.disposed?Lh:(this.node.registry.set(e,t),this.resultOnce(e,{suspendOnWaiting:!0}))},some(e){if(this.disposed||this.isFn)return this.someOnce(e);let t=this.get(e);return t._tag===`None`?Lh:V(t.value)},someOnce(e){return Ih(t=>{let n=this.once(e);if(yc(n))return t(V(n.value));let r=this.node.registry.subscribe(e,e=>{vc(e)||(r(),t(V(e.value)))},{immediate:!1});return Ph(r)})},once(e){return this.node.registry.get(e)},self(){return this.disposed?gc():this.node.valueOption()},refresh(e){this.disposed||this.node.registry.refresh(e)},refreshSelf(){this.disposed||this.node.invalidate()},mount(e){this.disposed||this.addFinalizer(this.node.registry.mount(e))},subscribe(e,t,n){this.disposed||this.addFinalizer(this.node.registry.subscribe(e,t,n))},setSelf(e){this.disposed||this.node.setValue(e)},set(e,t){this.disposed||this.node.registry.set(e,t)},stream(e,t){return this.disposed?kT:OT(n=>Ph(()=>{this.subscribe(e,e=>I_(n,e),{immediate:!t?.withoutInitialValue})}))},streamResult(e,t){return this.stream(e,t).pipe(RT(mE),LT(e=>e._tag===`Success`?V(e.value):Bh(e.cause)))},dispose(){if(this.disposed=!0,this.finalizers===void 0)return;let e=this.finalizers;this.finalizers=void 0;for(let t=e.length-1;t>=0;t--)e[t]()}},KE=e=>{function t(n){if(t.disposed||t.isFn)return e.registry.get(n);let r=e.registry.ensureNode(n),i=r.value();return e.addParent(r),i}return Object.setPrototypeOf(t,GE),t.isFn=!1,t.disposed=!1,t.finalizers=void 0,t.node=e,t},qE=class{constructor(e,t){this.registry=e,this.node=t}registry;node;get(e){return this.registry.get(e)}set(e,t){return this.registry.set(e,t)}setSelf(e){return this.node.setValue(e)}refreshSelf(){return this.node.invalidate()}},JE={disabled:0,collect:1,commit:2},YE={phase:JE.disabled,depth:0,stale:[],notify:new Set};function XE(e){YE.phase=JE.collect,YE.depth++;try{if(e(),YE.depth===1){for(let e=0;e<YE.stale.length;e++)ZE(YE.stale[e]);YE.phase=JE.commit;for(let e of YE.notify)e.notify();YE.notify.clear()}}finally{YE.depth--,YE.depth===0&&(YE.phase=JE.disabled,YE.stale=[])}}function ZE(e){if(e.state!==HE.valid){for(let t=0;t<e.parents.length;t++){let n=e.parents[t];n.state!==HE.valid&&ZE(n)}e.state!==HE.valid&&e.value()}}var QE=`~effect/reactivity/Atom`,$E=e=>Da(e,QE),eD=`~effect/reactivity/Atom/Writable`,tD=z(2,(e,t)=>{let n=Hl(t),r=Xl(n);return Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!r,idleTTL:r?su(n):void 0})}),nD=tD(0),rD={[QE]:QE,...Ho,toJSON(){return{_id:`Atom`,keepAlive:this.keepAlive,lazy:this.lazy,label:this.label}}},iD={...rD,atom(e,t){let n=fD(e,t);return cD(e=>{let t=e.self(),r=e(this);return r._tag===`Success`?n(e,r.value):wE(r,t)})},fn(e,t){return arguments.length===0?(e,t)=>aD(this,e,t):aD(this,e,t)},pull(e,t){let n=nD(hD(0));return OD(n,cD(r=>{let i=r.self(),a=r(this);return a._tag===`Success`?_D(r,DD(r,n,e,t),hE(!0),a.value):wE(a,i)}))},subscriptionRef(e){return CD(nD(cD(t=>{let n=t.self(),r=t(this);if(r._tag!==`Success`)return wE(r,n);let i=typeof e==`function`?e(t):e;return JT(i)?i:_D(t,i,hE(!0),r.value)})),(e,t)=>SD(e,t,EE(e(this))))}},aD=(e,t,n)=>{let[r,i,a]=ED(n?.reactivityKeys?(e,r)=>{let i=t(e,r);return Eh(i)?rE(i,n.reactivityKeys):VT(i,iE(n.reactivityKeys))}:t,n);return lD(t=>{t.get(a);let n=t.self(),i=t.get(e);return i._tag===`Success`?r(t,i.value):wE(i,n)},i)},oD={...rD,[eD]:eD},sD=e=>eD in e,cD=(e,t)=>{let n=Object.create(rD);return n.keepAlive=!1,n.lazy=!0,n.read=e,n.refresh=t,n},lD=(e,t,n)=>{let r=Object.create(oD);return r.keepAlive=!1,r.lazy=!0,r.read=e,r.write=t,r.refresh=n,r};function uD(e,t){e.setSelf(t)}var dD=(e,t)=>{let n=fD(e,t);return`~effect/reactivity/Atom`in n?n:cD(n)},fD=(e,t)=>{if(typeof e==`function`&&!Eh(e)&&!wT(e)){let n=e;return function(e,r){let i=n(e);switch(typeof i){case`function`:case`object`:return i===null?i:pD in i?gD(e,i,t,r):mD in i?bD(e,i,t,r):i;default:return i}}}else if(Eh(e))return function(n,r){return gD(n,e,t,r)};else if(wT(e))return function(n,r){return bD(n,e,t,r)};return hD(e)},pD=`~effect/Effect`,mD=`~effect/Stream`,hD=e=>lD(function(t){return e},uD),gD=(e,t,n,r)=>_D(e,t,n?.initialValue===void 0?hE():_E(n.initialValue),r,n?.uninterruptible);function _D(e,t,n,r=Vc(),i=!1){let a=e.self(),o=Lm();e.addFinalizer(()=>{wg(r)(Hm(o,Dm))});let s=new Map(r.mapUnsafe);s.set(Im.key,o),s.set(PE.key,e.registry),s.set(gu.key,e.registry.scheduler);let c,l=!1,u=vD(Lc(s),t,function(t){c=dE(t,a),l&&e.setSelf(c)},i);return l=!0,u!==void 0&&e.addFinalizer(u),c===void 0?a._tag===`Some`?fE(a):SE(n):c}function vD(e,t,n,r=!1){if(Cm(t)){n(t);return}let i=wg(e)(t);i.currentDispatcher?.flush();let a=i.pollUnsafe();if(a){n(a);return}let o=i.addObserver(n);function s(){o(),r||i.interruptUnsafe()}return s}var yD=(e=>{let t=aE;function n(r){let i=Object.create(iD);i.keepAlive=!1,i.lazy=!0,i.refresh=void 0,i.factory=n;let a=AD(cD(typeof r==`function`?e=>lh(r(e),t):()=>lh(r,t)));return i.layer=a,i.read=function(t){let n=t(a);return gD(t,Kh(lg,t=>eh(n,e.memoMap,t)),{uninterruptible:!0})},i}n.memoMap=e.memoMap,n.addGlobalLayer=e=>{t=lh(t,ch(e,aE))};let r=nD(dD(ag(t=>eh(aE,e.memoMap,qc(t,Im))).pipe(Zh(qc(eE)))));return n.withReactivity=e=>t=>jD(t,n=>{let i=EE(n(r));return n.addFinalizer(i.registerUnsafe(e,()=>{n.refresh(t)})),n.subscribe(t,e=>n.setSelf(e)),n.once(t)},{initialValueTarget:t}),n})({memoMap:Qm()});yD.withReactivity;var bD=(e,t,n,r)=>xD(e,t,n?.initialValue===void 0?hE():_E(n.initialValue),r);function xD(e,t,n,r=Vc()){let i=e.self();r=Wc(r,PE,e.registry);let a=ug(n=>Kh(Fv(t.channel,n),t=>Oh({while:aa,body:()=>t,step(t){e.setSelf(_E(Tl(t),{waiting:!0}))}}))).pipe(tg(t=>(xh(t)?ua(e.self(),Oc(TE),bc({onNone:()=>e.setSelf(xE(new bm,{previous:e.self()})),onSome:t=>e.setSelf(_E(t))})):e.setSelf(bE(t,{previous:e.self()})),Fh))),o=new Map(r.mapUnsafe);o.set(PE.key,e.registry),o.set(gu.key,e.registry.scheduler);let s=vD(Lc(o),a,la,!1);return s!==void 0&&e.addFinalizer(s),i._tag===`Some`?fE(i):SE(n)}var SD=(e,t,n=Vc())=>JT(t)?(e.addFinalizer(YT(t).pipe(UT(t=>{for(let n=0;n<t.length;n++)e.setSelf(t[n]);return Fh}),Tg(n))),kg(n)(XT(t))):t._tag===`Success`?xD(e,YT(t.value),hE(!0),n):t,CD=(e,t)=>{function n(t,n){let r=t.get(e);JT(r)?Og(QT(r,n)):gE(r)&&Og(QT(r.value,n))}return lD(n=>{let r=n(e);return JT(r)||gE(r)?t(n,r):r},n)},wD=Symbol.for(`effect/reactivity/atom/Atom/Reset`),TD=Symbol.for(`effect/reactivity/atom/Atom/Interrupt`);function ED(e,t){let n=nD(hD([0,void 0])),r=t?.initialValue===void 0?hE():_E(t.initialValue),i=t?.concurrent?nD(cD(e=>{let t=new Set;return e.addFinalizer(()=>t.forEach(e=>e.interruptUnsafe())),t})):void 0;function a(t,a){let o=i?t(i):void 0;t.isFn=!0;let[s,c]=t.get(n);if(s===0)return r;if(c===TD)return bE(cm(),{previous:t.self()});let l=e(c,t);return pD in l?(o&&(l=Kh(Sg(l,{startImmediately:!0}),e=>(o.add(e),e.addObserver(()=>o.delete(e)),Zh(t_(o),e=>e[0])))),_D(t,l,r,a,!1)):xD(t,l,r,a)}function o(e,t){PD(()=>{t===wD?e.set(n,[0,void 0]):t===TD?e.set(n,[e.get(n)[0]+1,TD]):e.set(n,[e.get(n)[0]+1,t]),e.refreshSelf()})}return[a,o,n]}var DD=(e,t,n,r)=>Kh(WT(typeof n==`function`?n(e):n),n=>{let i=r_().context,a=kl(),o=rg(n,{onFailure(e){return xh(e)?Sl(a)?V({done:!0,items:a}):zh(new bm(`Atom.pull: no items`)):Bh(e)},onSuccess(e){let t;return r?.disableAccumulation?t=e:(t=bl(a,e),a=t),V({done:!1,items:t})}}),s=new Set;return e.addFinalizer(()=>{for(let e of s)e()}),e.once(t),e.subscribe(t,()=>{e.setSelf(fE(e.self()));let t;t=vD(i,o,n=>{t&&s.delete(t);let r=dE(n,e.self()),i=s.size>0;e.setSelf(i?SE(r):r)}),t&&s.add(t)}),o}),OD=(e,t)=>lD(t.read,function(t,n){t.set(e,t.get(e)+1)}),kD=typeof WeakRef>`u`||typeof FinalizationRegistry>`u`?e=>{let t=Rv();return function(n){let r=zv(t,n);if(r._tag===`Some`)return r.value;let i=e(n);return Uv(t,n,i),i}}:e=>{let t=Rv(),n=new FinalizationRegistry(e=>{Gv(t,e)});return function(r){let i=zv(t,r).pipe(kc(e=>e.deref()));if(i._tag===`Some`)return i.value;let a=e(r);return Uv(t,r,new WeakRef(a)),n.register(a,r),a}},AD=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!0}),jD=z(e=>$E(e[0]),(e,t,n)=>{let r=nD(sD(e)?lD(n=>t(n,e),function(t,n){t.set(e,n)},e.refresh??function(t){t(e)}):cD(n=>t(n,e),e.refresh??function(t){t(e)}));return n?.initialValueTarget&&(r.initialValueTarget=MD(n.initialValueTarget)),r}),MD=e=>{let t=e;for(;t.initialValueTarget;)t=t.initialValueTarget;return t},ND=z(2,(e,t)=>jD(e,n=>t(n(e)))),PD=XE,FD=`~effect-atom/atom/Atom/Serializable`,ID=z(2,(e,t)=>{let n=aT(t.schema);return Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,label:e.label??[t.key,Error().stack?.split(`
|
|
17
|
-
`)[5]??``],[FD]:{key:t.key,encode:NC(n),decode:AC(n)}})}),LD=`~effect-atom/atom/Atom/ServerValue`,RD=z(2,(e,t)=>`~effect-atom/atom/Atom/ServerValue`in e?e[LD](e=>t.get(e)):t.get(e)),zD=l(p(),1);function BD(e){let t=zD.unstable_scheduleCallback(4,e);return()=>zD.unstable_cancelCallback(t)}var VD=N.createContext(NE({scheduleTask:BD,defaultIdleTTL:400})),HD=new WeakMap;function UD(e,t){let n=HD.get(e);n===void 0&&(n=new WeakMap,HD.set(e,n));let r=n.get(t);if(r!==void 0)return r;let i={subscribe(n){return e.subscribe(t,n)},snapshot(){return e.get(t)},getServerSnapshot(){return RD(t,e)}};return n.set(t,i),i}function WD(e,t){let n=UD(e,t);return N.useSyncExternalStore(n.subscribe,n.snapshot,n.getServerSnapshot)}var GD=(e,t)=>{let n=N.useContext(VD);return t?WD(n,N.useMemo(()=>ND(e,t),[e,t])):WD(n,e)};function KD(e,t){N.useEffect(()=>e.mount(t),[t,e])}function qD(e,t,n){return n?.mode===`promise`||n?.mode===`promiseExit`?N.useCallback(r=>{e.set(t,r);let i=Dg(FE(e,t,{suspendOnWaiting:!0}));return n.mode===`promise`?i.then(JD):i},[e,t,n.mode]):N.useCallback(n=>{e.set(t,typeof n==`function`?n(e.get(t)):n)},[e,t])}var JD=e=>{if(Om(e))return e.value;throw mm(e.cause)},YD=(e,t)=>{let n=N.useContext(VD);return KD(n,e),qD(n,e,t)},XD=(e,t)=>{let n=N.useContext(VD);return[WD(n,e),qD(n,e,t)]};function ZD(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var QD=e=>{switch(e){case`success`:return tO;case`info`:return rO;case`warning`:return nO;case`error`:return iO;default:return null}},$D=Array(12).fill(0),eO=({visible:e,className:t})=>N.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},N.createElement(`div`,{className:`sonner-spinner`},$D.map((e,t)=>N.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),tO=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},N.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),nO=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},N.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),rO=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},N.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),iO=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},N.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),aO=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},N.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),N.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),oO=()=>{let[e,t]=N.useState(document.hidden);return N.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},sO=1,cO=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:sO++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],N.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(uO(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||sO++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},lO=(e,t)=>{let n=t?.id||sO++;return cO.addToast({title:e,...t,id:n}),n},uO=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,dO=Object.assign(lO,{success:cO.success,info:cO.info,warning:cO.warning,error:cO.error,custom:cO.custom,message:cO.message,promise:cO.promise,dismiss:cO.dismiss,loading:cO.loading},{getHistory:()=>cO.toasts,getToasts:()=>cO.getActiveToasts()});ZD(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function fO(e){return e.label!==void 0}var pO=3,mO=`24px`,hO=`16px`,gO=4e3,_O=356,vO=14,yO=45,bO=200;function xO(...e){return e.filter(Boolean).join(` `)}function SO(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var CO=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:T=`Close toast`}=e,[E,D]=N.useState(null),[O,k]=N.useState(null),[A,j]=N.useState(!1),[M,ee]=N.useState(!1),[P,F]=N.useState(!1),[I,te]=N.useState(!1),[ne,re]=N.useState(!1),[ie,L]=N.useState(0),[ae,oe]=N.useState(0),se=N.useRef(n.duration||y||gO),ce=N.useRef(null),le=N.useRef(null),ue=c===0,de=c+1<=o,fe=n.type,pe=n.dismissible!==!1,me=n.className||``,he=n.descriptionClassName||``,ge=N.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),_e=N.useMemo(()=>n.closeButton??p,[n.closeButton,p]),ve=N.useMemo(()=>n.duration||y||gO,[n.duration,y]),ye=N.useRef(0),be=N.useRef(0),xe=N.useRef(0),Se=N.useRef(null),[Ce,we]=b.split(`-`),Te=N.useMemo(()=>s.reduce((e,t,n)=>n>=ge?e:e+t.height,0),[s,ge]),Ee=oO(),De=n.invert||t,Oe=fe===`loading`;be.current=N.useMemo(()=>ge*x+Te,[ge,Te]),N.useEffect(()=>{se.current=ve},[ve]),N.useEffect(()=>{j(!0)},[]),N.useEffect(()=>{let e=le.current;if(e){let t=e.getBoundingClientRect().height;return oe(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),N.useLayoutEffect(()=>{if(!A)return;let e=le.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,oe(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[A,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let ke=N.useCallback(()=>{ee(!0),L(be.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},bO)},[n,d,a,be]);N.useEffect(()=>{if(n.promise&&fe===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Ee?(()=>{if(xe.current<ye.current){let e=new Date().getTime()-ye.current;se.current-=e}xe.current=new Date().getTime()})():se.current!==1/0&&(ye.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),ke()},se.current)),()=>clearTimeout(e)},[u,i,n,fe,Ee,ke]),N.useEffect(()=>{n.delete&&(ke(),n.onDismiss==null||n.onDismiss.call(n,n))},[ke,n.delete]);function Ae(){return w?.loading?N.createElement(`div`,{className:xO(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":fe===`loading`},w.loading):N.createElement(eO,{className:xO(C?.loader,n?.classNames?.loader),visible:fe===`loading`})}let je=n.icon||w?.[fe]||QD(fe);return N.createElement(`li`,{tabIndex:0,ref:le,className:xO(_,me,C?.toast,n?.classNames?.toast,C?.default,C?.[fe],n?.classNames?.[fe]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":A,"data-promise":!!n.promise,"data-swiped":ne,"data-removed":M,"data-visible":de,"data-y-position":Ce,"data-x-position":we,"data-index":c,"data-front":ue,"data-swiping":P,"data-dismissible":pe,"data-type":fe,"data-invert":De,"data-swipe-out":I,"data-swipe-direction":O,"data-expanded":!!(u||S&&A),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${M?ie:be.current}px`,"--initial-height":S?`auto`:`${ae}px`,...m,...n.style},onDragEnd:()=>{F(!1),D(null),Se.current=null},onPointerDown:e=>{e.button!==2&&(Oe||!pe||(ce.current=new Date,L(be.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(F(!0),Se.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(I||!pe)return;Se.current=null;let e=Number(le.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(le.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ce.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=yO||a>.11){L(be.current),n.onDismiss==null||n.onDismiss.call(n,n),k(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),ke(),te(!0);return}else{var o,s;(o=le.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=le.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}re(!1),F(!1),D(null)},onPointerMove:t=>{var n,r;if(!Se.current||!pe||window.getSelection()?.toString().length>0)return;let i=t.clientY-Se.current.y,a=t.clientX-Se.current.x,o=e.swipeDirections??SO(b);!E&&(Math.abs(a)>1||Math.abs(i)>1)&&D(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(E===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(E===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&re(!0),(n=le.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=le.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},_e&&!n.jsx&&fe!==`loading`?N.createElement(`button`,{"aria-label":T,"data-disabled":Oe,"data-close-button":!0,onClick:Oe||!pe?()=>{}:()=>{ke(),n.onDismiss==null||n.onDismiss.call(n,n)},className:xO(C?.closeButton,n?.classNames?.closeButton)},w?.close??aO):null,(fe||n.icon||n.promise)&&n.icon!==null&&(w?.[fe]!==null||n.icon)?N.createElement(`div`,{"data-icon":``,className:xO(C?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Ae():null,n.type===`loading`?null:je):null,N.createElement(`div`,{"data-content":``,className:xO(C?.content,n?.classNames?.content)},N.createElement(`div`,{"data-title":``,className:xO(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?N.createElement(`div`,{"data-description":``,className:xO(v,he,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),N.isValidElement(n.cancel)?n.cancel:n.cancel&&fO(n.cancel)?N.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{fO(n.cancel)&&pe&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),ke())},className:xO(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,N.isValidElement(n.action)?n.action:n.action&&fO(n.action)?N.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{fO(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&ke())},className:xO(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function wO(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function TO(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?hO:mO;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var EO=N.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=pO,toastOptions:g,dir:_=wO(),gap:v=vO,icons:y,containerAriaLabel:b=`Notifications`}=e,[x,S]=N.useState([]),C=N.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),w=N.useMemo(()=>Array.from(new Set([i].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,i]),[T,E]=N.useState([]),[D,O]=N.useState(!1),[k,A]=N.useState(!1),[j,M]=N.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),ee=N.useRef(null),P=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),F=N.useRef(null),I=N.useRef(!1),te=N.useCallback(e=>{S(t=>(t.find(t=>t.id===e.id)?.delete||cO.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return N.useEffect(()=>cO.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{$i.flushSync(()=>{S(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[x]),N.useEffect(()=>{if(d!==`system`){M(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?M(`dark`):M(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{M(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{M(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),N.useEffect(()=>{x.length<=1&&O(!1)},[x]),N.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;O(!0),(t=ee.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===ee.current||ee.current?.contains(document.activeElement))&&O(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),N.useEffect(()=>{if(ee.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,I.current=!1)}},[ee.current]),N.createElement(`section`,{ref:t,"aria-label":`${b} ${P}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},w.map((t,n)=>{let[i,a]=t.split(`-`);return C.length?N.createElement(`ol`,{key:t,dir:_===`auto`?wO():_,tabIndex:-1,ref:ee,className:c,"data-sonner-toaster":!0,"data-sonner-theme":j,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${T[0]?.height||0}px`,"--width":`${_O}px`,"--gap":`${v}px`,...m,...TO(l,u)},onBlur:e=>{I.current&&!e.currentTarget.contains(e.relatedTarget)&&(I.current=!1,F.current&&=(F.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||I.current||(I.current=!0,F.current=e.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{k||O(!1)},onDragEnd:()=>O(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||A(!0)},onPointerUp:()=>A(!1)},C.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>N.createElement(CO,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:k,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:te,toasts:C.filter(e=>e.position==n.position),heights:T.filter(e=>e.position==n.position),setHeights:E,expandByDefault:o,gap:v,expanded:D,swipeDirections:e.swipeDirections}))):null}))}),DO=Symbol.for(`~effect/http/Headers`),OO=Object.defineProperties(Object.create(null),{[DO]:{value:DO},[po]:{value(e){return RO(this,qc(e,zO))}},toJSON:{value(){return ho(this)}},[Ja]:{value(e){return AO(this,e)}},[Aa]:{value(){return za(this)}},toString:{value:Oo.toString},[Eo]:{value:Oo[Eo]}}),kO=e=>Object.assign(Object.create(OO),e),AO=hl(Bs()),jO=Object.create(OO),MO=e=>{if(e===void 0)return jO;if(Symbol.iterator in e){let t=Object.create(OO);for(let[n,r]of e)t[n.toLowerCase()]=r;return t}let t=Object.create(OO);for(let[n,r]of Object.entries(e))Array.isArray(r)?t[n.toLowerCase()]=r.join(`, `):r!==void 0&&(t[n.toLowerCase()]=r);return t},NO=e=>Object.setPrototypeOf(e,OO),PO=z(3,(e,t,n)=>{let r=kO(e);return r[t.toLowerCase()]=n,r}),FO=z(2,(e,t)=>kO({...e,...MO(t)})),IO=z(2,(e,t)=>{let n=kO(e);return Object.assign(n,t),n}),LO=z(2,(e,t)=>{let n=kO(e);return delete n[t.toLowerCase()],n}),RO=z(2,(e,t)=>{let n={...e},r=t=>{if(typeof t==`string`){let r=t.toLowerCase();r in e&&(n[r]=Oy(e[r]))}else for(let r in e)t.test(r)&&(n[r]=Oy(e[r]))};if(Array.isArray(t))for(let e=0;e<t.length;e++)r(t[e]);else r(t);return n}),zO=tl(`effect/Headers/CurrentRedactedNames`,{defaultValue:()=>[`authorization`,`cookie`,`set-cookie`,`x-api-key`]}),BO=`~effect/http/Cookies`,VO=`~effect/http/Cookies/Cookie`;mh(`CookieError`);var HO={[BO]:BO,...Oo,toJSON(){return{_id:`effect/Cookies`,cookies:fl(this.cookies,e=>e.toJSON())}},pipe(){return ea(this,arguments)}},UO=e=>{let t=Object.create(HO);return t.cookies=e,t},WO=e=>{let t={};for(let n of e)t[n.name]=n;return UO(t)},GO=e=>{let t=typeof e==`string`?[e]:e,n=[];for(let e of t){let t=KO(e.trim());t&&n.push(t)}return WO(n)};function KO(e){let t=e.split(`;`).map(e=>e.trim()).filter(e=>e!==``);if(t.length===0)return;let n=t[0].indexOf(`=`);if(n===-1)return;let r=t[0].slice(0,n);if(!qO.test(r))return;let i=t[0].slice(n+1),a=YO(i);if(t.length===1)return Object.assign(Object.create(JO),{name:r,value:a,valueEncoded:i});let o={};for(let e=1;e<t.length;e++){let n=t[e],r=n.indexOf(`=`),i=r===-1?n:n.slice(0,r).trim(),a=r===-1?void 0:n.slice(r+1).trim();switch(i.toLowerCase()){case`domain`:{if(a===void 0)break;let e=a.trim().replace(/^\./,``);e&&(o.domain=e);break}case`expires`:{if(a===void 0)break;let e=new Date(a);isNaN(e.getTime())||(o.expires=e);break}case`max-age`:{if(a===void 0)break;let e=parseInt(a,10);isNaN(e)||(o.maxAge=nu(e));break}case`path`:if(a===void 0)break;a[0]===`/`&&(o.path=a);break;case`priority`:if(a===void 0)break;switch(a.toLowerCase()){case`low`:o.priority=`low`;break;case`medium`:o.priority=`medium`;break;case`high`:o.priority=`high`;break}break;case`httponly`:o.httpOnly=!0;break;case`secure`:o.secure=!0;break;case`partitioned`:o.partitioned=!0;break;case`samesite`:if(a===void 0)break;switch(a.toLowerCase()){case`lax`:o.sameSite=`lax`;break;case`strict`:o.sameSite=`strict`;break;case`none`:o.sameSite=`none`;break}break}}return Object.assign(Object.create(JO),{name:r,value:a,valueEncoded:i,options:Object.keys(o).length>0?o:void 0})}var qO=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,JO={[VO]:VO,...Oo,toJSON(){return{_id:`effect/Cookies/Cookie`,name:this.name,value:this.value,options:this.options}}},YO=e=>{try{return decodeURIComponent(e)}catch{return e}},XO=`~effect/http/HttpClientError`,ZO=e=>Da(e,XO),QO=class extends mh(`HttpClientError`){constructor(e){`cause`in e.reason?super({...e,cause:e.reason.cause}):super(e)}[XO]=XO;get request(){return this.reason.request}get response(){return`response`in this.reason?this.reason.response:void 0}get message(){return this.reason.message}},$O=e=>e.endsWith(`Error`)?e.slice(0,-5):e,ek=(e,t,n)=>t?`${e}: ${t} (${n})`:`${e} error (${n})`,tk=class extends mh(`TransportError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return ek($O(this._tag),this.description,this.methodAndUrl)}};mh(`EncodeError`);var nk=class extends mh(`InvalidUrlError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return ek($O(this._tag),this.description,this.methodAndUrl)}},rk=class extends mh(`StatusCodeError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let e=`${this.response.status} ${this.methodAndUrl}`;return ek($O(this._tag),this.description,e)}},ik=class extends mh(`DecodeError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let e=`${this.response.status} ${this.methodAndUrl}`;return ek($O(this._tag),this.description,e)}},ak=class extends mh(`EmptyBodyError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let e=`${this.response.status} ${this.methodAndUrl}`;return ek($O(this._tag),this.description,e)}};rT(XO)({_tag:fw(`HttpError`),kind:$C([`EncodeError`,`DecodeError`,`TransportError`,`InvalidUrlError`,`StatusCodeError`,`EmptyBodyError`]),cause:H(Fw())});var ok=`~effect/http/UrlParams`,sk=e=>Da(e,ok),ck={...Ho,[ok]:ok,[Symbol.iterator](){return this.params[Symbol.iterator]()},toJSON(){return{_id:`UrlParams`,params:Object.fromEntries(this.params)}},[Ja](e){return fk(this,e)},[Aa](){return Va(this.params.flat())}},lk=e=>{let t=Object.create(ck);return t.params=e,t},uk=e=>{let t=dk(e),n=[];for(let e=0;e<t.length;e++)if(Array.isArray(t[e][0])){let[r,i]=t[e];n.push([`${r[0]}[${r.slice(1).join(`][`)}]`,i])}else n.push(t[e]);return lk(n)},dk=e=>{let t=typeof e[Symbol.iterator]==`function`?_l(e):Object.entries(e),n=[];for(let[e,r]of t)if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]!==void 0&&n.push([e,String(r[t])]);else if(typeof r==`object`){let t=dk(r);for(let[r,i]of t)n.push([[e,...typeof r==`string`?[r]:r],i])}else r!==void 0&&n.push([e,String(r)]);return n},fk=Rs((e,t)=>pk(e.params,t.params)),pk=Ml(ll([Bs(),Bs()])),mk=SC(sk,{typeConstructor:{_tag:`effect/http/UrlParams`},generation:{runtime:`UrlParams.UrlParamsSchema`,Type:`UrlParams.UrlParams`,Encoded:`typeof UrlParams.UrlParamsSchema["Encoded"]`,importDeclaration:`import * as UrlParams from "effect/unstable/http/UrlParams"`},expected:`UrlParams`,toEquivalence:()=>fk,toCodec:()=>hw()(K(YC([U,U])),Ob({decode:lk,encode:e=>e.params}))}),hk=lk([]),gk=z(2,(e,t)=>lk(t(e.params))),_k=z(2,(e,t)=>{let n=uk(t),r=n.params,i=new Set;for(let e=0;e<r.length;e++)i.add(r[e][0]);for(let t=0;t<e.params.length;t++)i.has(e.params[t][0])||r.push(e.params[t]);return n}),vk=z(2,(e,t)=>gk(e,bl(uk(t).params))),yk=class extends mh(`UrlParamsError`){},bk=(e,t,n)=>{try{let r=new URL(e,Sk());for(let e=0;e<t.params.length;e++){let[n,i]=t.params[e];i!==void 0&&r.searchParams.append(n,i)}return n!==void 0&&(r.hash=n),rl(r)}catch(e){return il(new yk({cause:e}))}},xk=e=>new URLSearchParams(e.params).toString(),Sk=()=>{if(`location`in globalThis&&globalThis.location!==void 0&&globalThis.location.origin!==void 0&&globalThis.location.pathname!==void 0)return location.origin+location.pathname},Ck=mk.pipe(aw(qC(U,QC([U,XC(U)])),Ob({decode:e=>{let t={};for(let[n,r]of e.params){let e=t[n];e===void 0?t[n]=r:typeof e==`string`?t[n]=[e,r]:e.push(r)}return t},encode:uk}))),wk=`~effect/http/HttpBody`,Tk=e=>Da(e,wk);mh(`HttpBodyError`);var Ek=class{[wk];constructor(){this[wk]=wk}[Eo](){return this.toJSON()}toString(){return yo(this,{ignoreToString:!0})}},Dk=new class extends Ek{_tag=`Empty`;toJSON(){return{_id:`effect/HttpBody`,_tag:`Empty`}}},Ok=class extends Ek{_tag=`Uint8Array`;body;contentType;contentLength;constructor(e,t,n){super(),this.body=e,this.contentType=t,this.contentLength=n}toJSON(){return{_id:`effect/HttpBody`,_tag:`Uint8Array`,body:this.contentType.startsWith(`text/`)||this.contentType.endsWith(`json`)?new TextDecoder().decode(this.body):`Uint8Array(${this.body.length})`,contentType:this.contentType,contentLength:this.contentLength}}},kk=(e,t)=>new Ok(e,t??`application/octet-stream`,e.length),Ak=new TextEncoder,jk=(e,t)=>kk(Ak.encode(e),t??`text/plain`),Mk=(e,t)=>jk(xk(e),t??`application/x-www-form-urlencoded`),Nk=class extends Ek{_tag=`FormData`;contentType=void 0;contentLength=void 0;formData;constructor(e){super(),this.formData=e}toJSON(){return{_id:`effect/HttpBody`,_tag:`FormData`,formData:this.formData}}},Pk=e=>new Nk(e),Fk=e=>e!==`GET`&&e!==`HEAD`&&e!==`OPTIONS`&&e!==`TRACE`,Ik=[[`GET`,`get`],[`POST`,`post`],[`PUT`,`put`],[`DELETE`,`del`],[`PATCH`,`patch`],[`HEAD`,`head`],[`OPTIONS`,`options`],[`TRACE`,`trace`]],Lk=`~effect/http/HttpClientRequest`,Rk={[Lk]:Lk,...Oo,toJSON(){return{_id:`HttpClientRequest`,method:this.method,url:this.url,urlParams:this.urlParams,hash:this.hash,headers:ho(this.headers),body:this.body.toJSON()}},pipe(){return ea(this,arguments)}};function zk(e,t,n,r,i,a){let o=Object.create(Rk);return o.method=e,o.url=t,o.urlParams=n,o.hash=r,o.headers=i,o.body=a,o}var Bk=zk(`GET`,``,hk,gc(),jO,Dk),Vk=e=>(t,n)=>Hk(Bk,{method:e,url:t,...n??void 0}),Hk=z(2,(e,t)=>{let n=e;return t.method&&(n=Uk(n,t.method)),t.url&&(n=Jk(n,t.url)),t.headers&&(n=Gk(n,t.headers)),t.urlParams&&(n=Zk(n,t.urlParams)),t.hash&&(n=$k(n,t.hash)),t.body&&(n=eA(n,t.body)),t.accept&&(n=Kk(n,t.accept)),t.acceptJson&&(n=qk(n)),n}),Uk=z(2,(e,t)=>zk(t,e.url,e.urlParams,e.hash,e.headers,e.body)),Wk=z(3,(e,t,n)=>zk(e.method,e.url,e.urlParams,e.hash,PO(e.headers,t,n),e.body)),Gk=z(2,(e,t)=>zk(e.method,e.url,e.urlParams,e.hash,FO(e.headers,t),e.body)),Kk=z(2,(e,t)=>Wk(e,`Accept`,t)),qk=Kk(`application/json`),Jk=z(2,(e,t)=>{if(typeof t==`string`)return zk(e.method,t,e.urlParams,e.hash,e.headers,e.body);let n=new URL(t.toString()),r=uk(n.searchParams),i=Cc(n.hash===``?void 0:n.hash.slice(1));return n.search=``,n.hash=``,zk(e.method,n.toString(),r,i,e.headers,e.body)}),Yk=z(2,(e,t)=>t===``?e:zk(e.method,Xk(t,e.url),e.urlParams,e.hash,e.headers,e.body)),Xk=(e,t)=>{let n=e.endsWith(`/`),r=t.startsWith(`/`);return n&&r?e+t.slice(1):!n&&!r?e+`/`+t:e+t},Zk=z(2,(e,t)=>zk(e.method,e.url,_k(e.urlParams,t),e.hash,e.headers,e.body)),Qk=z(2,(e,t)=>zk(e.method,e.url,vk(e.urlParams,t),e.hash,e.headers,e.body)),$k=z(2,(e,t)=>zk(e.method,e.url,e.urlParams,B(t),e.headers,e.body)),eA=z(2,(e,t)=>{let n=e.headers;return t._tag===`Empty`||t._tag===`FormData`?n=LO(LO(n,`Content-Type`),`Content-length`):(t.contentType&&(n=PO(n,`content-type`,t.contentType)),t.contentLength!==void 0&&(n=PO(n,`content-length`,t.contentLength.toString()))),zk(e.method,e.url,e.urlParams,e.hash,n,t)}),tA=z(2,(e,t)=>eA(e,Pk(t))),nA=`~effect/http/HttpIncomingMessage`,rA=(e,t)=>{let n=e.headers[`content-type`]??``,r;if(n.includes(`application/json`))try{r=Og(e.json)}catch{}else if(n.includes(`text/`)||n.includes(`urlencoded`))try{r=Og(e.text)}catch{}let i={...t,headers:ho(e.headers),remoteAddress:e.remoteAddress};return r!==void 0&&(i.body=r),i},iA=`~effect/http/HttpClientResponse`,aA=(e,t)=>new sA(e,t),oA=z(2,(e,t)=>{let n=e.status;return t[n]?t[n](e):n>=200&&n<300&&t[`2xx`]?t[`2xx`](e):n>=300&&n<400&&t[`3xx`]?t[`3xx`](e):n>=400&&n<500&&t[`4xx`]?t[`4xx`](e):n>=500&&n<600&&t[`5xx`]?t[`5xx`](e):t.orElse(e)}),sA=class extends ko{[nA];[iA];request;source;constructor(e,t){super(),this.request=e,this.source=t,this[nA]=nA,this[iA]=iA}toJSON(){return rA(this,{_id:`HttpClientResponse`,request:this.request.toJSON(),status:this.status})}get status(){return this.source.status}get headers(){return MO(this.source.headers)}cachedCookies;get cookies(){return this.cachedCookies?this.cachedCookies:this.cachedCookies=GO(this.source.headers.getSetCookie())}get remoteAddress(){return gc()}get stream(){return this.source.body?PT({evaluate:()=>this.source.body,onError:e=>new QO({reason:new ik({request:this.request,response:this,cause:e})})}):jT(new QO({reason:new ak({request:this.request,response:this,description:`can not create stream from empty body`})}))}get json(){return Kh(this.text,e=>Uh({try:()=>e===``?null:JSON.parse(e),catch:e=>new QO({reason:new ik({request:this.request,response:this,cause:e})})}))}textBody;get text(){return this.textBody?this.textBody:(this.textBody=Ah({try:()=>this.source.text(),catch:e=>new QO({reason:new ik({request:this.request,response:this,cause:e})})}).pipe(pg,Og),this.arrayBufferBody=Zh(this.textBody,e=>new TextEncoder().encode(e).buffer),this.textBody)}get urlParamsBody(){return Kh(this.text,e=>Uh({try:()=>uk(new URLSearchParams(e)),catch:e=>new QO({reason:new ik({request:this.request,response:this,cause:e})})}))}formDataBody;get formData(){return this.formDataBody??=Ah({try:()=>this.source.formData(),catch:e=>new QO({reason:new ik({request:this.request,response:this,cause:e})})}).pipe(pg,Og)}arrayBufferBody;get arrayBuffer(){return this.arrayBufferBody?this.arrayBufferBody:(this.arrayBufferBody=Ah({try:()=>this.source.arrayBuffer(),catch:e=>new QO({reason:new ik({request:this.request,response:this,cause:e})})}).pipe(pg,Og),this.textBody=Zh(this.arrayBufferBody,e=>new TextDecoder().decode(e)),this.arrayBufferBody)}pipe(){return ea(this,arguments)}},cA=e=>NO({b3:`${e.traceId}-${e.spanId}-${e.sampled?`1`:`0`}${bc(e.parent,{onNone:()=>``,onSome:e=>`-${e.spanId}`})}`,traceparent:`00-${e.traceId}-${e.spanId}-${e.sampled?`01`:`00`}`}),lA=`~effect/http/HttpClient`,uA=Nc(`effect/HttpClient`),dA=z(2,(e,t)=>fA(n=>t(e.postprocess(n)),e.preprocess)),fA=(e,t)=>{let n=Object.create(pA);return n.preprocess=t,n.postprocess=e,n.execute=function(n){return e(t(n))},n},pA={[lA]:lA,pipe(){return ea(this,arguments)},...Oo,toJSON(){return{_id:`effect/HttpClient`}},...Object.fromEntries(Ik.map(([e,t])=>[t,function(t,n){return this.execute(Vk(e)(t,n))}]))},mA=e=>fA(t=>Kh(t,t=>Wh(n=>{let r=xA.get(t),i=r??new AbortController,a=bk(t.url,t.urlParams,Tc(t.hash));if(ol(a))return zh(new QO({reason:new nk({request:t,cause:a.failure})}));let o=a.success;if(n.getRef(Eu)||n.getRef(gA)(t)){let a=e(t,o,i.signal,n);return r?a:_g(e=>rg(e(a),{onSuccess(e){return bA.register(e,i),V(new SA(e,i))},onFailure(e){return vm(e)&&i.abort(),Bh(e)}}))}return yg(n.getRef(vA)(t),{kind:`client`},a=>{a.attribute(`http.request.method`,t.method),a.attribute(`server.address`,o.origin),o.port!==``&&a.attribute(`server.port`,+o.port),a.attribute(`url.full`,o.toString()),a.attribute(`url.path`,o.pathname),a.attribute(`url.scheme`,o.protocol.slice(0,-1));let s=o.search.slice(1);s!==``&&a.attribute(`url.query`,s);let c=n.getRef(zO),l=RO(t.headers,c);for(let e in l)a.attribute(`http.request.header.${e}`,String(l[e]));return t=n.getRef(_A)?Gk(t,cA(a)):t,_g(s=>s(e(t,o,i.signal,n)).pipe(bg(a,{captureStackTrace:!1}),rg({onSuccess:e=>{a.attribute(`http.response.status_code`,e.status);let t=RO(e.headers,c);for(let e in t)a.attribute(`http.response.header.${e}`,String(t[e]));return r?V(e):(bA.register(e,i),V(new SA(e,i)))},onFailure(e){return!r&&vm(e)&&i.abort(),Bh(e)}})))})})),V),hA=z(2,(e,t)=>fA(e.postprocess,n=>Zh(e.preprocess(n),t))),gA=tl(`effect/http/HttpClient/TracerDisabledWhen`,{defaultValue:()=>oa}),_A=tl(`effect/HttpClient/TracerPropagationEnabled`,{defaultValue:aa}),vA=tl(`effect/http/HttpClient/SpanNameGenerator`,{defaultValue:()=>e=>`http.client ${e.method}`}),yA=e=>nh(uA)(ag(t=>Zh(e,e=>dA(e,sg(e=>Qc(t,e)))))),bA=(()=>{if(`FinalizationRegistry`in globalThis&&globalThis.FinalizationRegistry){let e=new FinalizationRegistry(e=>{e.abort()});return{register(t,n){e.register(t,n,t)},unregister(t){e.unregister(t)}}}let e=new Map;return{register(t,n){e.set(t,setTimeout(()=>n.abort(),5e3))},unregister(t){let n=e.get(t);n!==void 0&&(clearTimeout(n),e.delete(t))}}})(),xA=new WeakMap,SA=class{original;controller;constructor(e,t){this.original=e,this.controller=t}[iA]=iA;[nA]=nA;applyInterrupt(e){return Nh(()=>(bA.unregister(this.original),hg(e,()=>Ph(()=>{this.controller.abort()}))))}get request(){return this.original.request}get status(){return this.original.status}get headers(){return this.original.headers}get cookies(){return this.original.cookies}get remoteAddress(){return this.original.remoteAddress}get formData(){return this.applyInterrupt(this.original.formData)}get text(){return this.applyInterrupt(this.original.text)}get json(){return this.applyInterrupt(this.original.json)}get urlParamsBody(){return this.applyInterrupt(this.original.urlParamsBody)}get arrayBuffer(){return this.applyInterrupt(this.original.arrayBuffer)}get stream(){return AT(()=>(bA.unregister(this.original),VT(this.original.stream,Ph(()=>{this.controller.abort()}))))}toJSON(){return this.original.toJSON()}[Eo](){return this.original[Eo]()}pipe(){return ea(this,arguments)}},CA=tl(`effect/http/FetchHttpClient/Fetch`,{defaultValue:()=>globalThis.fetch}),wA=class extends Nc()(`effect/http/FetchHttpClient/RequestInit`){},TA=yA(V(mA((e,t,n,r)=>{let i=r.getRef(CA),a=r.context.mapUnsafe.get(wA.key)??{},o=a.headers?IO(MO(a.headers),e.headers):e.headers;o[`content-length`]&&(o=LO(o,`content-length`));let s=r=>Zh(Ah({try:()=>i(t,{...a,method:e.method,headers:o,body:r,duplex:e.body._tag===`Stream`?`half`:void 0,signal:n}),catch:t=>new QO({reason:new tk({request:e,cause:t})})}),t=>aA(e,t));switch(e.body._tag){case`Raw`:case`Uint8Array`:return s(e.body.body);case`FormData`:return s(e.body.formData);case`Stream`:return Kh(KT(e.body.stream),s)}return s(void 0)}))),EA=e=>()=>{let t=TC(XC(e));return sv((e,n)=>V(Kh(e,e=>t(e))))},DA=()=>sv((e,t)=>Ph(()=>{let t=[],n,r=kA(e=>{e._tag===`Retry`?n=e:t.push(e)}),i=Kh(e,e=>{for(let t=0;t<e.length;t++)r.feed(e[t]);return Fh});return Nh(function e(){if(xl(t)){let e=t;return t=[],V(e)}else if(n)return zh(n);return Kh(i,e)})})),OA=e=>Dv(DA(),EA(MA.pipe(aw(e)))());function kA(e){let t,n,r,i,a,o,s,c;return l(),{feed:u,reset:l};function l(){t=!0,n=``,r=0,i=-1,a=void 0,s=void 0,c=``}function u(e){n=n?n+e:e,t&&jA(n)&&(n=n.slice(AA.length)),t=!1;let a=n.length,o=0,s=!1;for(;o<a;){s&&=(n[o]===`
|
|
18
|
-
`&&++o,!1);let e=-1,t=i,c;for(let i=r;e<0&&i<a;++i)c=n[i],c===`:`&&t<0?t=i-o:c===`\r`?(s=!0,e=i-o):c===`
|
|
19
|
-
`&&(e=i-o);if(e<0){r=a-o,i=t;break}else r=0,i=-1;d(n,o,t,e),o+=e+1}o===a?n=``:o>0&&(n=n.slice(o))}function d(t,n,r,i){if(i===0){c.length>0&&(e({_tag:`Event`,id:a,event:s??`message`,data:c.slice(0,-1)}),c=``,a=void 0),s=void 0;return}let l=r<0,u=t.slice(n,n+(l?i:r)),d=0;d=l?i:t[n+r+1]===` `?r+2:r+1;let f=n+d,p=i-d,m=t.slice(f,f+p).toString();if(u===`data`)c+=m?`${m}\n`:`
|
|
20
|
-
`;else if(u===`event`)s=m;else if(u===`id`&&!m.includes(`\0`))a=m,o=m;else if(u===`retry`){let t=parseInt(m,10);Number.isNaN(t)||e(new PA({duration:tu(t),lastEventId:o}))}}}var AA=[239,187,191];function jA(e){return AA.every((t,n)=>e.charCodeAt(n)===t)}var MA=G({id:H(U),event:U,data:U}),NA=`~effect/encoding/Sse/Retry`,PA=class e extends dh(`Retry`){[NA]=NA;static is(e){return Da(e,NA)}static filter(t){return e.is(t)?rl(t):il(t)}};({...Ho}),mh(`HttpServerError`),mh(`RequestParseError`),mh(`RouteNotFound`),mh(`InternalError`),mh(`ResponseError`),mh(`ServeError`),Nc()(`effect/http/HttpServerError/ClientAbort`);var FA;(function(e){e[e.key=0]=`key`,e[e.whitespace=1]=`whitespace`,e[e.value=2]=`value`})(FA||={});var IA;(function(e){e[e.headers=0]=`headers`,e[e.body=1]=`body`})(IA||={}),mh(`MultipartError`);var LA=Nc(`effect/http/HttpServerRequest`);Nc()(`effect/http/ParsedSearchParams`);var RA=new WeakSet,zA=e=>Wh(t=>{let n=Kc(t.context,LA);return RA.add(n.source),e}),BA=Nc(`effect/http/HttpRouter`);Nc()(`effect/http/HttpRouter/RouteContext`);var VA=e=>e.endsWith(`/`)?e.slice(0,-1):e,HA=z(2,(e,t)=>(t=VA(t),e===`*`?`${t}/*`:e===`/`?t:t+e)),UA=`~effect/http/HttpRouter/Middleware`,WA=function(){return arguments.length===0?GA:GA(arguments[0],arguments[1])},GA=(e,t)=>t?.global?ah(Rh(function*(){let t=yield*BA,n=Eh(e)?yield*e:e;yield*t.addGlobalMiddleware(n)})):new JA(Eh(e)?ih(Zh(e,e=>Lc(new Map([[qA,e]])))):th(Lc(new Map([[qA,e]])))),KA=0,qA=`effect/http/HttpRouter/MiddlewareFn`,JA=class e{[UA]={};layerFn;dependencies;constructor(e,t){this.layerFn=e,this.dependencies=t;let n=`effect/http/HttpRouter/Middleware-${++KA}`;this.layer=ih(Rh({self:this},function*(){let e=yield*ig(),t=[e.mapUnsafe.get(qA)];if(this.dependencies){let n=yield*$m,r=qc(e,Im),i=yield*eh(this.dependencies,n,r);t.push(...XA(i))}return Lc(new Map([[n,t]]))})).pipe(ch(this.layerFn))}layer;combine(t){return new e(this.layerFn,this.dependencies?lh(this.dependencies,t.layer):t.layer)}},YA=new WeakMap,XA=e=>{let t=YA.get(e);if(t)return t;let n=kl(),r=0;for(let[t,i]of e.mapUnsafe)t.startsWith(`effect/http/HttpRouter/Middleware-`)&&(n.push(i),i.length>r&&(r=i.length));if(n.length===0)t=[];else{let e=new Set;for(let t=r-1;t>=0;t--)for(let r of n)t<r.length&&e.add(r[t]);t=_l(e).reverse()}return YA.set(e,t),t};WA(zA).layer;var ZA={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,OK:200,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511},QA=`~effect/httpapi/HttpApiSchema/Stream`;function $A(e){let t=typeof e==`string`?ZA[e]:e;return e=>e.annotate({httpApiStatus:t})}var ej=(e=>GC.pipe($A(e)))(204),tj=e=>FC(e)&&Da(e,QA),nj=e=>tj(e)&&e._tag===`StreamSse`,rj=e=>tj(e)&&e._tag===`StreamUint8Array`;function ij(e,t){return e.annotate({"~httpApiEncoding":{_tag:t._tag,contentType:t.contentType??aj(t._tag)}})}function aj(e){switch(e){case`Multipart`:return`multipart/form-data`;case`Json`:return`application/json`;case`FormUrlEncoded`:return`application/x-www-form-urlencoded`;case`Uint8Array`:return`application/octet-stream`;case`Text`:return`text/plain`}}function oj(e){return t=>ij(t,{_tag:`FormUrlEncoded`,...e})}var sj=e=>{if(Gb(e)||Gb(CS(e)))return!0;let t=e.encoding?.[0].to;return t===void 0?!1:Gb(t)},cj=VS(`~httpApiEncoding`),lj=VS(`httpApiStatus`),uj={_tag:`Json`,contentType:`application/json`},dj={_tag:`FormUrlEncoded`,contentType:`application/x-www-form-urlencoded`};function fj(e){return cj(e)??uj}function pj(e,t){return cj(e)||(Fk(t)?uj:dj)}function mj(e){let t=fj(e);if(t._tag===`Multipart`)throw Error(`Multipart is not supported in response`);return t}function hj(e){return lj(e)??200}function gj(e){return hj(e.ast)}function _j(e){return lj(e)??500}var vj=`~effect/httpapi/HttpApiEndpoint`;function yj(e){let t=[];for(let{schemas:n}of e.payload.values())t.push(...n);return t}function bj(e){let t=Array.from(e.success);return xl(t)?t:[ej]}function xj(e){let t=new Set(e.error);for(let n of e.middlewares){let e=n;for(let n of e.error)t.add(n)}return Array.from(t)}var Sj={[vj]:vj,pipe(){return ea(this,arguments)},prefix(e){return Cj({...this,path:HA(this.path,e)})},middleware(e){return Cj({...this,middlewares:new Set([...this.middlewares,e])})},annotate(e,t){return Cj({...this,annotations:Wc(this.annotations,e,t)})},annotateMerge(e){return Cj({...this,annotations:Qc(this.annotations,e)})}};function Cj(e){return Object.assign(Object.create(Sj),e)}var wj=e=>(t,n,r)=>{let i=r?.disableCodecs??!1,a=i?ra:cT;return Cj({name:t,path:n,method:e,params:Tj(r?.params,a),query:Tj(r?.query,a),headers:Tj(r?.headers,a),payload:Ej(r?.payload,e,i),success:Oj(r?.success,e,i),error:kj(r?.error,i),annotations:Vc(),middlewares:new Set})};function Tj(e,t){if(e!==void 0)return FC(e)?t(e):t(G(e))}function Ej(e,t,n){let r=new Map;if(e===void 0)return r;let i=Array.isArray(e)?e:FC(e)?[e]:[G(e).pipe(oj())],a=n?ra:Rj;for(let e of i){let n=pj(e.ast,t),i=r.get(n.contentType);if(i){if(i.encoding._tag!==n._tag)throw Error(`Multiple payload encodings for content-type: ${n.contentType}`);if(i.encoding._tag===`Multipart`)throw Error(`Multiple multipart payloads for content-type: ${n.contentType}`);i.schemas.push(a(e,t))}else r.set(n.contentType,{encoding:n,schemas:[a(e,t)]})}return r}var Dj=`effect/httpapi/stream/failure`;function Oj(e,t,n){if(e===void 0)return new Set;let r=vl(e);return Aj(r,t),new Set(n?r:r.map(e=>tj(e)?e:Lj(e)))}function kj(e,t){if(e===void 0)return new Set;let n=vl(e);for(let e of n)if(tj(e))throw Error(`Streaming schemas are not supported in error responses`);return new Set(t?n:n.map(Lj))}function Aj(e,t){let n=new Map;for(let r of e)if(tj(r)){Nj(r,t);let e=gj(r),i=Mj(n,e);if(i.stream!==void 0)throw Error(`Multiple streaming success responses for status: ${e}`);if(i.noContent)throw Error(`Cannot combine no-content and streaming success responses for status: ${e}`);if(i.bufferedContentTypes.has(jj(r.contentType)))throw Error(`Cannot combine buffered and streaming success responses for status ${e} and content-type: ${r.contentType}`);n.set(e,{...i,stream:r})}else{let e=hj(r.ast),t=Mj(n,e),i=sj(r.ast);if(t.stream!==void 0){if(i)throw Error(`Cannot combine no-content and streaming success responses for status: ${e}`);let n=mj(r.ast);if(jj(n.contentType)===jj(t.stream.contentType))throw Error(`Cannot combine buffered and streaming success responses for status ${e} and content-type: ${n.contentType}`)}i||t.bufferedContentTypes.add(jj(mj(r.ast).contentType)),t.noContent=t.noContent||i}}function jj(e){let t=e.toLowerCase().trim(),n=t.indexOf(`;`);return n===-1?t:t.slice(0,n).trim()}function Mj(e,t){let n=e.get(t);return n===void 0&&(n={bufferedContentTypes:new Set,noContent:!1},e.set(t,n)),n}function Nj(e,t){if(t===`HEAD`)throw Error(`HEAD endpoints cannot declare streaming success responses`);if(nj(e)&&Pj(e.events.ast))throw Error(`SSE event name is reserved: ${Dj}`)}function Pj(e){return Fj(CS(e),new Set)}function Fj(e,t){if(t.has(e))return!1;if(t.add(e),Zb(e))return e.types.some(e=>Fj(e,t));if(Qb(e))return Fj(e.thunk(),t);if(!Xb(e))return!1;let n=e.propertySignatures.find(e=>e.name===`event`);return n!==void 0&&Ij(n.type,t)}function Ij(e,t){if(t.has(e))return!1;t.add(e);let n=CS(e);return n===e?qb(e)?e.literal===Dj:Zb(e)?e.types.some(e=>Ij(e,t)):Qb(e)?Ij(e.thunk(),t):!1:Ij(n,t)}function Lj(e){switch(mj(e.ast)._tag){case`Json`:return aT(e);case`FormUrlEncoded`:return cT(e);case`Text`:case`Uint8Array`:return e}}function Rj(e,t){switch(pj(e.ast,t)._tag){case`Json`:return aT(e);case`FormUrlEncoded`:return cT(e);case`Text`:case`Uint8Array`:case`Multipart`:return e}}var zj=wj(`GET`),Bj=wj(`POST`),Vj=wj(`PUT`),Hj=wj(`DELETE`),Uj=`~effect/httpapi/HttpApi`,Wj={[Uj]:Uj,pipe(){return ea(this,arguments)},add(...e){let t={...this.groups};for(let n of e)t[n.identifier]=n;return Gj({identifier:this.identifier,groups:t,annotations:this.annotations})},addHttpApi(e){let t={...this.groups};for(let n in e.groups){let r=e.groups[n];r.annotations=Qc(e.annotations,r.annotations),t[n]=r}return Gj({identifier:this.identifier,groups:t,annotations:this.annotations})},prefix(e){return Gj({identifier:this.identifier,groups:fl(this.groups,t=>t.prefix(e)),annotations:this.annotations})},middleware(e){return Gj({identifier:this.identifier,groups:fl(this.groups,t=>t.middleware(e)),annotations:this.annotations})},annotate(e,t){return Gj({identifier:this.identifier,groups:this.groups,annotations:Wc(this.annotations,e,t)})},annotateMerge(e){return Gj({identifier:this.identifier,groups:this.groups,annotations:Qc(this.annotations,e)})}},Gj=e=>{function t(){}return Object.setPrototypeOf(t,Wj),t.groups=e.groups,t.annotations=e.annotations,t},Kj=e=>Gj({identifier:e,groups:new Map,annotations:Vc()}),qj=(e,t)=>{let n=Object.values(e.groups);for(let r of n){let n=Qc(e.annotations,r.annotations);t.onGroup({group:r,mergedAnnotations:n});let i=Object.values(r.endpoints);for(let e of i)t.predicate&&!t.predicate({endpoint:e,group:r})||t.onEndpoint({group:r,endpoint:e,middleware:e.middlewares,mergedAnnotations:Qc(n,e.annotations),successes:Jj(bj(e),hj),errors:Jj(xj(e),_j)})}},Jj=(e,t)=>{let n=new Map;return e.forEach(r),n;function r(e){if(tj(e))return;let r=e.ast,i=t(r),a=n.get(i);a===void 0?n.set(i,[e]):a.push(e)}};Nc()(`effect/httpapi/HttpApi/AdditionalSchemas`);var Yj=(e,t)=>Rh(function*(){let n=yield*ig(),r=t.httpClient.pipe(t?.baseUrl===void 0?ra:hA(Yk(t.baseUrl.toString())));function i(e,t,a,o,s){if(s===-1)return r.execute(a);let c=n.mapUnsafe.get(o[s]);return c===void 0?i(e,t,a,o,s-1):c({endpoint:t,group:e,request:a,next(n){return i(e,t,n,o,s-1)}})}qj(e,{predicate:t?.predicate,onGroup(e){t.onGroup?.(e)},onEndpoint(e){let{group:n,endpoint:r,errors:a,successes:o}=e,s=$j(r.path),c={orElse:hM},l=oA(c);a.forEach((e,t)=>{let n=eM(e);c[t]=e=>Kh(tg(n(e),t=>Bh(pm(sm(new QO({reason:new rk({request:e.request,response:e})})),t))),zh)});let u=new Map;for(let[e,t]of o.entries()){let n=rM(t);for(let[t,r]of n.entries())tM(u,e,t,eM(r))}for(let e of sM(r))tM(u,gj(e),e.contentType,cM(e));for(let[e,t]of u.entries())c[e]=nM(t);let d=YS(r.params,jC),f=yj(r),p=xl(f)?Fk(r.method)?jC(_M(f,r.method)):jC(QC(f)):void 0,m=YS(r.headers,jC),h=YS(r.query,jC),g=Array.from(e.middleware,e=>`${e.key}/Client`),_=jg(function*(e){let a=Vk(r.method)(r.path);if(e!==void 0){if(d!==void 0){let t=yield*d(e.params);a=Jk(a,s(t))}if(p!==void 0)if(Fk(r.method))if(e.payload instanceof FormData)a=tA(a,e.payload);else{let t=yield*p(e.payload);a=eA(a,t)}else{let t=yield*p(e.payload);a=Qk(a,t)}if(m!==void 0){let t=yield*m(e.headers);a=Gk(a,t)}if(h!==void 0){let t=yield*h(e.query);a=Qk(a,t)}}let o=yield*i(n,r,a,g,g.length-1);if(e?.responseMode===`response-only`)return o;let c=yield*t.transformResponse===void 0?l(o):t.transformResponse(l(o));return e?.responseMode===`decoded-and-response`?[c,o]:c});t.onEndpoint({...e,endpointFn:_})}})}),Xj=(e,t)=>Kh(uA,n=>Zj(e,{...t,httpClient:t?.transformClient?t.transformClient(n):n})),Zj=(e,t)=>{let n={};return Yj(e,{...t,onGroup({group:e}){e.topLevel||(n[e.identifier]={})},onEndpoint({endpoint:e,endpointFn:t,group:r}){(r.topLevel?n:n[r.identifier])[e.name]=t}}).pipe(Qh(n))},Qj=/(\/?):(\w+)(\?)?/g,$j=e=>Qj.test(e)?(Qj.lastIndex=0,t=>(Qj.lastIndex=0,e.replace(Qj,(e,n,r,i)=>{let a=t[r];if(a===void 0){if(i!==void 0)return``;throw Error(`Missing path parameter: ${r}`)}return`${n}${encodeURIComponent(a)}`}))):t=>e;function eM(e){let t=TC(mM(e));return e=>Kh(e.arrayBuffer,t)}function tM(e,t,n,r){let i=iM(n),a=e.get(t);a===void 0?e.set(t,[{contentType:i,decode:r}]):a.push({contentType:i,decode:r})}function nM(e){let t=e[0];return e.length===1&&t!==void 0?t.decode:t=>{let n=iM(t.headers[`content-type`]??``),r=e.find(e=>e.contentType===n);return r===void 0?aM(t,n,e):r.decode(t)}}function rM(e){let t=new Map;for(let n of e){let e=mj(n.ast).contentType,r=t.get(e);r===void 0?t.set(e,[n]):r.push(n)}return t}function iM(e){let t=e.toLowerCase().trim(),n=t.indexOf(`;`);return n===-1?t:t.slice(0,n).trim()}function aM(e,t,n){let r=Array.from(new Set(n.map(e=>e.contentType))).join(`, `);return zh(new QO({reason:new ik({request:e.request,response:e,description:`Unsupported response content-type for status ${e.status}: ${t||`<missing>`}. Expected one of: ${r}`})}))}var oM=`effect/httpapi/stream/failure`;function sM(e){let t=[];for(let n of e.success)tj(n)&&t.push(n);return t}function cM(e){return t=>Zh(ig(),n=>HT(rj(e)?t.stream:lM(t.stream,e),n))}function lM(e,t){let n=QC([t.events,G({event:zC(oM),data:Gw(aT(Ow(t.error,Fw())))})]),r=ET(e.pipe(BT,zT(OA(n))),e=>Ph(()=>{let t;return Nh(()=>t?Bh(t):Kh(e,e=>{for(let n=0;n<e.length;n++){let r=e[n];if(r.event===oM){if(n===0)return Bh(r.data);t=r.data,e=e.slice(0,n);break}}return V(e)}))}));return t.sseMode===`data`?IT(r,e=>e.data):r}var uM=mw(globalThis.ArrayBuffer,{expected:`ArrayBuffer`}),dM=uM.pipe(aw(Yw,Ob({decode(e){return new Uint8Array(e)},encode(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}}))),fM=uM.pipe(aw(U,Ob({decode(e){return new TextDecoder().decode(e)},encode(e){let t=new TextEncoder().encode(e);return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}}))),pM=fM.pipe(aw(QC([zC(``).pipe(aw(UC,Ob({decode:()=>void 0,encode:()=>``}))),Ww])));function mM(e){return QC(e.map(t));function t(e){switch(mj(e.ast)._tag){case`Json`:{let t=Wb(CS(e.ast));return pM.pipe(aw(e,t?Ob({decode:e=>e===void 0?null:e,encode:e=>e===null?void 0:e}):void 0))}case`FormUrlEncoded`:return fM.pipe(aw(Ck),aw(e));case`Uint8Array`:return dM.pipe(aw(e));case`Text`:return fM.pipe(aw(e))}}}var hM=e=>zh(new QO({reason:new ik({request:e.request,response:e})})),gM=SC(Tk);function _M(e,t){return QC(e.map(e=>yM(e,t)))}var vM=new WeakMap;function yM(e,t){let n=e.ast,r=vM.get(n);if(r!==void 0)return r;let i=pj(n,t),a=gM.pipe(aw(e,Db({decode(e){return zh(new Vy(B(e),{message:`Encode only schema`}))},encode(e){switch(i._tag){case`Multipart`:return zh(new Vy(B(e),{message:`Payload must be a FormData`}));case`Json`:try{return V(jk(JSON.stringify(e),i.contentType))}catch(t){return zh(new By(B(e),{message:globalThis.String(t)}))}case`Text`:return typeof e==`string`?V(jk(e,i.contentType)):zh(new By(B(e),{message:`Expected a string`}));case`FormUrlEncoded`:return Ta(e)?V(Mk(uk(e))):zh(new By(B(e),{message:`Expected a record`}));case`Uint8Array`:return e instanceof Uint8Array?V(kk(e,i.contentType)):zh(new By(B(e),{message:`Expected a Uint8Array`}))}}})));return vM.set(n,a),a}var bM=()=>(e,t)=>{let n=Nc()(e),r=nh(n,Xj(t.api,t));n.runtime=(t.runtime??yD)(typeof t.httpClient==`function`?e=>ch(r,t.httpClient(e)):ch(r,t.httpClient));let i=eg(e=>CC(e)||ZO(e)?Hh(e):zh(e)),a=kD(({endpoint:e,group:r,responseMode:a})=>{let o=n.runtime.fn()(jg(function*(t){let o=i((yield*n)[r][e]({...t,responseMode:a}));return yield*t.reactivityKeys?rE(o,t.reactivityKeys):o}));if(a===`decoded-only`){let n=t.api.groups[r].endpoints[e];return ID(o,{key:`AtomHttpApi:mutation:${r}:${e}`,schema:AE({success:QC(bj(n)),error:QC(xj(n))})})}return o});n.mutation=(e,t,n)=>a({group:e,endpoint:t,responseMode:n?.responseMode??`decoded-only`});let o=kD(e=>{let r=n.runtime.atom(n.use(t=>i(t[e.group][e.endpoint](e))));if(e.responseMode===`decoded-only`&&e.serializationKey){let n=t.api.groups[e.group].endpoints[e.endpoint];r=ID(r,{key:`AtomHttpApi:${e.group}:${e.endpoint}:${e.serializationKey}`,schema:AE({success:QC(bj(n)),error:QC(xj(n))})})}return e.timeToLive&&(r=Xl(e.timeToLive)?tD(r,e.timeToLive):AD(r)),e.reactivityKeys?n.runtime.factory.withReactivity(e.reactivityKeys)(r):r});return n.query=(e,t,n)=>o({group:e,endpoint:t,params:n.params,query:n.query,payload:n.payload,headers:n.headers,responseMode:n.responseMode??`decoded-only`,reactivityKeys:n.reactivityKeys,timeToLive:n.timeToLive?Hl(n.timeToLive):void 0,serializationKey:n.serializationKey}),n},xM={"~effect/match/Match/Matcher":{_input:ra,_filters:ra,_result:ra,_return:ra},_tag:`ValueMatcher`,add(e){return sl(this.value)?this:e._tag===`When`&&e.guard(this.provided)===!0||e._tag===`Not`&&e.guard(this.provided)===!1?SM(this.provided,rl(e.evaluate(this.provided))):this},pipe(){return ea(this,arguments)}};function SM(e,t){let n=Object.create(xM);return n.provided=e,n.value=t,n}var CM=(e,t)=>({_tag:`When`,guard:e,evaluate:t}),wM=e=>{if(typeof e==`function`)return e;if(Array.isArray(e)){let t=e.map(wM),n=t.length;return e=>{if(!Array.isArray(e))return!1;for(let r=0;r<n;r++)if(t[r](e[r])===!1)return!1;return!0}}else if(typeof e==`object`&&e){let t=Object.entries(e).map(([e,t])=>[e,wM(t)]),n=t.length;return e=>{if(typeof e!=`object`||!e)return!1;for(let r=0;r<n;r++){let[n,i]=t[r];if(!(n in e)||i(e[n])===!1)return!1}return!0}}return t=>t===e},TM=e=>SM(e,il(e)),EM=(e,t)=>n=>n.add(CM(wM(e),t)),DM=e=>t=>{let n=OM(t);return al(n)?n._tag===`Success`?n.success:e(n.failure):t=>{let r=n(t);return sl(r)?r.success:e(r.failure)}},OM=e=>{if(e._tag===`ValueMatcher`)return e.value;let t=e.cases.length;if(t===1){let t=e.cases[0];return e=>t._tag===`When`&&t.guard(e)===!0||t._tag===`Not`&&t.guard(e)===!1?rl(t.evaluate(e)):il(e)}return n=>{for(let r=0;r<t;r++){let t=e.cases[r];if(t._tag===`When`&&t.guard(n)===!0||t._tag===`Not`&&t.guard(n)===!1)return rl(t.evaluate(n))}return il(n)}},kM=TM,AM=EM,jM=DM,MM=U.pipe(iw(`PullRequestId`)),NM=U.pipe(iw(`RepositoryName`)),PM=U.pipe(iw(`AwsProfileName`)),FM=U.pipe(iw(`AwsRegion`)),IM=U.pipe(iw(`CommentId`)),LM=U.pipe(iw(`SandboxId`)),RM=$C([`OPEN`,`CLOSED`,`MERGED`]),zM=$C([`error`,`info`,`warning`,`success`]),BM=$C([`idle`,`loading`,`error`]),VM=$C([`creating`,`cloning`,`starting`,`running`,`stopping`,`stopped`,`error`]),HM=class extends nT(`Account`)({profile:PM,region:FM,awsAccountId:H(U),repoAccountId:H(U)}){},UM=class extends nT(`ApprovalRule`)({ruleName:U,requiredApprovals:W,poolMembers:K(U),poolMemberArns:K(U).pipe(lw(V([]))),satisfied:WC,fromTemplate:H(U)}){},WM=class extends nT(`PullRequest`)({id:MM,title:U,description:H(U),author:U,repositoryName:NM,creationDate:Hw,lastModifiedDate:Hw,link:U,account:HM,status:RM,sourceBranch:U,destinationBranch:U,isMergeable:WC,isApproved:WC,commentCount:H(W),healthScore:H(W),fetchedAt:H(Hw),approvedBy:K(U),approvedByArns:K(U).pipe(lw(V([]))),commentedBy:K(U),filesChanged:H(W),approvalRules:K(UM).pipe(lw(V([])))}){get consoleUrl(){return qM(this.account.region,this.repositoryName,this.id)}},GM=(e,t)=>{let n=e=>e.trim().toLowerCase(),r=e=>{let t=n(e).split(/[/:]/).filter(e=>e.length>0);return t[t.length-1]??``},i=n(e),a=n(t);if(i===``||a===``)return!1;if(i===a)return!0;let o=r(e),s=r(t);return o!==``&&o===s},KM=(e,t)=>!t||e.approvedBy.some(e=>GM(t,e))?!1:e.approvalRules.some(e=>!e.satisfied&&e.poolMembers.some(e=>GM(t,e))),qM=(e,t,n)=>`https://${e}.console.aws.amazon.com/codesuite/codecommit/repositories/${t}/pull-requests/${n}?region=${e}`;nT(`Sandbox`)({id:LM,pullRequestId:MM,awsAccountId:U,repositoryName:NM,sourceBranch:U,containerId:H(U),port:H(W),workspacePath:U,status:VM,error:H(U),createdAt:Hw,lastActivityAt:Hw}),nT(`PRComment`)({id:IM,content:U,author:U,creationDate:Hw,inReplyTo:H(IM),deleted:WC,filePath:H(U),lineNumber:H(W)});var JM=G({root:G({id:U,content:U,author:U,creationDate:U,inReplyTo:H(U),deleted:WC,filePath:H(U),lineNumber:H(W)}),replies:K(nw(()=>JM))}),YM=G({filePath:H(U),beforeCommitId:H(U),afterCommitId:H(U),comments:K(JM)}),XM=$C([`new_comment`,`comment_edited`,`comment_deleted`,`approval_changed`,`approval_requested`,`review_reminder`,`merge_changed`,`title_changed`,`description_changed`,`pr_merged`,`pr_closed`,`pr_reopened`]);nT(`PersistentNotification`)({id:W,pullRequestId:MM,awsAccountId:U,type:XM,message:U,createdAt:Hw,read:WC}),fh(),nT(`NotificationItem`)({type:zM,title:U,message:U,timestamp:Hw,profile:IC(U)});var ZM=G({author:U,prCount:W}),QM=G({author:U,commentCount:W}),$M=G({author:U,approvalCount:W}),eN=G({id:U,title:U,author:U,repositoryName:U,commentCount:W,awsAccountId:U}),tN=G({small:W,medium:W,large:W,extraLarge:W}),nN=G({filesAdded:W,filesModified:W,filesDeleted:W}),rN=G({author:U,avgFilesChanged:W,prCount:W}),iN=G({id:U,title:U,author:U,repositoryName:U,daysSinceActivity:W,awsAccountId:U}),aN=G({topContributorShare:W,uniqueContributors:W}),oN=G({prId:U,prTitle:U,author:U,repositoryName:U,awsAccountId:U,durationMs:W,fromLabel:U,toLabel:U}),sN=G({week:U,weekStart:U,weekEnd:U,dataAvailableSince:ew(U),prsCreated:W,prsMerged:W,prsClosed:W,totalComments:W,topContributors:K(ZM),topReviewers:K(QM),topApprovers:K($M),medianTimeToMerge:ew(W),medianTimeToFirstReview:ew(W),medianTimeToAddressFeedback:ew(W),mergeTimeDetails:K(oN),firstReviewDetails:K(oN),feedbackDetails:K(oN),mostActivePRs:K(eN),prSizeDistribution:tN,avgDiffSize:ew(nN),diffSizeByContributor:K(rN),stalePRs:K(iN),reviewCoverage:ew(W),approvalRate:ew(W),busFactor:ew(aN),availableRepos:K(U),availableAuthors:K(U),availableAccounts:K(U)}),cN=`~effect/httpapi/HttpApiGroup`,lN={[cN]:cN,add(...e){let t={...this.endpoints};for(let n of e)t[n.name]=n;return uN({identifier:this.identifier,topLevel:this.topLevel,endpoints:t,annotations:this.annotations})},prefix(e){return uN({identifier:this.identifier,topLevel:this.topLevel,endpoints:fl(this.endpoints,t=>t.prefix(e)),annotations:this.annotations})},middleware(e){return uN({identifier:this.identifier,topLevel:this.topLevel,endpoints:fl(this.endpoints,t=>t.middleware(e)),annotations:this.annotations})},annotateMerge(e){return uN({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,annotations:Qc(this.annotations,e)})},annotate(e,t){return uN({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,annotations:Wc(this.annotations,e,t)})},annotateEndpointsMerge(e){return uN({identifier:this.identifier,topLevel:this.topLevel,endpoints:fl(this.endpoints,t=>t.annotateMerge(e)),annotations:this.annotations})},annotateEndpoints(e,t){return uN({identifier:this.identifier,topLevel:this.topLevel,endpoints:fl(this.endpoints,n=>n.annotate(e,t)),annotations:this.annotations})},pipe(){return ea(this,arguments)}},uN=e=>{function t(){}return Object.setPrototypeOf(t,lN),t.key=`effect/httpapi/HttpApiGroup/${e.identifier}`,Object.assign(t,e)},dN=(e,t)=>uN({identifier:e,topLevel:t?.topLevel??!1,endpoints:ul(),annotations:Vc()}),fN=class extends iT()(`ApiError`,{message:U}){},pN=G({id:U,awsAccountId:U,accountProfile:U,accountRegion:U,title:U,description:ew(U),author:U,repositoryName:U,creationDate:U,lastModifiedDate:U,status:U,sourceBranch:U,destinationBranch:U,isMergeable:W,isApproved:W,commentCount:ew(W),link:U,fetchedAt:U}),mN=G({id:W,pullRequestId:U,awsAccountId:U,type:U,title:U,profile:U,message:U,createdAt:U,read:W}),hN=class extends dN(`prs`).add(zj(`list`,`/`,{success:zw(WM)})).add(Bj(`refresh`,`/refresh`,{success:U})).add(zj(`search`,`/search`,{query:G({q:U,limit:H(qw.pipe(rw(Sw({minimum:1,maximum:50})))),offset:H(qw.pipe(rw(xw(0))))}),success:G({items:K(pN),total:W,hasMore:WC}),error:fN})).add(Bj(`refreshSingle`,`/:awsAccountId/:prId/refresh`,{params:G({awsAccountId:U,prId:MM}),success:U,error:fN})).add(Bj(`create`,`/`,{payload:G({repositoryName:U,title:U,description:H(U),sourceBranch:U,destinationBranch:U,account:HM}),success:U,error:fN})).add(Bj(`open`,`/open`,{payload:G({profile:U,link:U.pipe(rw(gw(e=>/^https:\/\/[\w-]+\.console\.aws\.amazon\.com\//.test(e))))}),success:U,error:fN})).add(zj(`comments`,`/comments`,{query:G({pullRequestId:U,repositoryName:U,profile:PM,region:FM}),success:K(YM),error:fN})).add(Bj(`createApprovalRule`,`/approval-rules`,{payload:G({pullRequestId:U,approvalRuleName:U,requiredApprovals:W,poolMembers:K(U),account:HM}),success:U,error:fN})).add(Vj(`updateApprovalRule`,`/approval-rules`,{payload:G({pullRequestId:U,approvalRuleName:U,requiredApprovals:W,poolMembers:K(U),account:HM}),success:U,error:fN})).add(Hj(`deleteApprovalRule`,`/approval-rules`,{payload:G({pullRequestId:U,approvalRuleName:U,account:HM}),success:U,error:fN})).prefix(`/api/prs`){},gN=class extends dN(`events`).add(zj(`stream`,`/`,{success:U})).prefix(`/api/events`){},_N=G({hostPath:U,containerPath:U,readonly:WC}),vN=G({image:U,extensions:K(U),setupCommands:K(U),env:qC(U,U),volumeMounts:K(_N),cloneDepth:W}),yN=G({accounts:K(G({profile:U,regions:K(U),enabled:WC})),autoDetect:WC,autoRefresh:WC,refreshIntervalSeconds:W,currentUser:H(U),sandbox:H(vN)}),bN=G({path:U,exists:WC,modifiedAt:H(U)}),xN=G({path:U,sizeBytes:W,exists:WC,modifiedAt:H(U)}),SN=G({status:$C([`valid`,`missing`,`corrupted`]),path:U,errors:K(U)}),CN=G({accounts:K(G({profile:U,regions:K(U),enabled:WC})),autoDetect:WC,autoRefresh:WC,refreshIntervalSeconds:W,sandbox:H(vN)}),wN=G({backupPath:H(U),config:yN}),TN=class extends dN(`config`).add(zj(`list`,`/`,{success:yN})).add(zj(`path`,`/path`,{success:bN,error:fN})).add(zj(`database`,`/database`,{success:xN,error:fN})).add(zj(`validate`,`/validate`,{success:SN,error:fN})).add(Bj(`save`,`/save`,{payload:CN,success:U,error:fN})).add(Bj(`reset`,`/reset`,{success:wN,error:fN})).prefix(`/api/config`){},EN=class extends dN(`accounts`).add(zj(`list`,`/`,{success:zw(HM)})).prefix(`/api/accounts`){},DN=G({awsAccountId:U,pullRequestId:MM}),ON=G({awsAccountId:U,pullRequestId:U}),kN=class extends dN(`subscriptions`).add(Bj(`subscribe`,`/subscribe`,{payload:DN,success:U,error:fN})).add(Bj(`unsubscribe`,`/unsubscribe`,{payload:DN,success:U,error:fN})).add(zj(`list`,`/`,{success:K(ON)})).prefix(`/api/subscriptions`){},AN=G({items:K(mN),nextCursor:H(W)}),jN=class extends dN(`notifications`).add(zj(`list`,`/`,{query:G({limit:H(qw.pipe(rw(Sw({minimum:1,maximum:100})))),cursor:H(qw),filter:H($C([`system`,`prs`])),unreadOnly:H(qw)}),success:AN})).add(zj(`count`,`/count`,{success:G({unread:W})})).add(Bj(`markRead`,`/read`,{payload:G({id:W}),success:U})).add(Bj(`markUnread`,`/unread`,{payload:G({id:W}),success:U})).add(Bj(`markAllRead`,`/read-all`,{success:U})).add(Bj(`ssoLogin`,`/sso-login`,{payload:G({profile:PM}),success:U,error:fN})).add(Bj(`ssoLogout`,`/sso-logout`,{success:U,error:fN})).prefix(`/api/notifications`){},MN=G({id:U,pullRequestId:U,awsAccountId:U,repositoryName:U,sourceBranch:U,containerId:ew(U),port:ew(W),status:VM,statusDetail:ew(U),logs:ew(U),error:ew(U),createdAt:U,lastActivityAt:U}),NN=G({pullRequestId:MM,awsAccountId:U,repositoryName:U,sourceBranch:U,profile:PM,region:U}),PN=G({sandboxId:LM}),FN=class extends dN(`sandbox`).add(Bj(`create`,`/`,{payload:NN,success:MN,error:fN})).add(zj(`list`,`/`,{success:K(MN),error:fN})).add(zj(`get`,`/:sandboxId`,{params:PN,success:MN,error:fN})).add(Bj(`stop`,`/:sandboxId/stop`,{params:PN,success:U,error:fN})).add(Bj(`restart`,`/:sandboxId/restart`,{params:PN,success:U,error:fN})).add(Hj(`delete`,`/:sandboxId`,{params:PN,success:U,error:fN})).prefix(`/api/sandbox`){},IN=class extends dN(`stats`).add(zj(`get`,`/`,{query:G({week:U.pipe(rw(_w(/^\d{4}-W\d{2}$/))),repo:H(U),author:H(U),account:H(U)}),success:sN,error:fN})).add(Bj(`sync`,`/sync`,{payload:G({week:U.pipe(rw(_w(/^\d{4}-W\d{2}$/)))}),success:U,error:fN})).prefix(`/api/stats`){},LN=$C([`always_allow`,`allow`,`deny`]),RN=G({operation:U,state:LN,category:$C([`read`,`write`]),description:U}),zN=G({id:W,timestamp:U,operation:U,accountProfile:U,region:U,permissionState:U,context:U,durationMs:ew(W)}),BN=class extends dN(`permissions`).add(Bj(`respond`,`/respond`,{payload:G({id:U,response:$C([`allow_once`,`always_allow`,`deny`])}),success:U,error:fN})).add(zj(`list`,`/`,{success:K(RN)})).add(Bj(`update`,`/update`,{payload:G({operation:U,state:LN}),success:U,error:fN})).add(Bj(`reset`,`/reset`,{success:U})).add(zj(`auditSettings`,`/audit`,{success:G({enabled:WC,retentionDays:W})})).add(Bj(`updateAuditSettings`,`/audit`,{payload:G({enabled:H(WC),retentionDays:H(W)}),success:U,error:fN})).prefix(`/api/permissions`){},VN=class extends dN(`audit`).add(zj(`list`,`/`,{query:G({limit:H(qw.pipe(rw(Sw({minimum:1,maximum:200})))),offset:H(qw.pipe(rw(xw(0)))),operation:H(U),accountProfile:H(U),permissionState:H(U),from:H(U),to:H(U),search:H(U)}),success:G({items:K(zN),total:W,nextCursor:H(W)}),error:fN})).add(zj(`export`,`/export`,{query:G({from:H(U),to:H(U)}),success:K(zN),error:fN})).add(Hj(`clear`,`/`,{success:G({deleted:W}),error:fN})).prefix(`/api/audit`){},HN=class extends Kj(`CodeCommitApi`).add(hN).add(gN).add(TN).add(EN).add(jN).add(kN).add(FN).add(IN).add(BN).add(VN){},UN=bM()(`ApiClient`,{api:HN,baseUrl:`/`,httpClient:TA});UN.runtime;var WN={pullRequests:[],accounts:[],status:`idle`};UN.query(`prs`,`list`,{reactivityKeys:[`prs`],timeToLive:`30 seconds`});var GN=UN.query(`config`,`list`,{reactivityKeys:[`config`],timeToLive:`30 seconds`});UN.query(`accounts`,`list`,{reactivityKeys:[`accounts`],timeToLive:`60 seconds`});var KN=UN.mutation(`prs`,`refresh`),qN=UN.mutation(`prs`,`open`),JN=UN.query(`config`,`path`,{reactivityKeys:[`config`],timeToLive:`60 seconds`}),YN=UN.query(`config`,`database`,{reactivityKeys:[`config`],timeToLive:`60 seconds`}),XN=UN.query(`config`,`validate`,{reactivityKeys:[`config`],timeToLive:`60 seconds`}),ZN=UN.mutation(`config`,`save`),QN=UN.mutation(`config`,`reset`),$N=UN.mutation(`notifications`,`ssoLogin`),eP=UN.mutation(`notifications`,`ssoLogout`),tP=UN.query(`subscriptions`,`list`,{reactivityKeys:[`subscriptions`],timeToLive:`5 seconds`}),nP=UN.mutation(`subscriptions`,`subscribe`),rP=UN.mutation(`subscriptions`,`unsubscribe`);UN.query(`notifications`,`list`,{query:{},reactivityKeys:[`notifications`],timeToLive:`10 seconds`}),UN.query(`notifications`,`count`,{reactivityKeys:[`notifications`],timeToLive:`10 seconds`});var iP=UN.mutation(`notifications`,`list`),aP=UN.mutation(`notifications`,`markRead`),oP=UN.mutation(`notifications`,`markUnread`),sP=UN.mutation(`notifications`,`markAllRead`);UN.query(`sandbox`,`list`,{reactivityKeys:[`sandbox`],timeToLive:`5 seconds`});var cP=UN.mutation(`sandbox`,`create`),lP=UN.mutation(`sandbox`,`stop`),uP=UN.mutation(`sandbox`,`restart`),dP=UN.mutation(`sandbox`,`delete`),fP=UN.mutation(`stats`,`sync`);UN.mutation(`prs`,`search`);var pP=UN.mutation(`prs`,`refreshSingle`),mP=UN.mutation(`prs`,`createApprovalRule`),hP=UN.mutation(`prs`,`updateApprovalRule`);UN.mutation(`prs`,`deleteApprovalRule`);var gP=UN.query(`permissions`,`list`,{reactivityKeys:[`permissions`],timeToLive:`30 seconds`}),_P=UN.mutation(`permissions`,`respond`),vP=UN.mutation(`permissions`,`update`),yP=UN.mutation(`permissions`,`reset`),bP=UN.query(`permissions`,`auditSettings`,{reactivityKeys:[`permissions`],timeToLive:`30 seconds`}),xP=UN.mutation(`permissions`,`updateAuditSettings`),SP=UN.mutation(`audit`,`list`),CP=UN.mutation(`audit`,`export`),wP=UN.mutation(`audit`,`clear`),TP=dD(WN).pipe(AD);function EP(e){let t=(0,N.useRef)(e);t.current=e;let n=(0,N.useRef)([]),r=(0,N.useRef)(new Set);return{notify:(0,N.useCallback)(e=>{if(e.id!=null){if(r.current.has(e.id))return;if(r.current.add(e.id),r.current.size>500){let e=[...r.current];r.current=new Set(e.slice(e.length-250))}}if(typeof Notification>`u`||Notification.permission!==`granted`)return;try{if(localStorage.getItem(qi.desktopNotifications)!==`true`)return}catch{return}let i=new Notification(e.title||`CodeCommit`,{body:e.message,icon:`/favicon.ico`});i.addEventListener(`click`,()=>{window.focus(),i.close();let n=e.awsAccountId&&e.pullRequestId?`/accounts/${e.awsAccountId}/prs/${e.pullRequestId}`:`/notifications`;t.current?.(n)}),n.current.push(i),setTimeout(()=>{n.current=n.current.filter(e=>e!==i)},3e4)},[])}}var DP=3600*1e3;function OP(e,t){try{let n=localStorage.getItem(e);return n===null?t:n===`true`}catch{return t}}function kP(e,t){try{let n=localStorage.getItem(e);return n===null?t:Number(n)||t}catch{return t}}function AP(e){let t=(0,N.useRef)(e);t.current=e,(0,N.useEffect)(()=>{let e=null,n=()=>{let t=kP(qi.reminderInterval,DP);e=setTimeout(r,t)},r=()=>{OP(qi.reminders,!0)&&t.current>0&&(dO(`You have ${t.current} PR${t.current>1?`s`:``} awaiting your review`,{duration:1e4}),typeof Notification<`u`&&Notification.permission===`granted`&&OP(qi.desktopNotifications,!1)&&new Notification(`Review Reminder`,{body:`${t.current} PR${t.current>1?`s`:``} awaiting your review`,icon:`/favicon.ico`,tag:`review-reminder`})),n()};return n(),()=>{e&&clearTimeout(e)}},[])}var jP=G({id:U,title:U,description:H(U),author:U,repositoryName:U,creationDate:Uw,lastModifiedDate:Uw,link:U,account:G({profile:U,region:U,awsAccountId:H(U),repoAccountId:H(U)}),status:RM,sourceBranch:U,destinationBranch:U,isMergeable:WC,isApproved:WC,commentCount:H(W),healthScore:H(W),fetchedAt:H(Uw),approvedBy:K(U).pipe(dw(V([]))),approvedByArns:K(U).pipe(dw(V([]))),commentedBy:K(U).pipe(dw(V([]))),filesChanged:H(W),approvalRules:K(G({ruleName:U,requiredApprovals:W,poolMembers:K(U),poolMemberArns:K(U).pipe(dw(V([]))),satisfied:WC,fromTemplate:H(U)})).pipe(dw(V([])))}),MP=G({id:W,pullRequestId:U,awsAccountId:U,type:U,title:U,profile:U,message:U,createdAt:U,read:W}),NP=G({id:U,pullRequestId:U,awsAccountId:U,repositoryName:U,sourceBranch:U,containerId:ew(U),port:ew(W),status:U,statusDetail:ew(U),logs:ew(U),error:ew(U),createdAt:U,lastActivityAt:U}),PP=kC(Gw(G({pullRequests:K(jP),accounts:K(G({profile:U,region:U,enabled:WC})),status:BM,statusDetail:H(U),error:H(U),lastUpdated:H(Uw),currentUser:H(U),pendingReviewCount:W.pipe(dw(V(0))),unreadNotificationCount:H(W),notifications:H(G({items:K(MP),nextCursor:H(W)})),sandboxes:H(K(NP)),permissionPrompt:H(G({id:U,operation:U,category:U,context:U}))})));function FP(e,t,n){let r=(0,N.useRef)(e);r.current=e;let i=(0,N.useRef)(t);i.current=t;let a=(0,N.useRef)(n);a.current=n;let[o,s]=(0,N.useState)(`disconnected`),c=(0,N.useRef)(0);return(0,N.useEffect)(()=>{let e=null,t=0,n=null,o=()=>{e=new EventSource(`/api/events/`),e.onopen=()=>{t=0,s(`connected`)},e.onmessage=e=>{try{let t=PP(e.data),n=t.notifications?.items??[],o=new Set([`title_changed`,`description_changed`]);if(c.current>0)for(let e of n)e.id>c.current&&!o.has(e.type)&&(dO(e.title||`New notification`,{id:`notif-${e.id}`,description:e.message,duration:8e3,action:e.awsAccountId&&e.pullRequestId?{label:`View`,onClick:()=>i.current?.(`/accounts/${e.awsAccountId}/prs/${e.pullRequestId}`)}:{label:`View`,onClick:()=>i.current?.(`/notifications`)}}),a.current?.({id:e.id,type:e.type,title:e.title||`CodeCommit`,message:e.message,awsAccountId:e.awsAccountId,pullRequestId:e.pullRequestId}));if(n.length>0){let e=Math.max(...n.map(e=>e.id));e>c.current&&(c.current=e)}r.current(t)}catch{}},e.onerror=()=>{if(e?.close(),t>=50){s(`disconnected`);return}s(`reconnecting`);let r=Math.min(1e3*2**t,3e4);n=setTimeout(()=>{t++,o()},r)}};return o(),()=>{e?.close(),n&&clearTimeout(n)}},[]),o}var IP=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),LP=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),RP=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),zP=e=>{let t=RP(e);return t.charAt(0).toUpperCase()+t.slice(1)},BP={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`},VP=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},HP=(0,N.createContext)({}),UP=()=>(0,N.useContext)(HP),WP=(0,N.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=UP()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,N.createElement)(`svg`,{ref:c,...BP,width:t??l??BP.width,height:t??l??BP.height,stroke:e??f,strokeWidth:m,className:IP(`lucide`,p,i),...!a&&!VP(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,N.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),q=(e,t)=>{let n=(0,N.forwardRef)(({className:n,...r},i)=>(0,N.createElement)(WP,{ref:i,iconNode:t,className:IP(`lucide-${LP(zP(e))}`,`lucide-${e}`,n),...r}));return n.displayName=zP(e),n},GP=q(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),KP=q(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),qP=q(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),JP=q(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),YP=q(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),XP=q(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),ZP=q(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),QP=q(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),$P=q(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),eF=q(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),tF=q(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),nF=q(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),rF=q(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),iF=q(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),aF=q(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),oF=q(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),sF=q(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),cF=q(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),lF=q(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),uF=q(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),dF=q(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),fF=q(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),pF=q(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),mF=q(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),hF=q(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),gF=q(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]),_F=q(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),vF=q(`git-merge`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]),yF=q(`git-pull-request`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]),bF=q(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),xF=q(`layout-list`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}],[`path`,{d:`M14 4h7`,key:`3xa0d5`}],[`path`,{d:`M14 9h7`,key:`1icrd9`}],[`path`,{d:`M14 15h7`,key:`1mj8o2`}],[`path`,{d:`M14 20h7`,key:`11slyb`}]]),SF=q(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]),CF=q(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),wF=q(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),TF=q(`mail-open`,[[`path`,{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`,key:`1jhwl8`}],[`path`,{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`,key:`1qfld7`}]]),EF=q(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),DF=q(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),OF=q(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),kF=q(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),AF=q(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),jF=q(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),MF=q(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),NF=q(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),PF=q(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),FF=q(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),IF=q(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),LF=q(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),RF=q(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),zF=q(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),BF=q(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),VF=q(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),HF=q(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),UF=q(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),WF=q(`trash`,[[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),GF=q(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),KF=q(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),qF=[`account`,`author`,`approver`,`commenter`,`scope`,`repo`,`status`,`size`],JF=dD(!1).pipe(AD),YF=[`accounts`,`refresh`,`sandbox`,`notifications`,`permissions`,`audit`,`theme`,`config`,`about`];dD(`accounts`).pipe(AD);var XF=1,ZF=.9,QF=.8,$F=.17,eI=.1,tI=.999,nI=.9999,rI=.99,iI=/[\\\/_+.#"@\[\(\{&]/,aI=/[\\\/_+.#"@\[\(\{&]/g,oI=/[\s-]/,sI=/[\s-]/g;function cI(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?XF:rI;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=cI(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=XF:iI.test(e.charAt(l-1))?(d*=QF,p=e.slice(i,l-1).match(aI),p&&i>0&&(d*=tI**+p.length)):oI.test(e.charAt(l-1))?(d*=ZF,m=e.slice(i,l-1).match(sI),m&&i>0&&(d*=tI**+m.length)):(d*=$F,i>0&&(d*=tI**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=nI)),(d<eI&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=cI(e,t,n,r,l+1,a+2,o),f*eI>d&&(d=f*eI)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function lI(e){return e.toLowerCase().replace(sI,` `)}function uI(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,cI(e,t,lI(e),lI(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function J(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function dI(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function fI(...e){return t=>{let n=!1,r=e.map(e=>{let r=dI(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():dI(e[t],null)}}}}function pI(...e){return N.useCallback(fI(...e),e)}function mI(e,t=[]){let n=[];function r(t,r){let i=N.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=N.useMemo(()=>o,Object.values(o));return(0,R.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=N.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>N.createContext(e));return function(n){let r=n?.[e]||t;return N.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,hI(i,...t)]}function hI(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return N.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var gI=globalThis?.document?N.useLayoutEffect:()=>{},_I=N.useId||(()=>void 0),vI=0;function yI(e){let[t,n]=N.useState(_I());return gI(()=>{e||n(e=>e??String(vI++))},[e]),e||(t?`radix-${t}`:``)}var bI=N.useInsertionEffect||gI;function xI({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=SI({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=N.useRef(e!==void 0);N.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,N.useCallback(t=>{if(s){let n=CI(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function SI({defaultProp:e,onChange:t}){let[n,r]=N.useState(e),i=N.useRef(n),a=N.useRef(t);return bI(()=>{a.current=t},[t]),N.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function CI(e){return typeof e==`function`}function wI(e){let t=N.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];MI(r)&&typeof II==`function`&&(r=II(r._payload)),N.Children.forEach(r,e=>{if(AI(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;MI(n)&&typeof II==`function`&&(n=II(n._payload)),a=DI(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=N.cloneElement(a,void 0,s):!o&&N.Children.count(r)===1&&N.isValidElement(r)&&(a=r);let c=a?kI(a):void 0,l=pI(n,c);if(!a){if(r||r===0)throw Error(o?FI(e):PI(e));return r}let u=OI(i,a.props??{});return a.type!==N.Fragment&&(u.ref=n?l:c),N.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var TI=wI(`Slot`),EI=Symbol.for(`radix.slottable`),DI=(e,t)=>{if(`child`in e.props){let t=e.props.child;return N.isValidElement(t)?N.cloneElement(t,void 0,e.props.children(t.props.children)):null}return N.isValidElement(t)?t:null};function OI(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function kI(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function AI(e){return N.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===EI}var jI=Symbol.for(`react.lazy`);function MI(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===jI&&`_payload`in e&&NI(e._payload)}function NI(e){return typeof e==`object`&&!!e&&`then`in e}var PI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,FI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,II=N.use,LI=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=wI(`Primitive.${t}`),r=N.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,R.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function RI(e,t){e&&$i.flushSync(()=>e.dispatchEvent(t))}function zI(e){let t=N.useRef(e);return N.useEffect(()=>{t.current=e}),N.useMemo(()=>((...e)=>t.current?.(...e)),[])}function BI(e,t=globalThis?.document){let n=zI(e);N.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var VI=`DismissableLayer`,HI=`dismissableLayer.update`,UI=`dismissableLayer.pointerDownOutside`,WI=`dismissableLayer.focusOutside`,GI,KI=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),qI=N.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=N.useContext(KI),[d,f]=N.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=N.useState({}),h=pI(t,e=>f(e)),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(_),y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=N.useRef(!1),C=ZI(e=>{let t=e.target;if(!(t instanceof Node))return;let n=[...u.branches].some(e=>e.contains(t));!x||n||(a?.(e),s?.(e),e.defaultPrevented||c?.())},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces}),w=QI(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p);return BI(e=>{y===u.layers.size-1&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},p),N.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(GI=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),$I(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=GI))}},[d,p,n,u]),N.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),$I())},[d,u]),N.useEffect(()=>{let e=()=>m({});return document.addEventListener(HI,e),()=>document.removeEventListener(HI,e)},[]),(0,R.jsx)(LI.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:J(e.onFocusCapture,w.onFocusCapture),onBlurCapture:J(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:J(e.onPointerDownCapture,C.onPointerDownCapture)})});qI.displayName=VI;var JI=`DismissableLayerBranch`,YI=N.forwardRef((e,t)=>{let n=N.useContext(KI),r=N.useRef(null),i=pI(t,r);return N.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,R.jsx)(LI.div,{...e,ref:i})});YI.displayName=JI;function XI(){let e=N.useContext(KI),[t,n]=N.useState(null);return N.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}function ZI(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a}=t,o=zI(e),s=N.useRef(!1),c=N.useRef(!1),l=N.useRef(new Map),u=N.useRef(()=>{});return N.useEffect(()=>{function e(){c.current=!1,i.current=!1,l.current.clear()}function t(){return Array.from(l.current.values()).some(Boolean)}function d(e){if(!c.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||l.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{c.current&&u.current()},0)}function f(e){c.current&&l.current.set(e.type,!1)}let p=a=>{if(a.target&&!s.current){let s=function(){n.removeEventListener(`click`,u.current);let r=t();e(),r||eL(UI,o,d,{discrete:!0})},d={originalEvent:a};c.current=!0,i.current=r&&a.button===0,l.current.clear(),!r||a.button!==0?s():(n.removeEventListener(`click`,u.current),u.current=s,n.addEventListener(`click`,u.current,{once:!0}))}else n.removeEventListener(`click`,u.current),e();s.current=!1},m=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of m)n.addEventListener(e,d,!0),n.addEventListener(e,f);let h=window.setTimeout(()=>{n.addEventListener(`pointerdown`,p)},0);return()=>{window.clearTimeout(h),n.removeEventListener(`pointerdown`,p),n.removeEventListener(`click`,u.current);for(let e of m)n.removeEventListener(e,d,!0),n.removeEventListener(e,f)}},[n,o,r,i,a]),{onPointerDownCapture:()=>s.current=!0}}function QI(e,t=globalThis?.document){let n=zI(e),r=N.useRef(!1);return N.useEffect(()=>{let e=e=>{e.target&&!r.current&&eL(WI,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function $I(){let e=new CustomEvent(HI);document.dispatchEvent(e)}function eL(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?RI(i,a):i.dispatchEvent(a)}var tL=`focusScope.autoFocusOnMount`,nL=`focusScope.autoFocusOnUnmount`,rL={bubbles:!1,cancelable:!0},iL=`FocusScope`,aL=N.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=N.useState(null),l=zI(i),u=zI(a),d=N.useRef(null),f=pI(t,e=>c(e)),p=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:fL(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||fL(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&fL(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),N.useEffect(()=>{if(s){pL.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(tL,rL);s.addEventListener(tL,l),s.dispatchEvent(t),t.defaultPrevented||(oL(gL(cL(s)),{select:!0}),document.activeElement===e&&fL(s))}return()=>{s.removeEventListener(tL,l),setTimeout(()=>{let t=new CustomEvent(nL,rL);s.addEventListener(nL,u),s.dispatchEvent(t),t.defaultPrevented||fL(e??document.body,{select:!0}),s.removeEventListener(nL,u),pL.remove(p)},0)}}},[s,l,u,p]);let m=N.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=sL(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&fL(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&fL(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,R.jsx)(LI.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});aL.displayName=iL;function oL(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(fL(r,{select:t}),document.activeElement!==n)return}function sL(e){let t=cL(e);return[lL(t,e),lL(t.reverse(),e)]}function cL(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function lL(e,t){for(let n of e)if(!uL(n,{upTo:t}))return n}function uL(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function dL(e){return e instanceof HTMLInputElement&&`select`in e}function fL(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&dL(e)&&t&&e.select()}}var pL=mL();function mL(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=hL(e,t),e.unshift(t)},remove(t){e=hL(e,t),e[0]?.resume()}}}function hL(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function gL(e){return e.filter(e=>e.tagName!==`A`)}var _L=`Portal`,vL=N.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=N.useState(!1);gI(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?$i.createPortal((0,R.jsx)(LI.div,{...r,ref:t}),o):null});vL.displayName=_L;function yL(e,t){return N.useReducer((e,n)=>t[e][n]??e,e)}var bL=e=>{let{present:t,children:n}=e,r=xL(t),i=typeof n==`function`?n({present:r.isPresent}):N.Children.only(n),a=CL(r.ref,TL(i));return typeof n==`function`||r.isPresent?N.cloneElement(i,{ref:a}):null};bL.displayName=`Presence`;function xL(e){let[t,n]=N.useState(),r=N.useRef(null),i=N.useRef(e),a=N.useRef(`none`),[o,s]=yL(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return N.useEffect(()=>{let e=wL(r.current);a.current=o===`mounted`?e:`none`},[o]),gI(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=wL(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),gI(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=wL(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=wL(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:N.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function SL(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function CL(...e){let t=N.useRef(e);return t.current=e,N.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=SL(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():SL(n[e],null)}}},[])}function wL(e){return e?.animationName||`none`}function TL(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var EL=0,DL=null;function OL(){N.useEffect(()=>{DL||={start:kL(),end:kL()};let{start:e,end:t}=DL;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),EL++,()=>{EL===1&&(DL?.start.remove(),DL?.end.remove(),DL=null),EL=Math.max(0,EL-1)}},[])}function kL(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var AL=function(){return AL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},AL.apply(this,arguments)};function jL(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ML(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))}var NL=`right-scroll-bar-position`,PL=`width-before-scroll-bar`,FL=`with-scroll-bars-hidden`,IL=`--removed-body-scroll-bar-size`;function LL(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function RL(e,t){var n=(0,N.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var zL=typeof window<`u`?N.useLayoutEffect:N.useEffect,BL=new WeakMap;function VL(e,t){var n=RL(t||null,function(t){return e.forEach(function(e){return LL(e,t)})});return zL(function(){var t=BL.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||LL(e,null)}),i.forEach(function(e){r.has(e)||LL(e,a)})}BL.set(n,e)},[e]),n}function HL(e){return e}function UL(e,t){t===void 0&&(t=HL);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function WL(e){e===void 0&&(e={});var t=UL(null);return t.options=AL({async:!0,ssr:!1},e),t}var GL=function(e){var t=e.sideCar,n=jL(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return N.createElement(r,AL({},n))};GL.isSideCarExport=!0;function KL(e,t){return e.useMedium(t),GL}var qL=WL(),JL=function(){},YL=N.forwardRef(function(e,t){var n=N.useRef(null),r=N.useState({onScrollCapture:JL,onWheelCapture:JL,onTouchMoveCapture:JL}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=jL(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=VL([n,t]),C=AL(AL({},b),i);return N.createElement(N.Fragment,null,u&&N.createElement(x,{sideCar:qL,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?N.cloneElement(N.Children.only(s),AL(AL({},C),{ref:S})):N.createElement(v,AL({},C,{className:c,ref:S}),s))});YL.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},YL.classNames={fullWidth:PL,zeroRight:NL};var XL,ZL=function(){if(XL)return XL;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function QL(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=ZL();return t&&e.setAttribute(`nonce`,t),e}function $L(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eR(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var tR=function(){var e=0,t=null;return{add:function(n){e==0&&(t=QL())&&($L(t,n),eR(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nR=function(){var e=tR();return function(t,n){N.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rR=function(){var e=nR();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},iR={left:0,top:0,right:0,gap:0},aR=function(e){return parseInt(e||``,10)||0},oR=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[aR(n),aR(r),aR(i)]},sR=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return iR;var t=oR(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},cR=rR(),lR=`data-scroll-locked`,uR=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
21
|
-
.${FL} {
|
|
22
|
-
overflow: hidden ${r};
|
|
23
|
-
padding-right: ${s}px ${r};
|
|
24
|
-
}
|
|
25
|
-
body[${lR}] {
|
|
26
|
-
overflow: hidden ${r};
|
|
27
|
-
overscroll-behavior: contain;
|
|
28
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
29
|
-
padding-left: ${i}px;
|
|
30
|
-
padding-top: ${a}px;
|
|
31
|
-
padding-right: ${o}px;
|
|
32
|
-
margin-left:0;
|
|
33
|
-
margin-top:0;
|
|
34
|
-
margin-right: ${s}px ${r};
|
|
35
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.${NL} {
|
|
39
|
-
right: ${s}px ${r};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.${PL} {
|
|
43
|
-
margin-right: ${s}px ${r};
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.${NL} .${NL} {
|
|
47
|
-
right: 0 ${r};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.${PL} .${PL} {
|
|
51
|
-
margin-right: 0 ${r};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
body[${lR}] {
|
|
55
|
-
${IL}: ${s}px;
|
|
56
|
-
}
|
|
57
|
-
`},dR=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},fR=function(){N.useEffect(function(){return document.body.setAttribute(lR,(dR()+1).toString()),function(){var e=dR()-1;e<=0?document.body.removeAttribute(lR):document.body.setAttribute(lR,e.toString())}},[])},pR=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;fR();var a=N.useMemo(function(){return sR(i)},[i]);return N.createElement(cR,{styles:uR(a,!t,i,n?``:`!important`)})},mR=!1;if(typeof window<`u`)try{var hR=Object.defineProperty({},"passive",{get:function(){return mR=!0,!0}});window.addEventListener(`test`,hR,hR),window.removeEventListener(`test`,hR,hR)}catch{mR=!1}var gR=mR?{passive:!1}:!1,_R=function(e){return e.tagName===`TEXTAREA`},vR=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!_R(e)&&n[t]===`visible`)},yR=function(e){return vR(e,`overflowY`)},bR=function(e){return vR(e,`overflowX`)},xR=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),wR(e,r)){var i=TR(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},SR=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},CR=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},wR=function(e,t){return e===`v`?yR(t):bR(t)},TR=function(e,t){return e===`v`?SR(t):CR(t)},ER=function(e,t){return e===`h`&&t===`rtl`?-1:1},DR=function(e,t,n,r,i){var a=ER(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=TR(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&wR(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},OR=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kR=function(e){return[e.deltaX,e.deltaY]},AR=function(e){return e&&`current`in e?e.current:e},jR=function(e,t){return e[0]===t[0]&&e[1]===t[1]},MR=function(e){return`
|
|
58
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
59
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
60
|
-
`},NR=0,PR=[];function FR(e){var t=N.useRef([]),n=N.useRef([0,0]),r=N.useRef(),i=N.useState(NR++)[0],a=N.useState(rR)[0],o=N.useRef(e);N.useEffect(function(){o.current=e},[e]),N.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=ML([e.lockRef.current],(e.shards||[]).map(AR),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=N.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=OR(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=xR(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=xR(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return DR(h,t,e,h===`h`?s:c,!0)},[]),c=N.useCallback(function(e){var n=e;if(!(!PR.length||PR[PR.length-1]!==a)){var r=`deltaY`in n?kR(n):OR(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&jR(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(AR).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=N.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:IR(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=N.useCallback(function(e){n.current=OR(e),r.current=void 0},[]),d=N.useCallback(function(t){l(t.type,kR(t),t.target,s(t,e.lockRef.current))},[]),f=N.useCallback(function(t){l(t.type,OR(t),t.target,s(t,e.lockRef.current))},[]);N.useEffect(function(){return PR.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,gR),document.addEventListener(`touchmove`,c,gR),document.addEventListener(`touchstart`,u,gR),function(){PR=PR.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,gR),document.removeEventListener(`touchmove`,c,gR),document.removeEventListener(`touchstart`,u,gR)}},[]);var p=e.removeScrollBar,m=e.inert;return N.createElement(N.Fragment,null,m?N.createElement(a,{styles:MR(i)}):null,p?N.createElement(pR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function IR(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var LR=KL(qL,FR),RR=N.forwardRef(function(e,t){return N.createElement(YL,AL({},e,{ref:t,sideCar:LR}))});RR.classNames=YL.classNames;var zR=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},BR=new WeakMap,VR=new WeakMap,HR={},UR=0,WR=function(e){return e&&(e.host||WR(e.parentNode))},GR=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=WR(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},KR=function(e,t,n,r){var i=GR(t,Array.isArray(e)?e:[e]);HR[n]||(HR[n]=new WeakMap);var a=HR[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(BR.get(e)||0)+1,l=(a.get(e)||0)+1;BR.set(e,c),a.set(e,l),o.push(e),c===1&&i&&VR.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),UR++,function(){o.forEach(function(e){var t=BR.get(e)-1,i=a.get(e)-1;BR.set(e,t),a.set(e,i),t||(VR.has(e)||e.removeAttribute(r),VR.delete(e)),i||e.removeAttribute(n)}),UR--,UR||(BR=new WeakMap,BR=new WeakMap,VR=new WeakMap,HR={})}},qR=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||zR(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),KR(r,i,n,`aria-hidden`)):function(){return null}},JR=`Dialog`,[YR,XR]=mI(JR),[ZR,QR]=YR(JR),$R=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=N.useRef(null),c=N.useRef(null),[l,u]=xI({prop:r,defaultProp:i??!1,onChange:a,caller:JR});return(0,R.jsx)(ZR,{scope:t,triggerRef:s,contentRef:c,contentId:yI(),titleId:yI(),descriptionId:yI(),open:l,onOpenChange:u,onOpenToggle:N.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};$R.displayName=JR;var ez=`DialogTrigger`,tz=N.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=QR(ez,n),a=pI(t,i.triggerRef);return(0,R.jsx)(LI.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":xz(i.open),...r,ref:a,onClick:J(e.onClick,i.onOpenToggle)})});tz.displayName=ez;var nz=`DialogPortal`,[rz,iz]=YR(nz,{forceMount:void 0}),az=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=QR(nz,t);return(0,R.jsx)(rz,{scope:t,forceMount:n,children:N.Children.map(r,e=>(0,R.jsx)(bL,{present:n||a.open,children:(0,R.jsx)(vL,{asChild:!0,container:i,children:e})}))})};az.displayName=nz;var oz=`DialogOverlay`,sz=N.forwardRef((e,t)=>{let n=iz(oz,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=QR(oz,e.__scopeDialog);return a.modal?(0,R.jsx)(bL,{present:r||a.open,children:(0,R.jsx)(lz,{...i,ref:t})}):null});sz.displayName=oz;var cz=wI(`DialogOverlay.RemoveScroll`),lz=N.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=QR(oz,n),a=pI(t,XI());return(0,R.jsx)(RR,{as:cz,allowPinchZoom:!0,shards:[i.contentRef],children:(0,R.jsx)(LI.div,{"data-state":xz(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),uz=`DialogContent`,dz=N.forwardRef((e,t)=>{let n=iz(uz,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=QR(uz,e.__scopeDialog);return(0,R.jsx)(bL,{present:r||a.open,children:a.modal?(0,R.jsx)(fz,{...i,ref:t}):(0,R.jsx)(pz,{...i,ref:t})})});dz.displayName=uz;var fz=N.forwardRef((e,t)=>{let n=QR(uz,e.__scopeDialog),r=N.useRef(null),i=pI(t,n.contentRef,r);return N.useEffect(()=>{let e=r.current;if(e)return qR(e)},[]),(0,R.jsx)(mz,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:J(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:J(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:J(e.onFocusOutside,e=>e.preventDefault())})}),pz=N.forwardRef((e,t)=>{let n=QR(uz,e.__scopeDialog),r=N.useRef(!1),i=N.useRef(!1);return(0,R.jsx)(mz,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),mz=N.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=QR(uz,n);return OL(),(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(aL,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,R.jsx)(qI,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":xz(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),hz=`DialogTitle`,gz=N.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=QR(hz,n);return(0,R.jsx)(LI.h2,{id:i.titleId,...r,ref:t})});gz.displayName=hz;var _z=`DialogDescription`,vz=N.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=QR(_z,n);return(0,R.jsx)(LI.p,{id:i.descriptionId,...r,ref:t})});vz.displayName=_z;var yz=`DialogClose`,bz=N.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=QR(yz,n);return(0,R.jsx)(LI.button,{type:`button`,...r,ref:t,onClick:J(e.onClick,()=>i.onOpenChange(!1))})});bz.displayName=yz;function xz(e){return e?`open`:`closed`}var Sz=`[cmdk-group=""]`,Cz=`[cmdk-group-items=""]`,wz=`[cmdk-group-heading=""]`,Tz=`[cmdk-item=""]`,Ez=`${Tz}:not([aria-disabled="true"])`,Dz=`cmdk-item-select`,Oz=`data-value`,kz=(e,t,n)=>uI(e,t,n),Az=N.createContext(void 0),jz=()=>N.useContext(Az),Mz=N.createContext(void 0),Nz=()=>N.useContext(Mz),Pz=N.createContext(void 0),Fz=N.forwardRef((e,t)=>{let n=Yz(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=Yz(()=>new Set),i=Yz(()=>new Map),a=Yz(()=>new Map),o=Yz(()=>new Set),s=qz(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=yI(),y=yI(),b=yI(),x=N.useRef(null),S=Qz();Jz(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,C.emit()}},[u]),Jz(()=>{S(6,k)},[]);let C=N.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)O(),E(),S(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(S(7,()=>{n.current.selectedItemId=A()?.id,C.emit()}),r||S(5,k),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}C.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),w=N.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,T(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),S(3,()=>{O(),E(),n.current.value||D(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=A();S(4,()=>{O(),t?.getAttribute(`id`)===e&&D(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:x}),[]);function T(e,t){let r=s.current?.filter??kz;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;j().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(Cz);t?t.appendChild(e.parentElement===t?e:e.closest(`${Cz} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Cz} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=x.current?.querySelector(`${Sz}[${Oz}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=j().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(Oz);C.setState(`value`,e||void 0)}function O(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=T(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function k(){var e;let t=A();t&&(t.parentElement?.firstChild===t&&((e=t.closest(Sz)?.querySelector(wz))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function A(){return x.current?.querySelector(`${Tz}[aria-selected="true"]`)}function j(){return Array.from(x.current?.querySelectorAll(Ez)||[])}function M(e){let t=j()[e];t&&C.setState(`value`,t.getAttribute(Oz))}function ee(e){var t;let n=A(),r=j(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&C.setState(`value`,a.getAttribute(Oz))}function P(e){let t=A()?.closest(Sz),n;for(;t&&!n;)t=e>0?Gz(t,Sz):Kz(t,Sz),n=t?.querySelector(Ez);n?C.setState(`value`,n.getAttribute(Oz)):ee(e)}let F=()=>M(j().length-1),I=e=>{e.preventDefault(),e.metaKey?F():e.altKey?P(1):ee(1)},te=e=>{e.preventDefault(),e.metaKey?M(0):e.altKey?P(-1):ee(-1)};return N.createElement(LI.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&I(e);break;case`ArrowDown`:I(e);break;case`p`:case`k`:g&&e.ctrlKey&&te(e);break;case`ArrowUp`:te(e);break;case`Home`:e.preventDefault(),M(0);break;case`End`:e.preventDefault(),F();break;case`Enter`:{e.preventDefault();let t=A();if(t){let e=new Event(Dz);t.dispatchEvent(e)}}}}},N.createElement(`label`,{"cmdk-label":``,htmlFor:w.inputId,id:w.labelId,style:tB},c),eB(e,e=>N.createElement(Mz.Provider,{value:C},N.createElement(Az.Provider,{value:w},e))))}),Iz=N.forwardRef((e,t)=>{let n=yI(),r=N.useRef(null),i=N.useContext(Pz),a=jz(),o=qz(e),s=o.current?.forceMount??i?.forceMount;Jz(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=Zz(n,r,[e.value,e.children,r],e.keywords),l=Nz(),u=Xz(e=>e.value&&e.value===c.current),d=Xz(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);N.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(Dz,f),()=>t.removeEventListener(Dz,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return N.createElement(LI.div,{ref:fI(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),Lz=N.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=yI(),s=N.useRef(null),c=N.useRef(null),l=yI(),u=jz(),d=Xz(e=>i||u.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);Jz(()=>u.group(o),[]),Zz(o,s,[e.value,e.heading,c]);let f=N.useMemo(()=>({id:o,forceMount:i}),[i]);return N.createElement(LI.div,{ref:fI(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:d?void 0:!0},n&&N.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),eB(e,e=>N.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},N.createElement(Pz.Provider,{value:f},e))))}),Rz=N.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=N.useRef(null),a=Xz(e=>!e.search);return!n&&!a?null:N.createElement(LI.div,{ref:fI(i,t),...r,"cmdk-separator":``,role:`separator`})}),zz=N.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=Nz(),o=Xz(e=>e.search),s=Xz(e=>e.selectedItemId),c=jz();return N.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),N.createElement(LI.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),Bz=N.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=N.useRef(null),o=N.useRef(null),s=Xz(e=>e.selectedItemId),c=jz();return N.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),N.createElement(LI.div,{ref:fI(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},eB(e,e=>N.createElement(`div`,{ref:fI(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Vz=N.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return N.createElement($R,{open:n,onOpenChange:r},N.createElement(az,{container:o},N.createElement(sz,{"cmdk-overlay":``,className:i}),N.createElement(dz,{"aria-label":e.label,"cmdk-dialog":``,className:a},N.createElement(Fz,{ref:t,...s}))))}),Hz=N.forwardRef((e,t)=>Xz(e=>e.filtered.count===0)?N.createElement(LI.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),Uz=N.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return N.createElement(LI.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},eB(e,e=>N.createElement(`div`,{"aria-hidden":!0},e)))}),Wz=Object.assign(Fz,{List:Bz,Item:Iz,Input:zz,Group:Lz,Separator:Rz,Dialog:Vz,Empty:Hz,Loading:Uz});function Gz(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Kz(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function qz(e){let t=N.useRef(e);return Jz(()=>{t.current=e}),t}var Jz=typeof window>`u`?N.useEffect:N.useLayoutEffect;function Yz(e){let t=N.useRef();return t.current===void 0&&(t.current=e()),t}function Xz(e){let t=Nz(),n=()=>e(t.snapshot());return N.useSyncExternalStore(t.subscribe,n,n)}function Zz(e,t,n,r=[]){let i=N.useRef(),a=jz();return Jz(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(Oz,s),i.current=s}),i}var Qz=()=>{let[e,t]=N.useState(),n=Yz(()=>new Map);return Jz(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function $z(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function eB({asChild:e,children:t},n){return e&&N.isValidElement(t)?N.cloneElement($z(t),{ref:t.ref},n(t.props.children)):n(t)}var tB={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function nB(e){let t=e+`CollectionProvider`,[n,r]=mI(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=N.useRef(null),a=N.useRef(new Map).current;return(0,R.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=wI(s),l=N.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,R.jsx)(c,{ref:pI(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=wI(u),p=N.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=N.useRef(null),s=pI(t,o),c=a(u,n);return N.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,R.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return N.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var rB=N.createContext(void 0);function iB(e){let t=N.useContext(rB);return e||t||`ltr`}var aB=[`top`,`right`,`bottom`,`left`],oB=Math.min,sB=Math.max,cB=Math.round,lB=Math.floor,uB=e=>({x:e,y:e}),dB={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function fB(e,t,n){return sB(e,oB(t,n))}function pB(e,t){return typeof e==`function`?e(t):e}function mB(e){return e.split(`-`)[0]}function hB(e){return e.split(`-`)[1]}function gB(e){return e===`x`?`y`:`x`}function _B(e){return e===`y`?`height`:`width`}function vB(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function yB(e){return gB(vB(e))}function bB(e,t,n){n===void 0&&(n=!1);let r=hB(e),i=yB(e),a=_B(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=kB(o)),[o,kB(o)]}function xB(e){let t=kB(e);return[SB(e),t,SB(t)]}function SB(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var CB=[`left`,`right`],wB=[`right`,`left`],TB=[`top`,`bottom`],EB=[`bottom`,`top`];function DB(e,t,n){switch(e){case`top`:case`bottom`:return n?t?wB:CB:t?CB:wB;case`left`:case`right`:return t?TB:EB;default:return[]}}function OB(e,t,n,r){let i=hB(e),a=DB(mB(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(SB)))),a}function kB(e){let t=mB(e);return dB[t]+e.slice(t.length)}function AB(e){return{top:0,right:0,bottom:0,left:0,...e}}function jB(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:AB(e)}function MB(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function NB(e,t,n){let{reference:r,floating:i}=e,a=vB(t),o=yB(t),s=_B(o),c=mB(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(hB(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function PB(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=pB(t,e),p=jB(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=MB(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=MB(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var FB=50,IB=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:PB},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=NB(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<FB&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=NB(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},LB=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=pB(e,t)||{};if(l==null)return{};let d=jB(u),f={x:n,y:r},p=yB(i),m=_B(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=oB(d[_],T),D=oB(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=fB(O,A,k),M=!c.arrow&&hB(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),RB=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=pB(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=mB(r),_=vB(o),v=mB(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[kB(o)]:xB(o)),x=p!==`none`;!d&&x&&b.push(...OB(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=bB(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==vB(t))||T.every(e=>vB(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=vB(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function zB(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function BB(e){return aB.some(t=>e[t]>=0)}var VB=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=pB(e,t);switch(i){case`referenceHidden`:{let e=zB(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:BB(e)}}}case`escaped`:{let e=zB(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:BB(e)}}}default:return{}}}}},HB=new Set([`left`,`top`]);async function UB(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=mB(n),s=hB(n),c=vB(n)===`y`,l=HB.has(o)?-1:1,u=a&&c?-1:1,d=pB(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var WB=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await UB(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},GB=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=pB(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=vB(mB(i)),p=gB(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=fB(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=fB(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},KB=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=pB(e,t),u={x:n,y:r},d=vB(i),f=gB(d),p=u[f],m=u[d],h=pB(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=HB.has(mB(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},qB=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=pB(e,t),u=await o.detectOverflow(t,l),d=mB(i),f=hB(i),p=vB(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=oB(h-u[g],v),x=oB(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=sB(u.left,0),t=sB(u.right,0),n=sB(u.top,0),r=sB(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:sB(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:sB(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function JB(){return typeof window<`u`}function YB(e){return QB(e)?(e.nodeName||``).toLowerCase():`#document`}function XB(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ZB(e){return((QB(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function QB(e){return JB()?e instanceof Node||e instanceof XB(e).Node:!1}function $B(e){return JB()?e instanceof Element||e instanceof XB(e).Element:!1}function eV(e){return JB()?e instanceof HTMLElement||e instanceof XB(e).HTMLElement:!1}function tV(e){return!JB()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof XB(e).ShadowRoot}function nV(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=pV(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function rV(e){return/^(table|td|th)$/.test(YB(e))}function iV(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var aV=/transform|translate|scale|rotate|perspective|filter/,oV=/paint|layout|strict|content/,sV=e=>!!e&&e!==`none`,cV;function lV(e){let t=$B(e)?pV(e):e;return sV(t.transform)||sV(t.translate)||sV(t.scale)||sV(t.rotate)||sV(t.perspective)||!dV()&&(sV(t.backdropFilter)||sV(t.filter))||aV.test(t.willChange||``)||oV.test(t.contain||``)}function uV(e){let t=hV(e);for(;eV(t)&&!fV(t);){if(lV(t))return t;if(iV(t))return null;t=hV(t)}return null}function dV(){return cV??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),cV}function fV(e){return/^(html|body|#document)$/.test(YB(e))}function pV(e){return XB(e).getComputedStyle(e)}function mV(e){return $B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hV(e){if(YB(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||tV(e)&&e.host||ZB(e);return tV(t)?t.host:t}function gV(e){let t=hV(e);return fV(t)?e.ownerDocument?e.ownerDocument.body:e.body:eV(t)&&nV(t)?t:gV(t)}function _V(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=gV(e),i=r===e.ownerDocument?.body,a=XB(r);if(i){let e=vV(a);return t.concat(a,a.visualViewport||[],nV(r)?r:[],e&&n?_V(e):[])}else return t.concat(r,_V(r,[],n))}function vV(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yV(e){let t=pV(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=eV(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=cB(n)!==a||cB(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function bV(e){return $B(e)?e:e.contextElement}function xV(e){let t=bV(e);if(!eV(t))return uB(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=yV(t),o=(a?cB(n.width):n.width)/r,s=(a?cB(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var SV=uB(0);function CV(e){let t=XB(e);return!dV()||!t.visualViewport?SV:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wV(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==XB(e)?!1:t}function TV(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=bV(e),o=uB(1);t&&(r?$B(r)&&(o=xV(r)):o=xV(e));let s=wV(a,n,r)?CV(a):uB(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=XB(a),t=r&&$B(r)?XB(r):r,n=e,i=vV(n);for(;i&&r&&t!==n;){let e=xV(i),t=i.getBoundingClientRect(),r=pV(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=XB(i),i=vV(n)}}return MB({width:u,height:d,x:c,y:l})}function EV(e,t){let n=mV(e).scrollLeft;return t?t.left+n:TV(ZB(e)).left+n}function DV(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-EV(e,n),y:n.top+t.scrollTop}}function OV(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=ZB(r),s=t?iV(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=uB(1),u=uB(0),d=eV(r);if((d||!d&&!a)&&((YB(r)!==`body`||nV(o))&&(c=mV(r)),d)){let e=TV(r);l=xV(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?DV(o,c):uB(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function kV(e){return Array.from(e.getClientRects())}function AV(e){let t=ZB(e),n=mV(e),r=e.ownerDocument.body,i=sB(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=sB(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+EV(e),s=-n.scrollTop;return pV(r).direction===`rtl`&&(o+=sB(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var jV=25;function MV(e,t){let n=XB(e),r=ZB(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=dV();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=EV(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=jV&&(a-=o)}else l<=jV&&(a+=l);return{width:a,height:o,x:s,y:c}}function NV(e,t){let n=TV(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=eV(e)?xV(e):uB(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function PV(e,t,n){let r;if(t===`viewport`)r=MV(e,n);else if(t===`document`)r=AV(ZB(e));else if($B(t))r=NV(t,n);else{let n=CV(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return MB(r)}function FV(e,t){let n=hV(e);return n===t||!$B(n)||fV(n)?!1:pV(n).position===`fixed`||FV(n,t)}function IV(e,t){let n=t.get(e);if(n)return n;let r=_V(e,[],!1).filter(e=>$B(e)&&YB(e)!==`body`),i=null,a=pV(e).position===`fixed`,o=a?hV(e):e;for(;$B(o)&&!fV(o);){let t=pV(o),n=lV(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||nV(o)&&!n&&FV(e,o))?r=r.filter(e=>e!==o):i=t,o=hV(o)}return t.set(e,r),r}function LV(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?iV(t)?[]:IV(t,this._c):[].concat(n),r],o=PV(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=PV(t,a[e],i);s=sB(n.top,s),c=oB(n.right,c),l=oB(n.bottom,l),u=sB(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function RV(e){let{width:t,height:n}=yV(e);return{width:t,height:n}}function zV(e,t,n){let r=eV(t),i=ZB(t),a=n===`fixed`,o=TV(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=uB(0);function l(){c.x=EV(i)}if(r||!r&&!a)if((YB(t)!==`body`||nV(i))&&(s=mV(t)),r){let e=TV(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?DV(i,s):uB(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function BV(e){return pV(e).position===`static`}function VV(e,t){if(!eV(e)||pV(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return ZB(e)===n&&(n=n.ownerDocument.body),n}function HV(e,t){let n=XB(e);if(iV(e))return n;if(!eV(e)){let t=hV(e);for(;t&&!fV(t);){if($B(t)&&!BV(t))return t;t=hV(t)}return n}let r=VV(e,t);for(;r&&rV(r)&&BV(r);)r=VV(r,t);return r&&fV(r)&&BV(r)&&!lV(r)?n:r||uV(e)||n}var UV=async function(e){let t=this.getOffsetParent||HV,n=this.getDimensions,r=await n(e.floating);return{reference:zV(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function WV(e){return pV(e).direction===`rtl`}var GV={convertOffsetParentRelativeRectToViewportRelativeRect:OV,getDocumentElement:ZB,getClippingRect:LV,getOffsetParent:HV,getElementRects:UV,getClientRects:kV,getDimensions:RV,getScale:xV,isElement:$B,isRTL:WV};function KV(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function qV(e,t){let n=null,r,i=ZB(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=lB(d),h=lB(i.clientWidth-(u+f)),g=lB(i.clientHeight-(d+p)),_=lB(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:sB(0,oB(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!KV(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function JV(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=bV(e),u=i||a?[...l?_V(l):[],...t?_V(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?qV(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?TV(e):null;c&&g();function g(){let t=TV(e);h&&!KV(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var YV=WB,XV=GB,ZV=RB,QV=qB,$V=VB,eH=LB,tH=KB,nH=(e,t,n)=>{let r=new Map,i={platform:GV,...n},a={...i.platform,_c:r};return IB(e,t,{...i,platform:a})},rH=typeof document<`u`?N.useLayoutEffect:function(){};function iH(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!iH(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!iH(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function aH(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oH(e,t){let n=aH(e);return Math.round(t*n)/n}function sH(e){let t=N.useRef(e);return rH(()=>{t.current=e}),t}function cH(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=N.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=N.useState(r);iH(f,r)||p(r);let[m,h]=N.useState(null),[g,_]=N.useState(null),v=N.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=N.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=N.useRef(null),C=N.useRef(null),w=N.useRef(u),T=c!=null,E=sH(c),D=sH(i),O=sH(l),k=N.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),nH(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!iH(w.current,t)&&(w.current=t,$i.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);rH(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=N.useRef(!1);rH(()=>(A.current=!0,()=>{A.current=!1}),[]),rH(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=N.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=N.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=N.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=oH(M.floating,u.x),r=oH(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...aH(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return N.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:ee}),[u,k,j,M,ee])}var lH=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:eH({element:r.current,padding:i}).fn(n):r?eH({element:r,padding:i}).fn(n):{}}}},uH=(e,t)=>{let n=YV(e);return{name:n.name,fn:n.fn,options:[e,t]}},dH=(e,t)=>{let n=XV(e);return{name:n.name,fn:n.fn,options:[e,t]}},fH=(e,t)=>({fn:tH(e).fn,options:[e,t]}),pH=(e,t)=>{let n=ZV(e);return{name:n.name,fn:n.fn,options:[e,t]}},mH=(e,t)=>{let n=QV(e);return{name:n.name,fn:n.fn,options:[e,t]}},hH=(e,t)=>{let n=$V(e);return{name:n.name,fn:n.fn,options:[e,t]}},gH=(e,t)=>{let n=lH(e);return{name:n.name,fn:n.fn,options:[e,t]}},_H=`Arrow`,vH=N.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,R.jsx)(LI.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,R.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});vH.displayName=_H;var yH=vH;function bH(e){let[t,n]=N.useState(void 0);return gI(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var xH=`Popper`,[SH,CH]=mI(xH),[wH,TH]=SH(xH),EH=e=>{let{__scopePopper:t,children:n}=e,[r,i]=N.useState(null),[a,o]=N.useState(void 0);return(0,R.jsx)(wH,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};EH.displayName=xH;var DH=`PopperAnchor`,OH=N.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=TH(DH,n),o=N.useRef(null),s=a.onAnchorChange,c=pI(t,N.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=N.useRef(null);N.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&RH(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,R.jsx)(LI.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});OH.displayName=DH;var kH=`PopperContent`,[AH,jH]=SH(kH),MH=N.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=TH(kH,n),[_,v]=N.useState(null),y=pI(t,e=>v(e)),[b,x]=N.useState(null),S=bH(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(IH),altBoundary:O},{refs:A,floatingStyles:j,placement:M,isPositioned:ee,middlewareData:P}=cH({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>JV(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[uH({mainAxis:i+w,alignmentAxis:o}),c&&dH({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?fH():void 0,...k}),c&&pH({...k}),mH({...k,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&gH({element:b,padding:s}),LH({arrowWidth:C,arrowHeight:w}),f&&hH({strategy:`referenceHidden`,...k,boundary:O?k.boundary:void 0})]}),F=g.setPlacementState;gI(()=>(F(M),()=>{F(void 0)}),[M,F]);let[I,te]=RH(M),ne=zI(m);gI(()=>{ee&&ne?.()},[ee,ne]);let re=P.arrow?.x,ie=P.arrow?.y,L=P.arrow?.centerOffset!==0,[ae,oe]=N.useState();return gI(()=>{_&&oe(window.getComputedStyle(_).zIndex)},[_]),(0,R.jsx)(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:ee?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(` `),...P.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,R.jsx)(AH,{scope:n,placedSide:I,placedAlign:te,onArrowChange:x,arrowX:re,arrowY:ie,shouldHideArrow:L,children:(0,R.jsx)(LI.div,{"data-side":I,"data-align":te,...h,ref:y,style:{...h.style,animation:ee?void 0:`none`}})})})});MH.displayName=kH;var NH=`PopperArrow`,PH={top:`bottom`,right:`left`,bottom:`top`,left:`right`},FH=N.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=jH(NH,n),a=PH[i.placedSide];return(0,R.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,R.jsx)(yH,{...r,ref:t,style:{...r.style,display:`block`}})})});FH.displayName=NH;function IH(e){return e!==null}var LH=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=RH(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function RH(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var zH=EH,BH=OH,VH=MH,HH=FH,UH=`rovingFocusGroup.onEntryFocus`,WH={bubbles:!1,cancelable:!0},GH=`RovingFocusGroup`,[KH,qH,JH]=nB(GH),[YH,XH]=mI(GH,[JH]),[ZH,QH]=YH(GH),$H=N.forwardRef((e,t)=>(0,R.jsx)(KH.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(KH.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(eU,{...e,ref:t})})}));$H.displayName=GH;var eU=N.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=N.useRef(null),p=pI(t,f),m=iB(a),[h,g]=xI({prop:o,defaultProp:s??null,onChange:c,caller:GH}),[_,v]=N.useState(!1),y=zI(l),b=qH(n),x=N.useRef(!1),[S,C]=N.useState(0);return N.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(UH,y),()=>e.removeEventListener(UH,y)},[y]),(0,R.jsx)(ZH,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:N.useCallback(e=>g(e),[g]),onItemShiftTab:N.useCallback(()=>v(!0),[]),onFocusableItemAdd:N.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:N.useCallback(()=>C(e=>e-1),[]),children:(0,R.jsx)(LI.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:J(e.onMouseDown,()=>{x.current=!0}),onFocus:J(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(UH,WH);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);oU([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:J(e.onBlur,()=>v(!1))})})}),tU=`RovingFocusGroupItem`,nU=N.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=yI(),l=a||c,u=QH(tU,n),d=u.currentTabStopId===l,f=qH(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return N.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,R.jsx)(KH.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,R.jsx)(LI.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:J(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:J(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:J(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=aU(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?sU(n,r+1):n.slice(r+1)}setTimeout(()=>oU(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});nU.displayName=tU;var rU={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function iU(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function aU(e,t,n){let r=iU(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return rU[r]}function oU(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function sU(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var cU=$H,lU=nU,uU=[`Enter`,` `],dU=[`ArrowDown`,`PageUp`,`Home`],fU=[`ArrowUp`,`PageDown`,`End`],pU=[...dU,...fU],mU={ltr:[...uU,`ArrowRight`],rtl:[...uU,`ArrowLeft`]},hU={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},gU=`Menu`,[_U,vU,yU]=nB(gU),[bU,xU]=mI(gU,[yU,CH,XH]),SU=CH(),CU=XH(),[wU,TU]=bU(gU),[EU,DU]=bU(gU),OU=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=SU(t),[c,l]=N.useState(null),u=N.useRef(!1),d=zI(a),f=iB(i);return N.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),N.useEffect(()=>{if(!n)return;let e=()=>d(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,R.jsx)(zH,{...s,children:(0,R.jsx)(wU,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,R.jsx)(EU,{scope:t,onClose:N.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};OU.displayName=gU;var kU=`MenuAnchor`,AU=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=SU(n);return(0,R.jsx)(BH,{...i,...r,ref:t})});AU.displayName=kU;var jU=`MenuPortal`,[MU,NU]=bU(jU,{forceMount:void 0}),PU=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=TU(jU,t);return(0,R.jsx)(MU,{scope:t,forceMount:n,children:(0,R.jsx)(bL,{present:n||a.open,children:(0,R.jsx)(vL,{asChild:!0,container:i,children:r})})})};PU.displayName=jU;var FU=`MenuContent`,[IU,LU]=bU(FU),RU=N.forwardRef((e,t)=>{let n=NU(FU,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=TU(FU,e.__scopeMenu),o=DU(FU,e.__scopeMenu);return(0,R.jsx)(_U.Provider,{scope:e.__scopeMenu,children:(0,R.jsx)(bL,{present:r||a.open,children:(0,R.jsx)(_U.Slot,{scope:e.__scopeMenu,children:o.modal?(0,R.jsx)(zU,{...i,ref:t}):(0,R.jsx)(BU,{...i,ref:t})})})})}),zU=N.forwardRef((e,t)=>{let n=TU(FU,e.__scopeMenu),r=N.useRef(null),i=pI(t,r);return N.useEffect(()=>{let e=r.current;if(e)return qR(e)},[]),(0,R.jsx)(HU,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:J(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),BU=N.forwardRef((e,t)=>{let n=TU(FU,e.__scopeMenu);return(0,R.jsx)(HU,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),VU=wI(`MenuContent.ScrollLock`),HU=N.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=TU(FU,n),_=DU(FU,n),v=SU(n),y=CU(n),b=vU(n),[x,S]=N.useState(null),C=N.useRef(null),w=pI(t,C,g.onContentChange),T=N.useRef(0),E=N.useRef(``),D=N.useRef(0),O=N.useRef(null),k=N.useRef(`right`),A=N.useRef(0),j=m?RR:N.Fragment,M=m?{as:VU,allowPinchZoom:!0}:void 0,ee=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=EW(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};N.useEffect(()=>()=>window.clearTimeout(T.current),[]),OL();let P=N.useCallback(e=>k.current===O.current?.side&&OW(e,O.current?.area),[]);return(0,R.jsx)(IU,{scope:n,searchRef:E,onItemEnter:N.useCallback(e=>{P(e)&&e.preventDefault()},[P]),onItemLeave:N.useCallback(e=>{P(e)||(C.current?.focus(),S(null))},[P]),onTriggerLeave:N.useCallback(e=>{P(e)&&e.preventDefault()},[P]),pointerGraceTimerRef:D,onPointerGraceIntentChange:N.useCallback(e=>{O.current=e},[]),children:(0,R.jsx)(j,{...M,children:(0,R.jsx)(aL,{asChild:!0,trapped:i,onMountAutoFocus:J(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,R.jsx)(qI,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,R.jsx)(cU,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:J(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,R.jsx)(VH,{role:`menu`,"aria-orientation":`vertical`,"data-state":xW(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:J(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ee(e.key));let i=C.current;if(e.target!==i||!pU.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);fU.includes(e.key)&&a.reverse(),wW(a)}),onBlur:J(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:J(e.onPointerMove,kW(e=>{let t=e.target,n=A.current!==e.clientX;e.currentTarget.contains(t)&&n&&(k.current=e.clientX>A.current?`right`:`left`,A.current=e.clientX)}))})})})})})})});RU.displayName=FU;var UU=`MenuGroup`,WU=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,R.jsx)(LI.div,{role:`group`,...r,ref:t})});WU.displayName=UU;var GU=`MenuLabel`,KU=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,R.jsx)(LI.div,{...r,ref:t})});KU.displayName=GU;var qU=`MenuItem`,JU=`menu.itemSelect`,YU=N.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=N.useRef(null),o=DU(qU,e.__scopeMenu),s=LU(qU,e.__scopeMenu),c=pI(t,a),l=N.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(JU,{bubbles:!0,cancelable:!0});e.addEventListener(JU,e=>r?.(e),{once:!0}),RI(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,R.jsx)(XU,{...i,ref:c,disabled:n,onClick:J(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:J(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:J(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||uU.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});YU.displayName=qU;var XU=N.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=LU(qU,n),s=CU(n),c=N.useRef(null),l=pI(t,c),[u,d]=N.useState(!1),[f,p]=N.useState(``);return N.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,R.jsx)(_U.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,R.jsx)(lU,{asChild:!0,...s,focusable:!r,children:(0,R.jsx)(LI.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:J(e.onPointerMove,kW(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:J(e.onPointerLeave,kW(e=>o.onItemLeave(e))),onFocus:J(e.onFocus,()=>d(!0)),onBlur:J(e.onBlur,()=>d(!1))})})})}),ZU=`MenuCheckboxItem`,QU=N.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,R.jsx)(oW,{scope:e.__scopeMenu,checked:n,children:(0,R.jsx)(YU,{role:`menuitemcheckbox`,"aria-checked":SW(n)?`mixed`:n,...i,ref:t,"data-state":CW(n),onSelect:J(i.onSelect,()=>r?.(SW(n)?!0:!n),{checkForDefaultPrevented:!1})})})});QU.displayName=ZU;var $U=`MenuRadioGroup`,[eW,tW]=bU($U,{value:void 0,onValueChange:()=>{}}),nW=N.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=zI(r);return(0,R.jsx)(eW,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,R.jsx)(WU,{...i,ref:t})})});nW.displayName=$U;var rW=`MenuRadioItem`,iW=N.forwardRef((e,t)=>{let{value:n,...r}=e,i=tW(rW,e.__scopeMenu),a=n===i.value;return(0,R.jsx)(oW,{scope:e.__scopeMenu,checked:a,children:(0,R.jsx)(YU,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":CW(a),onSelect:J(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});iW.displayName=rW;var aW=`MenuItemIndicator`,[oW,sW]=bU(aW,{checked:!1}),cW=N.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=sW(aW,n);return(0,R.jsx)(bL,{present:r||SW(a.checked)||a.checked===!0,children:(0,R.jsx)(LI.span,{...i,ref:t,"data-state":CW(a.checked)})})});cW.displayName=aW;var lW=`MenuSeparator`,uW=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,R.jsx)(LI.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});uW.displayName=lW;var dW=`MenuArrow`,fW=N.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=SU(n);return(0,R.jsx)(HH,{...i,...r,ref:t})});fW.displayName=dW;var pW=`MenuSub`,[mW,hW]=bU(pW),gW=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=TU(pW,t),o=SU(t),[s,c]=N.useState(null),[l,u]=N.useState(null),d=zI(i);return N.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,R.jsx)(zH,{...o,children:(0,R.jsx)(wU,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,R.jsx)(mW,{scope:t,contentId:yI(),triggerId:yI(),trigger:s,onTriggerChange:c,children:n})})})};gW.displayName=pW;var _W=`MenuSubTrigger`,vW=N.forwardRef((e,t)=>{let n=TU(_W,e.__scopeMenu),r=DU(_W,e.__scopeMenu),i=hW(_W,e.__scopeMenu),a=LU(_W,e.__scopeMenu),o=N.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=N.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return N.useEffect(()=>u,[u]),N.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,R.jsx)(AU,{asChild:!0,...l,children:(0,R.jsx)(XU,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":xW(n.open),...e,ref:fI(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:J(e.onPointerMove,kW(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:J(e.onPointerLeave,kW(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:J(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||mU[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});vW.displayName=_W;var yW=`MenuSubContent`,bW=N.forwardRef((e,t)=>{let n=NU(FU,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=TU(FU,e.__scopeMenu),s=DU(FU,e.__scopeMenu),c=hW(yW,e.__scopeMenu),l=N.useRef(null),u=pI(t,l);return(0,R.jsx)(_U.Provider,{scope:e.__scopeMenu,children:(0,R.jsx)(bL,{present:r||o.open,children:(0,R.jsx)(_U.Slot,{scope:e.__scopeMenu,children:(0,R.jsx)(HU,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:J(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:J(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:J(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=hU[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});bW.displayName=yW;function xW(e){return e?`open`:`closed`}function SW(e){return e===`indeterminate`}function CW(e){return SW(e)?`indeterminate`:e?`checked`:`unchecked`}function wW(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function TW(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function EW(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=TW(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function DW(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function OW(e,t){return t?DW({x:e.clientX,y:e.clientY},t):!1}function kW(e){return t=>t.pointerType===`mouse`?e(t):void 0}var AW=OU,jW=AU,MW=PU,NW=RU,PW=WU,FW=KU,IW=YU,LW=QU,RW=nW,zW=iW,BW=cW,VW=uW,HW=fW,UW=vW,WW=bW,GW=`DropdownMenu`,[KW,qW]=mI(GW,[xU]),JW=xU(),[YW,XW]=KW(GW),ZW=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=JW(t),l=N.useRef(null),[u,d]=xI({prop:i,defaultProp:a??!1,onChange:o,caller:GW});return(0,R.jsx)(YW,{scope:t,triggerId:yI(),triggerRef:l,contentId:yI(),open:u,onOpenChange:d,onOpenToggle:N.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,R.jsx)(AW,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};ZW.displayName=GW;var QW=`DropdownMenuTrigger`,$W=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=XW(QW,n),o=JW(n);return(0,R.jsx)(jW,{asChild:!0,...o,children:(0,R.jsx)(LI.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:fI(t,a.triggerRef),onPointerDown:J(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:J(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});$W.displayName=QW;var eG=`DropdownMenuPortal`,tG=e=>{let{__scopeDropdownMenu:t,...n}=e,r=JW(t);return(0,R.jsx)(MW,{...r,...n})};tG.displayName=eG;var nG=`DropdownMenuContent`,rG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=XW(nG,n),a=JW(n),o=N.useRef(!1);return(0,R.jsx)(NW,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:J(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:J(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});rG.displayName=nG;var iG=`DropdownMenuGroup`,aG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=JW(n);return(0,R.jsx)(PW,{...i,...r,ref:t})});aG.displayName=iG;var oG=`DropdownMenuLabel`,sG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=JW(n);return(0,R.jsx)(FW,{...i,...r,ref:t})});sG.displayName=oG;var cG=`DropdownMenuItem`,lG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=JW(n);return(0,R.jsx)(IW,{...i,...r,ref:t})});lG.displayName=cG;var uG=`DropdownMenuCheckboxItem`,dG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=JW(n);return(0,R.jsx)(LW,{...i,...r,ref:t})});dG.displayName=uG;var fG=`DropdownMenuRadioGroup`,pG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=JW(n);return(0,R.jsx)(RW,{...i,...r,ref:t})});pG.displayName=fG;var mG=`DropdownMenuRadioItem`,hG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=JW(n);return(0,R.jsx)(zW,{...i,...r,ref:t})});hG.displayName=mG;var gG=`DropdownMenuItemIndicator`,_G=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=JW(n);return(0,R.jsx)(BW,{...i,...r,ref:t})});_G.displayName=gG;var vG=`DropdownMenuSeparator`,yG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=JW(n);return(0,R.jsx)(VW,{...i,...r,ref:t})});yG.displayName=vG;var bG=`DropdownMenuArrow`,xG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=JW(n);return(0,R.jsx)(HW,{...i,...r,ref:t})});xG.displayName=bG;var SG=`DropdownMenuSubTrigger`,CG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=JW(n);return(0,R.jsx)(UW,{...i,...r,ref:t})});CG.displayName=SG;var wG=`DropdownMenuSubContent`,TG=N.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=JW(n);return(0,R.jsx)(WW,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});TG.displayName=wG;var EG=ZW,DG=$W,OG=tG,kG=rG,AG=lG,jG=`Popover`,[MG,NG]=mI(jG,[CH]),PG=CH(),[FG,IG]=MG(jG),LG=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=PG(t),c=N.useRef(null),[l,u]=N.useState(!1),[d,f]=xI({prop:r,defaultProp:i??!1,onChange:a,caller:jG});return(0,R.jsx)(zH,{...s,children:(0,R.jsx)(FG,{scope:t,contentId:yI(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:N.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:N.useCallback(()=>u(!0),[]),onCustomAnchorRemove:N.useCallback(()=>u(!1),[]),modal:o,children:n})})};LG.displayName=jG;var RG=`PopoverAnchor`,zG=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=IG(RG,n),a=PG(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return N.useEffect(()=>(o(),()=>s()),[o,s]),(0,R.jsx)(BH,{...a,...r,ref:t})});zG.displayName=RG;var BG=`PopoverTrigger`,VG=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=IG(BG,n),a=PG(n),o=pI(t,i.triggerRef),s=(0,R.jsx)(LI.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":nK(i.open),...r,ref:o,onClick:J(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,R.jsx)(BH,{asChild:!0,...a,children:s})});VG.displayName=BG;var HG=`PopoverPortal`,[UG,WG]=MG(HG,{forceMount:void 0}),GG=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=IG(HG,t);return(0,R.jsx)(UG,{scope:t,forceMount:n,children:(0,R.jsx)(bL,{present:n||a.open,children:(0,R.jsx)(vL,{asChild:!0,container:i,children:r})})})};GG.displayName=HG;var KG=`PopoverContent`,qG=N.forwardRef((e,t)=>{let n=WG(KG,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=IG(KG,e.__scopePopover);return(0,R.jsx)(bL,{present:r||a.open,children:a.modal?(0,R.jsx)(YG,{...i,ref:t}):(0,R.jsx)(XG,{...i,ref:t})})});qG.displayName=KG;var JG=wI(`PopoverContent.RemoveScroll`),YG=N.forwardRef((e,t)=>{let n=IG(KG,e.__scopePopover),r=N.useRef(null),i=pI(t,r),a=N.useRef(!1);return N.useEffect(()=>{let e=r.current;if(e)return qR(e)},[]),(0,R.jsx)(RR,{as:JG,allowPinchZoom:!0,children:(0,R.jsx)(ZG,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:J(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:J(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:J(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),XG=N.forwardRef((e,t)=>{let n=IG(KG,e.__scopePopover),r=N.useRef(!1),i=N.useRef(!1);return(0,R.jsx)(ZG,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),ZG=N.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=IG(KG,n),p=PG(n);return OL(),(0,R.jsx)(aL,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,R.jsx)(qI,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,R.jsx)(VH,{"data-state":nK(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),QG=`PopoverClose`,$G=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=IG(QG,n);return(0,R.jsx)(LI.button,{type:`button`,...r,ref:t,onClick:J(e.onClick,()=>i.onOpenChange(!1))})});$G.displayName=QG;var eK=`PopoverArrow`,tK=N.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=PG(n);return(0,R.jsx)(HH,{...i,...r,ref:t})});tK.displayName=eK;function nK(e){return e?`open`:`closed`}var rK=LG,iK=VG,aK=GG,oK=qG;function sK(e,[t,n]){return Math.min(n,Math.max(t,e))}function cK(e){let t=N.useRef({value:e,previous:e});return N.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var lK=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),uK=`VisuallyHidden`,dK=N.forwardRef((e,t)=>(0,R.jsx)(LI.span,{...e,ref:t,style:{...lK,...e.style}}));dK.displayName=uK;var fK=[` `,`Enter`,`ArrowUp`,`ArrowDown`],pK=[` `,`Enter`],mK=`Select`,[hK,gK,_K]=nB(mK),[vK,yK]=mI(mK,[_K,CH]),bK=CH(),[xK,SK]=vK(mK),[CK,wK]=vK(mK),TK=`SelectProvider`;function EK(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=bK(t),[_,v]=N.useState(null),[y,b]=N.useState(null),[x,S]=N.useState(!1),C=iB(l),[w,T]=xI({prop:r,defaultProp:i??!1,onChange:a,caller:mK}),[E,D]=xI({prop:o,defaultProp:s,onChange:c,caller:mK}),O=N.useRef(null),k=_?!!m||!!_.closest(`form`):!0,[A,j]=N.useState(new Set),M=yI(),ee=Array.from(A).map(e=>e.props.value).join(`;`),P=N.useCallback(e=>{j(t=>new Set(t).add(e))},[]),F=N.useCallback(e=>{j(t=>{let n=new Set(t);return n.delete(e),n})},[]),I={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:M,value:E,onValueChange:D,open:w,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:A,nativeSelectKey:ee,isFormControl:k};return(0,R.jsx)(zH,{...g,children:(0,R.jsx)(xK,{scope:t,...I,children:(0,R.jsx)(hK.Provider,{scope:t,children:(0,R.jsx)(CK,{scope:t,onNativeOptionAdd:P,onNativeOptionRemove:F,children:Eq(h)?h(I):n})})})})}EK.displayName=TK;var DK=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,R.jsx)(EK,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,R.jsxs)(R.Fragment,{children:[n,e?(0,R.jsx)(Tq,{__scopeSelect:t}):null]})})};DK.displayName=mK;var OK=`SelectTrigger`,kK=N.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=bK(n),o=SK(OK,n),s=o.disabled||r,c=pI(t,o.onTriggerChange),l=gK(n),u=N.useRef(`touch`),[d,f,p]=Oq(e=>{let t=l().filter(e=>!e.disabled),n=kq(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,R.jsx)(BH,{asChild:!0,...a,children:(0,R.jsx)(LI.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Dq(o.value)?``:void 0,...i,ref:c,onClick:J(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:J(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:J(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&fK.includes(e.key)&&(m(),e.preventDefault())})})})});kK.displayName=OK;var AK=`SelectValue`,jK=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=SK(AK,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=pI(t,c.onValueNodeChange);gI(()=>{l(u)},[l,u]);let f=Dq(c.value);return(0,R.jsx)(LI.span,{...s,asChild:f?!1:s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,R.jsx)(N.Fragment,{children:f?o:a},f?`placeholder`:`value`)})});jK.displayName=AK;var MK=`SelectIcon`,NK=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,R.jsx)(LI.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});NK.displayName=MK;var PK=`SelectPortal`,[FK,IK]=vK(PK,{forceMount:void 0}),LK=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,R.jsx)(FK,{scope:e.__scopeSelect,forceMount:n,children:(0,R.jsx)(vL,{asChild:!0,...r})})};LK.displayName=PK;var RK=`SelectContent`,zK=N.forwardRef((e,t)=>{let n=IK(RK,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=SK(RK,e.__scopeSelect),[o,s]=N.useState();return gI(()=>{s(new DocumentFragment)},[]),(0,R.jsx)(bL,{present:r||a.open,children:({present:e})=>e?(0,R.jsx)(KK,{...i,ref:t}):(0,R.jsx)(BK,{...i,fragment:o})})});zK.displayName=RK;var BK=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?$i.createPortal((0,R.jsx)(HK,{scope:n,children:(0,R.jsx)(hK.Slot,{scope:n,children:(0,R.jsx)(`div`,{ref:t,children:r})})}),i):null});BK.displayName=`SelectContentFragment`;var VK=10,[HK,UK]=vK(RK),WK=`SelectContentImpl`,GK=wI(`SelectContent.RemoveScroll`),KK=N.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=SK(RK,n),[y,b]=N.useState(null),[x,S]=N.useState(null),C=pI(t,e=>b(e)),[w,T]=N.useState(null),[E,D]=N.useState(null),O=gK(n),[k,A]=N.useState(!1),j=N.useRef(!1);N.useEffect(()=>{if(y)return qR(y)},[y]),OL();let M=N.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),ee=N.useCallback(()=>M([w,y]),[M,w,y]);N.useEffect(()=>{k&&ee()},[k,ee]);let{onOpenChange:P,triggerPointerDownPosRef:F}=v;N.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||P(!1),document.removeEventListener(`pointermove`,t),F.current=null};return F.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,P,F]),N.useEffect(()=>{let e=()=>P(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[P]);let[I,te]=Oq(e=>{let t=O().filter(e=>!e.disabled),n=kq(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ne=N.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(j.current=!0))},[v.value]),re=N.useCallback(()=>y?.focus(),[y]),ie=N.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),L=r===`popper`?XK:JK,ae=L===XK?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,R.jsx)(HK,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ne,selectedItem:w,onItemLeave:re,itemTextRefCallback:ie,focusSelectedItem:ee,selectedItemText:E,position:r,isPositioned:k,searchRef:I,children:(0,R.jsx)(RR,{as:GK,allowPinchZoom:!0,children:(0,R.jsx)(aL,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:J(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,R.jsx)(qI,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,R.jsx)(L,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...ae,onPlaced:()=>A(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:J(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&te(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>M(t)),e.preventDefault()}})})})})})})});KK.displayName=WK;var qK=`SelectItemAlignedPosition`,JK=N.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=SK(RK,n),o=UK(RK,n),[s,c]=N.useState(null),[l,u]=N.useState(null),d=pI(t,e=>u(e)),f=gK(n),p=N.useRef(!1),m=N.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=N.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-VK,d=sK(a,[VK,Math.max(VK,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-VK,d=sK(a,[VK,Math.max(VK,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-VK*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-VK,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${VK}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);gI(()=>y(),[y]);let[b,x]=N.useState();return gI(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,R.jsx)(ZK,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:N.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,R.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,R.jsx)(LI.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});JK.displayName=qK;var YK=`SelectPopperPosition`,XK=N.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=VK,...a}=e,o=bK(n);return(0,R.jsx)(VH,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});XK.displayName=YK;var[ZK,QK]=vK(RK,{}),$K=`SelectViewport`,eq=N.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=UK($K,n),o=QK($K,n),s=pI(t,a.onViewportChange),c=N.useRef(0);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,R.jsx)(hK.Slot,{scope:n,children:(0,R.jsx)(LI.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:J(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-VK*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});eq.displayName=$K;var tq=`SelectGroup`,[nq,rq]=vK(tq),iq=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=yI();return(0,R.jsx)(nq,{scope:n,id:i,children:(0,R.jsx)(LI.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});iq.displayName=tq;var aq=`SelectLabel`,oq=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=rq(aq,n);return(0,R.jsx)(LI.div,{id:i.id,...r,ref:t})});oq.displayName=aq;var sq=`SelectItem`,[cq,lq]=vK(sq),uq=N.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=SK(sq,n),c=UK(sq,n),l=s.value===r,[u,d]=N.useState(a??``),[f,p]=N.useState(!1),m=pI(t,e=>c.itemRefCallback?.(e,r,i)),h=yI(),g=N.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};return(0,R.jsx)(cq,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:N.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,R.jsx)(hK.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,R.jsx)(LI.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:J(o.onFocus,()=>p(!0)),onBlur:J(o.onBlur,()=>p(!1)),onClick:J(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:J(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:J(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:J(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:J(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:J(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(pK.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});uq.displayName=sq;var dq=`SelectItemText`,fq=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=SK(dq,n),s=UK(dq,n),c=lq(dq,n),l=wK(dq,n),[u,d]=N.useState(null),f=pI(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=N.useMemo(()=>(0,R.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return gI(()=>(h(m),()=>g(m)),[h,g,m]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(LI.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!Dq(o.value)?$i.createPortal(a.children,o.valueNode):null]})});fq.displayName=dq;var pq=`SelectItemIndicator`,mq=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return lq(pq,n).isSelected?(0,R.jsx)(LI.span,{"aria-hidden":!0,...r,ref:t}):null});mq.displayName=pq;var hq=`SelectScrollUpButton`,gq=N.forwardRef((e,t)=>{let n=UK(hq,e.__scopeSelect),r=QK(hq,e.__scopeSelect),[i,a]=N.useState(!1),o=pI(t,r.onScrollButtonChange);return gI(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,R.jsx)(yq,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});gq.displayName=hq;var _q=`SelectScrollDownButton`,vq=N.forwardRef((e,t)=>{let n=UK(_q,e.__scopeSelect),r=QK(_q,e.__scopeSelect),[i,a]=N.useState(!1),o=pI(t,r.onScrollButtonChange);return gI(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,R.jsx)(yq,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});vq.displayName=_q;var yq=N.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=UK(`SelectScrollButton`,n),o=N.useRef(null),s=gK(n),c=N.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return N.useEffect(()=>()=>c(),[c]),gI(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,R.jsx)(LI.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:J(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:J(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:J(i.onPointerLeave,()=>{c()})})}),bq=`SelectSeparator`,xq=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,R.jsx)(LI.div,{"aria-hidden":!0,...r,ref:t})});xq.displayName=bq;var Sq=`SelectArrow`,Cq=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=bK(n);return UK(Sq,n).position===`popper`?(0,R.jsx)(HH,{...i,...r,ref:t}):null});Cq.displayName=Sq;var wq=`SelectBubbleInput`,Tq=N.forwardRef(({__scopeSelect:e,...t},n)=>{let r=SK(wq,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=N.useRef(null),m=pI(n,p),h=i??``,g=cK(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return N.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,R.jsxs)(LI.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...lK,...t.style},ref:m,defaultValue:h,children:[Dq(i)&&!_?(0,R.jsx)(`option`,{value:``}):null,Array.from(d)]},f)});Tq.displayName=wq;function Eq(e){return typeof e==`function`}function Dq(e){return e===``||e===void 0}function Oq(e){let t=zI(e),n=N.useRef(``),r=N.useRef(0),i=N.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=N.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function kq(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Aq(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Aq(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var jq=`Separator`,Mq=`horizontal`,Nq=[`horizontal`,`vertical`],Pq=N.forwardRef((e,t)=>{let{decorative:n,orientation:r=Mq,...i}=e,a=Fq(r)?r:Mq,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,R.jsx)(LI.div,{"data-orientation":a,...o,...i,ref:t})});Pq.displayName=jq;function Fq(e){return Nq.includes(e)}var Iq=Pq,Lq=`Toggle`,Rq=N.forwardRef((e,t)=>{let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=xI({prop:n,onChange:i,defaultProp:r??!1,caller:Lq});return(0,R.jsx)(LI.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:J(e.onClick,()=>{e.disabled||s(!o)})})});Rq.displayName=Lq;var zq=`ToggleGroup`,[Bq,Vq]=mI(zq,[XH]),Hq=XH(),Uq=N.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`)return(0,R.jsx)(Kq,{role:`radiogroup`,...r,ref:t});if(n===`multiple`)return(0,R.jsx)(qq,{role:`toolbar`,...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${zq}\``)});Uq.displayName=zq;var[Wq,Gq]=Bq(zq),Kq=N.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=xI({prop:n,defaultProp:r??``,onChange:i,caller:zq});return(0,R.jsx)(Wq,{scope:e.__scopeToggleGroup,type:`single`,value:N.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:N.useCallback(()=>s(``),[s]),children:(0,R.jsx)(Xq,{...a,ref:t})})}),qq=N.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=xI({prop:n,defaultProp:r??[],onChange:i,caller:zq}),c=N.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=N.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,R.jsx)(Wq,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:c,onItemDeactivate:l,children:(0,R.jsx)(Xq,{...a,ref:t})})});Uq.displayName=zq;var[Jq,Yq]=Bq(zq),Xq=N.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=Hq(n),u=iB(o),d={dir:u,...c};return(0,R.jsx)(Jq,{scope:n,rovingFocus:i,disabled:r,children:i?(0,R.jsx)(cU,{asChild:!0,...l,orientation:a,dir:u,loop:s,children:(0,R.jsx)(LI.div,{...d,ref:t})}):(0,R.jsx)(LI.div,{...d,ref:t})})}),Zq=`ToggleGroupItem`,Qq=N.forwardRef((e,t)=>{let n=Gq(Zq,e.__scopeToggleGroup),r=Yq(Zq,e.__scopeToggleGroup),i=Hq(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=N.useRef(null);return r.rovingFocus?(0,R.jsx)(lU,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:(0,R.jsx)($q,{...s,ref:t})}):(0,R.jsx)($q,{...s,ref:t})});Qq.displayName=Zq;var $q=N.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=Gq(Zq,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,R.jsx)(Rq,{...a.type===`single`?o:void 0,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})});function eJ(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=eJ(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function tJ(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=eJ(e))&&(r&&(r+=` `),r+=t);return r}var nJ=(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},rJ=(e,t)=>({classGroupId:e,validator:t}),iJ=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),aJ=`-`,oJ=[],sJ=`arbitrary..`,cJ=e=>{let t=dJ(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return uJ(e);let n=e.split(aJ);return lJ(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?nJ(i,t):t:i||oJ}return n[e]||oJ}}},lJ=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=lJ(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(aJ):e.slice(t).join(aJ),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},uJ=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?sJ+r:void 0})(),dJ=e=>{let{theme:t,classGroups:n}=e;return fJ(n,t)},fJ=(e,t)=>{let n=iJ();for(let r in e){let i=e[r];pJ(i,n,r,t)}return n},pJ=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];mJ(i,t,n,r)}},mJ=(e,t,n,r)=>{if(typeof e==`string`){hJ(e,t,n);return}if(typeof e==`function`){gJ(e,t,n,r);return}_J(e,t,n,r)},hJ=(e,t,n)=>{let r=e===``?t:vJ(t,e);r.classGroupId=n},gJ=(e,t,n,r)=>{if(yJ(e)){pJ(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(rJ(n,e))},_J=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];pJ(o,vJ(t,a),n,r)}},vJ=(e,t)=>{let n=e,r=t.split(aJ),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=iJ(),n.nextPart.set(t,i)),n=i}return n},yJ=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,bJ=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)}}},xJ=`!`,SJ=`:`,CJ=[],wJ=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),TJ=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===SJ){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(xJ)?(c=s.slice(0,-1),l=!0):s.startsWith(xJ)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return wJ(t,l,c,u)};if(t){let e=t+SJ,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):wJ(CJ,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},EJ=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}},DJ=e=>({cache:bJ(e.cacheSize),parseClassName:TJ(e),sortModifiers:EJ(e),postfixLookupClassGroupIds:OJ(e),...cJ(e)}),OJ=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},kJ=/\s+/,AJ=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(kJ),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+xJ:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},jJ=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=MJ(n))&&(i&&(i+=` `),i+=r);return i},MJ=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=MJ(e[r]))&&(n&&(n+=` `),n+=t);return n},NJ=(e,...t)=>{let n,r,i,a,o=o=>(n=DJ(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=AJ(e,n);return i(e,a),a};return a=o,(...e)=>a(jJ(...e))},PJ=[],FJ=e=>{let t=t=>t[e]||PJ;return t.isThemeGetter=!0,t},IJ=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,LJ=/^\((?:(\w[\w-]*):)?(.+)\)$/i,RJ=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,zJ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BJ=/\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$/,VJ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,HJ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,UJ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,WJ=e=>RJ.test(e),GJ=e=>!!e&&!Number.isNaN(Number(e)),KJ=e=>!!e&&Number.isInteger(Number(e)),qJ=e=>e.endsWith(`%`)&&GJ(e.slice(0,-1)),JJ=e=>zJ.test(e),YJ=()=>!0,XJ=e=>BJ.test(e)&&!VJ.test(e),ZJ=()=>!1,QJ=e=>HJ.test(e),$J=e=>UJ.test(e),eY=e=>!Y(e)&&!X(e),tY=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),nY=e=>_Y(e,xY,ZJ),Y=e=>IJ.test(e),rY=e=>_Y(e,SY,XJ),iY=e=>_Y(e,CY,GJ),aY=e=>_Y(e,TY,YJ),oY=e=>_Y(e,wY,ZJ),sY=e=>_Y(e,yY,ZJ),cY=e=>_Y(e,bY,$J),lY=e=>_Y(e,EY,QJ),X=e=>LJ.test(e),uY=e=>vY(e,SY),dY=e=>vY(e,wY),fY=e=>vY(e,yY),pY=e=>vY(e,xY),mY=e=>vY(e,bY),hY=e=>vY(e,EY,!0),gY=e=>vY(e,TY,!0),_Y=(e,t,n)=>{let r=IJ.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},vY=(e,t,n=!1)=>{let r=LJ.exec(e);return r?r[1]?t(r[1]):n:!1},yY=e=>e===`position`||e===`percentage`,bY=e=>e===`image`||e===`url`,xY=e=>e===`length`||e===`size`||e===`bg-size`,SY=e=>e===`length`,CY=e=>e===`number`,wY=e=>e===`family-name`,TY=e=>e===`number`||e===`weight`,EY=e=>e===`shadow`,DY=NJ(()=>{let e=FJ(`color`),t=FJ(`font`),n=FJ(`text`),r=FJ(`font-weight`),i=FJ(`tracking`),a=FJ(`leading`),o=FJ(`breakpoint`),s=FJ(`container`),c=FJ(`spacing`),l=FJ(`radius`),u=FJ(`shadow`),d=FJ(`inset-shadow`),f=FJ(`text-shadow`),p=FJ(`drop-shadow`),m=FJ(`blur`),h=FJ(`perspective`),g=FJ(`aspect`),_=FJ(`ease`),v=FJ(`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(),X,Y],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[X,Y,c],T=()=>[WJ,`full`,`auto`,...w()],E=()=>[KJ,`none`,`subgrid`,X,Y],D=()=>[`auto`,{span:[`full`,KJ,X,Y]},KJ,X,Y],O=()=>[KJ,`auto`,X,Y],k=()=>[`auto`,`min`,`max`,`fr`,X,Y],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[WJ,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[WJ,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],P=()=>[WJ,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,X,Y],I=()=>[...b(),fY,sY,{position:[X,Y]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,pY,nY,{size:[X,Y]}],re=()=>[qJ,uY,rY],ie=()=>[``,`none`,`full`,l,X,Y],L=()=>[``,GJ,uY,rY],ae=()=>[`solid`,`dashed`,`dotted`,`double`],oe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],se=()=>[GJ,qJ,fY,sY],ce=()=>[``,`none`,m,X,Y],le=()=>[`none`,GJ,X,Y],ue=()=>[`none`,GJ,X,Y],de=()=>[GJ,X,Y],fe=()=>[WJ,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[JJ],breakpoint:[JJ],color:[YJ],container:[JJ],"drop-shadow":[JJ],ease:[`in`,`out`,`in-out`],font:[eY],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[JJ],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[JJ],shadow:[JJ],spacing:[`px`,GJ],text:[JJ],"text-shadow":[JJ],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,WJ,Y,X,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,X,Y]}],"container-named":[tY],columns:[{columns:[GJ,Y,X,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:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[KJ,`auto`,X,Y]}],basis:[{basis:[WJ,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[GJ,WJ,`auto`,`initial`,`none`,Y]}],grow:[{grow:[``,GJ,X,Y]}],shrink:[{shrink:[``,GJ,X,Y]}],order:[{order:[KJ,`first`,`last`,`none`,X,Y]}],"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()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...P()]}],"min-block-size":[{"min-block":[`auto`,...P()]}],"max-block-size":[{"max-block":[`none`,...P()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,uY,rY]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,gY,aY]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,qJ,Y]}],"font-family":[{font:[dY,oY,t]}],"font-features":[{"font-features":[Y]}],"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,X,Y]}],"line-clamp":[{"line-clamp":[GJ,`none`,X,iY]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,X,Y]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,X,Y]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ae(),`wavy`]}],"text-decoration-thickness":[{decoration:[GJ,`from-font`,`auto`,X,rY]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[GJ,`auto`,X,Y]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[KJ,X,Y]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,X,Y]}],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`,X,Y]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},KJ,X,Y],radial:[``,X,Y],conic:[KJ,X,Y]},mY,cY]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-bs":[{"border-bs":L()}],"border-w-be":[{"border-be":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":L()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ae(),`hidden`,`none`]}],"divide-style":[{divide:[...ae(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...ae(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[GJ,X,Y]}],"outline-w":[{outline:[``,GJ,uY,rY]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,hY,lY]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,hY,lY]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:L()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[GJ,rY]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,hY,lY]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[GJ,X,Y]}],"mix-blend":[{"mix-blend":[...oe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":oe()}],"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":[GJ]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[X,Y]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"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":[GJ]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,X,Y]}],filter:[{filter:[``,`none`,X,Y]}],blur:[{blur:ce()}],brightness:[{brightness:[GJ,X,Y]}],contrast:[{contrast:[GJ,X,Y]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,hY,lY]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,GJ,X,Y]}],"hue-rotate":[{"hue-rotate":[GJ,X,Y]}],invert:[{invert:[``,GJ,X,Y]}],saturate:[{saturate:[GJ,X,Y]}],sepia:[{sepia:[``,GJ,X,Y]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,X,Y]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[GJ,X,Y]}],"backdrop-contrast":[{"backdrop-contrast":[GJ,X,Y]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,GJ,X,Y]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[GJ,X,Y]}],"backdrop-invert":[{"backdrop-invert":[``,GJ,X,Y]}],"backdrop-opacity":[{"backdrop-opacity":[GJ,X,Y]}],"backdrop-saturate":[{"backdrop-saturate":[GJ,X,Y]}],"backdrop-sepia":[{"backdrop-sepia":[``,GJ,X,Y]}],"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`,X,Y]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[GJ,`initial`,X,Y]}],ease:[{ease:[`linear`,`initial`,_,X,Y]}],delay:[{delay:[GJ,X,Y]}],animate:[{animate:[`none`,v,X,Y]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,X,Y]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":[`scale-3d`],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[X,Y,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":[`translate-none`],zoom:[{zoom:[KJ,X,Y]}],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"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`,X,Y]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"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-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":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-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":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`,X,Y]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[GJ,uY,rY,iY]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`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`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`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-bs`,`border-w-be`,`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-bs`,`border-color-be`,`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-mbs`,`scroll-mbe`,`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-pbs`,`scroll-pbe`,`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`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function OY(...e){return DY(tJ(e))}function kY({...e}){return(0,R.jsx)($R,{"data-slot":`dialog`,...e})}function AY({...e}){return(0,R.jsx)(az,{"data-slot":`dialog-portal`,...e})}function jY({className:e,...t}){return(0,R.jsx)(sz,{"data-slot":`dialog-overlay`,className:OY(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,e),...t})}function MY({children:e,className:t,showCloseButton:n=!0,...r}){return(0,R.jsxs)(AY,{"data-slot":`dialog-portal`,children:[(0,R.jsx)(jY,{}),(0,R.jsxs)(dz,{"data-slot":`dialog-content`,className:OY(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg`,t),...r,children:[e,n&&(0,R.jsxs)(bz,{"data-slot":`dialog-close`,className:`ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,R.jsx)(KF,{}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function NY({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`dialog-header`,className:OY(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function PY({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`dialog-footer`,className:OY(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function FY({className:e,...t}){return(0,R.jsx)(gz,{"data-slot":`dialog-title`,className:OY(`text-lg leading-none font-semibold`,e),...t})}function IY({className:e,...t}){return(0,R.jsx)(vz,{"data-slot":`dialog-description`,className:OY(`text-muted-foreground text-sm`,e),...t})}function LY({className:e,...t}){return(0,R.jsx)(Wz,{"data-slot":`command`,className:OY(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})}function RY({children:e,className:t,description:n=`Search for a command to run...`,showCloseButton:r=!0,title:i=`Command Palette`,...a}){return(0,R.jsxs)(kY,{...a,children:[(0,R.jsxs)(NY,{className:`sr-only`,children:[(0,R.jsx)(FY,{children:i}),(0,R.jsx)(IY,{children:n})]}),(0,R.jsx)(MY,{className:OY(`overflow-hidden p-0`,t),showCloseButton:r,children:(0,R.jsx)(LY,{className:`[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5`,children:e})})]})}function zY({className:e,...t}){return(0,R.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[(0,R.jsx)(IF,{className:`size-4 shrink-0 opacity-50`}),(0,R.jsx)(Wz.Input,{"data-slot":`command-input`,className:OY(`placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function BY({className:e,...t}){return(0,R.jsx)(Wz.List,{"data-slot":`command-list`,className:OY(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function VY({...e}){return(0,R.jsx)(Wz.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e})}function HY({className:e,...t}){return(0,R.jsx)(Wz.Group,{"data-slot":`command-group`,className:OY(`text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium`,e),...t})}function UY({className:e,...t}){return(0,R.jsx)(Wz.Separator,{"data-slot":`command-separator`,className:OY(`bg-border -mx-1 h-px`,e),...t})}function WY({className:e,...t}){return(0,R.jsx)(Wz.Item,{"data-slot":`command-item`,className:OY(`data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...t})}var GY={account:`Account`,author:`Author`,approver:`Approver`,commenter:`Commenter`,scope:`Scope`,repo:`Repo`,status:`Status`,size:`Size`};function KY(){let e=GD(JF),t=YD(JF),n=Xn(),r=YD(KN),i=e=>{n(e?`/settings/${e}`:`/settings`),t(!1)};return(0,N.useEffect)(()=>{let e=e=>{e.key===`p`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),t(e=>!e))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]),(0,R.jsxs)(RY,{open:e,onOpenChange:t,showCloseButton:!1,children:[(0,R.jsx)(zY,{placeholder:`Type a command...`}),(0,R.jsxs)(BY,{children:[(0,R.jsx)(VY,{children:`No results found.`}),(0,R.jsxs)(HY,{heading:`Actions`,children:[(0,R.jsxs)(WY,{onSelect:()=>{r({}),t(!1)},children:[(0,R.jsx)(NF,{}),`Refresh PRs`]}),(0,R.jsxs)(WY,{onSelect:()=>{n(`/`),t(!1)},children:[(0,R.jsx)(XP,{}),`View: PR List`]}),(0,R.jsxs)(WY,{onSelect:()=>{n(`/notifications`),t(!1)},children:[(0,R.jsx)(tF,{}),`View: Notifications`]})]}),(0,R.jsx)(UY,{}),(0,R.jsxs)(HY,{heading:`Settings`,children:[(0,R.jsxs)(WY,{onSelect:()=>i(),children:[(0,R.jsx)(RF,{}),`Open Settings`]}),(0,R.jsxs)(WY,{onSelect:()=>i(`accounts`),children:[(0,R.jsx)(RF,{}),`Settings: Accounts`]}),(0,R.jsxs)(WY,{onSelect:()=>i(`theme`),children:[(0,R.jsx)(RF,{}),`Settings: Theme`]}),(0,R.jsxs)(WY,{onSelect:()=>i(`config`),children:[(0,R.jsx)(RF,{}),`Settings: Config`]}),(0,R.jsxs)(WY,{onSelect:()=>i(`about`),children:[(0,R.jsx)(RF,{}),`Settings: About`]})]}),(0,R.jsx)(UY,{}),(0,R.jsxs)(HY,{heading:`Filters`,children:[(0,R.jsxs)(WY,{onSelect:()=>{n(`/?hot=1`),t(!1)},children:[(0,R.jsx)(gF,{}),`Hot`]}),qF.map(e=>(0,R.jsxs)(WY,{onSelect:()=>{n(`/?f=${e}:`),t(!1)},children:[(0,R.jsx)(XP,{}),`Filter: `,GY[e]]},e))]})]})]})}var qY=e=>qF.includes(e),JY=[{key:`status`,value:`open`}],YY=JY.map(e=>`${e.key}:${e.value}`);function XY(e){let t=e.getAll(`f`);if(t.length===0)return JY;let n=[];for(let e of t){let t=e.indexOf(`:`);if(t<1)continue;let r=e.slice(0,t),i=e.slice(t+1);!qY(r)||!i||n.some(e=>e.key===r&&e.value===i)||n.push({key:r,value:i})}return n}function ZY(){let[e,t]=Fi();return{state:(0,N.useMemo)(()=>{let t=e.get(`mineScope`),n=e.get(`from`),r=e.get(`to`);return{filters:XY(e),hot:e.get(`sortBy`)===`updated`,...e.has(`groupBy`)?{groupBy:e.get(`groupBy`)}:{},mine:e.has(`mine`),review:e.has(`review`),...t==null?{}:{mineScope:t},q:e.get(`q`)??``,...n==null?{}:{from:n},...r==null?{}:{to:r}}},[e]),toggleFilter:(0,N.useCallback)((e,n)=>{t(t=>{let r=t.getAll(`f`),i=`${e}:${n}`;if(r.length===0){for(let e of YY)t.append(`f`,e);r=t.getAll(`f`)}let a=r.includes(i);t.delete(`f`);for(let e of r)e===i||e===``||t.append(`f`,e);return a||t.append(`f`,i),t.getAll(`f`).length===0&&a&&t.append(`f`,``),t},{replace:!0})},[t]),removeFilterKey:(0,N.useCallback)(e=>{t(t=>{let n=t.getAll(`f`);if(n.length===0){for(let e of YY)t.append(`f`,e);n=t.getAll(`f`)}t.delete(`f`);for(let r of n)r===``||r.slice(0,r.indexOf(`:`))===e||t.append(`f`,r);return t.getAll(`f`).length===0&&t.append(`f`,``),t},{replace:!0})},[t]),toggleHot:(0,N.useCallback)(()=>{t(e=>(e.get(`sortBy`)===`updated`?e.delete(`sortBy`):e.set(`sortBy`,`updated`),e),{replace:!0})},[t]),toggleReview:(0,N.useCallback)(()=>{t(e=>(e.has(`review`)?e.delete(`review`):e.set(`review`,`1`),e),{replace:!0})},[t]),toggleMine:(0,N.useCallback)(()=>{t(e=>(e.has(`mine`)?(e.delete(`mine`),e.delete(`mineScope`)):e.set(`mine`,`1`),e),{replace:!0})},[t]),setMineScope:(0,N.useCallback)(e=>{t(t=>(e?t.set(`mineScope`,e):t.delete(`mineScope`),t),{replace:!0})},[t]),setFilterText:(0,N.useCallback)(e=>{t(t=>(e?t.set(`q`,e):t.delete(`q`),t),{replace:!0})},[t]),clearAll:(0,N.useCallback)(()=>{t(e=>(e.delete(`f`),e.delete(`sortBy`),e.delete(`groupBy`),e.delete(`mine`),e.delete(`review`),e.delete(`mineScope`),e.delete(`q`),e.delete(`from`),e.delete(`to`),e),{replace:!0})},[t])}}var QY=e=>{let t=e.match(/^\w+\(([^)]+)\):/);if(t?.[1])return t[1];let n=e.match(/^([A-Z]+-\d+):/);return n?.[1]?n[1]:null},$Y=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,eX=tJ,tX=(e,t)=>n=>{if(t?.variants==null)return eX(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=$Y(t)||$Y(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return eX(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},nX=tX(`inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function rX({asChild:e=!1,className:t,variant:n=`default`,...r}){return(0,R.jsx)(e?TI:`span`,{"data-slot":`badge`,"data-variant":n,className:OY(nX({variant:n}),t),...r})}var iX=tX(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function Z({asChild:e=!1,className:t,size:n=`default`,variant:r=`default`,...i}){return(0,R.jsx)(e?TI:`button`,{"data-slot":`button`,"data-variant":r,"data-size":n,className:OY(iX({variant:r,size:n,className:t})),...i})}function aX({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`button-group`,className:OY(`inline-flex items-stretch rounded-md border overflow-hidden [&>*]:rounded-none [&>*]:border-0 [&>*]:shadow-none [&>*:not(:last-child)]:border-r`,e),...t})}function oX({...e}){return(0,R.jsx)(rK,{"data-slot":`popover`,...e})}function sX({...e}){return(0,R.jsx)(iK,{"data-slot":`popover-trigger`,...e})}function cX({align:e=`start`,className:t,sideOffset:n=4,...r}){return(0,R.jsx)(aK,{children:(0,R.jsx)(oK,{"data-slot":`popover-content`,align:e,sideOffset:n,className:OY(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-[200px] origin-(--radix-popover-content-transform-origin) overflow-hidden rounded-md border p-0 shadow-md outline-hidden`,t),...r})})}var lX={account:`Account`,author:`Author`,approver:`Approver`,commenter:`Commenter`,scope:`Scope`,repo:`Repo`,status:`Status`,size:`Size`},uX=[`status`,`author`,`repo`,`scope`,`account`,`approver`,`commenter`,`size`];function dX(e,t){let n=new Set,r=new Set,i=new Set,a=new Set,o=new Set,s=new Set;for(let t of e){n.add(t.author),r.add(t.account?.profile??`unknown`),a.add(t.repositoryName);let e=QY(t.title);if(e&&i.add(e),t.commentedBy)for(let e of t.commentedBy)e&&o.add(e);if(t.approvedBy)for(let e of t.approvedBy)e&&s.add(e)}return{account:Array.from(r).sort(),author:Array.from(n).sort(),approver:Array.from(s).sort(),commenter:Array.from(o).sort(),scope:Array.from(i).sort(),repo:Array.from(a).sort(),status:[`open`,`approved`,`pending`,`mergeable`,`conflicts`,`merged`,`closed`],size:[`small`,`medium`,`large`,`xlarge`]}}function fX(e,t){switch(t.key){case`account`:return(e.account?.profile??`unknown`)===t.value;case`author`:return e.author===t.value;case`scope`:return QY(e.title)===t.value;case`repo`:return e.repositoryName===t.value;case`approver`:return e.approvedBy?.some(e=>e===t.value)??!1;case`commenter`:return e.commentedBy?.some(e=>e===t.value)??!1;case`size`:{let n=e.filesChanged;if(n==null)return!1;switch(t.value){case`small`:return n<5;case`medium`:return n>=5&&n<=15;case`large`:return n>=16&&n<=30;case`xlarge`:return n>30;default:return!0}}case`status`:switch(t.value){case`approved`:return e.status===`OPEN`&&e.isApproved;case`pending`:return e.status===`OPEN`&&!e.isApproved;case`mergeable`:return e.status===`OPEN`&&e.isMergeable;case`conflicts`:return e.status===`OPEN`&&!e.isMergeable;case`merged`:return e.status===`MERGED`;case`closed`:return e.status===`CLOSED`;case`open`:return e.status===`OPEN`;default:return!0}default:return!0}}var pX=[`approved`,`pending`,`mergeable`,`conflicts`],mX={open:`lifecycle`,merged:`lifecycle`,closed:`lifecycle`,approved:`approval`,pending:`approval`,mergeable:`merge`,conflicts:`merge`};function hX({filterKey:e,groups:t,label:n,onToggle:r,options:i,selected:a}){let[o,s]=(0,N.useState)(!1),c=a.length,l=(0,N.useMemo)(()=>t?new Set(Object.values(t).flat()):new Set,[t]),u=(0,N.useMemo)(()=>{if(!t)return new Map;let e=new Map;for(let[n,r]of Object.entries(t))for(let t of r)e.set(t,n);return e},[t]);return(0,R.jsxs)(oX,{open:o,onOpenChange:s,children:[(0,R.jsx)(sX,{asChild:!0,children:(0,R.jsxs)(`button`,{type:`button`,className:`flex w-full items-center justify-between rounded-md px-2 py-2.5 text-sm hover:bg-accent transition-colors`,children:[(0,R.jsxs)(`span`,{className:`flex items-center gap-2`,children:[n,c>0&&(0,R.jsx)(rX,{variant:`default`,className:`h-4 min-w-[16px] px-1 text-[10px] rounded-full`,children:c})]}),(0,R.jsx)(aF,{className:`size-3.5 opacity-40`})]})}),(0,R.jsx)(cX,{className:`w-[220px] p-0`,side:`right`,align:`start`,children:(0,R.jsxs)(LY,{children:[(0,R.jsx)(zY,{placeholder:`Search ${n.toLowerCase()}...`}),(0,R.jsxs)(BY,{children:[(0,R.jsx)(VY,{children:`No results.`}),(0,R.jsx)(HY,{children:i.map((n,o)=>{let s=t!=null&&n in t,c=l.has(n),d=u.get(n),f=s?t[n].every(e=>a.includes(e))||a.includes(n):a.includes(n)||d!=null&&a.includes(d),p=o>0?i[o-1]:void 0;return(0,R.jsxs)(`div`,{children:[!c&&!s&&p!=null&&l.has(p)&&(0,R.jsx)(`div`,{className:`my-1 h-px bg-border`}),(0,R.jsxs)(WY,{onSelect:()=>r(e,n),className:c?`pl-8`:``,children:[(0,R.jsx)(`div`,{className:`mr-2 flex size-4 shrink-0 items-center justify-center rounded-sm border ${f?`bg-primary border-primary text-primary-foreground`:`opacity-50`}`,children:f&&(0,R.jsx)(iF,{className:`size-3`})}),(0,R.jsx)(`span`,{className:`truncate ${s?`font-medium`:``}`,children:n})]})]},n)})})]})]})})]})}function gX(){let e=GD(TP),{clearAll:t,state:n,toggleFilter:r}=ZY(),[,i]=Fi(),a=e.pullRequests,o=e.currentUser;(0,N.useEffect)(()=>{i(e=>{let t=e.getAll(`f`).some(e=>e.startsWith(`author:`));return!e.has(`sortBy`)&&!e.has(`groupBy`)&&!e.has(`review`)&&!t&&e.set(`sortBy`,`updated`),e},{replace:!0})},[]);let s=(0,N.useMemo)(()=>{let e=new Map;for(let t of n.filters){let n=e.get(t.key);n?n.push(t.value):e.set(t.key,[t.value])}return e},[n.filters]),c=(0,N.useCallback)((e,t)=>{e===`status`&&t===`open`?i(e=>{let t=e.getAll(`f`);if(t.length===0&&(e.append(`f`,`status:open`),t=e.getAll(`f`)),t.includes(`status:open`)){e.delete(`f`);for(let n of t)n===`status:open`||n===``||e.append(`f`,n);return e.getAll(`f`).length===0&&e.append(`f`,``),e}let n=pX.map(e=>`status:${e}`),r=new Set([`status:merged`,`status:closed`]),i=n.every(e=>t.includes(e));e.delete(`f`);for(let i of t)n.includes(i)||r.has(i)||e.append(`f`,i);if(!i)for(let t of n)e.append(`f`,t);return e.getAll(`f`).length===0&&e.append(`f`,``),e},{replace:!0}):e===`status`&&pX.includes(t)&&s.get(`status`)?.includes(`open`)?i(e=>{let n=e.getAll(`f`);n.length===0&&(e.append(`f`,`status:open`),n=e.getAll(`f`)),e.delete(`f`);for(let t of n)t===`status:open`||t===``||e.append(`f`,t);for(let n of pX)n!==t&&e.append(`f`,`status:${n}`);return e},{replace:!0}):r(e,t)},[r,i,s]),l=(0,N.useMemo)(()=>{let e=new Map;for(let t of n.filters){let n=t.key===`status`?`status:${mX[t.value]??t.value}`:t.key,r=e.get(n);r?r.push(t):e.set(n,[t])}let t={};for(let n of uX){let r=[...e.entries()].filter(([e])=>e!==n&&!e.startsWith(`${n}:`)),i=a;r.length>0&&(i=a.filter(e=>r.every(([,t])=>t.some(t=>fX(e,t))))),t[n]=dX(i,o)[n]??[]}return t},[a,o,n.filters]),u=!!n.from||!!n.to,d=n.filters.length>0||n.hot||n.review||u,f=o!=null&&(s.get(`author`)?.includes(o)??!1),p=!n.hot&&!n.review&&!f,m=n.hot?`hot`:n.review?`review`:f?`mine`:`all`,h=(0,N.useCallback)(e=>{i(t=>{t.delete(`sortBy`),t.delete(`groupBy`),t.delete(`review`);let n=t.getAll(`f`).filter(e=>o?e!==`author:${o}`:!0);t.delete(`f`);for(let e of n)t.append(`f`,e);switch(e===m?`hot`:e){case`hot`:t.set(`sortBy`,`updated`);break;case`all`:t.set(`groupBy`,`account`);break;case`mine`:t.set(`groupBy`,`account`),o&&t.append(`f`,`author:${o}`);break;case`review`:t.set(`review`,`1`);break}return!t.getAll(`f`).some(e=>e.startsWith(`status:`))&&t.getAll(`f`).length>0&&t.append(`f`,`status:open`),t},{replace:!0})},[i,o,m]);return(0,R.jsxs)(`aside`,{className:`sticky top-20 flex w-56 shrink-0 flex-col gap-1 self-start overflow-y-auto pb-8`,style:{maxHeight:`calc(100vh - 5rem)`},children:[(0,R.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,R.jsxs)(Z,{variant:n.hot?`default`:`ghost`,size:`sm`,className:`justify-start gap-2.5 h-9`,onClick:()=>h(`hot`),children:[(0,R.jsx)(gF,{className:`size-3.5`}),`Hot`]}),(0,R.jsxs)(Z,{variant:p?`default`:`ghost`,size:`sm`,className:`justify-start gap-2.5 h-9`,onClick:()=>h(`all`),children:[(0,R.jsx)(xF,{className:`size-3.5`}),`All`]}),o&&(0,R.jsxs)(Z,{variant:f?`default`:`ghost`,size:`sm`,className:`justify-start gap-2.5 h-9`,onClick:()=>h(`mine`),children:[(0,R.jsx)(GF,{className:`size-3.5`}),`Mine`]}),o&&(0,R.jsxs)(Z,{variant:n.review?`default`:`ghost`,size:`sm`,className:`justify-start gap-2.5 h-9`,onClick:()=>h(`review`),children:[(0,R.jsx)(mF,{className:`size-3.5`}),`Review`]})]}),(0,R.jsxs)(`div`,{className:`mt-6 flex items-center justify-between`,children:[(0,R.jsx)(`span`,{className:`text-xs font-semibold text-muted-foreground`,children:`Filters`}),d&&(0,R.jsxs)(`button`,{type:`button`,className:`flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground transition-colors`,onClick:t,children:[`Clear all`,(0,R.jsx)(KF,{className:`size-2.5`})]})]}),(0,R.jsx)(`div`,{className:`h-px bg-border my-1`}),uX.map(e=>(0,R.jsx)(hX,{filterKey:e,label:lX[e],options:l[e],selected:s.get(e)??[],onToggle:c,...e===`status`?{groups:{open:pX}}:{}},e))]})}var _X=e=>`${e.getDate().toString().padStart(2,`0`)}.${(e.getMonth()+1).toString().padStart(2,`0`)}.${e.getFullYear()}`,vX=(e,t,n=`Updated`)=>kM(Math.max(0,Math.floor((t.getTime()-e.getTime())/1e3))).pipe(AM(e=>e<60,e=>`${n} ${e}s ago`),AM(e=>e<3600,e=>`${n} ${Math.floor(e/60)}m ago`),AM(e=>e<86400,e=>`${n} ${Math.floor(e/3600)}h ago`),jM(()=>`${n} on ${_X(e)}`)),yX=e=>{let t=/^(\d{4})-W(\d{2})$/.exec(e);if(!t)return gc();let n=parseInt(t[1],10),r=parseInt(t[2],10);if(r<1||r>53)return gc();let i=new Date(Date.UTC(n,0,4)),a=i.getUTCDay()||7,o=new Date(i.getTime()+((r-1)*7-(a-1))*864e5);return B({week:e,start:o,end:new Date(o.getTime()+7*864e5)})},bX=e=>{let t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())),n=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-n);let r=new Date(Date.UTC(t.getUTCFullYear(),0,1)),i=Math.ceil(((t.getTime()-r.getTime())/864e5+1)/7);return`${t.getUTCFullYear()}-W${i.toString().padStart(2,`0`)}`},xX=e=>{let t=e.week.split(`-W`),n=e.start.toLocaleString(`en-US`,{month:`short`,timeZone:`UTC`}),r=e.end.toLocaleString(`en-US`,{month:`short`,timeZone:`UTC`}),i=e.start.getUTCDate(),a=e.end.getUTCDate(),o=n===r?`${n} ${i} – ${a}`:`${n} ${i} – ${r} ${a}`;return`W${t[1]} ${t[0]} · ${o}`},SX=e=>{let t=cu(tu(e));return t<1?`${Math.round(t*60)}m`:t<24?`${Math.floor(t)}h`:`${Math.round(t/24*10)/10}d`},CX=/^fetching (comments|diffs) \((\d+)\/(\d+)\)$/,wX=/^(.+?) #(\S+) (.+)$/,TX=/^syncing (W\d+)/;function EX(e){if(e===`loading from cache...`)return{phase:`cache`,label:`Cache`,detail:`loading from cache`};let t=e.match(CX);if(t){let n=t[1]===`comments`?`comments`:`diffs`;return{phase:n,label:n===`comments`?`Comments`:`Diffs`,detail:e,current:Number(t[2]),total:Number(t[3])}}return e===`calculating health scores`?{phase:`health`,label:`Health`,detail:`calculating scores`}:TX.test(e)?{phase:`sync`,label:`Sync`,detail:e}:wX.test(e)||e.includes(`(`)&&e.includes(`)`)?{phase:`fetch`,label:`Fetching`,detail:e}:{phase:`unknown`,label:`Working`,detail:e}}var DX=3;function OX({isLoading:e,statusDetail:t}){let n=(0,N.useRef)(0),[r,i]=(0,N.useState)([]);return(0,N.useEffect)(()=>{if(!e||!t)return;let r=EX(t);i(e=>{let t=e.findIndex(e=>e.id===r.phase),i=++n.current;if(t>=0)return e.map((e,n)=>{if(n!==t)return e;let a=[...e.items,{id:i,text:r.detail}];return a.length>DX&&a.splice(0,a.length-DX),{...e,items:a,current:r.current??e.current,total:r.total??e.total,itemCount:e.itemCount+1}});let a=e.map(e=>({...e,complete:!0,items:[]})),o={id:r.phase,label:r.label,items:[{id:i,text:r.detail}],current:r.current??null,total:r.total??null,complete:!1,itemCount:1};return[...a,o]})},[t,e]),(0,N.useEffect)(()=>{e||(n.current=0,i([]))},[e]),r.length===0?null:(0,R.jsx)(`div`,{className:`flex flex-1 flex-col justify-end gap-0.5 overflow-hidden`,style:{maxHeight:`4.5rem`},children:r.map(e=>(0,R.jsx)(kX,{phase:e},e.id))})}function kX({phase:e}){return e.complete?(0,R.jsxs)(`div`,{className:`rolling-line flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,R.jsx)(iF,{className:`size-3 text-green-500 shrink-0`}),(0,R.jsx)(`span`,{className:`font-medium`,children:e.label}),(0,R.jsx)(`span`,{className:`opacity-50`,children:e.total==null?`${e.itemCount} items`:`${e.total}/${e.total}`})]}):(0,R.jsxs)(`div`,{className:`flex flex-col`,children:[(0,R.jsxs)(`div`,{className:`rolling-line flex items-center gap-2 text-xs`,children:[(0,R.jsx)(`span`,{className:`size-3 shrink-0 flex items-center justify-center`,children:(0,R.jsx)(`span`,{className:`size-1.5 animate-pulse rounded-full bg-blue-500`})}),(0,R.jsx)(`span`,{className:`font-medium text-foreground`,children:e.label}),e.total!=null&&(0,R.jsxs)(`span`,{className:`font-mono text-muted-foreground tabular-nums`,children:[e.current??0,`/`,e.total]})]}),(0,R.jsx)(`div`,{className:`ml-5 flex flex-col overflow-hidden`,style:{maskImage:`linear-gradient(to bottom, transparent 0%, black 40%)`,WebkitMaskImage:`linear-gradient(to bottom, transparent 0%, black 40%)`},children:e.items.map((t,n)=>{let r=e.items.length-1-n,i=r===0?.7:r===1?.35:.15;return(0,R.jsx)(`span`,{className:`rolling-line truncate font-mono text-[11px] leading-relaxed text-muted-foreground`,style:{"--rolling-opacity":i,opacity:i},children:t.text},t.id)})})]})}function AX({...e}){return(0,R.jsx)(EG,{"data-slot":`dropdown-menu`,...e})}function jX({...e}){return(0,R.jsx)(DG,{"data-slot":`dropdown-menu-trigger`,...e})}function MX({align:e=`end`,className:t,sideOffset:n=4,...r}){return(0,R.jsx)(OG,{children:(0,R.jsx)(kG,{"data-slot":`dropdown-menu-content`,align:e,sideOffset:n,className:OY(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md`,t),...r})})}function NX({className:e,...t}){return(0,R.jsx)(AG,{"data-slot":`dropdown-menu-item`,className:OY(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...t})}function PX({className:e,...t}){return(0,R.jsx)(`kbd`,{"data-slot":`kbd`,className:OY(`bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none`,`[&_svg:not([class*='size-'])]:size-3`,e),...t})}function FX(){let e=GD(TP),t=YD(KN),n=YD(eP),r=Xn(),{setTheme:i,theme:a}=Qi(),o=e.status===`loading`,s=e.status===`error`,c=e.unreadNotificationCount??0,l=e.pendingReviewCount??0,u=(e.sandboxes??[]).filter(e=>e.status===`running`||e.status===`creating`||e.status===`cloning`||e.status===`starting`);return(0,R.jsx)(`header`,{className:`sticky top-0 z-40 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60`,children:(0,R.jsxs)(`div`,{className:`flex h-20 items-center gap-4 px-8`,children:[(0,R.jsx)(`button`,{className:`w-56 shrink-0 text-left text-sm font-semibold tracking-tight hover:text-foreground/80`,onClick:()=>r(`/`),children:`codecommit`}),s&&(0,R.jsx)(`span`,{className:`text-sm text-destructive`,children:e.error??`Error loading PRs`}),o&&(0,R.jsx)(OX,{statusDetail:e.statusDetail,isLoading:o}),e.lastUpdated&&!s&&!o&&(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:vX(e.lastUpdated,new Date)}),(0,R.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[e.currentUser&&(0,R.jsxs)(AX,{children:[(0,R.jsx)(jX,{asChild:!0,children:(0,R.jsxs)(`button`,{className:`flex items-center gap-1 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground`,children:[(0,R.jsx)(GF,{className:`size-3`}),e.currentUser]})}),(0,R.jsx)(MX,{children:(0,R.jsxs)(NX,{onClick:()=>n({}),children:[(0,R.jsx)(wF,{className:`size-3`}),`Logout`]})})]}),(0,R.jsxs)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>r(`/stats`),children:[(0,R.jsx)(GP,{className:`size-4`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Statistics`})]}),(0,R.jsxs)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>r(`/audit`),children:[(0,R.jsx)(FF,{className:`size-4`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Audit Log`})]}),(0,R.jsxs)(Z,{variant:`ghost`,size:`icon-sm`,className:`relative`,onClick:()=>r(`/sandboxes`),children:[(0,R.jsx)(nF,{className:`size-4`}),u.length>0&&(0,R.jsx)(`span`,{className:`absolute -right-0.5 -top-0.5 flex size-4 items-center justify-center rounded-full bg-primary text-[10px] font-medium text-primary-foreground`,children:u.length}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Sandboxes`})]}),l>0&&(0,R.jsxs)(Z,{variant:`ghost`,size:`icon-sm`,className:`relative`,onClick:()=>r(`/?review=1`),children:[(0,R.jsx)(mF,{className:`size-4`}),(0,R.jsx)(`span`,{className:`absolute -right-0.5 -top-0.5 flex size-4 items-center justify-center rounded-full bg-yellow-500 text-[10px] font-medium text-white`,children:l>9?`9+`:l}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Needs my review`})]}),(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>t({}),disabled:o,children:(0,R.jsx)(NF,{className:OY(`size-4`,o&&`animate-spin`)})}),(0,R.jsxs)(Z,{variant:`ghost`,size:`icon-sm`,className:`relative`,onClick:()=>r(`/notifications`),children:[(0,R.jsx)(tF,{className:`size-4`}),c>0&&(0,R.jsx)(`span`,{className:`absolute -right-0.5 -top-0.5 flex size-4 items-center justify-center rounded-full bg-destructive text-[10px] font-medium text-destructive-foreground`,children:c>9?`9+`:c}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Notifications`})]}),(0,R.jsxs)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>r(`/settings`),children:[(0,R.jsx)(RF,{className:`size-4`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Settings`})]}),(0,R.jsx)(PX,{children:`⌘P`}),(0,R.jsxs)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>i(a===`dark`?`light`:a===`light`?`system`:`dark`),children:[(0,R.jsx)(HF,{className:`size-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0`}),(0,R.jsx)(kF,{className:`absolute size-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Toggle theme`})]})]})]})})}function IX({prompt:e}){let t=YD(_P),n=n=>t({payload:{id:e.id,response:n}});return(0,R.jsx)(kY,{open:!0,children:(0,R.jsxs)(MY,{showCloseButton:!1,children:[(0,R.jsxs)(NY,{children:[(0,R.jsxs)(FY,{className:`flex items-center gap-2`,children:[(0,R.jsx)(zF,{className:`size-5`}),`API Permission Required`]}),(0,R.jsx)(IY,{children:e.context})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md bg-muted px-3 py-2`,children:[(0,R.jsx)(rX,{variant:e.category===`write`?`destructive`:`secondary`,children:e.category}),(0,R.jsx)(`code`,{className:`text-xs font-mono`,children:e.operation})]}),(0,R.jsxs)(PY,{children:[(0,R.jsx)(Z,{variant:`outline`,onClick:()=>n(`deny`),children:`Deny`}),(0,R.jsx)(Z,{variant:`secondary`,onClick:()=>n(`allow_once`),children:`Allow Once`}),(0,R.jsx)(Z,{onClick:()=>n(`always_allow`),children:`Always Allow`})]})]})})}var LX={new_comment:{icon:DF,className:`text-blue-500`},comment_edited:{icon:DF,className:`text-muted-foreground`},comment_deleted:{icon:DF,className:`text-muted-foreground`},approval_changed:{icon:qP,className:`text-green-500`},approval_requested:{icon:mF,className:`text-yellow-500`},pr_merged:{icon:vF,className:`text-purple-500`},pr_closed:{icon:YP,className:`text-red-500`},pr_reopened:{icon:NF,className:`text-blue-500`},merge_changed:{icon:_F,className:`text-orange-500`}},RX={icon:tF,className:`text-muted-foreground`};function zX(e){return LX[e]??RX}function BX({notifications:e}){let t=e.filter(e=>e.pullRequestId).slice(0,5);if(t.length===0)return null;let n=new Date;return(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card px-4 py-4`,children:[(0,R.jsx)(`h3`,{className:`mb-3 text-xs font-semibold text-muted-foreground`,children:`Recent Activity`}),(0,R.jsx)(`div`,{className:`flex flex-col gap-2.5`,children:t.map(e=>{let{className:t,icon:r}=zX(e.type),i=e.awsAccountId&&e.pullRequestId?`/accounts/${encodeURIComponent(e.awsAccountId)}/prs/${e.pullRequestId}`:null;return i?(0,R.jsxs)(Di,{to:i,className:`flex items-start gap-2.5 rounded-md -mx-1.5 px-1.5 py-1 transition-colors hover:bg-accent no-underline text-inherit`,children:[(0,R.jsx)(`div`,{className:`mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full bg-muted ${t}`,children:(0,R.jsx)(r,{className:`size-3`})}),(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsx)(`p`,{className:`text-xs leading-snug`,children:e.title||e.message}),(0,R.jsxs)(`p`,{className:`text-[11px] text-muted-foreground`,children:[vX(new Date(e.createdAt),n),e.profile&&(0,R.jsxs)(R.Fragment,{children:[`· `,e.profile]})]})]})]},e.id):(0,R.jsxs)(`div`,{className:`flex items-start gap-2.5 px-1.5 py-1`,children:[(0,R.jsx)(`div`,{className:`mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full bg-muted ${t}`,children:(0,R.jsx)(r,{className:`size-3`})}),(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsx)(`p`,{className:`text-xs leading-snug`,children:e.title||e.message}),(0,R.jsxs)(`p`,{className:`text-[11px] text-muted-foreground`,children:[vX(new Date(e.createdAt),n),e.profile&&(0,R.jsxs)(R.Fragment,{children:[`· `,e.profile]})]})]})]},e.id)})}),(0,R.jsx)(`div`,{className:`mt-3 text-center`,children:(0,R.jsx)(Di,{to:`/notifications`,className:`text-xs text-muted-foreground hover:text-foreground transition-colors`,children:`View all activity →`})})]})}var VX={account:`Account`,author:`Author`,approver:`Approver`,commenter:`Commenter`,scope:`Scope`,repo:`Repo`,status:`Status`,size:`Size`};function HX(){let{clearAll:e,setFilterText:t,state:n,toggleFilter:r}=ZY(),i=(0,N.useMemo)(()=>{let e=new Map;for(let t of n.filters){let n=e.get(t.key);n?n.push(t.value):e.set(t.key,[t.value])}return e},[n.filters]),a=!!n.from||!!n.to,o=n.filters.length>0||n.review||n.q||a,s=n.filters.length>0;return(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5 rounded-lg border bg-background px-3 min-h-[44px] focus-within:ring-1 focus-within:ring-ring flex-wrap py-1.5`,children:[(0,R.jsx)(IF,{className:`size-4 shrink-0 text-muted-foreground`}),[...i.entries()].map(([e,t])=>t.map(t=>(0,R.jsxs)(rX,{variant:`secondary`,className:`cursor-pointer gap-1 pl-2 pr-0.5 h-5 text-[10px] shrink-0`,onClick:()=>r(e,t),children:[VX[e],`: `,t,(0,R.jsx)(KF,{className:`size-2.5`})]},`${e}:${t}`))),a&&(0,R.jsxs)(rX,{variant:`outline`,className:`cursor-pointer gap-1 pl-2 pr-0.5 h-5 text-[10px] shrink-0`,children:[n.from,` → `,n.to,(0,R.jsx)(KF,{className:`size-2.5`})]}),(0,R.jsx)(`input`,{placeholder:s||a?`Refine...`:`Search commits...`,className:`flex-1 min-w-[80px] bg-transparent text-sm outline-none placeholder:text-muted-foreground`,value:n.q,onChange:e=>t(e.target.value)}),o&&(0,R.jsx)(`button`,{type:`button`,className:`shrink-0 text-muted-foreground hover:text-foreground transition-colors`,onClick:e,children:(0,R.jsx)(KF,{className:`size-3.5`})})]})}function UX(){let e=YD(TP),t=GD(TP),n=Xn(),r=(0,N.useCallback)(e=>n(e??`/notifications`),[n]),{notify:i}=EP(e=>n(e));FP(t=>e(t),r,i),AP(t.pendingReviewCount??0);let{pathname:a}=Jn(),o=a===`/`,s=n9();return(0,R.jsxs)(`div`,{className:`flex min-h-screen flex-col bg-background`,children:[(0,R.jsx)(FX,{}),o?(0,R.jsxs)(`div`,{className:`flex flex-1 gap-8 px-8 py-8`,children:[(0,R.jsx)(gX,{}),(0,R.jsxs)(`main`,{className:`flex-1 flex flex-col gap-6 min-w-0`,children:[(0,R.jsx)(HX,{}),(0,R.jsx)(jr,{})]}),t.currentUser&&(t.notifications?.items?.length??0)>0&&(0,R.jsx)(`aside`,{className:`sticky top-20 w-64 shrink-0 self-start`,style:{maxHeight:`calc(100vh - 5rem)`},children:(0,R.jsx)(BX,{notifications:t.notifications?.items??[]})})]}):(0,R.jsx)(`main`,{className:s?`flex-1`:`w-full flex-1 px-8 py-8`,children:(0,R.jsx)(jr,{})}),(0,R.jsx)(KY,{}),(0,R.jsx)(EO,{}),t.permissionPrompt&&(0,R.jsx)(IX,{prompt:t.permissionPrompt})]})}function WX({className:e,type:t,...n}){return(0,R.jsx)(`input`,{type:t,"data-slot":`input`,className:OY(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,e),...n})}function GX({...e}){return(0,R.jsx)(DK,{"data-slot":`select`,...e})}function KX({...e}){return(0,R.jsx)(jK,{"data-slot":`select-value`,...e})}function qX({children:e,className:t,size:n=`default`,...r}){return(0,R.jsxs)(kK,{"data-slot":`select-trigger`,"data-size":n,className:OY(`border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,t),...r,children:[e,(0,R.jsx)(NK,{asChild:!0,children:(0,R.jsx)(aF,{className:`size-4 opacity-50`})})]})}function JX({align:e=`center`,children:t,className:n,position:r=`item-aligned`,...i}){return(0,R.jsx)(LK,{children:(0,R.jsxs)(zK,{"data-slot":`select-content`,className:OY(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md`,r===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,n),position:r,align:e,...i,children:[(0,R.jsx)(XX,{}),(0,R.jsx)(eq,{className:OY(`p-1`,r===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,R.jsx)(ZX,{})]})})}function YX({children:e,className:t,...n}){return(0,R.jsxs)(uq,{"data-slot":`select-item`,className:OY(`focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,t),...n,children:[(0,R.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,R.jsx)(mq,{children:(0,R.jsx)(iF,{className:`size-4`})})}),(0,R.jsx)(fq,{children:e})]})}function XX({className:e,...t}){return(0,R.jsx)(gq,{"data-slot":`select-scroll-up-button`,className:OY(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,R.jsx)(cF,{className:`size-4`})})}function ZX({className:e,...t}){return(0,R.jsx)(vq,{"data-slot":`select-scroll-down-button`,className:OY(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,R.jsx)(aF,{className:`size-4`})})}var QX=50,$X=e=>{switch(e){case`always_allowed`:return`secondary`;case`allowed`:return`default`;case`denied`:return`destructive`;case`timed_out`:return`outline`;default:return`outline`}};function eZ(){let e=Xn(),[,t]=XD(SP,{mode:`promise`}),[,n]=XD(CP,{mode:`promise`}),[r,i]=(0,N.useState)([]),[a,o]=(0,N.useState)(0),[s,c]=(0,N.useState)(!0),[l,u]=(0,N.useState)(0),[d,f]=(0,N.useState)(``),[p,m]=(0,N.useState)(``),[h,g]=(0,N.useState)(``),_=(0,N.useMemo)(()=>{let e={limit:QX,offset:l};return d&&(e.search=d),p&&(e.operation=p),h&&(e.permissionState=h),e},[l,d,p,h]);(0,N.useEffect)(()=>{let e=!1;return c(!0),t({query:_}).then(t=>{e||(i(t.items),o(t.total),c(!1))}).catch(()=>c(!1)),()=>{e=!0}},[t,_]);let v=l+QX<a,y=(0,N.useCallback)(()=>{n({query:{}}).then(e=>{let t=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`audit-log-${new Date().toISOString().slice(0,10)}.json`,r.click(),URL.revokeObjectURL(n)}).catch(()=>{})},[n]);return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,R.jsxs)(Z,{variant:`ghost`,size:`sm`,className:`gap-2`,onClick:()=>e(`/`),children:[(0,R.jsx)(QP,{className:`size-4`}),`Back`]}),(0,R.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Audit Log`}),(0,R.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[a,` entries`]}),(0,R.jsx)(`div`,{className:`ml-auto`,children:(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`gap-2`,onClick:y,children:[(0,R.jsx)(fF,{className:`size-3`}),`Export JSON`]})})]}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsxs)(`div`,{className:`relative flex-1`,children:[(0,R.jsx)(IF,{className:`absolute left-2.5 top-2.5 size-4 text-muted-foreground`}),(0,R.jsx)(WX,{placeholder:`Search operations and context...`,value:d,onChange:e=>{f(e.target.value),u(0)},className:`pl-9`})]}),(0,R.jsxs)(GX,{value:p||`all`,onValueChange:e=>{m(e===`all`?``:e),u(0)},children:[(0,R.jsx)(qX,{className:`w-48`,children:(0,R.jsx)(KX,{placeholder:`Operation`})}),(0,R.jsxs)(JX,{children:[(0,R.jsx)(YX,{value:`all`,children:`All operations`}),(0,R.jsx)(YX,{value:`getPullRequests`,children:`getPullRequests`}),(0,R.jsx)(YX,{value:`getCallerIdentity`,children:`getCallerIdentity`}),(0,R.jsx)(YX,{value:`createPullRequest`,children:`createPullRequest`}),(0,R.jsx)(YX,{value:`listRepositories`,children:`listRepositories`}),(0,R.jsx)(YX,{value:`listBranches`,children:`listBranches`}),(0,R.jsx)(YX,{value:`getPullRequest`,children:`getPullRequest`}),(0,R.jsx)(YX,{value:`getDifferences`,children:`getDifferences`}),(0,R.jsx)(YX,{value:`getCommentsForPullRequest`,children:`getCommentsForPullRequest`})]})]}),(0,R.jsxs)(GX,{value:h||`all`,onValueChange:e=>{g(e===`all`?``:e),u(0)},children:[(0,R.jsx)(qX,{className:`w-40`,children:(0,R.jsx)(KX,{placeholder:`State`})}),(0,R.jsxs)(JX,{children:[(0,R.jsx)(YX,{value:`all`,children:`All states`}),(0,R.jsx)(YX,{value:`always_allowed`,children:`Always allowed`}),(0,R.jsx)(YX,{value:`allowed`,children:`Allowed`}),(0,R.jsx)(YX,{value:`denied`,children:`Denied`}),(0,R.jsx)(YX,{value:`timed_out`,children:`Timed out`})]})]})]}),(0,R.jsx)(`div`,{className:`rounded-md border`,children:(0,R.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{className:`border-b bg-muted/50`,children:[(0,R.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Timestamp`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Operation`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Account`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`State`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-medium`,children:`Duration`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Context`})]})}),(0,R.jsxs)(`tbody`,{children:[s&&r.length===0&&(0,R.jsx)(`tr`,{children:(0,R.jsx)(`td`,{colSpan:6,className:`px-3 py-8 text-center text-muted-foreground`,children:`Loading...`})}),!s&&r.length===0&&(0,R.jsx)(`tr`,{children:(0,R.jsx)(`td`,{colSpan:6,className:`px-3 py-8 text-center text-muted-foreground`,children:`No entries`})}),r.map(e=>(0,R.jsxs)(`tr`,{className:`border-b last:border-0 hover:bg-muted/30`,children:[(0,R.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-muted-foreground whitespace-nowrap`,children:new Date(e.timestamp).toLocaleString()}),(0,R.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs`,children:e.operation}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-xs`,children:e.accountProfile||`-`}),(0,R.jsx)(`td`,{className:`px-3 py-2`,children:(0,R.jsx)(rX,{variant:$X(e.permissionState),className:`text-xs`,children:e.permissionState})}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono text-xs text-muted-foreground`,children:e.durationMs==null?`-`:`${e.durationMs}ms`}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-xs text-muted-foreground truncate max-w-[200px]`,children:e.context})]},e.id))]})]})}),(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:a>0?`${l+1}–${Math.min(l+QX,a)} of ${a}`:`0 entries`}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(Z,{variant:`outline`,size:`sm`,disabled:l===0,onClick:()=>u(Math.max(0,l-QX)),children:`Previous`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,disabled:!v,onClick:()=>u(l+QX),children:`Next`})]})]})]})}function tZ(e={}){let{filter:t,unreadOnly:n}=e,r=t!==void 0||n===!0,i=GD(TP).notifications,[a,o]=(0,N.useState)([]),[s,c]=(0,N.useState)(null),[l,u]=XD(iP,{mode:`promise`}),d=(0,N.useRef)(`${t}:${n}`),f=`${t}:${n}`;d.current!==f&&(d.current=f,o([]),c(null));let p=i?.items[0]?.id,m=(0,N.useRef)(p);!r&&m.current!==p&&(m.current=p,a.length>0&&o([]));let h=(0,N.useMemo)(()=>({limit:20,...t?{filter:t}:{},...n?{unreadOnly:1}:{}}),[t,n]);(0,N.useEffect)(()=>{if(!r)return;let e=!1;return u({query:h}).then(t=>{e||c({items:t.items,...t.nextCursor===void 0?{}:{nextCursor:t.nextCursor}})}).catch(()=>{}),()=>{e=!0}},[r,h,u]);let g=r?s:i,_=a.length>0?a[a.length-1].nextCursor:g?.nextCursor,v=_!==void 0,y=l.waiting,b=(0,N.useCallback)(async()=>{if(!(!v||y||_===void 0))try{let e=await u({query:{...h,cursor:_}}),t={items:e.items,...e.nextCursor===void 0?{}:{nextCursor:e.nextCursor}};o(e=>[...e,t])}catch{}},[v,y,_,u,h]);return{items:(0,N.useMemo)(()=>{let e=g?.items??[];return a.length===0?e:[...e,...a.flatMap(e=>e.items)]},[g?.items,a]),hasMore:v,isLoading:y,loadMore:b}}function nZ(e,t){let n=(0,N.useRef)(null),r=(0,N.useRef)(e);return r.current=e,(0,N.useCallback)(e=>{n.current?.disconnect(),n.current=null,e&&(n.current=new IntersectionObserver(e=>{e[0]?.isIntersecting&&r.current()},t),n.current.observe(e))},[JSON.stringify(t)])}function rZ(e){let[t,n]=(0,N.useState)(null),r=(0,N.useRef)(e);return r.current!==e&&(r.current=e,t!==null&&n(null)),[t??e,n]}function iZ(e){let[t,n]=(0,N.useState)(new Set),r=(0,N.useRef)(e);return r.current!==e&&(r.current=e,t.size>0&&n(new Set)),[t,(0,N.useCallback)(e=>{n(t=>new Set(t).add(e))},[]),(0,N.useCallback)(e=>{n(new Set(e))},[]),(0,N.useCallback)(e=>{n(t=>{let n=new Set(t);return n.delete(e),n})},[])]}function aZ({className:e,decorative:t=!0,orientation:n=`horizontal`,...r}){return(0,R.jsx)(Iq,{"data-slot":`separator`,decorative:t,orientation:n,className:OY(`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}var oZ=tX(`inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground`},size:{default:`h-9 px-2 min-w-9`,sm:`h-8 px-1.5 min-w-8`,lg:`h-10 px-2.5 min-w-10`}},defaultVariants:{variant:`default`,size:`default`}}),sZ=N.createContext({size:`default`,variant:`default`,spacing:0});function cZ({children:e,className:t,size:n,spacing:r=0,variant:i,...a}){return(0,R.jsx)(Uq,{"data-slot":`toggle-group`,"data-variant":i,"data-size":n,"data-spacing":r,className:OY(`group/toggle-group flex w-fit items-center rounded-md`,t),...a,children:(0,R.jsx)(sZ,{value:{variant:i,size:n,spacing:r},children:e})})}function lZ({children:e,className:t,size:n,variant:r,...i}){let a=N.useContext(sZ);return(0,R.jsx)(Qq,{"data-slot":`toggle-group-item`,"data-variant":a.variant||r,"data-size":a.size||n,"data-spacing":a.spacing,className:OY(oZ({variant:a.variant||r,size:a.size||n}),`w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10`,`data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l`,t),...i,children:e})}var uZ=e=>/ExpiredToken|Unauthorized|AuthFailure|SSO|token|credentials|expired/i.test(e),dZ=e=>{switch(e){case`error`:return(0,R.jsx)(KP,{className:`size-4 text-destructive shrink-0`});case`warning`:return(0,R.jsx)(ZP,{className:`size-4 text-yellow-500 shrink-0`});case`success`:return(0,R.jsx)(JP,{className:`size-4 text-green-500 shrink-0`});default:return(0,R.jsx)(bF,{className:`size-4 text-blue-500 shrink-0`})}},fZ=OC(Gw(G({operation:H(U),profile:H(U),region:H(U),cause:H(U),error:H(U),message:H(U)}))),pZ=e=>Sc(fZ(e),()=>B({cause:e})),mZ=e=>{let t=pZ(e);if(vc(t))return e;let{cause:n,error:r,message:i,operation:a}=t.value,o=n??r??i,s=[];return a&&s.push(a),o&&s.push(o),s.length>0?s.join(` — `):e},hZ=e=>{let t=new Date(e),n=new Date().getTime()-t.getTime();return n<6e4?`just now`:n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:t.toLocaleDateString()};function gZ(){let[e,t]=(0,N.useState)(void 0),[n,r]=(0,N.useState)(!0),[i,a]=(0,N.useState)(new Set),o=e=>a(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),s=GD(TP),c=Xn(),{items:l,hasMore:u,isLoading:d,loadMore:f}=tZ({filter:e,unreadOnly:n}),p=YD(aP),m=YD(oP),h=YD(sP),g=YD($N),_=YD(eP),[v,y,b]=iZ(l[0]?.id),[x,S,,C]=iZ(l[0]?.id),w=nZ(()=>{u&&!d&&f()}),T=l.map(e=>x.has(e.id)?{...e,read:0}:v.has(e.id)?{...e,read:1}:e),E=s.unreadNotificationCount??0,D=e=>e.pullRequestId===``,O=e=>{e.read===0&&(y(e.id),C(e.id),p({payload:{id:e.id}})),D(e)?o(e.id):c(`/accounts/${encodeURIComponent(e.awsAccountId)}/prs/${e.pullRequestId}`)};return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Notifications`}),(0,R.jsx)(Z,{variant:`ghost`,size:`sm`,onClick:()=>c(`/`),children:`Back`})]}),(0,R.jsx)(aZ,{}),(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsxs)(cZ,{type:`single`,value:e??`all`,onValueChange:e=>t(e===`all`||e===``?void 0:e),variant:`outline`,size:`sm`,children:[(0,R.jsx)(lZ,{value:`all`,children:`All`}),(0,R.jsx)(lZ,{value:`system`,children:`System`}),(0,R.jsx)(lZ,{value:`prs`,children:`PRs`})]}),(0,R.jsx)(Z,{variant:n?`secondary`:`ghost`,size:`sm`,onClick:()=>r(e=>!e),children:`Unread only`})]}),(0,R.jsxs)(`div`,{className:`space-y-3`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsx)(`div`,{className:`flex items-center gap-2`,children:E>0&&(0,R.jsxs)(rX,{variant:`destructive`,children:[E,` unread`]})}),E>0&&(0,R.jsxs)(Z,{variant:`ghost`,size:`sm`,onClick:()=>{b(T.map(e=>e.id)),h({})},children:[(0,R.jsx)(iF,{className:`size-3.5 mr-1`}),`Mark all read`]})]}),T.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground py-4 text-center`,children:`No notifications`}):(0,R.jsx)(`div`,{className:`divide-y rounded-md border`,children:T.map(e=>{let t=mZ(e.message),n=i.has(e.id);return(0,R.jsxs)(`div`,{className:`flex ${e.read===0?`border-l-2 border-l-blue-500`:``}`,children:[(0,R.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,R.jsxs)(`div`,{className:`flex items-start gap-3 px-3 py-2.5 cursor-pointer hover:bg-accent/50 transition-colors`,role:`button`,tabIndex:0,onClick:()=>O(e),onKeyDown:t=>{t.key===`Enter`&&O(e)},children:[dZ(e.type),(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,R.jsx)(`span`,{className:`text-sm truncate ${e.read===0?`font-medium`:`text-muted-foreground`}`,children:e.title||(D(e)?e.type:`PR #${e.pullRequestId}`)}),(0,R.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:hZ(e.createdAt)})]}),!n&&(0,R.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground line-clamp-1`,children:t})]})]}),n&&(0,R.jsxs)(`div`,{className:`px-3 pb-2.5 ml-7 space-y-2 min-w-0 overflow-hidden`,children:[bc(pZ(e.message),{onNone:()=>(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground break-words`,children:e.message}),onSome:e=>(0,R.jsxs)(`div`,{className:`text-xs text-muted-foreground space-y-0.5`,children:[e.operation&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`operation:`}),` `,e.operation]}),e.profile&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`profile:`}),` `,e.profile]}),e.region&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`region:`}),` `,e.region]}),e.cause&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`cause:`}),` `,e.cause]}),e.error&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`error:`}),` `,e.error]}),e.message&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`span`,{className:`font-medium`,children:`message:`}),` `,e.message]})]})}),(0,R.jsxs)(aX,{children:[(0,R.jsx)(Z,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-xs`,onClick:()=>{e.read===0?(y(e.id),C(e.id),p({payload:{id:e.id}})):(S(e.id),m({payload:{id:e.id}}))},children:e.read===0?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(TF,{className:`size-3`}),` Mark as read`]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(EF,{className:`size-3`}),` Mark as unread`]})}),D(e)&&uZ(e.message)&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Z,{variant:`default`,size:`sm`,className:`h-7 px-2.5 text-xs`,onClick:()=>{try{g({payload:{profile:AC(PM)(e.profile||e.title)}})}catch{}},children:`Login`}),(0,R.jsx)(Z,{variant:`ghost`,size:`sm`,className:`h-7 px-2.5 text-xs`,onClick:()=>{_({})},children:`Logout`})]})]})]})]}),(0,R.jsx)(`button`,{className:`shrink-0 px-3 flex items-center hover:bg-accent/50 transition-colors border-l border-border`,onClick:()=>o(e.id),title:n?`Collapse`:`Expand`,children:(0,R.jsx)(sF,{className:`size-4 text-muted-foreground transition-transform ${n?`rotate-90`:``}`})})]},e.id)})}),(0,R.jsx)(`div`,{ref:w,className:`h-1`}),d&&(0,R.jsx)(`div`,{className:`flex justify-center py-2`,children:(0,R.jsx)(SF,{className:`size-4 animate-spin text-muted-foreground`})})]})]})}var _Z=864e5,vZ=e=>Math.round(e*10)/10,yZ=(e,t,n)=>Math.min(t,Math.max(e,n)),bZ=(e,t)=>Math.max(0,(t.getTime()-e.getTime())/_Z),xZ=e=>/^\w+(\([^)]+\))?:/.test(e)||/^[A-Z]+-\d+:/.test(e),SZ=(e,t)=>{let n=bZ(e.lastModifiedDate,t),r=bZ(e.creationDate,t),i=e.commentCount??0,a=xZ(e.title),o=!!e.description&&e.description.trim().length>0,s=-(n*1),c=-(r*.5),l=i*1,u=e.isApproved?2:0,d=e.isMergeable?0:-3,f=a?.5:0,p=o?.5:0;return B({total:vZ(yZ(0,10,10+s+c+l+u+d+f+p)),breakdown:[{label:`Base`,value:10},{label:`Time decay`,value:vZ(s)},{label:`Age`,value:vZ(c)},{label:`Comments`,value:vZ(l)},{label:`Approval`,value:u},{label:`Conflicts`,value:d},{label:`Scope`,value:f},{label:`Description`,value:p}],categories:[{label:`Activity`,description:`-1 per day since last update (${Math.round(n)}d ago)`,value:vZ(s),...n<2?{status:`positive`,statusLabel:`ACTIVE`}:n<=7?{status:`neutral`,statusLabel:`SLOWING`}:{status:`negative`,statusLabel:`STALE`}},{label:`Age`,description:`-0.5 per day since creation (${Math.round(r)}d old)`,value:vZ(c),...r<3?{status:`positive`,statusLabel:`FRESH`}:r<=14?{status:`neutral`,statusLabel:`AGING`}:{status:`negative`,statusLabel:`OLD`}},{label:`Engagement`,description:`+1 per comment (${i} comments)`,value:vZ(l),...i>=3?{status:`positive`,statusLabel:`ACTIVE`}:i>=1?{status:`neutral`,statusLabel:`QUIET`}:{status:`negative`,statusLabel:`SILENT`}},{label:`Approval`,description:e.isApproved?`+2 bonus for approval`:`No approval yet (+2 when approved)`,value:u,...e.isApproved?{status:`positive`,statusLabel:`APPROVED`}:{status:`neutral`,statusLabel:`PENDING`}},{label:`Mergeable`,description:e.isMergeable?`No merge conflicts`:`-3 penalty for merge conflicts`,value:d,...e.isMergeable?{status:`positive`,statusLabel:`CLEAN`}:{status:`negative`,statusLabel:`CONFLICT`}},{label:`Scope`,description:a?`+0.5 bonus — conventional commit or ticket prefix detected`:`No scope prefix found (e.g. feat(auth): or JIRA-123:)`,value:f,...a?{status:`positive`,statusLabel:`DETECTED`}:{status:`negative`,statusLabel:`MISSING`}},{label:`Description`,description:o?`+0.5 bonus — PR description provided`:`No PR description provided`,value:p,...o?{status:`positive`,statusLabel:`PROVIDED`}:{status:`negative`,statusLabel:`MISSING`}}]})},CZ=e=>kM(e).pipe(AM(e=>e>=7,()=>`green`),AM(e=>e>=4,()=>`yellow`),jM(()=>`red`));function wZ(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var TZ=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,EZ=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,DZ={};function OZ(e,t){return((t||DZ).jsx?EZ:TZ).test(e)}var kZ=/[ \t\n\f\r]/g;function AZ(e){return typeof e==`object`?e.type===`text`?jZ(e.value):!1:jZ(e)}function jZ(e){return e.replace(kZ,``)===``}var MZ=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};MZ.prototype.normal={},MZ.prototype.property={},MZ.prototype.space=void 0;function NZ(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new MZ(n,r,t)}function PZ(e){return e.toLowerCase()}var FZ=class{constructor(e,t){this.attribute=t,this.property=e}};FZ.prototype.attribute=``,FZ.prototype.booleanish=!1,FZ.prototype.boolean=!1,FZ.prototype.commaOrSpaceSeparated=!1,FZ.prototype.commaSeparated=!1,FZ.prototype.defined=!1,FZ.prototype.mustUseProperty=!1,FZ.prototype.number=!1,FZ.prototype.overloadedBoolean=!1,FZ.prototype.property=``,FZ.prototype.spaceSeparated=!1,FZ.prototype.space=void 0;var IZ=s({boolean:()=>RZ,booleanish:()=>zZ,commaOrSpaceSeparated:()=>UZ,commaSeparated:()=>HZ,number:()=>Q,overloadedBoolean:()=>BZ,spaceSeparated:()=>VZ}),LZ=0,RZ=WZ(),zZ=WZ(),BZ=WZ(),Q=WZ(),VZ=WZ(),HZ=WZ(),UZ=WZ();function WZ(){return 2**++LZ}var GZ=Object.keys(IZ),KZ=class extends FZ{constructor(e,t,n,r){let i=-1;if(super(e,t),qZ(this,`space`,r),typeof n==`number`)for(;++i<GZ.length;){let e=GZ[i];qZ(this,GZ[i],(n&IZ[e])===IZ[e])}}};KZ.prototype.defined=!0;function qZ(e,t,n){n&&(e[t]=n)}function JZ(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new KZ(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[PZ(r)]=r,n[PZ(a.attribute)]=r}return new MZ(t,n,e.space)}var YZ=JZ({properties:{ariaActiveDescendant:null,ariaAtomic:zZ,ariaAutoComplete:null,ariaBusy:zZ,ariaChecked:zZ,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:VZ,ariaCurrent:null,ariaDescribedBy:VZ,ariaDetails:null,ariaDisabled:zZ,ariaDropEffect:VZ,ariaErrorMessage:null,ariaExpanded:zZ,ariaFlowTo:VZ,ariaGrabbed:zZ,ariaHasPopup:null,ariaHidden:zZ,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:VZ,ariaLevel:Q,ariaLive:null,ariaModal:zZ,ariaMultiLine:zZ,ariaMultiSelectable:zZ,ariaOrientation:null,ariaOwns:VZ,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:zZ,ariaReadOnly:zZ,ariaRelevant:null,ariaRequired:zZ,ariaRoleDescription:VZ,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:zZ,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function XZ(e,t){return t in e?e[t]:t}function ZZ(e,t){return XZ(e,t.toLowerCase())}var QZ=JZ({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:HZ,acceptCharset:VZ,accessKey:VZ,action:null,allow:null,allowFullScreen:RZ,allowPaymentRequest:RZ,allowUserMedia:RZ,alpha:RZ,alt:null,as:null,async:RZ,autoCapitalize:null,autoComplete:VZ,autoFocus:RZ,autoPlay:RZ,blocking:VZ,capture:null,charSet:null,checked:RZ,cite:null,className:VZ,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:zZ,controls:RZ,controlsList:VZ,coords:Q|HZ,crossOrigin:null,data:null,dateTime:null,decoding:null,default:RZ,defer:RZ,dir:null,dirName:null,disabled:RZ,download:BZ,draggable:zZ,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:RZ,formTarget:null,headers:VZ,height:Q,hidden:BZ,high:Q,href:null,hrefLang:null,htmlFor:VZ,httpEquiv:VZ,id:null,imageSizes:null,imageSrcSet:null,inert:RZ,inputMode:null,integrity:null,is:null,isMap:RZ,itemId:null,itemProp:VZ,itemRef:VZ,itemScope:RZ,itemType:VZ,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:RZ,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:RZ,muted:RZ,name:null,nonce:null,noModule:RZ,noValidate:RZ,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:RZ,optimum:Q,pattern:null,ping:VZ,placeholder:null,playsInline:RZ,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:RZ,referrerPolicy:null,rel:VZ,required:RZ,reversed:RZ,rows:Q,rowSpan:Q,sandbox:VZ,scope:null,scoped:RZ,seamless:RZ,selected:RZ,shadowRootClonable:RZ,shadowRootCustomElementRegistry:RZ,shadowRootDelegatesFocus:RZ,shadowRootMode:null,shadowRootSerializable:RZ,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:zZ,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:RZ,useMap:null,value:zZ,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:VZ,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:RZ,declare:RZ,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:RZ,noHref:RZ,noShade:RZ,noWrap:RZ,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:zZ,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:RZ,disablePictureInPicture:RZ,disableRemotePlayback:RZ,exportParts:HZ,part:VZ,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:ZZ}),$Z=JZ({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,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`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,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`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,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`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:UZ,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:VZ,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:RZ,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:HZ,g2:HZ,glyphName:HZ,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:UZ,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:VZ,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:UZ,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:UZ,rev:UZ,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:UZ,requiredFeatures:UZ,requiredFonts:UZ,requiredFormats:UZ,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:UZ,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:UZ,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:UZ,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:XZ}),eQ=JZ({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),tQ=JZ({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:ZZ}),nQ=JZ({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),rQ={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},iQ=/[A-Z]/g,aQ=/-[a-z]/g,oQ=/^data[-\w.:]+$/i;function sQ(e,t){let n=PZ(t),r=t,i=FZ;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&oQ.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(aQ,lQ);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!aQ.test(e)){let n=e.replace(iQ,cQ);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=KZ}return new i(r,t)}function cQ(e){return`-`+e.toLowerCase()}function lQ(e){return e.charAt(1).toUpperCase()}var uQ=NZ([YZ,QZ,eQ,tQ,nQ],`html`),dQ=NZ([YZ,$Z,eQ,tQ,nQ],`svg`);function fQ(e){return e.join(` `).trim()}var pQ=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`/`,d=`*`,f=``;function p(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,p=1;function h(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
61
|
-
`);p=~n?e.length-n:p+e.length}function g(){var e={line:l,column:p};return function(t){return t.position=new _(e),b(),t}}function _(e){this.start=e,this.end={line:l,column:p},this.source=t.source}_.prototype.content=e;function v(n){var r=Error(t.source+`:`+l+`:`+p+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=p,r.source=e,!t.silent)throw r}function y(t){var n=t.exec(e);if(n){var r=n[0];return h(r),e=e.slice(r.length),n}}function b(){y(i)}function x(e){var t;for(e||=[];t=S();)t!==!1&&e.push(t);return e}function S(){var t=g();if(!(u!=e.charAt(0)||d!=e.charAt(1))){for(var n=2;f!=e.charAt(n)&&(d!=e.charAt(n)||u!=e.charAt(n+1));)++n;if(n+=2,f===e.charAt(n-1))return v(`End of comment missing`);var r=e.slice(2,n-2);return p+=2,h(r),e=e.slice(n),p+=2,t({type:`comment`,comment:r})}}function C(){var e=g(),t=y(a);if(t){if(S(),!y(o))return v(`property missing ':'`);var r=y(s),i=e({type:`declaration`,property:m(t[0].replace(n,f)),value:r?m(r[0].replace(n,f)):f});return y(c),i}}function w(){var e=[];x(e);for(var t;t=C();)t!==!1&&(e.push(t),x(e));return e}return b(),w()}function m(e){return e?e.replace(l,f):f}t.exports=p})),mQ=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(pQ());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),hQ=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),gQ=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(mQ()),r=hQ();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),_Q=yQ(`end`),vQ=yQ(`start`);function yQ(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function bQ(e){let t=vQ(e),n=_Q(e);if(t&&n)return{start:t,end:n}}function xQ(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?CQ(e.position):`start`in e||`end`in e?CQ(e):`line`in e||`column`in e?SQ(e):``}function SQ(e){return wQ(e&&e.line)+`:`+wQ(e&&e.column)}function CQ(e){return SQ(e&&e.start)+`-`+SQ(e&&e.end)}function wQ(e){return e&&typeof e==`number`?e:1}var TQ=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=xQ(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};TQ.prototype.file=``,TQ.prototype.name=``,TQ.prototype.reason=``,TQ.prototype.message=``,TQ.prototype.stack=``,TQ.prototype.column=void 0,TQ.prototype.line=void 0,TQ.prototype.ancestors=void 0,TQ.prototype.cause=void 0,TQ.prototype.fatal=void 0,TQ.prototype.place=void 0,TQ.prototype.ruleId=void 0,TQ.prototype.source=void 0;var EQ=l(gQ(),1),DQ={}.hasOwnProperty,OQ=new Map,kQ=/[A-Z]/g,AQ=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),jQ=new Set([`td`,`th`]);function MQ(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=UQ(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=HQ(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?dQ:uQ,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=NQ(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function NQ(e,t,n){if(t.type===`element`)return PQ(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return FQ(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return LQ(e,t,n);if(t.type===`mdxjsEsm`)return IQ(e,t);if(t.type===`root`)return RQ(e,t,n);if(t.type===`text`)return zQ(e,t)}function PQ(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=dQ,e.schema=i),e.ancestors.push(t);let a=YQ(e,t.tagName,!1),o=WQ(e,t),s=KQ(e,t);return AQ.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!AZ(e):!0})),BQ(e,o,a,t),VQ(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function FQ(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}XQ(e,t.position)}function IQ(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);XQ(e,t.position)}function LQ(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=dQ,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:YQ(e,t.name,!0),o=GQ(e,t),s=KQ(e,t);return BQ(e,o,a,t),VQ(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function RQ(e,t,n){let r={};return VQ(r,KQ(e,t)),e.create(t,e.Fragment,r,n)}function zQ(e,t){return t.value}function BQ(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function VQ(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function HQ(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function UQ(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=vQ(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function WQ(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&DQ.call(t.properties,i)){let a=qQ(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&jQ.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function GQ(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else XQ(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else XQ(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function KQ(e,t){let n=[],r=-1,i=e.passKeys?new Map:OQ;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=NQ(e,a,o);s!==void 0&&n.push(s)}return n}function qQ(e,t,n){let r=sQ(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?wZ(n):fQ(n)),r.property===`style`){let t=typeof n==`object`?n:JQ(e,String(n));return e.stylePropertyNameCase===`css`&&(t=ZQ(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?rQ[r.property]||r.property:r.attribute,n]}}function JQ(e,t){try{return(0,EQ.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new TQ("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function YQ(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=OZ(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=OZ(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return DQ.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);XQ(e)}function XQ(e,t){let n=new TQ("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function ZQ(e){let t={},n;for(n in e)DQ.call(e,n)&&(t[QQ(n)]=e[n]);return t}function QQ(e){let t=e.replace(kQ,$Q);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function $Q(e){return`-`+e.toLowerCase()}var e$={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},t$={};function n$(e,t){let n=t||t$;return r$(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function r$(e,t,n){if(a$(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return i$(e.children,t,n)}return Array.isArray(e)?i$(e,t,n):``}function i$(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=r$(e[i],t,n);return r.join(``)}function a$(e){return!!(e&&typeof e==`object`)}function o$(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function s$(e,t){return e.length>0?(o$(e,e.length,0,t),e):t}var c$={}.hasOwnProperty;function l$(e){let t={},n=-1;for(;++n<e.length;)u$(t,e[n]);return t}function u$(e,t){let n;for(n in t){let r=(c$.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){c$.call(r,a)||(r[a]=[]);let e=i[a];d$(r[a],Array.isArray(e)?e:e?[e]:[])}}}function d$(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);o$(e,0,0,r)}var f$=C$(/[A-Za-z]/),p$=C$(/[\dA-Za-z]/),m$=C$(/[#-'*+\--9=?A-Z^-~]/);function h$(e){return e!==null&&(e<32||e===127)}var g$=C$(/\d/),_$=C$(/[\dA-Fa-f]/),v$=C$(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function y$(e){return e!==null&&(e<0||e===32)}function b$(e){return e===-2||e===-1||e===32}var x$=C$(/\p{P}|\p{S}/u),S$=C$(/\s/);function C$(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function w$(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return b$(r)?(e.enter(n),s(r)):t(r)}function s(r){return b$(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var T$={tokenize:E$};function E$(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),w$(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return $(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var D$={tokenize:k$},O$={tokenize:A$};function k$(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return o$(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(O$,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(O$,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return $(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;o$(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function A$(e,t,n){return w$(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function j$(e){if(e===null||y$(e)||S$(e))return 1;if(x$(e))return 2}function M$(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var N$={name:`attention`,resolveAll:P$,tokenize:F$};function P$(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};I$(d,-c),I$(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=s$(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=s$(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=s$(l,M$(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=s$(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=s$(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,o$(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function F$(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=j$(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=j$(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function I$(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var L$={name:`autolink`,tokenize:R$};function R$(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return f$(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||p$(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||p$(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||h$(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):m$(t)?(e.consume(t),l):n(t)}function u(e){return p$(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||p$(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var z$={partial:!0,tokenize:B$};function B$(e,t,n){return r;function r(t){return b$(t)?w$(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||$(e)?t(e):n(e)}}var V$={continuation:{tokenize:U$},exit:W$,name:`blockQuote`,tokenize:H$};function H$(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return b$(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function U$(e,t,n){let r=this;return i;function i(t){return b$(t)?w$(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(V$,t,n)(r)}}function W$(e){e.exit(`blockQuote`)}var G$={name:`characterEscape`,tokenize:K$};function K$(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return v$(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var q$=document.createElement(`i`);function J$(e){let t=`&`+e+`;`;q$.innerHTML=t;let n=q$.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}var Y$={name:`characterReference`,tokenize:X$};function X$(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=p$,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=_$,u):(e.enter(`characterReferenceValue`),a=7,o=g$,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===p$&&!J$(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Z$={partial:!0,tokenize:e1},Q$={concrete:!0,name:`codeFenced`,tokenize:$$};function $$(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),b$(t)?w$(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||$(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Z$,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):b$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),w$(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||$(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&b$(t)?w$(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||$(t)?e.check(Z$,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||$(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),b$(t)?w$(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),b$(t)?w$(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||$(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function e1(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var t1={name:`codeIndented`,tokenize:r1},n1={partial:!0,tokenize:i1};function r1(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),w$(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):$(t)?e.attempt(n1,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||$(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function i1(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):w$(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):$(e)?i(e):n(e)}}var a1={name:`codeText`,previous:s1,resolve:o1,tokenize:c1};function o1(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function s1(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function c1(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||$(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var l1=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&u1(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),u1(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),u1(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);u1(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);u1(this.left,t.reverse())}}};function u1(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function d1(e){let t={},n=-1,r,i,a,o,s,c,l,u=new l1(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,f1(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return o$(e,0,1/0,u.slice(0)),!l}function f1(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var p1={resolve:h1,tokenize:g1},m1={partial:!0,tokenize:_1};function h1(e){return d1(e),e}function g1(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):$(t)?e.check(m1,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function _1(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),w$(e,a,`linePrefix`)}function a(i){if(i===null||$(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function v1(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||h$(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||$(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||y$(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||h$(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function y1(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):$(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||$(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!b$(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function b1(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),w$(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||$(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function x1(e,t){let n;return r;function r(i){return $(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):b$(i)?w$(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}function S1(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var C1={name:`definition`,tokenize:T1},w1={partial:!0,tokenize:E1};function T1(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return y1.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=S1(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return y$(t)?x1(e,l)(t):l(t)}function l(t){return v1(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(w1,d,d)(t)}function d(t){return b$(t)?w$(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||$(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function E1(e,t,n){return r;function r(t){return y$(t)?x1(e,i)(t):n(t)}function i(t){return b1(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return b$(t)?w$(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||$(e)?t(e):n(e)}}var D1={name:`hardBreakEscape`,tokenize:O1};function O1(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return $(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var k1={name:`headingAtx`,resolve:A1,tokenize:j1};function A1(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},o$(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function j1(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||y$(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||$(n)?(e.exit(`atxHeading`),t(n)):b$(n)?w$(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||y$(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var M1=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),N1=[`pre`,`script`,`style`,`textarea`],P1={concrete:!0,name:`htmlFlow`,resolveTo:L1,tokenize:R1},F1={partial:!0,tokenize:B1},I1={partial:!0,tokenize:z1};function L1(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function R1(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:F):f$(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):f$(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return f$(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||y$(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&N1.includes(l)?(i=1,r.interrupt?t(s):O(s)):M1.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||p$(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return b$(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||f$(t)?(e.consume(t),b):b$(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||p$(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):b$(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):b$(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||$(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||y$(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||b$(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||$(t)?O(t):b$(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),I):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),P):$(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(F1,te,k)(t)):t===null||$(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(I1,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||$(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),F):O(t)}function N(t){return t===47?(e.consume(t),o=``,ee):O(t)}function ee(t){if(t===62){let n=o.toLowerCase();return N1.includes(n)?(e.consume(t),I):O(t)}return f$(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ee):O(t)}function P(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),I):t===45&&i===2?(e.consume(t),F):O(t)}function I(t){return t===null||$(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),I)}function te(n){return e.exit(`htmlFlow`),t(n)}}function z1(e,t,n){let r=this;return i;function i(t){return $(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function B1(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(z$,t,n)}}var V1={name:`htmlText`,tokenize:H1};function H1(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):f$(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):f$(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):$(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):$(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):$(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):$(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return f$(t)?(e.consume(t),S):n(t)}function S(t){return t===45||p$(t)?(e.consume(t),S):C(t)}function C(t){return $(t)?(o=C,N(t)):b$(t)?(e.consume(t),C):M(t)}function w(t){return t===45||p$(t)?(e.consume(t),w):t===47||t===62||y$(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||f$(t)?(e.consume(t),E):$(t)?(o=T,N(t)):b$(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||p$(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):$(t)?(o=D,N(t)):b$(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):$(t)?(o=O,N(t)):b$(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):$(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||y$(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||y$(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return b$(t)?w$(e,P,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):P(t)}function P(t){return e.enter(`htmlTextData`),o(t)}}var U1={name:`labelEnd`,resolveAll:q1,resolveTo:J1,tokenize:Y1},W1={tokenize:X1},G1={tokenize:Z1},K1={tokenize:Q1};function q1(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&o$(e,0,e.length,n),e}function J1(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=s$(s,e.slice(a+1,a+r+3)),s=s$(s,[[`enter`,u,t]]),s=s$(s,M$(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=s$(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=s$(s,e.slice(o+1)),s=s$(s,[[`exit`,c,t]]),o$(e,a,e.length,s),e}function Y1(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(S1(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(W1,u,o?u:d)(t):t===91?e.attempt(G1,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(K1,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function X1(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return y$(t)?x1(e,a)(t):a(t)}function a(t){return t===41?u(t):v1(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return y$(t)?x1(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?b1(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return y$(t)?x1(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Z1(e,t,n){let r=this;return i;function i(t){return y1.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(S1(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Q1(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var $1={name:`labelStartImage`,resolveAll:U1.resolveAll,tokenize:e0};function e0(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var t0={name:`labelStartLink`,resolveAll:U1.resolveAll,tokenize:n0};function n0(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var r0={name:`lineEnding`,tokenize:i0};function i0(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),w$(e,t,`linePrefix`)}}var a0={name:`thematicBreak`,tokenize:o0};function o0(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||$(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),b$(t)?w$(e,s,`whitespace`)(t):s(t))}}var s0={continuation:{tokenize:d0},exit:p0,name:`list`,tokenize:u0},c0={partial:!0,tokenize:m0},l0={partial:!0,tokenize:f0};function u0(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:g$(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(a0,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return g$(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(z$,r.interrupt?n:u,e.attempt(c0,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return b$(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function d0(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(z$,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,w$(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!b$(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(l0,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,w$(e,e.attempt(s0,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function f0(e,t,n){let r=this;return w$(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function p0(e){e.exit(this.containerState.type)}function m0(e,t,n){let r=this;return w$(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!b$(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var h0={name:`setextUnderline`,resolveTo:g0,tokenize:_0};function g0(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function _0(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),b$(t)?w$(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||$(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var v0={tokenize:y0};function y0(e){let t=this,n=e.attempt(z$,r,e.attempt(this.parser.constructs.flowInitial,i,w$(e,e.attempt(this.parser.constructs.flow,i,e.attempt(p1,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var b0={resolveAll:w0()},x0=C0(`string`),S0=C0(`text`);function C0(e){return{resolveAll:w0(e===`text`?T0:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function w0(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function T0(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var E0=s({attentionMarkers:()=>P0,contentInitial:()=>O0,disable:()=>F0,document:()=>D0,flow:()=>A0,flowInitial:()=>k0,insideSpan:()=>N0,string:()=>j0,text:()=>M0}),D0={42:s0,43:s0,45:s0,48:s0,49:s0,50:s0,51:s0,52:s0,53:s0,54:s0,55:s0,56:s0,57:s0,62:V$},O0={91:C1},k0={[-2]:t1,[-1]:t1,32:t1},A0={35:k1,42:a0,45:[h0,a0],60:P1,61:h0,95:a0,96:Q$,126:Q$},j0={38:Y$,92:G$},M0={[-5]:r0,[-4]:r0,[-3]:r0,33:$1,38:Y$,42:N$,60:[L$,V1],91:t0,92:[D1,G$],93:U1,95:N$,96:a1},N0={null:[N$,b0]},P0={null:[42,95]},F0={null:[]};function I0(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=s$(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=M$(a,l.events,l),l.events):[]}function f(e,t){return R0(p(e),t)}function p(e){return L0(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){$(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&o$(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function L0(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function R0(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
62
|
-
`;break;case-3:o=`\r
|
|
63
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function z0(e){let t={constructs:l$([E0,...(e||{}).extensions||[]]),content:n(T$),defined:[],document:n(D$),flow:n(v0),lazy:{},string:n(x0),text:n(S0)};return t;function n(e){return n;function n(n){return I0(t,e,n)}}}function B0(e){for(;!d1(e););return e}var V0=/[\0\t\n\r]/g;function H0(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(V0.lastIndex=u,c=V0.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}function U0(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var W0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function G0(e){return e.replace(W0,K0)}function K0(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return U0(n.slice(t?2:1),t?16:10)}return J$(n)||e}var q0={}.hasOwnProperty;function J0(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Y0(n)(B0(z0(n).document().write(H0()(e,t,!0))))}function Y0(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(_e),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(pe),blockQuote:a(ce),characterEscape:T,characterReference:T,codeFenced:a(le),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(le,o),codeText:a(ue,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(fe),hardBreakEscape:a(me),hardBreakTrailing:a(me),htmlFlow:a(he,o),htmlFlowData:T,htmlText:a(he,o),htmlTextData:T,image:a(ge),label:o,link:a(_e),listItem:a(ye),listItemValue:f,listOrdered:a(ve,d),listUnordered:a(ve),paragraph:a(be),reference:ne,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(pe),strong:a(xe),thematicBreak:a(Ce)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:se,autolinkProtocol:oe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:L,characterReference:ae,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:P,labelText:ee,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:re,resourceDestinationString:F,resourceTitleString:I,resource:te,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Z0(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];q0.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||$0).call(a,void 0,e[0])}for(r.position={start:X0(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:X0(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:X0(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||$0).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+xQ({start:e.start,end:e.end})+`): it’s not open`);n.position.end=X0(e.end)}function u(){return n$(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=S1(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Se(),n.position={start:X0(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=X0(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=X0(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ee(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=G0(t),n.identifier=S1(t).toLowerCase()}function P(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function te(){this.data.inReference=void 0}function ne(){this.data.referenceType=`collapsed`}function re(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=S1(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ie(e){this.data.characterReferenceType=e.type}function L(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=U0(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=J$(t);let i=this.stack[this.stack.length-1];i.value+=r}function ae(e){let t=this.stack.pop();t.position.end=X0(e.end)}function oe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function se(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ce(){return{type:`blockquote`,children:[]}}function le(){return{type:`code`,lang:null,meta:null,value:``}}function ue(){return{type:`inlineCode`,value:``}}function de(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function fe(){return{type:`emphasis`,children:[]}}function pe(){return{type:`heading`,depth:0,children:[]}}function me(){return{type:`break`}}function he(){return{type:`html`,value:``}}function ge(){return{type:`image`,title:null,url:``,alt:null}}function _e(){return{type:`link`,title:null,url:``,children:[]}}function ve(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ye(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function be(){return{type:`paragraph`,children:[]}}function xe(){return{type:`strong`,children:[]}}function Se(){return{type:`text`,value:``}}function Ce(){return{type:`thematicBreak`}}}function X0(e){return{line:e.line,column:e.column,offset:e.offset}}function Z0(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Z0(e,r):Q0(e,r)}}function Q0(e,t){let n;for(n in t)if(q0.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function $0(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+xQ({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+xQ({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+xQ({start:t.start,end:t.end})+`) is still open`)}function e2(e){let t=this;t.parser=n;function n(n){return J0(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}var t2=typeof self==`object`?self:globalThis,n2=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new t2[e](t)},r2=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(n2(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(n2(a,o),i)};return r},i2=e=>r2(new Map,e)(0),a2=``,{toString:o2}={},{keys:s2}=Object,c2=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=o2.call(e).slice(8,-1);switch(n){case`Array`:return[1,a2];case`Object`:return[2,a2];case`Date`:return[3,a2];case`RegExp`:return[4,a2];case`Map`:return[5,a2];case`Set`:return[6,a2];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},l2=([e,t])=>e===0&&(t===`function`||t===`symbol`),u2=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=c2(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of s2(r))(e||!l2(c2(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?a2:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(l2(c2(n))||l2(c2(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!l2(c2(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},d2=(e,{json:t,lossy:n}={})=>{let r=[];return u2(!(t||n),!!t,new Map,r)(e),r},f2=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?i2(d2(e,t)):structuredClone(e):(e,t)=>i2(d2(e,t));function p2(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&p$(e.charCodeAt(n+1))&&p$(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function m2(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function h2(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function g2(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||m2,r=e.options.footnoteBackLabel||h2,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=p2(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...f2(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
64
|
-
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
65
|
-
`}]}}var _2=(function(e){if(e==null)return S2;if(typeof e==`function`)return x2(e);if(typeof e==`object`)return Array.isArray(e)?v2(e):y2(e);if(typeof e==`string`)return b2(e);throw Error(`Expected function, string, or object as test`)});function v2(e){let t=[],n=-1;for(;++n<e.length;)t[n]=_2(e[n]);return x2(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function y2(e){let t=e;return x2(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function b2(e){return x2(t);function t(t){return t&&t.type===e}}function x2(e){return t;function t(t,n,r){return!!(C2(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function S2(){return!0}function C2(e){return typeof e==`object`&&!!e&&`type`in e}function w2(e){return e}var T2=[];function E2(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=_2(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+w2(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=T2,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=D2(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function D2(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?T2:[e]}function O2(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),E2(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}function k2(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function A2(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
66
|
-
`}]}function j2(e,t){let n=t.value?t.value+`
|
|
67
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function M2(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function N2(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function P2(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=p2(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function F2(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function I2(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function L2(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function R2(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return L2(e,t);let i={src:p2(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function z2(e,t){let n={src:p2(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function B2(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function V2(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return L2(e,t);let i={href:p2(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function H2(e,t){let n={href:p2(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function U2(e,t,n){let r=e.all(t),i=n?W2(n):G2(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
68
|
-
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
69
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function W2(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=G2(n[r])}return t}function G2(e){return e.spread??e.children.length>1}function K2(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function q2(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function J2(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Y2(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function X2(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=vQ(t.children[1]),o=_Q(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Z2(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Q2(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var $2=9,e4=32;function t4(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(n4(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(n4(t.slice(i),i>0,!1)),a.join(``)}function n4(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===$2||t===e4;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===$2||t===e4;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function r4(e,t){let n={type:`text`,value:t4(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function i4(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var a4={blockquote:k2,break:A2,code:j2,delete:M2,emphasis:N2,footnoteReference:P2,heading:F2,html:I2,imageReference:R2,image:z2,inlineCode:B2,linkReference:V2,link:H2,listItem:U2,list:K2,paragraph:q2,root:J2,strong:Y2,table:X2,tableCell:Q2,tableRow:Z2,text:r4,thematicBreak:i4,toml:o4,yaml:o4,definition:o4,footnoteDefinition:o4};function o4(){}var s4={}.hasOwnProperty,c4={};function l4(e,t){let n=t||c4,r=new Map,i=new Map,a={all:s,applyData:d4,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...a4,...n.handlers},one:o,options:n,patch:u4,wrap:p4};return O2(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(s4.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=f2(n);return r.children=a.all(e),r}return f2(e)}return(a.options.unknownHandler||f4)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=m4(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=m4(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function u4(e,t){e.position&&(t.position=bQ(e))}function d4(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,f2(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function f4(e,t){let n=t.data||{},r=`value`in t&&!(s4.call(n,`hProperties`)||s4.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function p4(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
70
|
-
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
71
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
72
|
-
`}),n}function m4(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function h4(e,t){let n=l4(e,t),r=n.one(e,void 0),i=g2(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
73
|
-
`},i)),a}function g4(e,t){return e&&`run`in e?async function(n,r){let i=h4(n,{file:r,...t});await e.run(i,r)}:function(n,r){return h4(n,{file:r,...e||t})}}function _4(e){if(e)throw e}var v4=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function y4(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function b4(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?x4(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function x4(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var S4={basename:C4,dirname:w4,extname:T4,join:E4,sep:`/`};function C4(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);k4(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function w4(e){if(k4(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function T4(e){k4(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function E4(...e){let t=-1,n;for(;++t<e.length;)k4(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:D4(n)}function D4(e){k4(e);let t=e.codePointAt(0)===47,n=O4(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function O4(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function k4(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var A4={cwd:j4};function j4(){return`/`}function M4(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function N4(e){if(typeof e==`string`)e=new URL(e);else if(!M4(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return P4(e)}function P4(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var F4=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],I4=class{constructor(e){let t;t=e?M4(e)?{path:e}:typeof e==`string`||B4(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:A4.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<F4.length;){let e=F4[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)F4.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?S4.basename(this.path):void 0}set basename(e){R4(e,`basename`),L4(e,`basename`),this.path=S4.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?S4.dirname(this.path):void 0}set dirname(e){z4(this.basename,`dirname`),this.path=S4.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?S4.extname(this.path):void 0}set extname(e){if(L4(e,`extname`),z4(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=S4.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){M4(e)&&(e=N4(e)),R4(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?S4.basename(this.path,this.extname):void 0}set stem(e){R4(e,`stem`),L4(e,`stem`),this.path=S4.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new TQ(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function L4(e,t){if(e&&e.includes(S4.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+S4.sep+"`")}function R4(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function z4(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function B4(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var V4=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),H4=l(v4(),1),U4={}.hasOwnProperty,W4=new class e extends V4{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=b4()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,H4.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(q4(`data`,this.frozen),this.namespace[e]=t,this):U4.call(this.namespace,e)&&this.namespace[e]||void 0:e?(q4(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=X4(e),n=this.parser||this.Parser;return G4(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),G4(`process`,this.parser||this.Parser),K4(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=X4(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Q4(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),G4(`processSync`,this.parser||this.Parser),K4(`processSync`,this.compiler||this.Compiler),this.process(e,r),Y4(`processSync`,`process`,t),n;function r(e,r){t=!0,_4(e),n=r}}run(e,t,n){J4(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=X4(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Y4(`runSync`,`run`,n),r;function i(e,t){_4(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=X4(t),r=this.compiler||this.Compiler;return K4(`stringify`,r),J4(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(q4(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,H4.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];y4(o)&&y4(r)&&(r=(0,H4.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function G4(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function K4(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function q4(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function J4(e){if(!y4(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Y4(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function X4(e){return Z4(e)?e:new I4(e)}function Z4(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Q4(e){return typeof e==`string`||$4(e)}function $4(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var e3=[],t3={allowDangerousHtml:!0},n3=/^(https?|ircs?|mailto|xmpp)$/i,r3=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function i3(e){let t=a3(e),n=o3(e);return s3(t.runSync(t.parse(n),n),e)}function a3(e){let t=e.rehypePlugins||e3,n=e.remarkPlugins||e3,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...t3}:t3;return W4().use(e2).use(n).use(g4,r).use(t)}function o3(e){let t=e.children||``,n=new I4;return typeof t==`string`?n.value=t:``+t,n}function s3(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||c3;for(let e of r3)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return O2(e,l),MQ(e,{Fragment:R.Fragment,components:i,ignoreInvalidStyle:!0,jsx:R.jsx,jsxs:R.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in e$)if(Object.hasOwn(e$,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=e$[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function c3(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||n3.test(e.slice(0,t))?e:``}var l3=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],u3={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...l3,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...l3],h2:[[`className`,`sr-only`]],img:[...l3,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...l3,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...l3],table:[...l3],ul:[...l3,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},d3={}.hasOwnProperty;function f3(e,t){let n={type:`root`,children:[]},r=p3({schema:t?{...u3,...t}:u3,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function p3(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return m3(e,n);case`doctype`:return h3(e,n);case`element`:return g3(e,n);case`root`:return _3(e,n);case`text`:return v3(e,n);default:}}}function m3(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return T3(r,t),r}}function h3(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return T3(e,t),e}}function g3(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=y3(e,t.children),i=b3(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&d3.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return T3(o,t),o}function _3(e,t){let n={type:`root`,children:y3(e,t.children)};return T3(n,t),n}function v3(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return T3(n,t),n}function y3(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=p3(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function b3(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&d3.call(r,n)?r[n]:void 0,o=r&&d3.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(d3.call(s,l)){let t=s[l],n=x3(e,E3(a,l),l,t);n??=x3(e,E3(o,l),l,t),n!=null&&(c[l]=n)}if(i&&d3.call(i,n)){let e=i[n];for(l in e)d3.call(e,l)&&!d3.call(c,l)&&(c[l]=e[l])}return c}function x3(e,t,n,r){return t?Array.isArray(r)?S3(e,t,n,r):C3(e,t,n,r):void 0}function S3(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=C3(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function C3(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&w3(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function w3(e,t,n){let r=e.schema.protocols&&d3.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function T3(e,t){let n=bQ(t);t.data&&(e.data=f2(t.data)),n&&(e.position=n)}function E3(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function D3(e){return function(t){return f3(t,e)}}function O3(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function k3(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function A3(e,t,n){let r=_2((n||{}).ignore||[]),i=j3(t),a=-1;for(;++a<i.length;)E2(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function j3(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([M3(e[0]),N3(e[1])])}return t}function M3(e){return typeof e==`string`?new RegExp(k3(e),`g`):e}function N3(e){return typeof e==`function`?e:function(){return e}}var P3=`phrasing`,F3=[`autolink`,`link`,`image`,`label`];function I3(){return{transforms:[W3],enter:{literalAutolink:R3,literalAutolinkEmail:z3,literalAutolinkHttp:z3,literalAutolinkWww:z3},exit:{literalAutolink:U3,literalAutolinkEmail:H3,literalAutolinkHttp:B3,literalAutolinkWww:V3}}}function L3(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:P3,notInConstruct:F3},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:P3,notInConstruct:F3},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:P3,notInConstruct:F3}]}}function R3(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function z3(e){this.config.enter.autolinkProtocol.call(this,e)}function B3(e){this.config.exit.autolinkProtocol.call(this,e)}function V3(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function H3(e){this.config.exit.autolinkEmail.call(this,e)}function U3(e){this.exit(e)}function W3(e){A3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,G3],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,K3]],{ignore:[`link`,`linkReference`]})}function G3(e,t,n,r,i){let a=``;if(!Y3(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!q3(n)))return!1;let o=J3(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function K3(e,t,n,r){return!Y3(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function q3(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function J3(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=O3(e,`(`),a=O3(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Y3(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||S$(n)||x$(n))&&(!t||n!==47)}a6.peek=i6;function X3(){this.buffer()}function Z3(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Q3(){this.buffer()}function $3(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function e6(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=S1(this.sliceSerialize(e)).toLowerCase(),n.label=t}function t6(e){this.exit(e)}function n6(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=S1(this.sliceSerialize(e)).toLowerCase(),n.label=t}function r6(e){this.exit(e)}function i6(){return`[`}function a6(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function o6(){return{enter:{gfmFootnoteCallString:X3,gfmFootnoteCall:Z3,gfmFootnoteDefinitionLabelString:Q3,gfmFootnoteDefinition:$3},exit:{gfmFootnoteCallString:e6,gfmFootnoteCall:t6,gfmFootnoteDefinitionLabelString:n6,gfmFootnoteDefinition:r6}}}function s6(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:a6},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
74
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?l6:c6))),s(),o}}function c6(e,t,n){return t===0?e:l6(e,t,n)}function l6(e,t,n){return(n?``:` `)+e}var u6=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];h6.peek=g6;function d6(){return{canContainEols:[`delete`],enter:{strikethrough:p6},exit:{strikethrough:m6}}}function f6(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:u6}],handlers:{delete:h6}}}function p6(e){this.enter({type:`delete`,children:[]},e)}function m6(e){this.exit(e)}function h6(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function g6(){return`~`}function _6(e){return e.length}function v6(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||_6,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=y6(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=b6(r[d]);else{let e=b6(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
75
|
-
`)}function y6(e){return e==null?``:String(e)}function b6(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function x6(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),S6);return i(),o}function S6(e,t,n){return`>`+(n?``:` `)+e}function C6(e,t){return w6(e,t.inConstruct,!0)&&!w6(e,t.notInConstruct,!1)}function w6(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function T6(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
76
|
-
`&&C6(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
77
|
-
`}function E6(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function D6(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function O6(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function k6(e,t,n,r){let i=O6(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(D6(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,A6);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(E6(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
78
|
-
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
79
|
-
`),a&&(u+=s.move(a+`
|
|
80
|
-
`)),u+=s.move(c),l(),u}function A6(e,t,n){return(n?``:` `)+e}function j6(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function M6(e,t,n,r){let i=j6(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
81
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function N6(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function P6(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function F6(e,t,n){let r=j$(e),i=j$(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}I6.peek=L6;function I6(e,t,n,r){let i=N6(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=F6(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=P6(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=F6(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+P6(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function L6(e,t,n){return n.options.emphasis||`*`}function R6(e,t){let n=!1;return O2(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&n$(e)&&(t.options.setext||n))}function z6(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(R6(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
82
|
-
`,after:`
|
|
83
|
-
`});return r(),t(),o+`
|
|
84
|
-
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
85
|
-
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
86
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=P6(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}B6.peek=V6;function B6(e){return e.value||``}function V6(){return`<`}H6.peek=U6;function H6(e,t,n,r){let i=j6(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function U6(){return`!`}W6.peek=G6;function W6(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function G6(){return`!`}K6.peek=q6;function K6(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function q6(){return"`"}function J6(e,t){let n=n$(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Y6.peek=X6;function Y6(e,t,n,r){let i=j6(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(J6(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function X6(e,t,n){return J6(e,n)?`<`:`[`}Z6.peek=Q6;function Z6(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Q6(){return`[`}function $6(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function e8(e){let t=$6(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function t8(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function n8(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function r8(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?t8(n):$6(n),s=e.ordered?o===`.`?`)`:`.`:e8(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),n8(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function i8(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function a8(e,t,n,r){let i=i8(n),a=n.bulletCurrent||$6(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function o8(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var s8=_2([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function c8(e,t,n,r){return(e.children.some(function(e){return s8(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function l8(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}u8.peek=d8;function u8(e,t,n,r){let i=l8(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=F6(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=P6(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=F6(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+P6(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function d8(e,t,n){return n.options.strong||`*`}function f8(e,t,n,r){return n.safe(e.value,r)}function p8(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function m8(e,t,n){let r=(n8(n)+(n.options.ruleSpaces?` `:``)).repeat(p8(n));return n.options.ruleSpaces?r.slice(0,-1):r}var h8={blockquote:x6,break:T6,code:k6,definition:M6,emphasis:I6,hardBreak:T6,heading:z6,html:B6,image:H6,imageReference:W6,inlineCode:K6,link:Y6,linkReference:Z6,list:r8,listItem:a8,paragraph:o8,root:c8,strong:u8,text:f8,thematicBreak:m8};function g8(){return{enter:{table:_8,tableData:x8,tableHeader:x8,tableRow:y8},exit:{codeText:S8,table:v8,tableData:b8,tableHeader:b8,tableRow:b8}}}function _8(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function v8(e){this.exit(e),this.data.inTable=void 0}function y8(e){this.enter({type:`tableRow`,children:[]},e)}function b8(e){this.exit(e)}function x8(e){this.enter({type:`tableCell`,children:[]},e)}function S8(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,C8));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function C8(e,t){return t===`|`?t:e}function w8(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
87
|
-
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
88
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return v6(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=h8.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function T8(){return{exit:{taskListCheckValueChecked:D8,taskListCheckValueUnchecked:D8,paragraph:O8}}}function E8(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:k8}}}function D8(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function O8(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function k8(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=h8.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function A8(){return[I3(),o6(),d6(),g8(),T8()]}function j8(e){return{extensions:[L3(),s6(e),f6(),w8(e),E8()]}}var M8={tokenize:K8,partial:!0},N8={tokenize:q8,partial:!0},P8={tokenize:J8,partial:!0},F8={tokenize:Y8,partial:!0},I8={tokenize:X8,partial:!0},L8={name:`wwwAutolink`,tokenize:W8,previous:Z8},R8={name:`protocolAutolink`,tokenize:G8,previous:Q8},z8={name:`emailAutolink`,tokenize:U8,previous:$8},B8={};function V8(){return{text:B8}}for(var H8=48;H8<123;)B8[H8]=z8,H8++,H8===58?H8=65:H8===91&&(H8=97);B8[43]=z8,B8[45]=z8,B8[46]=z8,B8[95]=z8,B8[72]=[z8,R8],B8[104]=[z8,R8],B8[87]=[z8,L8],B8[119]=[z8,L8];function U8(e,t,n){let r=this,i,a;return o;function o(t){return!e5(t)||!$8.call(r,r.previous)||t5(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return e5(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(I8,u,l)(t):t===45||t===95||p$(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&f$(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function W8(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Z8.call(r,r.previous)||t5(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(M8,e.attempt(N8,e.attempt(P8,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function G8(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Q8.call(r,r.previous)&&!t5(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(f$(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||h$(t)||y$(t)||S$(t)||x$(t)?n(t):e.attempt(N8,e.attempt(P8,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function K8(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function q8(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(F8,c,s)(t):t===null||y$(t)||S$(t)||t!==45&&x$(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function J8(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(F8,t,a)(o):o===null||y$(o)||S$(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Y8(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||y$(o)||S$(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||y$(e)||S$(e)?t(e):r(e)}function a(e){return f$(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):f$(t)?(e.consume(t),o):n(t)}}function X8(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return p$(e)?n(e):t(e)}}function Z8(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||y$(e)}function Q8(e){return!f$(e)}function $8(e){return!(e===47||e5(e))}function e5(e){return e===43||e===45||e===46||e===95||p$(e)}function t5(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var n5={tokenize:u5,partial:!0};function r5(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:s5,continuation:{tokenize:c5},exit:l5}},text:{91:{name:`gfmFootnoteCall`,tokenize:o5},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:i5,resolveTo:a5}}}}function i5(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=S1(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function a5(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function o5(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||y$(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(S1(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return y$(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function s5(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||y$(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=S1(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return y$(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),w$(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function c5(e,t,n){return e.check(z$,t,e.attempt(n5,t,n))}function l5(e){e.exit(`gfmFootnoteDefinition`)}function u5(e,t,n){let r=this;return w$(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function d5(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&o$(o,o.length,0,M$(s,e.slice(r+1,n),t)),o$(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),o$(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=j$(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=j$(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var f5=class{constructor(){this.map=[]}add(e,t,n){p5(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function p5(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function m5(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function h5(){return{flow:{null:{name:`table`,tokenize:g5,resolveAll:_5}}}}function g5(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):$(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):b$(t)?w$(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||y$(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,b$(t)?w$(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return b$(t)?w$(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||$(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return b$(t)?w$(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||$(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||$(n)?(e.exit(`tableRow`),t(n)):b$(n)?w$(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||y$(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function _5(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new f5;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(y5(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=v5(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=v5(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=v5(f,t,o,i,n,d)):(o[0]=o[1],d=v5(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&y5(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=m5(t.events,n))}return e}function v5(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},b5(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=b5(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=b5(t.events,n[2]),a=b5(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},b5(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function y5(e,t,n,r,i){let a=[],o=b5(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function b5(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var x5={name:`tasklistCheck`,tokenize:C5};function S5(){return{text:{91:x5}}}function C5(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return y$(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return $(r)?t(r):b$(r)?e.check({tokenize:w5},t,n)(r):n(r)}}function w5(e,t,n){return w$(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function T5(e){return l$([V8(),r5(),d5(e),h5(),S5()])}var E5={};function D5(e){let t=this,n=e||E5,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(T5(n)),a.push(A8()),o.push(j8(n))}function O5(e){return GD((0,N.useMemo)(()=>UN.query(`prs`,`comments`,{query:e,timeToLive:`60 seconds`}),[e.pullRequestId,e.repositoryName,e.profile,e.region]))}function k5(e){let[t,n]=(0,N.useState)(!1),[r,i]=(0,N.useState)(!1),a=()=>localStorage.getItem(e)===`true`,o=(0,N.useCallback)(()=>a()?!1:(n(!0),!0),[e]),s=(0,N.useCallback)(()=>{r&&localStorage.setItem(e,`true`),n(!1)},[r,e]);return{cancel:(0,N.useCallback)(()=>{n(!1)},[]),dismiss:s,dontRemind:r,isDismissed:a,setDontRemind:i,show:o,visible:t}}function A5({items:e,onRefresh:t,permissionPrompt:n,stableKey:r}){let[i,a]=(0,N.useState)(null),[o,s]=(0,N.useState)(null),c=(0,N.useRef)(!1),l=(0,N.useRef)(null),u=(0,N.useRef)(t);u.current=t;let d=(0,N.useCallback)(()=>u.current(),[]);return(0,N.useEffect)(()=>{n?c.current=!0:c.current&&(c.current=!1,d())},[n,d]),(0,N.useEffect)(()=>{if((i||o)&&!n){let e=500,t=Date.now(),n=()=>{if(Date.now()-t>3e4){a(null),s(null);return}d(),e=Math.min(e*1.5,3e3),l.current=setTimeout(n,e)};return l.current=setTimeout(n,e),()=>{l.current&&clearTimeout(l.current)}}},[i,o,n,d]),(0,N.useEffect)(()=>{a(null),s(null),l.current&&=(clearTimeout(l.current),null)},[r]),{pendingAdd:i,pendingRemove:o,add:e=>a(e),remove:e=>s(e)}}function j5({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`card`,className:OY(`bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm`,e),...t})}function M5({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`card-header`,className:OY(`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`,e),...t})}function N5({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`card-title`,className:OY(`leading-none font-semibold`,e),...t})}function P5({className:e,...t}){return(0,R.jsx)(`div`,{"data-slot":`card-content`,className:OY(`px-6`,e),...t})}var F5=e=>e===`green`?`text-green-600 dark:text-green-400`:e===`yellow`?`text-yellow-600 dark:text-yellow-400`:`text-red-600 dark:text-red-400`,I5=e=>e===`green`?`border-green-500/30`:e===`yellow`?`border-yellow-500/30`:`border-red-500/30`,L5=e=>e===`positive`?`outline`:e===`neutral`?`secondary`:`destructive`,R5=e=>e===`positive`?`border-green-500/30 text-green-600 dark:text-green-400`:``,z5=e=>{let t=new Date(e),n=t.toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}),r=Date.now()-t.getTime(),i=Math.floor(r/6e4);if(i<1)return`${n} · just now`;if(i<60)return`${n} · ${i}m ago`;let a=Math.floor(i/60);return a<24?`${n} · ${a}h ago`:`${n} · ${Math.floor(a/24)}d ago`},B5=e=>e.comments.length===0?0:Math.min(...e.comments.map(e=>new Date(e.root.creationDate).getTime())),V5=e=>1+e.replies.reduce((e,t)=>e+V5(t),0);function H5({score:e}){if(!e)return null;let t=CZ(e.total);return(0,R.jsx)(rX,{variant:`outline`,className:`${I5(t)} ${F5(t)} tabular-nums font-semibold`,children:e.total.toFixed(1)})}function U5({score:e}){if(!e)return(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground pt-2`,children:`Waiting for comment count...`});let t=CZ(e.total);return(0,R.jsxs)(`div`,{className:`space-y-3 pt-2`,children:[(0,R.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,R.jsx)(`span`,{className:`text-lg font-bold tabular-nums ${F5(t)}`,children:e.total.toFixed(1)}),(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`/ 10`}),(0,R.jsx)(`div`,{className:`ml-2 h-1.5 flex-1 overflow-hidden rounded-full bg-muted`,children:(0,R.jsx)(`div`,{className:`h-full rounded-full ${t===`green`?`bg-green-500`:t===`yellow`?`bg-yellow-500`:`bg-red-500`}`,style:{width:`${e.total*10}%`}})})]}),(0,R.jsx)(`div`,{className:`space-y-2`,children:e.categories.map(e=>(0,R.jsxs)(`div`,{className:`flex items-start gap-3 rounded border px-3 py-2`,children:[(0,R.jsx)(`span`,{className:`w-8 text-right text-xs font-semibold tabular-nums ${e.value>0?`text-green-600 dark:text-green-400`:e.value<0?`text-red-600 dark:text-red-400`:`text-muted-foreground`}`,children:e.value>0?`+${e.value}`:e.value}),(0,R.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`text-xs font-medium`,children:e.label}),(0,R.jsx)(rX,{variant:L5(e.status),className:`text-[10px] px-1.5 py-0 ${R5(e.status)}`,children:e.statusLabel})]}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:e.description})]})]},e.label))})]})}function W5({depth:e,thread:t}){return t.root.deleted?null:(0,R.jsxs)(`div`,{className:e>0?`ml-4 border-l-2 border-muted pl-3`:``,children:[(0,R.jsxs)(`div`,{className:`space-y-1 py-2`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,R.jsx)(`span`,{className:`font-medium`,children:t.root.author}),(0,R.jsx)(`span`,{children:`·`}),(0,R.jsx)(`span`,{children:z5(t.root.creationDate)})]}),(0,R.jsx)(`div`,{className:`prose prose-sm dark:prose-invert max-w-none break-words [&_a]:text-primary [&_img]:inline [&_img]:h-5 [&_img]:w-auto`,children:(0,R.jsx)(i3,{remarkPlugins:[D5],rehypePlugins:[D3],children:t.root.content})})]}),t.replies.map(t=>(0,R.jsx)(W5,{thread:t,depth:e+1},t.root.id))]})}function G5({pr:e}){return OE(O5({pullRequestId:e.id,repositoryName:e.repositoryName,profile:e.account.profile,region:e.account.region})).onInitialOrWaiting(()=>(0,R.jsx)(`div`,{className:`pt-2`,children:(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Loading comments...`})})).onError(()=>(0,R.jsx)(`div`,{className:`pt-2`,children:(0,R.jsx)(`p`,{className:`text-xs text-destructive`,children:`Failed to load comments`})})).onDefect(()=>(0,R.jsx)(`div`,{className:`pt-2`,children:(0,R.jsx)(`p`,{className:`text-xs text-destructive`,children:`Failed to load comments`})})).onSuccess(e=>{let t=e.reduce((e,t)=>e+t.comments.reduce((e,t)=>e+V5(t),0),0);return(0,R.jsxs)(`div`,{className:`pt-2`,children:[e.length===0&&(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No comments`}),t>0&&(0,R.jsx)(`div`,{className:`space-y-1`,children:[...e].sort((e,t)=>B5(t)-B5(e)).map((t,n)=>(0,R.jsxs)(`div`,{children:[t.filePath&&(0,R.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:t.filePath}),t.comments.map(e=>(0,R.jsx)(W5,{thread:e,depth:0},e.root.id)),n<e.length-1&&(0,R.jsx)(aZ,{className:`my-2`})]},t.filePath??`loc-${n}`))})]})}).render()}function K5({pr:e}){let t=O5({pullRequestId:e.id,repositoryName:e.repositoryName,profile:e.account.profile,region:e.account.region}),n=e.status===`MERGED`?e.lastModifiedDate.getTime()-e.creationDate.getTime():null,{timeToAddressFeedback:r,timeToFirstReview:i}=(0,N.useMemo)(()=>{if(!gE(t))return{timeToFirstReview:null,timeToAddressFeedback:null};let n=[];for(let e of t.value){let t=e=>{for(let r of e)n.push({author:r.root.author,date:new Date(r.root.creationDate)}),t(r.replies)};t(e.comments)}n.sort((e,t)=>e.date.getTime()-t.date.getTime());let r=n.find(t=>t.author!==e.author),i=r?r.date.getTime()-e.creationDate.getTime():null,a=e.isApproved&&e.approvedBy.some(t=>t!==e.author)?e.lastModifiedDate.getTime()-e.creationDate.getTime():null,o=i!=null&&a!=null?Math.min(i,a):i??a,s=[];for(let t=0;t<n.length;t++)if(n[t].author!==e.author){let r=n.slice(t+1).find(t=>t.author===e.author);r&&s.push(r.date.getTime()-n[t].date.getTime())}return{timeToFirstReview:o,timeToAddressFeedback:s.length>0?s.reduce((e,t)=>e+t,0)/s.length:null}},[t,e.author,e.creationDate,e.lastModifiedDate,e.isApproved,e.approvedBy]);return n!=null||i!=null||r!=null?(0,R.jsxs)(R.Fragment,{children:[n!=null&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Time to Merge`}),(0,R.jsx)(`span`,{className:`text-xs font-medium tabular-nums`,children:SX(n)})]}),i!=null&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Time to First Review`}),(0,R.jsx)(`span`,{className:`text-xs font-medium tabular-nums`,children:SX(i)})]}),r!=null&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Time to Address Feedback`}),(0,R.jsx)(`span`,{className:`text-xs font-medium tabular-nums`,children:SX(r)})]})]}):null}function q5({children:e,count:t,title:n}){let[r,i]=(0,N.useState)(!1);return(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[(0,R.jsxs)(`button`,{className:`flex w-full items-center gap-2 px-4 py-2.5 text-left text-sm font-medium hover:bg-accent/50`,onClick:()=>i(!r),children:[(0,R.jsx)(aF,{className:`size-4 text-muted-foreground transition-transform ${r?``:`-rotate-90`}`}),n,t!==void 0&&(0,R.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`(`,t,`)`]})]}),r&&(0,R.jsx)(`div`,{className:`border-t px-4 pb-3`,children:e})]})}var J5=`Required approvers`,Y5=`Optional approvers`;function X5({approvalRules:e,approvedBy:t,currentUser:n,knownUserArns:r,onRefresh:i,onSetApprovers:a,permissionPrompt:o,repoAccountId:s,required:c,ruleName:l,title:u}){let[d,f]=(0,N.useState)(!1),[p,m]=(0,N.useState)(``),h=e.flatMap(e=>e.poolMembers).join(`,`),g=A5({items:e.flatMap(e=>e.poolMembers),stableKey:h,permissionPrompt:o,onRefresh:i}),{pendingAdd:_,pendingRemove:v}=g,y=(0,N.useMemo)(()=>{let t=new Set;for(let n of e)if(n.fromTemplate||n.ruleName===l)for(let e of n.poolMembers)t.add(e);return[...t]},[e,l]),b=e.find(e=>e.ruleName===l&&!e.fromTemplate),x=b?.poolMemberArns??[],S=b?.poolMembers??[],C=(0,N.useMemo)(()=>[...r.entries()].filter(([e])=>!y.includes(e)&&e!==_),[r,y,_]),w=s?`CodeCommitApprovers:${s}:`:``,T=e=>{let t=e.startsWith(`CodeCommitApprovers:`)?e:`${w}${e}`,n=/^CodeCommitApprovers:[^:]*:(.+)$/.exec(t);g.add(n?n[1]:e),a([...x,t]),f(!1)},E=e=>{g.remove(e);let t=S.indexOf(e);t>=0&&a(x.filter((e,n)=>n!==t))},D=e.length>0&&e.every(e=>e.satisfied);return(0,R.jsxs)(j5,{children:[(0,R.jsxs)(M5,{className:`flex flex-row items-center justify-between`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(N5,{className:`text-sm`,children:u}),c&&e.length>0&&(D?(0,R.jsx)(rX,{variant:`outline`,className:`border-green-500/30 text-green-600 dark:text-green-400`,children:`Satisfied`}):(0,R.jsx)(rX,{variant:`secondary`,children:`Pending`}))]}),(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>f(!d),children:(0,R.jsx)(MF,{className:`size-4`})})]}),(0,R.jsxs)(P5,{className:`space-y-2`,children:[d&&(0,R.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-md border p-2 bg-muted/30`,children:[C.length>0&&(0,R.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:C.map(([e,t])=>(0,R.jsx)(Z,{variant:`outline`,size:`sm`,className:`h-6 text-xs gap-1`,onClick:()=>m(e),children:e},e))}),(0,R.jsxs)(`div`,{className:`flex gap-1`,children:[(0,R.jsx)(`input`,{placeholder:w?`${w}USERNAME`:`username`,className:`flex-1 rounded-md border bg-background px-2 py-1 text-xs font-mono`,value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Enter`&&p.trim()&&(T(p.trim()),m(``))}}),(0,R.jsx)(Z,{size:`sm`,className:`h-7 text-xs`,disabled:!p.trim()||!w,onClick:()=>{T(p.trim()),m(``)},children:`Add`})]})]}),!d&&C.length>0&&(0,R.jsxs)(`div`,{className:`flex flex-wrap gap-1 items-center`,children:[(0,R.jsx)(`span`,{className:`text-[10px] text-muted-foreground/60 uppercase tracking-wider`,children:`Suggested`}),C.slice(0,5).map(([e,t])=>(0,R.jsxs)(`button`,{className:`inline-flex items-center gap-0.5 rounded-md border border-dashed border-muted-foreground/30 px-1.5 py-0.5 text-[11px] text-muted-foreground/60 hover:border-primary/50 hover:text-foreground transition-colors`,onClick:()=>T(t),children:[(0,R.jsx)(MF,{className:`size-2.5`}),e]},e))]}),(y.length>0||_)&&(0,R.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[y.map(e=>{let r=t.includes(e),i=S.includes(e),a=e===v;return(0,R.jsxs)(rX,{variant:e===n?`default`:r?`outline`:`secondary`,className:`text-xs gap-1 ${r?`border-green-500/30 text-green-600 dark:text-green-400`:``} ${a?`opacity-50`:``}`,children:[a&&(0,R.jsx)(SF,{className:`size-3 animate-spin`}),!a&&r&&(0,R.jsx)(iF,{className:`size-3`}),e,i&&!a&&(0,R.jsx)(`button`,{className:`ml-0.5 hover:text-destructive`,onClick:()=>E(e),children:(0,R.jsx)(WF,{className:`size-3`})})]},e)}),_&&!y.includes(_)&&(0,R.jsxs)(rX,{variant:`secondary`,className:`text-xs gap-1 opacity-70`,children:[(0,R.jsx)(SF,{className:`size-3 animate-spin`}),_]})]})]})]})}function Z5(){let{accountId:e,prId:t}=er(),n=GD(TP),r=YD(pP),i=YD(mP),a=YD(hP),o=(0,N.useRef)(null),s=(0,N.useMemo)(()=>t?n.pullRequests.find(n=>n.id===t&&(n.account.awsAccountId===e||n.account.profile===e))??null:null,[e,t,n.pullRequests]),c=s?.account?.repoAccountId||``,l=(0,N.useMemo)(()=>{let e=new Map,t=t=>{!t||t===`*`||e.has(t)||e.set(t,c?`CodeCommitApprovers:${c}:${t}`:t)};for(let e of n.pullRequests){t(e.author);for(let n of e.approvedBy)t(n);for(let n of e.commentedBy)t(n);for(let n of e.approvalRules)for(let e of n.poolMembers)t(e)}return e},[n.pullRequests,c]);(0,N.useEffect)(()=>{if(s||!e||!t)return;let n=`${e}:${t}`;o.current!==n&&(o.current=n,r({params:{awsAccountId:e,prId:MM.make(t)}}))},[s,e,t,r]);let u=(0,N.useMemo)(()=>s?Tc(SZ(s,new Date)):void 0,[s]),d=Xn(),f=YD(qN),p=k5(qi.grantedDismissed),m=k5(qi.dockerDismissed),h=GD(tP),g=YD(nP),_=YD(rP),v=s?.account.awsAccountId??s?.account.profile,[y,b]=rZ((0,N.useMemo)(()=>gE(h)&&v?h.value.some(e=>e.awsAccountId===v&&e.pullRequestId===t):!1,[h,v,t])),x=(0,N.useCallback)(()=>{if(!v||!s)return;let e={awsAccountId:v,pullRequestId:s.id};b(!y),y?_({payload:e}):g({payload:e})},[v,y,s,g,_]),[S,C]=(0,N.useState)(!1),w=(0,N.useRef)(s?.fetchedAt);(0,N.useEffect)(()=>{S&&s?.fetchedAt&&s.fetchedAt!==w.current&&C(!1),w.current=s?.fetchedAt},[S,s?.fetchedAt]);let T=(0,N.useCallback)(()=>{!v||!t||S||(C(!0),r({params:{awsAccountId:v,prId:MM.make(t)}}))},[v,S,t,r]),E=s?s.link||`https://${s.account.region}.console.aws.amazon.com/codesuite/codecommit/repositories/${s.repositoryName}/pull-requests/${s.id}?region=${s.account.region}`:``,[D,O]=(0,N.useState)(!1),k=(0,N.useCallback)(()=>{E&&navigator.clipboard.writeText(E).then(()=>{O(!0),setTimeout(()=>O(!1),2e3)},()=>{})},[E]),A=YD(cP),j=(0,N.useMemo)(()=>n.sandboxes?.find(n=>n.pullRequestId===t&&n.awsAccountId===e&&n.status!==`stopped`&&n.status!==`error`),[n.sandboxes,t,e]),[M,ee]=(0,N.useState)(!1);(0,N.useEffect)(()=>{M&&j&&(ee(!1),d(`/sandbox/${j.id}`))},[M,j,d]);let P=(0,N.useCallback)(()=>{if(!s)return;let e=s.account.awsAccountId??s.account.profile;A({payload:{pullRequestId:s.id,awsAccountId:e,repositoryName:s.repositoryName,sourceBranch:s.sourceBranch,profile:s.account.profile,region:s.account.region}}),ee(!0)},[s,A]),F=(0,N.useCallback)(()=>{if(s){if(j){d(`/sandbox/${j.id}`);return}m.show()||P()}},[s,j,m,P,d]),I=()=>{m.dismiss(),P()},te=(0,N.useCallback)(()=>{!s||!E||f({payload:{profile:s.account.profile,link:E}})},[E,f,s]),ne=(0,N.useCallback)(()=>{s&&(p.show()||te())},[p,s,te]),re=()=>{p.dismiss(),te()};if((0,N.useEffect)(()=>{let e=e=>{e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||(e.key===`Escape`?(e.preventDefault(),d(`/`)):(e.key===`Enter`||e.key===`o`)&&s?.link?ne():e.key===`.`&&s&&(e.preventDefault(),F()))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[ne,F,d,s]),!s)return(0,R.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 py-20 text-muted-foreground`,children:[(0,R.jsx)(SF,{className:`size-6 animate-spin opacity-40`}),(0,R.jsx)(`p`,{className:`text-sm`,children:`Loading pull request...`})]});let ie=s.status===`OPEN`,L=ie?s.isMergeable?(0,R.jsx)(rX,{variant:`outline`,className:`border-green-500/30 text-green-600 dark:text-green-400`,children:`Mergeable`}):(0,R.jsx)(rX,{variant:`destructive`,children:`Conflict`}):null,ae=ie?s.isApproved?(0,R.jsx)(rX,{variant:`outline`,className:`border-green-500/30 text-green-600 dark:text-green-400`,children:`Approved`}):(0,R.jsx)(rX,{variant:`secondary`,children:`Pending`}):null;return(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,R.jsxs)(Z,{variant:`ghost`,size:`sm`,onClick:()=>d(`/`),children:[(0,R.jsx)(QP,{className:`size-4`}),`Back`]}),(0,R.jsxs)(aX,{className:`ml-auto`,children:[(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 text-xs`,onClick:T,disabled:S,children:[(0,R.jsx)(NF,{className:`size-3.5 ${S?`animate-spin`:``}`}),`Refresh`]}),(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 text-xs`,onClick:x,children:[y?(0,R.jsx)(eF,{className:`size-3.5`}):(0,R.jsx)(tF,{className:`size-3.5`}),y?`Unsubscribe`:`Subscribe`]}),(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 text-xs`,onClick:F,children:[(0,R.jsx)(uF,{className:`size-3.5`}),j?`Open Sandbox`:`Sandbox`]}),(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 text-xs`,onClick:k,children:[D?(0,R.jsx)(iF,{className:`size-3.5`}):(0,R.jsx)(dF,{className:`size-3.5`}),D?`Copied`:`Copy Link`]}),(0,R.jsxs)(Z,{variant:`default`,size:`sm`,className:`h-7 text-xs`,onClick:ne,children:[(0,R.jsx)(pF,{className:`size-3.5`}),`Open in Console`]})]})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h1`,{className:`text-xl font-semibold tracking-tight`,children:s.title}),(0,R.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-2`,children:[L,ae,(0,R.jsx)(rX,{variant:`outline`,children:s.status}),(0,R.jsx)(H5,{score:u}),(0,R.jsx)(Di,{to:`/?f=author:${encodeURIComponent(s.author)}`,className:`text-sm text-muted-foreground hover:underline`,children:s.author}),(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`·`}),(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:_X(s.creationDate)}),s.fetchedAt&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`·`}),(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:vX(s.fetchedAt,new Date,`Fetched`)})]})]})]}),(0,R.jsx)(aZ,{}),(0,R.jsx)(j5,{children:(0,R.jsxs)(P5,{className:`grid grid-cols-[auto_1fr] gap-x-6 gap-y-2 py-4 text-sm`,children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Account`}),(0,R.jsx)(Di,{to:`/?f=account:${encodeURIComponent(s.account.profile)}`,className:`font-mono text-xs hover:underline`,children:s.account.profile}),(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Repository`}),(0,R.jsx)(Di,{to:`/?f=repo:${encodeURIComponent(s.repositoryName)}`,className:`font-mono text-xs hover:underline`,children:s.repositoryName}),(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Branch`}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(rX,{variant:`outline`,className:`font-mono text-xs`,children:s.sourceBranch}),(0,R.jsx)($P,{className:`size-3 text-muted-foreground`}),(0,R.jsx)(rX,{variant:`outline`,className:`font-mono text-xs`,children:s.destinationBranch})]}),(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Author`}),(0,R.jsx)(Di,{to:`/?f=author:${encodeURIComponent(s.author)}`,className:`text-xs hover:underline`,children:s.author}),QY(s.title)&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Scope`}),(0,R.jsx)(Di,{to:`/?f=scope:${encodeURIComponent(QY(s.title))}`,className:`text-xs hover:underline`,children:QY(s.title)})]}),(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Status`}),(0,R.jsx)(`div`,{className:`flex items-center gap-2`,children:s.status===`MERGED`?(0,R.jsx)(Di,{to:`/?f=status:merged`,className:`hover:underline`,children:(0,R.jsx)(rX,{variant:`outline`,className:`border-purple-500/30 text-purple-600 dark:text-purple-400`,children:`Merged`})}):s.status===`CLOSED`?(0,R.jsx)(Di,{to:`/?f=status:closed`,className:`hover:underline`,children:(0,R.jsx)(rX,{variant:`outline`,className:`border-red-500/30 text-red-600 dark:text-red-400`,children:`Closed`})}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Di,{to:`/?f=status:${s.isApproved?`approved`:`pending`}`,className:`hover:underline`,children:s.isApproved?(0,R.jsx)(rX,{variant:`outline`,className:`border-green-500/30 text-green-600 dark:text-green-400`,children:`Approved`}):(0,R.jsx)(rX,{variant:`secondary`,children:`Pending`})}),(0,R.jsx)(Di,{to:`/?f=status:${s.isMergeable?`mergeable`:`conflicts`}`,className:`hover:underline`,children:s.isMergeable?(0,R.jsx)(rX,{variant:`outline`,className:`border-green-500/30 text-green-600 dark:text-green-400`,children:`Mergeable`}):(0,R.jsx)(rX,{variant:`destructive`,children:`Conflict`})})]})}),(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`ID`}),(0,R.jsx)(`span`,{className:`font-mono text-xs`,children:s.id}),(0,R.jsx)(K5,{pr:s})]})}),[{title:`Required Approvers`,ruleName:J5,required:!0},{title:`Optional Approvers`,ruleName:Y5,required:!1}].map(t=>(0,R.jsx)(X5,{title:t.title,ruleName:t.ruleName,required:t.required,approvalRules:s.approvalRules,approvedBy:s.approvedBy,knownUserArns:l,repoAccountId:c,currentUser:n.currentUser,permissionPrompt:!!n.permissionPrompt,onSetApprovers:e=>{let n=s.approvalRules.find(e=>e.ruleName===t.ruleName&&!e.fromTemplate);n?a({payload:{pullRequestId:s.id,approvalRuleName:n.ruleName,requiredApprovals:t.required&&e.length>0?e.length:0,poolMembers:e.length>0?e:[`*`],account:s.account}}):e.length>0&&i({payload:{pullRequestId:s.id,approvalRuleName:t.ruleName,requiredApprovals:t.required?e.length:0,poolMembers:e,account:s.account}})},onRefresh:()=>r({params:{awsAccountId:e,prId:MM.make(s.id)}})},t.ruleName)),(0,R.jsx)(q5,{title:`Health Score Breakdown`,children:(0,R.jsx)(U5,{score:u})}),s.description&&(0,R.jsxs)(j5,{children:[(0,R.jsx)(M5,{children:(0,R.jsx)(N5,{className:`text-sm`,children:`Description`})}),(0,R.jsx)(P5,{children:(0,R.jsx)(`div`,{className:`prose prose-sm dark:prose-invert max-w-none`,children:(0,R.jsx)(i3,{remarkPlugins:[D5],rehypePlugins:[D3],children:s.description})})})]}),(0,R.jsx)(q5,{title:`Comments`,...s.commentCount===void 0?{}:{count:s.commentCount},children:(0,R.jsx)(G5,{pr:s},s.id)}),(0,R.jsx)(kY,{open:p.visible,onOpenChange:p.cancel,children:(0,R.jsxs)(MY,{children:[(0,R.jsxs)(NY,{children:[(0,R.jsx)(FY,{children:`Granted CLI Required`}),(0,R.jsxs)(IY,{children:[`"Open in Console" uses`,` `,(0,R.jsx)(`a`,{href:`https://docs.commonfate.io/granted/introduction`,target:`_blank`,rel:`noopener noreferrer`,className:`underline`,children:`Granted`}),` `,`to assume the AWS role for this account. Make sure the`,` `,(0,R.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`,children:`assume`}),` CLI is installed and configured before continuing.`]})]}),(0,R.jsxs)(PY,{children:[(0,R.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-muted-foreground mr-auto`,children:[(0,R.jsx)(`input`,{type:`checkbox`,checked:p.dontRemind,onChange:e=>p.setDontRemind(e.target.checked),className:`accent-primary`}),`Don't remind again`]}),(0,R.jsx)(Z,{variant:`ghost`,onClick:p.cancel,children:`Cancel`}),(0,R.jsx)(Z,{onClick:re,children:`Continue`})]})]})}),(0,R.jsx)(kY,{open:m.visible,onOpenChange:m.cancel,children:(0,R.jsxs)(MY,{children:[(0,R.jsxs)(NY,{children:[(0,R.jsx)(FY,{children:`Docker Required`}),(0,R.jsx)(IY,{children:`Sandbox uses Docker to run a code-server container. Make sure Docker is started before continuing.`})]}),(0,R.jsxs)(PY,{children:[(0,R.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-muted-foreground mr-auto`,children:[(0,R.jsx)(`input`,{type:`checkbox`,checked:m.dontRemind,onChange:e=>m.setDontRemind(e.target.checked),className:`accent-primary`}),`Don't show again`]}),(0,R.jsx)(Z,{onClick:I,children:`OK`})]})]})})]})}var Q5={conflict:{label:`conflict`,dot:`bg-red-500`,badge:`border-red-500/30 text-red-500`},approved:{label:`approved`,dot:`bg-green-500`,badge:`border-green-500/30 text-green-500`},pending:{label:`pending`,dot:`bg-yellow-500`,badge:`border-yellow-500/30 text-yellow-500`},merged:{label:`merged`,dot:`bg-purple-500`,badge:`border-purple-500/30 text-purple-500`},closed:{label:`closed`,dot:`bg-red-500`,badge:`border-red-500/30 text-red-500`}};function $5(e){return e.status===`MERGED`?`merged`:e.status===`CLOSED`?`closed`:e.isMergeable?e.isApproved?`approved`:`pending`:`conflict`}function e7({currentUser:e,pr:t,showUpdated:n,to:r}){let i=KM(t,e),a=(0,N.useMemo)(()=>Tc(SZ(t,new Date)),[t]),o=a?CZ(a.total):void 0,s=o===`green`?`text-green-600 dark:text-green-400`:o===`yellow`?`text-yellow-600 dark:text-yellow-400`:`text-red-600 dark:text-red-400`,c=Q5[$5(t)];return(0,R.jsxs)(Di,{to:r,className:`group flex cursor-pointer flex-col gap-2.5 px-5 py-5 transition-colors hover:bg-accent/50 no-underline text-inherit`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,R.jsxs)(rX,{variant:`outline`,className:`gap-1.5 ${c.badge}`,children:[(0,R.jsx)(`span`,{className:`size-1.5 rounded-full ${c.dot}`}),c.label]}),i&&(0,R.jsxs)(rX,{variant:`outline`,className:`border-yellow-500/30 text-yellow-500 gap-1`,children:[(0,R.jsx)(mF,{className:`size-3`}),`Review`]}),a&&(0,R.jsx)(`span`,{className:`font-mono text-base font-semibold tabular-nums ${s}`,children:a.total.toFixed(1)}),(0,R.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5 text-xs text-muted-foreground`,children:[t.author,(0,R.jsx)(`span`,{className:`opacity-40`,children:`·`}),n?vX(t.lastModifiedDate,new Date):_X(t.creationDate),t.commentCount!==void 0&&t.commentCount>0&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`opacity-40`,children:`·`}),(0,R.jsx)(DF,{className:`size-3`}),t.commentCount]})]})]}),(0,R.jsx)(`div`,{children:(0,R.jsx)(rX,{variant:`outline`,className:`font-mono text-[11px] font-normal text-muted-foreground`,children:t.repositoryName})}),(0,R.jsx)(`span`,{className:`text-[15px] font-medium leading-snug`,children:t.title}),t.description&&(0,R.jsx)(`p`,{className:`line-clamp-1 text-sm text-muted-foreground`,children:t.description.split(`
|
|
89
|
-
`).slice(0,2).join(` `)})]})}var t7=(e,t)=>{switch(t.key){case`account`:return e.account?.profile===t.value;case`author`:return e.author===t.value;case`scope`:return QY(e.title)===t.value;case`repo`:return e.repositoryName===t.value;case`approver`:return e.approvedBy.some(e=>e===t.value);case`commenter`:return e.commentedBy.some(e=>e===t.value);case`size`:{let n=e.filesChanged;if(n==null)return!1;switch(t.value){case`small`:return n<5;case`medium`:return n>=5&&n<=15;case`large`:return n>=16&&n<=30;case`xlarge`:return n>30;default:return!0}}case`status`:switch(t.value){case`approved`:return e.status===`OPEN`&&e.isApproved;case`pending`:return e.status===`OPEN`&&!e.isApproved;case`mergeable`:return e.status===`OPEN`&&e.isMergeable;case`conflicts`:return e.status===`OPEN`&&!e.isMergeable;case`merged`:return e.status===`MERGED`;case`closed`:return e.status===`CLOSED`;case`open`:return e.status===`OPEN`;default:return!0}default:return!0}};function n7(){let e=GD(TP),t=YD($N),{state:n,toggleFilter:r}=ZY(),i=e.status===`loading`,a=e.pullRequests,o=(0,N.useMemo)(()=>{if(a.length===0)return[];let{filters:t,from:r,q:i,review:o,to:s}=n,c=i.toLowerCase(),l=e=>i?e.repositoryName.toLowerCase().includes(c)||e.title.toLowerCase().includes(c)||e.author.toLowerCase().includes(c)||e.sourceBranch.toLowerCase().includes(c)||(e.description?.toLowerCase().includes(c)??!1):!0,u={open:`lifecycle`,merged:`lifecycle`,closed:`lifecycle`,approved:`approval`,pending:`approval`,mergeable:`merge`,conflicts:`merge`},d=new Map;for(let e of t){let t=e.key===`status`?`status:${u[e.value]??e.value}`:e.key,n=d.get(t);n?n.push(e):d.set(t,[e])}let f=t.some(e=>e.key===`status`&&[`approved`,`pending`,`mergeable`,`conflicts`].includes(e.value)),p=t.some(e=>e.key===`status`&&[`open`,`merged`,`closed`].includes(e.value)),m=f&&!p,h=e=>m&&e.status!==`OPEN`?!1:[...d.values()].every(t=>t.some(t=>t7(e,t))),g=r?new Date(r).getTime():void 0,_=s?new Date(s).getTime():void 0,v=t.find(e=>e.key===`status`),y=e=>{if(!g||!_)return!0;let t=v?.value===`merged`||v?.value===`closed`?e.lastModifiedDate.getTime():e.creationDate.getTime();return t>=g&&t<_},b=t=>!o||KM(t,e.currentUser);return a.filter(e=>l(e)&&h(e)&&y(e)&&b(e)).sort((e,t)=>t.lastModifiedDate.getTime()-e.lastModifiedDate.getTime())},[a,n,e.currentUser]),s=e=>{let t=e.account.awsAccountId??e.account.profile;return`/accounts/${encodeURIComponent(t)}/prs/${e.id}`};if(o.length===0){if(i)return(0,R.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 py-20 text-muted-foreground`,children:[(0,R.jsx)(SF,{className:`size-8 animate-spin opacity-40`}),(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:`Loading pull requests...`}),a.length>0&&(0,R.jsxs)(`p`,{className:`text-xs opacity-50`,children:[a.length,` PRs fetched (filter hides all)`]})]});let n=[...new Set(e.accounts.filter(e=>e.enabled).map(e=>e.profile))],o=a.length===0&&n.length>0;return(0,R.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 py-20 text-muted-foreground`,children:[(0,R.jsxs)(`svg`,{className:`size-16 opacity-30`,viewBox:`0 0 64 64`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,R.jsx)(`rect`,{x:`8`,y:`12`,width:`48`,height:`40`,rx:`4`,stroke:`currentColor`,strokeWidth:`2`}),(0,R.jsx)(`path`,{d:`M8 24h48`,stroke:`currentColor`,strokeWidth:`2`}),(0,R.jsx)(`circle`,{cx:`16`,cy:`18`,r:`2`,fill:`currentColor`}),(0,R.jsx)(`circle`,{cx:`22`,cy:`18`,r:`2`,fill:`currentColor`}),(0,R.jsx)(`circle`,{cx:`28`,cy:`18`,r:`2`,fill:`currentColor`}),(0,R.jsx)(`path`,{d:`M24 36h16M28 42h8`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]}),(0,R.jsx)(`p`,{className:`text-sm`,children:`No open pull requests`}),a.length>0&&(0,R.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,R.jsxs)(`p`,{className:`text-xs opacity-50`,children:[a.length,` PRs in cache (all merged or closed)`]}),(0,R.jsxs)(`div`,{className:`flex gap-1`,children:[(0,R.jsx)(Z,{variant:`outline`,size:`sm`,onClick:()=>r(`status`,`merged`),children:`Show merged`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,onClick:()=>r(`status`,`closed`),children:`Show closed`})]})]}),o&&(0,R.jsxs)(j5,{className:`mt-4 w-full max-w-sm`,children:[(0,R.jsx)(M5,{className:`pb-2`,children:(0,R.jsx)(N5,{className:`text-sm`,children:`SSO Login`})}),(0,R.jsxs)(P5,{className:`flex flex-col gap-2`,children:[(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground mb-1`,children:`Session may have expired. Log in to fetch PRs.`}),n.map(e=>(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`justify-start gap-2`,onClick:()=>t({payload:{profile:e}}),children:[(0,R.jsx)(CF,{className:`size-3.5`}),e]},e))]})]})]})}if(n.groupBy!==`account`)return(0,R.jsx)(`div`,{className:`flex flex-col gap-2`,children:o.map(t=>(0,R.jsx)(`div`,{className:`rounded-lg border bg-card`,children:(0,R.jsx)(e7,{pr:t,to:s(t),showUpdated:!0,currentUser:e.currentUser})},t.id))});let c=new Map;for(let e of o){let t=e.account?.profile??`unknown`;c.has(t)||c.set(t,[]),c.get(t).push(e)}return(0,R.jsx)(`div`,{className:`space-y-8`,children:[...c.entries()].map(([t,n])=>(0,R.jsxs)(`section`,{children:[(0,R.jsxs)(`div`,{className:`mb-3 flex items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`text-xs font-medium uppercase tracking-wider text-muted-foreground`,children:t}),(0,R.jsx)(rX,{variant:`secondary`,children:n.length})]}),(0,R.jsx)(`div`,{className:`flex flex-col gap-2`,children:n.map(t=>(0,R.jsx)(`div`,{className:`rounded-lg border bg-card`,children:(0,R.jsx)(e7,{pr:t,to:s(t),currentUser:e.currentUser})},t.id))})]},t))})}var r7=e=>{switch(e){case`running`:return`default`;case`creating`:case`cloning`:case`starting`:return`secondary`;case`error`:return`destructive`;default:return`outline`}};function i7({logs:e}){let t=(0,N.useRef)(null);return(0,N.useEffect)(()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight)},[e]),(0,R.jsx)(`div`,{ref:t,className:`flex-1 min-h-0 overflow-y-auto bg-black/40 rounded-lg p-4 font-mono text-xs leading-relaxed`,children:e.trimEnd().split(`
|
|
90
|
-
`).map((e,t)=>{let n=e.match(/^\[([^\]]+)\]\s*(.*)$/);if(!n)return(0,R.jsx)(`div`,{className:`text-muted-foreground`,children:e},t);let[,r,i]=n;return(0,R.jsxs)(`div`,{className:`flex gap-3`,children:[(0,R.jsx)(`span`,{className:`text-muted-foreground/50 shrink-0 select-none`,children:r}),(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:i})]},t)})})}function a7(){let{sandboxId:e}=er(),[t,n]=Fi(),r=GD(TP),i=YD(lP),a=YD(uP),o=YD(dP),s=Xn(),[c,l]=(0,N.useState)(t.get(`view`)===`logs`),u=(0,N.useCallback)(()=>{l(e=>{let t=!e;return n(t?{view:`logs`}:{},{replace:!0}),t})},[n]),d=(0,N.useMemo)(()=>r.sandboxes?.find(t=>t.id===e)??null,[r.sandboxes,e]),f=(0,N.useCallback)(()=>{e&&i({params:{sandboxId:LM.make(e)}})},[e,i]),p=d?`/accounts/${d.awsAccountId}/prs/${d.pullRequestId}`:`/`;if(!d)return(0,R.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 py-20 text-muted-foreground`,children:[(0,R.jsx)(SF,{className:`size-6 animate-spin opacity-40`}),(0,R.jsx)(`p`,{className:`text-sm`,children:`Loading sandbox...`})]});let m=d.status===`running`,h=[`creating`,`cloning`,`starting`].includes(d.status);return(0,R.jsxs)(`div`,{className:`flex flex-col h-[calc(100vh-4rem)]`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-2 border-b shrink-0`,children:[(0,R.jsxs)(Z,{variant:`ghost`,size:`sm`,onClick:()=>s(p),children:[(0,R.jsx)(QP,{className:`size-4`}),`Back to PR`]}),(0,R.jsx)(rX,{variant:`outline`,className:`font-mono text-xs`,children:d.repositoryName}),(0,R.jsx)(rX,{variant:`secondary`,className:`font-mono text-xs`,children:d.sourceBranch}),(0,R.jsxs)(`div`,{className:`ml-auto flex items-center gap-1.5`,children:[h&&(0,R.jsx)(SF,{className:`size-3.5 animate-spin text-muted-foreground`}),(0,R.jsx)(rX,{variant:r7(d.status),className:`mr-1`,children:d.status}),d.logs&&(0,R.jsx)(Z,{variant:c?`secondary`:`outline`,size:`sm`,onClick:u,children:c?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(uF,{className:`size-3.5`}),` Editor`]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(FF,{className:`size-3.5`}),` Logs`]})}),(d.status===`stopped`||d.status===`error`)&&d.containerId&&(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,onClick:()=>e&&a({params:{sandboxId:LM.make(e)}}),children:[(0,R.jsx)(jF,{className:`size-3`}),`Restart`]}),(d.status===`stopped`||d.status===`error`)&&(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`text-destructive hover:text-destructive`,onClick:()=>{e&&(o({params:{sandboxId:LM.make(e)}}),s(`/sandboxes`))},children:[(0,R.jsx)(UF,{className:`size-3`}),`Delete`]}),(h||m)&&(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`text-destructive hover:text-destructive`,onClick:f,children:[(0,R.jsx)(BF,{className:`size-3`}),`Stop`]})]})]}),c||!m?(0,R.jsxs)(`div`,{className:`flex-1 min-h-0 flex flex-col gap-3 p-4`,children:[d.statusDetail&&(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground shrink-0`,children:d.statusDetail}),d.error&&(0,R.jsx)(`p`,{className:`rounded bg-destructive/10 px-3 py-2 text-xs text-destructive font-mono break-all shrink-0`,children:d.error}),d.logs?(0,R.jsx)(i7,{logs:d.logs}):(0,R.jsx)(`div`,{className:`flex-1 flex items-center justify-center text-muted-foreground text-sm`,children:`No logs available`})]}):(0,R.jsx)(`iframe`,{src:`http://localhost:${d.port}/`,className:`flex-1 w-full border-0`,title:`Code Sandbox`})]})}var o7=e=>{switch(e){case`running`:return`default`;case`creating`:case`cloning`:case`starting`:return`secondary`;case`error`:return`destructive`;default:return`outline`}},s7=e=>[`creating`,`cloning`,`starting`,`running`].includes(e),c7=e=>{let t=new Date(e),n=new Date().getTime()-t.getTime();return n<6e4?`just now`:n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:`${Math.floor(n/864e5)}d ago`};function l7(){let e=GD(TP),t=YD(lP),n=YD(uP),r=YD(dP),i=Xn(),a=e.sandboxes??[];return a.length===0?(0,R.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 py-20 text-muted-foreground`,children:[(0,R.jsx)(nF,{className:`size-8 opacity-30`}),(0,R.jsx)(`p`,{className:`text-sm`,children:`No sandboxes`}),(0,R.jsx)(`p`,{className:`text-xs`,children:`Open a PR and press "." or click "Sandbox" to create one`})]}):(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight`,children:`Sandboxes`}),(0,R.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[a.length,` total`]})]}),(0,R.jsx)(`div`,{className:`space-y-2`,children:a.map(e=>(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card px-4 py-3 hover:bg-accent/50 cursor-pointer`,onClick:()=>i(`/sandbox/${e.id}`),children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[s7(e.status)&&e.status!==`running`?(0,R.jsx)(SF,{className:`size-4 animate-spin text-muted-foreground shrink-0`}):(0,R.jsx)(nF,{className:`size-4 text-muted-foreground shrink-0`}),(0,R.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(`span`,{className:`font-mono text-sm truncate`,children:e.repositoryName}),(0,R.jsx)(rX,{variant:`outline`,className:`font-mono text-[10px] shrink-0`,children:e.sourceBranch})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground mt-0.5`,children:[(0,R.jsxs)(`span`,{children:[`PR #`,e.pullRequestId]}),(0,R.jsx)(`span`,{children:`·`}),(0,R.jsx)(`span`,{children:c7(e.createdAt)}),e.port&&e.status===`running`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{children:`·`}),(0,R.jsxs)(`span`,{children:[`port `,e.port]})]}),e.statusDetail&&s7(e.status)&&e.status!==`running`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{children:`·`}),(0,R.jsx)(`span`,{className:`truncate`,children:e.statusDetail})]})]})]}),(0,R.jsx)(rX,{variant:o7(e.status),className:`shrink-0`,children:e.status}),e.logs&&(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:t=>{t.stopPropagation(),i(`/sandbox/${e.id}?view=logs`)},children:(0,R.jsx)(FF,{className:`size-3.5`})}),(e.status===`running`||s7(e.status))&&(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:n=>{n.stopPropagation(),t({params:{sandboxId:LM.make(e.id)}})},children:(0,R.jsx)(BF,{className:`size-3`})}),(e.status===`stopped`||e.status===`error`)&&e.containerId&&(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:t=>{t.stopPropagation(),n({params:{sandboxId:LM.make(e.id)}})},children:(0,R.jsx)(jF,{className:`size-3.5`})}),(e.status===`stopped`||e.status===`error`)&&(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:t=>{t.stopPropagation(),r({params:{sandboxId:LM.make(e.id)}})},children:(0,R.jsx)(UF,{className:`size-3.5`})})]}),e.error&&(0,R.jsx)(`p`,{className:`mt-2 rounded bg-destructive/10 px-3 py-1.5 text-xs text-destructive font-mono break-all`,children:e.error})]},e.id))})]})}var u7=[{key:`Esc`,desc:`Back / Close`},{key:`R`,desc:`Refresh PRs`},{key:`/`,desc:`Filter PRs`},{key:`1-7`,desc:`Quick filters`},{key:`Enter`,desc:`Open PR details`},{key:`Cmd+P`,desc:`Command palette`}];function d7(){return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:`About`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Keyboard shortcuts and info`})]}),(0,R.jsx)(aZ,{}),(0,R.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,R.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:`Keyboard Shortcuts`}),u7.map(e=>(0,R.jsxs)(`div`,{className:`flex items-center justify-between py-0.5`,children:[(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:e.desc}),(0,R.jsx)(`kbd`,{className:`rounded border bg-muted px-1.5 py-0.5 font-mono text-xs`,children:e.key})]},e.key))]})]})}function f7(){let e=GD(GN),t=GD(TP),n=YD(ZN),r=YD($N),i=YD(eP),[a,o]=(0,N.useState)(``),[s,c]=(0,N.useState)(`all`),[l,u]=(0,N.useState)({}),d=(0,N.useRef)(null);(0,N.useEffect)(()=>()=>{d.current&&clearTimeout(d.current)},[]);let f=(0,N.useCallback)(e=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{n({payload:e})},500)},[n]),p=(0,N.useCallback)((e,t)=>{let n=!(l[e]??t.accounts.find(t=>t.profile===e)?.enabled??!0),r={...l,[e]:n};u(r),f({accounts:t.accounts.map(t=>({profile:t.profile,regions:[...t.regions],enabled:t.profile===e?n:r[t.profile]??t.enabled})),autoDetect:t.autoDetect,autoRefresh:t.autoRefresh,refreshIntervalSeconds:t.refreshIntervalSeconds})},[f,l]);return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Accounts`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`AWS profiles configured for CodeCommit`})]}),(0,R.jsx)(aZ,{}),OE(e).onInitialOrWaiting(()=>(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`})).onDefect(()=>(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load config`})).onSuccess(e=>(0,R.jsx)(p7,{currentUser:t.currentUser,data:e,overrides:l,search:a,setSearch:o,statusFilter:s,setStatusFilter:c,toggleAccount:p,onSsoLogin:e=>{try{r({payload:{profile:AC(PM)(e)}})}catch{}},onSsoLogout:()=>i({})})).render()]})}function p7({currentUser:e,data:t,onSsoLogin:n,onSsoLogout:r,overrides:i,search:a,setSearch:o,setStatusFilter:s,statusFilter:c,toggleAccount:l}){let u=(0,N.useMemo)(()=>t.accounts.map(e=>({...e,enabled:i[e.profile]??e.enabled})),[t.accounts,i]),d=(0,N.useMemo)(()=>{let e=a.toLowerCase();return u.filter(t=>!(c===`on`&&!t.enabled||c===`off`&&t.enabled||e&&!t.profile.toLowerCase().includes(e)&&!t.regions.some(t=>t.toLowerCase().includes(e))))},[u,a,c]),f=u.filter(e=>e.enabled),p=f.length;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,R.jsx)(GF,{className:`size-4 text-muted-foreground`}),e?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Current user:`}),(0,R.jsx)(`span`,{className:`font-medium`,children:e}),(0,R.jsx)(Z,{variant:`ghost`,size:`sm`,className:`h-6 px-1.5 text-xs`,title:`SSO Logout`,onClick:()=>r(),children:(0,R.jsx)(wF,{className:`size-3`})})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Not logged in`}),f[0]&&(()=>{let e=f[0].profile;return(0,R.jsx)(Z,{variant:`ghost`,size:`sm`,className:`h-6 px-1.5 text-xs`,title:`SSO Login`,onClick:()=>n(e),children:(0,R.jsx)(CF,{className:`size-3`})})})()]})]}),u.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground py-4`,children:`No accounts configured. Edit the config file to add AWS profiles.`}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsxs)(`div`,{className:`relative flex-1`,children:[(0,R.jsx)(IF,{className:`absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),(0,R.jsx)(WX,{placeholder:`Search profiles...`,value:a,onChange:e=>o(e.target.value),className:`h-8 pl-8 text-sm`})]}),(0,R.jsx)(aX,{children:[`all`,`on`,`off`].map(e=>(0,R.jsx)(Z,{variant:c===e?`default`:`outline`,size:`sm`,className:`h-8 px-2.5 text-xs capitalize`,onClick:()=>s(e),children:e},e))})]}),(0,R.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[p,`/`,u.length,` enabled`,d.length!==u.length&&` · ${d.length} shown`]}),(0,R.jsxs)(`div`,{className:`divide-y rounded-md border`,children:[d.map(e=>(0,R.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,R.jsx)(LF,{className:`size-3.5 text-muted-foreground shrink-0`}),(0,R.jsx)(`span`,{className:`text-sm font-medium truncate`,children:e.profile}),(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground truncate`,children:e.regions.join(`, `)||`default`})]}),(0,R.jsx)(Z,{variant:e.enabled?`default`:`outline`,size:`sm`,className:`ml-2 h-6 px-2 text-xs shrink-0`,onClick:()=>l(e.profile,t),children:e.enabled?`On`:`Off`})]},e.profile)),d.length===0&&(0,R.jsx)(`p`,{className:`px-3 py-4 text-center text-sm text-muted-foreground`,children:`No matching accounts`})]})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,R.jsx)(bF,{className:`size-3`}),`Auto-detect: `,t.autoDetect?`enabled`:`disabled`]})]})}function m7(){let e=Xn(),t=GD(bP),n=YD(xP),r=YD(wP),[i,a]=(0,N.useState)(!0),[o,s]=(0,N.useState)(30),[c,l]=(0,N.useState)(!1);(0,N.useEffect)(()=>{gE(t)&&(a(t.value.enabled),s(t.value.retentionDays),l(!1))},[t]);let[u,d]=(0,N.useState)(!1);return(0,N.useEffect)(()=>{u&&gE(t)&&(d(!1),l(!1))},[u,t]),(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h3`,{className:`text-lg font-semibold`,children:`Audit Log`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Record every AWS API call made by the app`})]}),(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`label`,{className:`flex items-center justify-between rounded-md border px-3 py-3`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:`Enable audit logging`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Log all API calls with permission state and duration`})]}),(0,R.jsx)(`button`,{role:`switch`,"aria-checked":i,onClick:()=>{a(!i),l(!0)},className:`relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors ${i?`bg-primary`:`bg-muted`}`,children:(0,R.jsx)(`span`,{className:`pointer-events-none block size-4 rounded-full bg-background shadow-lg transition-transform ${i?`translate-x-4`:`translate-x-0`}`})})]}),(0,R.jsxs)(`div`,{className:`rounded-md border px-3 py-3 space-y-2`,children:[(0,R.jsx)(`label`,{className:`text-sm font-medium`,children:`Retention period (days)`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Entries older than this are pruned on server start`}),(0,R.jsxs)(GX,{value:String(o),onValueChange:e=>{s(Number(e)),l(!0)},children:[(0,R.jsx)(qX,{className:`w-36`,children:(0,R.jsx)(KX,{})}),(0,R.jsxs)(JX,{children:[(0,R.jsx)(YX,{value:`7`,children:`7 days`}),(0,R.jsx)(YX,{value:`14`,children:`14 days`}),(0,R.jsx)(YX,{value:`30`,children:`30 days`}),(0,R.jsx)(YX,{value:`60`,children:`60 days`}),(0,R.jsx)(YX,{value:`90`,children:`90 days`}),(0,R.jsx)(YX,{value:`180`,children:`180 days`}),(0,R.jsx)(YX,{value:`365`,children:`365 days`})]})]})]})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-0 rounded-md border w-fit`,children:[(0,R.jsx)(Z,{size:`sm`,disabled:!c,onClick:()=>{n({payload:{enabled:i,retentionDays:o}}),d(!0)},className:`rounded-r-none border-0`,children:`Save`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,onClick:()=>e(`/audit`),className:`rounded-l-none border-0 border-l`,children:`View Audit Log`})]}),(0,R.jsx)(Z,{variant:`destructive`,size:`sm`,onClick:()=>r({}),children:`Clear All Logs`})]})]})}var h7=e=>e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`;function g7({copyKey:e,copied:t,label:n,onCopy:r,path:i,detail:a}){return(0,R.jsxs)(`div`,{className:`flex items-baseline gap-3 py-1.5`,children:[(0,R.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground w-24`,children:n}),(0,R.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`code`,{className:`truncate text-xs font-mono`,children:i}),(0,R.jsx)(`button`,{onClick:()=>r(i,e),className:`shrink-0 rounded p-0.5 hover:bg-muted`,children:t===e?(0,R.jsx)(JP,{className:`size-3 text-green-500`}):(0,R.jsx)(dF,{className:`size-3 text-muted-foreground`})})]}),(0,R.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:a})]})]})}function _7(){let e=GD(JN),t=GD(XN),n=GD(YN),r=YD(QN),[i,a]=(0,N.useState)(null),[o,s]=(0,N.useState)(!1),c=(0,N.useCallback)((e,t)=>{navigator.clipboard.writeText(e).then(()=>{a(t),setTimeout(()=>a(null),2e3)},()=>{})},[]),l=(0,N.useCallback)(async()=>{s(!0);try{await r({})}finally{s(!1)}},[r]),u=e=>e?`Modified ${vX(new Date(e),new Date,``).trim()}`:``;return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Configuration`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`File locations, validation, and storage`})]}),(0,R.jsx)(aZ,{}),(0,R.jsxs)(`div`,{className:`space-y-1`,children:[OE(e).onInitialOrWaiting(()=>(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground py-1`,children:`Loading config path...`})).onError(()=>(0,R.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load config path`})).onDefect(()=>(0,R.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load config path`})).onSuccess(e=>{let n=gE(t)?` · ${t.value.status}`:``,r=e.exists?`${u(e.modifiedAt)}${n}`:`Not created yet${n}`;return(0,R.jsx)(g7,{label:`Config file`,path:e.path,detail:r,copyKey:`config`,copied:i,onCopy:c})}).render(),OE(t).onInitialOrWaiting(()=>null).onError(()=>null).onDefect(()=>null).onSuccess(e=>e.errors.length>0?(0,R.jsx)(`div`,{className:`ml-27 rounded bg-destructive/10 px-2 py-1 text-[11px] text-destructive`,children:e.errors.map((e,t)=>(0,R.jsx)(`p`,{children:e},t))}):null).render(),(0,R.jsx)(aZ,{}),OE(n).onInitialOrWaiting(()=>(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground py-1`,children:`Loading database info...`})).onError(()=>(0,R.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load database info`})).onDefect(()=>(0,R.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load database info`})).onSuccess(e=>{let t=e.exists?`${h7(e.sizeBytes)} · ${u(e.modifiedAt)}`:`Not created yet`;return(0,R.jsx)(g7,{label:`Cache database`,path:e.path,detail:t,copyKey:`db`,copied:i,onCopy:c})}).render()]}),(0,R.jsx)(aZ,{}),(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsxs)(`div`,{className:`flex-1`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:`Reset to Defaults`}),(0,R.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`Backs up current config, then re-detects AWS profiles`})]}),(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,onClick:l,disabled:o,className:`shrink-0 gap-2`,children:[(0,R.jsx)(PF,{className:OY(`size-3.5`,o&&`animate-spin`)}),o?`Resetting...`:`Reset`]})]})]})}var v7=(e,t)=>{try{let n=localStorage.getItem(e);return n===null?t:n===`true`}catch{return t}},y7=(e,t)=>{try{let n=localStorage.getItem(e);return n===null?t:Number(n)||t}catch{return t}},b7=[{label:`30 min`,ms:1800*1e3},{label:`1 hour`,ms:3600*1e3},{label:`2 hours`,ms:7200*1e3},{label:`4 hours`,ms:14400*1e3}];function x7(){let[e,t]=(0,N.useState)(()=>v7(qi.desktopNotifications,!1)),[n,r]=(0,N.useState)(()=>v7(qi.reminders,!0)),[i,a]=(0,N.useState)(()=>y7(qi.reminderInterval,3600*1e3)),[o,s]=(0,N.useState)(typeof Notification<`u`?Notification.permission:`unsupported`),c=(0,N.useCallback)(async()=>{if(!e&&o==="default"){let e=await Notification.requestPermission();if(s(e),e!==`granted`)return}let n=!e;t(n);try{localStorage.setItem(qi.desktopNotifications,String(n))}catch{}},[e,o]),l=(0,N.useCallback)(()=>{let e=!n;r(e);try{localStorage.setItem(qi.reminders,String(e))}catch{}},[n]),u=(0,N.useCallback)(e=>{a(e);try{localStorage.setItem(qi.reminderInterval,String(e))}catch{}},[]);return(0,N.useEffect)(()=>{let e=()=>{typeof Notification<`u`&&s(Notification.permission)};return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},[]),(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Notifications`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Desktop notifications and review reminders`})]}),(0,R.jsx)(aZ,{}),(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg border p-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsx)(tF,{className:`size-5 text-muted-foreground`}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:`Desktop Notifications`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:o===`unsupported`?`Not available in this browser`:o===`denied`?`Blocked by browser — enable in site settings`:`Show browser notifications for approval requests and PR updates`})]})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[o===`granted`&&(0,R.jsx)(rX,{variant:`outline`,className:`text-xs`,children:`Granted`}),(0,R.jsx)(`button`,{role:`switch`,"aria-checked":e,onClick:c,disabled:o===`unsupported`||o===`denied`,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${e?`bg-primary`:`bg-muted`} ${o===`unsupported`||o===`denied`?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,children:(0,R.jsx)(`span`,{className:`inline-block size-4 rounded-full bg-white transition-transform ${e?`translate-x-6`:`translate-x-1`}`})})]})]}),(0,R.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg border p-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsx)(lF,{className:`size-5 text-muted-foreground`}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-sm font-medium`,children:`Review Reminders`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Periodic reminders for PRs awaiting your review`})]})]}),(0,R.jsx)(`button`,{role:`switch`,"aria-checked":n,onClick:l,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors cursor-pointer ${n?`bg-primary`:`bg-muted`}`,children:(0,R.jsx)(`span`,{className:`inline-block size-4 rounded-full bg-white transition-transform ${n?`translate-x-6`:`translate-x-1`}`})})]}),n&&(0,R.jsxs)(`div`,{className:`rounded-lg border p-4`,children:[(0,R.jsx)(`p`,{className:`text-sm font-medium mb-2`,children:`Reminder Interval`}),(0,R.jsx)(`div`,{className:`flex gap-2`,children:b7.map(e=>(0,R.jsx)(`button`,{"aria-pressed":i===e.ms,onClick:()=>u(e.ms),className:`rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${i===e.ms?`bg-primary text-primary-foreground`:`bg-muted text-muted-foreground hover:bg-muted/80`}`,children:e.label},e.ms))})]})]})]})}function S7(){let e=GD(gP),t=YD(vP),n=YD(yP),r=gE(e)?e.value:[],i=r.filter(e=>e.category===`read`),a=r.filter(e=>e.category===`write`),o=()=>{for(let e of r)e.state!==`always_allow`&&t({payload:{operation:e.operation,state:`always_allow`}})},s=(e,n)=>(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`h4`,{className:`text-sm font-medium text-muted-foreground`,children:e}),n.map(e=>(0,R.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border px-3 py-2`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,R.jsx)(rX,{variant:e.category===`write`?`destructive`:`secondary`,className:`text-xs shrink-0`,children:e.category}),(0,R.jsxs)(`div`,{className:`min-w-0`,children:[(0,R.jsx)(`code`,{className:`text-xs font-mono`,children:e.operation}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:e.description})]})]}),(0,R.jsxs)(GX,{value:e.state,onValueChange:n=>t({payload:{operation:e.operation,state:n}}),children:[(0,R.jsx)(qX,{className:`w-36 shrink-0`,children:(0,R.jsx)(KX,{})}),(0,R.jsxs)(JX,{children:[(0,R.jsx)(YX,{value:`always_allow`,children:`Always Allow`}),(0,R.jsx)(YX,{value:`allow`,children:`Ask Each Time`}),(0,R.jsx)(YX,{value:`deny`,children:`Deny`})]})]})]},e.operation))]});return(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h3`,{className:`text-lg font-semibold`,children:`API Permissions`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Control which AWS API calls the app can make`})]}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(Z,{variant:`outline`,size:`sm`,onClick:o,children:`Always Allow All`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,onClick:()=>n({}),children:`Reset (Clear All)`})]}),pE(e)?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`}):(0,R.jsxs)(`div`,{className:`space-y-6`,children:[s(`Read Operations`,i),s(`Write Operations`,a)]})]})}var C7=[{label:`1 min`,value:60},{label:`5 min`,value:300},{label:`10 min`,value:600},{label:`15 min`,value:900},{label:`30 min`,value:1800}];function w7(){let e=GD(GN),t=YD(ZN),n=(0,N.useRef)(null),r=(0,N.useRef)(null),[i,a]=(0,N.useState)({});(0,N.useEffect)(()=>{gE(e)&&(r.current=e.value)},[e]),(0,N.useEffect)(()=>{let e=new BroadcastChannel(`codecommit-config`);return n.current=e,e.onmessage=e=>{a(t=>({...t,...e.data}))},()=>e.close()},[]);let o=(0,N.useCallback)(e=>{let i=r.current;i&&(a(t=>({...t,...e})),n.current?.postMessage(e),t({payload:{accounts:i.accounts.map(e=>({profile:e.profile,regions:[...e.regions],enabled:e.enabled})),autoDetect:i.autoDetect,autoRefresh:e.autoRefresh??i.autoRefresh,refreshIntervalSeconds:e.refreshIntervalSeconds??i.refreshIntervalSeconds}}))},[t]);return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Auto-refresh`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Periodically fetch PR updates from AWS`})]}),(0,R.jsx)(aZ,{}),OE(e).onInitialOrWaiting(()=>(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`})).onDefect(()=>(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load config`})).onSuccess(e=>{let t=i.autoRefresh??e.autoRefresh,n=i.refreshIntervalSeconds??e.refreshIntervalSeconds;return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,R.jsx)(NF,{className:`size-4 text-muted-foreground`}),(0,R.jsx)(`span`,{children:`Auto-refresh`})]}),(0,R.jsx)(Z,{variant:t?`default`:`outline`,size:`sm`,className:`h-7 px-3 text-xs`,onClick:()=>o({autoRefresh:!t}),children:t?`On`:`Off`})]}),t&&(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Refresh interval`}),(0,R.jsx)(aX,{children:C7.map(e=>(0,R.jsx)(Z,{variant:n===e.value?`default`:`outline`,size:`sm`,className:`h-7 px-3 text-xs`,onClick:()=>o({refreshIntervalSeconds:e.value}),children:e.label},e.value))})]})]})}).render()]})}var T7={image:`codercom/code-server:latest`,extensions:[],setupCommands:[],env:{},volumeMounts:[],cloneDepth:0};function E7(){let e=GD(GN),t=YD(ZN),n=(0,N.useRef)(null),[r,i]=(0,N.useState)(null),[a,o]=(0,N.useState)(null),[s,c]=(0,N.useState)(!1);(0,N.useEffect)(()=>{if(gE(e)&&(n.current=e.value,!r)){let t=e.value.sandbox??T7;i(t),o(t)}},[e,r]);let l=(0,N.useMemo)(()=>r!==null&&a!==null&&JSON.stringify(r)!==JSON.stringify(a),[r,a]),u=(0,N.useCallback)(e=>{i(t=>t&&{...t,...e})},[]),d=(0,N.useCallback)(()=>{let e=n.current;!e||!r||(c(!0),t({payload:{accounts:e.accounts.map(e=>({profile:e.profile,regions:[...e.regions],enabled:e.enabled})),autoDetect:e.autoDetect,autoRefresh:e.autoRefresh,refreshIntervalSeconds:e.refreshIntervalSeconds,sandbox:r}}),o(r),setTimeout(()=>c(!1),600))},[t,r]);return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Sandbox`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Docker sandbox defaults for code review environments`})]}),r&&(0,R.jsx)(Z,{size:`sm`,className:`h-8 gap-1.5 px-3`,disabled:!l&&!s,onClick:d,children:s?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(iF,{className:`size-3.5`}),` Saved`]}):`Save`})]}),(0,R.jsx)(aZ,{}),OE(e).onInitialOrWaiting(()=>(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`})).onDefect(()=>(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load config`})).onSuccess(()=>r&&(0,R.jsx)(D7,{settings:r,onChange:u})).render()]})}function D7({settings:e,onChange:t}){let[n,r]=(0,N.useState)(``),[i,a]=(0,N.useState)(``),[o,s]=(0,N.useState)(``),[c,l]=(0,N.useState)(``),[u,d]=(0,N.useState)(``),[f,p]=(0,N.useState)(``),[m,h]=(0,N.useState)(!1);return(0,R.jsxs)(`div`,{className:`space-y-6`,children:[(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`label`,{className:`text-sm font-medium`,children:`Docker Image`}),(0,R.jsx)(WX,{value:e.image,placeholder:`codercom/code-server:latest`,onChange:e=>t({image:e.target.value}),className:`h-8 text-sm`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Base image for sandboxes. Must have code-server or install via setup commands.`})]}),(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`label`,{className:`text-sm font-medium`,children:`Clone Depth`}),(0,R.jsx)(`div`,{className:`flex gap-1.5`,children:[{label:`Full`,value:0},{label:`1`,value:1},{label:`10`,value:10},{label:`50`,value:50},{label:`100`,value:100}].map(n=>(0,R.jsx)(Z,{variant:e.cloneDepth===n.value?`default`:`outline`,size:`sm`,className:`h-7 px-3 text-xs`,onClick:()=>t({cloneDepth:n.value}),children:n.label},n.value))}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`0 = full history. Higher values speed up clone but limit git log.`})]}),(0,R.jsx)(aZ,{}),(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`label`,{className:`text-sm font-medium`,children:`VS Code Extensions`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Installed via code-server --install-extension`}),(0,R.jsx)(k7,{settings:e,onChange:t}),(0,R.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.extensions.map(n=>(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs`,children:[(0,R.jsx)(nF,{className:`size-3 text-muted-foreground`}),n,(0,R.jsx)(`button`,{className:`ml-0.5 text-muted-foreground hover:text-foreground`,onClick:()=>t({extensions:e.extensions.filter(e=>e!==n)}),children:(0,R.jsx)(KF,{className:`size-3`})})]},n))}),(0,R.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,R.jsx)(WX,{value:n,placeholder:`publisher.extension-id`,onChange:e=>r(e.target.value),onKeyDown:i=>{i.key===`Enter`&&n.trim()&&(t({extensions:[...e.extensions,n.trim()]}),r(``))},className:`h-8 text-sm flex-1`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!n.trim(),onClick:()=>{t({extensions:[...e.extensions,n.trim()]}),r(``)},children:(0,R.jsx)(MF,{className:`size-3.5`})})]})]}),(0,R.jsx)(aZ,{}),(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`label`,{className:`text-sm font-medium`,children:`Setup Commands`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Shell commands run in container after ready`}),(0,R.jsx)(M7,{settings:e,onChange:t}),(0,R.jsx)(`div`,{className:`space-y-1.5`,children:e.setupCommands.map((n,r)=>(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`code`,{className:`flex-1 rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:n}),(0,R.jsx)(`button`,{className:`text-muted-foreground hover:text-destructive shrink-0`,onClick:()=>t({setupCommands:e.setupCommands.filter((e,t)=>t!==r)}),children:(0,R.jsx)(WF,{className:`size-3.5`})})]},r))}),(0,R.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,R.jsx)(WX,{value:i,placeholder:`npm i -g tsx`,onChange:e=>a(e.target.value),onKeyDown:n=>{n.key===`Enter`&&i.trim()&&(t({setupCommands:[...e.setupCommands,i.trim()]}),a(``))},className:`h-8 text-sm font-mono flex-1`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!i.trim(),onClick:()=>{t({setupCommands:[...e.setupCommands,i.trim()]}),a(``)},children:(0,R.jsx)(MF,{className:`size-3.5`})})]})]}),(0,R.jsx)(aZ,{}),(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`label`,{className:`text-sm font-medium`,children:`Environment Variables`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Extra env vars injected into sandbox container`}),(0,R.jsx)(`div`,{className:`space-y-1.5`,children:Object.entries(e.env).map(([n,r])=>(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`code`,{className:`rounded-md bg-muted px-2 py-1 text-xs font-mono`,children:n}),(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`=`}),(0,R.jsx)(`code`,{className:`flex-1 rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:r}),(0,R.jsx)(`button`,{className:`text-muted-foreground hover:text-destructive shrink-0`,onClick:()=>{let r={...e.env};delete r[n],t({env:r})},children:(0,R.jsx)(WF,{className:`size-3.5`})})]},n))}),(0,R.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,R.jsx)(WX,{value:o,placeholder:`KEY`,onChange:e=>s(e.target.value),className:`h-8 text-sm font-mono w-32`}),(0,R.jsx)(`span`,{className:`flex items-center text-xs text-muted-foreground`,children:`=`}),(0,R.jsx)(WX,{value:c,placeholder:`value`,onChange:e=>l(e.target.value),onKeyDown:n=>{n.key===`Enter`&&o.trim()&&(t({env:{...e.env,[o.trim()]:c}}),s(``),l(``))},className:`h-8 text-sm font-mono flex-1`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!o.trim(),onClick:()=>{t({env:{...e.env,[o.trim()]:c}}),s(``),l(``)},children:(0,R.jsx)(MF,{className:`size-3.5`})})]})]}),(0,R.jsx)(aZ,{}),(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`label`,{className:`text-sm font-medium`,children:`Volume Mounts`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Map host paths into the container`}),(0,R.jsx)(N7,{settings:e,onChange:t}),(0,R.jsx)(`div`,{className:`space-y-1.5`,children:e.volumeMounts.map((n,r)=>(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsx)(`code`,{className:`rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:n.hostPath}),(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:`:`}),(0,R.jsx)(`code`,{className:`flex-1 rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:n.containerPath}),n.readonly&&(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:`(ro)`}),(0,R.jsx)(`button`,{className:`text-muted-foreground hover:text-destructive shrink-0`,onClick:()=>t({volumeMounts:e.volumeMounts.filter((e,t)=>t!==r)}),children:(0,R.jsx)(WF,{className:`size-3.5`})})]},r))}),(0,R.jsxs)(`div`,{className:`flex gap-1.5 items-center`,children:[(0,R.jsx)(WX,{value:u,placeholder:`/host/path`,onChange:e=>d(e.target.value),className:`h-8 text-sm font-mono flex-1`}),(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:`:`}),(0,R.jsx)(WX,{value:f,placeholder:`/container/path`,onChange:e=>p(e.target.value),onKeyDown:n=>{n.key===`Enter`&&u.trim()&&f.trim()&&(t({volumeMounts:[...e.volumeMounts,{hostPath:u.trim(),containerPath:f.trim(),readonly:m}]}),d(``),p(``),h(!1))},className:`h-8 text-sm font-mono flex-1`}),(0,R.jsx)(Z,{variant:m?`default`:`outline`,size:`sm`,className:`h-8 px-2 text-xs shrink-0`,onClick:()=>h(!m),title:`Read-only`,children:`RO`}),(0,R.jsx)(Z,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!u.trim()||!f.trim(),onClick:()=>{t({volumeMounts:[...e.volumeMounts,{hostPath:u.trim(),containerPath:f.trim(),readonly:m}]}),d(``),p(``),h(!1)},children:(0,R.jsx)(MF,{className:`size-3.5`})})]})]})]})}var O7=[{label:`ESLint`,id:`dbaeumer.vscode-eslint`},{label:`Prettier`,id:`esbenp.prettier-vscode`},{label:`GitLens`,id:`eamodio.gitlens`},{label:`Error Lens`,id:`usernamehw.errorlens`}];function k7({settings:e,onChange:t}){let n=(0,N.useMemo)(()=>O7.filter(t=>!e.extensions.includes(t.id)),[e.extensions]);return n.length===0?null:(0,R.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(n=>(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 gap-1 px-2 text-xs`,onClick:()=>t({extensions:[...e.extensions,n.id]}),children:[(0,R.jsx)(MF,{className:`size-3`}),n.label]},n.id))})}var A7=[{label:`Node 22`,cmd:`curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt-get install -y nodejs`},{label:`pnpm`,cmd:`sudo npm i -g pnpm`},{label:`Bun`,cmd:`curl -fsSL https://bun.sh/install | bash && echo 'export PATH="$HOME/.bun/bin:$PATH"' >> ~/.bashrc && echo 'export PATH="$HOME/.bun/bin:$PATH"' >> ~/.profile`}],j7=[{label:`VS Code Extensions`,mount:{hostPath:`~/.vscode/extensions`,containerPath:`/home/coder/.local/share/code-server/extensions`,readonly:!1}},{label:`VS Code Settings`,mount:{hostPath:`~/Library/Application Support/Code/User/settings.json`,containerPath:`/home/coder/.local/share/code-server/User/settings.json`,readonly:!0}},{label:`VS Code Keybindings`,mount:{hostPath:`~/Library/Application Support/Code/User/keybindings.json`,containerPath:`/home/coder/.local/share/code-server/User/keybindings.json`,readonly:!0}},{label:`SSH Keys`,mount:{hostPath:`~/.ssh`,containerPath:`/home/coder/.ssh`,readonly:!0}},{label:`Git Config`,mount:{hostPath:`~/.gitconfig`,containerPath:`/home/coder/.gitconfig`,readonly:!0}},{label:`AWS Credentials`,mount:{hostPath:`~/.aws`,containerPath:`/home/coder/.aws`,readonly:!0}}];function M7({settings:e,onChange:t}){let n=(0,N.useMemo)(()=>A7.filter(t=>!e.setupCommands.some(e=>e===t.cmd)),[e.setupCommands]);return n.length===0?null:(0,R.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(n=>(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 gap-1 px-2 text-xs`,onClick:()=>t({setupCommands:[...e.setupCommands,n.cmd]}),children:[(0,R.jsx)(MF,{className:`size-3`}),n.label]},n.label))})}function N7({settings:e,onChange:t}){let n=(0,N.useMemo)(()=>j7.filter(t=>!e.volumeMounts.some(e=>e.hostPath===t.mount.hostPath)),[e.volumeMounts]);return n.length===0?null:(0,R.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(n=>(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`h-7 gap-1 px-2 text-xs`,onClick:()=>t({volumeMounts:[...e.volumeMounts,n.mount]}),children:[(0,R.jsx)(MF,{className:`size-3`}),n.label]},n.label))})}function P7(){let{setTheme:e,theme:t}=Qi();return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Theme`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Choose your preferred appearance`})]}),(0,R.jsx)(aZ,{}),(0,R.jsx)(`div`,{className:`grid grid-cols-3 gap-3`,children:[{id:`light`,label:`Light`,icon:(0,R.jsx)(HF,{className:`size-5`})},{id:`dark`,label:`Dark`,icon:(0,R.jsx)(kF,{className:`size-5`})},{id:`system`,label:`System`,icon:(0,R.jsx)(OF,{className:`size-5`})}].map(n=>(0,R.jsxs)(`button`,{onClick:()=>e(n.id),className:OY(`flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors`,t===n.id?`border-primary bg-primary/5`:`border-border hover:border-primary/50`),children:[n.icon,(0,R.jsx)(`span`,{className:`text-sm font-medium`,children:n.label})]},n.id))})]})}var F7={accounts:(0,R.jsx)(GF,{className:`size-4`}),refresh:(0,R.jsx)(NF,{className:`size-4`}),sandbox:(0,R.jsx)(nF,{className:`size-4`}),notifications:(0,R.jsx)(tF,{className:`size-4`}),permissions:(0,R.jsx)(zF,{className:`size-4`}),audit:(0,R.jsx)(FF,{className:`size-4`}),theme:(0,R.jsx)(AF,{className:`size-4`}),config:(0,R.jsx)(hF,{className:`size-4`}),about:(0,R.jsx)(bF,{className:`size-4`})},I7={accounts:`Accounts`,refresh:`Refresh`,sandbox:`Sandbox`,notifications:`Notifications`,permissions:`Permissions`,audit:`Audit`,theme:`Theme`,config:`Config`,about:`About`},L7=e=>YF.includes(e);function R7(){let{tab:e}=er(),t=L7(e)?e:`accounts`,n=Xn();return(0,R.jsxs)(`div`,{className:`flex gap-6`,children:[(0,R.jsxs)(`nav`,{className:`w-48 shrink-0`,children:[(0,R.jsxs)(Z,{variant:`ghost`,size:`sm`,className:`mb-4 gap-2`,onClick:()=>n(`/`),children:[(0,R.jsx)(QP,{className:`size-4`}),`Back to PRs`]}),(0,R.jsx)(`div`,{className:`flex flex-col gap-1`,role:`tablist`,children:YF.map(e=>(0,R.jsxs)(`button`,{role:`tab`,"aria-selected":t===e,onClick:()=>n(`/settings/${e}`,{replace:!0}),className:OY(`flex items-center gap-2 rounded-md px-3 py-2 text-sm text-left transition-colors`,t===e?`bg-primary text-primary-foreground`:`text-muted-foreground hover:bg-muted hover:text-foreground`),children:[F7[e],I7[e]]},e))})]}),(0,R.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[t===`accounts`&&(0,R.jsx)(f7,{}),t===`refresh`&&(0,R.jsx)(w7,{}),t===`sandbox`&&(0,R.jsx)(E7,{}),t===`notifications`&&(0,R.jsx)(x7,{}),t===`permissions`&&(0,R.jsx)(S7,{}),t===`audit`&&(0,R.jsx)(m7,{}),t===`theme`&&(0,R.jsx)(P7,{}),t===`config`&&(0,R.jsx)(_7,{}),t===`about`&&(0,R.jsx)(d7,{})]})]})}var z7=(e,t)=>UN.query(`stats`,`get`,{query:{week:e,...t},timeToLive:`30 seconds`});function B7(e,t){return GD((0,N.useMemo)(()=>z7(e,t),[e,t.repo,t.author,t.account]))}function V7(e){return e==null?`—`:SX(e)}function H7({icon:e,label:t,onClick:n,value:r}){return(0,R.jsx)(j5,{className:n?`cursor-pointer transition-colors hover:bg-accent/50`:void 0,onClick:n,children:(0,R.jsxs)(P5,{className:`flex items-center gap-3 p-4`,children:[(0,R.jsx)(`div`,{className:`rounded-md bg-muted p-2`,children:(0,R.jsx)(e,{className:`size-4 text-muted-foreground`})}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`text-2xl font-bold tabular-nums`,children:r}),(0,R.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:t})]})]})})}function U7({highlight:e,label:t,onClick:n,pct:r,value:i}){return(0,R.jsxs)(`div`,{className:`group relative flex items-center gap-2 rounded-md px-2 py-1.5${n?` cursor-pointer`:``}`,onClick:n,children:[(0,R.jsx)(`div`,{className:`absolute inset-0 rounded-md transition-colors ${e?`bg-amber-400/[0.08] group-hover:bg-amber-400/[0.14]`:`bg-foreground/[0.06] dark:bg-foreground/[0.08] group-hover:bg-foreground/[0.10] dark:group-hover:bg-foreground/[0.14]`}`,style:{width:`${r}%`}}),e&&(0,R.jsx)(VF,{"aria-hidden":`true`,className:`relative z-10 size-3 shrink-0 text-amber-400 fill-amber-400`,style:{animation:`star-in 400ms ease-out`}},t),(0,R.jsx)(`span`,{className:`relative z-10 flex-1 truncate text-xs${e?` text-amber-400 font-medium`:``}`,children:t}),(0,R.jsx)(`span`,{className:`relative z-10 shrink-0 text-xs tabular-nums ${e?`text-amber-400/60`:`text-muted-foreground`}`,children:i})]})}function W7({data:e,labelKey:t,onItemClick:n,title:r,valueKey:i}){let a=e.reduce((e,t)=>Math.max(e,Number(t[i])||0),0);return(0,R.jsxs)(j5,{children:[(0,R.jsx)(M5,{className:`pb-2`,children:(0,R.jsx)(N5,{className:`text-sm`,children:r})}),(0,R.jsx)(P5,{children:e.length===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No data`}):(0,R.jsx)(`div`,{className:`space-y-1.5`,children:e.map((e,r)=>{let o=String(e[t]),s=Number(e[i])||0;return(0,R.jsx)(U7,{label:o,value:s,pct:a>0?s/a*100:0,highlight:r===0,onClick:n?()=>n(o):void 0},o)})})})]})}function G7({dist:e,onBarClick:t}){let n=[{key:`small`,label:`S`,sub:`<5 files`,count:e.small},{key:`medium`,label:`M`,sub:`5–15`,count:e.medium},{key:`large`,label:`L`,sub:`15–30`,count:e.large},{key:`xlarge`,label:`XL`,sub:`30+`,count:e.extraLarge}],r=n.reduce((e,t)=>e+t.count,0),i=Math.max(...n.map(e=>e.count),1);return(0,R.jsxs)(j5,{children:[(0,R.jsx)(M5,{className:`pb-2`,children:(0,R.jsx)(N5,{className:`text-sm`,children:`PR Size Distribution`})}),(0,R.jsx)(P5,{children:r===0?(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No diff data`}):(0,R.jsx)(`div`,{className:`flex items-end gap-2 h-[120px]`,children:n.map(e=>(0,R.jsxs)(`div`,{className:`flex flex-1 flex-col items-center gap-1${t&&e.count>0?` cursor-pointer`:``}`,onClick:t&&e.count>0?()=>t(e.key):void 0,children:[(0,R.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:e.count}),(0,R.jsx)(`div`,{className:`w-full flex items-end`,style:{height:80},children:(0,R.jsx)(`div`,{className:`w-full rounded-t bg-foreground/[0.12] dark:bg-foreground/[0.16] transition-all hover:bg-foreground/[0.18] dark:hover:bg-foreground/[0.22]`,style:{height:`${e.count/i*100}%`,minHeight:e.count>0?4:0}})}),(0,R.jsxs)(`div`,{className:`text-center`,children:[(0,R.jsx)(`div`,{className:`text-xs font-medium`,children:e.label}),(0,R.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:e.sub})]})]},e.key))})})]})}function K7({onPRClick:e,prs:t}){return t.length===0?null:(0,R.jsxs)(j5,{children:[(0,R.jsx)(M5,{className:`pb-2`,children:(0,R.jsx)(N5,{className:`text-sm`,children:`Most Active PRs`})}),(0,R.jsx)(P5,{children:(0,R.jsx)(`div`,{className:`space-y-2`,children:t.map(t=>(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-sm cursor-pointer hover:bg-accent rounded px-2 py-1`,onClick:()=>e(t.awsAccountId,t.id),children:[(0,R.jsxs)(`span`,{className:`text-muted-foreground font-mono`,children:[`#`,t.id]}),(0,R.jsx)(`span`,{className:`truncate flex-1`,children:t.title}),(0,R.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:t.author}),(0,R.jsx)(rX,{variant:`secondary`,className:`text-xs`,children:t.repositoryName}),(0,R.jsxs)(`span`,{className:`text-xs tabular-nums`,children:[t.commentCount,` comments`]})]},`${t.awsAccountId}:${t.id}`))})})]})}function q7({onPRClick:e,prs:t}){return t.length===0?null:(0,R.jsxs)(j5,{children:[(0,R.jsx)(M5,{className:`pb-2`,children:(0,R.jsx)(N5,{className:`text-sm flex items-center gap-1`,children:`Stale PRs`})}),(0,R.jsx)(P5,{children:(0,R.jsx)(`div`,{className:`space-y-1`,children:t.map(t=>(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-sm cursor-pointer hover:bg-accent rounded px-2 py-1`,onClick:()=>e(t.awsAccountId,t.id),children:[(0,R.jsxs)(`span`,{className:`text-muted-foreground font-mono`,children:[`#`,t.id]}),(0,R.jsx)(`span`,{className:`truncate flex-1`,children:t.title}),(0,R.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:t.author}),(0,R.jsxs)(rX,{variant:`destructive`,className:`text-xs`,children:[t.daysSinceActivity,`d idle`]})]},`${t.awsAccountId}:${t.id}`))})})]})}function J7({data:e}){return(0,R.jsxs)(j5,{children:[(0,R.jsx)(M5,{className:`pb-2`,children:(0,R.jsx)(N5,{className:`text-sm`,children:`Health`})}),(0,R.jsx)(P5,{children:(0,R.jsxs)(`div`,{className:`grid grid-cols-4 gap-4`,children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Review Coverage`}),(0,R.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.reviewCoverage==null?`—`:`${(e.reviewCoverage*100).toFixed(0)}%`})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Approval Rate`}),(0,R.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.approvalRate==null?`—`:`${(e.approvalRate*100).toFixed(0)}%`})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Stale PRs`}),(0,R.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.stalePRs.length})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Bus Factor`}),(0,R.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.busFactor?`${e.busFactor.uniqueContributors} (${(e.busFactor.topContributorShare*100).toFixed(0)}%)`:`—`})]})]})})]})}function Y7({author:e,data:t,repo:n,setFilter:r}){return(0,R.jsxs)(R.Fragment,{children:[t.availableRepos.length>0&&(0,R.jsxs)(GX,{value:n||`__all__`,onValueChange:e=>r(`repo`,e===`__all__`?void 0:e),children:[(0,R.jsx)(qX,{className:`w-[140px] h-8 text-xs`,children:(0,R.jsx)(KX,{placeholder:`All repos`})}),(0,R.jsxs)(JX,{children:[(0,R.jsx)(YX,{value:`__all__`,children:`All repos`}),t.availableRepos.map(e=>(0,R.jsx)(YX,{value:e,children:e},e))]})]}),t.availableAuthors.length>0&&(0,R.jsxs)(GX,{value:e||`__all__`,onValueChange:e=>r(`author`,e===`__all__`?void 0:e),children:[(0,R.jsx)(qX,{className:`w-[140px] h-8 text-xs`,children:(0,R.jsx)(KX,{placeholder:`All authors`})}),(0,R.jsxs)(JX,{children:[(0,R.jsx)(YX,{value:`__all__`,children:`All authors`}),t.availableAuthors.map(e=>(0,R.jsx)(YX,{value:e,children:e},e))]})]})]})}function X7({details:e,goToPR:t}){return e.length===0?(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground py-2`,children:`No data points`}):(0,R.jsx)(`div`,{className:`space-y-1 mt-2`,children:e.map((e,n)=>(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-xs cursor-pointer hover:bg-accent rounded px-2 py-1`,onClick:()=>t(e.awsAccountId,e.prId),children:[(0,R.jsxs)(`span`,{className:`text-muted-foreground font-mono shrink-0`,children:[`#`,e.prId]}),(0,R.jsx)(`span`,{className:`truncate flex-1`,children:e.prTitle}),(0,R.jsx)(`span`,{className:`text-muted-foreground shrink-0`,children:e.author}),(0,R.jsx)(rX,{variant:`secondary`,className:`text-[10px] shrink-0`,children:e.repositoryName}),(0,R.jsx)(`span`,{className:`font-mono tabular-nums shrink-0`,children:V7(e.durationMs)}),(0,R.jsxs)(`span`,{className:`text-muted-foreground shrink-0 text-[10px]`,children:[e.fromLabel,` → `,e.toLabel]})]},`${e.awsAccountId}:${e.prId}:${n}`))})}function Z7({data:e,goToPR:t}){let[n,r]=(0,N.useState)(null),i=e=>r(t=>t===e?null:e),a=[{key:`merge`,label:`Median Time to Merge`,value:e.medianTimeToMerge,details:e.mergeTimeDetails},{key:`review`,label:`Median Time to First Review`,value:e.medianTimeToFirstReview,details:e.firstReviewDetails},{key:`feedback`,label:`Median Time to Address Feedback`,value:e.medianTimeToAddressFeedback,details:e.feedbackDetails}];return(0,R.jsxs)(`div`,{className:`space-y-2`,children:[(0,R.jsx)(`div`,{className:`grid grid-cols-3 gap-3`,children:a.map(e=>(0,R.jsx)(j5,{className:`cursor-pointer transition-colors hover:bg-accent/50 ${n===e.key?`ring-1 ring-ring`:``}`,onClick:()=>i(e.key),children:(0,R.jsxs)(P5,{className:`p-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.label}),(0,R.jsx)(aF,{className:`size-3 text-muted-foreground transition-transform ${n===e.key?`rotate-180`:``}`})]}),(0,R.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,R.jsx)(`div`,{className:`text-xl font-bold tabular-nums`,children:V7(e.value)}),e.details.length>0&&(0,R.jsxs)(`span`,{className:`text-[10px] text-muted-foreground`,children:[e.details.length,` PRs`]})]})]})},e.key))}),n&&(0,R.jsx)(j5,{children:(0,R.jsxs)(P5,{className:`p-3`,children:[(0,R.jsxs)(`div`,{className:`text-xs font-medium mb-1`,children:[a.find(e=>e.key===n)?.label,` — Detail`]}),(0,R.jsx)(X7,{details:a.find(e=>e.key===n)?.details??[],goToPR:t})]})})]})}function Q7({data:e,goToPR:t,handleSync:n,navigate:r,syncing:i}){return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,R.jsx)(H7,{label:`PRs Created`,value:e.prsCreated,icon:yF,onClick:()=>r(`/?from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,R.jsx)(H7,{label:`PRs Merged`,value:e.prsMerged,icon:yF,onClick:()=>r(`/?f=status:merged&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,R.jsx)(H7,{label:`Comments`,value:e.totalComments,icon:DF})]}),(0,R.jsx)(Z7,{data:e,goToPR:t}),(0,R.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,R.jsx)(W7,{data:e.topContributors,labelKey:`author`,valueKey:`prCount`,title:`Top Contributors`,onItemClick:t=>r(`/?f=author:${encodeURIComponent(t)}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,R.jsx)(W7,{data:e.topReviewers,labelKey:`author`,valueKey:`commentCount`,title:`Top Commenters`,onItemClick:t=>r(`/?f=commenter:${encodeURIComponent(t)}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,R.jsx)(W7,{data:e.topApprovers,labelKey:`author`,valueKey:`approvalCount`,title:`Top Approvers`,onItemClick:t=>r(`/?f=approver:${encodeURIComponent(t)}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)})]}),(0,R.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,R.jsx)(G7,{dist:e.prSizeDistribution,onBarClick:t=>r(`/?f=size:${t}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),e.avgDiffSize&&(0,R.jsx)(j5,{children:(0,R.jsxs)(P5,{className:`space-y-2 p-4`,children:[(0,R.jsx)(`div`,{className:`text-sm font-medium`,children:`Average Diff Size`}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Files added`}),(0,R.jsx)(`span`,{className:`font-mono`,children:e.avgDiffSize.filesAdded.toFixed(1)})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Files modified`}),(0,R.jsx)(`span`,{className:`font-mono`,children:e.avgDiffSize.filesModified.toFixed(1)})]}),(0,R.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,R.jsx)(`span`,{className:`text-muted-foreground`,children:`Files deleted`}),(0,R.jsx)(`span`,{className:`font-mono`,children:e.avgDiffSize.filesDeleted.toFixed(1)})]})]})})]}),(0,R.jsx)(K7,{prs:e.mostActivePRs,onPRClick:t}),(0,R.jsx)(J7,{data:e}),(0,R.jsx)(q7,{prs:e.stalePRs,onPRClick:t}),e.dataAvailableSince&&(0,R.jsxs)(`div`,{className:`text-xs text-muted-foreground text-center py-2`,children:[`Data available since `,_X(new Date(e.dataAvailableSince))]}),e.prsCreated===0&&e.prsMerged===0&&e.totalComments===0&&(0,R.jsxs)(`div`,{className:`text-center py-8 text-muted-foreground`,children:[(0,R.jsx)(`p`,{className:`text-sm`,children:`No activity for this week.`}),(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,className:`mt-2`,onClick:n,disabled:i,children:[(0,R.jsx)(NF,{className:`size-3 mr-1 ${i?`animate-spin`:``}`}),`Sync this week`]})]})]})}function $7(){let e=Xn(),[t,n]=Fi(),r=YD(fP),i=(0,N.useMemo)(()=>bX(new Date),[]),a=t.get(`week`)||i,o=t.get(`repo`)||void 0,s=t.get(`author`)||void 0,c=t.get(`account`)||void 0,l=B7(a,{repo:o,author:s,account:c}),u=GD(TP),d=u.status===`loading`,f=(0,N.useRef)(d);(0,N.useEffect)(()=>{f.current&&!d&&n(e=>(e.set(`_t`,Date.now().toString()),e)),f.current=d},[d,n]);let p=(0,N.useMemo)(()=>yX(a),[a]),m=(0,N.useMemo)(()=>p._tag===`None`?a:xX(p.value),[a,p]),h=(0,N.useCallback)(e=>{if(p._tag===`None`)return;let t=bX(new Date(p.value.start.getTime()+e*7*864e5));t>i||n(e=>(e.set(`week`,t),e))},[p,i,n]),g=(0,N.useCallback)((e,t)=>{n(n=>(t?n.set(e,t):n.delete(e),n))},[n]),_=(0,N.useCallback)(()=>{r({payload:{week:a}})},[a,r]),v=(0,N.useCallback)((t,n)=>e(`/accounts/${t}/prs/${n}`),[e]);return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>e(`/`),children:(0,R.jsx)(oF,{className:`size-4`})}),(0,R.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Statistics`}),(0,R.jsx)(rX,{variant:`secondary`,className:`text-[10px] tracking-wide uppercase font-normal text-muted-foreground/60`,children:`🚧 Experimental`})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>h(-1),children:(0,R.jsx)(QP,{className:`size-4`})}),(0,R.jsx)(`span`,{className:`text-sm font-medium min-w-[220px] text-center`,children:m}),(0,R.jsx)(Z,{variant:`ghost`,size:`icon-sm`,onClick:()=>h(1),disabled:a>=i,children:(0,R.jsx)($P,{className:`size-4`})}),(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,onClick:()=>n(e=>(e.set(`week`,i),e)),disabled:a===i,children:[(0,R.jsx)(rF,{className:`size-3 mr-1`}),` Today`]}),(0,R.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[OE(l).onSuccess(e=>(0,R.jsx)(Y7,{data:e,repo:o,author:s,setFilter:g})).render(),(0,R.jsxs)(Z,{variant:`outline`,size:`sm`,onClick:_,disabled:d,children:[(0,R.jsx)(NF,{className:`size-3 mr-1 ${d?`animate-spin`:``}`}),`Sync`]})]})]}),d&&u.statusDetail&&(0,R.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:u.statusDetail}),(o||s||c)&&(0,R.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[o&&(0,R.jsxs)(rX,{variant:`secondary`,className:`cursor-pointer`,onClick:()=>g(`repo`,void 0),children:[`repo: `,o,` ×`]}),s&&(0,R.jsxs)(rX,{variant:`secondary`,className:`cursor-pointer`,onClick:()=>g(`author`,void 0),children:[`author: `,s,` ×`]}),c&&(0,R.jsxs)(rX,{variant:`secondary`,className:`cursor-pointer`,onClick:()=>g(`account`,void 0),children:[`account: `,c,` ×`]})]}),(0,R.jsx)(aZ,{}),OE(l).onInitialOrWaiting(()=>(0,R.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,R.jsx)(SF,{className:`size-5 animate-spin text-muted-foreground`})})).onError(()=>(0,R.jsx)(`div`,{className:`text-sm text-destructive py-4`,children:`Failed to load stats`})).onDefect(()=>(0,R.jsx)(`div`,{className:`text-sm text-destructive py-4`,children:`Failed to load stats`})).onSuccess(t=>(0,R.jsx)(Q7,{data:t,navigate:e,goToPR:v,handleSync:_,syncing:d})).render()]})}var e9=e=>typeof e==`object`&&!!e&&`fullWidth`in e,t9=e=>e9(e.handle)&&e.handle.fullWidth===!0,n9=()=>_r().some(t9),r9=Ci([{element:(0,R.jsx)(UX,{}),children:[{index:!0,element:(0,R.jsx)(n7,{})},{path:`accounts/:accountId/prs/:prId`,element:(0,R.jsx)(Z5,{})},{path:`sandboxes`,element:(0,R.jsx)(l7,{})},{path:`sandbox/:sandboxId`,element:(0,R.jsx)(a7,{}),handle:{fullWidth:!0}},{path:`settings/:tab?`,element:(0,R.jsx)(R7,{})},{path:`notifications`,element:(0,R.jsx)(gZ,{})},{path:`stats`,element:(0,R.jsx)($7,{})},{path:`audit`,element:(0,R.jsx)(eZ,{})},{path:`*`,element:(0,R.jsx)(Ar,{to:`/`,replace:!0})}]}]),i9=class extends N.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?(0,R.jsxs)(`div`,{style:{padding:`2rem`,textAlign:`center`},children:[(0,R.jsx)(`h1`,{children:`Something went wrong`}),(0,R.jsx)(`button`,{onClick:()=>window.location.reload(),style:{marginTop:`1rem`},children:`Reload`})]}):this.props.children}},a9=document.getElementById(`root`);a9&&Ki.createRoot(a9).render((0,R.jsx)(N.StrictMode,{children:(0,R.jsx)(i9,{children:(0,R.jsx)(Zi,{children:(0,R.jsx)(Er,{router:r9})})})}));
|