agent-lyceum 0.49.0 → 0.49.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{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.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.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`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var ee=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function T(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ne(e,t){return T(e.type,t,e.props)}function E(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function D(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?D(``+e.key):t.toString(36)}function ae(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 oe(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,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(E(o)&&(o=ne(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ee(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ie(a,u),c+=oe(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ie(a,u++),c+=oe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return oe(ae(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 se(e,t,n){if(e==null)return e;var r=[],i=0;return oe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function O(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ce=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)};function le(e){var t=w.T,n={};n.types=t===null?null:t.types,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,ce)}catch(e){ce(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}}function ue(e){var t=w.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else le(ue.bind(null,e))}var de={map:se,forEach:function(e,t,n){se(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return se(e,function(){t++}),t},toArray:function(e){return se(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=de,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,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.addTransitionType=ue,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=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!te.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 T(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)te.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 T(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=E,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:O}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=le,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.3.1`})),u=o(((e,t)=>{t.exports=l()})),d=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,ne());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}}var S=!1,ee=-1,C=5,w=-1;function te(){return g?!0:!(e.unstable_now()-w<C)}function T(){if(g=!1,S){var t=e.unstable_now();w=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(ee),ee=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&te());){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&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ne():S=!1}}}var ne;if(typeof y==`function`)ne=function(){y(T)};else if(typeof MessageChannel<`u`){var E=new MessageChannel,D=E.port2;E.port1.onmessage=T,ne=function(){D.postMessage(null)}}else ne=function(){_(T,0)};function re(t,n){ee=_(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`):C=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(ee),ee=-1):h=!0,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ne()))),r},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();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`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(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.browser=function(e){return{$$typeof:o,_reason:e}},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 c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.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=d(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=d(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,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority: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=d(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=d(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,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority: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 l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),m=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}function h(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&h(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function ee(e,t,n){return e===n||e===t&&(x=e,!0)}function C(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function w(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function te(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var T=Object.assign,ne=Symbol.for(`react.element`),E=Symbol.for(`react.transitional.element`),D=Symbol.for(`react.portal`),re=Symbol.for(`react.fragment`),ie=Symbol.for(`react.strict_mode`),ae=Symbol.for(`react.profiler`),oe=Symbol.for(`react.consumer`),se=Symbol.for(`react.context`),O=Symbol.for(`react.forward_ref`),ce=Symbol.for(`react.suspense`),le=Symbol.for(`react.suspense_list`),ue=Symbol.for(`react.memo`),de=Symbol.for(`react.lazy`),fe=Symbol.for(`react.activity`),pe=Symbol.for(`react.legacy_hidden`),me=Symbol.for(`react.memo_cache_sentinel`),he=Symbol.for(`react.view_transition`),k=Symbol.for(`react.recoverable`),ge=Symbol.iterator;function _e(e){return typeof e!=`object`||!e?null:(e=ge&&e[ge]||e[`@@iterator`],typeof e==`function`?e:null)}var ve=Symbol.for(`react.client.reference`);function ye(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ve?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case re:return`Fragment`;case ae:return`Profiler`;case ie:return`StrictMode`;case ce:return`Suspense`;case le:return`SuspenseList`;case fe:return`Activity`;case he:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case D:return`Portal`;case se:return e.displayName||`Context`;case oe:return(e._context.displayName||`Context`)+`.Consumer`;case O:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ue:return t=e.displayName||null,t===null?ye(e.type)||`Memo`:t;case de:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var be=Array.isArray,A=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,xe={pending:!1,data:null,method:null,action:null},Se=[],M=-1;function Ce(e){return{current:e}}function N(e){0>M||(e.current=Se[M],Se[M]=null,M--)}function we(e,t){M++,Se[M]=e.current,e.current=t}var Te=Ce(null),Ee=Ce(null),De=Ce(null),Oe=Ce(null);function ke(e,t){switch(we(De,t),we(Ee,e),we(Te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}N(Te),we(Te,e)}function Ae(){N(Te),N(Ee),N(De)}function je(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,we(Oe,e)),t=Te.current;var n=dp(t,e.type);t!==n&&(we(Ee,e),we(Te,n))}function Me(e){Ee.current===e&&(N(Te),N(Ee)),Oe.current===e&&(N(Oe),sh._currentValue=xe)}var Ne,Pe;function Fe(e){if(Ne===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ne=t&&t[1]||``,Pe=-1<e.stack.indexOf(`
|
|
2
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
-
`+Ne+e+Pe}var Ie=!1;function Le(e,t){if(!e||Ie)return``;Ie=!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}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}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{Ie=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Fe(n):``}function Re(e,t){switch(e.tag){case 26:case 27:case 5:return Fe(e.type);case 16:return Fe(`Lazy`);case 13:return e.child!==t&&t!==null?Fe(`Suspense Fallback`):Fe(`Suspense`);case 19:return Fe(`SuspenseList`);case 0:case 15:return Le(e.type,!1);case 11:return Le(e.type.render,!1);case 1:return Le(e.type,!0);case 31:return Fe(`Activity`);case 30:return Fe(`ViewTransition`);default:return``}}function ze(e){try{var t=``,n=null;do t+=Re(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
-
Error generating stack: `+e.message+`
|
|
8
|
-
`+e.stack}}var Be=Object.prototype.hasOwnProperty,Ve=t.unstable_scheduleCallback,He=t.unstable_cancelCallback,Ue=t.unstable_shouldYield,We=t.unstable_requestPaint,Ge=t.unstable_now,Ke=t.unstable_getCurrentPriorityLevel,qe=t.unstable_ImmediatePriority,Je=t.unstable_UserBlockingPriority,Ye=t.unstable_NormalPriority,Xe=t.unstable_LowPriority,Ze=t.unstable_IdlePriority,Qe=t.log,$e=t.unstable_setDisableYieldValue,et=null,tt=null;function nt(e){if(typeof Qe==`function`&&$e(e),tt&&typeof tt.setStrictMode==`function`)try{tt.setStrictMode(et,e)}catch{}}var rt=Math.clz32?Math.clz32:ot,it=Math.log,at=Math.LN2;function ot(e){return e>>>=0,e===0?32:31-(it(e)/at|0)|0}var st=256,ct=262144,lt=4194304;function ut(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&-e;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 dt(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=ut(n))):i=ut(o):i=ut(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ut(n))):i=ut(o)):i=ut(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 ft(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function pt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-rt(n),i=1<<r;t|=e[r],n&=~i}return t}function mt(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 ht(){var e=lt;return lt<<=1,!(lt&62914560)&&(lt=4194304),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function _t(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function vt(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-rt(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&&yt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function yt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-rt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-rt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function xt(e,t){var n=t&-t;return n=n&42?1:St(n),(n&(e.suspendedLanes|t))===0?n:0}function St(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 Ct(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function wt(){var e=j.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function Tt(e,t){var n=j.p;try{return j.p=e,t()}finally{j.p=n}}var Et=Math.random().toString(36).slice(2),Dt=`__reactFiber$`+Et,Ot=`__reactProps$`+Et,kt=`__reactContainer$`+Et,At=`__reactEvents$`+Et,jt=`__reactListeners$`+Et,Mt=`__reactHandles$`+Et,Nt=`__reactResources$`+Et,Pt=`__reactMarker$`+Et,Ft=`__reactLoad$`+Et;function It(e){delete e[Dt],delete e[Ot],delete e[jt],delete e[Mt]}function Lt(e){var t;if(t=e[Dt])return t;for(var n=e.parentNode;n;){if(t=n[kt]||n[Dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fm(e);e!==null;){if(n=e[Dt])return n;e=fm(e)}return t}e=n,n=e.parentNode}return null}function Rt(e){if(e=e[Dt]||e[kt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function zt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function P(e){var t=e[Nt];return t||=e[Nt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Bt(e){e[Pt]=!0}function Vt(e){e[Ft]=void 0}var Ht=new Set,Ut={};function Wt(e,t){Gt(e,t),Gt(e+`Capture`,t)}function Gt(e,t){for(Ut[e]=t,e=0;e<t.length;e++)Ht.add(t[e])}var Kt=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]*$`),qt={},Jt={};function Yt(e){return Be.call(Jt,e)?!0:Be.call(qt,e)?!1:Kt.test(e)?Jt[e]=!0:(qt[e]=!0,!1)}var F=!1;function I(){var e=F;return F=!1,e}function Xt(e,t,n){if(Yt(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 Zt(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 Qt(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 $t(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function en(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function tn(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 nn(e){if(!e._valueTracker){var t=en(e)?`checked`:`value`;e._valueTracker=tn(e,t,``+e[t])}}function L(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=en(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var rn=/[\n"\\]/g;function an(e){return e.replace(rn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function on(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=``+$t(t)):e.value!==``+$t(t)&&(e.value=``+$t(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):cn(e,$t(n)):o===`number`&&e.value==t?cn(e,$t(e.value)):cn(e,$t(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=``+$t(s):e.removeAttribute(`name`)}function sn(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)){nn(e);return}n=n==null?``:``+$t(n),t=t==null?n:``+$t(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),nn(e)}function cn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function ln(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=``+$t(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 un(e,t,n){t!=null&&(t=``+$t(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+$t(n)}function dn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(be(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=$t(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),nn(e)}function fn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pn=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 mn(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||pn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function hn(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]=``,F=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(mn(e,a,r),F=!0)}else for(var o in t)t.hasOwnProperty(o)&&mn(e,o,t[o])}function gn(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 _n=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`],[`maskType`,`mask-type`],[`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`]]),vn=/^[\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 yn(e){return vn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function bn(){}var xn=null;function R(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sn=null,z=null;function Cn(e){var t=Rt(e);if(t&&(e=t.stateNode)){var n=e[Ot]||null;a:switch(e=t.stateNode,t.type){case`input`:if(on(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="`+an(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Ot]||null;if(!a)throw Error(i(90));on(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&&L(r)}break a;case`textarea`:un(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&ln(e,!!n.multiple,t,!1)}}}var wn=!1;function Tn(e,t,n){if(wn)return e(t,n);wn=!0;try{return e(t)}finally{if(wn=!1,(Sn!==null||z!==null)&&(Rd(),Sn&&(t=Sn,e=z,z=Sn=null,Cn(t),e)))for(t=0;t<e.length;t++)Cn(e[t])}}function En(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Ot]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Dn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,On=!1;if(Dn)try{var kn={};Object.defineProperty(kn,"passive",{get:function(){On=!0}}),window.addEventListener(`test`,kn,kn),window.removeEventListener(`test`,kn,kn)}catch{On=!1}var An=null,jn=null,Mn=null;function Nn(){if(Mn)return Mn;var e,t=jn,n=t.length,r,i=`value`in An?An.value:An.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 Mn=i.slice(e,1<r?1-r:void 0)}function Pn(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 Fn(){return!0}function In(){return!1}function Ln(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)?Fn:In,this.isPropagationStopped=In,this}return T(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=Fn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Fn)},persist:function(){},isPersistent:Fn}),t}var Rn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zn=Ln(Rn),Bn=T({},Rn,{view:0,detail:0}),Vn=Ln(Bn),Hn,Un,Wn,Gn=T({},Bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:nr,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!==Wn&&(Wn&&e.type===`mousemove`?(Hn=e.screenX-Wn.screenX,Un=e.screenY-Wn.screenY):Un=Hn=0,Wn=e),Hn)},movementY:function(e){return`movementY`in e?e.movementY:Un}}),Kn=Ln(Gn),qn=Ln(T({},Gn,{dataTransfer:0})),Jn=Ln(T({},Bn,{relatedTarget:0})),Yn=Ln(T({},Rn,{animationName:0,elapsedTime:0,pseudoElement:0})),Xn=Ln(T({},Rn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Zn=Ln(T({},Rn,{data:0})),Qn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},$n={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},er={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function tr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=er[e])?!!t[e]:!1}function nr(){return tr}var rr=Ln(T({},Bn,{key:function(e){if(e.key){var t=Qn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Pn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?$n[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:nr,charCode:function(e){return e.type===`keypress`?Pn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Pn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),ir=Ln(T({},Gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ar=Ln(T({},Rn,{submitter:0})),or=Ln(T({},Bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:nr})),sr=Ln(T({},Rn,{propertyName:0,elapsedTime:0,pseudoElement:0})),cr=Ln(T({},Gn,{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})),lr=Ln(T({},Rn,{newState:0,oldState:0,source:0})),ur=[9,13,27,32],dr=Dn&&`CompositionEvent`in window,fr=null;Dn&&`documentMode`in document&&(fr=document.documentMode);var pr=Dn&&`TextEvent`in window&&!fr,mr=Dn&&(!dr||fr&&8<fr&&11>=fr),hr=` `,gr=!1;function _r(e,t){switch(e){case`keyup`:return ur.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function vr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var yr=!1;function br(e,t){switch(e){case`compositionend`:return vr(t);case`keypress`:return t.which===32?(gr=!0,hr):null;case`textInput`:return e=t.data,e===hr&&gr?null:e;default:return null}}function xr(e,t){if(yr)return e===`compositionend`||!dr&&_r(e,t)?(e=Nn(),Mn=jn=An=null,yr=!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 mr&&t.locale!==`ko`?null:t.data;default:return null}}var Sr={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 Cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Sr[e.type]:t===`textarea`}function wr(e,t,n,r){Sn?z?z.push(r):z=[r]:Sn=r,t=Jf(t,`onChange`),0<t.length&&(n=new zn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Tr=null,Er=null;function Dr(e){Vf(e,0)}function Or(e){if(L(zt(e)))return e}function kr(e,t){if(e===`change`)return t}var Ar=!1;if(Dn){var jr;if(Dn){var Mr=`oninput`in document;if(!Mr){var Nr=document.createElement(`div`);Nr.setAttribute(`oninput`,`return;`),Mr=typeof Nr.oninput==`function`}jr=Mr}else jr=!1;Ar=jr&&(!document.documentMode||9<document.documentMode)}function Pr(){Tr&&(Tr.detachEvent(`onpropertychange`,Fr),Er=Tr=null)}function Fr(e){if(e.propertyName===`value`&&Or(Er)){var t=[];wr(t,Er,e,R(e)),Tn(Dr,t)}}function Ir(e,t,n){e===`focusin`?(Pr(),Tr=t,Er=n,Tr.attachEvent(`onpropertychange`,Fr)):e===`focusout`&&Pr()}function B(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Or(Er)}function Lr(e,t){if(e===`click`)return Or(t)}function Rr(e,t){if(e===`input`||e===`change`)return Or(t)}function zr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Br=typeof Object.is==`function`?Object.is:zr;function Vr(e,t){if(Br(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(!Be.call(t,i)||!Br(e[i],t[i]))return!1}return!0}function Hr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wr(e,t){var n=Ur(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=Ur(n)}}function Gr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Hr(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=Hr(e.document)}return t}function qr(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 Jr=Dn&&`documentMode`in document&&11>=document.documentMode,Yr=null,Xr=null,Zr=null,Qr=!1;function $r(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qr||Yr==null||Yr!==Hr(r)||(r=Yr,`selectionStart`in r&&qr(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}),Zr&&Vr(Zr,r)||(Zr=r,r=Jf(Xr,`onSelect`),0<r.length&&(t=new zn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Yr)))}function ei(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ti={animationend:ei(`Animation`,`AnimationEnd`),animationiteration:ei(`Animation`,`AnimationIteration`),animationstart:ei(`Animation`,`AnimationStart`),transitionrun:ei(`Transition`,`TransitionRun`),transitionstart:ei(`Transition`,`TransitionStart`),transitioncancel:ei(`Transition`,`TransitionCancel`),transitionend:ei(`Transition`,`TransitionEnd`)},ni={},ri={};Dn&&(ri=document.createElement(`div`).style,`AnimationEvent`in window||(delete ti.animationend.animation,delete ti.animationiteration.animation,delete ti.animationstart.animation),`TransitionEvent`in window||delete ti.transitionend.transition);function ii(e){if(ni[e])return ni[e];if(!ti[e])return e;var t=ti[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ri)return ni[e]=t[n];return e}var ai=ii(`animationend`),oi=ii(`animationiteration`),si=ii(`animationstart`),ci=ii(`transitionrun`),li=ii(`transitionstart`),ui=ii(`transitioncancel`),di=ii(`transitionend`),fi=new Map,pi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);pi.push(`scrollEnd`);function mi(e,t){fi.set(e,t),Wt(t,[e])}var hi=0;function gi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=yd.identifierPrefix;var n=hi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function _i(e){if(e==null||typeof e==`string`)return e;var t=null,n=Dd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function vi(e,t){return e=_i(e),t=_i(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var yi=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)},bi=[],V=0,xi=0;function Si(){for(var e=V,t=xi=V=0;t<e;){var n=bi[t];bi[t++]=null;var r=bi[t];bi[t++]=null;var i=bi[t];bi[t++]=null;var a=bi[t];if(bi[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&&Ei(n,i,a)}}function Ci(e,t,n,r){bi[V++]=e,bi[V++]=t,bi[V++]=n,bi[V++]=r,xi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function wi(e,t,n,r){return Ci(e,t,n,r),Di(e)}function Ti(e,t){return Ci(e,null,null,t),Di(e)}function Ei(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-rt(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Di(e){if(50<Od)throw Od=0,kd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Oi={};function ki(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 Ai(e,t,n,r){return new ki(e,t,n,r)}function ji(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mi(e,t){var n=e.alternate;return n===null?(n=Ai(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&1206910976,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 Ni(e,t){e.flags&=1206910978;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 r==`function`)ji(r)&&(s=1);else if(typeof r==`string`)s=qm(e,n,Te.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case fe:return e=Ai(31,n,t,a),e.elementType=fe,e.lanes=o,e;case re:return Fi(n.children,a,o,t);case ie:s=8,a|=24;break;case ae:return e=Ai(12,n,t,a|2),e.elementType=ae,e.lanes=o,e;case ce:return e=Ai(13,n,t,a),e.elementType=ce,e.lanes=o,e;case le:return e=Ai(19,n,t,a),e.elementType=le,e.lanes=o,e;case pe:case he:return e=a|32,e=Ai(30,n,t,e),e.elementType=he,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case se:s=10;break a;case oe:s=9;break a;case O:s=11;break a;case ue:s=14;break a;case de:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ai(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Fi(e,t,n,r){return e=Ai(7,e,r,t),e.lanes=n,e}function H(e,t,n){return e=Ai(6,e,null,t),e.lanes=n,e}function Ii(e){var t=Ai(18,null,null,0);return t.stateNode=e,t}function Li(e,t,n){return t=Ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ri=new WeakMap;function zi(e,t){if(typeof e==`object`&&e){var n=Ri.get(e);return n===void 0?(t={value:e,source:t,stack:ze(t)},Ri.set(e,t),t):n}return{value:e,source:t,stack:ze(t)}}var Bi=[],Vi=0,Hi=null,Ui=0,Wi=[],Gi=0,Ki=null,qi=1,Ji=``;function Yi(e,t){Bi[Vi++]=Ui,Bi[Vi++]=Hi,Hi=e,Ui=t}function Xi(e,t,n){Wi[Gi++]=qi,Wi[Gi++]=Ji,Wi[Gi++]=Ki,Ki=e;var r=qi;e=Ji;var i=32-rt(r)-1;r&=~(1<<i),n+=1;var a=32-rt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,qi=1<<32-rt(t)+i|n<<i|r,Ji=a+e}else qi=1<<a|n<<i|r,Ji=e}function Zi(e){e.return!==null&&(Yi(e,1),Xi(e,1,0))}function Qi(e){for(;e===Hi;)Hi=Bi[--Vi],Bi[Vi]=null,Ui=Bi[--Vi],Bi[Vi]=null;for(;e===Ki;)Ki=Wi[--Gi],Wi[Gi]=null,Ji=Wi[--Gi],Wi[Gi]=null,qi=Wi[--Gi],Wi[Gi]=null}function $i(e,t){Wi[Gi++]=qi,Wi[Gi++]=Ji,Wi[Gi++]=Ki,qi=t.id,Ji=t.overflow,Ki=e}var ea=null,ta=null,U=!1,na=null,ra=!1,ia=Error(i(519));function aa(e){throw da(zi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ia}function oa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Dt]=e,t[Ot]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<zf.length;n++)Q(zf[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),sn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),dn(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||ep(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=bn),t=!0):t=!1,t||aa(e,!0)}function sa(e){for(ea=e.return;ea;)switch(ea.tag){case 5:case 31:case 13:ra=!1;return;case 27:case 3:ra=!0;return;default:ea=ea.return}}function ca(e){if(e!==ea)return!1;if(!U)return sa(e),U=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||pp(e.type,e.memoizedProps)),n=!n),n&&ta&&aa(e),sa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ta=dm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ta=dm(e)}else t===27?(t=ta,Sp(e.type)?(e=um,um=null,ta=e):ta=t):ta=ea?lm(e.stateNode.nextSibling):null;return!0}function la(){ta=ea=null,U=!1}function ua(){var e=na;return e!==null&&(dd===null?dd=e:dd.push.apply(dd,e),na=null),e}function da(e){na===null?na=[e]:na.push(e)}var fa=Ce(null),pa=null,ma=null;function ha(e,t,n){we(fa,t._currentValue),t._currentValue=n}function ga(e){e._currentValue=fa.current,N(fa)}function _a(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 va(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),_a(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),_a(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),_a(a.return,n,e),s=a.child,s=s===null?null:s.sibling):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 ya(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;Br(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}a=a.return}return e!==null&&va(t,e,n,r),t.flags|=262144,e!==null}function ba(e){for(e=e.firstContext;e!==null;){if(!Br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function xa(e){pa=e,ma=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Sa(e){return wa(pa,e)}function Ca(e,t){return pa===null&&xa(e),wa(e,t)}function wa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ma===null){if(e===null)throw Error(i(308));ma=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ma=ma.next=t;return n}var Ta=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()})}},Ea=t.unstable_scheduleCallback,Da=t.unstable_NormalPriority,Oa={$$typeof:se,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ka(){return{controller:new Ta,data:new Map,refCount:0}}function Aa(e){e.refCount--,e.refCount===0&&Ea(Da,function(){e.controller.abort()})}function ja(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Ma=null;function Na(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Pa=null,Fa=0,Ia=0,La=null;function Ra(e,t){if(Pa===null){var n=Pa=[];Fa=0,Ia=Pf(),La={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Fa++,t.then(za,za),t}function za(){if(--Fa===0&&(Ma=null,Pa!==null)){La!==null&&(La.status=`fulfilled`);var e=Pa;Pa=null,Ia=0,La=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ba(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 Va=A.S;A.S=function(e,t){if(md=Ge(),typeof t==`object`&&t&&typeof t.then==`function`&&Ra(e,t),Ma!==null)for(var n=bf;n!==null;)ja(n,Ma),n=n.next;if(n=e.types,n!==null){for(var r=bf;r!==null;)ja(r,n),r=r.next;if(Ia!==0){r=Ma,r===null&&(r=Ma=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Va!==null&&Va(e,t)};var Ha=Ce(null);function Ua(){var e=Ha.current;return e===null?Qu.pooledCache:e}function Wa(e,t){t===null?we(Ha,Ha.current):we(Ha,t.pool)}function Ga(){var e=Ua();return e===null?null:{parent:Oa._currentValue,pool:e}}var Ka=Error(i(460)),qa=Error(i(474)),Ja=Error(i(542)),Ya={then:function(){}};function Xa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Za(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(bn,bn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,to(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(bn,bn);else{if(e=Qu,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,to(e),e}throw $a=t,Ka}}function Qa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?($a=e,Ka):e}}var $a=null;function eo(){if($a===null)throw Error(i(459));var e=$a;return $a=null,e}function to(e){if(e===Ka||e===Ja)throw Error(i(483))}var no=null,ro=0;function io(e){var t=ro;return ro+=1,no===null&&(no=[]),Za(no,e,t)}function ao(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function oo(e,t){throw t.$$typeof===ne?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function so(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=Mi(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|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=H(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===re?(e=d(e,t,n.props.children,r,n.key),ao(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===de&&Qa(i)===t.type)?(t=a(t,n.props),ao(t,n),t.return=e,t):(t=Pi(n.type,n.key,n.props,null,e.mode,r),ao(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=Li(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Fi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=H(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case E:return n=Pi(t.type,t.key,t.props,null,e.mode,n),ao(n,t),n.return=e,n;case D:return t=Li(t,e.mode,n),t.return=e,t;case de:return t=Qa(t),f(e,t,n)}if(be(t)||_e(t))return t=Fi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,io(t),n);if(t.$$typeof===se)return f(e,Ca(e,t),n);oo(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 E:return n.key===i?l(e,t,n,r):null;case D:return n.key===i?u(e,t,n,r):null;case de:return n=Qa(n),p(e,t,n,r)}if(be(n)||_e(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,io(n),r);if(n.$$typeof===se)return p(e,t,Ca(e,n),r);oo(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 E:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case D:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case de:return r=Qa(r),m(e,t,n,r,i)}if(be(r)||_e(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,io(r),i);if(r.$$typeof===se)return m(e,t,n,Ca(t,r),i);oo(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),U&&Yi(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 U&&Yi(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(_.key===null?h:_.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)}),U&&Yi(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),U&&Yi(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 U&&Yi(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(_.key===null?g:_.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)}),U&&Yi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===re&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case E:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===re){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),ao(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===de&&Qa(l)===r.type){n(e,r.sibling),c=a(r,o.props),ao(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===re?(c=Fi(o.props.children,e.mode,c,o.key),ao(c,o),c.return=e,e=c):(c=Pi(o.type,o.key,o.props,null,e.mode,c),ao(c,o),c.return=e,e=c)}return s(e);case D: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}n(e,r);break}t(e,r),r=r.sibling}c=Li(o,e.mode,c),c.return=e,e=c}return s(e);case de:return o=Qa(o),_(e,r,o,c)}if(be(o))return h(e,r,o,c);if(_e(o)){if(l=_e(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,io(o),c);if(o.$$typeof===se)return _(e,r,Ca(e,o),c);oo(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=H(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ro=0;var i=_(e,t,n,r);return no=null,i}catch(t){if(t===Ka||t===Ja)throw t;var a=Ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var co=so(!0),lo=so(!1),uo=!1;function fo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function po(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 mo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ho(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Di(e),Ei(e,null,n),t}return Ci(e,r,t,n),Di(e)}function go(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,bt(e,n)}}function _o(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}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var vo=!1;function yo(){if(vo){var e=La;if(e!==null)throw e}}function bo(e,t,n,r){vo=!1;var i=e.updateQueue;uo=!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?(X&f)===f:(r&f)===f){f!==0&&f===Ia&&(vo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=T({},d,f);break a;case 2:uo=!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),ad|=o,e.lanes=o,e.memoizedState=d}}function xo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function So(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)xo(n[e],t)}var Co=Ce(null),wo=Ce(0);function To(e,t){e=rd,we(wo,e),we(Co,t),rd=e|t.baseLanes}function Eo(){we(wo,rd),we(Co,Co.current)}function Do(){rd=wo.current,N(Co),N(wo)}var Oo=Ce(null),ko=null;function W(e){var t=e.alternate;we(Po,Po.current&1),we(Oo,e),ko===null&&(t===null||Co.current!==null||t.memoizedState!==null)&&(ko=e)}function Ao(e){we(Po,Po.current),we(Oo,e),ko===null&&(ko=e)}function jo(e){e.tag===22?(we(Po,Po.current),we(Oo,e),ko===null&&(ko=e)):Mo()}function Mo(){we(Po,Po.current),we(Oo,Oo.current)}function No(e){N(Oo),ko===e&&(ko=null),N(Po)}var Po=Ce(0);function Fo(e,t){we(Oo,Oo.current),we(Po,t)}function Io(e){N(Po),N(Oo),ko===e&&(ko=null)}function Lo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||om(n)||sm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){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 Ro=0,G=null,zo=null,Bo=null,Vo=!1,Ho=!1,Uo=!1,Wo=0,Go=0,Ko=null,qo=0;function Jo(){throw Error(i(321))}function Yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Br(e[n],t[n]))return!1;return!0}function Xo(e,t,n,r,i,a){return Ro=a,G=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,A.H=e===null||e.memoizedState===null?pc:mc,Uo=!1,a=n(r,i),Uo=!1,Ho&&(a=Qo(t,n,r,i)),Zo(e),a}function Zo(e){A.H=fc;var t=zo!==null&&zo.next!==null;if(Ro=0,Bo=zo=G=null,Vo=!1,Go=0,Ko=null,t)throw Error(i(300));e===null||jc||(e=e.dependencies,e!==null&&ba(e)&&(jc=!0))}function Qo(e,t,n,r){G=e;var a=0;do{if(Ho&&(Ko=null),Go=0,Ho=!1,25<=a)throw Error(i(301));if(a+=1,Bo=zo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}A.H=hc,o=t(n,r)}while(Ho);return o}function $o(){var e=A.H,t=e.useState()[0];return t=typeof t.then==`function`?os(t):t,e=e.useState()[0],(zo===null?null:zo.memoizedState)!==e&&(G.flags|=1024),t}function es(){var e=Wo!==0;return Wo=0,e}function ts(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ns(e){if(Vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Vo=!1}Ro=0,Bo=zo=G=null,Ho=!1,Go=Wo=0,Ko=null}function rs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bo===null?G.memoizedState=Bo=e:Bo=Bo.next=e,Bo}function is(){if(zo===null){var e=G.alternate;e=e===null?null:e.memoizedState}else e=zo.next;var t=Bo===null?G.memoizedState:Bo.next;if(t!==null)Bo=t,zo=e;else{if(e===null)throw G.alternate===null?Error(i(467)):Error(i(310));zo=e,e={memoizedState:zo.memoizedState,baseState:zo.baseState,baseQueue:zo.baseQueue,queue:zo.queue,next:null},Bo===null?G.memoizedState=Bo=e:Bo=Bo.next=e}return Bo}function as(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function os(e){var t=Go;return Go+=1,Ko===null&&(Ko=[]),e=Za(Ko,e,t),t=G,(Bo===null?t.memoizedState:Bo.next)===null&&(t=t.alternate,A.H=t===null||t.memoizedState===null?pc:mc),e}function ss(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return os(e);if(e.$$typeof===k)return;if(e.$$typeof===se)return Sa(e)}throw Error(i(438,String(e)))}function cs(e){var t=null,n=G.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=G.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=as(),G.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]=me;return t.index++,n}function ls(e,t){return typeof t==`function`?t(e):t}function us(e){return ds(is(),zo,e)}function ds(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?(Ro&f)===f:(X&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===Ia&&(d=!0);else if((Ro&p)===p){u=u.next,p===Ia&&(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,G.lanes|=p,ad|=p;f=u.action,Uo&&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,G.lanes|=f,ad|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Br(o,e.memoizedState)&&(jc=!0,d&&(n=La,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 fs(e){var t=is(),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);Br(o,t.memoizedState)||(jc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ps(e,t,n){var r=G,a=is(),o=U;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Br((zo||a).memoizedState,n);if(s&&(a.memoizedState=n,jc=!0),a=a.queue,Rs(gs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Bo!==null&&!!(Bo.memoizedState.tag&1),Ns(e?9:8,{destroy:void 0},hs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Qu===null)throw Error(i(349));o||Ro&127||ms(r,t,n)}return n}function ms(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=G.updateQueue,t===null?(t=as(),G.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hs(e,t,n,r){t.value=n,t.getSnapshot=r,_s(t)&&vs(e)}function gs(e,t,n){return n(function(){_s(t)&&vs(e)})}function _s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Br(e,n)}catch{return!0}}function vs(e){var t=Ti(e,2);t!==null&&Nd(t,e,2)}function ys(e){var t=rs();if(typeof e==`function`){var n=e;if(e=n(),Uo){nt(!0);try{n()}finally{nt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:e},t}function bs(e,t,n,r){return e.baseState=n,ds(e,zo,typeof r==`function`?r:ls)}function xs(e,t,n,r,a){if(lc(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)}};A.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ss(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ss(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=A.T,o={};o.types=a===null?null:a.types,A.T=o;try{var s=n(i,r),c=A.S;c!==null&&c(o,s),Cs(e,t,s)}catch(n){Ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),A.T=a}}else try{a=n(i,r),Cs(e,t,a)}catch(n){Ts(e,t,n)}}function Cs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ws(e,t,n)},function(n){return Ts(e,t,n)}):ws(e,t,n)}function ws(e,t,n){t.status=`fulfilled`,t.value=n,Es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ss(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,Es(t),t=t.next;while(t!==r)}e.action=null}function Es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ds(e,t){return t}function Os(e,t){if(U){var n=Qu.formState;if(n!==null){a:{var r=G;if(U){if(ta){b:{for(var i=ta,a=ra;i.nodeType!==8;)if(!a||(i=lm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ta=lm(i.nextSibling),r=i.data===`F!`;break a}}aa(r)}r=!1}r&&(t=n[0])}}return n=rs(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ds,lastRenderedState:t},n.queue=r,n=oc.bind(null,G,r),r.dispatch=n,r=ys(!1),a=cc.bind(null,G,!1,r.queue),r=rs(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=xs.bind(null,G,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ks(e){return As(is(),zo,e)}function As(e,t,n){if(t=ds(e,t,Ds)[0],e=us(ls)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=os(t)}catch(e){throw e===Ka?Ja:e}else r=t;t=is();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(G.flags|=2048,Ns(9,{destroy:void 0},js.bind(null,i,n),null)),[r,a,e]}function js(e,t){e.action=t}function Ms(e){var t=is(),n=zo;if(n!==null)return As(t,n,e);is(),t=t.memoizedState,n=is();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=G.updateQueue,t===null&&(t=as(),G.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 Ps(){return is().memoizedState}function Fs(e,t,n,r){var i=rs();G.flags|=e,i.memoizedState=Ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function Is(e,t,n,r){var i=is();r=r===void 0?null:r;var a=i.memoizedState.inst;zo!==null&&r!==null&&Yo(r,zo.memoizedState.deps)?i.memoizedState=Ns(t,a,n,r):(G.flags|=e,i.memoizedState=Ns(1|t,a,n,r))}function Ls(e,t){Fs(8390656,8,e,t)}function Rs(e,t){Is(2048,8,e,t)}function zs(e){G.flags|=4;var t=G.updateQueue;if(t===null)t=as(),G.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Bs(e){var t=is().memoizedState;return zs({ref:t,nextImpl:e}),function(){if(J&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Vs(e,t){return Is(4,2,e,t)}function Hs(e,t){return Is(4,4,e,t)}function Us(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 Ws(e,t,n){n=n==null?null:n.concat([e]),Is(4,4,Us.bind(null,t,e),n)}function Gs(){}function Ks(e,t){var n=is();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qs(e,t){var n=is();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Yo(t,r[1]))return r[0];if(r=e(),Uo){nt(!0);try{e()}finally{nt(!1)}}return n.memoizedState=[r,t],r}function Js(e,t,n){return n===void 0||Ro&1073741824&&!(X&261930)?e.memoizedState=t:(e.memoizedState=n,e=jd(),G.lanes|=e,ad|=e,n)}function Ys(e,t,n,r){return Br(n,t)?n:Co.current===null?!(Ro&106)||Ro&1073741824&&!(X&261930)?(jc=!0,e.memoizedState=n):(e=jd(),G.lanes|=e,ad|=e,t):(e=Js(e,n,r),Br(e,t)||(jc=!0),e)}function Xs(e,t,n,r,i){var a=j.p;j.p=a!==0&&8>a?a:8;var o=A.T,s={};s.types=o===null?null:o.types,A.T=s,cc(e,!1,t,n);try{var c=i(),l=A.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?sc(e,t,Ba(c,r),Ad(e)):sc(e,t,r,Ad(e))}catch(n){sc(e,t,{then:function(){},status:`rejected`,reason:n},Ad())}finally{j.p=a,o!==null&&s.types!==null&&(o.types=s.types),A.T=o}}function Zs(){}function Qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=$s(e).queue;Xs(e,a,t,xe,n===null?Zs:function(){return ec(e),n(r)})}function $s(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:xe,baseState:xe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:xe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ec(e){var t=$s(e);t.next===null&&(t=e.alternate.memoizedState),sc(e,t.next.queue,{},Ad())}function tc(){return Sa(sh)}function nc(){return is().memoizedState}function rc(){return is().memoizedState}function ic(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ad();e=mo(n);var r=ho(t,e,n);r!==null&&(Nd(r,t,n),go(r,t,n)),t={cache:ka()},e.payload=t;return}t=t.return}}function ac(e,t,n){var r=Ad();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)?uc(t,n):(n=wi(e,t,n,r),n!==null&&(Nd(n,e,r),dc(n,t,r)))}function oc(e,t,n){sc(e,t,n,Ad())}function sc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(lc(e))uc(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,Br(s,o))return Ci(e,t,i,0),Qu===null&&Si(),!1}catch{}if(n=wi(e,t,i,r),n!==null)return Nd(n,e,r),dc(n,t,r),!0}return!1}function cc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(i(479))}else t=wi(e,n,r,2),t!==null&&Nd(t,e,2)}function lc(e){var t=e.alternate;return e===G||t!==null&&t===G}function uc(e,t){Ho=Vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bt(e,n)}}var fc={readContext:Sa,use:ss,useCallback:Jo,useContext:Jo,useEffect:Jo,useImperativeHandle:Jo,useLayoutEffect:Jo,useInsertionEffect:Jo,useMemo:Jo,useReducer:Jo,useRef:Jo,useState:Jo,useDebugValue:Jo,useDeferredValue:Jo,useTransition:Jo,useSyncExternalStore:Jo,useId:Jo,useHostTransitionStatus:Jo,useFormState:Jo,useActionState:Jo,useOptimistic:Jo,useMemoCache:Jo,useCacheRefresh:Jo,useEffectEvent:Jo},pc={readContext:Sa,use:ss,useCallback:function(e,t){return rs().memoizedState=[e,t===void 0?null:t],e},useContext:Sa,useEffect:Ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Fs(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){Fs(4,2,e,t)},useMemo:function(e,t){var n=rs();t=t===void 0?null:t;var r=e();if(Uo){nt(!0);try{e()}finally{nt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=rs();if(n!==void 0){var i=n(t);if(Uo){nt(!0);try{n(t)}finally{nt(!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=ac.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=rs();return e={current:e},t.memoizedState=e},useState:function(e){e=ys(e);var t=e.queue,n=oc.bind(null,G,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){return Js(rs(),e,t)},useTransition:function(){var e=ys(!1);return e=Xs.bind(null,G,e.queue,!0,!1),rs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=G,a=rs();if(U){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Qu===null)throw Error(i(349));X&127||ms(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ls(gs.bind(null,r,o,e),[e]),r.flags|=2048,Ns(9,{destroy:void 0},hs.bind(null,r,o,n,t),null),n},useId:function(){var e=rs(),t=Qu.identifierPrefix;if(U){var n=Ji,r=qi;n=(r&~(1<<32-rt(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Wo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=qo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:Os,useActionState:Os,useOptimistic:function(e){var t=rs();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=cc.bind(null,G,!0,n),n.dispatch=t,[e,t]},useMemoCache:cs,useCacheRefresh:function(){return rs().memoizedState=ic.bind(null,G)},useEffectEvent:function(e){var t=rs(),n={impl:e};return t.memoizedState=n,function(){if(J&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},mc={readContext:Sa,use:ss,useCallback:Ks,useContext:Sa,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:us,useRef:Ps,useState:function(){return us(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){return Ys(is(),zo.memoizedState,e,t)},useTransition:function(){var e=us(ls)[0],t=is().memoizedState;return[typeof e==`boolean`?e:os(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:ks,useActionState:ks,useOptimistic:function(e,t){return bs(is(),zo,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs},hc={readContext:Sa,use:ss,useCallback:Ks,useContext:Sa,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:fs,useRef:Ps,useState:function(){return fs(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=is();return zo===null?Js(n,e,t):Ys(n,zo.memoizedState,e,t)},useTransition:function(){var e=fs(ls)[0],t=is().memoizedState;return[typeof e==`boolean`?e:os(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:Ms,useActionState:Ms,useOptimistic:function(e,t){var n=is();return zo===null?(n.baseState=e,[e,n.queue.dispatch]):bs(n,zo,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs};function gc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _c={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=mo(r);i.payload=t,n!=null&&(i.callback=n),t=ho(e,i,r),t!==null&&(Nd(t,e,r),go(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=mo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=ho(e,i,r),t!==null&&(Nd(t,e,r),go(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ad(),r=mo(n);r.tag=2,t!=null&&(r.callback=t),t=ho(e,r,n),t!==null&&(Nd(t,e,n),go(t,e,n))}};function vc(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?!Vr(n,r)||!Vr(i,a):!0}function yc(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&&_c.enqueueReplaceState(t,t.state,null)}function bc(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=T({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function xc(e){yi(e)}function Sc(e){console.error(e)}function Cc(e){yi(e)}function wc(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 Ec(e,t,n){return n=mo(n),n.tag=3,n.payload={element:null},n.callback=function(){wc(e,t)},n}function Dc(e){return e=mo(e),e.tag=3,e}function Oc(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`&&(_d===null?_d=new Set([this]):_d.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function kc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ya(t,n,a,!0),n=Oo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return ko===null?Gd():n.alternate===null&&id===0&&(id=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ya?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),mf(e,r,a)),!1;case 22:return n.flags|=65536,r===Ya?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)),mf(e,r,a)),!1}throw Error(i(435,n.tag))}return mf(e,r,a),Gd(),!1}if(U)return t=Oo.current,t===null?(r!==ia&&(t=Error(i(423),{cause:r}),da(zi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=zi(r,n),a=Ec(e.stateNode,r,a),_o(e,a),id!==4&&(id=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ia&&(e=Error(i(422),{cause:r}),da(zi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=zi(o,n),ud===null?ud=[o]:ud.push(o),id!==4&&(id=2),t===null)return!0;r=zi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ec(n.stateNode,r,e),_o(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`&&(_d===null||!_d.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Dc(a),Oc(a,e,n,r),_o(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Ac=Error(i(461)),jc=!1;function Mc(e,t,n,r){t.child=e===null?lo(t,null,n,r):co(t,e.child,n,r)}function Nc(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 xa(t),r=Xo(e,t,n,o,a,i),s=es(),e!==null&&!jc?(ts(e,t,i),ol(e,t,i)):(U&&s&&Zi(t),t.flags|=1,Mc(e,t,r,i),t.child)}function Pc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ji(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Fc(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,!sl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Vr:n,n(o,r)&&e.ref===t.ref)return ol(e,t,i)}return t.flags|=1,e=Mi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Fc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Vr(a,r)&&e.ref===t.ref){if(jc=!1,t.pendingProps=r=a,sl(e,i))e.flags&131072&&(jc=!0);else return t.lanes=e.lanes,ol(e,t,i)}}return Uc(e,t,n,r,i)}function Ic(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 Rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Wa(t,a===null?null:a.cachePool),a===null?Eo():To(t,a),jo(t);else return r=t.lanes=536870912,Rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Wa(t,null),Eo(),Mo()):(Wa(t,a.cachePool),To(t,a),Mo(),t.memoizedState=null);return Mc(e,t,i,n),t.child}function Lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rc(e,t,n,r,i){var a=Ua();return a=a===null?null:{parent:Oa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Wa(t,null),Eo(),jo(t),e!==null&&ya(e,t,r,!0),t.childLanes=i,null}function zc(e,t){return t=Qc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Bc(e,t,n){return co(t,e.child,null,n),e=zc(t,t.pendingProps),e.flags|=2,No(t),t.memoizedState=null,e}function Vc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(U){if(r.mode===`hidden`)return e=zc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Lc(null,e);if(Ao(t),(e=ta)?(e=am(e,ra),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki===null?null:{id:qi,overflow:Ji},retryLane:536870912,hydrationErrors:null},n=Ii(e),n.return=t,t.child=n,ea=t,ta=null)):e=null,e===null)throw aa(t);return t.lanes=536870912,null}return zc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Ao(t),a){if(t.flags&256)t.flags&=-257,t=Bc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(jc||ya(e,t,n,!1),a=(n&e.childLanes)!==0,jc||a){if(Co.current===null){if(r=Qu,r!==null&&(s=xt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ti(e,s),Nd(r,e,s),Ac;Gd()}t=Bc(e,t,n)}else e=o.treeContext,ta=lm(s.nextSibling),ea=t,U=!0,na=null,ra=!1,e!==null&&$i(t,e),t=zc(t,r),t.flags|=134221824;return t}return e=Mi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hc(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 Uc(e,t,n,r,i){return xa(t),n=Xo(e,t,n,r,void 0,i),r=es(),e!==null&&!jc?(ts(e,t,i),ol(e,t,i)):(U&&r&&Zi(t),t.flags|=1,Mc(e,t,n,i),t.child)}function Wc(e,t,n,r,i,a){return xa(t),t.updateQueue=null,n=Qo(t,r,n,i),Zo(e),r=es(),e!==null&&!jc?(ts(e,t,a),ol(e,t,a)):(U&&r&&Zi(t),t.flags|=1,Mc(e,t,n,a),t.child)}function Gc(e,t,n,r,i){if(xa(t),t.stateNode===null){var a=Oi,o=n.contextType;typeof o==`object`&&o&&(a=Sa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=_c,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},fo(t),o=n.contextType,a.context=typeof o==`object`&&o?Sa(o):Oi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(gc(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&&_c.enqueueReplaceState(a,a.state,null),bo(t,r,a,i),yo(),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=bc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Oi,typeof u==`object`&&u&&(o=Sa(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)&&yc(t,a,r,o),uo=!1;var f=t.memoizedState;a.state=f,bo(t,r,a,i),yo(),l=t.memoizedState,s||f!==l||uo?(typeof d==`function`&&(gc(t,n,d,r),l=t.memoizedState),(c=uo||vc(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,po(e,t),o=t.memoizedProps,u=bc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Oi,typeof l==`object`&&l&&(c=Sa(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)&&yc(t,a,r,c),uo=!1,f=t.memoizedState,a.state=f,bo(t,r,a,i),yo();var p=t.memoizedState;o!==d||f!==p||uo||e!==null&&e.dependencies!==null&&ba(e.dependencies)?(typeof s==`function`&&(gc(t,n,s,r),p=t.memoizedState),(u=uo||vc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ba(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,Hc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=co(t,e.child,null,i),t.child=co(t,null,n,i)):Mc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ol(e,t,i),e}function Kc(e,t,n,r){return la(),t.flags|=256,Mc(e,t,n,r),t.child}var qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:Ga()}}function Yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=cd),e}function Xc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Po.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(U){if(i?W(t):Mo(),(e=ta)?(e=am(e,ra),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki===null?null:{id:qi,overflow:Ji},retryLane:536870912,hydrationErrors:null},n=Ii(e),n.return=t,t.child=n,ea=t,ta=null)):e=null,e===null)throw aa(t);return t.lanes=sm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Mo(),i=t.mode,a=Qc({mode:`hidden`,children:a},i),r=Fi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Jc(n),r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(null,r)):(W(t),Zc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return el(e,t,a,o,r,c,s,n)}return i?(Mo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Mi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Fi(i,a,n,null),i.flags|=2):i=Mi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Lc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Jc(n):(a=i.cachePool,a===null?a=Ga():(s=Oa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(e.child,r)):(W(t),n=e.child,e=n.sibling,n=Mi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Zc(e,t){return t=Qc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Qc(e,t){return e=Ai(22,e,null,t),e.lanes=0,e}function $c(e,t,n){return co(t,e.child,null,n),e=Zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function el(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(W(t),t.flags&=-257,$c(e,t,c)):t.memoizedState===null?(Mo(),o=a.fallback,s=t.mode,a=Qc({mode:`visible`,children:a.children},s),o=Fi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,co(t,e.child,null,c),a=t.child,a.memoizedState=Jc(c),a.childLanes=Yc(e,r,c),t.memoizedState=qc,Lc(null,a)):(Mo(),t.child=e.child,t.flags|=128,null);if(W(t),sm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,da({value:a,source:null,stack:null})),$c(e,t,c)}if(jc||ya(e,t,c,!1),r=(c&e.childLanes)!==0,jc||r){if(Co.current!==null)return $c(e,t,c);if(r=Qu,r!==null&&(a=xt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Ti(e,a),Nd(r,e,a),Ac;return om(o)||Gd(),$c(e,t,c)}return om(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,ta=lm(o.nextSibling),ea=t,U=!0,na=null,ra=!1,e!==null&&$i(t,e),t=Zc(t,a.children),t.flags|=134221824,t)}function K(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),_a(e.return,t,n)}function tl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Lo(n)===null&&(t=e),e=e.sibling}return t}function nl(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 rl(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function il(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Po.current;if(t.flags&128)return Fo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Fo(t,o),i===`backwards`&&e!==null?(rl(e),Mc(e,t,r,n),rl(e)):Mc(e,t,r,n),r=U?Ui:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&K(e,n,t);else if(e.tag===19)K(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`backwards`:n=tl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,rl(t)),nl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Lo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}nl(t,!0,n,null,a,r);break;case`together`:nl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=tl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),nl(t,!1,i,n,a,r)}return t.child}function al(e,t,n){var r=t.pendingProps;return ha(t,t.type,r.value),Mc(e,t,r.children,n),t.child}function ol(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ad|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ya(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=Mi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Mi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function sl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&ba(e)))}function cl(e,t,n){switch(t.tag){case 3:ke(t,t.stateNode.containerInfo),ha(t,Oa,e.memoizedState.cache),la();break;case 27:case 5:je(t);break;case 4:ke(t,t.stateNode.containerInfo);break;case 10:ha(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ao(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return W(t),t.flags|=128,null;r=ya(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Xc(e,t,n):(W(t),e=ol(e,t,n),e===null?null:e.sibling)}W(t);break;case 19:if(t.flags&128)return il(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ya(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return il(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Fo(t,Po.current),r)break;return null;case 22:return t.lanes=0,Ic(e,t,n,t.pendingProps);case 24:ha(t,Oa,e.memoizedState.cache)}return ol(e,t,n)}function ll(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)jc=!0;else{if(!sl(e,n)&&!(t.flags&128))return jc=!1,cl(e,t,n);jc=!!(e.flags&131072)}}else jc=!1,U&&t.flags&1048576&&Xi(t,Ui,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Qa(t.elementType),t.type=e,typeof e==`function`)ji(e)?(r=bc(e,r),t.tag=1,t=Gc(null,t,e,r,n)):(t.tag=0,t=Uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===O){t.tag=11,t=Nc(null,t,e,r,n);break a}if(a===ue){t.tag=14,t=Pc(null,t,e,r,n);break a}if(a===se){t.tag=10,t.type=e,t=al(null,t,n);break a}}throw t=ye(e)||e,Error(i(306,t,``))}}return t;case 0:return Uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=bc(r,t.pendingProps),Gc(e,t,r,a,n);case 3:a:{if(ke(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,po(e,t),bo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ha(t,Oa,r),r!==o.cache&&va(t,[Oa],n,!0),yo(),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=Kc(e,t,r,n);break a}if(r!==a){a=zi(Error(i(424)),t),da(a),t=Kc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(ta=lm(e.firstChild),ea=t,U=!0,na=null,ra=!0,n=lo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(la(),r===a){t=ol(e,t,n);break a}Mc(e,t,r,n)}t=t.child}return t;case 26:return Hc(e,t),e===null?(n=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=n:U||(t.stateNode=fp(t.type,t.pendingProps,De.current,t)):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return je(t),e===null&&U&&(r=t.stateNode=hm(t.type,t.pendingProps,De.current),ea=t,ra=!0,a=ta,Sp(t.type)?(um=a,ta=lm(r.firstChild)):ta=a),Mc(e,t,t.pendingProps.children,n),Hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&U&&((a=r=ta)&&(r=rm(r,t.type,t.pendingProps,ra),r===null?a=!1:(t.stateNode=r,ea=t,ta=lm(r.firstChild),ra=!1,a=!0)),a||aa(t)),je(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,pp(a,o)?r=null:s!==null&&pp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Xo(e,t,$o,null,null,n),sh._currentValue=a),Hc(e,t),Mc(e,t,r,n),t.child;case 6:return e===null&&U&&((e=n=ta)&&(n=im(n,t.pendingProps,ra),n===null?e=!1:(t.stateNode=n,ea=t,ta=null,e=!0)),e||aa(t)),null;case 13:return Xc(e,t,n);case 4:return ke(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=co(t,null,r,n):Mc(e,t,r,n),t.child;case 11:return Nc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Hc(e,t),Mc(e,t,r,n),t.child;case 8:return Mc(e,t,t.pendingProps.children,n),t.child;case 12:return Mc(e,t,t.pendingProps.children,n),t.child;case 10:return al(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,xa(t),a=Sa(a),r=r(a),t.flags|=1,Mc(e,t,r,n),t.child;case 14:return Pc(e,t,t.type,t.pendingProps,n);case 15:return Fc(e,t,t.type,t.pendingProps,n);case 19:return il(e,t,n);case 31:return Vc(e,t,n);case 22:return Ic(e,t,n,t.pendingProps);case 24:return xa(t),r=Sa(Oa),e===null?(a=Ua(),a===null&&(a=Qu,o=ka(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},fo(t),ha(t,Oa,a)):((e.lanes&n)!==0&&(po(e,t),bo(t,null,null,n),yo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ha(t,Oa,r),r!==a.cache&&va(t,[Oa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ha(t,Oa,r))),Mc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:U&&Zi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Hc(e,t),Mc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function ul(e){e.flags|=4}function dl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Jm(t,r):Jm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Hd())e.flags|=8192;else throw $a=Ya,qa}}else e.flags&=-16777217}function fl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t)){if(Hd())e.flags|=8192;else throw $a=Ya,qa}}function pl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ht(),e.lanes|=t,ld|=t)}function ml(e,t){if(!U)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,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;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function hl(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&1206910976,r|=i.flags&1206910976,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 gl(e,t,n){var r=t.pendingProps;switch(Qi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hl(t),null;case 1:return hl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ga(Oa),Ae(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ca(t)?ul(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ua())),hl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(ul(t),o===null?(hl(t),dl(t,a,null,r,n)):(hl(t),fl(t,o))):o?o===e.memoizedState?(hl(t),t.flags&=-16777217):(ul(t),hl(t),fl(t,o)):(e=e.memoizedProps,e!==r&&ul(t),hl(t),dl(t,a,e,r,n)),null;case 27:if(Me(t),n=De.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ul(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return hl(t),t.subtreeFlags&=-33554433,null}e=Te.current,ca(t)?oa(t,e):(e=hm(a,r,n),t.stateNode=e,ul(t))}return hl(t),t.subtreeFlags&=-33554433,null;case 5:if(Me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ul(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return hl(t),t.subtreeFlags&=-33554433,null}if(o=Te.current,ca(t))oa(t,o);else{var s=lp(De.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[Dt]=t,o[Ot]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(np(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&&ul(t)}}return hl(t),t.subtreeFlags&=-33554433,dl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ul(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=De.current,ca(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ea,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Dt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||aa(t,!0)}else e=lp(e).createTextNode(r),e[Dt]=t,t.stateNode=e}return hl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ca(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[Dt]=t}else la(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;hl(t),e=!1}else n=ua(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(No(t),t):(No(t),null);if(t.flags&128)throw Error(i(558))}return hl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ca(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[Dt]=t}else la(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;hl(t),a=!1}else a=ua(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(No(t),t):(No(t),null)}return No(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),pl(t,t.updateQueue),hl(t),null);case 4:return Ae(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,hl(t),null;case 10:return ga(t.type),hl(t),null;case 19:if(Io(t),r=t.memoizedState,r===null)return hl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)ml(r,!1);else{if(id!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Lo(e),o!==null){for(t.flags|=128,ml(r,!1),e=o.updateQueue,t.updateQueue=e,pl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ni(n,e),n=n.sibling;return Fo(t,Po.current&1|2),U&&Yi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ge()>hd&&(t.flags|=128,a=!0,ml(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Lo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,pl(t,e),ml(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!U)return hl(t),null}else 2*Ge()-r.renderingStartTime>hd&&n!==536870912&&(t.flags|=128,a=!0,ml(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)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ge(),e.sibling=null,o=Po.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||U?Fo(t,o):(n=o,we(Oo,t),we(Po,n),ko===null&&(ko=t)),U&&Yi(t,r.treeForkCount),e}return hl(t),null;case 22:case 23:return No(t),Do(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(hl(t),t.subtreeFlags&6&&(t.flags|=8192)):hl(t),n=t.updateQueue,n!==null&&pl(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&&N(Ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ga(Oa),hl(t),null;case 25:return null;case 30:return t.flags|=33554432,hl(t),null}throw Error(i(156,t.tag))}function _l(e,t){switch(Qi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ga(Oa),Ae(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Me(t),null;case 31:if(t.memoizedState!==null){if(No(t),t.alternate===null)throw Error(i(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(No(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Io(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Ae(),null;case 10:return ga(t.type),null;case 22:case 23:return No(t),Do(),e!==null&&N(Ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ga(Oa),null;case 25:return null;default:return null}}function vl(e,t){switch(Qi(t),t.tag){case 3:ga(Oa),Ae();break;case 26:case 27:case 5:Me(t);break;case 4:Ae();break;case 31:t.memoizedState!==null&&No(t);break;case 13:No(t);break;case 19:Io(t);break;case 10:ga(t.type);break;case 22:case 23:No(t),Do(),e!==null&&N(Ha);break;case 24:ga(Oa)}}function yl(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){pf(t,t.return,e)}}function bl(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){pf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){pf(t,t.return,e)}}function xl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{So(t,n)}catch(t){pf(e,e.return,t)}}}function Sl(e,t,n){n.props=bc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){pf(e,t,n)}}function Cl(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:var i=e.stateNode,a=gi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);h(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){pf(e,t,n)}}function wl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){pf(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){pf(e,t,n)}else n.current=null}}function Tl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)em(e.stateNode,t[n])}function El(e){for(var t=e.return;t!==null&&(kl(t)&&em(e.stateNode,t.stateNode),!Ol(t));)t=t.return}function Dl(e){for(var t=e.return;t!==null&&(kl(t)&&tm(e.stateNode,t.stateNode),!Ol(t));)t=t.return}function Ol(e){return e.tag===5||e.tag===3||e.tag===27}function kl(e){return e&&e.tag===7&&e.stateNode!==null}function Al(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){pf(e,e.return,t)}}function jl(e,t,n){try{var r=e.stateNode;ip(r,e.type,n,t),r[Ot]=t}catch(t){pf(e,e.return,t)}}function Ml(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sp(e.type)||e.tag===4}function Nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ml(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&&Sp(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 Pl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bn)),Tl(e,r),F=!0;else if(i!==4&&(i===27&&(Tl(e,r),r=null,Sp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Pl(e,t,n,r),e=e.sibling;e!==null;)Pl(e,t,n,r),e=e.sibling}function Fl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Tl(e,r),F=!0;else if(i!==4&&(i===27&&(Tl(e,r),r=null,Sp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Fl(e,t,n,r),e=e.sibling;e!==null;)Fl(e,t,n,r),e=e.sibling}function Il(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);np(t,r,n),t[Dt]=e,t[Ot]=n}catch(t){pf(e,e.return,t)}}var Ll=!1,Rl=null;function zl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Ll=!0)}var Bl=null;function Vl(){var e=Bl;return Bl=null,e}var Hl=0;function Ul(e,t,n,r,i){return Hl=0,Wl(e.child,t,n,r,i)}function Wl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Op(o);r.push(s),s.view&&(a=!0)}else a||Op(o).view&&(a=!0);Ll=!0,Tp(o,Hl===0?t:t+`_`+Hl,n),Hl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Wl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Gl(e,t){for(;e!==null;)e.tag===5?Ep(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Gl(e.child,t),e=e.sibling}function Kl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Kl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=vi(t.default,t.share),t!==`none`&&(Ul(e,n,t,null,!1)||Gl(e.child,!1))}e=e.sibling}}function ql(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=gi(r,n),a=vi(r.default,n.paired?r.share:r.enter);a===`none`?Kl(e):Ul(e,i,a,null,!1)?(Kl(e),n.paired||t||Md(e,r.onEnter)):Gl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ql(e,t),e=e.sibling;else Kl(e)}function Jl(e){if(Rl!==null&&Rl.size!==0){var t=Rl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=vi(n.default,n.share);if(a!==`none`&&(Ul(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Md(e,n.onShare)):Gl(e.child,!1)),t.delete(r),t.size===0)break}}}Jl(e)}e=e.sibling}}}function Yl(e){if(e.tag===30){var t=e.memoizedProps,n=gi(t,e.stateNode),r=Rl===null?void 0:Rl.get(n),i=vi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Ul(e,n,i,null,!1)?r===void 0?Md(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Rl.delete(n),Md(e,t.onShare)):Gl(e.child,!1)),Rl!==null&&Jl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Yl(e),e=e.sibling;else Rl!==null&&Jl(e)}function Xl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=gi(t,e.stateNode);t=vi(t.default,t.update),e.flags&=-5,t!==`none`&&Ul(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Xl(e);e=e.sibling}}function Zl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Gl(e.child,!1))}Zl(e)}e=e.sibling}}function Ql(e){if(e.tag===30)e.stateNode.paired=null,Gl(e.child,!1),Zl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ql(e),e=e.sibling;else Zl(e)}function $l(e){for(e=e.child;e!==null;)e.tag===30?Gl(e.child,!1):e.subtreeFlags&33554432&&$l(e),e=e.sibling}function eu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Hl<a.length){var l=a[Hl],u=Op(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Tp(c,Hl===0?n:n+`_`+Hl,i),s&&e.flags&4||(Bl===null&&(Bl=[]),Bl.push(c,Hl===0?r:r+`_`+Hl,t.memoizedProps)),Hl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:eu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function tu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=gi(n,r),a=vi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(kp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Hl=0,i=eu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Md(e,n.onUpdate))}else e.subtreeFlags&33554432&&tu(e,t);e=e.sibling}}var nu=!1,q=!1,ru=!1,iu=!1,au=typeof WeakSet==`function`?WeakSet:Set,ou=null,su=!1,cu=!1,lu=!1,uu=!1;function du(e,t,n){if(e=e.containerInfo,sp=gh,e=Kr(e),qr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(cp={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,ou=t,t=n?9270:1024;ou!==null;){if(e=ou,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Yl(r[a]);if(e.alternate===null&&e.flags&2)n&&zl(e),fu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Yl(r),fu(n);continue}if(r!==null&&r.memoizedState!==null){n&&zl(e),fu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,ou=r):(n&&Xl(e),fu(n))}}Rl=null}function fu(e){for(;ou!==null;){var t=ou,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=bc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){pf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)nm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:nm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=gi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=vi(a.default,a.update),a!==`none`&&Ul(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,ou=r;break}ou=t.return}}function pu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Nu(e,n),r&4&&yl(5,n);break;case 1:if(Nu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){pf(n,n.return,e)}else{var i=bc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){pf(n,n.return,e)}}}r&64&&xl(n),r&512&&Cl(n,n.return);break;case 3:if(Nu(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{So(e,t)}catch(e){pf(n,n.return,e)}}break;case 27:t===null&&r&4&&Il(n);case 26:case 5:Nu(e,n),t===null&&r&4&&Al(n),r&512&&Cl(n,n.return);break;case 12:Nu(e,n);break;case 31:Nu(e,n),r&4&&Su(e,n);break;case 13:Nu(e,n),r&4&&Cu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=_f.bind(null,n),cm(e,n))));break;case 22:if(r=n.memoizedState!==null||nu,!r){var a=t!==null&&t.memoizedState!==null||q;t=nu,i=q,nu=r,(q=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Fu(e,n,r)):Nu(e,n),nu=t,q=i}break;case 30:Nu(e,n),r&512&&Cl(n,n.return);break;case 7:r&512&&Cl(n,n.return);default:Nu(e,n)}}function mu(e,t){for(e=e.child;e!==null;)hu(e,t),e=e.sibling}function hu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){pf(e,e.return,t)}gu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,F=!0}catch(t){pf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?wp(s,!0):wp(e.stateNode,!1)}catch(t){pf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&mu(e,t);break;default:mu(e,t)}}function gu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:hu(n,r);break a;case 22:n.memoizedState===null&&gu(n,r);break a;default:gu(n,r)}}e=e.sibling}}function _u(e){var t=e.alternate;t!==null&&(e.alternate=null,_u(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&It(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 vu=null,yu=!1;function bu(e,t,n){for(n=n.child;n!==null;)xu(e,t,n),n=n.sibling}function xu(e,t,n){if(tt&&typeof tt.onCommitFiberUnmount==`function`)try{tt.onCommitFiberUnmount(et,n)}catch{}switch(n.tag){case 26:q||wl(n,t),bu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!q&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:q||wl(n,t),Dl(n);var r=vu,i=yu;Sp(n.type)&&(vu=n.stateNode,yu=!1),bu(e,t,n),gm(n.stateNode,n.type,n.memoizedProps),vu=r,yu=i;break;case 5:q||wl(n,t),Dl(n);case 6:if(n.tag===6&&Dl(n),r=vu,i=yu,vu=null,bu(e,t,n),vu=r,yu=i,vu!==null){if(yu)try{(vu.nodeType===9?vu.body:vu.nodeName===`HTML`?vu.ownerDocument.body:vu).removeChild(n.stateNode),F=!0}catch(e){pf(n,t,e)}else try{vu.removeChild(n.stateNode),F=!0}catch(e){pf(n,t,e)}}break;case 18:vu!==null&&(yu?(e=vu,Cp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):Cp(vu,n.stateNode));break;case 4:r=vu,i=yu,vu=n.stateNode.containerInfo,yu=!0,bu(e,t,n),vu=r,yu=i;break;case 0:case 11:case 14:case 15:bl(2,n,t),q||bl(4,n,t),bu(e,t,n);break;case 1:q||(wl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Sl(n,t,r)),bu(e,t,n);break;case 21:bu(e,t,n);break;case 22:q=(r=q)||n.memoizedState!==null,bu(e,t,n),q=r;break;case 30:wl(n,t),bu(e,t,n);break;case 7:q||wl(n,t),bu(e,t,n);break;default:bu(e,t,n)}}function Su(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){pf(t,t.return,e)}}}function Cu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){pf(t,t.return,e)}}function wu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new au),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new au),t;default:throw Error(i(435,e.tag))}}function Tu(e,t){var n=wu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=vf.bind(null,e,t);t.then(r,r)}})}function Eu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Sp(l.type)){vu=l.stateNode,yu=!1;break a}break;case 5:vu=l.stateNode,yu=!1;break a;case 3:case 4:vu=l.stateNode.containerInfo,yu=!0;break a}l=l.return}if(vu===null)throw Error(i(160));xu(s,c,o),vu=null,yu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ou(t,e,n),t=t.sibling}var Du=null;function Ou(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Eu(t,e,n),ku(e),a&4&&(bl(3,e,e.return),yl(3,e),bl(5,e,e.return));break;case 1:Eu(t,e,n),ku(e),a&512&&(q||r===null||wl(r,r.return)),a&64&&nu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Du,Eu(t,e,n),ku(e),a&512&&(q||r===null||wl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(nu)e.stateNode=fp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Pt]||r[Dt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),np(r,t,n),r[Dt]=e,Bt(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),np(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Gm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),np(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Dt]=e,Bt(r),t=r}e.stateNode=t}}else nu||Km(o,e.type,e.stateNode)}else e.stateNode=Bm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&jl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||q||t.parentNode.removeChild(t)):a.count--,n===null?nu||Km(o,e.type,e.stateNode):Bm(o,n,e.memoizedProps))}break;case 27:Eu(t,e,n),ku(e),a&512&&(q||r===null||wl(r,r.return)),r!==null&&a&4&&jl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=ru,ru=!1,Eu(t,e,n),ru=o,ku(e),a&512&&(q||r===null||wl(r,r.return)),e.flags&32){t=e.stateNode;try{fn(t,``),F=!0}catch(t){pf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,jl(e,t,r===null?t:r.memoizedProps)),a&1024&&(iu=!0);break;case 6:if(Eu(t,e,n),ku(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,F=!0}catch(t){pf(e,e.return,t)}}break;case 3:if(F=!1,Wm=null,o=Du,Du=bm(t.containerInfo),Eu(t,e,n),Du=o,ku(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){pf(e,e.return,t)}iu&&(iu=!1,Au(e)),F=!1;break;case 4:a=ru,ru=nu,r=I(),o=Du,Du=bm(e.stateNode.containerInfo),Eu(t,e,n),ku(e),Du=o,F&&cu&&(lu=!0),F=r,ru=a;break;case 12:Eu(t,e,n),ku(e);break;case 31:Eu(t,e,n),ku(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Tu(e,t)));break;case 13:Eu(t,e,n),ku(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(pd=Ge()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Tu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=nu,l=q,u=ru;nu=c||o,ru=u||o,q=l||s,Eu(t,e,n),q=l,ru=u,nu=c,ku(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||nu||q||(t=s||q,n=nu,r=q,nu=o||nu,q=t,Pu(e,2),nu=n,q=r),!o&&ru||mu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Tu(e,n))));break;case 19:Eu(t,e,n),ku(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Tu(e,t)));break;case 30:a&512&&(q||r===null||wl(r,r.return)),a=I(),o=cu,s=(n&335544064)===n,c=e.memoizedProps,cu=s&&vi(c.default,c.update)!==`none`,Eu(t,e,n),ku(e),s&&r!==null&&F&&(e.flags|=4),cu=o,F=a;break;case 21:break;case 7:a&512&&(q||r===null||wl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Eu(t,e,n),ku(e)}}function ku(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Ml(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(kl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Ol(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Fl(e,Nl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(fn(l,``),n.flags&=-33),Fl(e,Nl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Pl(e,Nl(e),u,s);break;default:throw Error(i(161))}}catch(t){pf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Au(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Au(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function ju(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Mu(t,e),t=t.sibling;else tu(t,!1)}function Mu(e,t){var n=e.alternate;if(n===null)ql(e,!1);else switch(e.tag){case 3:if(uu=su=!1,Vl(),ju(t,e),!su&&!lu){if(e=Bl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ep(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),uu=!0}Bl=null;break;case 5:ju(t,e);break;case 4:r=su,su=!1,ju(t,e),su&&(lu=!0),su=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?ju(t,e):ql(e,!1));break;case 30:r=su,i=Vl(),su=!1,ju(t,e),su&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=gi(a,o),o=gi(n.memoizedProps,o);var s=vi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Hl=0,t=eu(e,n,t,o,s,a,!0),Hl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Md(e,e.memoizedProps.onUpdate),Bl=i):i!==null&&(i.push.apply(i,Bl),Bl=i),su=e.flags&32?!0:r;break;default:ju(t,e)}}function Nu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)pu(e,t.alternate,t),t=t.sibling}function Pu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:bl(4,n,n.return),Pu(n,r);break;case 1:wl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Sl(n,n.return,i),Pu(n,r);break;case 27:r&2&&gm(n.stateNode,n.type,n.memoizedProps);case 5:wl(n,n.return),n.tag!==5&&n.tag!==27||Dl(n),Pu(n,r);break;case 6:Dl(n);break;case 26:wl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||q||i.parentNode.removeChild(i),Pu(n,r);break;case 22:n.memoizedState===null&&Pu(n,r);break;case 30:wl(n,n.return),Pu(n,r);break;case 7:wl(n,n.return);default:Pu(n,r)}e=e.sibling}}function Fu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Fu(i,a,n),yl(4,a);break;case 1:if(Fu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){pf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)xo(l[i],c)}catch(e){pf(r,r.return,e)}}s&&o&64&&xl(a),Cl(a,a.return);break;case 27:n&2&&Il(a);case 5:a.tag!==5&&a.tag!==27||El(a),Fu(i,a,n),s&&r===null&&o&4&&Al(a),Cl(a,a.return);break;case 6:El(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||nu||Km(bm(c.ownerDocument),a.type,c),Fu(i,a,n),s&&r===null&&o&4&&Al(a),Cl(a,a.return);break;case 12:Fu(i,a,n);break;case 31:Fu(i,a,n),s&&o&4&&Su(i,a);break;case 13:Fu(i,a,n),s&&o&4&&Cu(i,a);break;case 22:a.memoizedState===null&&Fu(i,a,n),Cl(a,a.return);break;case 30:Fu(i,a,n),Cl(a,a.return);break;case 7:Cl(a,a.return);default:Fu(i,a,n)}t=t.sibling}}function Iu(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&&Aa(n))}function Lu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Aa(e))}function Ru(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)zu(e,t,n,r),t=t.sibling;else i&&$l(t)}function zu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Ql(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Ru(e,t,n,r),a&2048&&yl(9,t);break;case 1:Ru(e,t,n,r);break;case 3:Ru(e,t,n,r),i&&uu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Aa(a)));break;case 12:if(a&2048){Ru(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){pf(t,t.return,e)}}else Ru(e,t,n,r);break;case 31:Ru(e,t,n,r);break;case 13:Ru(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Ql(t),o._visibility&2?Ru(e,t,n,r):(o._visibility|=2,Bu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Ql(s),o._visibility&2?Ru(e,t,n,r):Vu(e,t)),a&2048&&Iu(s,t);break;case 24:Ru(e,t,n,r),a&2048&&Lu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Gl(a.child,!0),Gl(t.child,!0))),Ru(e,t,n,r);break;default:Ru(e,t,n,r)}}function Bu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!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:Bu(a,o,s,c,i),yl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Bu(a,o,s,c,i)):u._visibility&2?Bu(a,o,s,c,i):Vu(a,o),i&&l&2048&&Iu(o.alternate,o);break;case 24:Bu(a,o,s,c,i),i&&l&2048&&Lu(o.alternate,o);break;default:Bu(a,o,s,c,i)}t=t.sibling}}function Vu(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:Vu(n,r),i&2048&&Iu(r.alternate,r);break;case 24:Vu(n,r),i&2048&&Lu(r.alternate,r);break;default:Vu(n,r)}t=t.sibling}}var Hu=8192;function Uu(e,t,n){if(e.subtreeFlags&Hu)for(e=e.child;e!==null;)Wu(e,t,n),e=e.sibling}function Wu(e,t,n){switch(e.tag){case 26:Uu(e,t,n),e.flags&Hu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Zm(n,e)):Qm(n,Du,e.memoizedState,e.memoizedProps));break;case 5:Uu(e,t,n),e.flags&Hu&&(e=e.stateNode,(t&335544128)===t&&Zm(n,e));break;case 3:case 4:var r=Du;Du=bm(e.stateNode.containerInfo),Uu(e,t,n),Du=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Hu,Hu=16777216,Uu(e,t,n),Hu=r):Uu(e,t,n));break;case 30:if((e.flags&Hu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Rl===null&&(Rl=new Map),Rl.set(r,i)}Uu(e,t,n);break;default:Uu(e,t,n)}}function Gu(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 Ku(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ou=r,Yu(r,e)}Gu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)qu(e),e=e.sibling}function qu(e){switch(e.tag){case 0:case 11:case 15:Ku(e),e.flags&2048&&bl(9,e,e.return);break;case 3:Ku(e);break;case 12:Ku(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ju(e)):Ku(e);break;default:Ku(e)}}function Ju(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ou=r,Yu(r,e)}Gu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:bl(8,t,t.return),Ju(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ju(t));break;default:Ju(t)}e=e.sibling}}function Yu(e,t){for(;ou!==null;){var n=ou;switch(n.tag){case 0:case 11:case 15:bl(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:Aa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ou=r;else a:for(n=e;ou!==null;){r=ou;var i=r.sibling,a=r.return;if(_u(r),r===n){ou=null;break a}if(i!==null){i.return=a,ou=i;break a}ou=a}}}var Xu={getCacheForType:function(e){var t=Sa(Oa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Sa(Oa).controller.signal}},Zu=typeof WeakMap==`function`?WeakMap:Map,J=0,Qu=null,Y=null,X=0,Z=0,$u=null,ed=!1,td=!1,nd=!1,rd=0,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=null,dd=null,fd=!1,pd=0,md=0,hd=1/0,gd=null,_d=null,vd=0,yd=null,bd=null,xd=0,Sd=0,Cd=null,wd=null,Td=null,Ed=null,Dd=null,Od=0,kd=null;function Ad(){return J&2&&X!==0?X&-X:A.T===null?wt():Pf()}function jd(){if(cd===0){if(!(X&536870912)||U){var e=ct;ct<<=1,!(ct&3932160)&&(ct=262144),cd=e}else cd=536870912}return e=Oo.current,e!==null&&(e.flags|=32),cd}function Md(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Pp(gi(e.memoizedProps,n))),Ed===null&&(Ed=[]),Ed.push(t.bind(null,r))}}function Nd(e,t,n){(e===Qu&&(Z===2||Z===9)||e.cancelPendingCommit!==null)&&(Bd(e,0),Ld(e,X,cd,!1)),_t(e,n),J&2&&e===Qu||(e===Qu&&(!(J&2)&&(od|=n),id===4&&Ld(e,X,cd,!1)),Ef(e))}function Pd(e,t,n){if(J&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ft(e,t),a=r?Jd(e,t):Kd(e,t,!0),o=r;do{if(a===0){td&&!r&&Ld(e,t,0,!1);break}if(n=e.current.alternate,o&&!Id(n))a=Kd(e,t,!1),o=!1;else{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=ud;var l=c.current.memoizedState.isDehydrated;if(l&&(Bd(c,s).flags|=256),s=Kd(c,s,!1),s!==2&&s!==6){if(nd&&!l){c.errorRecoveryDisabledLanes|=o,od|=o,a=4;break a}o=dd,dd=a,o!==null&&(dd===null?dd=o:dd.push.apply(dd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Bd(e,0),Ld(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&&(t&62914560)!==t)break;case 6:Ld(r,t,cd,!ed);break a;case 2:dd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=pd+300-Ge(),10<a)){if(Ld(r,t,cd,!ed),dt(r,0,!0)!==0)break a;xd=t,r.timeoutHandle=gp(Fd.bind(null,r,n,dd,gd,fd,t,cd,od,ld,ed,o,`Throttled`,-0,0),a);break a}Fd(r,n,dd,gd,fd,t,cd,od,ld,ed,o,null,-0,0)}break}}while(1);Ef(e)}function Fd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:bn},Rl=null,Wu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=nh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?pd-Ge():(a&4194048)===a?md-Ge():0,m=eh(d,m),m!==null)?(xd=a,e.cancelPendingCommit=m(tf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Ld(e,a,o,!l)):tf(e,t,a,n,r,i,o,s,c,l,u,d)}function Id(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(!Br(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 Ld(e,t,n,r){t=pt(e,t),t&=~sd,t&=~od,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-rt(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&yt(e,n,t)}function Rd(){return J&6?!0:(Df(0,!1),!1)}function zd(){if(Y!==null){if(Z===0)var e=Y.return;else e=Y,ma=pa=null,ns(e),no=null,ro=0,e=Y;for(;e!==null;)vl(e.alternate,e),e=e.return;Y=null}}function Bd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,_p(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),xd=0,zd(),Qu=e,Y=n=Mi(e.current,null),X=t,Z=0,$u=null,ed=!1,td=ft(e,t),nd=!1,ld=cd=sd=od=ad=id=0,dd=ud=null,fd=!1,rd=pt(e,t),Si(),n}function Vd(e,t){G=null,A.H=fc,t===Ka||t===Ja?(t=eo(),Z=3):t===qa?(t=eo(),Z=4):Z=t===Ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,$u=t,Y===null&&(id=1,wc(e,zi(t,e.current)))}function Hd(){var e=Oo.current;return e===null?!0:(X&4194048)===X?ko===null:(X&62914560)===X||X&536870912?e===ko:!1}function Ud(){var e=A.H;return A.H=fc,e===null?fc:e}function Wd(){var e=A.A;return A.A=Xu,e}function Gd(){id=4,ed||(X&4194048)!==X&&Oo.current!==null||(td=!0),!(ad&134217727)&&!(od&134217727)||Qu===null||Ld(Qu,X,cd,!1)}function Kd(e,t,n){var r=J;J|=2;var i=Ud(),a=Wd();(Qu!==e||X!==t)&&(gd=null,Bd(e,t)),t=!1;var o=id;a:do try{if(Z!==0&&Y!==null){var s=Y,c=$u;switch(Z){case 8:zd(),o=6;break a;case 3:case 2:case 9:case 6:Oo.current===null&&(t=!0);var l=Z;if(Z=0,$u=null,Qd(e,s,c,l),n&&td){o=0;break a}break;default:l=Z,Z=0,$u=null,Qd(e,s,c,l)}}qd(),o=id;break}catch(t){Vd(e,t)}while(1);return t&&e.shellSuspendCounter++,ma=pa=null,J=r,A.H=i,A.A=a,Y===null&&(Qu=null,X=0,Si()),o}function qd(){for(;Y!==null;)Xd(Y)}function Jd(e,t){var n=J;J|=2;var r=Ud(),a=Wd();Qu!==e||X!==t?(gd=null,hd=Ge()+500,Bd(e,t)):td=ft(e,t);a:do try{if(Z!==0&&Y!==null){t=Y;var o=$u;b:switch(Z){case 1:Z=0,$u=null,Qd(e,t,o,1);break;case 2:case 9:if(Xa(o)){Z=0,$u=null,Zd(t);break}t=function(){Z!==2&&Z!==9||Qu!==e||(Z=7),Ef(e)},o.then(t,t);break a;case 3:Z=7;break a;case 4:Z=5;break a;case 7:Xa(o)?(Z=0,$u=null,Zd(t)):(Z=0,$u=null,Qd(e,t,o,7));break;case 5:var s=null;switch(Y.tag){case 26:s=Y.memoizedState;case 5:case 27:var c=Y;if(s?Ym(s):c.stateNode.complete){Z=0,$u=null;var l=c.sibling;if(l!==null)Y=l;else{var u=c.return;u===null?Y=null:(Y=u,$d(u))}break b}}Z=0,$u=null,Qd(e,t,o,5);break;case 6:Z=0,$u=null,Qd(e,t,o,6);break;case 8:zd(),id=6;break a;default:throw Error(i(462))}}Yd();break}catch(t){Vd(e,t)}while(1);return ma=pa=null,A.H=r,A.A=a,J=n,Y===null?(Qu=null,X=0,Si(),id):0}function Yd(){for(;Y!==null&&!Ue();)Xd(Y)}function Xd(e){var t=ll(e.alternate,e,rd);e.memoizedProps=e.pendingProps,t===null?$d(e):Y=t}function Zd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Wc(n,t,t.pendingProps,t.type,void 0,X);break;case 11:t=Wc(n,t,t.pendingProps,t.type.render,t.ref,X);break;case 5:ns(t);var r=t;r===ea&&(U?(sa(r),r.tag===5&&r.stateNode!=null&&(ta=r.stateNode)):(sa(r),U=!0));default:vl(n,t),t=Y=Ni(t,rd),t=ll(n,t,rd)}e.memoizedProps=e.pendingProps,t===null?$d(e):Y=t}function Qd(e,t,n,r){ma=pa=null,ns(t),no=null,ro=0;var i=t.return;try{if(kc(e,i,t,n,X)){id=1,wc(e,zi(n,e.current)),Y=null;return}}catch(t){if(i!==null)throw Y=i,t;id=1,wc(e,zi(n,e.current)),Y=null;return}t.flags&32768?(U||r===1?e=!0:td||X&536870912?e=!1:(ed=e=!0,(r===2||r===9||r===3||r===6)&&(r=Oo.current,r!==null&&r.tag===13&&(r.flags|=16384))),ef(t,e)):$d(t)}function $d(e){var t=e;do{if(t.flags&32768){ef(t,ed);return}e=t.return;var n=gl(t.alternate,t,rd);if(n!==null){Y=n;return}if(t=t.sibling,t!==null){Y=t;return}Y=t=e}while(t!==null);id===0&&(id=5)}function ef(e,t){do{var n=_l(e.alternate,e);if(n!==null){n.flags&=32767,Y=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Y=e;return}Y=e=n}while(e!==null);id=6,Y=null}function tf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do uf();while(vd!==0);if(J&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Qu&&(Y=Qu=null,X=0),bd=t,yd=e,xd=n,Cd=a,wd=r,nf(e,t,n,s,c,l,f)}}function nf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Sd=s,s|=xi,vt(e,n,s,r,i,a),Ed=null,(n&335544064)===n?(Dd=Na(e),r=10262):(Dd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,yf(Ye,function(){return df(),null})):(e.callbackNode=null,e.callbackPriority=0),Ll=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=A.T,A.T=null,i=j.p,j.p=2,a=J,J|=4;try{du(e,t,n)}finally{J=a,j.p=i,A.T=r}}vd=1,Ll?Td=Mp(o,e.containerInfo,Dd,of,sf,af,cf,df,rf,null,null):(of(),sf(),cf())}function rf(e){if(vd!==0){var t=yd.onRecoverableError;t(e,{componentStack:null})}}function af(){vd===3&&(vd=0,Mu(bd,yd),vd=4)}function of(){if(vd===1){vd=0;var e=yd,t=bd,n=xd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=A.T,A.T=null;var i=j.p;j.p=2;var a=J;J|=4;try{cu=lu=!1,Ou(t,e,n),n=cp;var o=Kr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Gr(s.ownerDocument.documentElement,s)){if(c!==null&&qr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Wr(s,h),v=Wr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gh=!!sp,cp=sp=null}finally{J=a,j.p=i,A.T=r}}e.current=t,vd=2}}function sf(){if(vd===2){vd=0;var e=yd,t=bd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=A.T,A.T=null;var r=j.p;j.p=2;var i=J;J|=4;try{pu(e,t.alternate,t)}finally{J=i,j.p=r,A.T=n}}vd=3}}function cf(){if(vd===4||vd===3){vd=0;var e=Td;Td=null,We();var t=yd,n=bd,r=xd,i=wd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?vd=5:(vd=0,bd=yd=null,lf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(_d=null),Ct(r),n=n.stateNode,tt&&typeof tt.onCommitFiberRoot==`function`)try{tt.onCommitFiberRoot(et,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=A.T,a=j.p,j.p=2,A.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{A.T=n,j.p=a}}if(i=Ed,o=Dd,Dd=null,i!==null&&(Ed=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);xd&3&&uf(),Ef(t),a=t.pendingLanes,r&261930&&a&42?t===kd?Od++:(Od=0,kd=t):(Od=0,kd=null),Df(0,!1)}}function lf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Aa(t)))}function uf(){return Td!==null&&(Td.skipTransition(),Td=null),of(),sf(),cf(),df()}function df(){if(vd!==5)return!1;var e=yd,t=Sd;Sd=0;var n=Ct(xd),r=A.T,a=j.p;try{j.p=32>n?32:n,A.T=null,n=Cd,Cd=null;var o=yd,s=xd;if(vd=0,bd=yd=null,xd=0,J&6)throw Error(i(331));var c=J;if(J|=4,qu(o.current),zu(o,o.current,s,n),J=c,Df(0,!1),tt&&typeof tt.onPostCommitFiberRoot==`function`)try{tt.onPostCommitFiberRoot(et,o)}catch{}return!0}finally{j.p=a,A.T=r,lf(e,t)}}function ff(e,t,n){t=zi(n,t),t=Ec(e.stateNode,t,2),e=ho(e,t,2),e!==null&&(_t(e,2),Ef(e))}function pf(e,t,n){if(e.tag===3)ff(e,e,n);else for(;t!==null;){if(t.tag===3){ff(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(_d===null||!_d.has(r))){e=zi(n,e),n=Dc(2),r=ho(t,n,2),r!==null&&(Oc(n,r,t,e),_t(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Zu;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)||(nd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Qu===e&&(X&n)===n&&(id===4||id===3&&(X&62914560)===X&&300>Ge()-pd?J&2?sd|=n:Bd(e,0):sd|=n,ld===X&&(ld=0)),Ef(e)}function gf(e,t){t===0&&(t=ht()),e=Ti(e,t),e!==null&&(_t(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(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),gf(e,n)}function yf(e,t){return Ve(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;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-rt(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=X,a=dt(r,r===Qu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ft(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&hp()&&(e=Tf);for(var t=Ge(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}vd!==0&&vd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-rt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=mt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Qu,n=X,n=dt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Z===2||Z===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&He(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ft(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&He(r),Ct(n)){case 2:case 8:n=Je;break;case 32:n=Ye;break;case 268435456:n=Ze;break;default:n=Ye}return r=jf.bind(null,e),n=Ve(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&He(r),e.callbackPriority=2,e.callbackNode=null,2}function jf(e,t){if(vd!==0&&vd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(uf()&&e.callbackNode!==n)return null;var r=X;return r=dt(e,e===Qu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Pd(e,r,t),Af(e,Ge()),e.callbackNode!=null&&e.callbackNode===n?jf.bind(null,e):null)}function Mf(e,t){if(uf())return null;Pd(e,t,!0)}function Nf(){bp(function(){J&6?Ve(qe,Of):kf()})}function Pf(){if(Tf===0){var e=Ia;e===0&&(e=st,st<<=1,!(st&261888)&&(st=256)),Tf=e}return Tf}function Ff(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:yn(e)}function If(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Ff((i[Ot]||null).action),o=r.submitter;o&&(t=(t=o[Ot]||null)?Ff(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new zn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Tf!==0){var e=new FormData(i,o);Qs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Qs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Lf=0;Lf<pi.length;Lf++){var Rf=pi[Lf];mi(Rf.toLowerCase(),`on`+(Rf[0].toUpperCase()+Rf.slice(1)))}mi(ai,`onAnimationEnd`),mi(oi,`onAnimationIteration`),mi(si,`onAnimationStart`),mi(`dblclick`,`onDoubleClick`),mi(`focusin`,`onFocus`),mi(`focusout`,`onBlur`),mi(ci,`onTransitionRun`),mi(li,`onTransitionStart`),mi(ui,`onTransitionCancel`),mi(di,`onTransitionEnd`),Gt(`onMouseEnter`,[`mouseout`,`mouseover`]),Gt(`onMouseLeave`,[`mouseout`,`mouseover`]),Gt(`onPointerEnter`,[`pointerout`,`pointerover`]),Gt(`onPointerLeave`,[`pointerout`,`pointerover`]),Wt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Wt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Wt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Wt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Wt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Wt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var zf=`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(` `),Bf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(zf));function Vf(e,t){t=!!(t&4);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){yi(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){yi(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[At];n===void 0&&(n=t[At]=new Set);var r=e+`__bubble`;n.has(r)||(Gf(t,e,2,!1),n.add(r))}function Hf(e,t,n){var r=0;t&&(r|=4),Gf(n,e,r,t)}var Uf=`_reactListening`+Math.random().toString(36).slice(2);function Wf(e){if(!e[Uf]){e[Uf]=!0,Ht.forEach(function(t){t!==`selectionchange`&&(Bf.has(t)||Hf(t,!1,e),Hf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Uf]||(t[Uf]=!0,Hf(`selectionchange`,!1,t))}}function Gf(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!On||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 Kf(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=Lt(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}Tn(function(){var r=a,i=R(n),s=[];a:{var c=fi.get(e);if(c!==void 0){var l=zn,u=e;switch(e){case`keypress`:if(Pn(n)===0)break a;case`keydown`:case`keyup`:l=rr;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=qn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=or;break;case ai:case oi:case si:l=Yn;break;case di:l=sr;break;case`scroll`:case`scrollend`:l=Vn;break;case`wheel`:l=cr;break;case`copy`:case`cut`:case`paste`:l=Xn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=ir;break;case`submit`:l=ar;break;case`toggle`:case`beforetoggle`:l=lr}var d=!!(t&4),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=En(m,p),g!=null&&d.push(qf(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(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==xn&&(u=n.relatedTarget||n.fromElement)&&(Lt(u)||u[kt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Lt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Kn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=ir,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:zt(c),h=l==null?u:zt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Lt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?te(c,l,Yf):null,c!==null&&Xf(s,u,c,d,!1),l!==null&&f!==null&&Xf(s,f,l,d,!0)))}a:{if(c=r?zt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=kr;else if(Cr(c)){if(Ar)_=Rr;else{_=B;var v=Ir}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&gn(r.elementType)&&(_=kr):_=Lr;if(_&&=_(e,r)){wr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?zt(r):window,e){case`focusin`:(Cr(v)||v.contentEditable===`true`)&&(Yr=v,Xr=r,Zr=null);break;case`focusout`:Zr=Xr=Yr=null;break;case`mousedown`:Qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Qr=!1,$r(s,n,i);break;case`selectionchange`:if(Jr)break;case`keydown`:case`keyup`:$r(s,n,i)}var y;if(dr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else yr?_r(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(mr&&n.locale!==`ko`&&(yr||b!==`onCompositionStart`?b===`onCompositionEnd`&&yr&&(y=Nn()):(An=i,jn=`value`in An?An.value:An.textContent,yr=!0)),v=Jf(r,b),0<v.length&&(b=new Zn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=vr(n),y!==null&&(b.data=y)))),(y=pr?br(e,n):xr(e,n))&&(b=Jf(r,`onBeforeInput`),0<b.length&&(v=new Zn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),If(s,e,r,n,i)}Vf(s,t)})}function qf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Jf(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=En(e,n),i!=null&&r.unshift(qf(e,i,a)),i=En(e,t),i!=null&&r.push(qf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Yf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xf(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=En(n,a),l!=null&&o.unshift(qf(n,l,c))):i||(l=En(n,a),l!=null&&o.push(qf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Zf=/\r\n?/g,Qf=/\u0000|\uFFFD/g;function $f(e){return(typeof e==`string`?e:``+e).replace(Zf,`
|
|
9
|
-
`).replace(Qf,``)}function ep(e,t){return t=$f(t),$f(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||fn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&fn(e,``+r);else return;break;case`className`:Zt(e,`class`,r);break;case`tabIndex`:Zt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Zt(e,n,r);break;case`style`:hn(e,r,o);return;case`data`:if(t!==`object`){Zt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=yn(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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=yn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=bn);return;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;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));o?.__html!==n&&(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=yn(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`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),Xt(e,`popover`,r);break;case`xlinkActuate`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Qt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Xt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=_n.get(n)||n,Xt(e,n,r);else return}F=!0}function tp(e,t,n,r,a,o){switch(n){case`style`:hn(e,r,o);return;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));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)fn(e,r);else if(typeof r==`number`||typeof r==`bigint`)fn(e,``+r);else return;break;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=bn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Ut.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Ot]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}F=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Xt(e,n,r)}return}F=!0}function np(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:$(e,t,r,d,n,null)}}sn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&ln(e,!!r,n,!0):ln(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:$(e,t,s,c,n,null)}dn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<zf.length;r++)Q(zf[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,u,r,n,null)}return;default:if(gn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&tp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}var rp={};function ip(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(F=!0),o=m;break;case`name`:m!==f&&(F=!0),a=m;break;case`checked`:m!==f&&(F=!0),u=m;break;case`defaultChecked`:m!==f&&(F=!0),d=m;break;case`value`:m!==f&&(F=!0),s=m;break;case`defaultValue`:m!==f&&(F=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}on(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(F=!0),p=o;break;case`defaultValue`:o!==l&&(F=!0),c=o;break;case`multiple`:o!==l&&(F=!0),s=o;default:o!==l&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?ln(e,!!n,n?[]:``,!1):ln(e,!!n,t,!0)):ln(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(F=!0),p=a;break;case`defaultValue`:a!==o&&(F=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&$(e,t,s,a,r,o)}un(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(F=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(gn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&tp(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||tp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function ap(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function op(){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&&ap(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&&ap(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 sp=null,cp=null;function lp(e){return e.nodeType===9?e:e.ownerDocument}function up(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 dp(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 fp(e,t,n,r){return n=lp(n).createElement(e),n[Dt]=r,n[Ot]=t,np(n,e,t),Bt(n),n}function pp(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 mp=null;function hp(){var e=window.event;return e&&e.type===`popstate`?e!==mp&&(mp=e,!0):(mp=null,!1)}var gp=typeof setTimeout==`function`?setTimeout:void 0,_p=typeof clearTimeout==`function`?clearTimeout:void 0,vp=typeof Promise==`function`?Promise:void 0,yp=typeof requestAnimationFrame==`function`?requestAnimationFrame:gp,bp=typeof queueMicrotask==`function`?queueMicrotask:vp===void 0?gp:function(e){return vp.resolve(null).then(e).catch(xp)};function xp(e){setTimeout(function(){throw e})}function Sp(e){return e===`head`}function Cp(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),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_m(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_m(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Pt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_m(e.ownerDocument.body)}n=i}while(n);Hh(t)}function wp(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 Tp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ep(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Dp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Op(e){return Dp(e.getBoundingClientRect(),getComputedStyle(e),e)}function kp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Dp(t,n,e)}function Ap(e){return e.documentElement.clientHeight}function jp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Mp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Ap(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Xm(f),u>$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Np(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Np.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Np.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Np.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Pp(e){return{name:e,group:new Np(`group`,e),imagePair:new Np(`image-pair`,e),old:new Np(`old`,e),new:new Np(`new`,e)}}function Fp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Fp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Bp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Rp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),h(this._fragmentFiber.child,!1,Ip,e,s,r)}this._eventListeners=a}};function Ip(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Fp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Bp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Rp(i.optionsOrUseCapture),h(this._fragmentFiber.child,!1,Lp,e,n,i),r.splice(t,1),a!==null&&a()}};function Lp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Rp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function zp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Bp(e,t,n,r){if(e.length===0)return-1;r=zp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&zp(a.optionsOrUseCapture)===r)return i}return-1}Fp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Fp.prototype.focus=function(e){h(this._fragmentFiber.child,!0,Vp,e,void 0,void 0)};function Vp(e,t){return e.tag!==6&&(e=b(e),pm(e,t))}Fp.prototype.focusLast=function(e){var t=[];h(this._fragmentFiber.child,!0,Hp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Vp(t[n],e);n--);};function Hp(e,t){return t.push(e),!1}Fp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=lp(e).activeElement,e!==null&&h(this._fragmentFiber.child,!1,Up,e,void 0,void 0))};function Up(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Fp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),h(this._fragmentFiber.child,!1,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Fp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),h(this._fragmentFiber.child,!1,Gp,e,void 0,void 0);for(var n=t=0;n<Kp.length;n++){var r=Kp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Kp[t++]=r}Kp.length=t}};function Gp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Kp=[],qp=!1;function Jp(e,t,n){Kp.push({fragmentInstance:e,observer:t,instance:n}),qp||(qp=!0,mm(function(){qp=!1;var e=Kp;Kp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Fp.prototype.getClientRects=function(){var e=[];return h(this._fragmentFiber.child,!1,Yp,e,void 0,void 0),e};function Yp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Fp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Fp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];h(this._fragmentFiber.child,!1,Hp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Xp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Xp(e,t,n,r,i){var a=Lt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=te(n,a,w),t===null?t=!1:(h(t,!0,ee,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=te(r,a,w),t===null?t=!1:(h(t,!0,C,a,r),a=x,S=x=null,t=a!==null)),t):!1}function Zp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Fp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];h(this._fragmentFiber.child,!1,Hp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),Zp(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),Zp(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function Qp(e,t){return e=b(e),$p(e,t),!1}function $p(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function em(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Kp.length;i++){var a=Kp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Kp[r++]=a)}Kp.length=r,n.observe(e)}),$p(e,t))}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Jp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function nm(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`:nm(n),It(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rm(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[Pt])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=lm(e.nextSibling),e===null)break}return null}function im(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lm(e.nextSibling),e===null))return null;return e}function am(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lm(e.nextSibling),e===null))return null;return e}function om(e){return e.data===`$?`||e.data===`$~`}function sm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cm(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 lm(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 um=null;function dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function fm(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 pm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function mm(e){yp(function(){yp(function(t){return e(t)})})}function hm(e,t,n){switch(t=lp(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 gm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&$(e,t,r,null,rp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===bn&&(e.onclick=null),It(e)}function _m(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);It(e)}var vm=new Map,ym=new Set;function bm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var xm=j.d;j.d={f:Sm,r:Cm,D:Em,C:Dm,L:Om,m:km,X:jm,S:Am,M:Mm};function Sm(){var e=xm.f(),t=Rd();return e||t}function Cm(e){var t=Rt(e);t!==null&&t.tag===5&&t.type===`form`?ec(t):xm.r(e)}var wm=typeof document>`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=an(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Bt(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+an(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+an(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+an(n.imageSizes)+`"]`)):i+=`[href="`+an(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[Ft]=!0,o.onload=o.onerror=function(){Vt(o)}),Bt(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+an(r)+`"][href="`+an(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=T({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Bt(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=P(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Bt(c),np(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,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=P(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=T({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Bt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=P(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Bt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=De.current)?bm(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`?(n=Pm(n.href),t=P(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,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=Pm(n.href);var o=P(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(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,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`?(n=Rm(n),t=P(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+an(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Ft]){r.loading=1;return}}else t=e.createElement(`link`),t[Ft]=!0,t.onload=t.onerror=Vt.bind(null,t),np(t,`link`,n),Bt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+an(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+an(n.href)+`"]`);if(r)return t.instance=r,Bt(r),r;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Bt(r),np(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,Bt(o),o;r=Im(n),(a=vm.get(a))&&Hm(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}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,Bt(a),a):(r=n,(a=vm.get(o))&&(r=T({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Bt(a),np(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,Vm(r,n.precedence,e));return t.instance}function Vm(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 Hm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wm=null;function Gm(e,t,n){if(Wm===null){var r=new Map,i=Wm=new Map;i.set(n,r)}else i=Wm,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[Pt]||a[Dt]||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 Km(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qm(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 Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(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=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Bt(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(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=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*op());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.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=nh.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 sh={$$typeof:se,Provider:null,Consumer:null,_currentValue:xe,_currentValue2:xe,_threadCount:0};function ch(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=gt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.hiddenUpdates=gt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ai(3,null,null,t),e.current=a,a.stateNode=e,t=ka(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},fo(a),e}function uh(e){return e?(e=Oi,e):Oi}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=mo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=ho(e,r,t),n!==null&&(Nd(n,e,t),go(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=Ti(e,67108864);t!==null&&Nd(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=Ad();t=St(t);var n=Ti(e,t);n!==null&&Nd(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=2,yh(e,t,n,r)}finally{j.p=a,A.T=i}}function vh(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=8,yh(e,t,n,r)}finally{j.p=a,A.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Kf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=Rt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ut(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-rt(o);s.entanglements[1]|=c,o&=~c}Ef(a),!(J&6)&&(hd=Ge()+500,Df(0,!1))}}break;case 31:case 13:s=Ti(a,2),s!==null&&Nd(s,a,2),Rd(),ph(a,2)}if(a=bh(r),a===null&&Kf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Kf(e,t,r,null,n)}}function bh(e){return e=R(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=Lt(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 xh=e,null}function Ch(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`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ke()){case qe:return 2;case Je:return 8;case Ye:case Xe:return 32;case Ze:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`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 Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(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=Rt(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=Lt(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,Tt(e.priority,function(){hh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Tt(e.priority,function(){hh(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 Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);xn=r,n.target.dispatchEvent(r),xn=null}else return t=Rt(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=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(Sh(r||n)===null)continue;break}var a=Rt(n);a!==null&&(e.splice(t,3),t-=3,Qs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Ot]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Ot]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){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 Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dh(n,Ad(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),Rd(),t[kt]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=wt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.1`)throw Error(i(527,Kh,`19.3.1`));j.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:A,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{et=Jh.inject(qh),tt=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=xc,s=Sc,c=Cc;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=lh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[kt]=t.current,Wf(e),new Wh(t)}})),g=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()}));function _(){return typeof window<`u`}function v(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function y(e){return _()?e instanceof HTMLElement||e instanceof v(e).HTMLElement:!1}var b=c(u(),1),x={...b},S={};function ee(e,t){let n=b.useRef(S);return n.current===S&&(n.current=e(t)),n}var C=x.useInsertionEffect,w=C&&C!==x.useLayoutEffect?C:e=>e();function te(e){let t=ee(T).current;return t.next=e,w(t.effect),t.trampoline}function T(){let e={next:void 0,callback:ne,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function ne(){}var E=typeof document<`u`?b.useLayoutEffect:()=>{};function D(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var re={};function ie(e,t,n,r,i){if(!n&&!r&&!i&&!e)return oe(t);let a=oe(e);return t&&(a=se(a,t)),n&&(a=se(a,n)),r&&(a=se(a,r)),i&&(a=se(a,i)),a}function ae(e){if(e.length===0)return re;if(e.length===1)return oe(e[0]);let t=oe(e[0]);for(let n=1;n<e.length;n+=1)t=se(t,e[n]);return t}function oe(e){return ue(e)?{...e(re)}:O(e)}function se(e,t){return ue(t)?t(e):ce(e,t)}function O(e){let t={...e};for(let e in t){let n=t[e];le(e,n)&&(t[e]=fe(n))}return t}function ce(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=D(e.style,r);break;case`className`:e[n]=me(e.className,r);break;default:e[n]=le(n,r)?de(e[n],r):r}}return e}function le(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function ue(e){return typeof e==`function`}function de(e,t){return t?e?(...n)=>{let r=n[0];if(he(r)){let i=r;pe(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:fe(t):e}function fe(e){return e&&((...t)=>{let n=t[0];return he(n)&&pe(n),e(...t)})}function pe(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function me(e,t){return t?e?t+` `+e:t:e}function he(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function k(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var ge=k(`https://base-ui.com/production-error`,`Base UI`),_e=b.createContext(void 0);function ve(e=!1){let t=b.useContext(_e);if(t===void 0&&!e)throw Error(ge(16));return t}function ye(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:b.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function be(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(v(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function A(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=b.useRef(null),s=ve(!0),c=a??s!==void 0,{props:l}=ye({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=b.useCallback(()=>{let e=o.current;j(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return E(u,[u]),{getButtonProps:b.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return ie({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(pe(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=j(r),s=!i&&xe(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),be(r,e))}else!l||i||!d&&!u?n&&s&&d&&e.preventDefault():e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),be(r,e)))},onKeyUp(e){t||(pe(e),a?.(e),e.target===e.currentTarget&&i&&c&&j(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||i||c||e.defaultPrevented||e.key!==` `||(e.preventBaseUIHandler(),be(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:te(e=>{o.current=e,u()})}}function j(e){return y(e)&&e.tagName===`BUTTON`}function xe(e){return y(e)&&e.tagName===`A`&&!!e.href}function Se(e,t,n,r){let i=ee(Ce).current;return N(i,e,t,n,r)&&Te(i,[e,t,n,r]),i.callback}function M(e){let t=ee(Ce).current;return we(t,e)&&Te(t,e),t.callback}function Ce(){return{callback:null,cleanup:null,refs:[]}}function N(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function we(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Te(e,t){e.refs=t,e.callback=t.every(e=>e==null)?null:n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var Ee=19;function De(e){return Ee>=e}function Oe(e){if(!b.isValidElement(e))return null;let t=e,n=t.props;return(De(19)?n?.ref:t.ref)??null}function ke(){}var Ae=Object.freeze([]),je=Object.freeze({});function Me(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e)}else i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Ne(e,t){return typeof e==`function`?e(t):e}function Pe(e,t){return typeof e==`function`?e(t):e}function Fe(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=ze(r));let i=Ie(t,n,r);if(n.enabled===!1)return null;let a=n.state??je;return Be(e,r,i,a)}function Ie(e,t,n){let{className:r,style:i}=e,{state:a=je,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Ne(r,a):void 0,d=l?Pe(i,a):void 0,f=l?Me(a,c):je,p=l&&s?Le(s):void 0,m=l?D(f,p)??{}:je;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?M([m.ref,Oe(n),...o]):Se(m.ref,Oe(n),o):Se(null,null)),l?(u!==void 0&&(m.className=me(m.className,u)),d!==void 0&&(m.style=D(m.style,d)),m):je}function Le(e){return Array.isArray(e)?ae(e):ie(void 0,e)}var Re=Symbol.for(`react.lazy`);function ze(e){if(e?.$$typeof!==Re)return e;let t=b.Children.toArray(e)[0];return b.isValidElement(t)?t:e}function Be(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=ie(n,t.props);return e.ref=n.ref,b.cloneElement(t,e)}return Ve(e,n)}function Ve(e,t){return e===`button`?(0,b.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,b.createElement)(`img`,{alt:``,...t,key:t.key}):b.createElement(e,t)}var He=b.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=A({disabled:i,focusableWhenDisabled:a,native:o});return Fe(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),Ue=g();function We(e){return e<20?`low`:e<50?`mid`:`ok`}function Ge(e){return Math.min(100,Math.max(0,Math.round(e)))}var Ke={claude:{name:`Claude`,rank:0},codex:{name:`Codex`,rank:1},cursor:{name:`Cursor`,rank:2}};function qe(e){return Ke[e].name}function Je(e){return[...e].sort((e,t)=>Ke[e.runtime].rank-Ke[t.runtime].rank)}function Ye(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=Ye(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Xe(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ye(e))&&(r&&(r+=` `),r+=t);return r}var Ze=(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},Qe=(e,t)=>({classGroupId:e,validator:t}),$e=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),et=`-`,tt=[],nt=`arbitrary..`,rt=e=>{let t=ot(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return at(e);let n=e.split(et);return it(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Ze(i,t):t:i||tt}return n[e]||tt}}},it=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=it(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(et):e.slice(t).join(et),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},at=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?nt+r:void 0})(),ot=e=>{let{theme:t,classGroups:n}=e;return st(n,t)},st=(e,t)=>{let n=$e();for(let r in e){let i=e[r];ct(i,n,r,t)}return n},ct=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];lt(i,t,n,r)}},lt=(e,t,n,r)=>{typeof e==`string`?ut(e,t,n):typeof e==`function`?dt(e,t,n,r):ft(e,t,n,r)},ut=(e,t,n)=>{let r=e===``?t:pt(t,e);r.classGroupId=n},dt=(e,t,n,r)=>{mt(e)?ct(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(Qe(n,e)))},ft=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];ct(o,pt(t,a),n,r)}},pt=(e,t)=>{let n=e,r=t.split(et),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=$e(),n.nextPart.set(t,i)),n=i}return n},mt=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,ht=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)}}},gt=`!`,_t=`:`,vt=[],yt=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),bt=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===_t){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(gt)?(c=s.slice(0,-1),l=!0):s.startsWith(gt)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return yt(t,l,c,u)};if(t){let e=t+_t,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):yt(vt,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},xt=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}},St=e=>({cache:ht(e.cacheSize),parseClassName:bt(e),sortModifiers:xt(e),postfixLookupClassGroupIds:Ct(e),...rt(e)}),Ct=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},wt=/\s+/,Tt=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(wt),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||(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?_+gt:_,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},Et=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Dt(n))&&(i&&(i+=` `),i+=r);return i},Dt=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Dt(e[r]))&&(n&&(n+=` `),n+=t);return n},Ot=(e,...t)=>{let n,r,i,a,o=o=>(n=St(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=Tt(e,n);return i(e,a),a};return a=o,(...e)=>a(Et(...e))},kt=[],At=e=>{let t=t=>t[e]||kt;return t.isThemeGetter=!0,t.themeKey=e,t},jt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Mt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Nt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Pt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ft=/\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$/,It=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Lt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zt=e=>Nt.test(e),P=e=>!!e&&!Number.isNaN(Number(e)),Bt=e=>!!e&&Number.isInteger(Number(e)),Vt=e=>e.endsWith(`%`)&&P(e.slice(0,-1)),Ht=e=>Pt.test(e),Ut=()=>!0,Wt=e=>Ft.test(e)&&!It.test(e),Gt=()=>!1,Kt=e=>Lt.test(e),qt=e=>Rt.test(e),Jt=e=>!I(e)&&!L(e),Yt=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)),F=e=>dn(e,hn,Gt),I=e=>jt.test(e),Xt=e=>dn(e,gn,Wt),Zt=e=>dn(e,_n,P),Qt=e=>dn(e,yn,Ut),$t=e=>dn(e,vn,Gt),en=e=>dn(e,pn,Gt),tn=e=>dn(e,mn,qt),nn=e=>dn(e,bn,Kt),L=e=>Mt.test(e),rn=e=>fn(e,gn),an=e=>fn(e,vn),on=e=>fn(e,pn),sn=e=>fn(e,hn),cn=e=>fn(e,mn),ln=e=>fn(e,bn,!0),un=e=>fn(e,yn,!0),dn=(e,t,n)=>{let r=jt.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},fn=(e,t,n=!1)=>{let r=Mt.exec(e);return r?r[1]?t(r[1]):n:!1},pn=e=>e===`position`||e===`percentage`,mn=e=>e===`image`||e===`url`,hn=e=>e===`length`||e===`size`||e===`bg-size`,gn=e=>e===`length`,_n=e=>e===`number`,vn=e=>e===`family-name`,yn=e=>e===`number`||e===`weight`,bn=e=>e===`shadow`,xn=Ot(()=>{let e=At(`color`),t=At(`font`),n=At(`text`),r=At(`font-weight`),i=At(`tracking`),a=At(`leading`),o=At(`breakpoint`),s=At(`container`),c=At(`spacing`),l=At(`radius`),u=At(`shadow`),d=At(`inset-shadow`),f=At(`text-shadow`),p=At(`drop-shadow`),m=At(`blur`),h=At(`perspective`),g=At(`aspect`),_=At(`ease`),v=At(`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(),L,I],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],ee=()=>[`auto`,`contain`,`none`],C=()=>[L,I,c],w=()=>[zt,`full`,`auto`,...C()],te=()=>[Bt,`none`,`subgrid`,L,I],T=()=>[`auto`,{span:[`full`,Bt,L,I]},Bt,L,I],ne=()=>[Bt,`auto`,L,I],E=()=>[`auto`,`min`,`max`,`fr`,L,I],D=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],re=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ie=()=>[`auto`,...C()],ae=()=>[zt,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...C()],oe=()=>[s,zt,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...C()],se=()=>[zt,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...C()],O=()=>[e,L,I],ce=()=>[...b(),on,en,{position:[L,I]}],le=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ue=()=>[`auto`,`cover`,`contain`,sn,F,{size:[L,I]}],de=()=>[Vt,rn,Xt],fe=()=>[``,`none`,`full`,l,L,I],pe=()=>[``,P,rn,Xt],me=()=>[`solid`,`dashed`,`dotted`,`double`],he=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],k=()=>[P,Vt,on,en],ge=()=>[``,`none`,m,L,I],_e=()=>[`none`,P,L,I],ve=()=>[`none`,P,L,I],ye=()=>[P,L,I],be=()=>[zt,`full`,...C()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Ht],breakpoint:[Ht],color:[Ut],container:[Ht],"drop-shadow":[Ht],ease:[`in`,`out`,`in-out`],font:[Jt],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Ht],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Ht],shadow:[Ht],spacing:[`px`,P],text:[Ht],"text-shadow":[Ht],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,zt,I,L,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,L,I]}],"container-named":[Yt],columns:[{columns:[P,`auto`,I,L,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:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{"inset-s":w(),start:w()}],end:[{"inset-e":w(),end:w()}],"inset-bs":[{"inset-bs":w()}],"inset-be":[{"inset-be":w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Bt,`auto`,L,I]}],basis:[{basis:[zt,`full`,`auto`,s,...C()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[P,zt,`auto`,`initial`,`none`,I]}],grow:[{grow:[``,P,L,I]}],shrink:[{shrink:[``,P,L,I]}],order:[{order:[Bt,`first`,`last`,`none`,L,I]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...D(),`normal`]}],"justify-items":[{"justify-items":[...re(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...re()]}],"align-content":[{content:[`normal`,...D()]}],"align-items":[{items:[...re(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...re(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...re(),`baseline`]}],"place-self":[{"place-self":[`auto`,...re()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mbs:[{mbs:ie()}],mbe:[{mbe:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":C()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":C()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ae()}],"inline-size":[{inline:[`auto`,...oe()]}],"min-inline-size":[{"min-inline":[`auto`,...oe()]}],"max-inline-size":[{"max-inline":[`none`,...oe()]}],"block-size":[{block:[`auto`,...se()]}],"min-block-size":[{"min-block":[`auto`,...se()]}],"max-block-size":[{"max-block":[`none`,...se()]}],w:[{w:[s,`screen`,...ae()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ae()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ae()]}],h:[{h:[`screen`,`lh`,...ae()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ae()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...ae()]}],"font-size":[{text:[`base`,n,rn,Xt]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,un,Qt]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Vt,I]}],"font-family":[{font:[an,$t,t]}],"font-features":[{"font-features":[I]}],"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,L,I]}],"line-clamp":[{"line-clamp":[P,`none`,L,Zt]}],leading:[{leading:[`none`,a,...C()]}],"list-image":[{"list-image":[`none`,L,I]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,L,I]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...me(),`wavy`]}],"text-decoration-thickness":[{decoration:[P,`from-font`,`auto`,L,Xt]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[P,`auto`,L,I]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:C()}],"tab-size":[{tab:[Bt,L,I]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,L,I]}],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`,L,I]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:le()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Bt,L,I],radial:[``,L,I],conic:[``,Bt,L,I]},cn,tn]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:de()}],"gradient-via-pos":[{via:de()}],"gradient-to-pos":[{to:de()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-bs":[{"border-bs":pe()}],"border-w-be":[{"border-be":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...me(),`hidden`,`none`]}],"divide-style":[{divide:[...me(),`hidden`,`none`]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...me(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[P,L,I]}],"outline-w":[{outline:[``,P,rn,Xt]}],"outline-color":[{outline:O()}],shadow:[{shadow:[``,`inner`,`none`,u,ln,nn]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":[`none`,d,ln,nn]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:pe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[P,Xt]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":[`none`,f,ln,nn]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[P,L,I]}],"mix-blend":[{"mix-blend":[...he(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":he()}],"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":[P]}],"mask-image-linear-from-pos":[{"mask-linear-from":k()}],"mask-image-linear-to-pos":[{"mask-linear-to":k()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":k()}],"mask-image-t-to-pos":[{"mask-t-to":k()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":k()}],"mask-image-r-to-pos":[{"mask-r-to":k()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":k()}],"mask-image-b-to-pos":[{"mask-b-to":k()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":k()}],"mask-image-l-to-pos":[{"mask-l-to":k()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":k()}],"mask-image-x-to-pos":[{"mask-x-to":k()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":k()}],"mask-image-y-to-pos":[{"mask-y-to":k()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[L,I]}],"mask-image-radial-from-pos":[{"mask-radial-from":k()}],"mask-image-radial-to-pos":[{"mask-radial-to":k()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"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":[P]}],"mask-image-conic-from-pos":[{"mask-conic-from":k()}],"mask-image-conic-to-pos":[{"mask-conic-to":k()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:le()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,L,I]}],filter:[{filter:[``,`none`,L,I]}],blur:[{blur:ge()}],brightness:[{brightness:[P,L,I]}],contrast:[{contrast:[P,L,I]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ln,nn]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:[``,P,L,I]}],"hue-rotate":[{"hue-rotate":[P,L,I]}],invert:[{invert:[``,P,L,I]}],saturate:[{saturate:[P,L,I]}],sepia:[{sepia:[``,P,L,I]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,L,I]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[P,L,I]}],"backdrop-contrast":[{"backdrop-contrast":[P,L,I]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,P,L,I]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[P,L,I]}],"backdrop-invert":[{"backdrop-invert":[``,P,L,I]}],"backdrop-opacity":[{"backdrop-opacity":[P,L,I]}],"backdrop-saturate":[{"backdrop-saturate":[P,L,I]}],"backdrop-sepia":[{"backdrop-sepia":[``,P,L,I]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,L,I]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[P,`initial`,L,I]}],ease:[{ease:[`linear`,`initial`,_,L,I]}],delay:[{delay:[P,L,I]}],animate:[{animate:[`none`,v,L,I]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,L,I]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:_e()}],"rotate-x":[{"rotate-x":_e()}],"rotate-y":[{"rotate-y":_e()}],"rotate-z":[{"rotate-z":_e()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":[`scale-3d`],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[L,I,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:be()}],"translate-x":[{"translate-x":be()}],"translate-y":[{"translate-y":be()}],"translate-z":[{"translate-z":be()}],"translate-none":[`translate-none`],zoom:[{zoom:[Bt,L,I]}],accent:[{accent:O()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:O()}],"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`,L,I]}],"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":O()}],"scrollbar-track-color":[{"scrollbar-track":O()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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`,L,I]}],fill:[{fill:[`none`,...O()]}],"stroke-w":[{stroke:[P,rn,Xt,Zt]}],stroke:[{stroke:[`none`,...O()]}],"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":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`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-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`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-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`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-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`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-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`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 R(...e){return xn(Xe(e))}var Sn=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})),z=o(((e,t)=>{t.exports=Sn()}))(),Cn={ok:`bg-signal`,mid:`bg-warn`,low:`bg-failed`},wn={ok:`text-ink`,mid:`text-warn`,low:`text-failed`};function Tn({reports:e,onReports:t}){let[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(),o=()=>{r(!0),a(void 0),fetch(`/quota`,{method:`POST`}).then(async e=>{if(!e.ok)throw Error(`重新取得失敗`);t(await e.json())}).catch(()=>a(`重新取得失敗`)).finally(()=>r(!1))},s=Je(e);return(0,z.jsxs)(`section`,{"aria-label":`剩餘額度`,className:`border-b border-line bg-paper`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 pt-2 sm:px-4`,children:[(0,z.jsx)(`h2`,{className:`eyebrow`,children:`剩餘額度`}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[i&&(0,z.jsx)(`span`,{role:`alert`,className:`text-pretty text-sm text-failed`,children:i}),(0,z.jsx)(He,{type:`button`,disabled:n,className:`min-h-11 rounded-md border border-line px-3 py-1 text-xs hover:bg-wall disabled:opacity-60 sm:min-h-8`,onClick:o,children:n?`正在取得`:`重新取得`})]})]}),s.length===0?(0,z.jsx)(`div`,{className:`px-3 pt-1 pb-3 sm:px-4`,children:(0,z.jsx)(`div`,{"aria-hidden":!0,className:`h-8 w-1/2 rounded-md bg-ink/10 motion-safe:animate-pulse`})}):(0,z.jsx)(`div`,{className:R(`grid`,s.length===2&&`md:grid-cols-2 md:divide-x md:divide-line`,s.length>=3&&`md:grid-cols-3 md:divide-x md:divide-line`),children:s.map((e,t)=>(0,z.jsx)(`div`,{className:R(t>0&&`border-t border-line md:border-t-0`),children:(0,z.jsx)(En,{report:e})},e.runtime))})]})}function En({report:e}){let t=qe(e.runtime);return(0,z.jsxs)(`div`,{className:`min-w-0 px-3 py-3 sm:px-4`,children:[(0,z.jsx)(`h3`,{className:`text-sm text-ink/60`,children:`${t} 剩餘額度`}),e.error?(0,z.jsx)(`p`,{className:`text-pretty mt-2 text-sm text-failed`,children:e.error}):e.windows.length===0?(0,z.jsx)(`p`,{className:`text-pretty mt-2 text-sm text-ink/60`,children:`沒有讀到額度`}):(0,z.jsx)(`div`,{className:`mt-2 space-y-3`,children:e.windows.map(e=>(0,z.jsx)(Dn,{runtime:t,window:e},e.label))})]})}function Dn({runtime:e,window:t}){let n=Ge(t.remaining_percent),r=We(t.remaining_percent);return(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(`span`,{className:`w-16 shrink-0 text-sm text-ink/60`,children:t.label}),(0,z.jsx)(`span`,{className:R(`w-14 shrink-0 font-mono text-xl font-medium tabular-nums`,wn[r]),children:`${n}%`}),(0,z.jsx)(`div`,{role:`meter`,"aria-label":`${e} ${t.label} 剩餘額度`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,"aria-valuetext":`剩餘 ${n}%`,className:`h-2 min-w-0 flex-1 overflow-hidden rounded-full bg-ink/10`,children:(0,z.jsx)(`div`,{className:R(`h-full rounded-full motion-safe:transition-[width] motion-safe:duration-300`,Cn[r]),style:{width:`${n}%`}})}),r===`low`&&(0,z.jsx)(`span`,{className:`shrink-0 text-sm text-failed`,children:`快用完`})]}),(0,z.jsx)(`p`,{className:`mt-0.5 pl-[4.75rem] text-sm tabular-nums text-ink/60`,children:`重設 ${t.resets}`})]})}function On(){return document.querySelector(`meta[name="lyceum-token"]`)?.getAttribute(`content`)??``}var kn=()=>({"Content-Type":`application/json`,"X-Lyceum-Token":On()});async function An(e){return await e.json().catch(()=>({}))??{}}async function jn(e,t){let n;try{n=await fetch(`/api/cmd/${e}`,{method:`POST`,headers:kn(),body:JSON.stringify(t)})}catch{return{kind:`error`,message:`連不上本機伺服器。`}}let r=await An(n);if(n.status===403)return{kind:`stale`};if(n.status===428)return{kind:`need`,need:r.need===`typed`?`typed`:`confirm`,...typeof r.target==`string`?{target:r.target}:{}};if(n.status===400)return{kind:`invalid`,error:String(r.error??`輸入不對。`),...typeof r.field==`string`?{field:r.field}:{}};let i={kind:`error`,message:`伺服器回應格式不對。`};return n.status===202?typeof r.jobId==`string`&&typeof r.pid==`number`?{kind:`job`,job:{jobId:r.jobId,pid:r.pid}}:i:n.status===200?r.mode!==`short`||r.exit!==null&&typeof r.exit!=`number`||typeof r.stdout!=`string`||typeof r.stderr!=`string`||typeof r.timedOut!=`boolean`?i:{kind:`short`,result:{mode:`short`,exit:r.exit,signal:typeof r.signal==`string`?r.signal:null,stdout:r.stdout,stderr:r.stderr,timedOut:r.timedOut,truncated:r.truncated===!0}}:{kind:`error`,message:String(r.error??`伺服器回了 ${n.status}。`)}}async function Mn(){try{let e=await fetch(`/api/jobs`);return e.ok?(await e.json()).jobs??[]:[]}catch{return[]}}async function Nn(e){try{let t=await fetch(`/api/jobs/${encodeURIComponent(e)}`);return t.ok?await t.json():void 0}catch{return}}async function Pn(e,t){try{let n=await fetch(`/api/ask?project=${encodeURIComponent(e)}&run=${encodeURIComponent(t)}`);return n.ok?await n.json():void 0}catch{return}}async function Fn(e,t,n,r){let i={complete:!1,problems:[`送出答案失敗,請稍後再試。`]};try{let a=await fetch(`/api/ask/answers`,{method:`POST`,headers:kn(),body:JSON.stringify({project:e,run:t,answers:n,assumeDefaults:r})}),o=await An(a);return a.ok?typeof o.complete==`boolean`&&Array.isArray(o.problems)?{complete:o.complete,problems:o.problems.map(String)}:i:Array.isArray(o.problems)&&o.problems.length>0&&o.problems.every(e=>typeof e==`string`)?{complete:!1,problems:o.problems}:typeof o.error==`string`&&o.error?{complete:!1,problems:[o.error]}:i}catch{return i}}async function In(e,t){try{let n=await fetch(`/api/reports?project=${encodeURIComponent(e)}&run=${encodeURIComponent(t)}`,{headers:{"X-Lyceum-Token":On()}});return n.ok?(await n.json()).reports??[]:void 0}catch{return}}async function Ln(e,t,n){try{let r=await fetch(`/api/report?project=${encodeURIComponent(e)}&run=${encodeURIComponent(t)}&id=${encodeURIComponent(n)}`,{headers:{"X-Lyceum-Token":On()}});return r.ok?await r.json():void 0}catch{return}}async function Rn(){try{let e=await fetch(`/api/decisions`,{headers:{"X-Lyceum-Token":On()}});return e.ok?(await e.json()).projects??[]:void 0}catch{return}}async function zn(e,t){try{let n=await fetch(`/api/decision?project=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`,{headers:{"X-Lyceum-Token":On()}});return n.ok?await n.json():void 0}catch{return}}function Bn(e,t){this.v=e,this.k=t}function Vn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Hn(e){if(Array.isArray(e))return e}function Un(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Wn(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
10
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gn(e,t){return Hn(e)||Un(e,t)||Kn(e,t)||Wn()}function Kn(e,t){if(e){if(typeof e==`string`)return Vn(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vn(e,t):void 0}}function qn(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof Bn;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}qn.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},qn.prototype.next=function(e){return this._invoke(`next`,e)},qn.prototype.throw=function(e){return this._invoke(`throw`,e)},qn.prototype.return=function(e){return this._invoke(`return`,e)};var Jn=Object.entries,Yn=Object.keys,Xn=Object.setPrototypeOf,Zn=Object.isFrozen,Qn=Object.getPrototypeOf,$n=Object.getOwnPropertyDescriptor,er=Object.freeze,tr=Object.seal,nr=Object.create,rr=typeof Reflect<`u`&&Reflect,ir=rr.apply,ar=rr.construct;er||=function(e){return e},tr||=function(e){return e},ir||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},ar||=function(e){return new e(...[...arguments].slice(1))};var or=Fr(Array.prototype.forEach),sr=Fr(Array.prototype.lastIndexOf),cr=Fr(Array.prototype.pop),lr=Fr(Array.prototype.push),ur=Fr(Array.prototype.slice),dr=Fr(Array.prototype.splice),fr=Array.isArray,pr=Ir(Set),mr=Fr(Set.prototype.add),hr=Fr(Set.prototype.has),gr=Fr(Set.prototype.delete),_r=Ir(Map),vr=Fr(Map.prototype.get),yr=Fr(Map.prototype.set),br=Fr(String.prototype.toLowerCase),xr=Fr(String.prototype.toString),Sr=Fr(String.prototype.match),Cr=Fr(String.prototype.replace),wr=Fr(String.prototype.indexOf),Tr=Fr(String.prototype.trim),Er=Fr(Number.prototype.toString),Dr=Fr(Boolean.prototype.toString),Or=typeof BigInt>`u`?null:Fr(BigInt.prototype.toString),kr=typeof Symbol>`u`?null:Fr(Symbol.prototype.toString),Ar=Fr(Object.prototype.hasOwnProperty),jr=Fr(Object.prototype.toString),Mr=RegExp.prototype.test,Nr=function(e,t){return e instanceof RegExp&&(e.lastIndex=0),ir(Mr,e,[t])},Pr=Ir(TypeError);function Fr(e){return function(t){var n=[...arguments].slice(1);return ir(e,t,n)}}function Ir(e){return function(){return ar(e,[...arguments])}}function B(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:br;if(Xn&&Xn(e,null),!fr(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Zn(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Lr(e){for(let t=0;t<e.length;t++)Ar(e,t)||(e[t]=null);return e}function Rr(e){let t=nr(null);for(let r of Jn(e)){var n=Gn(r,2);let i=n[0],a=n[1];Ar(e,i)&&(t[i]=fr(a)?Lr(a):a&&typeof a==`object`&&a.constructor===Object?Rr(a):a)}return t}function zr(e){let t=nr(null),n=Yn(e),r=n.length;for(;r--;)t[n[r]]=e[n[r]];return t}function Br(e){switch(typeof e){case`string`:return e;case`number`:return Er(e);case`boolean`:return Dr(e);case`bigint`:return Or?Or(e):`0`;case`symbol`:return kr?kr(e):`Symbol()`;case`undefined`:return jr(e);case`function`:case`object`:{if(e===null)return jr(e);let t=e,n=Vr(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:jr(e)}return jr(e)}default:return jr(e)}}function Vr(e,t){for(;e!==null;){let n=$n(e,t);if(n){if(n.get)return Fr(n.get);if(typeof n.value==`function`)return Fr(n.value)}e=Qn(e)}function n(){return null}return n}function Hr(e,t){for(;e!==null;){let n=$n(e,t);if(n)return n.get?Fr(n.get):null;e=Qn(e)}return null}function Ur(e){if(!e)return!1;try{return Nr(e,``),!0}catch{return!1}}var Wr=er(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Gr=er(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.filter.font.g.glyph.glyphref.hkern.image.line.lineargradient.marker.mask.metadata.mpath.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Kr=er([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),qr=er([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Jr=er(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Yr=er([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Xr=er([`#text`]),Zr=er(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Qr=er(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),$r=er(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),ei=er([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),ti=tr(/{{[\w\W]*|^[\w\W]*}}/g),ni=tr(/<%[\w\W]*|^[\w\W]*%>/g),ri=tr(/\${[\w\W]*/g),ii=tr(/{{|}}|\${|<%|%>/),ai=tr(/[^\t\n\f\r ]/),oi=tr(/\u0000/g),si=tr(/^data-[\-\w.\u00B7-\uFFFF]+$/),ci=tr(/^aria-[\-\w]+$/),li=tr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ui=tr(/^(?:\w+script|data):/i),di=tr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fi=tr(/^html$/i),pi=tr(/^[a-z][.\w]*(-[.\w]+)+$/i),mi=tr(/<[/\w!]/g),hi=tr(/<[/\w]/g),gi=tr(/<[/\w]|^-?>|--!?>|<!-$/g),_i=tr(/<\/no(script|embed|frames)/i),vi=tr(/\/>/i),yi=tr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i),bi=tr(/^[\r\n\t ]+/),V={element:1,text:3,processingInstruction:7,comment:8,document:9,documentFragment:11},xi=er(B({},[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`])),Si=er(B({},[`textarea`,`title`])),Ci=er(B({},[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`embed`,`frame`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`])),wi=function(){return typeof window>`u`?null:window},Ti=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Ei=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Di=function(e,t,n,r){return Ar(e,t)&&fr(e[t])?B(r.base?zr(r.base):{},e[t],r.transform):n},Oi=function(e,t,n){let r=Ar(e,t)?e[t]:void 0;return r&&typeof r==`object`?Rr(r):n};function ki(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wi(),t=e=>ki(e);if(t.version=`3.5.0`,t.removed=[],!e||!e.document||e.document.nodeType!==V.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript,a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter,l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=Vr(d,`cloneNode`),p=Vr(d,`remove`),m=Vr(d,`removeChild`),h=Vr(d,`removeAttributeNode`),g=Vr(d,`nextSibling`),_=Vr(d,`childNodes`),v=Vr(d,`parentNode`),y=Vr(d,`shadowRoot`),b=Vr(d,`attributes`),x=o&&o.prototype?Vr(o.prototype,`nodeType`):null,S=o&&o.prototype?Vr(o.prototype,`nodeName`):null,ee=o&&o.prototype?Vr(o.prototype,`ownerDocument`):null,C=function(e){return x?x(e):e.nodeType},w=function(e){return S?S(e):e.nodeName},te=Hr(d,`namespaceURI`),T=function(e){return te?te(e):e.namespaceURI},ne=function(e){return C(e)===V.element?b(e):null};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let E,D=``,re,ie=!1,ae=0,oe=function(){if(ae>0)throw Pr(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},se=function(e){oe(),ae++;try{return E.createHTML(e)}finally{ae--}},O=function(e){return E&&He?se(e):e},ce=function(e){oe(),ae++;try{return E.createScriptURL(e)}finally{ae--}},le=function(){return ie||=(re=Ti(u,i),!0),re},ue=n,de=ue.implementation,fe=ue.createNodeIterator,pe=ue.createDocumentFragment,me=ue.getElementsByTagName,he=r.importNode,k=Ei();t.isSupported=typeof Jn==`function`&&typeof v==`function`&&de&&de.createHTMLDocument!==void 0;let ge=ti,_e=ni,ve=ri,ye=si,be=ci,A=ui,j=di,xe=pi,Se=li,M=null,Ce=B({},[...Wr,...Gr,...Kr,...Jr,...Xr]),N=null,we=B({},[...Zr,...Qr,...$r,...ei]),Te=null,Ee=null,De=null,Oe=Object.seal(nr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ke=!0,Ae=!0,je=!1,Me=!0,Ne=!1,Pe=!0,Fe=!1,Ie=!1,Le=null,Re=null,ze=!1,Be=!1,Ve=!1,He=!1,Ue=!0,We=!1,Ge=`user-content-`,Ke=!0,qe=!1,Je=null,Ye=null,Xe=!1,Ze=null,Qe=B({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),$e=null,et=B({},[`audio`,`video`,`img`,`source`,`image`,`track`]),tt=null,nt=B({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),rt=`http://www.w3.org/1998/Math/MathML`,it=`http://www.w3.org/2000/svg`,at=`http://www.w3.org/1999/xhtml`,ot=at,st=!1,ct=null,lt=B({},[rt,it,at],xr),ut=er(B({},[`mi`,`mo`,`mn`,`ms`,`mtext`])),dt=null,ft=er(B({},[`annotation-xml`])),pt=null,mt=er(nr(null)),ht=B({},[`title`,`style`,`font`,`a`,`script`]),gt=null,_t=[`application/xhtml+xml`,`text/html`],vt=null,yt=null,bt=null,xt=n.createElement(`form`),St=function(e){return e instanceof RegExp||e instanceof Function},Ct=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e&&typeof e==`object`||(e={}),e=Rr(e),gt=_t.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,vt=gt===`application/xhtml+xml`?xr:br,M=Di(e,`ALLOWED_TAGS`,Ce,{transform:vt}),N=Di(e,`ALLOWED_ATTR`,we,{transform:vt}),ct=Di(e,`ALLOWED_NAMESPACES`,lt,{transform:xr}),tt=Di(e,`ADD_URI_SAFE_ATTR`,nt,{transform:vt,base:nt}),$e=Di(e,`ADD_DATA_URI_TAGS`,et,{transform:vt,base:et}),Ze=Di(e,`FORBID_CONTENTS`,Qe,{transform:vt}),Ee=Di(e,`FORBID_TAGS`,nr(null),{transform:vt}),De=Di(e,`FORBID_ATTR`,nr(null),{transform:vt}),Xe=Ar(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?Rr(e.USE_PROFILES):e.USE_PROFILES:!1,ke=e.ALLOW_ARIA_ATTR!==!1,Ae=e.ALLOW_DATA_ATTR!==!1,je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ne=e.SAFE_FOR_TEMPLATES||!1,Pe=e.SAFE_FOR_XML!==!1,Fe=e.WHOLE_DOCUMENT||!1,Be=e.RETURN_DOM||!1,Ve=e.RETURN_DOM_FRAGMENT||!1,He=e.RETURN_TRUSTED_TYPE||!1,ze=e.FORCE_BODY||!1,Ue=e.SANITIZE_DOM!==!1,We=e.SANITIZE_NAMED_PROPS||!1,Ke=e.KEEP_CONTENT!==!1,qe=e.IN_PLACE||!1,Se=Ur(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:li,ot=typeof e.NAMESPACE==`string`?e.NAMESPACE:at,dt=Oi(e,`MATHML_TEXT_INTEGRATION_POINTS`,ut),pt=Oi(e,`HTML_INTEGRATION_POINTS`,ft);let t=Oi(e,`CUSTOM_ELEMENT_HANDLING`,mt);if(Te=nr(null),Ar(t,`tagNameCheck`)&&St(t.tagNameCheck)&&(Te.tagNameCheck=t.tagNameCheck),Ar(t,`attributeNameCheck`)&&St(t.attributeNameCheck)&&(Te.attributeNameCheck=t.attributeNameCheck),Ar(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(Te.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),tr(Te),Ne&&(Ae=!1),Ve&&(Be=!0),Xe&&((Ar(e,`ALLOWED_TAGS`)||Ar(e,`ALLOWED_ATTR`))&&typeof console<`u`&&typeof console.warn==`function`&&console.warn(`DOMPurify: USE_PROFILES overrides ALLOWED_TAGS and ALLOWED_ATTR. Do not use these options together.`),M=B({},Xr),N=nr(null),Xe.html===!0&&(B(M,Wr),B(N,Zr)),Xe.svg===!0&&(B(M,Gr),B(N,Qr),B(N,ei)),Xe.svgFilters===!0&&(B(M,Kr),B(N,Qr),B(N,ei)),Xe.mathMl===!0&&(B(M,Jr),B(N,$r),B(N,ei))),Oe.tagCheck=null,Oe.attributeCheck=null,Ar(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Oe.tagCheck=e.ADD_TAGS:fr(e.ADD_TAGS)&&(M===Ce&&(M=zr(M)),B(M,e.ADD_TAGS,vt))),Ar(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Oe.attributeCheck=e.ADD_ATTR:fr(e.ADD_ATTR)&&(N===we&&(N=zr(N)),B(N,e.ADD_ATTR,vt))),Ar(e,`ADD_FORBID_CONTENTS`)&&fr(e.ADD_FORBID_CONTENTS)&&(Ze===Qe&&(Ze=zr(Ze)),B(Ze,e.ADD_FORBID_CONTENTS,vt)),Ke&&(M[`#text`]=!0),Fe&&B(M,[`html`,`head`,`body`]),M.table&&(M.tbody=!0,delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Pr(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Pr(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=E;E=e.TRUSTED_TYPES_POLICY;try{D=se(``)}catch(e){throw E=t,e}}else e.TRUSTED_TYPES_POLICY===null?(E=void 0,D=``):(E===void 0&&(E=le()),E&&typeof D==`string`&&(D=se(``)));yt=er(e)},wt=B({},[...Gr,...Kr,...qr]),Tt=B({},[...Jr,...Yr]),Et=function(e,t,n){return t===at?e===`svg`:t===rt?e===`svg`&&(n===`annotation-xml`||dt[n]):!!wt[e]},Dt=function(e,t,n){return t===at?e===`math`:t===it?e===`math`&&pt[n]:!!Tt[e]},Ot=function(e,t,n){return t===it&&!pt[n]||t===rt&&!dt[n]?!1:!Tt[e]&&(ht[e]||!wt[e])},kt=function(e){let t=T(e),n=br(w(e)),r=v(e),i=ot,a=`template`;return r&&C(r)===V.element&&(i=T(r),a=br(w(r))),ct[t]?t===it?Et(n,i,a):t===rt?Dt(n,i,a):t===at?Ot(n,i,a):gt===`application/xhtml+xml`:!1},At=function(e){lr(t.removed,{element:e}),Ut(e);try{v(e).removeChild(e)}catch{if(p(e),!v(e))throw Pr(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},jt=function(e,t,n){try{h(e,t)}catch{try{e.removeAttribute(n)}catch{}}},Mt=function(e){It(e);let t=_(e);t&&or(ur(t),t=>{try{m(e,t)}catch{}}),C(e)===V.element&&Pt(e,!1)},Nt=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}if(lr(t.removed,{attribute:r||null,from:n}),r)jt(n,r,e);else try{n.removeAttribute(e)}catch{}if(e===`is`){if(Be||Ve)try{At(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},Pt=function(e,t){let n=b(e);if(n)for(let r=n.length-1;r>=0;--r){let i=n[r],a=i&&i.name;typeof a==`string`&&!(t&&N[vt(a)])&&jt(e,i,a)}},Ft=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=[e];for(;r.length>0;){let e=r.pop();if(t(e)===!1)continue;if(n&&C(e)===V.element){let t=y(e);$t(t)&&r.push(t)}let i=_(e);if(i)for(let e=i.length-1;e>=0;--e)r.push(i[e])}},It=function(e){Ft(e,e=>{C(e)===V.element&&Pt(e,!0)})},Lt=function(e){let t=[];return Ft(e,e=>{t.push(e)},!0),t},Rt=function(e,t){let n=pr();or(Lt(e),e=>{C(e)===V.element&&mr(n,e)}),or(t,e=>{C(e)===V.element&&!hr(n,e)&&Pt(e,!0)})},zt=function(e,n){let r=!1;return or(t.removed,t=>{t.element&&(r||=t.element===e,It(t.element))}),Rt(e,n),r},P=function(e,t){Mt(e),zt(e,t)},Bt=function(e,t){let n=Je,r=null,i=()=>(r||(r=pr(),or(t,e=>{mr(r,e)})),r);for(let t=0;;t++){let r=Lt(e),a=[e],o=!1;if(or(r,e=>{C(e)===V.documentFragment?lr(a,e):!o&&!hr(n,e)&&(o=hr(i(),e))}),!o)return;if(t>=8)throw Pr(`the tree kept changing during in-place sanitization; refusing to return it`);or(a,(t,n)=>{Vt(t,n>0,e,i())})}},Vt=function(e,t,n,r){let i=qt(e),a;for(;a=i.nextNode();)hr(r,a)&&!hr(Je,a)&&(t&&tn(k.uponSanitizeShadowNode,a,null),gn(a,n))},Ht=function(e){if(!Je)return;mr(Je,e);let t=vr(Ye,e);if(t!==void 0){if(t>=8)throw Pr(`the tree kept changing during in-place sanitization; refusing to return it`);yr(Ye,e,t+1)}},Ut=function(e){Je&&(gr(Je,e),vr(Ye,e)===void 0&&yr(Ye,e,0))},Wt=function(e,t){return Pe?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},Gt=function(e){Pe&&Ft(e,e=>{let t=C(e);if(t===V.processingInstruction||t===V.comment&&Nr(hi,e.data)){try{p(e)}catch{}return!1}if(t===V.element){let t=e,n=vt(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Wt(`for`,n)&&t.removeAttribute(`for`)}catch{}}return!0})},Kt=function(e){let t=null,r=null;if(ze)e=`<remove></remove>`+e;else{let t=Sr(e,bi);r=t&&t[0]}gt===`application/xhtml+xml`&&ot===at&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=E?se(e):e;if(ot===at)try{t=new l().parseFromString(i,gt)}catch{}if(!t||!t.documentElement){t=de.createDocument(ot,`template`,null);try{t.documentElement.innerHTML=st?D:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),ot===at?me.call(t,Fe?`html`:`body`)[0]:Fe?t.documentElement:a},qt=function(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=ee?ee(e):e.ownerDocument;return fe.call(n||e,e,(t?0:c.SHOW_ELEMENT)|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Jt=function(e){return e=Cr(e,ge,` `),e=Cr(e,_e,` `),e=Cr(e,ve,` `),e},Yt=function(e){Xt(e);let t=e.querySelectorAll?.call(e,`template`);t&&or(t,e=>{$t(e.content)&&Yt(e.content)})},F=B({},[`caption`,`colgroup`,`col`,`thead`,`tbody`,`tfoot`,`tr`,`td`,`th`,`style`,`script`,`template`]),I=function(e){if(gt===`application/xhtml+xml`)return;let t=e.querySelectorAll?.call(e,`table,tbody,thead,tfoot,tr,colgroup`);t&&t.length!==0&&or(t,t=>{or(ur(_(t)),n=>{let r=C(n);if(!(r===V.text?Nr(ai,n.data):r===V.element&&!F[br(w(n))]))return;let i=t;for(;i&&br(w(i))!==`table`;)i=i===e?null:v(i);let a=i&&i!==e?v(i):null;if(a)try{a.insertBefore(n,i)}catch{}})})},Xt=function(e){I(e),e.normalize();let t=qt(e,!0),n=null,r=t.nextNode();for(;r;){let e=r.data;if(Nr(oi,e)&&(e=Cr(e,oi,``),r.data=e),Nr(ii,e)&&(e=Jt(e),r.data=e),e&&C(r)===V.text){if(n){let t=n.data;Nr(ii,t[t.length-1]+e[0])&&(n.data=Jt(t+e[0]))}n=r}r=t.nextNode()}},Zt=function(e){let t=S?S(e):null;return typeof t!=`string`||vt(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==b(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==x(e)||e.childNodes!==_(e)},Qt=function(e){if(!x||typeof e!=`object`||!e)return null;try{let t=x(e);return typeof t==`number`?t:null}catch{return null}},$t=function(e){return Qt(e)===V.documentFragment},en=function(e){return Qt(e)!==null};function tn(e,n,r){e.length!==0&&or(e,e=>{e.call(t,n,r,yt)})}let nn=function(e,t){let n=!!Ci[t],r=!!xi[t];return!n&&!r&&!Si[t]||T(e)!==at?!1:n?e.hasChildNodes():en(e.firstElementChild)?!0:r&&typeof e.textContent==`string`&&Nr(mi,e.textContent)},L=function(e,t,n){return!!(Pe&&n===V.element&&e.hasChildNodes()&&!en(e.firstElementChild)&&Nr(mi,e.textContent)&&Nr(mi,e.innerHTML)||Pe&&n===V.element&&nn(e,t)||n===V.processingInstruction||Pe&&n===V.comment&&Nr(gi,e.data))},rn=function(e,t){return e instanceof RegExp?Nr(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},an=function(e,t,n){if(!Ee[t]&&dn(t)&&rn(Te.tagNameCheck,t))return!1;if(Ke&&!Ze[t]&&!Ze[br(t)]){let t=v(e),r=_(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,g(e))}}}return At(e),!0},on=function(e,t,n,r){return e.length===0?t:t===n||t===r?zr(t):t},sn=function(e,t){return e===t||v(e)!==null?!1:(qe&&It(e),Ut(e),!0)},cn=function(e,n){if(Ht(e),tn(k.beforeSanitizeElements,e,null),sn(e,n))return!0;if(Zt(e))return At(e),!0;let r=vt(w(e)),i=C(e);if(M=on(k.uponSanitizeElement,M,Ce,Le),tn(k.uponSanitizeElement,e,{tagName:r,allowedTags:M}),sn(e,n))return!0;if(L(e,r,i))return At(e),!0;if((Ee[r]||!(Oe.tagCheck instanceof Function&&Oe.tagCheck(r))&&!M[r])&&an(e,r,n))return!0;if(i===V.element&&!kt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&Nr(_i,e.innerHTML))return At(e),!0;if(Ne&&i===V.text){let n=e.textContent,r=Jt(n);n!==r&&(lr(t.removed,{element:e.cloneNode()}),e.textContent=r)}return tn(k.afterSanitizeElements,e,null),sn(e,n)},ln=function(e,t,r){if(De[t]||Wt(t,e)||Ue&&(t===`id`||t===`name`)&&(r in n||r in xt))return!1;let i=N[t]||Oe.attributeCheck instanceof Function&&Oe.attributeCheck(t,e);if(Ae&&Nr(ye,t)||ke&&Nr(be,t))return!0;if(!i)return dn(e)&&rn(Te.tagNameCheck,e)&&rn(Te.attributeNameCheck,t,e)||t===`is`&&Te.allowCustomizedBuiltInElements&&rn(Te.tagNameCheck,r);if(tt[t])return!0;let a=Cr(r,j,``);return Nr(Se,a)||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&wr(r,`data:`)===0&&$e[e]||je&&!Nr(A,a)?!0:!r},un=B({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),dn=function(e){return!un[br(e)]&&Nr(xe,e)},fn=function(e,t,n,r){if(E&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return se(r);case`TrustedScriptURL`:return ce(r)}return r},pn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!Zt(e)||(At(e),!1)}catch{return Nt(t,e),!1}},mn=function(e,t){return Pe&&Nr(yi,t)?!0:br(e)===`attributename`&&wr(t,`href`)!==-1},hn=function(e,n){if(tn(k.beforeSanitizeAttributes,e,null),sn(e,n))return;let r=ne(e);if(!r||Zt(e))return;N=on(k.uponSanitizeAttribute,N,we,Re);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:N,forceKeepAttr:void 0},a=r.length,o=vt(w(e));for(;a--;){let n=r[a];if(!n)continue;let s=n.name,c=n.namespaceURI,l=n.value,u=vt(s),d=l,f=s===`value`?d:Tr(d),p=!1;i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,tn(k.uponSanitizeAttribute,e,i),f=i.attrValue,We&&(u===`id`||u===`name`)&&wr(f,Ge)!==0&&(Nt(s,e,n),f=Ge+f,p=!0),mn(s,f)?Nt(s,e,n):i.forceKeepAttr||(i.keepAttr?!Me&&Nr(vi,f)?Nt(s,e,n):(Ne&&(f=Jt(f)),ln(o,u,f)?(f=fn(o,u,c,f),f!==d&&pn(e,s,c,f)&&p&&cr(t.removed)):Nt(s,e,n)):Nt(s,e,n))}tn(k.afterSanitizeAttributes,e,null),sn(e,n)},gn=function(e,t){cn(e,t),hn(e,t),$t(e.content)&&_n(e.content)},_n=function(e){let t=null,n=qt(e);for(tn(k.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(tn(k.uponSanitizeShadowNode,t,null),gn(t,e),C(t)===V.element){let e=y(t);$t(e)&&(vn(e),_n(e))}Ne&&Xt(e),tn(k.afterSanitizeShadowDOM,e,null)},vn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){_n(e.shadow);continue}let n=e.node,r=C(n)===V.element,i=_(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=S?S(n):null;if(typeof e==`string`&&vt(e)===`template`){let e=n.content;$t(e)&&t.push({node:e,shadow:null})}}if(r){let e=y(n);$t(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}},yn=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(st=!e,st&&(e=`<!-->`),typeof e!=`string`&&!en(e)&&(e=Br(e),typeof e!=`string`))throw Pr(`dirty is not a string, aborting`);if(!t.isSupported)return e;Ie?(M=Le,N=Re):Ct(n),bt=yt,t.removed=[];let c=qe&&typeof e!=`string`&&en(e),l=[],u=Je,d=Ye;if(c){Gt(e),l=Lt(e);let t=w(e);if(typeof t==`string`){let n=vt(t);if(!M[n]||Ee[n])throw P(e,l),Pr(`root node is forbidden and cannot be sanitized in-place`)}if(Zt(e))throw P(e,l),Pr(`root node is clobbered and cannot be sanitized in-place`);Je=pr(),Ye=_r()}else if(en(e))i=Kt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===V.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),vn(i);else{if(!Be&&!Ne&&!Fe&&e.indexOf(`<`)===-1)return O(e);if(i=Kt(e),!i)return Be?null:He?D:``}i&&ze&&At(i.firstChild);let f=c?e:i;try{c&&vn(e);let t=qt(f);for(;o=t.nextNode();)gn(o,f);c&&Bt(e,l)}catch(t){throw c&&P(e,l),t}finally{Je=u,Ye=d}if(c){if(zt(e,l))throw Pr(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return Ne&&Yt(e),e}if(Be){if(Ne&&Yt(i),Ve)for(s=pe.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(N.shadowroot||N.shadowrootmode)&&(s=he.call(r,s,!0)),s}Ne&&Xt(i);let p=Fe?i.outerHTML:i.innerHTML;return Fe&&M[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Nr(fi,i.ownerDocument.doctype.name)&&(p=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
11
|
-
`+p),O(p)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=bt,i=M,a=N,o=t.removed;bt=null;try{return yn(e,n)}finally{bt=r,r&&(Ie||Ct(r),M=i,N=a,t.removed=o)}},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ct(e),Ie=!0,Le=M,Re=N},t.clearConfig=function(){yt=null,Ie=!1,Le=null,Re=null,E=re,D=``},t.isValidAttribute=function(e,t,n){yt||Ct({});let r=vt(e),i=vt(t);return typeof n==`string`&&(mn(t,n)||!Me&&Nr(vi,n))?!1:ln(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&Ar(k,e)&&lr(k[e],t)},t.removeHook=function(e,t){if(Ar(k,e)){if(t!==void 0){let n=sr(k[e],t);return n===-1?void 0:dr(k[e],n,1)[0]}return cr(k[e])}},t.removeHooks=function(e){Ar(k,e)&&(k[e]=[])},t.removeAllHooks=function(){k=Ei()},t}var Ai=ki();function ji(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mi=ji();function Ni(e){Mi=e}var Pi={exec:()=>null};function Fi(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function H(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Li.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Ii=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),Li={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,listInterruptsParagraph:/^ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)(\t[ \t]*)/gm,nestedBlockMarker:/^ {0,3}(?:(?:[*+-]|\d{1,9}[.)])(?: |$)|> ?)/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\][ \t]+\S/,listReplaceTask:/^\[[ xX]\][ \t]+/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Fi(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Fi(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Fi(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Fi(e=>RegExp(`^ {0,${e}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:Fi(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Fi(e=>RegExp(`^ {0,${e}}(?:</?(?:${Wi})(?:[ \\t]+|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,`i`)),blockquoteBeginRegex:Fi(e=>RegExp(`^ {0,${e}}>`)),nestedContainerMarkers:/^(?: {0,3}(?:(?:[*+-]|\d{1,9}[.)])[ \t]+|>[ \t]?))+/},Ri=/^(?:[ \t]*(?:\n|$))+/,zi=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Bi=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*) *(?=\n|$)|$)/,Vi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Hi=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ui=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Wi=`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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Gi=H(` {0,3}(?:</?(?:tag)(?:[ \\t]+|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`).replace(`tag`,Wi).getRegex(),Ki=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/,qi=H(Ki).replace(/bull/g,Ui).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/\|table/g,``).replace(/html/g,Gi).getRegex(),Ji=H(Ki).replace(/bull/g,Ui).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).replace(/html/g,Gi).getRegex(),Yi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Xi=/^[^\n]+/,Zi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/,Qi=H(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<(?:\\.|[^\n<>\\])*>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Zi).replace(`title`,/(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(),$i=H(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Ui).getRegex(),ea=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ta=H(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*?[ \\t]*/?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,ea).replace(`tag`,Wi).replace(`attribute`,/[ \t]+[a-zA-Z:_][\w.:-]*(?:[ \t]*=[ \t]*"[^"\n]*"|[ \t]*=[ \t]*'[^'\n]*'|[ \t]*=[ \t]*[^\s"'=<>`]+)?/).getRegex(),U=e=>H(Yi).replace(`hr`,Vi).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,Gi).getRegex(),na=U(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),ra=U(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),ia={blockquote:H(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace(`paragraph`,ra).getRegex(),code:zi,def:Qi,fences:Bi,heading:Hi,hr:Vi,html:ta,lheading:qi,list:$i,newline:Ri,paragraph:na,table:Pi,text:Xi},aa=H(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Vi).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,Gi).getRegex(),oa={...ia,lheading:Ji,table:aa,paragraph:H(Yi).replace(`hr`,Vi).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,aa).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,Gi).getRegex()},sa={...ia,html:H(`^ *(?:comment(?: *\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1>(?: *\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace(`comment`,ea).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Pi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:H(Yi).replace(`hr`,Vi).replace(`heading`,` *#{1,6} *[^
|
|
12
|
-
]`).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).replace(`lheading`,qi).getRegex()},ca=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,la=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ua=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,da=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,fa=/[\p{P}\p{S}]/u,pa=/[\s\p{P}\p{S}]/u,ma=/[^\s\p{P}\p{S}]/u,ha=H(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,pa).getRegex(),ga=/[\p{Pi}\p{Ps}"']/u,_a=/(?!~)[\p{P}\p{S}]/u,va=/(?!~)[\s\p{P}\p{S}]/u,ya=/(?:[^\s\p{P}\p{S}]|~)/u,ba=H(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Ii?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),xa=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Sa=H(xa,`u`).replace(/punct/g,fa).getRegex(),Ca=H(xa,`u`).replace(/punct/g,_a).getRegex(),wa=H(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,ga).replace(/punct/g,fa).getRegex(),Ta=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Ea=H(Ta,`gu`).replace(/notPunctSpace/g,ma).replace(/punctSpace/g,pa).replace(/punct/g,fa).getRegex(),Da=H(Ta,`gu`).replace(/notPunctSpace/g,ya).replace(/punctSpace/g,va).replace(/punct/g,_a).getRegex(),Oa=H(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,ma).replace(/punctSpace/g,pa).replace(/punct/g,fa).getRegex(),ka=H(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,ma).replace(/punctSpace/g,pa).replace(/punct/g,fa).getRegex(),Aa=H(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,ma).replace(/punctSpace/g,pa).replace(/punct/g,fa).getRegex(),ja=H(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,fa).getRegex(),Ma=H(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,ma).replace(/punctSpace/g,pa).replace(/punct/g,fa).getRegex(),Na=H(/\\(punct)/,`gu`).replace(/punct/g,fa).getRegex(),Pa=H(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,`gu`).replace(/punct/g,fa).getRegex(),Fa=H(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ia=H(ea).replace(`(?:-->|$)`,`-->`).getRegex(),La=H(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Ia).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ra=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,za=H(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,Ra).getRegex(),Ba=H(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace(`label`,za).replace(`href`,/<(?:\\.|[^\n<>\\])*>|(?!<)[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(),Va=H(/^!?\[(label)\]\[(ref)\]/).replace(`label`,za).replace(`ref`,Zi).getRegex(),Ha=H(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Zi).getRegex(),Ua=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Wa=H(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,Ra).getRegex(),Ga=H(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,H(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Wa).replace(`ref`,Ua).getRegex()).replace(`nolink`,H(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Ua).getRegex()).getRegex(),Ka=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,qa=H(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),Ja={_backpedal:Pi,anyPunctuation:Na,anyPunctuationOutsideCode:Pa,autolink:Fa,blockSkip:ba,br:ua,code:la,del:Pi,delLDelim:Pi,delRDelim:Pi,emStrongLDelim:Sa,emStrongRDelimAst:Ea,emStrongRDelimUnd:ka,escape:ca,link:Ba,nolink:Ha,punctuation:ha,reflink:Va,reflinkSearch:Ga,tag:La,text:da,url:Pi},Ya={...Ja,emStrongLDelim:wa,emStrongRDelimAst:Oa,emStrongRDelimUnd:Aa,link:H(/^!?\[(label)\]\((.*?)\)/).replace(`label`,za).getRegex(),reflink:H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,za).getRegex()},Xa={...Ja,emStrongRDelimAst:Da,emStrongLDelim:Ca,delLDelim:ja,delRDelim:Ma,url:H(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,qa).replace(`protocol`,Ka).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:H(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|wwwStart|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,Ka).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace(`wwwStart`,Ii?`(?<![^\\s*_~(])www\\.`:`www\\.`).getRegex()},Za={...Xa,br:H(ua).replace(`{2,}`,`*`).getRegex(),text:H(Xa.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},Qa={normal:ia,gfm:oa,pedantic:sa},$a={normal:Ja,gfm:Xa,breaks:Za,pedantic:Ya},eo={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},to=e=>eo[e];function no(e,t){if(t){if(Li.escapeTest.test(e))return e.replace(Li.escapeReplace,to)}else if(Li.escapeTestNoEncode.test(e))return e.replace(Li.escapeReplaceNoEncode,to);return e}function ro(e){return Li.numericCharacterReference.test(e)?e.replace(Li.numericCharacterReferenceOrAmpersand,(e,t,n)=>{if(t===void 0&&n===void 0)return`&`;let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:r===38?`&`:String.fromCodePoint(r)}):e}function io(e){try{e=encodeURI(e).replace(Li.percentDecode,`%`)}catch{return null}return e}function ao(e,t){let n=e.replace(Li.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Li.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(Li.slashPipe,`|`);return n}function oo(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function so(e){let t=e.split(`
|
|
13
|
-
`),n=t.length-1;for(;n>=0&&Li.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
14
|
-
`)}function co(e){return e.trim().replace(Li.multipleSpaceGlobal,` `).toLowerCase().toUpperCase().toLowerCase()}function lo(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}var uo=new WeakMap;function fo(e){let t={"*":-1,_:-1},n=-1,r=e.length;for(let i=0;i<r;i++){let a=e[i];if(a!==`*`&&a!==`_`&&a!==`~`)continue;let o=i===0?`
|
|
15
|
-
`:e[i-1],s=i+1;for(;s<r&&e[s]===a;)s++;o!==` `&&o!==` `&&o!==`
|
|
16
|
-
`&&o!==`\r`&&o!==`\f`&&(a===`~`?n=i:t[a]=i),i=s-1}return{maskedSrc:e,lastPossibleEmStrongCloserIndex:t,lastPossibleDelCloserIndex:n}}function po(e,t){let n=fo(t),r=uo.get(e);r?r.push(n):uo.set(e,[n])}function mo(e){let t=uo.get(e);t&&(t.pop(),t.length===0&&uo.delete(e))}function ho(e,t,n){let r=uo.get(e)?.at(-1);return r&&r.maskedSrc===t?r.lastPossibleEmStrongCloserIndex[n]:fo(t).lastPossibleEmStrongCloserIndex[n]}function go(e,t){let n=uo.get(e)?.at(-1);return n&&n.maskedSrc===t?n.lastPossibleDelCloserIndex:fo(t).lastPossibleDelCloserIndex}function _o(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function vo(e,t){let n=``;for(let r=0;r<e.length;r++){if(e[r]==="`"){let i=t.inline.code.exec(e.slice(r));if(i){n+=i[0],r+=i[0].length-1;continue}}e[r]===`\\`&&(e[r+1]===`[`||e[r+1]===`]`)?(n+=e[r+1],r++):n+=e[r]}return n}function yo(e,t,n,r,i){let a=t.href,o=t.title||null,s=vo(e[1],i),c=e[0].charAt(0)===`!`,l=r.state.inLink,u=r.state.linkEmitted,d=r.state.inRawBlock;r.state.inLink=!0,r.state.linkEmitted=!1;let f=r.inlineTokens(s),p=r.state.linkEmitted;if(r.state.linkEmitted=u,r.state.inLink=l,!c){if(p){r.state.inRawBlock=d;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:f}}function bo(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
17
|
-
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(`
|
|
18
|
-
`)}function xo(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;i<t.length;i++){if(t[i]===`\\`){i++;continue}if(t[i]==="`"){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if(t[i]!==`<`)continue;let a=e.slice(n+i),o=r.inline.tag.exec(a)||r.inline.autolink.exec(a);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var So=class{options;rules;lexer;constructor(e){this.options=e||Mi}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:so(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=bo(e,t[3]||``,this.rules);return t[3]!==void 0&&(n===``||n.endsWith(`
|
|
19
|
-
`))&&(n+=`
|
|
20
|
-
`),{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=oo(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:oo(t[0],`
|
|
21
|
-
`),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:oo(t[0],`
|
|
22
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=oo(t[0],`
|
|
23
|
-
`).split(`
|
|
24
|
-
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
25
|
-
`),c=s.replace(this.rules.other.blockquoteMarkerWhitespace,(e,t,n)=>n.startsWith(` `)?t+` `+n.slice(1):t+_o(n,t.length)).replace(this.rules.other.blockquoteSetextReplace,`
|
|
26
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
27
|
-
${s}`:s,r=r?`${r}
|
|
28
|
-
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`||u?.type===`heading`||u?.type===`hr`||u?.type===`html`||u?.type===`table`)break;if(u?.type===`blockquote`){let t=u,a=e.join(`
|
|
29
|
-
`),o=t.raw+`
|
|
30
|
-
`+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s;let c=o.substring(s.raw.length).replace(/^\n/,``),l=c?c.split(`
|
|
31
|
-
`).length:0,d=l?e.slice(0,-l):e;if(d.length>0&&(n=`${n}
|
|
32
|
-
${d.join(`
|
|
33
|
-
`)}`),r=r.substring(0,r.length-t.text.length)+s.text,e=e.slice(d.length),e.length>0&&this.rules.other.blockquoteStart.test(e[0]))continue;break}if(u?.type===`list`){let t=u,a=t.raw+`
|
|
34
|
-
`+e.join(`
|
|
35
|
-
`),o=this.list(a);i[i.length-1]=o;let s=o.raw.length>t.raw.length?a.slice(t.raw.length+1,o.raw.length).split(`
|
|
36
|
-
`).length:0;if(s>0){let t=e.slice(0,s).join(`
|
|
37
|
-
`);n=`${n}
|
|
38
|
-
${t}`,r=`${r}
|
|
39
|
-
${t}`}if(e=e.slice(s),e.length>0&&!this.rules.other.blockquoteStart.test(e[0]))break}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){if(!this.options.pedantic&&this.lexer.state.lastToken?.type===`text`&&!this.rules.other.listInterruptsParagraph.test(e))return;let n=e,r=()=>n.length-e.length,i=t[1].trim(),a=i.length>1,o={type:`list`,raw:``,ordered:a,start:a?+i.slice(0,-1):``,loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:`[*+-]`);let s=this.rules.other.listItemRegex(i),c=!1;for(;e;){let i=!1,a=``;if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;let l=r();e=e.substring(t[0].length);let u=t[2].split(`
|
|
40
|
-
`,1)[0],d=t[1].length,f=this.options.pedantic?_o(u,d):u.replace(this.rules.other.leadingSpaceTab,e=>_o(e,d)),p=e.split(`
|
|
41
|
-
`,1)[0],m=!f.trim(),h=0;if(this.options.pedantic?(h=2,a=f.trimStart()):m?h=d+1:(h=f.search(this.rules.other.nonSpaceChar),h=h>4?1:h,a=f.slice(h),h+=d),m&&this.rules.other.blankLine.test(p)&&(e=e.substring(p.length+1),i=!0),!i){let t=this.rules.other.nextBulletRegex(h),n=this.rules.other.hrRegex(h),r=this.rules.other.fencesBeginRegex(h),i=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(h):this.rules.other.headingBeginRegex(h),o=this.rules.other.htmlBeginRegex(h),s=this.rules.other.blockquoteBeginRegex(h),c=!1;for(;e;){let l=e.split(`
|
|
42
|
-
`,1)[0],u;if(p=l,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting,` `),u=p):u=p.replace(this.rules.other.leadingSpaceTab,e=>_o(e)),r.test(p)||i.test(p)||o.test(p)||s.test(p)||t.test(p)||n.test(p))break;if(u.search(this.rules.other.nonSpaceChar)>=h||!p.trim())a+=`
|
|
43
|
-
`+u.slice(h),c=!1;else{if(m)break;let e=f;if(!this.options.pedantic&&!a.includes(`
|
|
44
|
-
`)&&!f.includes(` `)){let t;for(;!n.test(e)&&(t=this.rules.other.nestedBlockMarker.exec(e));)e=e.slice(t[0].length);if(!e.trim())break}if(e.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||r.test(e)||i.test(e)||o.test(e)||n.test(e))break;if(!this.options.pedantic&&!c){let e=f.replace(this.rules.other.nestedContainerMarkers,``);if(this.rules.block.fences.test(e)||this.rules.block.heading.test(e)||this.rules.block.hr.test(e))break}let t=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(p)&&this.rules.block.lheading.test(`${f}
|
|
45
|
-
${p}`)?` ${u.replace(/^ {0,3}/,``)}`:p;a+=`
|
|
46
|
-
`+t,c=!0}m=!p.trim(),e=e.substring(l.length+1),f=u.slice(h)}}let g=n.slice(l,r());o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(c=!0)),o.items.push({type:`list_item`,raw:g,task:!!this.options.gfm&&this.rules.other.listIsTask.test(a),loose:!1,text:a,tokens:[]})}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=n.slice(0,r()).trimEnd();let u=[];for(let e of o.items)if(this.lexer.state.top=!1,u.push(this.lexer.inlineQueue.length),e.tokens=this.lexer.blockTokens(e.text,[]),!o.loose){let t=e.tokens.filter(e=>e.type===`space`);o.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e=0;e<o.items.length;e++){let t=o.items[e],n=t.tokens[0];if(t.task&&(n?.type===`text`||n?.type===`paragraph`)){t.text=t.text.replace(this.rules.other.listReplaceTask,``),n.raw=n.raw.replace(this.rules.other.listReplaceTask,``),n.text=n.text.replace(this.rules.other.listReplaceTask,``);let r=this.lexer.inlineQueue;for(let t=u[e];t<r.length;t++)if(r[t].tokens===n.tokens){r[t].src=r[t].src.replace(this.rules.other.listReplaceTask,``);break}let i=this.rules.other.listTaskCheckbox.exec(t.raw);if(i){let e={type:`checkbox`,raw:i[0]+` `,checked:i[0]!==`[ ]`};t.checked=e.checked,o.loose?t.tokens[0]&&[`paragraph`,`text`].includes(t.tokens[0].type)&&`tokens`in t.tokens[0]&&t.tokens[0].tokens?(t.tokens[0].raw=e.raw+t.tokens[0].raw,t.tokens[0].text=e.raw+t.tokens[0].text,t.tokens[0].tokens.unshift(e)):t.tokens.unshift({type:`paragraph`,raw:e.raw,text:e.raw,tokens:[e]}):t.tokens.unshift(e)}}else t.task&&=!1}if(o.loose)for(let e of o.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return o}}html(e){let t=this.rules.block.html.exec(e);if(t){if(this.lexer.state.lastToken?.type===`paragraph`&&!this.rules.other.htmlBeginRegex(4).test(e))return;let n=so(t[0]);return{type:`html`,block:!0,raw:n,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&lo(t[2],`()`)!==-1)return;let e=co(t[1]),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:oo(t[0],`
|
|
47
|
-
`),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=ao(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
48
|
-
`):[],a={type:`table`,raw:oo(t[0],`
|
|
49
|
-
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(ao(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:oo(t[0],`
|
|
50
|
-
`),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
51
|
-
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){if(e.charCodeAt(0)!==92)return;let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){if(e.charCodeAt(0)!==60)return;let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=e.charCodeAt(0);if(t!==91&&t!==33)return;let n=this.rules.inline.link.exec(e);if(n){let t=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&xo(e,n[1],t,this.rules))return;let r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=oo(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=lo(n[2],`()`);if(e===-2)return;if(e>-1){let t=(n[0].indexOf(`!`)===0?5:4)+n[1].length+e;n[2]=n[2].substring(0,e),n[0]=n[0].substring(0,t).trim(),n[3]=``}}let i=oo(n[0].slice(0,-1),`\\`);if((n[0].length-i.length)%2==0)return;let a=n[2],o=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(a);e&&(a=e[1],o=e[3])}else o=n[3]?n[3].slice(1,-1):``;return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(a=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?a.slice(1):a.slice(1,-1)),yo(n,{href:a&&a.replace(this.rules.inline.anyPunctuation,`$1`),title:o&&o.replace(this.rules.inline.anyPunctuation,`$1`)},n[0],this.lexer,this.rules)}}reflink(e,t){let n=e.charCodeAt(0);if(n!==91&&n!==33)return;let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n=r[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&xo(e,r[1],n,this.rules))return;let i=t[co(r[2]||r[1])];if(!i){let e=r[0].charAt(0);return{type:`text`,raw:e,text:e}}return yo(r,i,r[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||!r[1]&&!r[2]&&!r[3]&&!r[4])return;let i=r[0][0],a=n===i,o=t.length-e.length,s=o;for(;!this.options.pedantic&&s>0&&t[s-1]===i;)s--;let c=[...t.slice(Math.max(0,s-2),s)].at(-1)??``,l=c===`*`||c===`_`||!!this.rules.inline.punctuation.exec(c);s<o&&(n=c);let u=s<o?l:n===`*`||n===`_`||!!this.rules.inline.punctuation.exec(n);if(r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))return;let d=r[1]||r[3]||``;if(!d||!n||u){let n=[...r[0]].length-1,u,f,p=n,m=0,h=o-s+n,g=!this.options.pedantic&&!!c.trim()&&(!!d||i===`*`&&!l);if(i!==`*`&&i!==`_`)return;let _=i===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd,v=ho(this,t,i),y=t.length-e.length+n;if(v<y)return;t=t.slice(-1*e.length+n);let b=v-y;for(_.lastIndex=0;(r=_.exec(t))!==null&&!(r.index>b);){if(u=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!u)continue;if(f=[...u].length,r[3]||r[4]){p+=f;continue}if((r[5]||r[6]||g)&&h%3&&!((h+f)%3)){if(a&&(r[5]||r[6]))break;m+=f;continue}if(p-=f,p>0)continue;f=Math.min(f,f+p+m);let t=[...r[0]][0].length,i=e.slice(0,n+r.index+t+f);if(Math.min(n,f)%2){let e=i.slice(1,-1);return{type:`em`,raw:i,text:e,tokens:this.lexer.inlineTokens(e)}}let o=i.slice(2,-2);return{type:`strong`,raw:i,text:o,tokens:this.lexer.inlineTokens(o)}}}}codespan(e){if(e.charCodeAt(0)!==96)return;let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=e.charCodeAt(0);if(t!==32&&t!==92&&t!==10)return;let n=this.rules.inline.br.exec(e);if(n)return{type:`br`,raw:n[0]}}del(e,t,n=``){if(e.charCodeAt(0)!==126)return;let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim,c=go(this,t),l=t.length-e.length+n;if(c<l)return;t=t.slice(-1*e.length+n);let u=c-l;for(s.lastIndex=0;(r=s.exec(t))!==null&&!(r.index>u);){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){if(e.charCodeAt(0)!==60)return;let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:e?t[0]:ro(t[0]),escaped:e}}}},Co=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Mi,this.options.tokenizer=this.options.tokenizer||new So,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:Li,block:Qa.normal,inline:$a.normal};this.options.pedantic?(t.block=Qa.pedantic,t.inline=$a.pedantic):this.options.gfm&&(t.block=Qa.gfm,t.inline=this.options.breaks?$a.breaks:$a.gfm),this.tokenizer.rules=t}static get rules(){return{block:Qa,inline:$a}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Li.carriageReturn,`
|
|
52
|
-
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.state.inRawBlock=!1,this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this;let r=this.state.lastToken;this.options.pedantic&&(e=e.replace(Li.tabCharGlobal,` `).replace(Li.spaceLine,``));let i=1/0,a,o=this.options.gfm&&!this.options.pedantic&&this.tokenizer.paragraph===So.prototype.paragraph;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}this.state.lastToken=t.at(-1);let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
|
|
53
|
-
`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
54
|
-
`)?``:`
|
|
55
|
-
`)+r.raw,n.text+=`
|
|
56
|
-
`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if((r=this.tokenizer.fences(e))||(r=this.tokenizer.heading(e))||(r=this.tokenizer.hr(e))||(r=this.tokenizer.blockquote(e))||(r=this.tokenizer.list(e))||(r=this.tokenizer.html(e))){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
57
|
-
`)?``:`
|
|
58
|
-
`)+r.raw,n.text+=`
|
|
59
|
-
`+r.raw,this.inlineQueue.at(-1).src=n.text):(this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}),t.push(r));continue}if((r=this.tokenizer.table(e))||(r=this.tokenizer.lheading(e))){e=e.substring(r.raw.length),t.push(r);continue}let s=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(s))){let i=t.at(-1);(n||i===a&&o)&&i?.type===`paragraph`?(i.raw+=(i.raw.endsWith(`
|
|
60
|
-
`)?``:`
|
|
61
|
-
`)+r.raw,i.text+=`
|
|
62
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text,a=i):(t.push(r),a=r),n=s.length!==e.length,e=e.substring(r.raw.length)}else if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
63
|
-
`)?``:`
|
|
64
|
-
`)+r.raw,n.text+=`
|
|
65
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,this.state.lastToken=r,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,co(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=e.includes(`)`);try{return this.#e(e,t)}finally{this.state.linkParenPossible=n}}#e(e,t){let n=e.includes(`*`)||e.includes(`_`)||e.includes(`~`),r=n||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==So.prototype.emStrong||this.tokenizer.del!==So.prototype.del?this.#r(e):e;if(!n)return this.#t(e,r,t);po(this.tokenizer,r);try{return this.#t(e,r,t)}finally{mo(this.tokenizer)}}#t(e,t,n){let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(t=>(o=t.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if((o=this.tokenizer.escape(e))||(o=this.tokenizer.tag(e))||(o=this.tokenizer.link(e))){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let t=n.at(-1);o.type===`text`&&t?.type===`text`?(t.raw+=o.raw,t.text+=o.text):n.push(o);continue}let s=e[0];if(s===`*`||s===`_`){let a=t.length-e.length;if(ho(this.tokenizer,t,s)<=a){let t=1;for(;t<e.length&&e.charCodeAt(t)===s.charCodeAt(0);)t++;let a=e.substring(0,t),o=n.at(-1);o?.type===`text`&&!o.escaped?(o.raw+=a,o.text+=a):n.push({type:`text`,raw:a,text:a,escaped:!1}),e=e.substring(t),i=s,r=!0;continue}}else if(s===`~`){let a=t.length-e.length;if(go(this.tokenizer,t)<=a){let t=1;for(;t<e.length&&e.charCodeAt(t)===126;)t++;let a=e.substring(0,t),o=n.at(-1);o?.type===`text`&&!o.escaped?(o.raw+=a,o.text+=a):n.push({type:`text`,raw:a,text:a,escaped:!1}),e=e.substring(t),i=s,r=!0;continue}}if((o=this.tokenizer.emStrong(e,t,i))||(o=this.tokenizer.codespan(e))||(o=this.tokenizer.br(e))||(o=this.tokenizer.del(e,t,i))||(o=this.tokenizer.autolink(e))||!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),n.push(o);continue}let c=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(c=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(c)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let t=n.at(-1);t?.type===`text`?(t.raw+=o.raw,t.text+=o.text):n.push(o)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}#n(e){let{blockSkip:t,tag:n,autolink:r}=this.tokenizer.rules.inline,i=``,a=0,o;for(t.lastIndex=0;o=t.exec(e);){let s=o.index+(o[2]?o[2].length:0),c=o.index+o[0].length;if(e.charAt(s)===`<`){let i=e.slice(s),a=n.exec(i)||r.exec(i);if(!a){t.lastIndex=s+1;continue}c=s+a[0].length,t.lastIndex=c}i+=e.slice(a,s)+`[`+`a`.repeat(c-s-2)+`]`,a=c}return i+e.slice(a)}#r(e){let t=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,n=t=>{let r=t.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,co(t.slice(r+1,-1))))return t;if(r>1&&t.charAt(0)!==`!`){let i=t.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,n)+`][`+`a`.repeat(t.length-r-2)+`]`}return`[`+`a`.repeat(t.length-2)+`]`};t=t.replace(e,n)}return t=t.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(e,t,n)=>n?`+`.repeat(e.length):t?t+e.slice(t.length,-t.length).replace(/`/g,`+`)+t:e),t=this.#n(t),t=this.options.hooks?.emStrongMask?.call({lexer:this},t)??t,t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},wo=class{options;parser;constructor(e){this.options=e||Mi}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Li.notSpaceStart)?.[0],i=e?e.replace(Li.endingNewline,``)+`
|
|
66
|
-
`:``;return r?`<pre><code class="language-`+no(r)+`">`+(n?i:no(i,!0))+`</code></pre>
|
|
67
|
-
`:`<pre><code>`+(n?i:no(i,!0))+`</code></pre>
|
|
68
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
69
|
-
${this.parser.parse(e)}</blockquote>
|
|
70
|
-
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
71
|
-
`}hr(e){return`<hr>
|
|
72
|
-
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
73
|
-
`+r+`</`+i+`>
|
|
74
|
-
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
75
|
-
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
76
|
-
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
77
|
-
<thead>
|
|
78
|
-
`+t+`</thead>
|
|
79
|
-
`+r+`</table>
|
|
80
|
-
`}tablerow({text:e}){return`<tr>
|
|
81
|
-
${e}</tr>
|
|
82
|
-
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
83
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${no(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?no(n,!0):this.parser.parseInline(r),o=io(e);if(o===null)return a;e=no(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+no(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=io(e);if(i===null)return no(n);e=i;let a=`<img src="${no(e)}" alt="${no(n)}"`;return t&&(a+=` title="${no(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:no(e.text)}},To=class{parser;strong({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}em({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}codespan({text:e}){return e}del({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}image({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}br(){return`
|
|
84
|
-
`}checkbox({raw:e}){return e}},Eo=class e{options;renderer;textRenderer;constructor(e){this.options=e||Mi,this.options.renderer=this.options.renderer||new wo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new To,this.textRenderer.parser=this}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n===!1?``:n??``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e===!1?``:e??``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Do=class{options;block;constructor(e){this.options=e||Mi}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Co.lex:Co.lexInline}provideParser(e=this.block){return e?Eo.parse:Eo.parseInline}};function Oo(e,t){if(Array.isArray(t))for(let n=0;n<t.length;n++)e.push(t[n]);else e.push(t)}var ko=new class{defaults=ji();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Eo;Renderer=wo;TextRenderer=To;Lexer=Co;Tokenizer=So;Hooks=Do;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(Oo(n,t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)Oo(n,this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)Oo(n,this.walkTokens(e.tokens,t));break}case`list`:{let e=r;Oo(n,this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);Oo(n,this.walkTokens(i,t))}):e.tokens&&Oo(n,this.walkTokens(e.tokens,t))}}return n}use(...e){let t=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new wo(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n===!1?``:n??``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new So(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Do;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=Do.passThroughHooks.has(n)?e=>{if(t.options.async&&Do.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(t.options.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return Oo(n,r.call(this,e)),t&&Oo(n,t.call(this,e)),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Co.lex(e,t??this.defaults)}parser(e,t){return Eo.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?Co.lex:Co.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?Eo.parse:Eo.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?Co.lex:Co.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?Eo.parse:Eo.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
85
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+no(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function W(e,t){return ko.parse(e,t)}W.options=W.setOptions=function(e){return ko.setOptions(e),W.defaults=ko.defaults,Ni(W.defaults),W},W.getDefaults=ji,W.defaults=Mi;function Ao(...e){return ko.use(...e),W.defaults=ko.defaults,Ni(W.defaults),W}W.use=Ao,W.walkTokens=function(e,t){return ko.walkTokens(e,t)},W.parseInline=ko.parseInline,W.Parser=Eo,W.parser=Eo.parse,W.Renderer=wo,W.TextRenderer=To,W.Lexer=Co,W.lexer=Co.lex,W.Tokenizer=So,W.Hooks=Do,W.parse=W,W.options,W.setOptions,W.walkTokens,W.parseInline,Eo.parse,Co.lex,Ai.addHook(`afterSanitizeAttributes`,e=>{e instanceof HTMLAnchorElement&&e.hasAttribute(`href`)&&(e.setAttribute(`target`,`_blank`),e.setAttribute(`rel`,`noopener noreferrer`))});function jo(e){let t=W.parse(e,{async:!1,gfm:!0});return Ai.sanitize(t,{USE_PROFILES:{html:!0}})}var Mo={active:`有效`,superseded:`已被取代`},No=`inline-flex min-h-11 shrink-0 items-center gap-2 rounded-lg border px-3 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`;function Po(){let[e,t]=(0,b.useState)(),[n,r]=(0,b.useState)(),[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)();(0,b.useEffect)(()=>{let e=!0;return Rn().then(n=>e&&t(n??`error`)),()=>{e=!1}},[]);let c=Array.isArray(e)?e:[],l=c.find(e=>e.project===n)??c.find(e=>e.decisions.length>0)??c[0],u=(l?.decisions??[]).filter(e=>i||e.status===`active`),d=(l?.decisions.length??0)-u.length;return(0,z.jsxs)(`article`,{className:`enter animate-in fade-in p-4 duration-200 sm:p-6`,children:[(0,z.jsx)(`h1`,{className:`text-balance text-2xl font-semibold tracking-tight`,children:`決策`}),(0,z.jsx)(`p`,{className:`text-pretty mt-2 text-sm text-ink/70`,children:`依專案分類,以 ADR 格式呈現。資料來自專案紀錄,清除任務後仍會保留。`}),e===void 0?(0,z.jsx)(`p`,{role:`status`,className:`mt-6 text-sm`,children:`讀取中…`}):e===`error`?(0,z.jsx)(`p`,{role:`alert`,className:`mt-6 text-sm text-failed`,children:`讀不到決策,請重新整理頁面。`}):c.length===0?(0,z.jsx)(`p`,{className:`mt-6 text-sm`,children:`還沒有已註冊的專案。`}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`ul`,{"aria-label":`專案`,className:`mt-5 flex gap-2 overflow-x-auto pb-1`,children:c.map(e=>{let t=e.project===l?.project;return(0,z.jsx)(`li`,{children:(0,z.jsxs)(`button`,{type:`button`,"aria-pressed":t,className:R(No,t?`border-line bg-paper font-medium`:`border-transparent hover:bg-paper/70`),onClick:()=>{r(e.project),s(void 0)},children:[(0,z.jsx)(`span`,{className:`truncate`,children:e.project}),(0,z.jsx)(`span`,{className:`font-mono text-xs tabular-nums text-ink/60`,children:e.decisions.filter(e=>e.status===`active`).length})]})},e.project)})}),l?.error&&(0,z.jsx)(`p`,{role:`alert`,className:`mt-4 text-sm text-failed`,children:l.error}),(0,z.jsxs)(`div`,{className:`mt-4 grid gap-4 lg:grid-cols-[minmax(0,22rem)_minmax(0,1fr)]`,children:[(0,z.jsxs)(`section`,{"aria-label":`決策列表`,children:[(0,z.jsxs)(`label`,{className:`flex min-h-11 items-center gap-2 text-sm`,children:[(0,z.jsx)(`input`,{type:`checkbox`,className:`size-4 accent-[var(--c-signal)]`,checked:i,onChange:e=>a(e.target.checked)}),`顯示已被取代的決策`,d>0&&!i?`(${d})`:``]}),u.length===0?(0,z.jsx)(`p`,{className:`panel mt-2 p-4 text-sm text-ink/70`,children:l&&l.decisions.length===0?`這個專案還沒有決策紀錄。`:`沒有有效的決策。`}):(0,z.jsx)(`ul`,{className:`mt-2 grid gap-2`,children:u.map(e=>{let t=o?.project===l?.project&&o?.id===e.id;return(0,z.jsx)(`li`,{children:(0,z.jsxs)(`button`,{type:`button`,"aria-current":t?`true`:void 0,className:R(`panel block min-h-11 w-full p-3 text-left hover:bg-wall focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,t&&`border-signal`,e.status===`superseded`&&`opacity-70`),onClick:()=>l&&s({project:l.project,id:e.id}),children:[(0,z.jsxs)(`span`,{className:`block font-mono text-xs tabular-nums text-ink/60`,children:[e.date||`日期不明`,` · `,e.id]}),(0,z.jsx)(`span`,{className:`text-pretty mt-1 block text-sm font-medium`,children:e.title}),(0,z.jsx)(Fo,{item:e})]})},e.id)})})]}),(0,z.jsx)(`section`,{"aria-label":`決策內容`,"aria-live":`polite`,children:o?(0,z.jsx)(Io,{pick:o,onJump:e=>s({project:o.project,id:e})},`${o.project}/${o.id}`):(0,z.jsx)(`p`,{className:`panel p-4 text-sm text-ink/70`,children:`從左邊選一個決策來閱讀。`})})]})]})]})}function Fo({item:e}){return(0,z.jsxs)(`span`,{className:R(`mt-2 inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs`,e.status===`active`?`bg-signal-soft text-signal`:`bg-warn-soft text-warn`),children:[(0,z.jsx)(`span`,{"aria-hidden":!0,className:`size-1.5 rounded-full bg-current`}),Mo[e.status],e.invalid?`・格式有問題`:``]})}function Io({pick:e,onJump:t}){let[n,r]=(0,b.useState)();(0,b.useEffect)(()=>{let t=!0;return zn(e.project,e.id).then(e=>t&&r(e??`error`)),()=>{t=!1}},[e.project,e.id]);let i=(0,b.useMemo)(()=>n&&n!==`error`?jo(n.markdown):``,[n]);if(n===void 0)return(0,z.jsx)(`p`,{role:`status`,className:`panel p-4 text-sm`,children:`讀取中…`});if(n===`error`)return(0,z.jsx)(`p`,{role:`alert`,className:`panel p-4 text-sm text-failed`,children:`找不到這個決策。`});let a=e=>e.map(e=>(0,z.jsx)(`button`,{type:`button`,className:`mr-2 min-h-11 font-mono text-xs underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,onClick:()=>t(e),children:e},e));return(0,z.jsxs)(`div`,{className:`panel p-4 sm:p-6`,children:[(0,z.jsxs)(`p`,{className:`eyebrow`,children:[`ADR · `,e.project]}),(0,z.jsx)(`h2`,{className:`text-balance mt-1 text-xl font-semibold tracking-tight`,children:n.title}),(0,z.jsxs)(`dl`,{className:`mt-4 grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 gap-y-1 border-y border-line py-3 text-sm`,children:[(0,z.jsx)(`dt`,{className:`text-ink/60`,children:`狀態`}),(0,z.jsx)(`dd`,{children:(0,z.jsx)(Fo,{item:n})}),(0,z.jsx)(`dt`,{className:`text-ink/60`,children:`日期`}),(0,z.jsx)(`dd`,{className:`font-mono tabular-nums`,children:n.date||`不明`}),n.run&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`dt`,{className:`text-ink/60`,children:`來源任務`}),(0,z.jsx)(`dd`,{className:`truncate font-mono text-xs`,children:n.run})]}),n.supersedes.length>0&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`dt`,{className:`text-ink/60`,children:`取代`}),(0,z.jsx)(`dd`,{children:a(n.supersedes)})]}),n.supersededBy.length>0&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`dt`,{className:`text-ink/60`,children:`被取代於`}),(0,z.jsx)(`dd`,{children:a(n.supersededBy)})]})]}),n.invalid&&(0,z.jsxs)(`p`,{role:`alert`,className:`mt-3 text-sm text-failed`,children:[`這份紀錄的格式有問題:`,n.invalid]}),(0,z.jsx)(`article`,{className:`report-prose mt-4`,dangerouslySetInnerHTML:{__html:i}})]})}function Lo(e,t){return t?{tone:`fail`,text:`等太久,已中止`}:e===null?{tone:`fail`,text:`沒能啟動`}:e===0?{tone:`ok`,text:`完成`}:e===2?{tone:`warn`,text:`部分完成,或被擋住(結束碼 2)`}:e===3?{tone:`warn`,text:`正在等你回答問題`}:{tone:`fail`,text:`失敗(結束碼 ${e})`}}function Ro(e,t,n){let r=!0,i,a=async()=>{let o,s=!0;try{o=await e()}catch{s=!1}r&&(s&&t(o),i=setTimeout(()=>void a(),n))};return a(),()=>{r=!1,i!==void 0&&clearTimeout(i)}}var G={running:`執行中`,ended:`已結束`,lost:`已結束(結束碼不明)`};function zo(){let[e,t]=(0,b.useState)([]),[n,r]=(0,b.useState)(),[i,a]=(0,b.useState)(),[o,s]=(0,b.useState)(!1);return(0,b.useEffect)(()=>Ro(Mn,t,3e3),[]),(0,b.useEffect)(()=>{if(a(void 0),s(!1),n)return Ro(()=>Nn(n),e=>{e?(a(e),s(!1)):(a(e=>e??null),s(!0))},2e3)},[n]),(0,z.jsxs)(`article`,{className:`enter animate-in fade-in p-4 duration-200 sm:p-6`,children:[(0,z.jsx)(`h1`,{className:`text-balance text-2xl font-semibold tracking-tight`,children:`任務輸出`}),(0,z.jsx)(`p`,{className:`text-pretty mt-2 text-sm`,children:`從網頁啟動的背景指令。它們獨立於這個頁面,關掉頁面也會繼續跑。`}),e.length===0?(0,z.jsx)(`p`,{className:`text-pretty mt-6 text-sm`,children:`還沒有從網頁啟動過的背景指令;若剛啟動過卻沒看到,可能是暫時無法取得清單,稍後會自動重試。`}):(0,z.jsx)(`ul`,{className:`mt-6 flex flex-col gap-2`,children:e.map(e=>{let t=e.state===`ended`?Lo(e.exit??null,!1):void 0;return(0,z.jsx)(`li`,{children:(0,z.jsxs)(`button`,{type:`button`,"aria-pressed":n===e.id,className:R(`panel flex min-h-11 w-full flex-wrap items-center gap-x-4 gap-y-1 px-3 py-2 text-left text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,n===e.id&&`border-ink/40`),onClick:()=>r(n===e.id?void 0:e.id),children:[(0,z.jsx)(`span`,{className:`font-mono`,children:e.command}),(0,z.jsx)(`span`,{className:`text-ink/60`,children:new Date(e.started_at).toLocaleString()}),(0,z.jsx)(`span`,{className:R(e.state===`running`||t?.tone===`ok`?`text-signal`:t?.tone===`warn`||e.state===`lost`?`text-warn`:`text-failed`),children:e.state===`ended`&&t?t.text:G[e.state]})]})},e.id)})}),n&&i===void 0&&(0,z.jsx)(`p`,{className:`mt-6 text-sm`,children:`正在讀取輸出…`}),n&&i===null&&(0,z.jsx)(`p`,{className:`text-pretty mt-6 text-sm text-failed`,children:`無法取得這個任務的輸出,稍後會自動重試。`}),i&&(0,z.jsxs)(`section`,{"aria-label":`輸出`,className:`mt-6`,children:[(0,z.jsx)(`p`,{className:`eyebrow`,children:i.argv.join(` `)}),o&&(0,z.jsx)(`p`,{className:`mt-1 text-sm text-warn`,children:`更新失敗,稍後重試`}),(0,z.jsx)(`pre`,{className:`mt-2 max-h-[60dvh] overflow-auto rounded-lg border border-line bg-paper p-3 font-mono text-xs whitespace-pre-wrap`,children:i.tail||`(還沒有輸出)`})]})]})}function Bo({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=b.useRef(e!==void 0),[a,o]=b.useState(()=>t);return[i&&e!==void 0?e:a,b.useCallback(e=>{i||o(e)},[])]}function Vo(){let[,e]=b.useState({});return b.useCallback(()=>{e({})},[])}var Ho=0;function Uo(e,t=`mui`){let n=b.useRef(void 0),r=Vo(),i=e??n.current;return b.useEffect(()=>{n.current??(Ho+=1,n.current=`${t}-${Ho}`,e??r())},[e,t,r]),i}var Wo=x.useId;function Go(e,t){if(Wo!==void 0){let n=Wo();return e??(t?`${t}-${n}`:n)}return Uo(e,t)}function Ko(e){return Go(e,`base-ui`)}function qo(e,t,n,r){let i=!1,a=!1,o=r??je;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var Jo=`none`,Yo=`trigger-press`;function Xo(e){b.useEffect(e,Ae)}var Zo=null;globalThis.requestAnimationFrame;var Qo=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},$o=class e{static create(){return new e}static request(e){return Qo.request(e)}static cancel(e){return Qo.cancel(e)}currentId=Zo;request(e){this.cancel(),this.currentId=Qo.request(()=>{this.currentId=Zo,e()})}cancel=()=>{this.currentId!==Zo&&(Qo.cancel(this.currentId),this.currentId=Zo)};disposeEffect=()=>this.cancel};function es(){let e=ee($o.create).current;return Xo(e.disposeEffect),e}function ts(e,t=!1,n=!1,r=!1){let[i,a]=b.useState(e&&t?`idle`:void 0),[o,s]=b.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),E(()=>{if(!e&&o&&i!==`ending`&&n){let e=$o.request(()=>{a(`ending`)});return()=>{$o.cancel(e)}}},[e,o,i,n]),E(()=>{if(!e||t||i===void 0)return;let n=$o.request(()=>{a(void 0)});return()=>{$o.cancel(n)}},[t,e,i]),E(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=$o.request(()=>{a(`idle`)});return()=>{$o.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function ns(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=Bo({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=ts(a,!0,!0),u=Ko(),[d,f]=b.useState(),p=d===null?void 0:d??u,m=te(e=>{let t=!a,n=qo(Yo,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return b.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:m,mounted:s,open:a,panelId:p,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,m,s,a,p,c,o,f,l])}var rs=b.createContext(void 0);function is(){let e=b.useContext(rs);if(e===void 0)throw Error(ge(15));return e}var as=`data-starting-style`,os=`data-ending-style`,ss={[as]:``},cs={[os]:``},ls={transitionStatus(e){return e===`starting`?ss:e===`ending`?cs:null}},us=`data-open`,ds=`data-closed`,fs=as,ps=`data-panel-open`,ms={[us]:``},hs={[ds]:``},gs={open(e){return e?{[ps]:``}:null}},_s={open(e){return e?ms:hs},...ls},vs=b.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=te(o),d=ns({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=b.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=b.useMemo(()=>({...d,onOpenChange:u,state:f}),[d,u,f]),m=Fe(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:_s});return(0,z.jsx)(rs.Provider,{value:p,children:m})}),ys={...gs,...ls},bs=b.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=is(),{className:s,disabled:c=o,render:l,nativeButton:u=!0,style:d,...f}=e,{getButtonProps:p,buttonRef:m}=A({disabled:c,native:u});return Fe(`button`,e,{state:a,ref:[t,m],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},f,p],stateAttributesMapping:ys})});function xs(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}var Ss=0,Cs=class e{static create(){return new e}currentId=Ss;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ss,t()},e)}isStarted(){return this.currentId!==Ss}clear=()=>{this.currentId!==Ss&&(clearTimeout(this.currentId),this.currentId=Ss)};disposeEffect=()=>this.clear};function ws(e){let t=ee(Ts,e).current;return t.next=e,E(t.effect),t}function Ts(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Es(e){return e==null?e:`current`in e?e.current:e}function Ds(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var Os=c(m(),1),ks=null;function As(e){if(!ks){let e=[];ks=e,queueMicrotask(()=>{ks=null,Os.flushSync(()=>{for(let t of e)t()})})}ks.push(e)}function js(e,t=!1,n=!1){let r=es();return te((i,a=null)=>{r.cancel();let o=Es(e);if(o==null)return;let s=o,c=()=>{n?As(()=>{a?.aborted||i()}):Os.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(Ds(s).map(e=>e.finished.then(ke))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(Ds(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=as;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function Ms(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=te(a),s=js(r,n,i);b.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var Ns={height:void 0,width:void 0};function Ps(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:c,setOpen:l,transitionStatus:u}=e,d=b.useRef(null),f=b.useRef(null),[p,m]=b.useState(Ns),h=b.useRef(Ns),g=b.useRef(!1),_=b.useRef(s),v=b.useRef(!1),[y,x]=b.useState(!1),S=b.useRef(null),ee=Se(t,d),C=ws(s),w=js(d),T=!s&&!a,ne=y?`idle`:u,D=s&&(_.current||v.current),re=!s&&a&&f.current===`css-animation`&&p.height===void 0&&p.width===void 0?h.current:p,ie=n&&T&&f.current!==`css-animation`,ae=te((e,t=!0)=>{t&&(h.current=e),m(e)}),oe=te(()=>{S.current?.(),S.current=null}),se=te(e=>{oe(),S.current=()=>{S.current=null,e()}}),O=te(()=>{s&&a&&f.current===`css-animation`&&(v.current=!0)});E(()=>{y&&u!==`starting`&&x(!1)},[y,u]),b.useEffect(()=>()=>{O(),oe()},[O,oe]),E(()=>{s||(_.current=!1,v.current=!1);let e=d.current;if(!e)return;!s&&S.current&&oe();let t=Is(e,D);if(f.current=t,s&&u===`idle`&&_.current&&t===`css-animation`){h.current=Fs(e);return}if(s&&u===`starting`){let n=g.current;if(g.current=!1,t===`none`){ae(Fs(e)),x(!0);return}if(t===`css-transition`){let t=zs(e);if(ae(Fs(e)),!n)return t;let r=Rs(e,`transition-duration`,`0s`);return se(r),x(!0),t}ae(Fs(e));let r=Rs(e,`animation-name`,`none`);if(!n){r();return}let i=Rs(e,`animation-duration`,`0s`);r(),se(i),x(!0);return}if(!s&&a&&(u===`idle`||u===`starting`)){if(t===`none`){ae(Ns,!1),c(!1);return}ae(Fs(e));return}if(u!==`ending`)return;if(t===`none`){c(!1);return}let n=Fs(e);n.height>0||n.width>0?(ae(n),t===`css-animation`&&Rs(e,`animation-name`,`none`)()):c(!1)},[a,s,oe,ae,c,se,D,u]),Ms({enabled:s&&a&&ne===`idle`,open:!0,ref:d,onComplete(){s&&ae(Ns,!1)}}),b.useEffect(()=>{if(s||!a||ne!==`ending`)return;if(!d.current){c(!1),ae(Ns,!1);return}let e=new AbortController,t=-1;function n(){C.current||(c(!1),ae(Ns,!1))}return t=$o.request(()=>{w(n,e.signal)}),()=>{$o.cancel(t),e.abort()}},[C,a,s,ne,w,ae,c]),E(()=>{let e=d.current;e&&n&&T&&e.setAttribute(`hidden`,`until-found`)},[T,n]),b.useEffect(function(){let e=d.current;if(!e)return;let t=Cs.create(),n=-1,r=(r,i)=>{t.start(0,()=>{C.current||(n=$o.request(()=>{C.current||(r&&(g.current=!1),i&&e.setAttribute(fs,``),e.setAttribute(`hidden`,`until-found`))}))})},i=xs(e,`beforematch`,t=>{let n=qo(Jo,t);if(o(!0,n),n.isCanceled){r(!1,!1);return}g.current=!0;let i=e.hasAttribute(fs);e.removeAttribute(fs),l(!0),r(!0,i)});return()=>{t.clear(),$o.cancel(n),i()}},[C,o,l]);let ce=i||n||a||s;return{height:re.height,props:{...ie?{[fs]:``}:void 0,hidden:T,id:r},ref:ee,shouldPreventOpenAnimation:D,shouldRender:ce,transitionStatus:ne,width:re.width}}function Fs(e){return{height:e.scrollHeight,width:e.scrollWidth}}function Is(e,t){let n=v(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&Ls(n.animationDuration),i=Ls(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function Ls(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function Rs(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{r===``?e.style.removeProperty(t):e.style.setProperty(t,r,i)}}function zs(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})}let r=$o.request(n);return()=>{$o.cancel(r),n()}}var Bs=`--collapsible-panel-height`,Vs=`--collapsible-panel-width`,Hs=b.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e,{defaultPanelId:l,mounted:u,onOpenChange:d,open:f,setMounted:p,setPanelIdState:m,setOpen:h,state:g,transitionStatus:_}=is(),v=r??!1,y=i??!1,b=o||void 0,x=b??l;E(()=>(m(e=>b??(e===null?void 0:e)),()=>{m(e=>e===b?null:e)}),[b,m]);let{height:S,props:ee,ref:C,shouldPreventOpenAnimation:w,shouldRender:te,transitionStatus:T,width:ne}=Ps({externalRef:t,hiddenUntilFound:v,id:x,keepMounted:y,mounted:u,onOpenChange:d,open:f,setMounted:p,setOpen:h,transitionStatus:_}),D={...g,transitionStatus:T},re=Pe(s,D),ie=Fe(`div`,{...e,style:void 0},{state:D,ref:C,props:[ee,{style:{[Bs]:S===void 0?`auto`:`${S}px`,[Vs]:ne===void 0?`auto`:`${ne}px`}},c,re?{style:re}:void 0,w?{style:{animationName:`none`}}:void 0],stateAttributesMapping:_s});return te?ie:null}),Us=(0,b.createContext)({});function Ws(e){let t=(0,b.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Gs=typeof window<`u`?b.useLayoutEffect:b.useEffect,Ks=(0,b.createContext)(null);function qs(e,t){e.indexOf(t)===-1&&e.push(t)}function Js(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var Ys=(e,t,n)=>n>t?t:n<e?e:n,Xs={},Zs=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Qs=e=>typeof e==`object`&&!!e,$s=e=>/^0[^.\s]+$/u.test(e);function ec(e){let t;return()=>(t===void 0&&(t=e()),t)}var tc=e=>e,nc=(...e)=>e.reduce((e,t)=>n=>t(e(n))),rc=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},ic=class{constructor(){this.subscriptions=[]}add(e){return qs(this.subscriptions,e),()=>this.remove(e)}remove(e){Js(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},ac=e=>e*1e3,oc=e=>e/1e3,sc=(e,t)=>t?1e3/t*e:0,cc=(e,t,n)=>e*(3*(1-e)*((1-e)*t+e*n)+e*e);function lc(e,t,n,r){return e===t&&n===r?tc:i=>{let a=0,o=1,s=i;for(let t=0;;t++){s>=a&&s<=o||(s=(a+o)/2);let r=cc(s,e,n)-i;if(r*r<1e-28||t===40)break;r>0?o=s:a=s,s-=r*1e-7/(cc(s+1e-7,e,n)-i-r)}return cc(s,t,r)}}var uc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,dc=e=>t=>1-e(1-t),fc=lc(.33,1.53,.69,.99),pc=dc(fc),mc=uc(pc),hc=e=>e>=1?1:(e*=2)<1?.5*pc(e):.5*(2-2**(-10*(e-1))),gc=e=>1-Math.sin(Math.acos(e)),_c=dc(gc),vc=uc(gc),yc=lc(.42,0,1,1),bc=lc(0,0,.58,1),xc=lc(.42,0,.58,1),Sc=e=>Array.isArray(e)&&typeof e[0]!=`number`,Cc=e=>Array.isArray(e)&&typeof e[0]==`number`,wc={linear:tc,easeIn:yc,easeInOut:xc,easeOut:bc,circIn:gc,circInOut:vc,circOut:_c,backIn:pc,backInOut:mc,backOut:fc,anticipate:hc},Tc=e=>typeof e==`string`,Ec=e=>{if(Cc(e)){let[t,n,r,i]=e;return lc(t,n,r,i)}return Tc(e)?wc[e]:e},Dc={delta:0,timestamp:0,isProcessing:!1},Oc;function kc(){Oc=void 0}var Ac={now:()=>(Oc===void 0&&Ac.set(Dc.isProcessing||Xs.useManualTiming?Dc.timestamp:performance.now()),Oc),set:e=>{Oc=e,queueMicrotask(kc)}},jc=e=>Math.round(e*1e5)/1e5,Mc=e=>t=>typeof t==`string`&&t.startsWith(e),Nc=Mc(`--`),Pc=Mc(`var(--`),Fc=e=>Pc(e)?Ic.test(e.split(`/*`)[0].trim()):!1,Ic=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Lc(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var Rc={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},zc={...Rc,transform:e=>Ys(0,1,e)},Bc={...Rc,default:1},Vc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Hc(e){return e==null}var Uc=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Wc=(e,t)=>n=>!!(typeof n==`string`&&Uc.test(n)&&n.startsWith(e)||t&&!Hc(n)&&Object.prototype.hasOwnProperty.call(n,t)),Gc=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Vc);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Kc=e=>Ys(0,255,e),qc={...Rc,transform:e=>Math.round(Kc(e))},Jc={test:Wc(`rgb`,`red`),parse:Gc(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+qc.transform(e)+`, `+qc.transform(t)+`, `+qc.transform(n)+`, `+jc(zc.transform(r))+`)`},Yc=(e,t,n)=>{let r=e.substring(1+t*n,1+(t+1)*n);return n>1?r:r+r};function Xc(e){let t=e.length>5?2:1,n=Yc(e,3,t);return{red:parseInt(Yc(e,0,t),16),green:parseInt(Yc(e,1,t),16),blue:parseInt(Yc(e,2,t),16),alpha:n?parseInt(n,16)/255:1}}var Zc={test:Wc(`#`),parse:Xc,transform:Jc.transform},Qc=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),$c=Qc(`deg`),el=Qc(`%`),K=Qc(`px`),tl=Qc(`vh`),nl=Qc(`vw`),rl={...el,parse:e=>el.parse(e)/100,transform:e=>el.transform(e*100)},il={test:Wc(`hsl`,`hue`),parse:Gc(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+el.transform(jc(t))+`, `+el.transform(jc(n))+`, `+jc(zc.transform(r))+`)`},al={test:e=>Jc.test(e)||Zc.test(e)||il.test(e),parse:e=>Jc.test(e)?Jc.parse(e):il.test(e)?il.parse(e):Zc.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Jc.transform(e):il.transform(e),getAnimatableNone:e=>{let t=al.parse(e);return t.alpha=0,al.transform(t)}},ol=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,sl=new RegExp(Vc.source),cl=new RegExp(ol.source,`i`);function ll(e){return isNaN(e)&&typeof e==`string`&&(sl.test(e)||cl.test(e))}var ul=`number`,dl=`color`,fl=`var`,pl=`var(`,ml="${}",hl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function gl(e){let t=e.toString();return sl.test(t)||cl.test(t)}function _l(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(hl,e=>(al.test(e)?(r.color.push(a),i.push(dl),n.push(al.parse(e))):e.startsWith(pl)?(r.var.push(a),i.push(fl),n.push(e)):(r.number.push(a),i.push(ul),n.push(parseFloat(e))),++a,ml)).split(ml),indexes:r,types:i}}function vl(e){return _l(e).values}function yl({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===ul?jc(r[a]):e===dl?al.transform(r[a]):r[a]}return i}}function bl(e){return yl(_l(e))}var xl=e=>typeof e==`number`?0:al.test(e)?al.getAnimatableNone(e):e,Sl=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:xl(e);function Cl(e){let t=_l(e);return yl(t)(t.values.map((e,n)=>Sl(e,t.split[n])))}var wl={test:ll,parse:vl,createTransformer:bl,getAnimatableNone:Cl};function Tl(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function El({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Tl(s,r,e+1/3),a=Tl(s,r,e),o=Tl(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Dl(e,t){return n=>n>0?t:e}var Ol=(e,t,n)=>e+(t-e)*n,kl=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Al=[Zc,Jc,il],jl=e=>Al.find(t=>t.test(e));function Ml(e){let t=jl(e);if(!t)return!1;let n=t.parse(e);return t===il&&(n=El(n)),n}var Nl=(e,t)=>{let n=Ml(e),r=Ml(t);if(!n||!r)return Dl(e,t);let i={...n};return e=>(i.red=kl(n.red,r.red,e),i.green=kl(n.green,r.green,e),i.blue=kl(n.blue,r.blue,e),i.alpha=Ol(n.alpha,r.alpha,e),Jc.transform(i))},Pl=new Set([`none`,`hidden`]);function Fl(e,t){return Pl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Il(e,t){return n=>Ol(e,t,n)}function Ll(e){return typeof e==`number`?Il:typeof e==`string`?Fc(e)?Dl:al.test(e)?Nl:Vl:Array.isArray(e)?Rl:typeof e==`object`?al.test(e)?Nl:zl:Dl}function Rl(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Ll(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function zl(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Ll(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Bl(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var Vl=(e,t)=>{let n=_l(e),r=_l(t);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?Pl.has(e)&&!r.values.length||Pl.has(t)&&!n.values.length?Fl(e,t):nc(Rl(Bl(n,r),r.values),yl(r)):Dl(e,t)},Hl=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Ul(e,t){let n=Hl.exec(e);if(!n)return;let r=Hl.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>jc(Ol(a,o,e))+i}function Wl(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Ol(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=Ul(e,t);if(n)return n}return Ll(e)(e,t)}var Gl=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function Kl(e){let t=new Set,n=new Set,r=!1,i=!1,a,o=new Set,s={delta:0,timestamp:0,isProcessing:!1};function c(t){o.has(t)&&(n.add(t),e()),(a=t)(s)}let l={schedule:(e,i=!1,s=!1)=>{let c=s&&r,l=c?t:n;return i&&o.add(e),c&&e!==a&&l.delete(e),l.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,r){i=!0;return}r=!0;let o=t;t=n,n=o,t.forEach(c),t.clear(),a=void 0,r=!1,i&&(i=!1,l.process(e))}};return l}var ql=40;function Jl(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=Gl.reduce((e,t)=>(e[t]=Kl(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=Xs.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,ql),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:Gl.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Gl.length;t++)o[Gl[t]].cancel(e)},state:n,steps:o}}var{schedule:Yl,cancel:Xl,steps:Zl}=Jl(typeof requestAnimationFrame<`u`?requestAnimationFrame:tc,!0,Dc),Ql=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>Yl.update(t,e),stop:()=>Xl(t),now:()=>Dc.isProcessing?Dc.timestamp:Ac.now()}},$l=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},eu=2e4;function tu(e,t=50,n=eu,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function nu(e,t=100,n){let{keyframes:r,velocity:i}=e,a=r&&r[r.length-1]-r[0],o=n({...e,velocity:i&&a?i*t/a:i,keyframes:[0,t]}),s=Math.min(tu(o),eu);return{type:`keyframes`,ease:e=>o.next(s*e).value/t,duration:oc(s)}}var q=100,ru=10,iu=1,au=800,ou=.3,su=.3,cu=.01,lu=2,uu=.005,du=.5,fu=.01,pu=10,mu=.05,hu=e=>e<0?1/Math.max(1+e,mu):Math.max(1-e,mu);function gu(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return yu(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function _u(e,t){return e*Math.sqrt(1-t*t)}var vu=12;function yu(e,t,n){let r=n;for(let n=1;n<vu;n++)r-=e(r)/t(r);return r}var bu=.001;function xu({duration:e=au,bounce:t=ou}){let n,r,i=hu(t);e=Ys(fu,pu,oc(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=_u(t,i),o=Math.exp(-r);return bu-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=_u(t*t,i);return(-n(t)+bu>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=yu(n,r,a),s=o*gu(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:ac(e)}}var Su=(e,t)=>(t?e>=0:e>0)&&e<1/0;function Cu(e,t){if(Su(e,t))return e}function wu(e){let t=Cu(e.stiffness),n=Cu(e.damping,!0),r=Cu(e.mass),i={...e,stiffness:t??q,damping:n??ru,mass:r??iu,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=hu(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*gu(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,xu(i)),i.isResolvedFromDuration=!0;Su(i.stiffness)&&Su(i.damping,!0)||(i.stiffness=q,i.damping=ru)}return i}function Tu(e=su,t=ou){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=wu({...n}),f=e=>d?0:-oc(e),p=s/(2*Math.sqrt(o*c)),m=oc(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity||0)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?cu:lu),g.restDelta=n.restDelta||(e?uu:du)};_();let v,y,b;if(p<1){let e=_u(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=e<1||d?1/0:300/e,i=(e,t)=>Math.exp(t>r?(h-e)*r-h*t:-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>ac(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=ac(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(tu(S),eu),t=$l(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}var Eu=Object.assign(Tu,{applyToOptions:e=>{let t=nu(e,100,Tu);return e.ease=t.ease,e.duration=ac(t.duration),e.type=`keyframes`,e}});function Du({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o?o(g):g;_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:e?_+t:d},b,x,S=e=>{p(f.value)&&(b=e,x=Eu({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function Ou(e,t,n){let r=[],i=n||Xs.mix||Wl,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=nc(Array.isArray(t)?t[n]||tc:t,a)),r.push(a)}return r}function ku(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Ou(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=rc(e[r],e[r+1],n);return s[r](i)};return n?t=>l(Ys(e[0],e[a-1],t)):l}function Au(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=rc(0,t,r);e.push(Ol(n,1,i))}}function ju(e){let t=[0];return Au(t,e.length-1),t}function Mu(e,t){return e.map(e=>e*t)}function Nu(e,t){return e.map(()=>t||xc).splice(0,e.length-1)}function Pu({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Sc(r)?r.map(Ec):Ec(r)||xc,a={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(i)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,o=n===r?void 0:(Xs.mix||Wl)(n,r);return{calculatedDuration:e,next:t=>(a.value=o?o(i(e>0?Ys(0,1,t/e):1)):r,a.done=t>=e,a)}}let o=ku(Mu(n&&n.length===t.length?n:ju(t),e),t,{ease:Array.isArray(i)?i:Nu(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Fu=5;function Iu(e,t,n){let r=Math.max(t-Fu,0);return sc(n-e(r),t-r)}function Lu(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):Iu(t=>e.next(t).value,t,e.next(t).value)}var Ru=e=>e!==null;function zu(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Ru),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Bu={decay:Du,inertia:Du,tween:Pu,keyframes:Pu,spring:Eu};function Vu(e){typeof e.type==`string`&&(e.type=Bu[e.type])}var Hu=40,Uu=(e,t)=>t-e>Hu&&!Xs.useManualTiming?t:e;function Wu(e,t){return{kind:e,animation:t,timestamp:Ac.now(),frameTimestamp:Dc.timestamp,frameIsProcessing:Dc.isProcessing}}function Gu(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...Wu(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function Ku(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Wu(`layout-animation-start`,e),node:t})}catch{}}var qu=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},Ju=e=>e/100,Yu=e=>Math.round(e*1e4)/1e4,Xu=class extends qu{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Ac.now()&&this.tick(Ac.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),Gu(this,this.options)}initAnimation(){let{options:e}=this;Vu(e);let{type:t=Pu,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Pu;s!==Pu&&typeof o[0]!=`number`&&(this.mixKeyframes=nc(Ju,Wl(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=tu(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){this.currentTime=this.holdTime??Math.round(e-this.startTime)*this.playbackSpeed}tick(e,t=!1){let{generator:n,totalDuration:r,calculatedDuration:i}=this;if(this.startTime===null)return n.next(0);let{delay:a=0,keyframes:o,type:s,onUpdate:c,finalKeyframe:l}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=Uu(this.startTime,e)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let u=this.currentTime-a*(this.playbackSpeed>=0?1:-1),d=this.playbackSpeed>=0?u<0:u>r;this.currentTime=Math.max(u,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let f=this.generate(this.currentTime,d),{done:p}=f;d||(p=this.playbackSpeed>=0?i<1/0?this.currentTime>=r:p:this.currentTime<=0);let m=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&p);return m&&s!==Du&&(f.value=zu(o,this.options,l,this.speed)),c&&c(f.value),m&&this.finish(),f}at(e){return this.holdTime??Yu((e-this.startTime)*this.playbackSpeed)}sampleAt(e,t){let{options:n,totalDuration:r}=this,i=this.at(e)-(n.delay||0);return i>=r&&n.type!==Du?zu(n.keyframes,n,t?void 0:n.finalKeyframe):this.generate(Math.max(i,0),i<0).value}generate(e,t){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o}=this,{keyframes:s,repeat:c,repeatType:l,repeatDelay:u}=this.options,d=e,f=n;if(c){let t=Math.min(e,r)/o,n=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),i===1&&n--,n=Math.min(n,c+1),n%2&&(l===`reverse`?(i=1-i,u&&(i-=u/o)):l===`mirror`&&(f=a)),d=Ys(0,1,i)*o}let p;return t?(this.delayState.value=s[0],p=this.delayState):p=f.next(d),i&&!t&&(p.value=i(p.value)),p}get duration(){return oc(this.calculatedDuration)}get iterationDuration(){return this.duration+oc(this.options.delay??0)}get time(){return oc(this.currentTime)}set time(e){e=ac(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return Lu(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Ac.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=oc(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Ql,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??(this.pendingStartTime=n):this.startTime=n-this.holdTime/(this.playbackSpeed||1),this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(Ac.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},Zu=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function J(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Vc)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Zu.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Qu=/\b([a-z-]*)\(.*?\)/gu,Y={...wl,getAnimatableNone:e=>{let t=e.match(Qu);return t?t.map(J).join(` `):e}},X={...wl,getAnimatableNone:e=>{let t=wl.parse(e);return wl.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Z={...Rc,transform:Math.round},$u={rotate:$c,pathRotation:$c,rotateX:$c,rotateY:$c,rotateZ:$c,scale:Bc,scaleX:Bc,scaleY:Bc,scaleZ:Bc,skew:$c,skewX:$c,skewY:$c,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:zc,originX:rl,originY:rl,originZ:K},ed={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,inset:K,insetBlock:K,insetBlockStart:K,insetBlockEnd:K,insetInline:K,insetInlineStart:K,insetInlineEnd:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,paddingBlock:K,paddingBlockStart:K,paddingBlockEnd:K,paddingInline:K,paddingInlineStart:K,paddingInlineEnd:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,marginBlock:K,marginBlockStart:K,marginBlockEnd:K,marginInline:K,marginInlineStart:K,marginInlineEnd:K,fontSize:K,backgroundPositionX:K,backgroundPositionY:K,...$u,zIndex:Z,fillOpacity:zc,strokeOpacity:zc,numOctaves:Z},td={...ed,color:al,backgroundColor:al,outlineColor:al,fill:al,stroke:al,borderColor:al,borderTopColor:al,borderRightColor:al,borderBottomColor:al,borderLeftColor:al,filter:Y,WebkitFilter:Y,mask:X,WebkitMask:X},nd=e=>td[e],rd=new Set([Y,X]);function id(e,t){let n=nd(e);return rd.has(n)||(n=wl),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function ad(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var od=e=>e*180/Math.PI,sd=e=>ld(od(Math.atan2(e[1],e[0]))),cd={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:sd,rotateZ:sd,skewX:e=>od(Math.atan(e[1])),skewY:e=>od(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ld=e=>(e%=360,e<0&&(e+=360),e),ud=sd,dd=e=>Math.hypot(e[0],e[1]),fd=e=>Math.hypot(e[4],e[5]),pd={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:dd,scaleY:fd,scaleZ:e=>Math.hypot(e[8],e[9],e[10]),scale:e=>(dd(e)+fd(e))/2,rotateX:e=>ld(od(Math.atan2(e[6],e[5]))),rotateY:e=>ld(od(Math.atan2(-e[2],e[0]))),rotateZ:ud,rotate:ud,skewX:e=>od(Math.atan(e[4])),skewY:e=>od(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function md(e){return+!!e.includes(`scale`)}function hd(e,t){if(!e||e===`none`)return md(t);let n=e.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return md(t);let r=(n[1]?pd:cd)[t],i=n[2].split(`,`).map(e=>parseFloat(e));return typeof r==`function`?r(i):i[r]}var gd=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return hd(n,t)},_d=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],vd=new Set([..._d,`pathRotation`]),yd=e=>e===Rc||e===K,bd=new Set([`x`,`y`,`z`]),xd=_d.filter(e=>!bd.has(e));function Sd(e){let t=[];return xd.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var Cd=new Set([`bottom`,`right`]);function wd(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var Td=({transform:e})=>hd(e,`x`),Ed=({transform:e})=>hd(e,`y`),Dd={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>wd(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>wd(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:Td,y:Ed,translateX:Td,translateY:Ed},Od=new Set,kd=!1,Ad=!1,jd=!1;function Md(){if(Ad){let e=[],t=new Set,n=new Set;Od.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),Cd.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=Sd(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Ad=!1,kd=!1,Od.forEach(e=>e.complete(jd)),Od.clear()}function Nd(){Od.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ad=!0)})}function Pd(){jd=!0,Nd(),Md(),jd=!1}function Fd(e,t,n){if(typeof e==`string`){if(Zs(e)||$s(e))return parseFloat(e);if(!wl.test(e)&&wl.test(n))return id(t,n)}return e??void 0}var Id=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Od.add(this),kd||(kd=!0,Yl.read(Nd),Yl.resolveKeyframes(Md))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=Fd(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}ad(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Od.delete(this)}cancel(){this.state===`scheduled`&&(Od.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Ld=e=>e.startsWith(`--`);function Rd(e,t,n){Ld(t)?e.style.setProperty(t,n):e.style[t]=n}var zd={};function Bd(e,t){let n=ec(e);return()=>zd[t]??n()}var Vd=Bd(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Hd=Bd(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Ud=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Wd={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Ud([0,.65,.55,1]),circOut:Ud([.55,0,1,.45]),backIn:Ud([.31,.01,.66,-.59]),backOut:Ud([.33,1.53,.69,.99])};function Gd(e,t){if(e)return typeof e==`function`?Hd()?$l(e,t):`ease-out`:Cc(e)?Ud(e):Array.isArray(e)?e.map(e=>Gd(e,t)||Wd.easeOut):Wd[e]}function Kd(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Gd(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function qd(e){return typeof e==`function`&&`applyToOptions`in e}function Jd({type:e,...t}){return qd(e)&&Hd()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Yd=class extends qu{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e;let c=Jd(e);this.animation=Kd(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=zu(r,this.options,o,this.speed);this.updateMotionValue?.(e),Rd(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},Gu(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){this.isStopped||(this.isStopped=!0,this.state!==`idle`&&this.finishedTime===null&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||(this.animation.onfinish=null,this.cancel())))}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return oc(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+oc(e)}get time(){return oc(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ac(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Vd()?(this.animation.timeline=e,t?.(this.animation),tc):n(this)}},Xd={anticipate:hc,backInOut:mc,circInOut:vc};function Zd(e){return e in Xd}function Qd(e){typeof e.ease==`string`&&Zd(e.ease)&&(e.ease=Xd[e.ease])}var $d=class extends Yd{constructor(e){Qd(e),Vu(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}elapsed(){return this.state===`running`?(Ac.now()-this.startTime)*this.speed:this.time*1e3}sample(e){if(!this.sampler){let{motionValue:e,onUpdate:t,onComplete:n,onPlay:r,onStop:i,element:a,...o}=this.options;this.sampler=new Xu({...o,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,e)).value}liveValue(){let{state:e}=this;if(e===`running`||e===`paused`)return this.sample(this.elapsed())}updateMotionValue(e){let{motionValue:t,element:n,name:r}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let{speed:i}=this,a=this.elapsed(),o=this.state===`running`&&i?Ys(0,10,a):0,s=this.sample(a);n&&r&&Rd(n,r,s),t.setWithVelocity(this.sample(a-o*Math.sign(i)),s,o/Math.abs(i||1))}},ef=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(wl.test(e)||e===`0`)&&!e.startsWith(`url(`));function tf(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function nf(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=ef(i,t),s=ef(a,t);return!o||!s?!1:tf(e)||(n===`spring`||qd(n))&&r}function rf(e){e.duration=0,e.type=`keyframes`}var af=new Set([`opacity`,`clipPath`,`filter`,`transform`]),of=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function sf(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&of.test(e[t]))return!0;return!1}var cf=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),lf=()=>!Xs.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,`animate`);function uf(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(af.has(n)||cf.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return lf()&&(af.has(n)||cf.has(n)&&sf(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var df=(e,t)=>t&&typeof e==`number`?t.transform(e):e,ff={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},pf=_d.length,mf={},hf=(e,t,n=df(t,$u[e]))=>(mf[e]||(mf[e]=(ff[e]||e)+`(`))+n+`)`,gf=(e,t)=>(typeof t==`number`?t:parseFloat(t))===+!!e.startsWith(`scale`);function _f(e,t,n){let r=``;for(let i=0;i<pf;i++){let a=_d[i],o=e[a];if(o===void 0)continue;let s=n&&(t[a]=df(o,ed[a]));gf(a,o)||(r+=hf(a,o,s||void 0)+` `)}let i=e.pathRotation;return i&&(r+=hf(`rotate`,i)),r=r.trim(),n?n(t,r):r||`none`}var vf=new WeakMap,yf=200,bf=.001,xf=.1,Sf=.001,Cf=100,wf=e=>/^(linear|ease(In|Out|InOut))$/.test(e),Tf=(e,t)=>e-t,Ef=(e,t,n)=>{let r=[];for(let i=0;i<=n;i++)r.push(Ol(e,t,i/n));return r},Df=e=>e.motionValue.owner,Of=e=>vf.get(e),kf=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get(),Af=({name:e,motionValue:t})=>e&&_d.includes(e)&&t?.owner?.current instanceof HTMLElement&&lf()&&Hd();function jf(e){let t=Df(e),{onUpdate:n,transformTemplate:r}=t.getProps();return!e.isHandoff&&!n&&!e.hasOnUpdate&&!r&&e.type!==`inertia`&&(kf(t,`transform`)||`none`)===`none`&&!kf(t,`pathRotation`)&&!t.projection?.isProjecting()}var Mf=class extends Xu{constructor(e){let t=Df(e).current,{driver:n=Ql}=e,r,i=jf(e);e.driver=e=>{let i=n(e);return{js:i,now:i.now,start:(e=!0)=>{let n=Of(t);!n||n.isJS?i.start(e):n.schedule(!1,!e)},stop:()=>{i.stop();let e=Of(t);e&&!e.isFinishing&&e.release(r)}}},super(e),r=this,this.canAccelerate=i;let{stop:a}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),a()}}get group(){return Of(Df(this.options).current)}get js(){return this.driver?.js}get name(){return this.options.name}timing(){let{startTime:e,speed:t,totalDuration:n}=this,{delay:r=0,repeatType:i}=this.options;return this.holdTime===null?n===1/0?[e+r/t,this.resolvedDuration*(i===`loop`?1:2)/t||1]:[e+(r+n)/t,0]:[1/0,0]}isAccelerated(){let{group:e,state:t}=this;return e?.tracks.has(this)&&!e.isJS&&this.canAccelerate&&(t===`running`||t===`paused`)}liveValue(){return this.isAccelerated()?this.sampleAt(Ac.now()):void 0}tween(){let{keyframes:e,type:t,ease:n,times:r,repeat:i,delay:a=0}=this.options,o=Cc(n)?Ud(n):wf(n)&&Wd[n];if(o&&!i&&!r&&e.length===2&&t===Pu&&this.holdTime===null){let e=this.startTime+a/this.speed;return[e,e+this.resolvedDuration/this.speed,o]}}boundaries(e,t){let{startTime:n,speed:r,resolvedDuration:i,options:a}=this,{delay:o=0,repeat:s=0,repeatDelay:c=0,repeatType:l,times:u,keyframes:d,type:f}=a,p=(f||Pu)===Pu?u||ju(d):[0,1],m=n+o/r,h=[];if(this.holdTime!==null||!(i>0))return h;for(let n=Math.max(0,Math.floor((e-m)*r/i));n<=s;n++){let a=m+n*i/r;if(a>t)break;for(let o of p){let s=a+(n%2&&l&&l!==`loop`?1-o:o)*(i-c)/r;s>e&&s<t&&h.push(s)}}return h}numberAt(e){return parseFloat(this.sampleAt(e,!0))}sync(){let e=Ac.now();this.options.motionValue.setWithVelocity(this.sampleAt(e-10,!0),this.sampleAt(e,!0),10)}play(){this.isStopped||((this.group||Nf(Df(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&(this.sync(),this.group.schedule(!1))}complete(){super.complete();let{group:e}=this;e&&!e.isJS&&this.canAccelerate&&this.tick(Ac.now())}get time(){return this.isAccelerated()?oc(Ys(0,this.totalDuration,this.at(Ac.now())-(this.options.delay||0))):super.time}set time(e){super.time=e,this.isAccelerated()&&this.sync()}attachTimeline(e){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(e)}};function Nf(e){let t=e.current,n=new Set,r=new Map,i={},a=[],o=new Map,s=[],c=!1,l=!1,u=!1,d=!1,f=-1/0,p=e=>{for(let t of n)if(t.name===e)return!0},m=(t,n)=>{let o={};for(let s of t===void 0?_d:a){let a=r.get(s),c=t===void 0?kf(e,s):a?a.sampleAt(n>t&&!a.timing()[1]?n:t):i[s];c!==void 0&&(o[s]=c)}return o},h=(e,t)=>{let n=``;for(let r in e){let i=e[r];t&&gf(r,i)||(n+=hf(r,i)+` `)}return(t?n.trim():n)||`none`},g=(e,t)=>h(m(e,t)),_=(e=m())=>{t.style.transform=h(e,!0)},v=(e=!0)=>{e&&_(),s.forEach(({animation:e})=>e.cancel()),s=[]},y=(e,n)=>new Animation(new KeyframeEffect(t,e,n)),b=(e,t,n=1/0)=>{let r={animation:e,offset:t,end:n};e.startTime=Ac.now()+t,n<1/0&&(e.onfinish=()=>{r.isDone=!0,s.some(e=>e.end===1/0)&&(e.cancel(),s=s.filter(e=>e!==r)),D.schedule(!1)}),e.oncancel=()=>s.includes(r)&&D.demote(),s.push(r)},x=(e,t,n)=>{let r=(t,n)=>Math.abs(e(n)-e(t)),i=r(t,n);for(;n-t>.01;){let e=(t+n)/2;r(t,e)>r(e,n)?n=e:t=e}return r(t,n)>i/2?[t,n]:[]},S=(e,t,n,r)=>{let i=Math.min(yf,Math.max(2,Math.ceil((n-t)/10)));if(r.length*4>i)return;let a=Ef(t,n,i).concat(r).sort(Tf),o=e=>rc(t,n,e),s,c;for(let t of e){let e=a.map(e=>t.numberAt(e)),[n]=e,r=e.map(e=>e-n),i=r[r.length-1],o=r.some(e=>Math.abs(e)*bf>Math.abs(i))?0:i,l=r.map(e=>o?e/o:e);if(!o){if(l.some(e=>!(Math.abs(e)<=bf)))return}else if(!s)s=l,c=e=>(t.numberAt(e)-n)/o;else if(l.some((e,t)=>!(Math.abs(e-s[t])<=bf)))return}if(!s||s.every((e,t)=>Math.abs(e-o(a[t]))<=bf))return`linear`;let l=[],u=(e,t=c(e))=>l.push(Yu(t)+` `+Yu(o(e)*100)+`%`);return s.forEach((e,t)=>{t&&Math.abs(e-s[t-1])>.2&&x(c,a[t-1],a[t]).forEach(e=>u(e)),u(a[t],e)}),`linear(`+l+`)`},ee=(e,t,n,r)=>{let i=[t],a=(t,n)=>e.every(e=>!(Math.abs(e.numberAt((t+n)/2)-(e.numberAt(t)+e.numberAt(n))/2)>(e.name.startsWith(`scale`)?Sf:xf))),o=(t,n,r)=>{if(n-t<1||a(t,n))i.push(n);else if(r<4)o(t,(t+n)/2,r+1),o((t+n)/2,n,r+1);else{for(let r of e)i.push(...x(e=>r.numberAt(e),t,n));i.push(n)}},s=Ef(t,n,Math.ceil((n-t)/100));for(let e of r)s.push(e,Math.min(e+.01,n));let c=t;for(let e of s.sort(Tf))e>c&&o(c,e,0),c=e;return i.sort(Tf)},C=e=>{let t;for(let n of e){let e=n.tween();if(!e||t?.some((t,n)=>n<2?Math.abs(e[n]-t)>1:e[n]!==t))return;t=e}return t},w=(e,t,n,r={fill:`both`},i,a)=>{let o=e.flatMap(e=>e.boundaries(t,n)),s=a||S(e,t,n,o),c=s?[t,n]:ee(e,t,n,o),l=c.map(e=>g(e,i)),u={transform:l};return s||(u.offset=c.map(e=>rc(t,n,e))),l.every(e=>e===l[0])&&(_(m(t,i)),u=null),y(u,{...r,duration:n-t,easing:s||`linear`})},te=t=>{let c=t,l=0,u=0,d=[],f=[],p=new Set;r.clear(),o=new Map;for(let e of n){r.set(e.name,e);let[n,i]=e.timing(),a=n===1/0;if(o.set(e,[e.at(t),e.speed,a]),a)e.sync();else{if(e.speed<0)return;if(i){if(l){let e=(n-u)/i;if(Math.abs(i-l)>1||Math.abs(e-Math.round(e))*l>1)return}else l=i,u=n;f.push(e)}else p.add(n);d.push(e),c=Math.max(c,n)}}i={},a=_d.filter(t=>{if(r.has(t))return!0;let n=i[t]=kf(e,t);return n!==void 0&&parseFloat(n)!==+!!t.startsWith(`scale`)}),v(!1);let m=!l&&C(d);try{if(m&&m[1]>t){let[e,n,r]=m;b(w(d,e,n,void 0,void 0,r),e-t,n-e)}else c>t&&(b(w(d,t,c),0,c-t),p.forEach(e=>e<c-1&&b(y(null,{duration:e-t}),0,e-t)));if(l){let e=u+Math.floor((c-u)/l)*l;b(w(f,e,e+l,{iterations:1/0,iterationStart:(c-e)/l,fill:`forwards`},c),c-t)}}catch{return}return s.length||v(),!0},T=e=>{let t,r=0;for(let i of n){let n=o.get(i);if(!n)return!1;let[a,s,c]=n,l=i.at(e),u=i.timing()[0]===1/0;if(c){if(u&&l===a)continue;return!1}let d=(l-a)/s,f=u?0:i.speed/s;if(t===void 0)t=d,r=f;else if(Math.abs(d-t)>1||f!==r)return!1}if(t===void 0)return!0;if(!s.length)return!1;for(let{offset:e,end:n,isDone:r}of s){let i=t-e;if(n<1/0&&(r?i<n-1:i<0||i>=n))return!1}for(let{animation:n,offset:i,isDone:a}of s){if(a)continue;let o=t-i;r&&n.updatePlaybackRate&&n.playState===`running`&&Math.abs(Number(n.currentTime)-o)<20?n.playbackRate!==r&&n.updatePlaybackRate(r):r?(n.playbackRate=r,n.startTime=e-o/r):(n.startTime=null,n.currentTime=o)}return!0},ne=()=>!n.size&&(u=!0,Of(t)===D&&vf.delete(t),D.isJS||v(),!0),E=()=>{let t=Ac.now();if(D.isJS||(D.isFinishing=!0,n.forEach(n=>{let[r,a]=n.timing();n.state===`running`&&n.speed>0&&!a&&r<=t+1&&(n.complete(),i[n.name]=kf(e,n.name),o.has(n)||(c=!0))}),D.isFinishing=!1),l=!1,u||(n.forEach(({state:e},t)=>{(e===`idle`||e===`finished`)&&n.delete(t)}),ne()))return;for(let e of n)if(!e.canAccelerate)return D.demote(!0);D.isJS&&(D.isJS=!1,c=!0,n.forEach(e=>e.js?.stop()));let r=c,a=d;if(c=d=!1,r||!T(t)){if(a){if(t-f<Cf)return D.demote();f=t}if(!te(t))return D.demote()}},D={tracks:n,isJS:!1,isFinishing:!1,schedule(e,t){u||(c||=e,d||=!!t,l||(l=!0,Dc.isProcessing?Yl.render(E,!1,!0):queueMicrotask(E)))},release(e){let{state:t}=e;(t===`idle`||t===`finished`)&&n.delete(e),ne()||D.schedule(!0)},check(){if(!D.isJS){for(let t in i)if(kf(e,t)!==i[t]&&!p(t))return D.schedule(!0,!0)}},demote(e){if(!(D.isJS||u))return n.forEach(t=>{t.isAccelerated()&&t.sync(),e||(t.canAccelerate=!1)}),D.isJS=!0,o=new Map,v(),n.forEach(e=>e.state===`running`&&e.js?.start()),!0}};return vf.set(t,D),D}var Pf=class extends qu{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ac.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||Id;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Ac.now();let u=nf(e,i,a,o);u||((Xs.instantAnimations||!s)&&l?.(zu(e,n,t)),e[0]=e[e.length-1],rf(n),n.repeat=0);let{onComplete:d}=n;n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{d?.(),this.notifyFinished()};let f=u&&!c&&uf(n),p=!f&&Af(n);r&&(f||p||this.resolvedAt!==this.createdAt)&&(n.startTime??=Uu(this.createdAt,this.resolvedAt));let m;if(f){n.element=n.motionValue?.owner?.current;try{m=new $d(n)}catch{m=new Xu(n)}}else m=p?new Mf(n):new Xu(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),Pd()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}};function Ff(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var If=30,Lf=e=>!isNaN(parseFloat(e)),Rf={current:void 0},zf=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Ac.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.dirty(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Ac.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Lf(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new ic)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new ic,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){Yl.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect?.()}dirty(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){(this.dependents||=new Set).add(e)}removeDependent(e){this.dependents?.delete(e)}get(){Rf.current?.push(this);let e=this.animation?.liveValue?.();return e===void 0?this.current:e}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){let e=Ac.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>If)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,If);return sc(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&(this.animation=void 0),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}};function Bf(e,t){return new zf(e,t)}function Vf(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Q(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Vf(n,e)}var Hf={type:`spring`,stiffness:500,damping:25,restSpeed:10},Uf=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Wf={type:`keyframes`,duration:.8},Gf={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Kf=(e,{keyframes:t})=>t.length>2?Wf:vd.has(e)?e.startsWith(`scale`)?Uf(t[1]):Hf:Gf,qf=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`,`out`]);function Jf(e){for(let t in e)if(!qf.has(t))return!0;return!1}var Yf=(e,t,n,r={},i,a)=>o=>{let s=Q(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=ac(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i,hasOnUpdate:!!s.onUpdate};Jf(s)||Object.assign(u,Kf(e,u)),u.duration&&=ac(u.duration),u.repeatDelay&&=ac(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(rf(u),u.delay===0&&(d=!0)),(Xs.instantAnimations||Xs.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,rf(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=zu(u.keyframes,s);if(e!==void 0){Yl.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Xu(u):new Pf(u)},Xf=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Zf(e){let t=Xf.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Qf(e,t,n=1){let[r,i]=Zf(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Zs(e)?parseFloat(e):e}return Fc(i)?Qf(i,t,n+1):i}function $f(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ep(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...$f(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function $(e,t,n){return ep(e.getProps(),t,n,e)}var tp=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,np=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,..._d]),rp=e=>Array.isArray(e);function ip(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Bf(n))}function ap(e){return rp(e)?e[e.length-1]||0:e}function op(e,t){let{transitionEnd:n={},transition:r={},...i}=$(e,t)||{};i={...i,...n};for(let t in i)ip(e,t,ap(i[t]))}var sp=e=>!!(e&&e.getVelocity);function cp(e){return!!(sp(e)&&e.add)}function lp(e,t){let n=e.getValue(`willChange`);if(cp(n))return n.add(t);if(!n&&Xs.WillChange){let n=new Xs.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}var up=`data-framer-appear-id`;function dp(e){return e.props[up]}var fp=typeof window<`u`;function pp({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function mp(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Vf(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&(p.animateValues?p.animateValues(t=>e.getValue(t,e.latestValues[t]??0),s,a,n,d):p.animateVisualElement?.(e,s,a,n,d));for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&pp(f,t))continue;let o={delay:n,...Q(f?.out[t]||a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){Yl.update(()=>r.set(i));continue}let p=!1;if(fp&&window.MotionHandoffAnimation){let n=dp(e);if(n){let e=window.MotionHandoffAnimation(n,t,Yl);e!==null&&(o.startTime=e,p=!0)}}lp(e,t);let m=l??e.shouldReduceMotion;r.start(Yf(t,r,i,m&&np.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>Yl.update(()=>{o&&op(e,o)});d.length?Promise.all(d).then(t):t()}return d}function hp(e,t,n={}){let r=$(e,t,tp(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?mp(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(hp(e,t,{...n,delay:r+(typeof o==`function`?0:o)+Ff(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function gp(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>hp(e,t,n))):typeof t==`string`?hp(e,t,n):Promise.all(mp(e,$(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var _p={test:e=>e===`auto`,parse:e=>e},vp=e=>t=>t.test(e),yp=[Rc,K,el,$c,nl,tl,_p],bp=e=>yp.find(vp(e));function xp(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||$s(e)}var Sp=new Set([`auto`,`none`,`0`]);function Cp(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Sp.has(t)&&gl(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=id(n,i))}var wp=class extends Id{constructor(){super(...arguments),this.isAsync=!0}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){let{unresolvedKeyframes:e,element:t,motionValue:n}=this,r=e[0]??n?.get();if(!t?.current||r===void 0)return!1;for(let t=0;t<e.length;t++)if(Lc(t?e[t]:r))return!1;return!0}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t?.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Fc(r))){let i=Qf(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!np.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=bp(r),o=bp(i);if(Lc(r)!==Lc(i)&&Dd[n])this.needsMeasurement=!0;else if(a!==o){if(yd(a)&&yd(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else Dd[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||xp(e[t]))&&n.push(t);n.length&&Cp(e,n,t)}measure(){let{element:e,name:t}=this;return Dd[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e?.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.resolveNoneKeyframes()}},Tp=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function Ep(e){return Qs(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function Dp(e){return Qs(e)&&`ownerSVGElement`in e}var Op={};function kp(e){return Op.current?.add(e),e}var Ap=e=>Op.current?Op.current.bind(e):e;function jp(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=t?t.current:Op.current?.root||document,i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}function Mp(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function Np(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(vd.has(e))o=!0;else if(Nc(e))i[e]=n;else{let t=df(n,ed[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=_f(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var Pp={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Fp={offset:`strokeDashoffset`,array:`strokeDasharray`};function Ip(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Pp:Fp;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Lp=[`transform`,`opacity`,`clipPath`,`filter`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Rp(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Np(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of Lp)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Ip(d,i,a,o,!1)}function zp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Bp({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Vp(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Hp(e){return e===void 0||e===1}function Up({scale:e,scaleX:t,scaleY:n}){return!Hp(e)||!Hp(t)||!Hp(n)}var Wp=[`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skewX`,`skewY`];function Gp(e){return Up(e)||qp(e)||Kp(e)}function Kp(e){return e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY}function qp(e){return Jp(e.x)||Jp(e.y)}function Jp(e){return e&&e!==`0%`}function Yp(e,t,n){return n+t*(e-n)}function Xp(e,t,n,r,i){return i!==void 0&&(e=Yp(e,i,r)),Yp(e,n,r)+t}function Zp(e,t=0,n=1,r,i){e.min=Xp(e.min,t,n,r,i),e.max=Xp(e.max,t,n,r,i)}function Qp(e,{x:t,y:n}){Zp(e.x,t.translate,t.scale,t.originPoint),Zp(e.y,n.translate,n.scale,n.originPoint)}var $p=.999999999999,em=1.0000000000001;function tm(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++)a=n[s],o=a.projectionDelta,a.options.visualElement?.props.style?.display!==`contents`&&(r===!0&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(nm(e.x,-a.scroll.offset.x),nm(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Qp(e,o)),r&&(r.path?.[s]||r)!==a&&Gp(a.latestValues)&&am(e,a.latestValues,a.layout?.layoutBox));t.x<em&&t.x>$p&&(t.x=1),t.y<em&&t.y>$p&&(t.y=1)}function nm(e,t){e.min+=t,e.max+=t}function rm(e,t,n,r,i=.5){Zp(e,t,n,Ol(e.min,e.max,i),r)}function im(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function am(e,t,n){let r=n??e;rm(e.x,im(t.x,r.x),t.scaleX,t.scale,t.originX),rm(e.y,im(t.y,r.y),t.scaleY,t.scale,t.originY)}function om(e,t){return zp(Vp(e.getBoundingClientRect(),t))}function sm(e,t,n){let r=om(e,n),{scroll:i}=t;return i&&(nm(r.x,i.offset.x),nm(r.y,i.offset.y)),r}var{schedule:cm,cancel:lm}=Jl(queueMicrotask,!1);function um(e,t,n){let r=sp(e)?e:Bf(e);return r.start(Yf(``,r,t,n)),r.animation}var dm={},fm={value:null,addProjectionMetrics:null};function pm(e,t){let n=Ac.now();e=Ap(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(Xl(r),e(a-t))};return Yl.setup(r,!0),kp(()=>Xl(r))}function mm(e){return Dp(e)&&e.tagName===`svg`}function hm(e){return sp(e)?e.get():e}var gm=e=>typeof e==`number`?e:parseFloat(e),_m=Tp.length,vm=e=>typeof e==`number`||K.test(e);function ym(e,t,n,r,i,a){i?(e.opacity=Ol(0,n.opacity??1,xm(r)),e.opacityExit=Ol(t.opacity??1,0,Sm(r))):a&&(e.opacity=Ol(t.opacity??1,n.opacity??1,r));for(let i=0;i<_m;i++){let a=Tp[i],o=bm(t,a),s=bm(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||vm(o)===vm(s)?(e[a]=Math.max(Ol(gm(o),gm(s),r),0),(el.test(s)||el.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<Wp.length;i++){let a=Wp[i];(t[a]||n[a])&&(e[a]=Ol(t[a]||0,n[a]||0,r))}}function bm(e,t){return e[t]===void 0?e.borderRadius:e[t]}var xm=Cm(0,.5,_c),Sm=Cm(.5,.95,tc);function Cm(e,t,n){return r=>r<e?0:r>t?1:n(rc(e,t,r))}function wm(e,t){e.min=t.min,e.max=t.max}function Tm(e,t){wm(e.x,t.x),wm(e.y,t.y)}function Em(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Dm=.9999,Om=1.0001,km=-.01,Am=.01;function jm(e){return e.max-e.min}function Mm(e,t,n){return Math.abs(e-t)<=n}function Nm(e,t,n,r=.5){e.origin=r,e.originPoint=Ol(t.min,t.max,e.origin),e.scale=jm(n)/jm(t),e.translate=Ol(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Dm&&e.scale<=Om||isNaN(e.scale))&&(e.scale=1),(e.translate>=km&&e.translate<=Am||isNaN(e.translate))&&(e.translate=0)}function Pm(e,t,n,r){Nm(e.x,t.x,n.x,r?.originX),Nm(e.y,t.y,n.y,r?.originY)}function Fm(e,t,n,r=0){e.min=(r?Ol(n.min,n.max,r):n.min)+t.min,e.max=e.min+jm(t)}function Im(e,t,n,r){Fm(e.x,t.x,n.x,r?.x),Fm(e.y,t.y,n.y,r?.y)}function Lm(e,t,n,r=0){let i=r?Ol(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+jm(t)}function Rm(e,t,n,r){Lm(e.x,t.x,n.x,r?.x),Lm(e.y,t.y,n.y,r?.y)}function zm(e,t,n,r,i){return e-=t,e=Yp(e,1/n,r),i!==void 0&&(e=Yp(e,1/i,r)),e}function Bm(e,t=0,n=1,r=.5,i,a=e,o=e){if(el.test(t)&&(t=parseFloat(t),t=Ol(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Ol(a.min,a.max,r);e===a&&(s-=t),e.min=zm(e.min,t,n,s,i),e.max=zm(e.max,t,n,s,i)}function Vm(e,t,[n,r,i],a,o){Bm(e,t[n],t[r],t[i],t.scale,a,o)}var Hm=[`x`,`scaleX`,`originX`],Um=[`y`,`scaleY`,`originY`];function Wm(e,t,n,r){Vm(e.x,t,Hm,n?.x,r?.x),Vm(e.y,t,Um,n?.y,r?.y)}var Gm=()=>({translate:0,scale:1,origin:0,originPoint:0}),Km=()=>({x:Gm(),y:Gm()}),qm=()=>({min:0,max:0}),Jm=()=>({x:qm(),y:qm()});function Ym(e){return e.translate===0&&e.scale===1}function Xm(e){return Ym(e.x)&&Ym(e.y)}function Zm(e,t){return e.min===t.min&&e.max===t.max}function Qm(e,t){return Zm(e.x,t.x)&&Zm(e.y,t.y)}function $m(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function eh(e,t){return $m(e.x,t.x)&&$m(e.y,t.y)}function th(e){return jm(e.x)/jm(e.y)}function nh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var rh=class{constructor(){this.members=[]}add(e){qs(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(Js(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Js(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};function ih(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var ah={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(K.test(e))e=parseFloat(e);else return e}return`${ih(e,t.target.x)}% ${ih(e,t.target.y)}%`}},oh={borderRadius:Object.assign({},ah,{applyTo:Tp.slice()}),borderTopLeftRadius:ah,borderTopRightRadius:ah,borderBottomLeftRadius:ah,borderBottomRightRadius:ah,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=wl.parse(e);if(i.length>5)return r;let a=wl.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Ol(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}}};function sh(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e}=n;e&&(r=`perspective(${e}px) ${r}`);for(let e=0;e<Wp.length;e++){let t=Wp[e],i=n[t];i&&(r+=`${t}(${i}deg) `),!e&&n.pathRotation&&(r+=`rotate(${n.pathRotation}deg) `)}}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}function ch(e){return[e(`x`),e(`y`)]}var lh=(e,t)=>e.depth-t.depth,uh=class{constructor(){this.children=[],this.isDirty=!1}add(e){qs(this.children,e),this.isDirty=!0}remove(e){Js(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(lh),this.isDirty=!1,this.children.forEach(e)}},dh={hasAnimatedSinceResize:!0,hasEverUpdated:!1},fh={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},ph=[`z`,`skew`,`skewZ`],mh=1e3,hh=0;function gh(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var _h=e=>e.instance&&vf.get(e.instance)?.demote()&&e.resetSkewAndRotation();function vh(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=dp(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,Yl,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&vh(r)}function yh({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(dm,{...oh,...dm}),class{constructor(e={},n=t?.()){this.id=hh++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,fm.value&&(fh.nodes=fh.calculatedTargetDeltas=fh.calculatedProjections=0),this.nodes.forEach(Sh),this.nodes.forEach(Nh),this.nodes.forEach(Ph),this.nodes.forEach(Ch),fm.addProjectionMetrics&&fm.addProjectionMetrics(fh)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new uh)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ic),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){this.eventHandlers.get(e)?.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Dp(t)&&!mm(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;Yl.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n?.(),n=pm(i,250),dh.hasAnimatedSinceResize&&(dh.hasAnimatedSinceResize=!1,this.nodes.forEach(Mh)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:e,layout:t,visualElement:n,animate:r}=this.options;this.instance&&!this.hasLayoutListener&&r!==!1&&n&&(e||t)&&(this.hasLayoutListener=!0,this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:i})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||n.getDefaultTransition()||Bh,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!eh(this.targetLayout,i),l=!t&&r;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Q(a,`layout`),onPlay:o,onComplete:s};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||Mh(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,Xl(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(Fh),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete?.();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&vh(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;_h(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,_h(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Eh),this.nodes.forEach(Th);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Dh);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(kh),this.nodes.forEach(Ah),this.nodes.forEach(jh),this.nodes.forEach(bh),this.nodes.forEach(xh)):this.nodes.forEach(Dh),this.clearAllSnapshots();let e=Ac.now();Dc.delta=Ys(0,1e3/60,e-Dc.timestamp),Dc.timestamp=e,Dc.isProcessing=!0,Zl.update.process(Dc),Zl.preRender.process(Dc),Zl.render.process(Dc),Dc.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,cm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(wh),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Yl.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Yl.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!jm(this.snapshot.measuredBox.x)&&!jm(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=Jm(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t?.notify(`LayoutMeasure`,this.layout.layoutBox,e?.layoutBox)}updateScroll(e=`measure`){let{scroll:t,instance:i}=this,{animationId:a}=this.root;if(this.options.layoutScroll&&i&&!(t&&t.animationId===a&&t.phase===e)){let o=r(i);this.scroll={animationId:a,phase:e,isRoot:o,offset:n(i),wasRoot:t?t.isRoot:o}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&_h(this);let t=this.projectionDelta&&!Xm(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Gp(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Wh(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Jm();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(qh))){let{scroll:e}=this.root;e&&(nm(t.x,e.offset.x),nm(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Jm();if(Tm(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Tm(t,e),nm(t.x,i.offset.x),nm(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r,i=0){let a=n||Jm();Tm(a,e);for(let e=i;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(nm(a.x,-n.scroll.offset.x),nm(a.y,-n.scroll.offset.y)),Gp(n.latestValues)&&am(a,n.latestValues,n.layout?.layoutBox)}return!r&&Gp(this.latestValues)&&am(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(e){let t=Jm();Tm(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Gp(n.latestValues))continue;let r;n.instance&&(Up(n.latestValues)&&n.updateSnapshot(),r=Jm(),Tm(r,n.measurePageBox())),Wm(t,n.latestValues,n.snapshot?.layoutBox,r)}return Gp(this.latestValues)&&Wm(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Dc.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=Dc.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=Jm(),this.targetWithTransforms=Jm()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Im(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):Tm(this.target,this.layout.layoutBox),Qp(this.target,this.targetDelta)):Tm(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&(!a.resumingFrom==!this.resumingFrom||a.options.layoutRoot&&!a.resumingFrom)&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),fm.value&&fh.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Up(this.parent.latestValues)||qp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Jm(),this.relativeTargetOrigin=Jm(),Rm(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Tm(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Dc.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Tm(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;tm(this.layoutCorrected,this.treeScale,this.path,t&&(e.relativeTarget&&!e.relativeParent.resumingFrom?e.relativeParent:!0)),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Jm());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Em(this.prevProjectionDelta.x,this.projectionDelta.x),Em(this.prevProjectionDelta.y,this.projectionDelta.y)),Pm(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&nh(this.projectionDelta.x,this.prevProjectionDelta.x)&&nh(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),fm.value&&fh.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){this.options.visualElement?.scheduleRender(),e&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Km(),this.projectionDelta=Km(),this.projectionDeltaWithTransform=Km()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Km();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=Jm(),c=r?.source!==this.layout?.source,l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(zh));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);Ih(o.x,e.x,n),Ih(o.y,e.y,n),r&&(o.x.translate=r.x,o.y.translate=r.y),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rm(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Rh(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Qm(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=Jm(),Tm(f,this.relativeTarget)),c&&(this.animationValues=a,ym(a,i,this.latestValues,n,d,u)),r?.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(Xl(this.pendingAnimation),void 0),this.pendingAnimation=Yl.update(()=>{dh.hasAnimatedSinceResize=!0,this.motionValue||=Bf(0),this.motionValue.jump(0,!1),this.currentAnimation=um(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),Ku(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta?.(mh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&Kh(this.options.animationType,this.layout.layoutBox,n.layoutBox)){let{layoutBox:e}=this.layout,t=i;i=this.target||Jm(),Gh(i.x,t.x,e.x),Gh(i.y,t.y,e.y)}Tm(t,i),am(t,r),Pm(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new rh),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let{latestValues:t}=e;if(!Kp(t))return;let n={};for(let t=0;t<ph.length;t++)gh(ph[t],e,n,this.animationValues);for(let t=0;t<Wp.length;t++)gh(Wp[t],e,n,this.animationValues);e.render();for(let t in n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;let n=this.getLead();if(!this.isVisible&&n!==this){e.visibility=`hidden`;return}let r=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=hm(t?.pointerEvents)||``,e.transform=r?r(this.latestValues,``):`none`;return}if(!this.projectionDelta||!this.layout||!n.target){(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,e.visibility=``,e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=hm(t?.pointerEvents)||``),this.hasProjected&&!Gp(this.latestValues)&&(e.transform=r?r({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=sh(this.projectionDeltaWithTransform,this.treeScale,i);r&&(a=r(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=n.animationValues?n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:n===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in dm){if(i[t]===void 0)continue;let{correct:r,applyTo:o,isCSSVariable:s}=dm[t],c=a===`none`?i[t]:r(i[t],n);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=n===this?hm(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Th),this.root.sharedNodes.clear()}}}function bh(e){e.updateLayout(),Oh(e)}function xh(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source,o=(r,a)=>{if(i===`size`)ch(e=>{let t=jm(r[e]);r[e].min=a[e].min,r[e].max=r[e].min+t});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;wm(r[e],a[e])}else Kh(i,t.layoutBox,n)&&ch(t=>{let n=jm(a[t]);r[t].max=r[t].min+n,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[t].max=e.relativeTarget[t].min+n)})},s=a?t.measuredBox:t.layoutBox;o(s,n);let c=Km();Pm(c,n,t.layoutBox);let l=Km();Pm(l,a?e.applyTransform(r,!0):n,s);let u=!Xm(c),d=!1,f=e.getClosestProjectingParent();if((!e.resumeFrom||f?.options.layoutRoot&&e.resumeFrom.path.includes(f))&&f&&!f.resumeFrom){let{snapshot:r,layout:i}=f;if(r&&i){let s=e.options.layoutAnchor||void 0,c=Jm();Rm(c,a?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,f.depth+1):t.layoutBox,r.layoutBox,s);let l=Jm();Rm(l,n,i.layoutBox,s),a&&o(c,l),eh(c,l)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=c,e.relativeParent=f)}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else e.isLead()&&e.options.onExitComplete?.();e.options.transition=void 0}function Sh(e){fm.value&&fh.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Ch(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function wh(e){e.clearSnapshot()}function Th(e){e.clearMeasurements()}function Eh(e){e.isLayoutDirty=!0,e.updateLayout()}function Dh(e){e.isLayoutDirty=!1}function Oh(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;ch(e=>nm(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function kh(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function Ah(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function jh(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Mh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Nh(e){e.resolveTargetDelta()}function Ph(e){e.calcProjection()}function Fh(e){e.resetSkewAndRotation()}function Ih(e,t,n){e.translate=Ol(t.translate,0,n),e.scale=Ol(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Lh(e,t,n,r){e.min=Ol(t.min,n.min,r),e.max=Ol(t.max,n.max,r)}function Rh(e,t,n,r){Lh(e.x,t.x,n.x,r),Lh(e.y,t.y,n.y,r)}function zh(e){return e.animationValues?.opacityExit!==void 0}var Bh={duration:.45,ease:[.4,0,.1,1]},Vh=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Hh=Vh(`applewebkit/`)&&!Vh(`chrome/`)?Math.round:tc;function Uh(e){e.min=Hh(e.min),e.max=Hh(e.max)}function Wh(e){Uh(e.x),Uh(e.y)}function Gh(e,t,n){e.max=jm(n)+(e.min=t.min)}function Kh(e,t,n){return e===`position`||e===`preserve-aspect`&&!Mm(th(t),th(n),.2)}function qh(e){return e!==e.root&&e.scroll?.wasRoot}function Jh(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var Yh=yh({attachResizeListener:(e,t)=>Jh(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Xh={current:void 0},Zh=yh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xh.current){let e=new Yh({});e.mount(window),e.setOptions({layoutScroll:!0}),Xh.current=e}return Xh.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Qh=new WeakMap;function $h(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function eg(e){return typeof e==`string`||Array.isArray(e)}var tg=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],ng=[`initial`].concat(tg);function rg(e){if($h(e.animate))return!0;for(let t=0;t<ng.length;t++)if(eg(e[ng[t]]))return!0;return!1}function ig(e){return!!(rg(e)||e.variants)}function ag(e,t,n){for(let r in t){let i=t[r],a=n[r];if(sp(i))e.addValue(r,i);else if(sp(a))e.addValue(r,Bf(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Bf(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var og={current:null},sg={current:!1},cg=typeof window<`u`;function lg(){if(sg.current=!0,cg){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>og.current=e.matches;e.addEventListener(`change`,t),t()}else og.current=!1}}var ug=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],dg={};function fg(e){dg=e}function pg(){return dg}var mg=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Id,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=Ac.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Yl.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=rg(t),this.isVariantNode=ig(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&sp(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,Qh.set(e,this),this.projection?.instance||this.projection?.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(sg.current||lg(),this.shouldReduceMotion=og.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),Xl(this.notifyUpdate),Xl(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),(this.enteringChildren||=new Set).add(e)}removeChild(e){this.children.delete(e),this.enteringChildren?.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.get(e)?.(),t.accelerate&&af.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Yd({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:ac(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=vd.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&Yl.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),vf.get(this.current)?.check()),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i?.()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in dg){let t=dg[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Jm()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){let{transformTemplate:n,onUpdate:r}=this.props;(e.transformTemplate||n)&&this.scheduleRender(),(e.transformTemplate&&!n||e.onUpdate&&!r)&&vf.get(this.current)?.demote(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ug.length;t++){let n=ug[t];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=ag(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(e){return this.props.variants?.[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e),this.valueSubscriptions.get(e)?.(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){let n=this.props.values?.[e];return n||(n=this.values.get(e),n===void 0&&t!==void 0&&(n=Bf(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n)}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Zs(n)||$s(n))?n=parseFloat(n):typeof n!=`number`&&!wl.test(n)&&wl.test(t)&&(n=id(e,t)),this.setBaseTarget(e,sp(n)?n.get():n)),sp(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return(this.events[e]||(this.events[e]=new ic)).add(t)}notify(e,...t){this.events[e]?.notify(...t)}scheduleRenderMicrotask(){cm.render(this.render)}},hg=class extends mg{constructor(){super(...arguments),this.KeyframeResolver=wp}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;sp(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function gg(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function _g(e,{layout:t,layoutId:n}){return vd.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!dm[e]||e===`opacity`)}function vg(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(sp(r[t])||i&&sp(i[t])||_g(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function yg(e){return window.getComputedStyle(e)}var bg=class extends hg{constructor(){super(...arguments),this.type=`html`,this.renderInstance=gg}mount(e){super.mount(e)}readValueFromInstance(e,t){if(vd.has(t))return this.projection?.isProjecting?md(t):gd(e,t);{let n=yg(e),r=(Nc(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return om(e,t)}build(e,t,n){Np(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return vg(e,t,n)}},xg=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function Sg(e){return{point:{x:e.pageX,y:e.pageY}}}var Cg=e=>t=>xg(t)&&e(t,Sg(t));function wg(e,t,n,r){return Jh(e,t,Cg(n),r)}var Tg=new WeakMap,Eg,Dg=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Dp(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Og=Dg(`inline`,`width`,`offsetWidth`),kg=Dg(`block`,`height`,`offsetHeight`);function Ag({target:e,borderBoxSize:t}){Tg.get(e)?.forEach(n=>{n(e,{get width(){return Og(e,t)},get height(){return kg(e,t)}})})}function jg(e){e.forEach(Ag)}function Mg(){typeof ResizeObserver<`u`&&(Eg=new ResizeObserver(jg))}function Ng(e,t){Eg||Mg();let n=jp(e);return n.forEach(e=>{let n=Tg.get(e);n||(n=new Set,Tg.set(e,n)),n.add(t),Eg?.observe(e)}),()=>{n.forEach(e=>{let n=Tg.get(e);n?.delete(t),n?.size||Eg?.unobserve(e)})}}var Pg=new Set,Fg;function Ig(){Fg=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Pg.forEach(t=>t(e))},window.addEventListener(`resize`,Fg)}function Lg(e){return Pg.add(e),Fg||Ig(),()=>{Pg.delete(e),!Pg.size&&typeof Fg==`function`&&(window.removeEventListener(`resize`,Fg),Fg=void 0)}}function Rg(e,t){return kp(typeof e==`function`?Lg(e):Ng(e,t))}var zg=(e,t)=>Math.abs(e-t);function Bg(e,t){let n=zg(e.x,t.x),r=zg(e.y,t.y);return Math.sqrt(n**2+r**2)}var Vg=new Set([`auto`,`scroll`]),Hg=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Wg(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Kg(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Bg(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:Ac.now()});let{onStart:i,onMove:a}=this.handlers;t||(i?.(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a?.(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.handleScroll(window),this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Wg(t,this.transformPagePoint),this.hasPendingMove=!0,Yl.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Kg(e.type===`pointercancel`?this.lastMoveEventInfo:Wg(t,this.transformPagePoint),this.history);this.startEvent&&n?.(e,a),r?.(e,a)},!xg(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=Wg(Sg(e),this.transformPagePoint),{point:c}=s;this.history=[{...c,timestamp:Ac.now()}];let{onSessionStart:l}=t;l&&l(e,Kg(s,this.history));let u={passive:!0,capture:!0};this.removeListeners=nc(wg(this.contextWindow,`pointermove`,this.handlePointerMove,u),wg(this.contextWindow,`pointerup`,this.handlePointerUp,u),wg(this.contextWindow,`pointercancel`,this.handlePointerUp,u)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Vg.has(e.overflowX)||Vg.has(e.overflowY))&&this.scrollPositions.set(t,Ug(t)),t=t.parentElement}this.scrollPositions.set(window,Ug(window)),this.removeScrollListeners=nc(Jh(window,`scroll`,this.onElementScroll,{capture:!0}),Jh(window,`scroll`,this.onWindowScroll,{}))}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=Ug(e),i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),Yl.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),Xl(this.updatePoint)}},Ug=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function Wg(e,t){return t?{point:t(e.point)}:e}function Gg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Kg({point:e},t){return{point:e,delta:Gg(e,Jg(t)),offset:Gg(e,qg(t)),velocity:Yg(t,.1)}}function qg(e){return e[0]}function Jg(e){return e[e.length-1]}function Yg(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Jg(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ac(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>ac(t)*2&&(r=e[1]);let a=oc(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var Xg=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Zg(e){return Xg.has(e.tagName)||e.isContentEditable===!0}var Qg=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function $g(e){return Qg.has(e.tagName)||e.isContentEditable===!0}var e_={x:!1,y:!1};function t_(){return e_.x||e_.y}function n_(e){return e===`x`||e===`y`?e_[e]?null:(e_[e]=!0,()=>{e_[e]=!1}):e_.x||e_.y?null:(e_.x=e_.y=!0,()=>{e_.x=e_.y=!1})}function r_(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ol(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ol(n,e,r.max):Math.min(e,n)),e}function i_(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function a_(e,{top:t,left:n,bottom:r,right:i}){return{x:i_(e.x,n,i),y:i_(e.y,t,r)}}function o_(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function s_(e,t){return{x:o_(e.x,t.x),y:o_(e.y,t.y)}}function c_(e,t){let n=.5,r=jm(e),i=jm(t);return i>r?n=rc(t.min,t.max-r,e.min):r>i&&(n=rc(e.min,e.max-i,t.min)),Ys(0,1,n)}function l_(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var u_=.35;function d_(e=u_){return e===!1?e=0:e===!0&&(e=u_),{x:f_(e,`left`,`right`),y:f_(e,`top`,`bottom`)}}function f_(e,t,n){return{min:p_(e,t),max:p_(e,n)}}function p_(e,t){return typeof e==`number`?e:e[t]||0}function m_(e){let t=``;for(let n of e.path){n.scroll=void 0,n.updateScroll();let{scroll:r}=n;n!==e.root&&r&&(t+=r.offset.x+`,`+r.offset.y+`,`)}return t}var h_=new WeakMap,g_=class{constructor(e,t=()=>e.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Jm(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e,this.readProps=t}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){if(this.visualElement.presenceContext?.isPresent===!1)return;let r=e=>{t&&this.snapToCursor(e),this.stopAnimation()},i=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock?.(),this.openDragLock=n_(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();let{projection:a}=this.visualElement;a&&(a.isAnimationBlocked=!0,a.target=void 0),ch(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Fc(t)&&(t=Qf(t,this.visualElement.current)||0),K.test(t))t=parseFloat(t);else if(el.test(t)){let n=a?.layout?.layoutBox[e];n&&(t=jm(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),i&&Yl.update(()=>i(e,t),!1,!0),lp(this.visualElement,`transform`),this.visualElement.animationState?.setActive(`whileDrag`,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){if(this.currentDirection=S_(o),this.currentDirection===null)return;i&&i(this.currentDirection)}this.updateAxis(`x`,o),this.updateAxis(`y`,o),this.visualElement.render(),a&&Yl.update(()=>a(e,t),!1,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},s=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new Hg(e,{onSessionStart:r,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:n,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(e,t,n){let r=e||this.latestPointerEvent,i=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;let{velocity:o}=i;this.startAnimation(o,n);let{onDragEnd:s}=this.getProps();s&&Yl.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t?.setActive(`whileDrag`,!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(e,t){let{drag:n}=this.readProps();if(!t||!x_(e,n,this.currentDirection))return;let r=this.getAxisMotionValue(e),i=this.originPoint[e]+t[e],a=this.constraints&&this.constraints[e];a&&(i=r_(i,a,this.elastic[e])),r.set(i)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{projection:n}=this.visualElement,r=n&&(n.layout||n.measure(!1)),i=this.constraints;__(e)?this.constraints&&this.scroll===m_(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=e&&r?a_(r.layoutBox,e):!1,this.elastic=d_(t),i!==this.constraints&&!__(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&ch(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=l_(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!__(e))return!1;let n=v_(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=m_(r);let i=sm(n,r.root,this.visualElement.getTransformPagePoint()),a=s_(r.layout.layoutBox,r.removeElementScroll(i));if(t){let e=t(Bp(a));this.hasMutatedConstraints=!!e,e&&(a=zp(e))}return a}startAnimation(e,t){let{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=ch(s=>{if(!x_(s,t||n,this.currentDirection))return;let l=c[s]||{};(o===!0||o===s)&&(l={min:0,max:0});let u=i?200:1e6,d=i?40:1e7,f={type:`inertia`,velocity:r?e[s]:0,bounceStiffness:u,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(s,f)});return Promise.all(l).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return lp(this.visualElement,e),n.start(Yf(e,n,0,t,this.visualElement,!1))}stopAnimation(){ch(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.readProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();ch(e=>{if(!x_(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-Ol(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!__(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};ch(e=>{let t=this.getAxisMotionValue(e).get();i[e]=c_({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),ch(t=>{let n=this.getAxisMotionValue(t);if(!x_(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(Ol(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;h_.set(this.visualElement,this);let e=this.visualElement.current,t=wg(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&$g(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=__(t)&&v_(t);r&&(this.constraints=this.resolveRefConstraints(),n||=b_(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i.layout||(i.root?.updateScroll(),i.updateLayout()),Yl.read(r);let o=Jh(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(ch(t=>{if(!x_(t,this.getProps().drag,this.currentDirection))return;let n=this.getAxisMotionValue(t);this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate)}),this.visualElement.render())}));return()=>{o(),t(),a(),s(),n?.()}}getProps(){let e=this.readProps(),{dragElastic:t=u_,dragMomentum:n=!0}=e;return{...e,dragElastic:t,dragMomentum:n}}};function __(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var v_=e=>`current`in e?e.current:e;function y_(e){let t=!0;return()=>{t?t=!1:e()}}function b_(e,t,n){let r=Rg(e,y_(n)),i=Rg(t,y_(n));return()=>{r(),i()}}function x_(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function S_(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function C_(e,t){let n=jp(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},kp(()=>r.abort())]}function w_(e){return!(e.pointerType===`touch`||t_())}function T_(e,t,n={}){t=Ap(t);let[r,i,a]=C_(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!w_(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var E_=(e,t)=>t?e===t||E_(e,t.parentElement):!1,D_=new WeakSet;function O_(e){return t=>{t.key===`Enter`&&e(t)}}function k_(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var A_=(e,t)=>{let n=!1,r=O_(()=>{D_.has(e)||(n=!0,k_(e,`down`))}),i=O_(()=>{n&&(n=!1,k_(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&k_(e,`cancel`)},{...t,once:!0})};function j_(e){return xg(e)&&!t_()}var M_=new WeakSet;function N_(e,t,n={}){t=Ap(t);let[r,i,a]=C_(e,n),o=e=>{let r=e.currentTarget;if(!j_(e)||M_.has(e))return;D_.add(r),n.stopPropagation&&M_.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),D_.has(r)&&D_.delete(r),j_(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||E_(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Ep(e)&&(e.addEventListener(`focus`,()=>A_(e,i),i),!Zg(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var P_=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},F_=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),I_=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function L_(e,t,n,r){gg(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(F_.has(n)?n:Mp(n),t.attrs[n])}function R_(e,t,n){let r=vg(e,t,n);for(let n in e)if(n!==`children`&&(sp(e[n])||sp(t[n]))){let t=_d.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var z_=class extends hg{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Jm}getBaseTargetFromProps(e,t){return vd.has(t)?super.getBaseTargetFromProps(e,t)??md(t):e[t]}getDefaultValue(e){return vd.has(e)?this.latestValues[e]??md(e):void 0}readValueFromInstance(e,t){if(vd.has(t)){let e=nd(t);return e&&e.default||0}if(Lp.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=F_.has(t)?t:Mp(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return R_(e,t,n)}build(e,t,n){Rp(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){L_(e,t,n,r)}mount(e){this.isSVGTag=I_(e.tagName),super.mount(e)}};function B_(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var V_=[...tg].reverse(),H_=e=>e?.out===!0?e:e?.out;function U_(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>gp(e,t,n))),n=G_(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,{initial:l}=o,u=r||i,d=[],f=(t=l)=>typeof t!=`boolean`&&$(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom)||void 0,p=new Map,m={},h=1/0,g=e;do g=g.props.inherit!==!1&&g.parent;while(g&&!g.isControllingVariants);let _=u&&H_(f(l??(g&&g.props.initial))?.transition);if(V_.forEach((t,r)=>{let i=n[t],l=o[t],f=g&&g.props[t],v=l===void 0?eg(f)||f===!1?f:void 0:l,y=eg(v),b=t===a?i.isActive:null,x=y&&l===void 0&&!(u&&c);if(i.protectedKeys={...m},!i.isActive&&b===null||!v&&!i.prevProp||$h(v)||typeof v==`boolean`)return;if(b===!1&&(h=r),t===`exit`&&i.isActive&&b!==!0){m={...m,...i.prevResolvedValues};return}let S=W_(i.prevProp,v),ee=S||y&&(b&&!x||r>h),C=!1,w=Array.isArray(v)?v:[v],te={},T;if(b!==!1)for(let n of w){let{transition:r,transitionEnd:i,...a}=$(e,n,tp(e,t))||{};te={...te,...a,...i},T=H_(r)||T}let{prevResolvedValues:ne}=i;for(let t in{...ne,...te}){if(t in m)continue;let n=te[t],r=ne[t],a=Array.isArray(n)&&Array.isArray(r)?!B_(n,r)||S:n!==r,o;if(a&&n==null)p.has(t)||p.set(t,i.prevOut);else if(a||n!==void 0&&p.has(t)){ee=!0,o=p.get(t)||_,p.delete(t)&&(C=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0;i.out[t]=o}if(i.prevProp=v,i.prevResolvedValues=te,i.prevOut=T,i.isActive&&(m={...m,...te}),ee&&(!(x&&S)||C))for(let n of w){let r={type:t};if(typeof n==`string`&&u&&c&&s?.enteringChildren){let t=$(s,n)?.transition?.delayChildren;r.delay=Ff(s.enteringChildren,e,t)}d.push({animation:n,options:r})}}),p.size){let t={},n=f(),r=n?.transition;p.forEach((i,a)=>{i&&(r={...r||e.getDefaultTransition(),[a]:i});let s=e.getValue(a);s&&(s.liveStyle=!0);let c=n&&!Array.isArray(l)?n[a]:void 0,u=e.getBaseTargetFromProps(o,a);t[a]=(c===void 0?u!==void 0&&!sp(u)?u:e.initialValues[a]===void 0?e.baseTarget[a]:void 0:c)??null}),r&&(t.transition=r),d.push({animation:t})}let v=u&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!v&&d.length?t(d):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=G_(),i=!0}}}function W_(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!B_(t,e):!1}function G_(){let e={};for(let t of tg)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}var K_=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function q_(e=!0){let t=(0,b.useContext)(Ks);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,b.useId)();(0,b.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,b.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var J_=(0,b.createContext)({strict:!1}),Y_={animation:[`variants`,...tg],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},X_=!1;function Z_(){if(X_)return;let e={};for(let t in Y_)e[t]={isEnabled:e=>Y_[t].some(t=>!!e[t])};fg(e),X_=!0}function Q_(){return Z_(),pg()}function $_(e){let t=Q_();for(let n in e)t[n]={...t[n],...e[n]};fg(t)}var ev=(0,b.createContext)({});function tv(e,t){if(rg(e)){let{initial:t,animate:n}=e;return{initial:t===!1||eg(t)?t:void 0,animate:eg(n)?n:void 0}}return e.inherit===!1?{}:t}function nv(e){let{initial:t,animate:n}=tv(e,(0,b.useContext)(ev));return(0,b.useMemo)(()=>({initial:t,animate:n}),[rv(t),rv(n)])}function rv(e){return Array.isArray(e)?e.join(` `):e}var iv=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function av(e,t,n){for(let r in t)!sp(t[r])&&!_g(r,n)&&(e[r]=t[r])}function ov({transformTemplate:e},t){return(0,b.useMemo)(()=>{let n=iv();return Np(n,t,e),Object.assign({},n.vars,n.style)},[t])}function sv(e,t){let n=e.style||{},r={};return av(r,n,e),Object.assign(r,ov(e,t)),r}function cv(e,t){let n={},r=sv(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var lv=()=>({...iv(),attrs:{}});function uv(e,t,n,r){let i=(0,b.useMemo)(()=>{let n=lv();return Rp(n,t,I_(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};return av(t,e.style,e),{...i,style:{...t,...i.style}}}return i}var dv=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function fv(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||dv.has(e)}function pv(e,t){return e.startsWith(`on`)?!fv(e):t?.(e)??!fv(e)}function mv(e,t,n,r){let i={};for(let a in e)a===`values`&&typeof e.values==`object`||sp(e[a])||(pv(a,r)||n===!0&&fv(a)||!t&&!fv(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]);return i}var hv=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function gv(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(hv.indexOf(e)>-1||/[A-Z]/u.test(e))}function _v(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??gv(e)?uv:cv)(t,r,i,e),l=mv(t,typeof e==`string`,a,s),u=e===b.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,b.useMemo)(()=>sp(d)?d.get():d,[d]);return(0,b.createElement)(e,{...u,children:f})}function vv({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:yv(n,r,i,e),renderState:t()}}function yv(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=hm(a[e]);let{initial:o,animate:s}=e,c=rg(e),l=ig(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!$h(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=ep(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var bv=e=>(t,n)=>{let r=(0,b.useContext)(ev),i=(0,b.useContext)(Ks),a=()=>vv(e,t,r,i);return n?a():Ws(a)},xv=bv({scrapeMotionValuesFromProps:vg,createRenderState:iv}),Sv=bv({scrapeMotionValuesFromProps:R_,createRenderState:lv}),Cv=Symbol.for(`motionComponentSymbol`);function wv(e,t,n){let r=(0,b.useRef)(n);(0,b.useInsertionEffect)(()=>{r.current=n});let i=(0,b.useRef)(null);return(0,b.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var Tv=(0,b.createContext)({});function Ev(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Dv(e,t,n,r,i,a){let{visualElement:o}=(0,b.useContext)(ev),s=(0,b.useContext)(J_),c=(0,b.useContext)(Ks),l=(0,b.useContext)(K_),u=l.reducedMotion,d=l.skipAnimations,f=(0,b.useRef)(null),p=(0,b.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,b.useContext)(Tv);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&Ov(f.current,n,i,h),(0,b.useInsertionEffect)(()=>{m&&m.props!==n&&m.update(n,c)});let g=n[up],_=(0,b.useRef)(!!g&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return Gs(()=>{p.current&&m&&(m.animationState?.animateChanges(),m.enteringChildren=void 0)},[]),Gs(()=>{p.current=!0,m&&(window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),_.current&&m.animationState&&m.animationState.animateChanges())}),(0,b.useEffect)(()=>{m&&(!_.current&&m.animationState&&m.animationState.animateChanges(),_.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),!1),m.enteringChildren=void 0)}),m}function Ov(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t,f=e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:kv(e.parent));f.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Ev(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u});let p=f.getStack()?.lead;p&&!f.root.isUpdateBlocked()&&(p.willUpdate(),p.scheduleCheckAfterUnmount())}function kv(e){if(e)return e.options.allowProjection===!1?kv(e.parent):e.projection}function Av(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&$_(r);let a=n?n===`svg`:gv(e),o=a?Sv:xv;function s(n,s){let c,l=jv(n);Ws(()=>!!Xh.current?.sharedNodes.get(l)?.lead&&n.initial)&&(n={...n,initial:!1});let u={...(0,b.useContext)(K_),...n,layoutId:l},{isStatic:d,isValidProp:f}=u,p=nv(n),m=o(n,d);if(!d&&typeof window<`u`){Mv(u,r);let t=Nv(u);p.visualElement=Dv(e,m,u,i,t.ProjectionNode,a),(t.isEnabled||p.visualElement?.projection?.options.layoutId)&&(c=t.MeasureLayout)}return(0,z.jsxs)(ev.Provider,{value:p,children:[c&&p.visualElement?(0,z.jsx)(c,{visualElement:p.visualElement,...u}):null,_v(e,n,wv(m,p.visualElement,s),m,d,t,a,f)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,b.forwardRef)(s);return c[Cv]=e,c}function jv({layoutId:e}){let t=(0,b.useContext)(Us).id;return t&&e!==void 0?t+`-`+e:e}function Mv(e,t){(0,b.useContext)(J_).strict}function Nv(e){let{drag:t,layout:n}=Q_();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:r.MeasureLayout,isEnabled:t?.isEnabled(e)||n?.isEnabled(e),ProjectionNode:r.ProjectionNode}}function Pv(e,t){if(typeof Proxy>`u`)return Av;let n=new Map,r=(n,r)=>Av(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Av(a,void 0,e,t)),n.get(a))})}var Fv=(e,t)=>t.isSVG??gv(e)?new z_(t):new bg(t,{allowProjection:e!==b.Fragment}),Iv=class extends P_{constructor(e){super(e),e.animationState||=U_(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();$h(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Lv=0,Rv={animation:{Feature:Iv},exit:{Feature:class extends P_{constructor(){super(...arguments),this.id=Lv++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=$(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id,this.node))}unmount(){}}}},zv=class extends P_{constructor(e){super(e),this.removeGroupControls=tc,this.removeListeners=tc,this.controls=new g_(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tc}update(){let{dragControls:e,drag:t}=this.node.getProps(),{dragControls:n,drag:r}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls))),r&&!t&&this.controls.stop(void 0,void 0,r)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Bv=e=>(t,n)=>{e&&Yl.update(()=>e(t,n),!1,!0)},Vv=class extends P_{constructor(){super(...arguments),this.removePointerDownListener=tc}onPointerDown(e){this.session=new Hg(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Bv(e),onStart:Bv(t),onMove:Bv(n),onEnd:(e,t)=>{delete this.session,r&&Yl.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=wg(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}},Hv=!1,Uv=({layout:e,layoutDependency:t,layoutAnchor:n})=>({layout:e,layoutDependency:t,layoutAnchor:n,animationType:typeof e==`string`?e:`both`}),Wv=(e,t)=>{let{snapshot:n}=e,r=e.getStack();r?.remove(e);let i=r?.lead;if(r?.prevLead===e&&i.resumeFrom===e&&(i.resumeFrom=i.currentAnimation=e.resumingFrom=void 0),e.options.layoutId=t,!t)e.needsShow=!0;else return e.root.registerSharedNode(t,e),()=>{let{resumeFrom:t}=e;t?.isPresent!==!1&&e.getStack().members.includes(t)&&(t.hide(),e.resumeFrom=void 0,e.snapshot=n)}},Gv=class extends b.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group?.add(i),r&&n?.register?.(i),Hv&&i.root.didUpdate(),i.options.layoutId!==r&&Wv(i,r)?.(),i.addEventListener(`animationComplete`,()=>this.safeToRemove()),i.setOptions({...i.options,...Uv(this.props),onExitComplete:()=>this.safeToRemove()})),dh.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,layoutId:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,this.takeOver=e.layoutId===n?void 0:(o.willUpdate(),Wv(o,n)),o.setOptions({...o.options,...Uv(this.props)}),Hv=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||Yl.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),cm.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Hv=!0,r&&(r.scheduleCheckAfterUnmount(),t.group?.remove(r),n?.deregister?.(r))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}};function Kv(e){let[t,n]=q_(),r=(0,b.useContext)(Us);return(0,z.jsx)(Gv,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(Tv),isPresent:t,safeToRemove:n})}var qv={pan:{Feature:Vv},drag:{Feature:zv,ProjectionNode:Zh,MeasureLayout:Kv}};function Jv(e,t,n,r){let{props:i}=e,a=`while`+n;e.animationState&&i[a]&&e.animationState.setActive(a,r===`Start`);let o=i[`on`+n+r];o&&Yl.postRender(()=>o(t,Sg(t)))}var Yv=class extends P_{mount(){let{current:e}=this.node;e&&(this.unmount=T_(e,(e,t)=>(Jv(this.node,t,`Hover`,`Start`),e=>Jv(this.node,e,`Hover`,`End`))))}unmount(){}},Xv=class extends P_{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=nc(Jh(this.node.current,`focus`,()=>this.onFocus()),Jh(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Zv(e,t,n){e.current instanceof HTMLButtonElement&&e.current.disabled||Jv(e,t,`Tap`,n)}var Qv=class extends P_{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=N_(e,(e,t)=>(Zv(this.node,t,`Start`),(e,{success:t})=>Zv(this.node,e,t?``:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},$v=new WeakMap,ey=new WeakMap,ty=e=>{let t=$v.get(e.target);t&&t(e)},ny=e=>{e.forEach(ty)};function ry({root:e,...t}){let n=e||document;ey.has(n)||ey.set(n,{});let r=ey.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ny,{root:e,...t})),r[i]}function iy(e,t,n){let r=ry(t);return $v.set(e,n),r.observe(e),()=>{$v.delete(e),r.unobserve(e)}}var ay={some:0,all:1},oy=class extends P_{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:ay[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=iy(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(sy(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function sy({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var cy=Pv(Object.assign({},Rv,{inView:{Feature:oy},tap:{Feature:Qv},focus:{Feature:Xv},hover:{Feature:Yv}},qv,{layout:{ProjectionNode:Zh,MeasureLayout:Kv}}),Fv);function ly(){!sg.current&&lg();let[e]=(0,b.useState)(og.current);return e}var uy={some:0,all:1};function dy(e,t,{root:n,margin:r,amount:i=`some`}={}){let a=jp(e);t=Ap(t);let o=new WeakMap,s=new IntersectionObserver(e=>{e.forEach(e=>{let n=o.get(e.target);if(e.isIntersecting!==!!n){if(e.isIntersecting){let n=t(e.target,e);typeof n==`function`?o.set(e.target,n):s.unobserve(e.target)}else typeof n==`function`&&(n(e),o.delete(e.target))}})},{root:n,rootMargin:r,threshold:typeof i==`number`?i:uy[i]});return a.forEach(e=>s.observe(e)),kp(()=>s.disconnect())}function fy(e,{root:t,margin:n,amount:r,once:i=!1,initial:a=!1}={}){let[o,s]=(0,b.useState)(a),[c,l]=(0,b.useState)({});return(0,b.useEffect)(()=>{let a=c.current=e.current;return!a||i&&o?void 0:dy(a,()=>(s(!0),i?void 0:()=>s(!1)),{root:t&&t.current||void 0,margin:n,amount:r})},[t,e,n,i,r,c]),(0,b.useEffect)(()=>{e.current!==c.current&&(i||s(!1),l({}))}),o}var py=cy,my={task:`任務`,reply:`回覆`,done:`完成回報`,ask:`提問`,failure:`失敗`};function hy({mail:e}){let t=e.digest?.length?e.digest:e.brief?[{label:`摘要`,lines:[e.brief]}]:[];return(0,z.jsxs)(`article`,{className:`mt-3 rounded-lg border border-line bg-paper px-3 py-2`,children:[(0,z.jsxs)(`p`,{className:`eyebrow`,children:[my[e.type]??e.type,`,來自 `,e.from]}),(0,z.jsx)(`p`,{className:`text-pretty mt-1 text-base font-semibold leading-snug`,children:e.subject}),e.held&&(0,z.jsx)(`p`,{className:`text-pretty mt-1 text-sm text-ink/70`,children:`這封在等空閒的實例。`}),t.length>0&&(0,z.jsx)(`dl`,{className:`mt-3`,children:t.map(e=>(0,z.jsxs)(`div`,{className:`mt-2 flex gap-3 first:mt-0`,children:[(0,z.jsx)(`dt`,{className:`w-16 shrink-0 sm:w-20 text-pretty text-xs text-ink/60`,children:e.label}),(0,z.jsx)(`dd`,{className:`min-w-0`,children:e.lines.map((e,t)=>(0,z.jsx)(`p`,{className:`text-pretty text-sm leading-relaxed`,children:e},`${t}-${e}`))})]},e.label))})]})}var gy={completed:`完成`,partial:`部分完成`,blocked:`受阻`,failed:`失敗`,cancelled:`已取消`,waiting:`等待回答`};function _y(e){let t=[],n=/"message"\s*:\s*"((?:\\.|[^"\\])*)"/g,r;for(;r=n.exec(e);){let e=r[1];e!==void 0&&t.push(e.replace(/\\n/g,` `).replace(/\\"/g,`"`).replace(/\\\\/g,`\\`))}let i=(t.at(-1)??e.split(/\n\s*\n/).find(e=>e.trim())??e).replace(/\s+/g,` `).trim();return i.length>280?`${i.slice(0,279)}…`:i}function vy(e){let t=e.match(/^(\S+) attempt (\d+) failed \(/);if(!t)return{head:``,body:e.trim()};let n=e.slice(t[0].length).replace(/\)(?:; [\s\S]*)?\.?\s*$/,``).trim();return{head:`${t[1]} 第 ${t[2]} 次失敗`,body:n}}function yy(e){return e.map(e=>{let t=e.match(/^(#{1,6})\s+(.*)$/),n=t?.[1];if(t&&n){let e=(t[2]??``).replace(/\*\*/g,``).trim();return{kind:n.length===1?`title`:`label`,text:e}}let r=e.match(/^\*\*([^*]+):\*\*\s*(.*)$/),i=r?.[1];if(r&&i){let e=r[2]??``;return{kind:`fact`,text:i.trim(),extra:gy[e.trim().toLowerCase()]??e.trim()}}return{kind:`text`,text:e.replace(/\*\*/g,``).replace(/`/g,``).trim()}})}var by={completed:`完成`,partial:`部分完成`,blocked:`受阻`,failed:`失敗`,waiting:`等待回答`,cancelled:`已取消`};function xy(e){return e<1e3?String(e):e<1e6?`${(e/1e3).toFixed(1)}k`:`${(e/1e6).toFixed(1)}M`}function Sy(e){return e.state===`running`?`執行中`:e.state===`interrupted`?`已中斷`:e.outcome_verified?by[e.outcome??``]??e.outcome??`結束`:e.end_reason===`done`?`完成(未驗證)`:`結束:${e.end_reason===`waiting`?`等待回答`:e.end_reason??`?`}`}function Cy(e){return e.state!==`ended`||e.outcome!==`completed`}function wy(e,t){return t>0?`${e}/${t}`:String(e)}function Ty(e){let t=e.steps??[];return t.length?`${t.filter(e=>e.done).length}/${t.length} 步`:`${wy(e.rounds,e.max_rounds)} 輪`}function Ey(e){return e.instance!==void 0&&e.instance>=2&&e.role?`${e.role} #${e.instance}`:e.name}function Dy(e){let t=Object.values(e.runs??{});return(t.length>0?t:e.report?[e.report]:[]).filter(e=>e.run).sort((e,t)=>ky(t)-ky(e))}function Oy(e){let t=Dy(e);return t.find(e=>e.run?.state===`running`)??t.find(e=>e.run&&Cy(e.run))??t[0]}function ky(e){let t=Date.parse(e.run?.started_at??``);return Number.isFinite(t)?t:-1/0}function Ay(e,t){let n=e+t;return n<=0?``:`快取 讀 ${xy(e)} 寫 ${xy(t)} 命中 ${Math.round(100*e/n)}%`}function jy(e,t){let n=t-Date.parse(e);if(!Number.isFinite(n)||n<0)return``;let r=Math.floor(n/1e3);return r<60?`${r}s`:`${Math.floor(r/60)}m${String(r%60).padStart(2,`0`)}s`}function My(e,t){if(e.state===`running`)return jy(e.started_at,t)||`0s`;let n=Ny(e);return n===void 0?`0s`:jy(e.started_at,n)||`0s`}function Ny(e){let t=Date.parse(e.ended_at??``);if(Number.isFinite(t))return t;let n=-1/0;for(let t of e.wakes??[]){let e=Date.parse(t.at);Number.isFinite(e)&&e>n&&(n=e)}return n===-1/0?void 0:n}function Py(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function Fy(e,t,n){if(!e)return null;let r=[];for(let t of e.wakes){let e=Date.parse(t.at);if(!Number.isFinite(e))continue;let n=e+Math.max(0,t.duration_ms);r.push({agent:t.agent,start:e,end:n,ok:t.ok,live:!1,title:Iy(t)})}if(e.state===`running`)for(let[t,i]of Object.entries(e.active)){let e=Date.parse(i.since);Number.isFinite(e)&&r.push({agent:t,start:e,end:Math.max(n,e),ok:!0,live:!0,title:`${t} 第 ${i.round??`?`} 輪,進行中 ${jy(i.since,n)}`})}if(!r.length)return null;let i=Math.min(...r.map(e=>e.start)),a=Math.max(...r.map(e=>e.end),i+1),o=a-i,s=[...new Set([...t.map(e=>e.name),...r.map(e=>e.agent)])],c=new Set(t.filter(e=>e.lead).map(e=>e.name));return s.sort((e,t)=>Number(c.has(t))-Number(c.has(e))||e.localeCompare(t)),{start:i,end:a,lanes:s.map(e=>({agent:e,bars:r.filter(t=>t.agent===e).map(e=>({x:(e.start-i)/o*1e3,width:Math.max(4,(e.end-e.start)/o*1e3),ok:e.ok,live:e.live,title:e.title}))})).filter(e=>e.bars.length>0)}}function Iy(e){let t=e.output_tokens?`,${xy(e.output_tokens)} token`:``,n=e.model?`,${e.runtime??``}/${e.model}`:``,r=e.error?`,${e.error}`:``;return`${e.agent} 第 ${e.round} 輪,${e.ok?`成功`:`失敗`},${Math.round(e.duration_ms/1e3)}s${t}${n}${r}`}function Ly(e,t=6){let n=[];for(let r of[...e?.wakes??[]].reverse())for(let e of[...r.sent??[]].reverse())if(n.push({from:r.agent,to:e.to,type:e.type,subject:e.subject}),n.length>=t)return n;return n}function Ry(e){let t=new Map;for(let n of e?.wakes??[]){let e=t.get(n.agent)??{agent:n.agent,output:0,cacheRead:0,cacheWrite:0,failed:0};e.output+=n.output_tokens??0,e.cacheRead+=n.cache_read_tokens??0,e.cacheWrite+=n.cache_write_tokens??0,n.ok||(e.failed+=1),t.set(n.agent,e)}return[...t.values()].sort((e,t)=>t.output-e.output)}function zy(e,t){return t?.state===`running`?t.active[e.name]?`active`:e.last_wake?.ok===!1?`failed`:(t.queue??[]).some(t=>t.agent===e.name)?`queued`:`idle`:`idle`}var By={active:0,failed:1,queued:2,idle:3};function Vy(e,t){let n=e.filter(e=>e.lead),r=e.filter(e=>!e.lead).sort((e,n)=>By[zy(e,t)]-By[zy(n,t)]);return[...n,...r]}function Hy(e,t){return t?.state===`running`?e.filter(e=>zy(e,t)===`active`).sort((e,n)=>(t.active[n.name]?.since??``).localeCompare(t.active[e.name]?.since??``)||e.name.localeCompare(n.name)):[]}function Uy(e){for(let t of[...e?.wakes??[]].reverse()){let e=[...t.sent??[]].reverse().find(e=>e.to!==`(done)`)?.to;if(e)return{from:t.agent,to:e}}}function Wy(e,t,n){let r=(e.can_message??[]).includes(t.name),i=(t.can_message??[]).includes(e.name);if(!r&&!i)return;let a=!!n&&(n.from===e.name&&n.to===t.name||n.from===t.name&&n.to===e.name);return{glyph:r&&i?`↕`:r?`▼`:`▲`,hot:a}}function Gy({agents:e,run:t,now:n}){let r=Vy(e,t),i=r.find(e=>e.lead),a=r.filter(e=>!e.lead),o=Uy(t),s=Ly(t),c=t?.state===`running`;return(0,z.jsxs)(`section`,{className:`panel p-3 sm:p-4`,children:[(0,z.jsx)(`h2`,{className:`text-balance text-base font-semibold`,children:`隊伍`}),r.length===0?(0,z.jsx)(`p`,{className:`text-pretty mt-3 text-sm`,children:`沒有 agent。`}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`p`,{className:`text-pretty mt-2 text-sm text-ink/70`,children:[`連線是誰可以傳話給誰。▼ 往下,▲ 往上,↕ 雙方。`,c?`會移動的是最近一次交接。`:``]}),(0,z.jsxs)(`div`,{className:`mt-4 space-y-2`,children:[i&&(0,z.jsx)(Jy,{agent:i,run:t,now:n}),a.length>0&&(0,z.jsx)(`ul`,{className:`mt-2 list-none space-y-2 border-l border-line p-0`,children:a.map(e=>{let r=i?Wy(i,e,o):void 0;return(0,z.jsxs)(`li`,{className:`relative pt-0 pl-8`,children:[r&&i?(0,z.jsx)(Ky,{glyph:r.glyph,hot:r.hot,live:c,title:$y(i,e,r)}):(0,z.jsx)(`div`,{className:`h-2`}),(0,z.jsx)(Jy,{agent:e,run:t,now:n})]},e.name)})})]})]}),s.length>0&&(0,z.jsx)(`ol`,{className:`mt-6 grid gap-3 text-sm md:grid-cols-2 xl:grid-cols-3`,children:s.map(e=>(0,z.jsxs)(`li`,{className:`rounded-lg border border-line bg-wall/50 px-3 py-2`,children:[(0,z.jsx)(`p`,{className:`eyebrow`,children:e.to===`(done)`?`${e.from} 結束`:`${e.from} 給 ${e.to}`}),(0,z.jsx)(`p`,{className:`text-pretty mt-0.5 leading-snug`,children:e.subject})]},`${e.from}-${e.to}-${e.subject}`))})]})}function Ky({glyph:e,hot:t,live:n,title:r}){let i=ly(),a=(0,b.useRef)(null),o=fy(a,{amount:.5}),s=n&&!i&&o,c=s&&t;return(0,z.jsxs)(`div`,{ref:a,title:r,className:`absolute top-3 -left-8 flex size-8 items-center justify-center`,children:[n&&e!==`▲`&&(0,z.jsx)(qy,{y:[0,18],hot:t,play:s}),n&&e!==`▼`&&(0,z.jsx)(qy,{y:[18,0],hot:t,play:s}),(0,z.jsx)(py.span,{className:R(`relative text-sm`,c?`text-signal`:`text-ink/50`),animate:c?{y:e===`▲`?[0,-3,0]:[0,3,0]}:{y:0},transition:c?{duration:.85,repeat:1/0,ease:`easeOut`}:{duration:.2,ease:`easeOut`},children:e})]})}function qy({y:e,hot:t,play:n}){return(0,z.jsx)(py.span,{"aria-hidden":!0,className:R(`absolute left-1/2 size-1.5 -translate-x-1/2 rounded-full`,t?`bg-signal`:`bg-ink/30`),initial:!1,animate:n?{y:e,opacity:[0,1,0]}:{y:(e[0]+e[1])/2,opacity:t?.85:.35},transition:n?{duration:t?1.1:2.8,repeat:1/0,ease:`linear`}:{duration:.2,ease:`easeOut`}})}function Jy({agent:e,run:t,now:n}){let r=zy(e,t),i=r===`active`,a=t?.state===`running`?t.active[e.name]:void 0,o=r===`queued`?(t?.queue??[]).filter(t=>t.agent===e.name).length:0,s=(t?.wakes??[]).filter(t=>t.agent===e.name),c=s.filter(e=>!e.ok).length,l=s.reduce((e,t)=>e+(t.output_tokens??0),0),u=Xy(e,t,r);return(0,z.jsxs)(vs,{defaultOpen:i,className:R(`group rounded-lg border bg-wall/50 px-3`,i?`border-signal/60 bg-signal-soft/40`:`border-line`),children:[(0,z.jsxs)(bs,{className:`flex w-full items-baseline gap-3 py-3 text-left`,children:[(0,z.jsx)(`strong`,{className:R(`min-w-0 flex-1`,i?`text-balance text-base`:`truncate text-sm text-ink/80`),children:Ey(e)}),(0,z.jsx)(`span`,{className:R(`shrink-0 font-mono text-xs tabular-nums`,Qy(r)),children:Zy(r,a?.round,a?jy(a.since,n):``,o)}),(0,z.jsx)(`span`,{className:`shrink-0 text-sm text-ink/60 group-data-[open]:hidden`,children:`展開`}),(0,z.jsx)(`span`,{className:`hidden shrink-0 text-sm text-ink/60 group-data-[open]:inline`,children:`收合`})]}),(0,z.jsxs)(Hs,{className:`pb-4 text-sm`,children:[(0,z.jsxs)(`dl`,{className:`mt-1 grid gap-x-8 gap-y-1 sm:grid-cols-2 xl:grid-cols-3`,children:[(0,z.jsx)(Yy,{label:`執行`,value:`${e.lead?`帶隊,`:``}${e.runtime??`?`}`}),(e.model||e.fallback)&&(0,z.jsx)(Yy,{label:`模型`,value:e.fallback?`備援中 ${e.model??``}`:e.model??``}),(0,z.jsx)(Yy,{label:`token`,value:xy(l)}),(0,z.jsx)(Yy,{label:`喚醒`,value:`${s.length} 次${c>0?`,失敗 ${c}`:``}`}),e.unread>0&&(0,z.jsx)(Yy,{label:`未看`,value:String(e.unread)}),(0,z.jsxs)(`div`,{className:`flex gap-3 sm:col-span-2 xl:col-span-3`,children:[(0,z.jsx)(`dt`,{className:`w-16 shrink-0 sm:w-20 text-ink/60`,children:`可傳話給`}),(0,z.jsx)(`dd`,{className:`flex min-w-0 flex-wrap gap-x-3 gap-y-1`,children:(e.can_message??[]).length>0?(e.can_message??[]).map(e=>(0,z.jsx)(`span`,{children:e},e)):`沒有人`})]})]}),r===`failed`&&e.last_wake?.error&&(0,z.jsx)(`p`,{className:`text-pretty mt-3 text-sm leading-relaxed text-failed`,children:_y(e.last_wake.error)}),u.length>0&&(0,z.jsx)(`div`,{className:`flex flex-col`,children:u.map((e,t)=>(0,z.jsx)(hy,{mail:e},`${t}-${e.from}-${e.subject}`))})]})]},i?`${e.name}:on`:e.name)}function Yy({label:e,value:t}){return(0,z.jsxs)(`div`,{className:`flex gap-3`,children:[(0,z.jsx)(`dt`,{className:`w-16 shrink-0 sm:w-20 text-ink/60`,children:e}),(0,z.jsx)(`dd`,{className:`min-w-0 text-pretty tabular-nums`,children:t})]})}function Xy(e,t,n){return t?n===`active`?t.active[e.name]?.handling??[]:n===`queued`?(t.queue??[]).filter(t=>t.agent===e.name):[]:[]}function Zy(e,t,n,r){return e===`active`?`進行中${t?` #${t}`:``} ${n}`.trim():e===`failed`?`上次喚醒失敗`:e===`queued`?`排隊 ${r} 封`:`閒置`}function Qy(e){return e===`active`?`text-working`:e===`failed`?`text-failed`:`text-ink/60`}function $y(e,t,n){let r=n.glyph===`▼`?`${e.name} 可傳給 ${t.name}`:n.glyph===`▲`?`${t.name} 可傳給 ${e.name}`:`${e.name} 與 ${t.name} 可互傳`;return n.hot?`${r},最近一次交接`:r}function eb({open:e,title:t,onClose:n,closable:r=!0,wide:i=!1,children:a}){let o=(0,b.useRef)(null),s=(0,b.useId)(),c=(0,b.useRef)(e);c.current=e;let l=(0,b.useRef)(r);l.current=r;let u=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let t=o.current;t&&(e&&!t.open&&(u.current=document.activeElement instanceof HTMLElement?document.activeElement:null,t.showModal()),!e&&t.open&&t.close())},[e]),(0,b.useEffect)(()=>()=>{let e=u.current;c.current&&e?.isConnected&&queueMicrotask(()=>e.focus())},[]),(0,z.jsx)(`dialog`,{ref:o,"aria-labelledby":s,onCancel:e=>{r||e.preventDefault()},onClose:e=>{if(c.current){if(l.current)n();else{let t=e.currentTarget;t.open||t.showModal()}}},className:`m-auto ${i?`w-[min(56rem,calc(100vw-2rem))]`:`w-[min(38rem,calc(100vw-2rem))]`} max-h-[90dvh] overflow-y-auto rounded-xl border border-line bg-paper p-0 text-ink backdrop:bg-black/40`,children:e&&(0,z.jsxs)(`div`,{className:`p-4 sm:p-6`,children:[(0,z.jsx)(`h2`,{id:s,className:`text-balance text-xl font-semibold tracking-tight`,children:t}),a]})})}var tb=`min-h-11 w-full rounded-lg border border-line bg-wall px-3 py-2 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,nb=`min-h-11 rounded-lg border border-line px-4 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal disabled:opacity-50`;function rb({project:e,runId:t,open:n,onClose:r}){let[i,a]=(0,b.useState)(),[o,s]=(0,b.useState)({}),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(!1),[f,p]=(0,b.useState)([]),[m,h]=(0,b.useState)();(0,b.useEffect)(()=>{if(!n)return;let r=!0;return a(void 0),s({}),l(!1),p([]),h(void 0),d(!1),Pn(e,t).then(e=>{r&&(a(e??`missing`),e&&s(Object.fromEntries(e.questions.filter(e=>!e.delivered&&e.answer).map(e=>[e.id,e.answer]))))}),()=>{r=!1}},[n,e,t]);let g=async()=>{if(u)return;d(!0),p([]);let n=await Fn(e,t,o,c);n?n.complete?h(await jn(`resume`,{project:e,run:t,answer:!0})):p(n.problems):p([`沒能存下答案,請重新整理頁面再試。`]),d(!1)},_=i&&i!==`missing`?i.questions.filter(e=>!e.delivered):[],v=m?.kind===`short`?Lo(m.result.exit,m.result.timedOut):void 0;return(0,z.jsxs)(eb,{open:n,title:`回答問題`,onClose:r,closable:!u,children:[i===void 0&&(0,z.jsx)(`p`,{className:`mt-4 text-sm`,children:`讀取中…`}),i===`missing`&&(0,z.jsx)(`p`,{className:`mt-4 text-sm`,children:`這次任務現在沒有待回答的問題。`}),m?(0,z.jsxs)(`div`,{className:`mt-4 flex flex-col gap-3`,children:[m.kind===`job`?(0,z.jsxs)(`p`,{className:`text-sm`,children:[(0,z.jsx)(`span`,{"aria-hidden":!0,className:`mr-1 text-signal`,children:`✓`}),`答案已送出,任務在背景繼續。`]}):m.kind===`short`?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`p`,{className:R(`text-sm font-medium`,v?.tone===`ok`?`text-signal`:v?.tone===`warn`?`text-warn`:`text-failed`),children:[v?.text,m.result.signal?(0,z.jsxs)(`span`,{className:`ml-2 font-mono text-xs`,children:[`(訊號 `,m.result.signal,`)`]}):null]}),(0,z.jsx)(`pre`,{className:`max-h-60 overflow-auto rounded-lg border border-line bg-wall p-3 font-mono text-xs whitespace-pre-wrap`,children:m.result.stdout||m.result.stderr})]}):(0,z.jsx)(`p`,{role:`alert`,className:`text-pretty text-sm text-failed`,children:m.kind===`error`?m.message:m.kind===`invalid`?m.error:`請求被拒絕,請重新整理頁面後再試。`}),(0,z.jsx)(`div`,{className:`flex justify-end`,children:(0,z.jsx)(`button`,{type:`button`,autoFocus:!0,className:R(nb,`bg-ink text-paper`),onClick:r,children:`關閉`})})]}):_.length>0&&(0,z.jsxs)(`form`,{className:`mt-4 flex flex-col gap-5`,onSubmit:e=>{e.preventDefault(),g()},children:[_.map((e,t)=>(0,z.jsx)(ib,{q:e,value:o[e.id]??``,autoFocus:t===0,onChange:t=>s(n=>({...n,[e.id]:t}))},e.id)),(0,z.jsxs)(`label`,{className:`flex min-h-11 items-center gap-3 text-sm`,children:[(0,z.jsx)(`input`,{type:`checkbox`,className:`size-5`,checked:c,onChange:e=>l(e.target.checked)}),(0,z.jsx)(`span`,{children:`沒填的問題,有建議值就採用建議值`})]}),f.length>0&&(0,z.jsx)(`ul`,{role:`alert`,className:`rounded-lg border border-failed/40 bg-failed-soft px-3 py-2 text-sm text-failed`,children:f.map(e=>(0,z.jsx)(`li`,{children:e},e))}),(0,z.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,disabled:u,className:nb,onClick:r,children:`取消`}),(0,z.jsx)(`button`,{type:`submit`,disabled:u,className:R(nb,`bg-ink text-paper`),children:u?`送出中…`:`送出並繼續任務`})]})]}),(i===`missing`||i!==void 0&&!m&&_.length===0)&&(0,z.jsx)(`div`,{className:`mt-4 flex justify-end`,children:(0,z.jsx)(`button`,{type:`button`,className:nb,onClick:r,children:`關閉`})})]})}function ib({q:e,value:t,autoFocus:n,onChange:r}){let i=(0,b.useId)();return(0,z.jsxs)(`fieldset`,{className:`flex flex-col gap-2`,children:[(0,z.jsxs)(`legend`,{className:`text-pretty text-sm font-medium`,children:[e.text,` `,(0,z.jsxs)(`span`,{className:`font-mono text-xs text-ink/60`,children:[`(`,e.asker,`)`]})]}),e.options?.map(e=>(0,z.jsxs)(`label`,{className:`flex min-h-11 items-center gap-3 text-sm`,children:[(0,z.jsx)(`input`,{type:`radio`,name:i,className:`size-5`,checked:t===e,onChange:()=>r(e)}),(0,z.jsx)(`span`,{className:`text-pretty`,children:e})]},e)),(0,z.jsx)(`label`,{htmlFor:`${i}-text`,className:`text-xs text-ink/60`,children:e.options?.length?`或自己寫`:`你的答案`}),(0,z.jsx)(`input`,{id:`${i}-text`,className:tb,value:t,autoFocus:n,autoComplete:`off`,onChange:e=>r(e.target.value)}),e.suggested&&(0,z.jsxs)(`button`,{type:`button`,className:`min-h-11 self-start rounded-lg px-1 text-left text-sm underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,onClick:()=>r(e.suggested?.value??``),children:[`採用建議:`,e.suggested.value,e.suggested.reason?`(${e.suggested.reason})`:``]})]})}var ab=`min-h-11 rounded-lg border border-line bg-paper px-3 text-sm hover:bg-wall focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,ob={result:`最終結果`,done:`完成回報`,agent:`Agent 報告`};function sb(e){let t=e?new Date(e):void 0;return!t||Number.isNaN(t.getTime())?``:t.toLocaleString(`zh-Hant`,{month:`numeric`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function cb({project:e,runId:t,open:n,onClose:r}){let[i,a]=(0,b.useState)(),[o,s]=(0,b.useState)();(0,b.useEffect)(()=>{if(!n)return;a(void 0),s(void 0);let r=!0;return In(e,t).then(e=>r&&a(e??`error`)),()=>{r=!1}},[n,e,t]);let c=n=>{s(`loading`),Ln(e,t,n).then(e=>s(e??`error`))},l=(0,b.useMemo)(()=>o&&typeof o==`object`?jo(o.markdown):``,[o]),u=o&&typeof o==`object`?o.title:`報告`;return(0,z.jsxs)(eb,{open:n,title:u,onClose:r,wide:!0,children:[o===void 0?(0,z.jsx)(lb,{items:i,onPick:c}):(0,z.jsxs)(`div`,{className:`mt-3`,children:[(0,z.jsx)(`button`,{type:`button`,className:ab,onClick:()=>s(void 0),children:`← 回到列表`}),o===`loading`&&(0,z.jsx)(`p`,{className:`mt-4 text-sm`,children:`載入中…`}),o===`error`&&(0,z.jsx)(`p`,{className:`mt-4 text-sm text-failed`,children:`讀不到這份報告。`}),typeof o==`object`&&(0,z.jsx)(`article`,{className:`report-prose mt-4`,dangerouslySetInnerHTML:{__html:l}})]}),(0,z.jsx)(`div`,{className:`mt-6 flex justify-end`,children:(0,z.jsx)(`button`,{type:`button`,className:ab,onClick:r,children:`關閉`})})]})}function lb({items:e,onPick:t}){return e===void 0?(0,z.jsx)(`p`,{className:`mt-4 text-sm`,children:`載入中…`}):e===`error`?(0,z.jsx)(`p`,{className:`mt-4 text-sm text-failed`,children:`讀不到報告列表。`}):e.length===0?(0,z.jsx)(`p`,{className:`mt-4 text-sm`,children:`這次任務還沒有報告。`}):(0,z.jsx)(`ul`,{className:`mt-4 flex flex-col gap-2`,children:e.map(e=>(0,z.jsx)(`li`,{children:(0,z.jsxs)(`button`,{type:`button`,className:`${ab} block w-full py-2 text-left`,onClick:()=>t(e.id),children:[(0,z.jsxs)(`span`,{className:`flex items-baseline justify-between gap-3 font-mono text-xs tabular-nums text-ink/70`,children:[(0,z.jsx)(`span`,{children:e.agent?`${ob[e.kind]}・${e.agent}`:ob[e.kind]}),(0,z.jsx)(`span`,{children:sb(e.created)})]}),(0,z.jsx)(`span`,{className:`text-pretty mt-1 block text-sm font-medium`,children:e.title}),e.outcome&&(0,z.jsx)(`span`,{className:`mt-0.5 block text-xs text-ink/60`,children:e.outcome})]})},e.id))})}var ub=class extends Error{field;constructor(e,t){super(t),this.field=e}},db=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,fb=/^[a-z0-9-]{1,30}$/,pb=/^(\/|~\/|[A-Za-z]:[\\/])/,mb=[`claude-code`,`codex`],hb=[`project`,`global`],gb=2e5;function _b(e,t,n){let r=e[t];if(r==null||typeof r==`string`&&r.trim()===``){if(n.required)throw new ub(t,`${n.what}必填。`);return}if(typeof r!=`string`)throw new ub(t,`${n.what}格式不對。`);let i=r.trim();if(i.includes(`\0`))throw new ub(t,`${n.what}含有不能用的字元。`);if(i.length>(n.max??256))throw new ub(t,`${n.what}太長。`);if(n.re&&!n.re.test(i))throw new ub(t,`${n.what}格式不對。`);return i}function vb(e,t){let n=e[t];if(n==null||n===!1)return!1;if(n!==!0)throw new ub(t,`這個選項只能是勾選或不勾選。`);return!0}var yb=e=>e,bb=e=>yb(_b(e,`project`,{required:!0,re:db,what:`專案`})),xb=(e,t,n,r)=>{let i=_b(e,t,{what:r});if(i!==void 0&&!n.includes(i))throw new ub(t,`${r}只能是 ${n.join(`、`)}。`);return i},Sb={name:`project`,label:`專案`,kind:`text`,required:!0},Cb=e=>()=>e,wb=()=>`normal`,Tb=()=>``,Eb={init:{id:`init`,label:`初始化 home`,scope:`home`,fields:[],mode:Cb(`short`),tier:wb,target:Tb,argv:()=>[`init`,`-y`]},"project.list":{id:`project.list`,label:`列出專案`,scope:`home`,fields:[],mode:Cb(`short`),tier:wb,target:Tb,argv:()=>[`project`]},"project.add":{id:`project.add`,label:`註冊專案`,scope:`home`,fields:[{name:`name`,label:`專案名稱`,kind:`text`,required:!0},{name:`dir`,label:`repo 的絕對路徑`,kind:`text`,required:!0,help:`agent 會在這個資料夾工作。`}],mode:Cb(`short`),tier:wb,target:Tb,argv:e=>{let t=yb(_b(e,`name`,{required:!0,re:db,what:`專案名稱`})),n=yb(_b(e,`dir`,{required:!0,re:pb,what:`路徑`,max:1024}));if(n.startsWith(`~`))throw new ub(`dir`,`路徑請用絕對路徑,不支援 ~。`);return[`project`,`add`,t,`--dir`,n]}},"project.remove":{id:`project.remove`,label:`移除專案`,scope:`home`,fields:[{name:`name`,label:`專案名稱`,kind:`text`,required:!0},{name:`purge`,label:`連這個專案的所有 context 一起刪除`,kind:`checkbox`}],mode:Cb(`short`),tier:e=>e.purge===!0?`typed`:`confirm`,target:e=>String(e.name??``),argv:e=>[`project`,`remove`,yb(_b(e,`name`,{required:!0,re:db,what:`專案名稱`})),...vb(e,`purge`)?[`--purge`]:[]]},run:{id:`run`,label:`新任務`,scope:`project`,fields:[Sb,{name:`task`,label:`任務`,kind:`textarea`,required:!0},{name:`name`,label:`任務名稱(可留空)`,kind:`text`,help:`小寫英數與 -,最多 30 字。`},{name:`agent`,label:`只交給這一位 agent(可留空)`,kind:`text`},{name:`assumeDefaults`,label:`有建議值的問題直接採用,不暫停`,kind:`checkbox`}],mode:Cb(`detached`),tier:wb,target:Tb,argv:e=>{let t=[`run`,`-p`,bb(e)],n=_b(e,`name`,{re:fb,what:`任務名稱`});n&&t.push(`--name`,n);let r=_b(e,`agent`,{re:db,what:`agent`});return r&&t.push(`--agent`,r),vb(e,`assumeDefaults`)&&t.push(`--assume-defaults`),t.push(`--`,yb(_b(e,`task`,{required:!0,what:`任務`,max:gb}))),t}},call:{id:`call`,label:`呼叫單一 agent`,scope:`home`,fields:[{name:`agent`,label:`agent(全域 library 裡的名稱)`,kind:`text`,required:!0},{name:`dir`,label:`工作目錄(絕對路徑)`,kind:`text`,required:!0},{name:`task`,label:`任務`,kind:`textarea`,required:!0}],mode:Cb(`detached`),tier:wb,target:Tb,argv:e=>[`call`,yb(_b(e,`agent`,{required:!0,re:db,what:`agent`})),`--dir`,yb(_b(e,`dir`,{required:!0,re:pb,what:`工作目錄`,max:1024})),`--`,yb(_b(e,`task`,{required:!0,what:`任務`,max:gb}))]},resume:{id:`resume`,label:`續跑/追問`,scope:`project`,fields:[Sb,{name:`run`,label:`任務 id`,kind:`text`,required:!0},{name:`followup`,label:`追問(只用在已完成的任務,可留空)`,kind:`textarea`},{name:`assumeDefaults`,label:`有建議值的問題直接採用`,kind:`checkbox`}],mode:Cb(`detached`),tier:wb,target:Tb,argv:e=>{let t=bb(e),n=yb(_b(e,`run`,{required:!0,re:db,what:`任務 id`,max:120})),r=vb(e,`answer`),i=_b(e,`followup`,{what:`追問`,max:gb});if(r&&i)throw new ub(`followup`,`回答問題時不能同時追問。`);let a=[`resume`,`-p`,t];return vb(e,`assumeDefaults`)&&a.push(`--assume-defaults`),r&&a.push(`--answer`,`--no-edit`),a.push(`--`,n),i&&a.push(i),a}},clear:{id:`clear`,label:`刪除任務`,scope:`project`,fields:[Sb,{name:`run`,label:`任務 id`,kind:`text`,required:!0},{name:`dryRun`,label:`只預覽,不刪除`,kind:`checkbox`},{name:`keepWorktrees`,label:`保留 agent 的 worktree 與分支`,kind:`checkbox`}],mode:Cb(`short`),tier:e=>e.dryRun===!0?`normal`:`confirm`,target:Tb,argv:e=>{let t=bb(e),n=yb(_b(e,`run`,{required:!0,re:db,what:`任務 id`,max:120}));return[`clear`,`-p`,t,...vb(e,`dryRun`)?[`--dry-run`]:[],...vb(e,`keepWorktrees`)?[`--keep-worktrees`]:[],`--`,n]}},"clear.lock":{id:`clear.lock`,label:`清除殘留的 run lock`,scope:`project`,fields:[Sb,{name:`run`,label:`任務 id(只有一個 lock 時可留空)`,kind:`text`}],mode:Cb(`short`),tier:()=>`typed`,target:e=>typeof e.run==`string`&&e.run.trim()?e.run.trim():String(e.project??``),argv:e=>{let t=bb(e),n=_b(e,`run`,{re:db,what:`任務 id`,max:120});return[`clear`,`-p`,t,`--lock`,`--force`,...n?[`--`,n]:[]]}},doctor:{id:`doctor`,label:`檢查設定`,scope:`project`,fields:[Sb,{name:`resolved`,label:`顯示合併後的設定與來源`,kind:`checkbox`}],mode:Cb(`short`),tier:wb,target:Tb,argv:e=>[`doctor`,`-p`,bb(e),...vb(e,`resolved`)?[`--resolved`]:[]]},tidy:{id:`tidy`,label:`整理記憶`,scope:`project`,fields:[Sb,{name:`agent`,label:`只整理這一位 agent(可留空)`,kind:`text`},{name:`layer`,label:`層級`,kind:`select`,options:hb},{name:`dryRun`,label:`只預覽,不整理`,kind:`checkbox`},{name:`undo`,label:`還原某次整理(填時間戳,需指定 agent)`,kind:`text`}],mode:e=>e.dryRun===!0||typeof e.undo==`string`&&e.undo.trim()!==``?`short`:`detached`,tier:e=>e.dryRun===!0?`normal`:`confirm`,target:Tb,argv:e=>{let t=bb(e),n=_b(e,`agent`,{re:db,what:`agent`}),r=xb(e,`layer`,hb,`層級`),i=vb(e,`dryRun`),a=_b(e,`undo`,{re:db,what:`時間戳`,max:64});if(a!==void 0){if(i)throw new ub(`undo`,`還原不能和預覽一起用。`);if(!n)throw new ub(`agent`,`還原要指定是哪一位 agent。`)}let o=[`tidy`,`-p`,t];return n&&o.push(`--agent`,n),r&&o.push(`--layer`,r),i&&o.push(`--dry-run`),a!==void 0&&o.push(`--undo`,a),o}},demo:{id:`demo`,label:`示範`,scope:`home`,fields:[{name:`runtime`,label:`執行環境(可留空,自動偵測)`,kind:`select`,options:mb},{name:`setupOnly`,label:`只建立沙盒,不跑 agent`,kind:`checkbox`}],mode:e=>e.setupOnly===!0?`short`:`detached`,tier:wb,target:Tb,argv:e=>{let t=xb(e,`runtime`,mb,`執行環境`);return[`demo`,`-y`,...t?[`--runtime`,t]:[],...vb(e,`setupOnly`)?[`--setup-only`]:[]]}}};Object.keys(Eb);var Db={phase:`form`,errors:{}};function Ob(e,t){switch(t.type){case`submit`:return e.phase===`running`?e:{phase:`running`};case`typed`:return e.phase===`confirm`?{...e,typed:t.value}:e;case`back`:case`reset`:return e.phase===`running`?e:Db;case`result`:{if(e.phase!==`running`)return e;let n=t.result;return n.kind===`short`||n.kind===`job`?{phase:`done`,result:n}:n.kind===`need`?{phase:`confirm`,need:n.need,...n.target===void 0?{}:{target:n.target},typed:``}:n.kind===`invalid`?n.field?{phase:`form`,errors:{[n.field]:n.error}}:{phase:`form`,errors:{},notice:n.error}:n.kind===`stale`?{phase:`form`,errors:{},notice:`請求被拒絕,請重新整理頁面後再試。`}:{phase:`form`,errors:{},notice:n.message}}}}function kb(e){return e.phase===`confirm`&&(e.need===`confirm`||e.typed===e.target)}function Ab(){let e=0;return{next:()=>++e,invalidate:()=>{e+=1},isCurrent:t=>t===e}}var jb={ok:`text-signal`,warn:`text-warn`,fail:`text-failed`},Mb={ok:`✓`,warn:`!`,fail:`✕`},Nb=`min-h-11 w-full rounded-lg border border-line bg-wall px-3 py-2 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,Pb=`min-h-11 rounded-lg border border-line px-4 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal disabled:opacity-50`;function Fb(e,t){return e.fields.some(e=>e.name===`dryRun`)&&t.dryRun!==!0&&!t.undo}function Ib({id:e,open:t,title:n,fixed:r,initial:i,fieldOptions:a,onShortResult:o,onClose:s}){let c=Eb[e],[l,u]=(0,b.useState)(i??{}),[d,f]=(0,b.useReducer)(Ob,Db),[p,m]=(0,b.useState)(),[h,g]=(0,b.useState)({}),_=(0,b.useRef)(Ab());(0,b.useEffect)(()=>{t&&(_.current.invalidate(),u(i??{}),m(void 0),f({type:`reset`}))},[t]);let v=async(t={})=>{let n={...l,...r,...t},i=_.current.next();m(void 0),g(n),f({type:`submit`});let a=await jn(e,n);a.kind===`short`&&o?.(e,n,a.result),_.current.isCurrent(i)&&(a.kind===`need`&&Fb(c,n)&&jn(e,{...n,dryRun:!0,confirm:void 0,confirmText:void 0}).then(e=>{e.kind===`short`&&_.current.isCurrent(i)&&m(e.result.stdout||e.result.stderr||void 0)}),f({type:`result`,result:a}))},y=c.fields.filter(e=>!(r&&e.name in r)),x=d.phase===`running`;return(0,z.jsxs)(eb,{open:t,title:n??c.label,onClose:s,closable:!x,children:[(d.phase===`form`||d.phase===`running`)&&(0,z.jsxs)(`form`,{className:`mt-4 flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),x||v()},children:[y.map((e,t)=>(0,z.jsx)(Rb,{field:e,value:l[e.name],error:d.phase===`form`?d.errors[e.name]:void 0,options:a?.[e.name],autoFocus:t===0,onChange:t=>u(n=>({...n,[e.name]:t}))},e.name)),d.phase===`form`&&d.notice&&(0,z.jsx)(`p`,{role:`alert`,className:`text-pretty rounded-lg border border-failed/40 bg-failed-soft px-3 py-2 text-sm text-failed`,children:d.notice}),(0,z.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,disabled:x,className:Pb,onClick:s,children:`取消`}),(0,z.jsx)(`button`,{type:`submit`,disabled:x,className:R(Pb,`bg-ink text-paper`),children:x?`執行中…`:c.label})]})]}),d.phase===`confirm`&&(0,z.jsxs)(`div`,{className:`mt-4 flex flex-col gap-4`,children:[(0,z.jsxs)(`p`,{className:`text-pretty text-sm`,children:[`這個動作不能復原。確定要`,c.label,typeof h.run==`string`?`(${h.run})`:typeof h.name==`string`?`(${h.name})`:``,`嗎?`]}),p!==void 0&&(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`eyebrow`,children:`預覽(不會改動任何東西)`}),(0,z.jsx)(`pre`,{className:`mt-1 max-h-60 overflow-auto rounded-lg border border-line bg-wall p-3 font-mono text-xs whitespace-pre-wrap`,children:p})]}),d.need===`typed`&&(0,z.jsxs)(`label`,{className:`flex flex-col gap-1 text-sm`,children:[(0,z.jsxs)(`span`,{children:[`輸入 `,(0,z.jsx)(`strong`,{className:`font-mono`,children:d.target}),` 以確認`]}),(0,z.jsx)(`input`,{className:Nb,value:d.typed,autoComplete:`off`,onChange:e=>f({type:`typed`,value:e.target.value})})]}),(0,z.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,autoFocus:!0,className:Pb,onClick:s,children:`取消`}),(0,z.jsx)(`button`,{type:`button`,className:Pb,onClick:()=>{_.current.invalidate(),m(void 0),f({type:`back`})},children:`回上一步`}),(0,z.jsxs)(`button`,{type:`button`,disabled:!kb(d),className:R(Pb,`border-failed bg-failed text-paper`),onClick:()=>void v({confirm:!0,...d.need===`typed`?{confirmText:d.typed}:{}}),children:[`確定`,c.label]})]})]}),d.phase===`done`&&(0,z.jsx)(Lb,{result:d.result,onClose:s})]})}function Lb({result:e,onClose:t}){if(e.kind===`job`)return(0,z.jsxs)(`div`,{className:`mt-4 flex flex-col gap-4`,children:[(0,z.jsxs)(`p`,{className:`text-sm`,children:[(0,z.jsx)(`span`,{"aria-hidden":!0,className:`mr-1 text-signal`,children:`✓`}),`已在背景啟動(pid `,e.job.pid,`)。關掉這個頁面也會繼續跑。`]}),(0,z.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,z.jsx)(`a`,{className:R(Pb,`inline-flex items-center`),href:`#!jobs`,onClick:t,children:`看任務輸出`}),(0,z.jsx)(`button`,{type:`button`,autoFocus:!0,className:R(Pb,`bg-ink text-paper`),onClick:t,children:`關閉`})]})]});if(e.kind!==`short`)return null;let n=Lo(e.result.exit,e.result.timedOut),r=[e.result.stdout,e.result.stderr].filter(Boolean).join(`
|
|
86
|
-
`);return(0,z.jsxs)(`div`,{className:`mt-4 flex flex-col gap-4`,children:[(0,z.jsxs)(`p`,{className:R(`flex flex-wrap items-center gap-2 text-sm font-medium`,jb[n.tone]),children:[(0,z.jsx)(`span`,{"aria-hidden":!0,children:Mb[n.tone]}),n.text,e.result.signal?(0,z.jsxs)(`span`,{className:`font-mono text-xs`,children:[`(訊號 `,e.result.signal,`)`]}):null]}),r&&(0,z.jsx)(`pre`,{className:`max-h-80 overflow-auto rounded-lg border border-line bg-wall p-3 font-mono text-xs whitespace-pre-wrap`,children:r}),e.result.truncated&&(0,z.jsx)(`p`,{className:`text-xs text-ink/60`,children:`輸出太長,已截斷。`}),(0,z.jsx)(`div`,{className:`flex justify-end`,children:(0,z.jsx)(`button`,{type:`button`,autoFocus:!0,className:R(Pb,`bg-ink text-paper`),onClick:t,children:`關閉`})})]})}function Rb({field:e,value:t,error:n,options:r,autoFocus:i,onChange:a}){let o=(0,b.useId)(),s=`${o}-err`,c={id:o,"aria-invalid":n?!0:void 0,"aria-describedby":n?s:void 0,autoFocus:i},l=r??e.options;return(0,z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e.kind===`checkbox`?(0,z.jsxs)(`label`,{className:`flex min-h-11 items-center gap-3 text-sm`,children:[(0,z.jsx)(`input`,{type:`checkbox`,className:`size-5`,checked:t===!0,onChange:e=>a(e.target.checked),...c}),(0,z.jsx)(`span`,{children:e.label})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`label`,{htmlFor:o,className:`text-sm font-medium`,children:[e.label,e.required&&(0,z.jsx)(`span`,{"aria-hidden":!0,className:`text-failed`,children:` *`})]}),e.kind===`textarea`?(0,z.jsx)(`textarea`,{className:R(Nb,`min-h-32`),value:typeof t==`string`?t:``,onChange:e=>a(e.target.value),...c}):l?(0,z.jsxs)(`select`,{className:Nb,value:typeof t==`string`?t:``,onChange:e=>a(e.target.value),...c,children:[(0,z.jsx)(`option`,{value:``,children:e.required?`請選擇`:`(預設)`}),l.map(e=>(0,z.jsx)(`option`,{value:e,children:e},e))]}):(0,z.jsx)(`input`,{className:Nb,value:typeof t==`string`?t:``,autoComplete:`off`,onChange:e=>a(e.target.value),...c})]}),e.help&&!n&&(0,z.jsx)(`p`,{className:`text-xs text-ink/60`,children:e.help}),n&&(0,z.jsx)(`p`,{id:s,role:`alert`,className:`text-sm text-failed`,children:n})]})}function zb(e){return e?e.state!==`running`||e.live===!1:!1}var Bb=`lyceum.summaries`,Vb=(e,t)=>`${e}/${t}`;function Hb(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.text==`string`&&t.text.trim().length>0&&typeof t.generatedAt==`number`}function Ub(e){try{let t=JSON.parse(e().getItem(Bb)??`{}`);return!t||typeof t!=`object`||Array.isArray(t)?{}:Object.fromEntries(Object.entries(t).filter(([,e])=>Hb(e)))}catch{return{}}}function Wb(e,t){let n=Object.entries(t).sort(([,e],[,t])=>t.generatedAt-e.generatedAt);for(let t=n.length;t>=Math.min(1,n.length);t--)try{e().setItem(Bb,JSON.stringify(Object.fromEntries(n.slice(0,t))));return}catch{}}function Gb(e){let t=new Set,n=new Set;return{load:(t,n)=>Ub(e)[Vb(t,n)]??null,save:(r,i,a)=>{let o=Vb(r,i);t.has(o)||n.has(r)||Wb(e,{...Ub(e),[o]:a})},forget:(n,r)=>{let i=Vb(n,r);t.add(i);let a=Ub(e);i in a&&(delete a[i],Wb(e,a))},forgetProject:t=>{n.add(t);let r=`${t}/`,i=Ub(e),a=Object.fromEntries(Object.entries(i).filter(([e])=>!e.startsWith(r)));Object.keys(a).length!==Object.keys(i).length&&Wb(e,a)}}}var Kb=Gb(()=>window.localStorage);function qb(e){return(t,n,r)=>{r.exit===0&&(t===`clear`&&n.dryRun!==!0&&typeof n.project==`string`&&typeof n.run==`string`?e.forget(n.project,n.run):t===`project.remove`&&n.purge===!0&&typeof n.name==`string`&&e.forgetProject(n.name))}}var Jb=qb(Kb),Yb=`min-h-11 rounded-lg border border-line bg-paper px-3 text-sm hover:bg-wall focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`;function Xb({project:e,run:t}){let[n,r]=(0,b.useState)(),i=()=>r(void 0),a=zb(t),o=!!t?.ask&&t.ask.unanswered>0;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{role:`toolbar`,"aria-label":`操作`,className:`flex flex-wrap gap-2`,children:[(0,z.jsx)(`button`,{type:`button`,className:Yb,onClick:()=>r({id:`run`}),children:`新任務`}),o&&t&&(0,z.jsxs)(`button`,{type:`button`,className:`${Yb} border-warn/60 bg-warn-soft text-warn`,onClick:()=>r(`answer`),children:[`回答問題(`,t.ask?.unanswered,`)`]}),a&&t&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`button`,{type:`button`,className:Yb,onClick:()=>r({id:`resume`,initial:{run:t.run_id}}),children:`續跑/追問`}),(0,z.jsx)(`button`,{type:`button`,className:Yb,onClick:()=>r({id:`clear`,initial:{run:t.run_id}}),children:`刪除這次任務`})]}),t&&(0,z.jsx)(`button`,{type:`button`,className:Yb,onClick:()=>r(`reports`),children:`查看報告`}),(0,z.jsx)(`button`,{type:`button`,className:Yb,onClick:()=>r({id:`tidy`}),children:`整理記憶`}),(0,z.jsx)(`button`,{type:`button`,className:Yb,onClick:()=>r({id:`doctor`}),children:`檢查設定`})]}),n&&n!==`answer`&&n!==`reports`&&(0,z.jsx)(Ib,{id:n.id,open:!0,fixed:{project:e},initial:n.initial,onShortResult:Jb,onClose:i}),t&&(0,z.jsx)(cb,{project:e,runId:t.run_id,open:n===`reports`,onClose:i}),t&&(0,z.jsx)(rb,{project:e,runId:t.run_id,open:n===`answer`,onClose:i})]})}function Zb({run:e,agents:t,now:n}){let r=Fy(e,t,n);return(0,z.jsxs)(`figure`,{className:`panel p-3 sm:p-4`,children:[(0,z.jsx)(`figcaption`,{className:`text-balance text-base font-semibold`,children:`喚醒時間軸`}),r?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`mt-3 space-y-1`,children:r.lanes.map(e=>(0,z.jsxs)(`div`,{className:`grid grid-cols-[5rem_minmax(0,1fr)] sm:grid-cols-[7rem_minmax(0,1fr)] items-center gap-2`,children:[(0,z.jsx)(`div`,{className:`truncate font-mono text-xs text-ink/80`,title:e.agent,children:e.agent}),(0,z.jsxs)(`svg`,{viewBox:`0 0 1000 28`,preserveAspectRatio:`none`,className:`h-7 w-full`,role:`img`,"aria-label":`${e.agent} 的喚醒`,children:[(0,z.jsx)(`line`,{x1:`0`,x2:`1000`,y1:`20`,y2:`20`,className:`stroke-line`}),e.bars.map((e,t)=>(0,z.jsx)(`rect`,{x:e.x,y:e.live?6:8,width:Math.max(e.width,4),height:e.live?16:12,rx:`3`,className:e.live?`fill-none stroke-working`:e.ok?`fill-signal/70`:`fill-failed`,strokeWidth:e.live?8:0,children:(0,z.jsx)(`title`,{children:e.title})},`${e.x}-${t}`))]})]},e.agent))}),(0,z.jsxs)(`div`,{className:`mt-1 grid grid-cols-[5rem_minmax(0,1fr)] sm:grid-cols-[7rem_minmax(0,1fr)] text-xs tabular-nums text-ink/60`,children:[(0,z.jsx)(`span`,{}),(0,z.jsxs)(`span`,{className:`flex justify-between`,children:[(0,z.jsx)(`span`,{children:Py(r.start)}),(0,z.jsx)(`span`,{children:Py(r.end)})]})]}),(0,z.jsx)(`p`,{className:`text-pretty mt-2 text-sm text-ink/70`,children:`實心是已結束的喚醒,框線延伸到現在的是還在跑的。紅色是失敗。把游標放在色塊上看該輪的時間、token 與錯誤。`})]}):(0,z.jsx)(`p`,{className:`text-pretty mt-3 text-sm`,children:`這個任務還沒有喚醒紀錄。`})]})}function Qb({run:e}){let t=Ry(e),n=Math.max(1,...t.map(e=>e.output)),r=Ay(e?.cache_read_tokens??0,e?.cache_write_tokens??0);return(0,z.jsxs)(`section`,{className:`panel p-3 sm:p-4`,children:[(0,z.jsx)(`h2`,{className:`text-balance text-base font-semibold`,children:`Token 與快取`}),t.length===0?(0,z.jsx)(`p`,{className:`text-pretty mt-3 text-sm`,children:`還沒有 token 紀錄。`}):(0,z.jsx)(`ul`,{className:`mt-3 grid gap-x-8 gap-y-3 lg:grid-cols-2`,children:t.map(e=>(0,z.jsxs)(`li`,{children:[(0,z.jsxs)(`div`,{className:`flex justify-between gap-3 text-sm`,children:[(0,z.jsx)(`span`,{className:`truncate`,children:e.agent}),(0,z.jsxs)(`span`,{className:`shrink-0 font-mono text-xs tabular-nums text-ink/70`,children:[xy(e.output),e.cacheRead+e.cacheWrite>0?`,快取讀 ${xy(e.cacheRead)}`:``,e.failed>0?`,失敗 ${e.failed}`:``]})]}),(0,z.jsx)(`div`,{className:`mt-1.5 h-2 overflow-hidden rounded-full bg-wall`,title:`輸出 ${e.output},快取讀 ${e.cacheRead},寫 ${e.cacheWrite}`,children:(0,z.jsx)(`div`,{className:`h-full rounded-full bg-signal`,style:{width:`${e.output/n*100}%`}})})]},e.agent))}),(0,z.jsx)(`p`,{className:`text-pretty mt-3 text-sm text-ink/70`,children:r||`這個 run 沒有快取紀錄(Codex 與較舊的 run 不會有)。`}),(0,z.jsx)(`p`,{className:`text-pretty text-sm text-ink/70`,children:`長條是輸出 token,相對輸出最多的 agent。`})]})}function $b({project:e,runId:t}){let[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(),[o,s]=(0,b.useState)(()=>Kb.load(e,t)?.text);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(He,{type:`button`,disabled:n,className:`panel shrink-0 self-stretch px-4 text-sm font-medium hover:bg-wall disabled:opacity-60`,onClick:()=>{r(!0),a(void 0),fetch(`/summary`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({project:e,runId:t})}).then(tx).then(n=>{Kb.save(e,t,{text:n,generatedAt:Date.now()}),s(n)}).catch(e=>a(e instanceof Error?e.message:`沒有寫出摘要。`)).finally(()=>r(!1))},children:n?`正在總結`:`總結進度`}),(i||n||o)&&(0,z.jsxs)(`div`,{className:`basis-full`,"aria-live":`polite`,children:[i&&(0,z.jsx)(`p`,{className:`text-pretty mt-3 text-sm text-failed`,children:i}),n&&(0,z.jsxs)(`div`,{className:`mt-4 space-y-2`,"aria-hidden":`true`,children:[(0,z.jsx)(`div`,{className:`h-3 animate-pulse rounded bg-line`}),(0,z.jsx)(`div`,{className:`h-3 w-2/3 animate-pulse rounded bg-line`})]}),!n&&o&&(0,z.jsx)(`div`,{className:`panel mt-3 px-4 pb-4`,children:ex(o).map((e,t)=>(0,z.jsx)(`p`,{className:`text-pretty mt-4 text-base leading-relaxed`,children:e},`${t}-${e.slice(0,24)}`))})]})]})}function ex(e){return e.trim().split(/\n{2,}/).map(e=>e.replace(/\s*\n\s*/g,` `).trim()).filter(Boolean)}async function tx(e){let t={};try{t=await e.json()}catch{throw Error(`沒有寫出摘要。`)}if(!e.ok||!t.text?.trim())throw Error(t.error||`沒有寫出摘要。`);return t.text.trim()}function nx({name:e,frame:t,runId:n,now:r,onRun:i}){if(t.error)return(0,z.jsxs)(`article`,{className:`enter animate-in fade-in p-6 duration-200`,children:[(0,z.jsx)(`h1`,{className:`text-balance text-2xl font-semibold tracking-tight`,children:e}),(0,z.jsx)(`p`,{className:`text-pretty mt-3 text-sm text-failed`,children:t.error}),(0,z.jsxs)(`p`,{className:`text-pretty mt-2 text-sm`,children:[`在終端執行 agent-lyceum status -p `,e,` 看這個專案。`]})]});let a=Dy(t),o=a.find(e=>e.run?.run_id===n)??Oy(t),s=o?.run,c=o?.agents??t.report?.agents??[],l=Hy(c,s);return(0,z.jsxs)(`div`,{className:`enter animate-in fade-in grid w-full gap-4 p-3 duration-200 sm:gap-6 sm:p-4 lg:grid-cols-[minmax(0,1fr)_18rem] lg:p-6 2xl:grid-cols-[minmax(0,1fr)_22rem]`,children:[(0,z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4 sm:gap-6`,children:[(0,z.jsxs)(`header`,{children:[(0,z.jsx)(`p`,{className:`eyebrow`,children:e}),s?(0,z.jsx)(rx,{name:e,run:s,now:r}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`h1`,{className:`text-balance mt-2 text-2xl font-semibold tracking-tight`,children:`還沒有任務`}),(0,z.jsx)(`p`,{className:`text-pretty mt-3 text-sm`,children:`註冊的 agent 列在下面。`})]}),(0,z.jsx)(`div`,{className:`mt-4`,children:(0,z.jsx)(Xb,{project:e,run:s})})]}),s?.ask&&s.ask.unanswered>0&&(0,z.jsxs)(`p`,{className:`text-pretty mt-4 rounded-lg border border-warn/40 bg-warn-soft px-3 py-2 text-sm text-warn`,children:[`等待回答 `,s.ask.unanswered,`/`,s.ask.total,`。檔案在 `,s.ask.path]}),s?.failure&&(0,z.jsxs)(`div`,{className:`mt-4 rounded-lg border border-failed/40 bg-failed-soft px-3 py-2`,children:[(0,z.jsxs)(`p`,{className:`text-sm text-failed`,children:[s.failure.agent,` 連續失敗 `,s.failure.attempts,` 次`]}),s.failure.error&&(0,z.jsx)(`p`,{className:`text-pretty mt-1 text-sm leading-relaxed text-failed`,children:_y(s.failure.error)})]}),l.length>0&&(0,z.jsx)(Gy,{agents:c,run:s,now:r}),(0,z.jsx)(Zb,{run:s,agents:c,now:r}),l.length===0&&(0,z.jsx)(Gy,{agents:c,run:s,now:r}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-4 sm:gap-6`,children:[(0,z.jsx)(Qb,{run:s}),s&&(0,z.jsx)(ox,{report:o})]})]}),(0,z.jsx)(ax,{reports:a,currentId:s?.run_id,onRun:i})]})}function rx({name:e,run:t,now:n}){let r=t.task_summary||t.name||t.run_id,i=Ay(t.cache_read_tokens,t.cache_write_tokens),a=t.live===!1&&t.state===`running`;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`h1`,{className:`mt-1 text-balance text-2xl font-semibold leading-snug tracking-tight wrap-break-word md:text-3xl`,children:r}),(0,z.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-stretch gap-3`,children:[(0,z.jsxs)(`dl`,{className:`grid min-w-0 flex-1 grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-5`,children:[(0,z.jsxs)(`div`,{className:`panel px-3 py-2`,children:[(0,z.jsx)(`dt`,{className:`eyebrow`,children:`狀態`}),(0,z.jsxs)(`dd`,{className:R(`mt-1 flex items-center gap-2 font-mono text-lg tabular-nums`,dx(t)),children:[t.state===`running`&&(0,z.jsx)(`span`,{"aria-hidden":!0,className:`pulse-dot size-2 rounded-full bg-signal`}),Sy(t)]}),a&&(0,z.jsx)(`p`,{className:`text-pretty mt-1 text-sm text-failed`,children:`程序已不存在`})]}),(0,z.jsx)(ix,{label:`輪次`,value:`第 ${wy(t.rounds,t.max_rounds)} 輪`}),(0,z.jsx)(ix,{label:`token`,value:xy(t.output_tokens)}),(0,z.jsx)(ix,{label:`已經過`,value:My(t,n)}),(0,z.jsx)(ix,{label:`進度`,value:Ty(t)})]}),(0,z.jsx)($b,{project:e,runId:t.run_id},`${e}/${t.run_id}`)]}),i&&(0,z.jsx)(`p`,{className:`mt-3 font-mono text-sm tabular-nums text-ink/70`,children:i}),t.current_step&&(0,z.jsxs)(`p`,{className:`text-pretty mt-3 text-sm text-ink/80`,children:[(0,z.jsx)(`span`,{className:`eyebrow mr-2`,children:`目前`}),t.current_step]})]})}function ix({label:e,value:t}){return(0,z.jsxs)(`div`,{className:`panel px-3 py-2`,children:[(0,z.jsx)(`dt`,{className:`eyebrow`,children:e}),(0,z.jsx)(`dd`,{className:`mt-1 font-mono text-lg tabular-nums`,children:t})]})}function ax({reports:e,currentId:t,onRun:n}){return(0,z.jsxs)(`aside`,{className:`panel p-3 lg:sticky lg:top-14 lg:max-h-[calc(100dvh-4.5rem)] lg:self-start lg:overflow-y-auto`,children:[(0,z.jsx)(`h2`,{className:`eyebrow`,children:`較早班次`}),e.length===0?(0,z.jsx)(`p`,{className:`text-pretty mt-3 text-sm`,children:`這個專案還沒有任務。`}):(0,z.jsx)(`div`,{className:`mt-3 max-lg:flex max-lg:gap-2 max-lg:overflow-x-auto [&>button]:max-lg:w-64 [&>button]:max-lg:shrink-0`,children:e.map(e=>{let r=e.run;if(!r)return null;let i=r.run_id===t;return(0,z.jsxs)(He,{type:`button`,"aria-current":i?`true`:void 0,className:R(`block min-h-11 w-full rounded-lg border px-3 py-2.5 text-left`,i?`border-line bg-wall`:`border-transparent hover:bg-wall/70`),onClick:()=>n(r.run_id),children:[(0,z.jsxs)(`span`,{className:`flex items-baseline justify-between gap-3 font-mono text-xs tabular-nums`,children:[(0,z.jsx)(`span`,{className:`text-ink/70`,children:ux(r.started_at)}),(0,z.jsx)(`span`,{className:dx(r),children:Sy(r)})]}),(0,z.jsx)(`span`,{className:R(`text-pretty mt-1 block text-sm`,i&&`font-medium`),children:r.task_summary||r.name||r.run_id})]},r.run_id)})})]})}function ox({report:e}){let t=e?.run;if(!t)return null;let n=t.steps??[];return(0,z.jsxs)(`section`,{className:`panel p-3 sm:p-4`,children:[(0,z.jsx)(`h2`,{className:`text-balance text-base font-semibold`,children:`這次任務`}),(0,z.jsxs)(`div`,{className:`grid gap-x-8 md:grid-cols-2 2xl:grid-cols-3`,children:[n.length>0&&(0,z.jsx)(`ol`,{className:`mt-3 list-decimal space-y-1 pl-5 text-sm`,children:n.map(e=>(0,z.jsx)(`li`,{className:R(`text-pretty`,e.done&&`text-ink/60 line-through`),children:e.text},e.text))}),(t.queue??[]).length>0&&(0,z.jsxs)(`div`,{className:`mt-6`,children:[(0,z.jsx)(`h3`,{className:`eyebrow text-balance`,children:`佇列`}),(t.queue??[]).map((e,t)=>(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`mt-4 text-sm text-ink/60`,children:e.agent}),(0,z.jsx)(hy,{mail:e})]},`${t}-${e.agent}-${e.subject}`))]}),(t.blocked_integrations??[]).length>0&&(0,z.jsxs)(`div`,{className:`mt-6`,children:[(0,z.jsx)(`h3`,{className:`eyebrow text-balance`,children:`受阻的整合`}),(t.blocked_integrations??[]).map(e=>(0,z.jsxs)(`div`,{className:`mt-3`,children:[(0,z.jsxs)(`p`,{className:`text-sm`,children:[e.agent,` `,(0,z.jsx)(`span`,{className:`text-ink/60`,children:e.branch})]}),(0,z.jsx)(`p`,{className:`text-pretty mt-1 text-sm leading-relaxed`,children:e.reason})]},`${e.agent}-${e.branch}`))]}),(t.notes??[]).length>0&&(0,z.jsxs)(`div`,{className:`mt-6`,children:[(0,z.jsx)(`h3`,{className:`eyebrow text-balance`,children:`備註`}),(t.notes??[]).map((e,t)=>(0,z.jsx)(sx,{text:e},`${t}-${e.slice(0,24)}`))]}),(e?.memory_advice??[]).length>0&&(0,z.jsxs)(`div`,{className:`mt-6`,children:[(0,z.jsx)(`h3`,{className:`eyebrow text-balance`,children:`記憶建議`}),(e?.memory_advice??[]).map(e=>(0,z.jsx)(cx,{text:e},e))]}),(t.result_head??[]).length>0&&(0,z.jsx)(lx,{lines:t.result_head??[]})]})]})}function sx({text:e}){let{head:t,body:n}=vy(e),r=_y(n),i=n.length>r.length+40;return(0,z.jsxs)(vs,{className:`group mt-3`,children:[t&&(0,z.jsx)(`p`,{className:`text-sm`,children:t}),(0,z.jsx)(`p`,{className:R(`text-pretty text-sm leading-relaxed`,t&&`mt-1`),children:r}),i&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(bs,{className:`mt-1 text-sm text-ink/60`,children:[(0,z.jsx)(`span`,{className:`group-data-[open]:hidden`,children:`展開全文`}),(0,z.jsx)(`span`,{className:`hidden group-data-[open]:inline`,children:`收合全文`})]}),(0,z.jsx)(Hs,{children:(0,z.jsx)(`p`,{className:`mt-2 whitespace-pre-wrap text-sm leading-relaxed text-ink/80`,children:n})})]})]})}function cx({text:e}){let t=e.indexOf(`:`);return t===-1?(0,z.jsx)(`p`,{className:`text-pretty mt-2 text-sm leading-relaxed`,children:e}):(0,z.jsxs)(`div`,{className:`mt-3`,children:[(0,z.jsx)(`p`,{className:`text-sm`,children:e.slice(0,t).trim()}),(0,z.jsx)(`p`,{className:`text-pretty mt-0.5 text-sm leading-relaxed text-ink/80`,children:e.slice(t+1).trim()})]})}function lx({lines:e}){return(0,z.jsxs)(`div`,{className:`mt-6`,children:[(0,z.jsx)(`h3`,{className:`eyebrow text-balance`,children:`結果`}),yy(e).map((e,t)=>e.kind===`title`?(0,z.jsx)(`p`,{className:`text-pretty mt-2 text-base font-semibold leading-snug`,children:e.text},t):e.kind===`label`?(0,z.jsx)(`p`,{className:`mt-3 text-sm text-ink/60`,children:e.text},t):e.kind===`fact`?(0,z.jsxs)(`p`,{className:`mt-2 flex gap-3 text-sm`,children:[(0,z.jsx)(`span`,{className:`w-16 shrink-0 sm:w-20 text-ink/60`,children:e.text}),(0,z.jsx)(`span`,{children:e.extra})]},t):(0,z.jsx)(`p`,{className:`text-pretty mt-2 leading-relaxed`,children:e.text},t))]})}function ux(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleString(`zh-Hant`,{month:`numeric`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function dx(e){return e.state===`running`?`text-signal`:e.outcome===`failed`?`text-failed`:`text-ink`}function fx(e){if(e.error)return`讀不到`;let t=Oy(e)?.run;if(!t)return`閒置`;let n=Object.keys(t.active),r=t.state===`running`&&n.length>0?` ${n.join(` `)}`:``;return`${Sy(t)}${r}`}function px(e,t){return e===`down`?`正在連上本機狀態…`:t===0?`還沒有已註冊的專案。用 agent-lyceum project add 註冊一個。`:`選一個專案。`}var mx=[{id:`project.add`,blurb:`把一個 repo 註冊成專案。`},{id:`project.remove`,blurb:`取消註冊;預設保留 context。`},{id:`call`,blurb:`不開專案,直接請全域 library 的某位 agent 做一件事。`},{id:`clear.lock`,blurb:`run 當掉後留下的鎖,確認沒人在跑再清。`},{id:`demo`,blurb:`在沙盒裡跑一次完整示範。`},{id:`init`,blurb:`建立 home 與預設的全域 agent library。`}];function hx({projects:e}){let[t,n]=(0,b.useState)();return(0,z.jsxs)(`article`,{className:`enter animate-in fade-in p-4 duration-200 sm:p-6`,children:[(0,z.jsx)(`h1`,{className:`text-balance text-2xl font-semibold tracking-tight`,children:`工具`}),(0,z.jsx)(`p`,{className:`text-pretty mt-2 text-sm`,children:`專案內的操作(新任務、續跑、回答問題…)在各專案頁面上。這裡放不屬於單一專案的。`}),(0,z.jsx)(`ul`,{className:`mt-6 grid gap-3 sm:grid-cols-2 xl:grid-cols-3`,children:mx.map(e=>(0,z.jsxs)(`li`,{className:`panel flex flex-col gap-3 p-4`,children:[(0,z.jsx)(`h2`,{className:`font-medium`,children:Eb[e.id].label}),(0,z.jsx)(`p`,{className:`text-pretty text-sm text-ink/70`,children:e.blurb}),(0,z.jsxs)(`button`,{type:`button`,className:`mt-auto min-h-11 self-start rounded-lg border border-line bg-paper px-4 text-sm hover:bg-wall focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,onClick:()=>n(e.id),children:[Eb[e.id].label,`…`]})]},e.id))}),t&&(0,z.jsx)(Ib,{id:t,open:!0,fieldOptions:t===`project.remove`?{name:e}:t===`clear.lock`?{project:e}:void 0,onShortResult:Jb,onClose:()=>n(void 0)})]})}function gx(){let[e,t]=(0,b.useState)(()=>new Map),[n,r]=(0,b.useState)(`down`),[i,a]=(0,b.useState)(()=>Date.now()),[o,s]=(0,b.useState)(vx),[c,l]=(0,b.useState)(0),[u,d]=(0,b.useState)(void 0);(0,b.useEffect)(()=>{let e=new EventSource(`/events`);return e.onopen=()=>r(`up`),e.onerror=()=>r(`down`),e.onmessage=e=>{let n=JSON.parse(e.data);n.type===`quota`?d(n.reports):(n.type===`snapshot`&&n.quota&&d(n.quota),t(e=>yx(e,n)))},()=>e.close()},[c]),(0,b.useEffect)(()=>{let e=window.setInterval(()=>a(Date.now()),1e3);return()=>window.clearInterval(e)},[]),(0,b.useEffect)(()=>{let e=()=>s(vx());return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let f=[...e.keys()].sort((t,n)=>bx(e.get(t))-bx(e.get(n))||t.localeCompare(n)),p=o.project&&e.has(o.project)?o.project:f[0],m=p?e.get(p):void 0;return(0,z.jsxs)(`div`,{className:`grid h-dvh grid-cols-1 grid-rows-[auto_minmax(0,1fr)] bg-wall md:grid-cols-[14rem_minmax(0,1fr)] md:grid-rows-1 xl:grid-cols-[16rem_minmax(0,1fr)]`,children:[(0,z.jsxs)(`nav`,{"aria-label":`已註冊專案`,className:`inset-safe z-20 flex items-center gap-2 overflow-x-auto border-b border-line bg-paper p-3 md:sticky md:top-0 md:h-dvh md:flex-col md:items-stretch md:overflow-y-auto md:border-r md:border-b-0`,children:[(0,z.jsx)(`p`,{className:`eyebrow hidden px-2 pt-2 pb-1 md:block`,children:`專案`}),f.length===0?(0,z.jsx)(`p`,{className:`text-pretty px-2 text-sm`,children:n===`up`?`還沒有已註冊的專案。`:`正在連上本機狀態…`}):f.map(t=>{let n=e.get(t),r=!o.view&&t===p,i=n?Oy(n)?.run?.state===`running`:!1;return(0,z.jsxs)(He,{type:`button`,className:R(`min-h-11 min-w-36 shrink-0 rounded-lg border px-3 py-2 text-left md:min-w-0`,r?`border-line bg-wall`:`border-transparent hover:bg-wall/70`),onClick:()=>_x(t),children:[(0,z.jsxs)(`span`,{className:`flex items-center gap-2 truncate text-sm font-medium`,children:[(0,z.jsx)(`span`,{"aria-hidden":!0,className:R(`size-2 shrink-0 rounded-full`,i?`pulse-dot bg-signal`:n?.error?`bg-failed`:`bg-ink/25`)}),(0,z.jsx)(`span`,{className:`truncate`,children:t})]}),(0,z.jsx)(`span`,{className:R(`mt-0.5 block truncate pl-4 font-mono text-xs tabular-nums`,i?`text-signal`:`text-ink/60`),children:n?fx(n):``})]},t)}),(0,z.jsx)(`div`,{className:`flex items-center gap-2 md:mt-4 md:flex-col md:items-stretch md:border-t md:border-line md:pt-3`,children:[[`decisions`,`決策`],[`tools`,`工具`],[`jobs`,`任務輸出`]].map(([e,t])=>(0,z.jsx)(`a`,{href:`#!${e}`,"aria-current":o.view===e?`page`:void 0,className:R(`inline-flex min-h-11 min-w-24 shrink-0 items-center rounded-lg border px-3 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-signal`,o.view===e?`border-line bg-wall`:`border-transparent hover:bg-wall/70`),children:t},e))}),n===`down`&&(0,z.jsx)(He,{type:`button`,className:`min-h-11 shrink-0 rounded-lg border border-line px-3 text-sm underline md:hidden`,onClick:()=>l(e=>e+1),children:`重新連線`}),(0,z.jsx)(`div`,{className:`mt-auto hidden px-2 pb-2 md:block`,children:n===`up`?(0,z.jsxs)(`p`,{className:`flex items-center gap-2 text-xs text-ink/60`,children:[(0,z.jsx)(`span`,{"aria-hidden":!0,className:`size-1.5 rounded-full bg-signal`}),`即時更新`]}):(0,z.jsx)(He,{type:`button`,className:`text-sm underline`,onClick:()=>l(e=>e+1),children:`重新連線`})})]}),(0,z.jsxs)(`main`,{className:`min-h-0 overflow-y-auto bg-wall`,children:[(n===`up`||u&&u.length>0)&&(0,z.jsx)(Tn,{reports:u??[],onReports:d}),o.view===`decisions`?(0,z.jsx)(Po,{}):o.view===`tools`?(0,z.jsx)(hx,{projects:f}):o.view===`jobs`?(0,z.jsx)(zo,{}):m&&p?(0,z.jsx)(nx,{name:p,frame:m,runId:o.project===p?o.run:void 0,now:i,onRun:e=>_x(p,e)}):(0,z.jsxs)(`article`,{className:`enter animate-in fade-in p-4 duration-200 sm:p-6`,children:[(0,z.jsx)(`h1`,{className:`text-balance text-2xl font-semibold tracking-tight`,children:px(n,f.length)}),n===`up`&&f.length===0&&(0,z.jsx)(`p`,{className:`text-pretty mt-3 text-sm`,children:`在終端執行 agent-lyceum project add 註冊一個專案。`}),n===`down`&&(0,z.jsx)(He,{type:`button`,className:`mt-4 min-h-11 rounded-md border border-line bg-paper px-4 py-1.5 text-sm hover:bg-wall`,onClick:()=>l(e=>e+1),children:`重新連線`})]})]})]})}function _x(e,t){let n=t?`${encodeURIComponent(e)}/${encodeURIComponent(t)}`:encodeURIComponent(e);location.hash=n}function vx(){try{let e=decodeURIComponent(location.hash.replace(/^#/,``));if(!e)return{};if(e===`!tools`||e===`!jobs`||e===`!decisions`)return{view:e.slice(1)};let t=e.indexOf(`/`);return t===-1?{project:e}:{project:e.slice(0,t),run:e.slice(t+1)}}catch{return{}}}function yx(e,t){if(t.type===`quota`)return e;if(t.type===`snapshot`)return new Map(t.projects.map(e=>[e.name,e.frame]));let n=new Map(e);return t.type===`removed`?n.delete(t.name):n.set(t.name,t.frame),n}function bx(e){if(!e||e.error)return 3;let t=Oy(e)?.run?.state;return t===`running`?0:t?1:2}var xx=document.getElementById(`root`);xx&&(0,Ue.createRoot)(xx).render((0,z.jsx)(b.StrictMode,{children:(0,z.jsx)(gx,{})}));
|