browsentic 0.4.6 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +100 -19
- package/dist/daemon-main.js +114 -21
- package/extension/chrome-mv3/assets/globals-DF66MUxu.css +2 -0
- package/extension/chrome-mv3/background.js +12 -12
- package/extension/chrome-mv3/chunks/globals-DAVXgO1U.js +177 -0
- package/extension/chrome-mv3/chunks/popup-BBVQYKJE.js +1 -0
- package/extension/chrome-mv3/chunks/sidepanel-BTSXdzrt.js +11 -0
- package/extension/chrome-mv3/content-scripts/content.js +22 -22
- package/extension/chrome-mv3/manifest.json +1 -1
- package/extension/chrome-mv3/popup.html +3 -3
- package/extension/chrome-mv3/sidepanel.html +3 -3
- package/package.json +1 -1
- package/skills/a-eye.md +3 -3
- package/extension/chrome-mv3/assets/globals-BOLwDXwQ.css +0 -2
- package/extension/chrome-mv3/chunks/globals-DIBegMWk.js +0 -137
- package/extension/chrome-mv3/chunks/popup-yL0itqnF.js +0 -1
- package/extension/chrome-mv3/chunks/sidepanel-WyGwqwXh.js +0 -11
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./rolldown-runtime-Bh1tDfsg.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var ee=Array.isArray;function te(){}var S={H:null,A:null,T:null,S:null},ne=Object.prototype.hasOwnProperty;function re(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ie(e,t){return re(e.type,t,e.props)}function ae(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function oe(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var se=/\/+/g;function ce(e,t){return typeof e==`object`&&e&&e.key!=null?oe(``+e.key):t.toString(36)}function le(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(te,te):(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 ue(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,ue(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ce(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(se,`$&/`)+`/`),ue(o,r,i,``,function(e){return e})):o!=null&&(ae(o)&&(o=ie(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(se,`$&/`)+`/`)+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+ce(a,u),c+=ue(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ce(a,u++),c+=ue(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ue(le(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 de(e,t,n){if(e==null)return e;var r=[],i=0;return ue(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function fe(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var C=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)},w={map:de,forEach:function(e,t,n){de(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return de(e,function(){t++}),t},toArray:function(e){return de(e,function(e){return e})||[]},only:function(e){if(!ae(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=w,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return S.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!ne.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 re(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)ne.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 re(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ae,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:fe}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=S.T,n={};S.T=n;try{var r=e(),i=S.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(te,C)}catch(e){C(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),S.T=t}},e.unstable_useCacheRefresh=function(){return S.H.useCacheRefresh()},e.use=function(e){return S.H.use(e)},e.useActionState=function(e,t,n){return S.H.useActionState(e,t,n)},e.useCallback=function(e,t){return S.H.useCallback(e,t)},e.useContext=function(e){return S.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return S.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return S.H.useEffect(e,t)},e.useEffectEvent=function(e){return S.H.useEffectEvent(e)},e.useId=function(){return S.H.useId()},e.useImperativeHandle=function(e,t,n){return S.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return S.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return S.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return S.H.useMemo(e,t)},e.useOptimistic=function(e,t){return S.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return S.H.useReducer(e,t,n)},e.useRef=function(e){return S.H.useRef(e)},e.useState=function(e){return S.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return S.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return S.H.useTransition()},e.version=`19.2.8`})),r=t(((e,t)=>{t.exports=n()})),i=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,ae());else{var t=n(l);t!==null&&ce(x,t.startTime-e)}}var ee=!1,te=-1,S=5,ne=-1;function re(){return g?!0:!(e.unstable_now()-ne<S)}function ie(){if(g=!1,ee){var t=e.unstable_now();ne=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(te),te=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&re());){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&&ce(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ae():ee=!1}}}var ae;if(typeof y==`function`)ae=function(){y(ie)};else if(typeof MessageChannel<`u`){var oe=new MessageChannel,se=oe.port2;oe.port1.onmessage=ie,ae=function(){se.postMessage(null)}}else ae=function(){_(ie,0)};function ce(t,n){te=_(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`):S=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(te),te=-1):h=!0,ce(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,ae()))),r},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),a=t(((e,t)=>{t.exports=i()})),o=t((e=>{var t=r();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 i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.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,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.8`})),s=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=o()})),c=t((e=>{var t=a(),n=r(),i=s();function o(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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(o(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=a;break}if(c===r){s=!0,r=i,n=a;break}c=c.sibling}if(!s){for(c=a.child;c;){if(c===n){s=!0,n=a,r=i;break}if(c===r){s=!0,r=a,n=i;break}c=c.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),te=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),ne=Symbol.for(`react.suspense`),re=Symbol.for(`react.suspense_list`),ie=Symbol.for(`react.memo`),ae=Symbol.for(`react.lazy`),oe=Symbol.for(`react.activity`),se=Symbol.for(`react.memo_cache_sentinel`),ce=Symbol.iterator;function le(e){return typeof e!=`object`||!e?null:(e=ce&&e[ce]||e[`@@iterator`],typeof e==`function`?e:null)}var ue=Symbol.for(`react.client.reference`);function de(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case ne:return`Suspense`;case re:return`SuspenseList`;case oe:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case te:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case S:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ie:return t=e.displayName||null,t===null?de(e.type)||`Memo`:t;case ae:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}var fe=Array.isArray,C=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,w=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},me=[],he=-1;function ge(e){return{current:e}}function T(e){0>he||(e.current=me[he],me[he]=null,he--)}function E(e,t){he++,me[he]=e.current,e.current=t}var _e=ge(null),ve=ge(null),ye=ge(null),be=ge(null);function xe(e,t){switch(E(ye,t),E(ve,e),E(_e,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}T(_e),E(_e,e)}function Se(){T(_e),T(ve),T(ye)}function Ce(e){e.memoizedState!==null&&E(be,e);var t=_e.current,n=Hd(t,e.type);t!==n&&(E(ve,e),E(_e,n))}function we(e){ve.current===e&&(T(_e),T(ve)),be.current===e&&(T(be),Qf._currentValue=pe)}var Te,Ee;function De(e){if(Te===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Te=t&&t[1]||``,Ee=-1<e.stack.indexOf(`
|
|
2
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
-
`+Te+e+Ee}var Oe=!1;function ke(e,t){if(!e||Oe)return``;Oe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
-
`),l=s.split(`
|
|
5
|
-
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
-
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Oe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?De(n):``}function Ae(e,t){switch(e.tag){case 26:case 27:case 5:return De(e.type);case 16:return De(`Lazy`);case 13:return e.child!==t&&t!==null?De(`Suspense Fallback`):De(`Suspense`);case 19:return De(`SuspenseList`);case 0:case 15:return ke(e.type,!1);case 11:return ke(e.type.render,!1);case 1:return ke(e.type,!0);case 31:return De(`Activity`);default:return``}}function je(e){try{var t=``,n=null;do t+=Ae(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
-
Error generating stack: `+e.message+`
|
|
8
|
-
`+e.stack}}var Me=Object.prototype.hasOwnProperty,Ne=t.unstable_scheduleCallback,Pe=t.unstable_cancelCallback,Fe=t.unstable_shouldYield,Ie=t.unstable_requestPaint,Le=t.unstable_now,Re=t.unstable_getCurrentPriorityLevel,ze=t.unstable_ImmediatePriority,Be=t.unstable_UserBlockingPriority,Ve=t.unstable_NormalPriority,He=t.unstable_LowPriority,Ue=t.unstable_IdlePriority,We=t.log,Ge=t.unstable_setDisableYieldValue,Ke=null,qe=null;function Je(e){if(typeof We==`function`&&Ge(e),qe&&typeof qe.setStrictMode==`function`)try{qe.setStrictMode(Ke,e)}catch{}}var Ye=Math.clz32?Math.clz32:Qe,Xe=Math.log,Ze=Math.LN2;function Qe(e){return e>>>=0,e===0?32:31-(Xe(e)/Ze|0)|0}var $e=256,et=262144,D=4194304;function tt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function nt(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=tt(n))):i=tt(o):i=tt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=tt(n))):i=tt(o)):i=tt(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 rt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function it(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 at(){var e=D;return D<<=1,!(D&62914560)&&(D=4194304),e}function ot(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function st(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ct(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-Ye(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&<(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function lt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ye(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ut(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ye(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function dt(e,t){var n=t&-t;return n=n&42?1:O(n),(n&(e.suspendedLanes|t))===0?n:0}function O(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 ft(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function pt(){var e=w.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function mt(e,t){var n=w.p;try{return w.p=e,t()}finally{w.p=n}}var ht=Math.random().toString(36).slice(2),gt=`__reactFiber$`+ht,_t=`__reactProps$`+ht,vt=`__reactContainer$`+ht,k=`__reactEvents$`+ht,yt=`__reactListeners$`+ht,bt=`__reactHandles$`+ht,xt=`__reactResources$`+ht,St=`__reactMarker$`+ht;function Ct(e){delete e[gt],delete e[_t],delete e[k],delete e[yt],delete e[bt]}function wt(e){var t=e[gt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[vt]||n[gt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[gt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function Tt(e){if(e=e[gt]||e[vt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Et(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Dt(e){var t=e[xt];return t||=e[xt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ot(e){e[St]=!0}var kt=new Set,At={};function jt(e,t){Mt(e,t),Mt(e+`Capture`,t)}function Mt(e,t){for(At[e]=t,e=0;e<t.length;e++)kt.add(t[e])}var Nt=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]*$`),Pt={},Ft={};function It(e){return Me.call(Ft,e)?!0:Me.call(Pt,e)?!1:Nt.test(e)?Ft[e]=!0:(Pt[e]=!0,!1)}function Lt(e,t,n){if(It(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 Rt(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 zt(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 A(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Bt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Vt(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 Ht(e){if(!e._valueTracker){var t=Bt(e)?`checked`:`value`;e._valueTracker=Vt(e,t,``+e[t])}}function Ut(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Bt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Wt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Gt=/[\n"\\]/g;function Kt(e){return e.replace(Gt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function qt(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=``+A(t)):e.value!==``+A(t)&&(e.value=``+A(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Yt(e,o,A(n)):Yt(e,o,A(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=``+A(s):e.removeAttribute(`name`)}function Jt(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)){Ht(e);return}n=n==null?``:``+A(n),t=t==null?n:``+A(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),Ht(e)}function Yt(e,t,n){t===`number`&&Wt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Xt(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=``+A(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 Zt(e,t,n){if(t!=null&&(t=``+A(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+A(n)}function Qt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(o(92));if(fe(r)){if(1<r.length)throw Error(o(93));r=r[0]}n=r}n??=``,t=n}n=A(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ht(e)}function $t(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var en=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 tn(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||en.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function nn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(o(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&tn(e,i,r)}else for(var a in t)t.hasOwnProperty(a)&&tn(e,a,t[a])}function rn(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 an=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),on=/^[\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 sn(e){return on.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function cn(){}var ln=null;function un(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dn=null,fn=null;function pn(e){var t=Tt(e);if(t&&(e=t.stateNode)){var n=e[_t]||null;a:switch(e=t.stateNode,t.type){case`input`:if(qt(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="`+Kt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[_t]||null;if(!i)throw Error(o(90));qt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ut(r)}break a;case`textarea`:Zt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Xt(e,!!n.multiple,t,!1)}}}var mn=!1;function hn(e,t,n){if(mn)return e(t,n);mn=!0;try{return e(t)}finally{if(mn=!1,(dn!==null||fn!==null)&&(bu(),dn&&(t=dn,e=fn,fn=dn=null,pn(t),e)))for(t=0;t<e.length;t++)pn(e[t])}}function gn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[_t]||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(o(231,t,typeof n));return n}var _n=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),vn=!1;if(_n)try{var yn={};Object.defineProperty(yn,"passive",{get:function(){vn=!0}}),window.addEventListener(`test`,yn,yn),window.removeEventListener(`test`,yn,yn)}catch{vn=!1}var bn=null,xn=null,j=null;function Sn(){if(j)return j;var e,t=xn,n=t.length,r,i=`value`in bn?bn.value:bn.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 j=i.slice(e,1<r?1-r:void 0)}function Cn(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 wn(){return!0}function Tn(){return!1}function En(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)?wn:Tn,this.isPropagationStopped=Tn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=wn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=wn)},persist:function(){},isPersistent:wn}),t}var Dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},On=En(Dn),kn=h({},Dn,{view:0,detail:0}),An=En(kn),jn,Mn,M,Nn=h({},kn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wn,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!==M&&(M&&e.type===`mousemove`?(jn=e.screenX-M.screenX,Mn=e.screenY-M.screenY):Mn=jn=0,M=e),jn)},movementY:function(e){return`movementY`in e?e.movementY:Mn}}),Pn=En(Nn),Fn=En(h({},Nn,{dataTransfer:0})),In=En(h({},kn,{relatedTarget:0})),Ln=En(h({},Dn,{animationName:0,elapsedTime:0,pseudoElement:0})),Rn=En(h({},Dn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),zn=En(h({},Dn,{data:0})),Bn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Vn={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`},Hn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Un(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Hn[e])?!!t[e]:!1}function Wn(){return Un}var N=En(h({},kn,{key:function(e){if(e.key){var t=Bn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Cn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Vn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wn,charCode:function(e){return e.type===`keypress`?Cn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Cn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Gn=En(h({},Nn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Kn=En(h({},kn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wn})),qn=En(h({},Dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Jn=En(h({},Nn,{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})),Yn=En(h({},Dn,{newState:0,oldState:0})),Xn=[9,13,27,32],Zn=_n&&`CompositionEvent`in window,Qn=null;_n&&`documentMode`in document&&(Qn=document.documentMode);var $n=_n&&`TextEvent`in window&&!Qn,er=_n&&(!Zn||Qn&&8<Qn&&11>=Qn),tr=` `,nr=!1;function rr(e,t){switch(e){case`keyup`:return Xn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ir(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ar=!1;function or(e,t){switch(e){case`compositionend`:return ir(t);case`keypress`:return t.which===32?(nr=!0,tr):null;case`textInput`:return e=t.data,e===tr&&nr?null:e;default:return null}}function sr(e,t){if(ar)return e===`compositionend`||!Zn&&rr(e,t)?(e=Sn(),j=xn=bn=null,ar=!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 er&&t.locale!==`ko`?null:t.data;default:return null}}var cr={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 lr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!cr[e.type]:t===`textarea`}function ur(e,t,n,r){dn?fn?fn.push(r):fn=[r]:dn=r,t=Ed(t,`onChange`),0<t.length&&(n=new On(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var dr=null,fr=null;function pr(e){yd(e,0)}function mr(e){if(Ut(Et(e)))return e}function hr(e,t){if(e===`change`)return t}var gr=!1;if(_n){var _r;if(_n){var vr=`oninput`in document;if(!vr){var yr=document.createElement(`div`);yr.setAttribute(`oninput`,`return;`),vr=typeof yr.oninput==`function`}_r=vr}else _r=!1;gr=_r&&(!document.documentMode||9<document.documentMode)}function br(){dr&&(dr.detachEvent(`onpropertychange`,xr),fr=dr=null)}function xr(e){if(e.propertyName===`value`&&mr(fr)){var t=[];ur(t,fr,e,un(e)),hn(pr,t)}}function Sr(e,t,n){e===`focusin`?(br(),dr=t,fr=n,dr.attachEvent(`onpropertychange`,xr)):e===`focusout`&&br()}function Cr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return mr(fr)}function wr(e,t){if(e===`click`)return mr(t)}function Tr(e,t){if(e===`input`||e===`change`)return mr(t)}function Er(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Dr=typeof Object.is==`function`?Object.is:Er;function Or(e,t){if(Dr(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(!Me.call(t,i)||!Dr(e[i],t[i]))return!1}return!0}function kr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ar(e,t){var n=kr(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=kr(n)}}function jr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wt(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=Wt(e.document)}return t}function Nr(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 Pr=_n&&`documentMode`in document&&11>=document.documentMode,Fr=null,Ir=null,Lr=null,Rr=!1;function zr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rr||Fr==null||Fr!==Wt(r)||(r=Fr,`selectionStart`in r&&Nr(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}),Lr&&Or(Lr,r)||(Lr=r,r=Ed(Ir,`onSelect`),0<r.length&&(t=new On(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Fr)))}function Br(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Vr={animationend:Br(`Animation`,`AnimationEnd`),animationiteration:Br(`Animation`,`AnimationIteration`),animationstart:Br(`Animation`,`AnimationStart`),transitionrun:Br(`Transition`,`TransitionRun`),transitionstart:Br(`Transition`,`TransitionStart`),transitioncancel:Br(`Transition`,`TransitionCancel`),transitionend:Br(`Transition`,`TransitionEnd`)},Hr={},Ur={};_n&&(Ur=document.createElement(`div`).style,`AnimationEvent`in window||(delete Vr.animationend.animation,delete Vr.animationiteration.animation,delete Vr.animationstart.animation),`TransitionEvent`in window||delete Vr.transitionend.transition);function Wr(e){if(Hr[e])return Hr[e];if(!Vr[e])return e;var t=Vr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ur)return Hr[e]=t[n];return e}var Gr=Wr(`animationend`),Kr=Wr(`animationiteration`),qr=Wr(`animationstart`),Jr=Wr(`transitionrun`),Yr=Wr(`transitionstart`),Xr=Wr(`transitioncancel`),Zr=Wr(`transitionend`),Qr=new Map,$r=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);$r.push(`scrollEnd`);function ei(e,t){Qr.set(e,t),jt(t,[e])}var ti=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)},ni=[],ri=0,ii=0;function ai(){for(var e=ri,t=ii=ri=0;t<e;){var n=ni[t];ni[t++]=null;var r=ni[t];ni[t++]=null;var i=ni[t];ni[t++]=null;var a=ni[t];if(ni[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&&li(n,i,a)}}function oi(e,t,n,r){ni[ri++]=e,ni[ri++]=t,ni[ri++]=n,ni[ri++]=r,ii|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function si(e,t,n,r){return oi(e,t,n,r),ui(e)}function ci(e,t){return oi(e,null,null,t),ui(e)}function li(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-Ye(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ui(e){if(50<fu)throw fu=0,pu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var di={};function fi(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 pi(e,t,n,r){return new fi(e,t,n,r)}function mi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hi(e,t){var n=e.alternate;return n===null?(n=pi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function gi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function _i(e,t,n,r,i,a){var s=0;if(r=e,typeof e==`function`)mi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,_e.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case oe:return e=pi(31,n,t,i),e.elementType=oe,e.lanes=a,e;case y:return vi(n.children,i,a,t);case b:s=8,i|=24;break;case x:return e=pi(12,n,t,i|2),e.elementType=x,e.lanes=a,e;case ne:return e=pi(13,n,t,i),e.elementType=ne,e.lanes=a,e;case re:return e=pi(19,n,t,i),e.elementType=re,e.lanes=a,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case te:s=10;break a;case ee:s=9;break a;case S:s=11;break a;case ie:s=14;break a;case ae:s=16,r=null;break a}s=29,n=Error(o(130,e===null?`null`:typeof e,``)),r=null}return t=pi(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function vi(e,t,n,r){return e=pi(7,e,r,t),e.lanes=n,e}function yi(e,t,n){return e=pi(6,e,null,t),e.lanes=n,e}function bi(e){var t=pi(18,null,null,0);return t.stateNode=e,t}function xi(e,t,n){return t=pi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Si=new WeakMap;function Ci(e,t){if(typeof e==`object`&&e){var n=Si.get(e);return n===void 0?(t={value:e,source:t,stack:je(t)},Si.set(e,t),t):n}return{value:e,source:t,stack:je(t)}}var P=[],wi=0,Ti=null,Ei=0,Di=[],Oi=0,ki=null,Ai=1,ji=``;function Mi(e,t){P[wi++]=Ei,P[wi++]=Ti,Ti=e,Ei=t}function Ni(e,t,n){Di[Oi++]=Ai,Di[Oi++]=ji,Di[Oi++]=ki,ki=e;var r=Ai;e=ji;var i=32-Ye(r)-1;r&=~(1<<i),n+=1;var a=32-Ye(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ai=1<<32-Ye(t)+i|n<<i|r,ji=a+e}else Ai=1<<a|n<<i|r,ji=e}function Pi(e){e.return!==null&&(Mi(e,1),Ni(e,1,0))}function Fi(e){for(;e===Ti;)Ti=P[--wi],P[wi]=null,Ei=P[--wi],P[wi]=null;for(;e===ki;)ki=Di[--Oi],Di[Oi]=null,ji=Di[--Oi],Di[Oi]=null,Ai=Di[--Oi],Di[Oi]=null}function Ii(e,t){Di[Oi++]=Ai,Di[Oi++]=ji,Di[Oi++]=ki,Ai=t.id,ji=t.overflow,ki=e}var Li=null,Ri=null,F=!1,zi=null,Bi=!1,Vi=Error(o(519));function Hi(e){throw Ji(Ci(Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Vi}function Ui(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[gt]=e,t[_t]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Jt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Qt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=cn),t=!0):t=!1,t||Hi(e,!0)}function Wi(e){for(Li=e.return;Li;)switch(Li.tag){case 5:case 31:case 13:Bi=!1;return;case 27:case 3:Bi=!0;return;default:Li=Li.return}}function Gi(e){if(e!==Li)return!1;if(!F)return Wi(e),F=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&Ri&&Hi(e),Wi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(317));Ri=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(317));Ri=uf(e)}else t===27?(t=Ri,Zd(e.type)?(e=lf,lf=null,Ri=e):Ri=t):Ri=Li?cf(e.stateNode.nextSibling):null;return!0}function Ki(){Ri=Li=null,F=!1}function qi(){var e=zi;return e!==null&&($l===null?$l=e:$l.push.apply($l,e),zi=null),e}function Ji(e){zi===null?zi=[e]:zi.push(e)}var Yi=ge(null),Xi=null,Zi=null;function Qi(e,t,n){E(Yi,t._currentValue),t._currentValue=n}function $i(e){e._currentValue=Yi.current,T(Yi)}function ea(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 ta(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var s=i.child;a=a.firstContext;a:for(;a!==null;){var c=a;a=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),ea(a.return,n,e),r||(s=null);break a}a=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(o(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),ea(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function na(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(o(387));if(s=s.memoizedProps,s!==null){var c=i.type;Dr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===be.current){if(s=i.alternate,s===null)throw Error(o(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}i=i.return}e!==null&&ta(t,e,n,r),t.flags|=262144}function ra(e){for(e=e.firstContext;e!==null;){if(!Dr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ia(e){Xi=e,Zi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function aa(e){return sa(Xi,e)}function oa(e,t){return Xi===null&&ia(e),sa(e,t)}function sa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Zi===null){if(e===null)throw Error(o(308));Zi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Zi=Zi.next=t;return n}var ca=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()})}},la=t.unstable_scheduleCallback,ua=t.unstable_NormalPriority,da={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fa(){return{controller:new ca,data:new Map,refCount:0}}function pa(e){e.refCount--,e.refCount===0&&la(ua,function(){e.controller.abort()})}var ma=null,ha=0,ga=0,_a=null;function va(e,t){if(ma===null){var n=ma=[];ha=0,ga=dd(),_a={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ha++,t.then(ya,ya),t}function ya(){if(--ha===0&&ma!==null){_a!==null&&(_a.status=`fulfilled`);var e=ma;ma=null,ga=0,_a=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 xa=C.S;C.S=function(e,t){nu=Le(),typeof t==`object`&&t&&typeof t.then==`function`&&va(e,t),xa!==null&&xa(e,t)};var Sa=ge(null);function Ca(){var e=Sa.current;return e===null?G.pooledCache:e}function wa(e,t){t===null?E(Sa,Sa.current):E(Sa,t.pool)}function Ta(){var e=Ca();return e===null?null:{parent:da._currentValue,pool:e}}var Ea=Error(o(460)),Da=Error(o(474)),Oa=Error(o(542)),ka={then:function(){}};function Aa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ja(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(cn,cn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Fa(e),e;default:if(typeof t.status==`string`)t.then(cn,cn);else{if(e=G,e!==null&&100<e.shellSuspendCounter)throw Error(o(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,Fa(e),e}throw Na=t,Ea}}function Ma(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Na=e,Ea):e}}var Na=null;function Pa(){if(Na===null)throw Error(o(459));var e=Na;return Na=null,e}function Fa(e){if(e===Ea||e===Oa)throw Error(o(483))}var Ia=null,La=0;function Ra(e){var t=La;return La+=1,Ia===null&&(Ia=[]),ja(Ia,e,t)}function za(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ba(e,t){throw t.$$typeof===g?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Va(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 i(e,t){return e=hi(e,t),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=yi(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===ae&&Ma(a)===t.type)?(t=i(t,n.props),za(t,n),t.return=e,t):(t=_i(n.type,n.key,n.props,null,e.mode,r),za(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=xi(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=vi(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=yi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=_i(t.type,t.key,t.props,null,e.mode,n),za(n,t),n.return=e,n;case v:return t=xi(t,e.mode,n),t.return=e,t;case ae:return t=Ma(t),f(e,t,n)}if(fe(t)||le(t))return t=vi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ra(t),n);if(t.$$typeof===te)return f(e,oa(e,t),n);Ba(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case ae:return n=Ma(n),p(e,t,n,r)}if(fe(n)||le(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ra(n),r);if(n.$$typeof===te)return p(e,t,oa(e,n),r);Ba(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ae:return r=Ma(r),m(e,t,n,r,i)}if(fe(r)||le(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ra(r),i);if(r.$$typeof===te)return m(e,t,n,oa(t,r),i);Ba(t,r)}return null}function h(i,o,s,c){for(var l=null,u=null,d=o,h=o=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),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),F&&Mi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(o=a(d,o,h),u===null?l=d:u.sibling=d,u=d);return F&&Mi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),o=a(g,o,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),F&&Mi(i,h),l}function g(i,s,c,l){if(c==null)throw Error(o(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(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=a(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),F&&Mi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return F&&Mi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),F&&Mi(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===y&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case _:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ae&&Ma(l)===r.type){n(e,r.sibling),c=i(r,a.props),za(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===y?(c=vi(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=_i(a.type,a.key,a.props,null,e.mode,c),za(c,a),c.return=e,e=c)}return s(e);case v:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=xi(a,e.mode,c),c.return=e,e=c}return s(e);case ae:return a=Ma(a),b(e,r,a,c)}if(fe(a))return h(e,r,a,c);if(le(a)){if(l=le(a),typeof l!=`function`)throw Error(o(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,Ra(a),c);if(a.$$typeof===te)return b(e,r,oa(e,a),c);Ba(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=yi(a,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{La=0;var i=b(e,t,n,r);return Ia=null,i}catch(t){if(t===Ea||t===Oa)throw t;var a=pi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ha=Va(!0),Ua=Va(!1),Wa=!1;function Ga(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ka(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 qa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ja(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,W&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ui(e),li(e,null,n),t}return oi(e,r,t,n),ui(e)}function Ya(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,ut(e,n)}}function Xa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Za=!1;function Qa(){if(Za){var e=_a;if(e!==null)throw e}}function $a(e,t,n,r){Za=!1;var i=e.updateQueue;Wa=!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?(q&f)===f:(r&f)===f){f!==0&&f===ga&&(Za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Wa=!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),ql|=o,e.lanes=o,e.memoizedState=d}}function eo(e,t){if(typeof e!=`function`)throw Error(o(191,e));e.call(t)}function to(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)eo(n[e],t)}var no=ge(null),ro=ge(0);function io(e,t){e=Gl,E(ro,e),E(no,t),Gl=e|t.baseLanes}function ao(){E(ro,Gl),E(no,no.current)}function oo(){Gl=ro.current,T(no),T(ro)}var so=ge(null),co=null;function lo(e){var t=e.alternate;E(ho,ho.current&1),E(so,e),co===null&&(t===null||no.current!==null||t.memoizedState!==null)&&(co=e)}function uo(e){E(ho,ho.current),E(so,e),co===null&&(co=e)}function fo(e){e.tag===22?(E(ho,ho.current),E(so,e),co===null&&(co=e)):po(e)}function po(){E(ho,ho.current),E(so,so.current)}function mo(e){T(so),co===e&&(co=null),T(ho)}var ho=ge(0);function go(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var _o=0,I=null,L=null,vo=null,yo=!1,bo=!1,xo=!1,So=0,Co=0,wo=null,To=0;function R(){throw Error(o(321))}function Eo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Dr(e[n],t[n]))return!1;return!0}function Do(e,t,n,r,i,a){return _o=a,I=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,C.H=e===null||e.memoizedState===null?Us:Ws,xo=!1,a=n(r,i),xo=!1,bo&&(a=ko(t,n,r,i)),Oo(e),a}function Oo(e){C.H=Hs;var t=L!==null&&L.next!==null;if(_o=0,vo=L=I=null,yo=!1,Co=0,wo=null,t)throw Error(o(300));e===null||oc||(e=e.dependencies,e!==null&&ra(e)&&(oc=!0))}function ko(e,t,n,r){I=e;var i=0;do{if(bo&&(wo=null),Co=0,bo=!1,25<=i)throw Error(o(301));if(i+=1,vo=L=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}C.H=Gs,a=t(n,r)}while(bo);return a}function Ao(){var e=C.H,t=e.useState()[0];return t=typeof t.then==`function`?Lo(t):t,e=e.useState()[0],(L===null?null:L.memoizedState)!==e&&(I.flags|=1024),t}function jo(){var e=So!==0;return So=0,e}function Mo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function No(e){if(yo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}yo=!1}_o=0,vo=L=I=null,bo=!1,Co=So=0,wo=null}function Po(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vo===null?I.memoizedState=vo=e:vo=vo.next=e,vo}function Fo(){if(L===null){var e=I.alternate;e=e===null?null:e.memoizedState}else e=L.next;var t=vo===null?I.memoizedState:vo.next;if(t!==null)vo=t,L=e;else{if(e===null)throw I.alternate===null?Error(o(467)):Error(o(310));L=e,e={memoizedState:L.memoizedState,baseState:L.baseState,baseQueue:L.baseQueue,queue:L.queue,next:null},vo===null?I.memoizedState=vo=e:vo=vo.next=e}return vo}function Io(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lo(e){var t=Co;return Co+=1,wo===null&&(wo=[]),e=ja(wo,e,t),t=I,(vo===null?t.memoizedState:vo.next)===null&&(t=t.alternate,C.H=t===null||t.memoizedState===null?Us:Ws),e}function Ro(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Lo(e);if(e.$$typeof===te)return aa(e)}throw Error(o(438,String(e)))}function zo(e){var t=null,n=I.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=I.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=Io(),I.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]=se;return t.index++,n}function Bo(e,t){return typeof t==`function`?t(e):t}function Vo(e){return Ho(Fo(),L,e)}function Ho(e,t,n){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var s=i.next;i.next=a.next,a.next=s}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(_o&f)===f:(q&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===ga&&(d=!0);else if((_o&p)===p){u=u.next,p===ga&&(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=a):l=l.next=f,I.lanes|=p,ql|=p;f=u.action,xo&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,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=a):l=l.next=p,I.lanes|=f,ql|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=a:l.next=c,!Dr(a,e.memoizedState)&&(oc=!0,d&&(n=_a,n!==null)))throw n;e.memoizedState=a,e.baseState=s,e.baseQueue=l,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Uo(e){var t=Fo(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do a=e(a,s.action),s=s.next;while(s!==i);Dr(a,t.memoizedState)||(oc=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Wo(e,t,n){var r=I,i=Fo(),a=F;if(a){if(n===void 0)throw Error(o(407));n=n()}else n=t();var s=!Dr((L||i).memoizedState,n);if(s&&(i.memoizedState=n,oc=!0),i=i.queue,hs(qo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||vo!==null&&vo.memoizedState.tag&1){if(r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,i,n,t),null),G===null)throw Error(o(349));a||_o&127||Go(r,t,n)}return n}function Go(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=I.updateQueue,t===null?(t=Io(),I.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ko(e,t,n,r){t.value=n,t.getSnapshot=r,Jo(t)&&Yo(e)}function qo(e,t,n){return n(function(){Jo(t)&&Yo(e)})}function Jo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Dr(e,n)}catch{return!0}}function Yo(e){var t=ci(e,2);t!==null&&hu(t,e,2)}function Xo(e){var t=Po();if(typeof e==`function`){var n=e;if(e=n(),xo){Je(!0);try{n()}finally{Je(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:e},t}function Zo(e,t,n,r){return e.baseState=n,Ho(e,L,typeof r==`function`?r:Bo)}function Qo(e,t,n,r,i){if(zs(e))throw Error(o(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};C.T===null?a.isTransition=!1:n(!0),r(a),n=t.pending,n===null?(a.next=t.pending=a,$o(t,a)):(a.next=n.next,t.pending=n.next=a)}}function $o(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=C.T,o={};C.T=o;try{var s=n(i,r),c=C.S;c!==null&&c(o,s),es(e,t,s)}catch(n){ns(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),C.T=a}}else try{a=n(i,r),es(e,t,a)}catch(n){ns(e,t,n)}}function es(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ts(e,t,n)},function(n){return ns(e,t,n)}):ts(e,t,n)}function ts(e,t,n){t.status=`fulfilled`,t.value=n,rs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,$o(e,n)))}function ns(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,rs(t),t=t.next;while(t!==r)}e.action=null}function rs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function is(e,t){return t}function as(e,t){if(F){var n=G.formState;if(n!==null){a:{var r=I;if(F){if(Ri){b:{for(var i=Ri,a=Bi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ri=cf(i.nextSibling),r=i.data===`F!`;break a}}Hi(r)}r=!1}r&&(t=n[0])}}return n=Po(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:t},n.queue=r,n=Is.bind(null,I,r),r.dispatch=n,r=Xo(!1),a=Rs.bind(null,I,!1,r.queue),r=Po(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Qo.bind(null,I,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function os(e){return ss(Fo(),L,e)}function ss(e,t,n){if(t=Ho(e,t,is)[0],e=Vo(Bo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Lo(t)}catch(e){throw e===Ea?Oa:e}else r=t;t=Fo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(I.flags|=2048,us(9,{destroy:void 0},cs.bind(null,i,n),null)),[r,a,e]}function cs(e,t){e.action=t}function ls(e){var t=Fo(),n=L;if(n!==null)return ss(t,n,e);Fo(),t=t.memoizedState,n=Fo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function us(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=I.updateQueue,t===null&&(t=Io(),I.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 ds(){return Fo().memoizedState}function fs(e,t,n,r){var i=Po();I.flags|=e,i.memoizedState=us(1|t,{destroy:void 0},n,r===void 0?null:r)}function ps(e,t,n,r){var i=Fo();r=r===void 0?null:r;var a=i.memoizedState.inst;L!==null&&r!==null&&Eo(r,L.memoizedState.deps)?i.memoizedState=us(t,a,n,r):(I.flags|=e,i.memoizedState=us(1|t,a,n,r))}function ms(e,t){fs(8390656,8,e,t)}function hs(e,t){ps(2048,8,e,t)}function gs(e){I.flags|=4;var t=I.updateQueue;if(t===null)t=Io(),I.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function _s(e){var t=Fo().memoizedState;return gs({ref:t,nextImpl:e}),function(){if(W&2)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function vs(e,t){return ps(4,2,e,t)}function ys(e,t){return ps(4,4,e,t)}function bs(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 xs(e,t,n){n=n==null?null:n.concat([e]),ps(4,4,bs.bind(null,t,e),n)}function Ss(){}function Cs(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Eo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ws(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Eo(t,r[1]))return r[0];if(r=e(),xo){Je(!0);try{e()}finally{Je(!1)}}return n.memoizedState=[r,t],r}function Ts(e,t,n){return n===void 0||_o&1073741824&&!(q&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),I.lanes|=e,ql|=e,n)}function Es(e,t,n,r){return Dr(n,t)?n:no.current===null?!(_o&42)||_o&1073741824&&!(q&261930)?(oc=!0,e.memoizedState=n):(e=mu(),I.lanes|=e,ql|=e,t):(e=Ts(e,n,r),Dr(e,t)||(oc=!0),e)}function Ds(e,t,n,r,i){var a=w.p;w.p=a!==0&&8>a?a:8;var o=C.T,s={};C.T=s,Rs(e,!1,t,n);try{var c=i(),l=C.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ls(e,t,ba(c,r),X(e)):Ls(e,t,r,X(e))}catch(n){Ls(e,t,{then:function(){},status:`rejected`,reason:n},X())}finally{w.p=a,o!==null&&s.types!==null&&(o.types=s.types),C.T=o}}function Os(){}function ks(e,t,n,r){if(e.tag!==5)throw Error(o(476));var i=As(e).queue;Ds(e,i,t,pe,n===null?Os:function(){return js(e),n(r)})}function As(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:pe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function js(e){var t=As(e);t.next===null&&(t=e.alternate.memoizedState),Ls(e,t.next.queue,{},X())}function Ms(){return aa(Qf)}function Ns(){return Fo().memoizedState}function Ps(){return Fo().memoizedState}function z(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=X();e=qa(n);var r=Ja(t,e,n);r!==null&&(hu(r,t,n),Ya(r,t,n)),t={cache:fa()},e.payload=t;return}t=t.return}}function Fs(e,t,n){var r=X();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zs(e)?Bs(t,n):(n=si(e,t,n,r),n!==null&&(hu(n,e,r),Vs(n,t,r)))}function Is(e,t,n){Ls(e,t,n,X())}function Ls(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(zs(e))Bs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Dr(s,o))return oi(e,t,i,0),G===null&&ai(),!1}catch{}if(n=si(e,t,i,r),n!==null)return hu(n,e,r),Vs(n,t,r),!0}return!1}function Rs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zs(e)){if(t)throw Error(o(479))}else t=si(e,n,r,2),t!==null&&hu(t,e,2)}function zs(e){var t=e.alternate;return e===I||t!==null&&t===I}function Bs(e,t){bo=yo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ut(e,n)}}var Hs={readContext:aa,use:Ro,useCallback:R,useContext:R,useEffect:R,useImperativeHandle:R,useLayoutEffect:R,useInsertionEffect:R,useMemo:R,useReducer:R,useRef:R,useState:R,useDebugValue:R,useDeferredValue:R,useTransition:R,useSyncExternalStore:R,useId:R,useHostTransitionStatus:R,useFormState:R,useActionState:R,useOptimistic:R,useMemoCache:R,useCacheRefresh:R};Hs.useEffectEvent=R;var Us={readContext:aa,use:Ro,useCallback:function(e,t){return Po().memoizedState=[e,t===void 0?null:t],e},useContext:aa,useEffect:ms,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),fs(4194308,4,bs.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=Po();t=t===void 0?null:t;var r=e();if(xo){Je(!0);try{e()}finally{Je(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Po();if(n!==void 0){var i=n(t);if(xo){Je(!0);try{n(t)}finally{Je(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Fs.bind(null,I,e),[r.memoizedState,e]},useRef:function(e){var t=Po();return e={current:e},t.memoizedState=e},useState:function(e){e=Xo(e);var t=e.queue,n=Is.bind(null,I,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ss,useDeferredValue:function(e,t){return Ts(Po(),e,t)},useTransition:function(){var e=Xo(!1);return e=Ds.bind(null,I,e.queue,!0,!1),Po().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=I,i=Po();if(F){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),G===null)throw Error(o(349));q&127||Go(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,ms(qo.bind(null,r,a,e),[e]),r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,a,n,t),null),n},useId:function(){var e=Po(),t=G.identifierPrefix;if(F){var n=ji,r=Ai;n=(r&~(1<<32-Ye(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=So++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=To++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ms,useFormState:as,useActionState:as,useOptimistic:function(e){var t=Po();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Rs.bind(null,I,!0,n),n.dispatch=t,[e,t]},useMemoCache:zo,useCacheRefresh:function(){return Po().memoizedState=z.bind(null,I)},useEffectEvent:function(e){var t=Po(),n={impl:e};return t.memoizedState=n,function(){if(W&2)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},Ws={readContext:aa,use:Ro,useCallback:Cs,useContext:aa,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Vo,useRef:ds,useState:function(){return Vo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){return Es(Fo(),L.memoizedState,e,t)},useTransition:function(){var e=Vo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ns,useHostTransitionStatus:Ms,useFormState:os,useActionState:os,useOptimistic:function(e,t){return Zo(Fo(),L,e,t)},useMemoCache:zo,useCacheRefresh:Ps};Ws.useEffectEvent=_s;var Gs={readContext:aa,use:Ro,useCallback:Cs,useContext:aa,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Uo,useRef:ds,useState:function(){return Uo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){var n=Fo();return L===null?Ts(n,e,t):Es(n,L.memoizedState,e,t)},useTransition:function(){var e=Uo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ns,useHostTransitionStatus:Ms,useFormState:ls,useActionState:ls,useOptimistic:function(e,t){var n=Fo();return L===null?(n.baseState=e,[e,n.queue.dispatch]):Zo(n,L,e,t)},useMemoCache:zo,useCacheRefresh:Ps};Gs.useEffectEvent=_s;function Ks(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=X(),i=qa(r);i.payload=t,n!=null&&(i.callback=n),t=Ja(e,i,r),t!==null&&(hu(t,e,r),Ya(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=X(),i=qa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ja(e,i,r),t!==null&&(hu(t,e,r),Ya(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=X(),r=qa(n);r.tag=2,t!=null&&(r.callback=t),t=Ja(e,r,n),t!==null&&(hu(t,e,n),Ya(t,e,n))}};function Js(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Or(n,r)||!Or(i,a):!0}function Ys(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qs.enqueueReplaceState(t,t.state,null)}function Xs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Zs(e){ti(e)}function Qs(e){console.error(e)}function $s(e){ti(e)}function ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function B(e,t,n){return n=qa(n),n.tag=3,n.payload={element:null},n.callback=function(){ec(e,t)},n}function nc(e){return e=qa(e),e.tag=3,e}function rc(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`&&(au===null?au=new Set([this]):au.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ic(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&na(t,n,i,!0),n=so.current,n!==null){switch(n.tag){case 31:case 13:return co===null?Du():n.alternate===null&&Kl===0&&(Kl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===ka?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,i)),!1;case 22:return n.flags|=65536,r===ka?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,i)),!1}throw Error(o(435,n.tag))}return Gu(e,r,i),Du(),!1}if(F)return t=so.current,t===null?(r!==Vi&&(t=Error(o(423),{cause:r}),Ji(Ci(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Ci(r,n),i=B(e.stateNode,r,i),Xa(e,i),Kl!==4&&(Kl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Vi&&(e=Error(o(422),{cause:r}),Ji(Ci(e,n)))),!1;var a=Error(o(520),{cause:r});if(a=Ci(a,n),Ql===null?Ql=[a]:Ql.push(a),Kl!==4&&(Kl=2),t===null)return!0;r=Ci(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=B(n.stateNode,r,e),Xa(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||a!==null&&typeof a.componentDidCatch==`function`&&(au===null||!au.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=nc(i),rc(i,e,n,r),Xa(n,i),!1}n=n.return}while(n!==null);return!1}var ac=Error(o(461)),oc=!1;function sc(e,t,n,r){t.child=e===null?Ua(t,null,n,r):Ha(t,e.child,n,r)}function cc(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 ia(t),r=Do(e,t,n,o,a,i),s=jo(),e!==null&&!oc?(Mo(e,t,i),jc(e,t,i)):(F&&s&&Pi(t),t.flags|=1,sc(e,t,r,i),t.child)}function lc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!mi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,uc(e,t,a,r,i)):(e=_i(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Mc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Or:n,n(o,r)&&e.ref===t.ref)return jc(e,t,i)}return t.flags|=1,e=hi(a,r),e.ref=t.ref,e.return=t,t.child=e}function uc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Or(a,r)&&e.ref===t.ref)if(oc=!1,t.pendingProps=r=a,Mc(e,i))e.flags&131072&&(oc=!0);else return t.lanes=e.lanes,jc(e,t,i)}return _c(e,t,n,r,i)}function dc(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 V(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?ao():io(t,a),fo(t);else return r=t.lanes=536870912,V(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&wa(t,null),ao(),po(t)):(wa(t,a.cachePool),io(t,a),po(t),t.memoizedState=null);return sc(e,t,i,n),t.child}function fc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function V(e,t,n,r,i){var a=Ca();return a=a===null?null:{parent:da._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&wa(t,null),ao(),fo(t),e!==null&&na(e,t,r,!0),t.childLanes=i,null}function pc(e,t){return t=Ec({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function mc(e,t,n){return Ha(t,e.child,null,n),e=pc(t,t.pendingProps),e.flags|=2,mo(t),t.memoizedState=null,e}function hc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(F){if(r.mode===`hidden`)return e=pc(t,r),t.lanes=536870912,fc(null,e);if(uo(t),(e=Ri)?(e=rf(e,Bi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ki===null?null:{id:Ai,overflow:ji},retryLane:536870912,hydrationErrors:null},n=bi(e),n.return=t,t.child=n,Li=t,Ri=null)):e=null,e===null)throw Hi(t);return t.lanes=536870912,null}return pc(t,r)}var a=e.memoizedState;if(a!==null){var s=a.dehydrated;if(uo(t),i)if(t.flags&256)t.flags&=-257,t=mc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(oc||na(e,t,n,!1),i=(n&e.childLanes)!==0,oc||i){if(r=G,r!==null&&(s=dt(r,n),s!==0&&s!==a.retryLane))throw a.retryLane=s,ci(e,s),hu(r,e,s),ac;Du(),t=mc(e,t,n)}else e=a.treeContext,Ri=cf(s.nextSibling),Li=t,F=!0,zi=null,Bi=!1,e!==null&&Ii(t,e),t=pc(t,r),t.flags|=4096;return t}return e=hi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function gc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(o(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function _c(e,t,n,r,i){return ia(t),n=Do(e,t,n,r,void 0,i),r=jo(),e!==null&&!oc?(Mo(e,t,i),jc(e,t,i)):(F&&r&&Pi(t),t.flags|=1,sc(e,t,n,i),t.child)}function vc(e,t,n,r,i,a){return ia(t),t.updateQueue=null,n=ko(t,r,n,i),Oo(e),r=jo(),e!==null&&!oc?(Mo(e,t,a),jc(e,t,a)):(F&&r&&Pi(t),t.flags|=1,sc(e,t,n,a),t.child)}function yc(e,t,n,r,i){if(ia(t),t.stateNode===null){var a=di,o=n.contextType;typeof o==`object`&&o&&(a=aa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=qs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ga(t),o=n.contextType,a.context=typeof o==`object`&&o?aa(o):di,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ks(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&qs.enqueueReplaceState(a,a.state,null),$a(t,r,a,i),Qa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Xs(n,s);a.props=c;var l=a.context,u=n.contextType;o=di,typeof u==`object`&&u&&(o=aa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ys(t,a,r,o),Wa=!1;var f=t.memoizedState;a.state=f,$a(t,r,a,i),Qa(),l=t.memoizedState,s||f!==l||Wa?(typeof d==`function`&&(Ks(t,n,d,r),l=t.memoizedState),(c=Wa||Js(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ka(e,t),o=t.memoizedProps,u=Xs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=di,typeof l==`object`&&l&&(c=aa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ys(t,a,r,c),Wa=!1,f=t.memoizedState,a.state=f,$a(t,r,a,i),Qa();var p=t.memoizedState;o!==d||f!==p||Wa||e!==null&&e.dependencies!==null&&ra(e.dependencies)?(typeof s==`function`&&(Ks(t,n,s,r),p=t.memoizedState),(u=Wa||Js(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ra(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,gc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ha(t,e.child,null,i),t.child=Ha(t,null,n,i)):sc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=jc(e,t,i),e}function bc(e,t,n,r){return Ki(),t.flags|=256,sc(e,t,n,r),t.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(e){return{baseLanes:e,cachePool:Ta()}}function Cc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Xl),e}function wc(e,t,n){var r=t.pendingProps,i=!1,a=(t.flags&128)!=0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(ho.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(F){if(i?lo(t):po(t),(e=Ri)?(e=rf(e,Bi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ki===null?null:{id:Ai,overflow:ji},retryLane:536870912,hydrationErrors:null},n=bi(e),n.return=t,t.child=n,Li=t,Ri=null)):e=null,e===null)throw Hi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(po(t),i=t.mode,c=Ec({mode:`hidden`,children:c},i),r=vi(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,fc(null,r)):(lo(t),Tc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(a)t.flags&256?(lo(t),t.flags&=-257,t=Dc(e,t,n)):t.memoizedState===null?(po(t),c=r.fallback,i=t.mode,r=Ec({mode:`visible`,children:r.children},i),c=vi(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ha(t,e.child,null,n),r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,t=fc(null,r)):(po(t),t.child=e.child,t.flags|=128,t=null);else if(lo(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(o(419)),r.stack=``,r.digest=s,Ji({value:r,source:null,stack:null}),t=Dc(e,t,n)}else if(oc||na(e,t,n,!1),s=(n&e.childLanes)!==0,oc||s){if(s=G,s!==null&&(r=dt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ci(e,r),hu(s,e,r),ac;af(c)||Du(),t=Dc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ri=cf(c.nextSibling),Li=t,F=!0,zi=null,Bi=!1,e!==null&&Ii(t,e),t=Tc(t,r.children),t.flags|=4096);return t}return i?(po(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=hi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=vi(c,i,n,null),c.flags|=2):c=hi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,fc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Sc(n):(i=c.cachePool,i===null?i=Ta():(l=da._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=Cc(e,s,n),t.memoizedState=xc,fc(e.child,r)):(lo(t),n=e.child,e=n.sibling,n=hi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Tc(e,t){return t=Ec({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Ec(e,t){return e=pi(22,e,null,t),e.lanes=0,e}function Dc(e,t,n){return Ha(t,e.child,null,n),e=Tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Oc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ea(e.return,t,n)}function kc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ac(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ho.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,E(ho,o),sc(e,t,r,n),r=F?Ei:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Oc(e,n,t);else if(e.tag===19)Oc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&go(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),kc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&go(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}kc(t,!0,n,null,a,r);break;case`together`:kc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function jc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ql|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(na(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=hi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=hi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Mc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ra(e))):!0}function Nc(e,t,n){switch(t.tag){case 3:xe(t,t.stateNode.containerInfo),Qi(t,da,e.memoizedState.cache),Ki();break;case 27:case 5:Ce(t);break;case 4:xe(t,t.stateNode.containerInfo);break;case 10:Qi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,uo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(lo(t),e=jc(e,t,n),e===null?null:e.sibling):wc(e,t,n):(lo(t),t.flags|=128,null);lo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(na(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ac(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),E(ho,ho.current),r)break;return null;case 22:return t.lanes=0,dc(e,t,n,t.pendingProps);case 24:Qi(t,da,e.memoizedState.cache)}return jc(e,t,n)}function Pc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)oc=!0;else{if(!Mc(e,n)&&!(t.flags&128))return oc=!1,Nc(e,t,n);oc=!!(e.flags&131072)}else oc=!1,F&&t.flags&1048576&&Ni(t,Ei,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ma(t.elementType),t.type=e,typeof e==`function`)mi(e)?(r=Xs(e,r),t.tag=1,t=yc(null,t,e,r,n)):(t.tag=0,t=_c(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===S){t.tag=11,t=cc(null,t,e,r,n);break a}else if(i===ie){t.tag=14,t=lc(null,t,e,r,n);break a}}throw t=de(e)||e,Error(o(306,t,``))}}return t;case 0:return _c(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Xs(r,t.pendingProps),yc(e,t,r,i,n);case 3:a:{if(xe(t,t.stateNode.containerInfo),e===null)throw Error(o(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,Ka(e,t),$a(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Qi(t,da,r),r!==a.cache&&ta(t,[da],n,!0),Qa(),r=s.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=bc(e,t,r,n);break a}else if(r!==i){i=Ci(Error(o(424)),t),Ji(i),t=bc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ri=cf(e.firstChild),Li=t,F=!0,zi=null,Bi=!0,n=Ua(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ki(),r===i){t=jc(e,t,n);break a}sc(e,t,r,n)}t=t.child}return t;case 26:return gc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:F||(n=t.type,e=t.pendingProps,r=Bd(ye.current).createElement(n),r[gt]=t,r[_t]=e,Pd(r,n,e),Ot(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ce(t),e===null&&F&&(r=t.stateNode=ff(t.type,t.pendingProps,ye.current),Li=t,Bi=!0,i=Ri,Zd(t.type)?(lf=i,Ri=cf(r.firstChild)):Ri=i),sc(e,t,t.pendingProps.children,n),gc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&F&&((i=r=Ri)&&(r=tf(r,t.type,t.pendingProps,Bi),r===null?i=!1:(t.stateNode=r,Li=t,Ri=cf(r.firstChild),Bi=!1,i=!0)),i||Hi(t)),Ce(t),i=t.type,a=t.pendingProps,s=e===null?null:e.memoizedProps,r=a.children,Ud(i,a)?r=null:s!==null&&Ud(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Do(e,t,Ao,null,null,n),Qf._currentValue=i),gc(e,t),sc(e,t,r,n),t.child;case 6:return e===null&&F&&((e=n=Ri)&&(n=nf(n,t.pendingProps,Bi),n===null?e=!1:(t.stateNode=n,Li=t,Ri=null,e=!0)),e||Hi(t)),null;case 13:return wc(e,t,n);case 4:return xe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ha(t,null,r,n):sc(e,t,r,n),t.child;case 11:return cc(e,t,t.type,t.pendingProps,n);case 7:return sc(e,t,t.pendingProps,n),t.child;case 8:return sc(e,t,t.pendingProps.children,n),t.child;case 12:return sc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Qi(t,t.type,r.value),sc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,ia(t),i=aa(i),r=r(i),t.flags|=1,sc(e,t,r,n),t.child;case 14:return lc(e,t,t.type,t.pendingProps,n);case 15:return uc(e,t,t.type,t.pendingProps,n);case 19:return Ac(e,t,n);case 31:return hc(e,t,n);case 22:return dc(e,t,n,t.pendingProps);case 24:return ia(t),r=aa(da),e===null?(i=Ca(),i===null&&(i=G,a=fa(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},Ga(t),Qi(t,da,i)):((e.lanes&n)!==0&&(Ka(e,t),$a(t,null,null,n),Qa()),i=e.memoizedState,a=t.memoizedState,i.parent===r?(r=a.cache,Qi(t,da,r),r!==i.cache&&ta(t,[da],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Qi(t,da,r))),sc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Fc(e){e.flags|=4}function Ic(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw Na=ka,Da}else e.flags&=-16777217}function Lc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw Na=ka,Da}function Rc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:at(),e.lanes|=t,Zl|=t)}function zc(e,t){if(!F)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Bc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Vc(e,t,n){var r=t.pendingProps;switch(Fi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bc(t),null;case 1:return Bc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),$i(da),Se(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Gi(t)?Fc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qi())),Bc(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(Fc(t),a===null?(Bc(t),Ic(t,i,null,r,n)):(Bc(t),Lc(t,a))):a?a===e.memoizedState?(Bc(t),t.flags&=-16777217):(Fc(t),Bc(t),Lc(t,a)):(e=e.memoizedProps,e!==r&&Fc(t),Bc(t),Ic(t,i,e,r,n)),null;case 27:if(we(t),n=ye.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return Bc(t),null}e=_e.current,Gi(t)?Ui(t,e):(e=ff(i,r,n),t.stateNode=e,Fc(t))}return Bc(t),null;case 5:if(we(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return Bc(t),null}if(a=_e.current,Gi(t))Ui(t,a);else{var s=Bd(ye.current);switch(a){case 1:a=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:a=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:a=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:a=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:a=s.createElement(`div`),a.innerHTML=`<script><\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}a[gt]=t,a[_t]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)a.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=a;a:switch(Pd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Fc(t)}}return Bc(t),Ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(o(166));if(e=ye.current,Gi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Li,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[gt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Hi(t,!0)}else e=Bd(e).createTextNode(r),e[gt]=t,t.stateNode=e}return Bc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Gi(t),n!==null){if(e===null){if(!r)throw Error(o(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(557));e[gt]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bc(t),e=!1}else n=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(mo(t),t):(mo(t),null);if(t.flags&128)throw Error(o(558))}return Bc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Gi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(o(317));i[gt]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bc(t),i=!1}else i=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(mo(t),t):(mo(t),null)}return mo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Rc(t,t.updateQueue),Bc(t),null);case 4:return Se(),e===null&&Sd(t.stateNode.containerInfo),Bc(t),null;case 10:return $i(t.type),Bc(t),null;case 19:if(T(ho),r=t.memoizedState,r===null)return Bc(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)zc(r,!1);else{if(Kl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=go(e),a!==null){for(t.flags|=128,zc(r,!1),e=a.updateQueue,t.updateQueue=e,Rc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)gi(n,e),n=n.sibling;return E(ho,ho.current&1|2),F&&Mi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Le()>ru&&(t.flags|=128,i=!0,zc(r,!1),t.lanes=4194304)}else{if(!i)if(e=go(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Rc(t,e),zc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!F)return Bc(t),null}else 2*Le()-r.renderingStartTime>ru&&n!==536870912&&(t.flags|=128,i=!0,zc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(Bc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Le(),e.sibling=null,n=ho.current,E(ho,i?n&1|2:n&1),F&&Mi(t,r.treeForkCount),e);case 22:case 23:return mo(t),oo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Bc(t),t.subtreeFlags&6&&(t.flags|=8192)):Bc(t),n=t.updateQueue,n!==null&&Rc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&T(Sa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),$i(da),Bc(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Hc(e,t){switch(Fi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $i(da),Se(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return we(t),null;case 31:if(t.memoizedState!==null){if(mo(t),t.alternate===null)throw Error(o(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return T(ho),null;case 4:return Se(),null;case 10:return $i(t.type),null;case 22:case 23:return mo(t),oo(),e!==null&&T(Sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return $i(da),null;case 25:return null;default:return null}}function Uc(e,t){switch(Fi(t),t.tag){case 3:$i(da),Se();break;case 26:case 27:case 5:we(t);break;case 4:Se();break;case 31:t.memoizedState!==null&&mo(t);break;case 13:mo(t);break;case 19:T(ho);break;case 10:$i(t.type);break;case 22:case 23:mo(t),oo(),e!==null&&T(Sa);break;case 24:$i(da)}}function H(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function U(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{to(t,n)}catch(t){Z(e,e.return,t)}}}function Gc(e,t,n){n.props=Xs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[_t]=t}catch(t){Z(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[gt]=e,t[_t]=n}catch(t){Z(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=Mr(e),Nr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==a||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===a&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,r=n.stateNode;try{var h=Xs(n.type,i);e=r.getSnapshotBeforeUpdate(h,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Sl(e,n),r&4&&H(5,n);break;case 1:if(Sl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Xs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Wc(n),r&512&&Kc(n,n.return);break;case 3:if(Sl(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{to(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&el(n);case 26:case 5:Sl(e,n),t===null&&r&4&&Jc(n),r&512&&Kc(n,n.return);break;case 12:Sl(e,n);break;case 31:Sl(e,n),r&4&&pl(e,n);break;case 13:Sl(e,n),r&4&&ml(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||nl,i=tl;var a=nl;tl=r,(nl=t)&&!a?wl(e,n,(n.subtreeFlags&8772)!=0):Sl(e,n),tl=i,nl=a}break;case 30:break;default:Sl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ct(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 ll=null,ul=!1;function dl(e,t,n){for(n=n.child;n!==null;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(qe&&typeof qe.onCommitFiberUnmount==`function`)try{qe.onCommitFiberUnmount(Ke,n)}catch{}switch(n.tag){case 26:nl||qc(n,t),dl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nl||qc(n,t);var r=ll,i=ul;Zd(n.type)&&(ll=n.stateNode,ul=!1),dl(e,t,n),pf(n.stateNode),ll=r,ul=i;break;case 5:nl||qc(n,t);case 6:if(r=ll,i=ul,ll=null,dl(e,t,n),ll=r,ul=i,ll!==null)if(ul)try{(ll.nodeType===9?ll.body:ll.nodeName===`HTML`?ll.ownerDocument.body:ll).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{ll.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:ll!==null&&(ul?(e=ll,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(ll,n.stateNode));break;case 4:r=ll,i=ul,ll=n.stateNode.containerInfo,ul=!0,dl(e,t,n),ll=r,ul=i;break;case 0:case 11:case 14:case 15:U(2,n,t),nl||U(4,n,t),dl(e,t,n);break;case 1:nl||(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Gc(n,t,r)),dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:nl=(r=nl)||n.memoizedState!==null,dl(e,t,n),nl=r;break;default:dl(e,t,n)}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function hl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(o(435,e.tag))}}function gl(e,t){var n=hl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function _l(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],a=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){ll=c.stateNode,ul=!1;break a}break;case 5:ll=c.stateNode,ul=!1;break a;case 3:case 4:ll=c.stateNode.containerInfo,ul=!0;break a}c=c.return}if(ll===null)throw Error(o(160));fl(a,s,i),ll=null,ul=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yl(t,e),t=t.sibling}var vl=null;function yl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_l(t,e),bl(e),r&4&&(U(3,e,e.return),H(3,e),U(5,e,e.return));break;case 1:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&64&&tl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=vl;if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&4){var a=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:a=i.getElementsByTagName(`title`)[0],(!a||a[St]||a[gt]||a.namespaceURI===`http://www.w3.org/2000/svg`||a.hasAttribute(`itemprop`))&&(a=i.createElement(r),i.head.insertBefore(a,i.querySelector(`head > title`))),Pd(a,r,n),a[gt]=e,Ot(a),r=a;break a;case`link`:var s=Vf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(a=s[c],a.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&a.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&a.getAttribute(`title`)===(n.title==null?null:n.title)&&a.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}a=i.createElement(r),Pd(a,r,n),i.head.appendChild(a);break;case`meta`:if(s=Vf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(a=s[c],a.getAttribute(`content`)===(n.content==null?null:``+n.content)&&a.getAttribute(`name`)===(n.name==null?null:n.name)&&a.getAttribute(`property`)===(n.property==null?null:n.property)&&a.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}a=i.createElement(r),Pd(a,r,n),i.head.appendChild(a);break;default:throw Error(o(468,r))}a[gt]=e,Ot(a),r=a}e.stateNode=r}else Hf(i,e.type,e.stateNode);else e.stateNode=If(i,r,e.memoizedProps);else a===r?r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps):(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,r===null?Hf(i,e.type,e.stateNode):If(i,r,e.memoizedProps))}break;case 27:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),e.flags&32){i=e.stateNode;try{$t(i,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Yc(e,i,n===null?i:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(_l(t,e),bl(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,i=vl,vl=gf(t.containerInfo),_l(t,e),vl=i,bl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}rl&&(rl=!1,xl(e));break;case 4:r=vl,vl=gf(e.stateNode.containerInfo),_l(t,e),bl(e),vl=r;break;case 12:_l(t,e),bl(e);break;case 31:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 13:_l(t,e),bl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(tu=Le()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=tl,d=nl;if(tl=u||i,nl=d||l,_l(t,e),nl=d,tl=u,bl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||tl||nl||Cl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(a=l.stateNode,i)s=a.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,gl(e,n))));break;case 19:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 30:break;case 21:break;default:_l(t,e),bl(e)}}function bl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xc(r)){n=r;break}r=r.return}if(n==null)throw Error(o(160));switch(n.tag){case 27:var i=n.stateNode;$c(e,Zc(e),i);break;case 5:var a=n.stateNode;n.flags&32&&($t(a,``),n.flags&=-33),$c(e,Zc(e),a);break;case 3:case 4:var s=n.stateNode.containerInfo;Qc(e,Zc(e),s);break;default:throw Error(o(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Cl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:U(4,t,t.return),Cl(t);break;case 1:qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Gc(t,t.return,n),Cl(t);break;case 27:pf(t.stateNode);case 26:case 5:qc(t,t.return),Cl(t);break;case 22:t.memoizedState===null&&Cl(t);break;case 30:Cl(t);break;default:Cl(t)}e=e.sibling}}function wl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:wl(i,a,n),H(4,a);break;case 1:if(wl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)eo(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Wc(a),Kc(a,a.return);break;case 27:el(a);case 26:case 5:wl(i,a,n),n&&r===null&&o&4&&Jc(a),Kc(a,a.return);break;case 12:wl(i,a,n);break;case 31:wl(i,a,n),n&&o&4&&pl(i,a);break;case 13:wl(i,a,n),n&&o&4&&ml(i,a);break;case 22:a.memoizedState===null&&wl(i,a,n),Kc(a,a.return);break;case 30:break;default:wl(i,a,n)}t=t.sibling}}function Tl(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&&pa(n))}function El(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pa(e))}function Dl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ol(e,t,n,r),t=t.sibling}function Ol(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Dl(e,t,n,r),i&2048&&H(9,t);break;case 1:Dl(e,t,n,r);break;case 3:Dl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pa(e)));break;case 12:if(i&2048){Dl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else Dl(e,t,n,r);break;case 31:Dl(e,t,n,r);break;case 13:Dl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Dl(e,t,n,r):(a._visibility|=2,kl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Dl(e,t,n,r):Al(e,t),i&2048&&Tl(o,t);break;case 24:Dl(e,t,n,r),i&2048&&El(t.alternate,t);break;default:Dl(e,t,n,r)}}function kl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:kl(a,o,s,c,i),H(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,kl(a,o,s,c,i)):u._visibility&2?kl(a,o,s,c,i):Al(a,o),i&&l&2048&&Tl(o.alternate,o);break;case 24:kl(a,o,s,c,i),i&&l&2048&&El(o.alternate,o);break;default:kl(a,o,s,c,i)}t=t.sibling}}function Al(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:Al(n,r),i&2048&&Tl(r.alternate,r);break;case 24:Al(n,r),i&2048&&El(r.alternate,r);break;default:Al(n,r)}t=t.sibling}}var jl=8192;function Ml(e,t,n){if(e.subtreeFlags&jl)for(e=e.child;e!==null;)Nl(e,t,n),e=e.sibling}function Nl(e,t,n){switch(e.tag){case 26:Ml(e,t,n),e.flags&jl&&e.memoizedState!==null&&Gf(n,vl,e.memoizedState,e.memoizedProps);break;case 5:Ml(e,t,n);break;case 3:case 4:var r=vl;vl=gf(e.stateNode.containerInfo),Ml(e,t,n),vl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=jl,jl=16777216,Ml(e,t,n),jl=r):Ml(e,t,n));break;default:Ml(e,t,n)}}function Pl(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 Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Il(e),e=e.sibling}function Il(e){switch(e.tag){case 0:case 11:case 15:Fl(e),e.flags&2048&&U(9,e,e.return);break;case 3:Fl(e);break;case 12:Fl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ll(e)):Fl(e);break;default:Fl(e)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:U(8,t,t.return),Ll(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ll(t));break;default:Ll(t)}e=e.sibling}}function Rl(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:U(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:pa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var zl={getCacheForType:function(e){var t=aa(da),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return aa(da).controller.signal}},Bl=typeof WeakMap==`function`?WeakMap:Map,W=0,G=null,K=null,q=0,J=0,Vl=null,Hl=!1,Ul=!1,Wl=!1,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=null,$l=null,eu=!1,tu=0,nu=0,ru=1/0,iu=null,au=null,ou=0,Y=null,su=null,cu=0,lu=0,uu=null,du=null,fu=0,pu=null;function X(){return W&2&&q!==0?q&-q:C.T===null?pt():dd()}function mu(){if(Xl===0)if(!(q&536870912)||F){var e=et;et<<=1,!(et&3932160)&&(et=262144),Xl=e}else Xl=536870912;return e=so.current,e!==null&&(e.flags|=32),Xl}function hu(e,t,n){(e===G&&(J===2||J===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,q,Xl,!1)),st(e,n),(!(W&2)||e!==G)&&(e===G&&(!(W&2)&&(Jl|=n),Kl===4&&yu(e,q,Xl,!1)),rd(e))}function gu(e,t,n){if(W&6)throw Error(o(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||rt(e,t),i=r?Au(e,t):Ou(e,t,!0),a=r;do{if(i===0){Ul&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!vu(n)){i=Ou(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)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;i=Ql;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Wl&&!l){c.errorRecoveryDisabledLanes|=a,Jl|=a,i=4;break a}a=$l,$l=i,a!==null&&($l===null?$l=a:$l.push.apply($l,a))}i=s}if(a=!1,i!==2)continue}}if(i===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,a=i,a){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Xl,!Hl);break a;case 2:$l=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=tu+300-Le(),10<i)){if(yu(r,t,Xl,!Hl),nt(r,0,!0)!==0)break a;cu=t,r.timeoutHandle=Kd(_u.bind(null,r,n,$l,iu,eu,t,Xl,Jl,Zl,Hl,a,`Throttled`,-0,0),i);break a}_u(r,n,$l,iu,eu,t,Xl,Jl,Zl,Hl,a,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:cn},Nl(t,a,d);var m=(a&62914560)===a?tu-Le():(a&4194048)===a?nu-Le():0;if(m=qf(d,m),m!==null){cu=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Dr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yu(e,t,n,r){t&=~Yl,t&=~Jl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ye(i),o=1<<a;r[a]=-1,i&=~o}n!==0&<(e,n,t)}function bu(){return W&6?!0:(id(0,!1),!1)}function xu(){if(K!==null){if(J===0)var e=K.return;else e=K,Zi=Xi=null,No(e),Ia=null,La=0,e=K;for(;e!==null;)Uc(e.alternate,e),e=e.return;K=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cu=0,xu(),G=e,K=n=hi(e.current,null),q=t,J=0,Vl=null,Hl=!1,Ul=rt(e,t),Wl=!1,Zl=Xl=Yl=Jl=ql=Kl=0,$l=Ql=null,eu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ye(r),a=1<<i;t|=e[i],r&=~a}return Gl=t,ai(),n}function Cu(e,t){I=null,C.H=Hs,t===Ea||t===Oa?(t=Pa(),J=3):t===Da?(t=Pa(),J=4):J=t===ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Vl=t,K===null&&(Kl=1,ec(e,Ci(t,e.current)))}function wu(){var e=so.current;return e===null?!0:(q&4194048)===q?co===null:(q&62914560)===q||q&536870912?e===co:!1}function Tu(){var e=C.H;return C.H=Hs,e===null?Hs:e}function Eu(){var e=C.A;return C.A=zl,e}function Du(){Kl=4,Hl||(q&4194048)!==q&&so.current!==null||(Ul=!0),!(ql&134217727)&&!(Jl&134217727)||G===null||yu(G,q,Xl,!1)}function Ou(e,t,n){var r=W;W|=2;var i=Tu(),a=Eu();(G!==e||q!==t)&&(iu=null,Su(e,t)),t=!1;var o=Kl;a:do try{if(J!==0&&K!==null){var s=K,c=Vl;switch(J){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:so.current===null&&(t=!0);var l=J;if(J=0,Vl=null,Pu(e,s,c,l),n&&Ul){o=0;break a}break;default:l=J,J=0,Vl=null,Pu(e,s,c,l)}}ku(),o=Kl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Zi=Xi=null,W=r,C.H=i,C.A=a,K===null&&(G=null,q=0,ai()),o}function ku(){for(;K!==null;)Mu(K)}function Au(e,t){var n=W;W|=2;var r=Tu(),i=Eu();G!==e||q!==t?(iu=null,ru=Le()+500,Su(e,t)):Ul=rt(e,t);a:do try{if(J!==0&&K!==null){t=K;var a=Vl;b:switch(J){case 1:J=0,Vl=null,Pu(e,t,a,1);break;case 2:case 9:if(Aa(a)){J=0,Vl=null,Nu(t);break}t=function(){J!==2&&J!==9||G!==e||(J=7),rd(e)},a.then(t,t);break a;case 3:J=7;break a;case 4:J=5;break a;case 7:Aa(a)?(J=0,Vl=null,Nu(t)):(J=0,Vl=null,Pu(e,t,a,7));break;case 5:var s=null;switch(K.tag){case 26:s=K.memoizedState;case 5:case 27:var c=K;if(s?Wf(s):c.stateNode.complete){J=0,Vl=null;var l=c.sibling;if(l!==null)K=l;else{var u=c.return;u===null?K=null:(K=u,Fu(u))}break b}}J=0,Vl=null,Pu(e,t,a,5);break;case 6:J=0,Vl=null,Pu(e,t,a,6);break;case 8:xu(),Kl=6;break a;default:throw Error(o(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Zi=Xi=null,C.H=r,C.A=i,W=n,K===null?(G=null,q=0,ai(),Kl):0}function ju(){for(;K!==null&&!Fe();)Mu(K)}function Mu(e){var t=Pc(e.alternate,e,Gl);e.memoizedProps=e.pendingProps,t===null?Fu(e):K=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vc(n,t,t.pendingProps,t.type,void 0,q);break;case 11:t=vc(n,t,t.pendingProps,t.type.render,t.ref,q);break;case 5:No(t);default:Uc(n,t),t=K=gi(t,Gl),t=Pc(n,t,Gl)}e.memoizedProps=e.pendingProps,t===null?Fu(e):K=t}function Pu(e,t,n,r){Zi=Xi=null,No(t),Ia=null,La=0;var i=t.return;try{if(ic(e,i,t,n,q)){Kl=1,ec(e,Ci(n,e.current)),K=null;return}}catch(t){if(i!==null)throw K=i,t;Kl=1,ec(e,Ci(n,e.current)),K=null;return}t.flags&32768?(F||r===1?e=!0:Ul||q&536870912?e=!1:(Hl=e=!0,(r===2||r===9||r===3||r===6)&&(r=so.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Hl);return}e=t.return;var n=Vc(t.alternate,t,Gl);if(n!==null){K=n;return}if(t=t.sibling,t!==null){K=t;return}K=t=e}while(t!==null);Kl===0&&(Kl=5)}function Iu(e,t){do{var n=Hc(e.alternate,e);if(n!==null){n.flags&=32767,K=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){K=e;return}K=e=n}while(e!==null);Kl=6,K=null}function Lu(e,t,n,r,i,a,s,c,l){e.cancelPendingCommit=null;do Hu();while(ou!==0);if(W&6)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(a=t.lanes|t.childLanes,a|=ii,ct(e,n,a,s,c,l),e===G&&(K=G=null,q=0),su=t,Y=e,cu=n,lu=a,uu=i,du=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Ve,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=C.T,C.T=null,i=w.p,w.p=2,s=W,W|=4;try{ol(e,t,n)}finally{W=s,w.p=i,C.T=r}}ou=1,Ru(),zu(),Bu()}}function Ru(){if(ou===1){ou=0;var e=Y,t=su,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=C.T,C.T=null;var r=w.p;w.p=2;var i=W;W|=4;try{yl(t,e);var a=zd,o=Mr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&jr(s.ownerDocument.documentElement,s)){if(c!==null&&Nr(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 _=Ar(s,h),v=Ar(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{W=i,w.p=r,C.T=n}}e.current=t,ou=2}}function zu(){if(ou===2){ou=0;var e=Y,t=su,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=C.T,C.T=null;var r=w.p;w.p=2;var i=W;W|=4;try{sl(e,t.alternate,t)}finally{W=i,w.p=r,C.T=n}}ou=3}}function Bu(){if(ou===4||ou===3){ou=0,Ie();var e=Y,t=su,n=cu,r=du;t.subtreeFlags&10256||t.flags&10256?ou=5:(ou=0,su=Y=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(au=null),ft(n),t=t.stateNode,qe&&typeof qe.onCommitFiberRoot==`function`)try{qe.onCommitFiberRoot(Ke,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=C.T,i=w.p,w.p=2,C.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{C.T=t,w.p=i}}cu&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===pu?fu++:(fu=0,pu=e):fu=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,pa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(ou!==5)return!1;var e=Y,t=lu;lu=0;var n=ft(cu),r=C.T,i=w.p;try{w.p=32>n?32:n,C.T=null,n=uu,uu=null;var a=Y,s=cu;if(ou=0,su=Y=null,cu=0,W&6)throw Error(o(331));var c=W;if(W|=4,Il(a.current),Ol(a,a.current,s,n),W=c,id(0,!1),qe&&typeof qe.onPostCommitFiberRoot==`function`)try{qe.onPostCommitFiberRoot(Ke,a)}catch{}return!0}finally{w.p=i,C.T=r,Vu(e,t)}}function Wu(e,t,n){t=Ci(n,t),t=B(e.stateNode,t,2),e=Ja(e,t,2),e!==null&&(st(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(au===null||!au.has(r))){e=Ci(n,e),n=nc(2),r=Ja(t,n,2),r!==null&&(rc(n,r,t,e),st(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Bl;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)||(Wl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,G===e&&(q&n)===n&&(Kl===4||Kl===3&&(q&62914560)===q&&300>Le()-tu?!(W&2)&&Su(e,0):Yl|=n,Zl===q&&(Zl=0)),rd(e)}function qu(e,t){t===0&&(t=at()),e=ci(e,t),e!==null&&(st(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Ne(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ye(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=q,a=nt(r,r===G?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||rt(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Le(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}ou!==0&&ou!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ye(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=it(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=G,n=q,n=nt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(J===2||J===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Pe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||rt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Pe(r),ft(n)){case 2:case 8:n=Be;break;case 32:n=Ve;break;case 268435456:n=Ue;break;default:n=Ve}return r=cd.bind(null,e),n=Ne(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Pe(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(ou!==0&&ou!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=q;return r=nt(e,e===G?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Le()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){W&6?Ne(ze,ad):od()})}function dd(){if(nd===0){var e=ga;e===0&&(e=$e,$e<<=1,!($e&261888)&&($e=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:sn(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[_t]||null).action),o=r.submitter;o&&(t=(t=o[_t]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new On(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);ks(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),ks(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<$r.length;hd++){var gd=$r[hd];ei(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}ei(Gr,`onAnimationEnd`),ei(Kr,`onAnimationIteration`),ei(qr,`onAnimationStart`),ei(`dblclick`,`onDoubleClick`),ei(`focusin`,`onFocus`),ei(`focusout`,`onBlur`),ei(Jr,`onTransitionRun`),ei(Yr,`onTransitionStart`),ei(Xr,`onTransitionCancel`),ei(Zr,`onTransitionEnd`),Mt(`onMouseEnter`,[`mouseout`,`mouseover`]),Mt(`onMouseLeave`,[`mouseout`,`mouseover`]),Mt(`onPointerEnter`,[`pointerout`,`pointerover`]),Mt(`onPointerLeave`,[`pointerout`,`pointerover`]),jt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),jt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),jt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),jt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),jt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),jt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ti(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){ti(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[k];n===void 0&&(n=t[k]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,kt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!vn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=wt(s),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){r=a=o;continue a}s=s.parentNode}}r=r.return}hn(function(){var r=a,i=un(n),o=[];a:{var s=Qr.get(e);if(s!==void 0){var c=On,u=e;switch(e){case`keypress`:if(Cn(n)===0)break a;case`keydown`:case`keyup`:c=N;break;case`focusin`:u=`focus`,c=In;break;case`focusout`:u=`blur`,c=In;break;case`beforeblur`:case`afterblur`:c=In;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`:c=Pn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Fn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Kn;break;case Gr:case Kr:case qr:c=Ln;break;case Zr:c=qn;break;case`scroll`:case`scrollend`:c=An;break;case`wheel`:c=Jn;break;case`copy`:case`cut`:case`paste`:c=Rn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=Gn;break;case`toggle`:case`beforetoggle`:c=Yn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=gn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(s=new c(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==ln&&(u=n.relatedTarget||n.fromElement)&&(wt(u)||u[vt]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(u=n.relatedTarget||n.toElement,c=r,u=u?wt(u):null,u!==null&&(f=l(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(c=null,u=r),c!==u)){if(d=Pn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Gn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?s:Et(c),h=u==null?s:Et(u),s=new d(g,m+`leave`,c,n,i),s.target=f,s.relatedTarget=h,g=null,wt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,c&&u)b:{for(d=Dd,p=c,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;c!==null&&Od(o,s,c,d,!1),u!==null&&f!==null&&Od(o,f,u,d,!0)}}a:{if(s=r?Et(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var v=hr;else if(lr(s))if(gr)v=Tr;else{v=Cr;var y=Sr}else c=s.nodeName,!c||c.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&rn(r.elementType)&&(v=hr):v=wr;if(v&&=v(e,r)){ur(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&Yt(s,`number`,s.value)}switch(y=r?Et(r):window,e){case`focusin`:(lr(y)||y.contentEditable===`true`)&&(Fr=y,Ir=r,Lr=null);break;case`focusout`:Lr=Ir=Fr=null;break;case`mousedown`:Rr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Rr=!1,zr(o,n,i);break;case`selectionchange`:if(Pr)break;case`keydown`:case`keyup`:zr(o,n,i)}var b;if(Zn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else ar?rr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(er&&n.locale!==`ko`&&(ar||x!==`onCompositionStart`?x===`onCompositionEnd`&&ar&&(b=Sn()):(bn=i,xn=`value`in bn?bn.value:bn.textContent,ar=!0)),y=Ed(r,x),0<y.length&&(x=new zn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=ir(n),b!==null&&(x.data=b)))),(b=$n?or(e,n):sr(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new zn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),md(o,e,r,n,i)}yd(o,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=gn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=gn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=gn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=gn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
|
|
9
|
-
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,i,a){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||$t(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&$t(e,``+r);break;case`className`:Rt(e,`class`,r);break;case`tabIndex`:Rt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Rt(e,n,r);break;case`style`:nn(e,r,a);break;case`data`:if(t!==`object`){Rt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=sn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof a==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=sn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=cn);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(o(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=sn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),Lt(e,`popover`,r);break;case`xlinkActuate`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Lt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=an.get(n)||n,Lt(e,n,r))}}function Nd(e,t,n,r,i,a){switch(n){case`style`:nn(e,r,a);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(o(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?$t(e,r):(typeof r==`number`||typeof r==`bigint`)&&$t(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=cn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!At.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),a=e[_t]||null,a=a==null?null:a[n],typeof a==`function`&&e.removeEventListener(t,a,i),typeof r==`function`)){typeof a!=`function`&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Lt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var s=n[a];if(s!=null)switch(a){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(o(137,t));default:$(e,t,a,s,n,null)}}i&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=a=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:a=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(o(137,t));break;default:$(e,t,r,d,n,null)}}Jt(e,a,c,l,u,s,i,!1);return;case`select`:for(i in Q(`invalid`,e),r=s=a=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:a=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,i,c,n,null)}t=a,n=s,e.multiple=!!r,t==null?n!=null&&Xt(e,!!r,n,!0):Xt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),a=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:a=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(o(91));break;default:$(e,t,s,c,n,null)}Qt(e,r,i,a);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(o(137,t));default:$(e,t,u,r,n,null)}return;default:if(rn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,a=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`:a=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(o(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}qt(e,s,c,l,u,d,a,i);return;case`select`:for(a in m=s=c=p=null,n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(a)||$(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case`value`:p=a;break;case`defaultValue`:c=a;break;case`multiple`:s=a;default:a!==l&&$(e,t,i,a,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Xt(e,!!n,n?[]:``,!1):Xt(e,!!n,t,!0)):Xt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,i)}for(s in r)if(i=r[s],a=n[s],r.hasOwnProperty(s)&&(i!=null||a!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(o(91));break;default:i!==a&&$(e,t,s,i,r,a)}Zt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(o(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(rn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[St]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),Ct(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[St])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(o(452));return e;case`head`:if(e=t.head,!e)throw Error(o(453));return e;case`body`:if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ct(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=w.d;w.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=Tt(e);t!==null&&t.tag===5&&t.type===`form`?js(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Kt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Ot(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Kt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Kt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Kt(n.imageSizes)+`"]`)):i+=`[href="`+Kt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Ot(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Kt(r)+`"][href="`+Kt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Ot(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Dt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Ot(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Dt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Ot(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Dt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Ot(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=ye.current)?gf(i):null;if(!i)throw Error(o(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Dt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var a=Dt(i).hoistableStyles,s=a.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,s),(a=i.querySelector(jf(e)))&&!a._p&&(s.instance=a,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),a||Nf(i,e,n,s.state))),t&&r===null)throw Error(o(528,``));return s}if(t&&r!==null)throw Error(o(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Dt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Af(e){return`href="`+Kt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),Ot(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Kt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Kt(n.href)+`"]`);if(r)return t.instance=r,Ot(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ot(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var a=e.querySelector(jf(i));if(a)return t.state.loading|=4,t.instance=a,Ot(a),a;r=Mf(n),(i=mf.get(i))&&Rf(r,i),a=(e.ownerDocument||e).createElement(`link`),Ot(a);var s=a;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(a,`link`,r),t.state.loading|=4,Lf(a,n.precedence,e),t.instance=a;case`script`:return a=Pf(n.src),(i=e.querySelector(Ff(a)))?(t.instance=i,Ot(i),i):(r=n,(i=mf.get(a))&&(r=h({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Ot(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(o(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[St]||a[gt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ot(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Ot(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:te,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ot(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ot(0),this.hiddenUpdates=ot(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=pi(3,null,null,t),e.current=a,a.stateNode=e,t=fa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ga(a),e}function tp(e){return e?(e=di,e):di}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=qa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ja(e,r,t),n!==null&&(hu(n,e,t),Ya(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ci(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=X();t=O(t);var n=ci(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=C.T;C.T=null;var a=w.p;try{w.p=2,up(e,t,n,r)}finally{w.p=a,C.T=i}}function lp(e,t,n,r){var i=C.T;C.T=null;var a=w.p;try{w.p=8,up(e,t,n,r)}finally{w.p=a,C.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=Tt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=tt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ye(o);s.entanglements[1]|=c,o&=~c}rd(a),!(W&6)&&(ru=Le()+500,id(0,!1))}}break;case 31:case 13:s=ci(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=un(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=wt(e),e!==null){var t=l(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=u(t),e!==null)return e;e=null}else if(n===31){if(e=d(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Re()){case ze:return 2;case Be:return 8;case Ve:case He:return 32;case Ue:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Tt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=wt(e.target);if(t!==null){var n=l(t);if(n!==null){if(t=n.tag,t===13){if(t=u(n),t!==null){e.blockedOn=t,mt(e.priority,function(){op(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,mt(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ln=r,n.target.dispatchEvent(r),ln=null}else return t=Tt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=Tt(n);a!==null&&(e.splice(t,3),t-=3,ks(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[_t]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[_t]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var n=t.current;np(n,X(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[vt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=pt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.8`)throw Error(o(527,Lp,`19.2.8`));w.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(o(188)):(e=Object.keys(e).join(`,`),Error(o(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:C,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ke=zp.inject(Rp),qe=zp}catch{}}e.createRoot=function(e,t){if(!c(e))throw Error(o(299));var n=!1,r=``,i=Zs,a=Qs,s=$s;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,i,a,s,Pp),e[vt]=t.current,Sd(e),new Fp(t)}})),l=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=c()})),u=e(r(),1),d=globalThis.browser?.runtime?.id?globalThis.browser:globalThis.chrome,f=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),p=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),m=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),h=e=>{let t=m(e);return t.charAt(0).toUpperCase()+t.slice(1)},g={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},_=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},v=(0,u.createContext)({}),y=()=>(0,u.useContext)(v),b=(0,u.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:d=2,absoluteStrokeWidth:p=!1,color:m=`currentColor`,className:h=``}=y()??{},v=r??p?Number(n??d)*24/Number(t??l):n??d;return(0,u.createElement)(`svg`,{ref:c,...g,width:t??l??g.width,height:t??l??g.height,stroke:e??m,strokeWidth:v,className:f(`lucide`,h,i),...!a&&!_(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,u.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),x=(e,t)=>{let n=(0,u.forwardRef)(({className:n,...r},i)=>(0,u.createElement)(b,{ref:i,iconNode:t,className:f(`lucide-${p(h(e))}`,`lucide-${e}`,n),...r}));return n.displayName=h(e),n},ee=x(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),te=x(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),S=x(`link-2-off`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`,key:`10o201`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`,key:`1d3206`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`,key:`rvw6j4`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}]]),ne=x(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),re=x(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ie=x(`mic-off`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M15 9.34V5a3 3 0 0 0-5.68-1.33`,key:`1gzdoj`}],[`path`,{d:`M16.95 16.95A7 7 0 0 1 5 12v-2`,key:`cqa7eg`}],[`path`,{d:`M18.89 13.23A7 7 0 0 0 19 12v-2`,key:`16hl24`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v3a3 3 0 0 0 5.12 2.12`,key:`r2i35w`}]]),ae=x(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),oe=x(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),se=x(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),ce=x(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),le=x(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ue=[`claude`,`codex`,`antigravity`],de={claude:{kind:`claude`,label:`Claude Code`,vendor:`Anthropic`,bin:`claude`,install:`npm i -g @anthropic-ai/claude-code`,docs:`https://claude.com/claude-code`},codex:{kind:`codex`,label:`Codex`,vendor:`OpenAI`,bin:`codex`,install:`npm i -g @openai/codex`,docs:`https://developers.openai.com/codex/cli`},antigravity:{kind:`antigravity`,label:`Antigravity`,vendor:`Google`,bin:`agy`,install:`https://antigravity.google/docs/cli/install`,docs:`https://antigravity.google/docs/cli`}},fe=ue.map(e=>de[e]);function C(e){return e?.runners.find(t=>t.kind===e.active)}function w(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=w(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function pe(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=w(e))&&(r&&(r+=` `),r+=t);return r}var me=(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},he=(e,t)=>({classGroupId:e,validator:t}),ge=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),T=`-`,E=[],_e=`arbitrary..`,ve=e=>{let t=xe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return be(e);let n=e.split(T);return ye(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?me(i,t):t:i||E}return n[e]||E}}},ye=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=ye(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(T):e.slice(t).join(T),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},be=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?_e+r:void 0})(),xe=e=>{let{theme:t,classGroups:n}=e;return Se(n,t)},Se=(e,t)=>{let n=ge();for(let r in e){let i=e[r];Ce(i,n,r,t)}return n},Ce=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];we(i,t,n,r)}},we=(e,t,n,r)=>{if(typeof e==`string`){Te(e,t,n);return}if(typeof e==`function`){Ee(e,t,n,r);return}De(e,t,n,r)},Te=(e,t,n)=>{let r=e===``?t:Oe(t,e);r.classGroupId=n},Ee=(e,t,n,r)=>{if(ke(e)){Ce(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(he(n,e))},De=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Ce(o,Oe(t,a),n,r)}},Oe=(e,t)=>{let n=e,r=t.split(T),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=ge(),n.nextPart.set(t,i)),n=i}return n},ke=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ae=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)}}},je=`!`,Me=`:`,Ne=[],Pe=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Fe=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===Me){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(je)?(c=s.slice(0,-1),l=!0):s.startsWith(je)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Pe(t,l,c,u)};if(t){let e=t+Me,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Pe(Ne,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Ie=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}},Le=e=>({cache:Ae(e.cacheSize),parseClassName:Fe(e),sortModifiers:Ie(e),postfixLookupClassGroupIds:Re(e),...ve(e)}),Re=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},ze=/\s+/,Be=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(ze),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+je:_,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},Ve=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=He(n))&&(i&&(i+=` `),i+=r);return i},He=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=He(e[r]))&&(n&&(n+=` `),n+=t);return n},Ue=(e,...t)=>{let n,r,i,a,o=o=>(n=Le(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=Be(e,n);return i(e,a),a};return a=o,(...e)=>a(Ve(...e))},We=[],Ge=e=>{let t=t=>t[e]||We;return t.isThemeGetter=!0,t},Ke=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Je=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ye=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xe=/\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$/,Ze=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$e=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,et=e=>Je.test(e),D=e=>!!e&&!Number.isNaN(Number(e)),tt=e=>!!e&&Number.isInteger(Number(e)),nt=e=>e.endsWith(`%`)&&D(e.slice(0,-1)),rt=e=>Ye.test(e),it=()=>!0,at=e=>Xe.test(e)&&!Ze.test(e),ot=()=>!1,st=e=>Qe.test(e),ct=e=>$e.test(e),lt=e=>!O(e)&&!k(e),ut=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)),dt=e=>Et(e,At,ot),O=e=>Ke.test(e),ft=e=>Et(e,jt,at),pt=e=>Et(e,Mt,D),mt=e=>Et(e,Pt,it),ht=e=>Et(e,Nt,ot),gt=e=>Et(e,Ot,ot),_t=e=>Et(e,kt,ct),vt=e=>Et(e,Ft,st),k=e=>qe.test(e),yt=e=>Dt(e,jt),bt=e=>Dt(e,Nt),xt=e=>Dt(e,Ot),St=e=>Dt(e,At),Ct=e=>Dt(e,kt),wt=e=>Dt(e,Ft,!0),Tt=e=>Dt(e,Pt,!0),Et=(e,t,n)=>{let r=Ke.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Dt=(e,t,n=!1)=>{let r=qe.exec(e);return r?r[1]?t(r[1]):n:!1},Ot=e=>e===`position`||e===`percentage`,kt=e=>e===`image`||e===`url`,At=e=>e===`length`||e===`size`||e===`bg-size`,jt=e=>e===`length`,Mt=e=>e===`number`,Nt=e=>e===`family-name`,Pt=e=>e===`number`||e===`weight`,Ft=e=>e===`shadow`,It=Ue(()=>{let e=Ge(`color`),t=Ge(`font`),n=Ge(`text`),r=Ge(`font-weight`),i=Ge(`tracking`),a=Ge(`leading`),o=Ge(`breakpoint`),s=Ge(`container`),c=Ge(`spacing`),l=Ge(`radius`),u=Ge(`shadow`),d=Ge(`inset-shadow`),f=Ge(`text-shadow`),p=Ge(`drop-shadow`),m=Ge(`blur`),h=Ge(`perspective`),g=Ge(`aspect`),_=Ge(`ease`),v=Ge(`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(),k,O],ee=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],te=()=>[`auto`,`contain`,`none`],S=()=>[k,O,c],ne=()=>[et,`full`,`auto`,...S()],re=()=>[tt,`none`,`subgrid`,k,O],ie=()=>[`auto`,{span:[`full`,tt,k,O]},tt,k,O],ae=()=>[tt,`auto`,k,O],oe=()=>[`auto`,`min`,`max`,`fr`,k,O],se=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ce=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],le=()=>[`auto`,...S()],ue=()=>[et,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...S()],de=()=>[et,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...S()],fe=()=>[et,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...S()],C=()=>[e,k,O],w=()=>[...b(),xt,gt,{position:[k,O]}],pe=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],me=()=>[`auto`,`cover`,`contain`,St,dt,{size:[k,O]}],he=()=>[nt,yt,ft],ge=()=>[``,`none`,`full`,l,k,O],T=()=>[``,D,yt,ft],E=()=>[`solid`,`dashed`,`dotted`,`double`],_e=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ve=()=>[D,nt,xt,gt],ye=()=>[``,`none`,m,k,O],be=()=>[`none`,D,k,O],xe=()=>[`none`,D,k,O],Se=()=>[D,k,O],Ce=()=>[et,`full`,...S()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[rt],breakpoint:[rt],color:[it],container:[rt],"drop-shadow":[rt],ease:[`in`,`out`,`in-out`],font:[lt],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[rt],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[rt],shadow:[rt],spacing:[`px`,D],text:[rt],"text-shadow":[rt],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,et,O,k,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,k,O]}],"container-named":[ut],columns:[{columns:[D,O,k,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:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:te()}],"overscroll-x":[{"overscroll-x":te()}],"overscroll-y":[{"overscroll-y":te()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:ne()}],"inset-x":[{"inset-x":ne()}],"inset-y":[{"inset-y":ne()}],start:[{"inset-s":ne(),start:ne()}],end:[{"inset-e":ne(),end:ne()}],"inset-bs":[{"inset-bs":ne()}],"inset-be":[{"inset-be":ne()}],top:[{top:ne()}],right:[{right:ne()}],bottom:[{bottom:ne()}],left:[{left:ne()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[tt,`auto`,k,O]}],basis:[{basis:[et,`full`,`auto`,s,...S()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[D,et,`auto`,`initial`,`none`,O]}],grow:[{grow:[``,D,k,O]}],shrink:[{shrink:[``,D,k,O]}],order:[{order:[tt,`first`,`last`,`none`,k,O]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":oe()}],"auto-rows":[{"auto-rows":oe()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...se(),`normal`]}],"justify-items":[{"justify-items":[...ce(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ce()]}],"align-content":[{content:[`normal`,...se()]}],"align-items":[{items:[...ce(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ce(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...ce(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ce()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:le()}],mx:[{mx:le()}],my:[{my:le()}],ms:[{ms:le()}],me:[{me:le()}],mbs:[{mbs:le()}],mbe:[{mbe:le()}],mt:[{mt:le()}],mr:[{mr:le()}],mb:[{mb:le()}],ml:[{ml:le()}],"space-x":[{"space-x":S()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":S()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ue()}],"inline-size":[{inline:[`auto`,...de()]}],"min-inline-size":[{"min-inline":[`auto`,...de()]}],"max-inline-size":[{"max-inline":[`none`,...de()]}],"block-size":[{block:[`auto`,...fe()]}],"min-block-size":[{"min-block":[`auto`,...fe()]}],"max-block-size":[{"max-block":[`none`,...fe()]}],w:[{w:[s,`screen`,...ue()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ue()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ue()]}],h:[{h:[`screen`,`lh`,...ue()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ue()]}],"max-h":[{"max-h":[`screen`,`lh`,...ue()]}],"font-size":[{text:[`base`,n,yt,ft]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Tt,mt]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,nt,O]}],"font-family":[{font:[bt,ht,t]}],"font-features":[{"font-features":[O]}],"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,k,O]}],"line-clamp":[{"line-clamp":[D,`none`,k,pt]}],leading:[{leading:[a,...S()]}],"list-image":[{"list-image":[`none`,k,O]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,k,O]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...E(),`wavy`]}],"text-decoration-thickness":[{decoration:[D,`from-font`,`auto`,k,ft]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[D,`auto`,k,O]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:S()}],"tab-size":[{tab:[tt,k,O]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,k,O]}],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`,k,O]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:w()}],"bg-repeat":[{bg:pe()}],"bg-size":[{bg:me()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},tt,k,O],radial:[``,k,O],conic:[tt,k,O]},Ct,_t]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:he()}],"gradient-via-pos":[{via:he()}],"gradient-to-pos":[{to:he()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:ge()}],"rounded-s":[{"rounded-s":ge()}],"rounded-e":[{"rounded-e":ge()}],"rounded-t":[{"rounded-t":ge()}],"rounded-r":[{"rounded-r":ge()}],"rounded-b":[{"rounded-b":ge()}],"rounded-l":[{"rounded-l":ge()}],"rounded-ss":[{"rounded-ss":ge()}],"rounded-se":[{"rounded-se":ge()}],"rounded-ee":[{"rounded-ee":ge()}],"rounded-es":[{"rounded-es":ge()}],"rounded-tl":[{"rounded-tl":ge()}],"rounded-tr":[{"rounded-tr":ge()}],"rounded-br":[{"rounded-br":ge()}],"rounded-bl":[{"rounded-bl":ge()}],"border-w":[{border:T()}],"border-w-x":[{"border-x":T()}],"border-w-y":[{"border-y":T()}],"border-w-s":[{"border-s":T()}],"border-w-e":[{"border-e":T()}],"border-w-bs":[{"border-bs":T()}],"border-w-be":[{"border-be":T()}],"border-w-t":[{"border-t":T()}],"border-w-r":[{"border-r":T()}],"border-w-b":[{"border-b":T()}],"border-w-l":[{"border-l":T()}],"divide-x":[{"divide-x":T()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":T()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...E(),`hidden`,`none`]}],"divide-style":[{divide:[...E(),`hidden`,`none`]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-bs":[{"border-bs":C()}],"border-color-be":[{"border-be":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...E(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[D,k,O]}],"outline-w":[{outline:[``,D,yt,ft]}],"outline-color":[{outline:C()}],shadow:[{shadow:[``,`none`,u,wt,vt]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":[`none`,d,wt,vt]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:T()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[D,ft]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":T()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":[`none`,f,wt,vt]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[D,k,O]}],"mix-blend":[{"mix-blend":[..._e(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":_e()}],"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":[D]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[k,O]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"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":[D]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:w()}],"mask-repeat":[{mask:pe()}],"mask-size":[{mask:me()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,k,O]}],filter:[{filter:[``,`none`,k,O]}],blur:[{blur:ye()}],brightness:[{brightness:[D,k,O]}],contrast:[{contrast:[D,k,O]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,wt,vt]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:[``,D,k,O]}],"hue-rotate":[{"hue-rotate":[D,k,O]}],invert:[{invert:[``,D,k,O]}],saturate:[{saturate:[D,k,O]}],sepia:[{sepia:[``,D,k,O]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,k,O]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[D,k,O]}],"backdrop-contrast":[{"backdrop-contrast":[D,k,O]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,D,k,O]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[D,k,O]}],"backdrop-invert":[{"backdrop-invert":[``,D,k,O]}],"backdrop-opacity":[{"backdrop-opacity":[D,k,O]}],"backdrop-saturate":[{"backdrop-saturate":[D,k,O]}],"backdrop-sepia":[{"backdrop-sepia":[``,D,k,O]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,k,O]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[D,`initial`,k,O]}],ease:[{ease:[`linear`,`initial`,_,k,O]}],delay:[{delay:[D,k,O]}],animate:[{animate:[`none`,v,k,O]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,k,O]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:be()}],"rotate-x":[{"rotate-x":be()}],"rotate-y":[{"rotate-y":be()}],"rotate-z":[{"rotate-z":be()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":[`scale-3d`],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[k,O,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"translate-none":[`translate-none`],zoom:[{zoom:[tt,k,O]}],accent:[{accent:C()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:C()}],"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`,k,O]}],"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":C()}],"scrollbar-track-color":[{"scrollbar-track":C()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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`,k,O]}],fill:[{fill:[`none`,...C()]}],"stroke-w":[{stroke:[D,yt,ft,pt]}],stroke:[{stroke:[`none`,...C()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Lt(...e){return It(pe(e))}var Rt=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),zt=t(((e,t)=>{t.exports=Rt()})),A=zt();function Bt(e,{running:t,listening:n}={}){let r=C(e?.agent)?.ready!==!1,i=(e?.connected??!1)&&r;return e?.paired?e.connected?r?t?{tone:`busy`,label:`Working`,ready:i}:n?{tone:`listening`,label:`Listening`,ready:i}:{tone:`live`,label:`Online`,ready:i}:{tone:`warn`,label:`Agent blocked`,ready:i,blocker:`agent`}:{tone:`pending`,label:`Reconnecting`,ready:i,blocker:`offline`}:{tone:`off`,label:`Not paired`,ready:i,blocker:`unpaired`}}var Vt={off:`bg-ink-faint/50`,pending:`glow-dot animate-pulse bg-amber text-amber`,live:`glow-dot bg-lime text-lime`,busy:`glow-dot animate-pulse bg-brand text-brand`,listening:`glow-dot animate-pulse bg-magenta text-magenta`,warn:`glow-dot bg-ember text-ember`},Ht={off:`text-ink-faint`,pending:`text-amber`,live:`text-ink-dim`,busy:`text-brand`,listening:`text-magenta`,warn:`text-ember`};function Ut({tone:e,className:t}){return(0,A.jsx)(`span`,{className:Lt(`size-1.5 shrink-0 rounded-full`,Vt[e],t)})}function Wt({tone:e,children:t,onClick:n,expanded:r,className:i}){let a=(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Ut,{tone:e}),(0,A.jsx)(`span`,{className:`min-w-0 truncate`,children:t}),n&&(0,A.jsx)(te,{className:Lt(`size-3 shrink-0 text-ink-faint transition-transform`,r&&`rotate-180`)})]}),o=Lt(`inline-flex max-w-full items-center gap-1.5 rounded-full border border-line bg-ground-2/70 px-2.5 py-1`,`font-mono text-[10px] tracking-[0.12em] uppercase`,Ht[e],i);return n?(0,A.jsx)(`button`,{type:`button`,onClick:n,"aria-expanded":r,className:Lt(o,`transition-colors hover:border-brand/40 hover:bg-surface/60`),children:a}):(0,A.jsx)(`span`,{className:o,children:a})}var Gt=Object.defineProperty,Kt=(e,t)=>Gt(e,`name`,{value:t,configurable:!0});function qt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Kt(qt,`setRef`);function Jt(...e){return t=>{let n=!1,r=e.map(e=>{let r=qt(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():qt(e[t],null)}}}}Kt(Jt,`composeRefs`);function Yt(...e){return u.useCallback(Jt(...e),e)}Kt(Yt,`useComposedRefs`);var Xt=Object.defineProperty,Zt=(e,t)=>Xt(e,`name`,{value:t,configurable:!0});function Qt(e){let t=u.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];cn(r)&&typeof fn==`function`&&(r=fn(r._payload)),u.Children.forEach(r,e=>{if(on(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;cn(n)&&typeof fn==`function`&&(n=fn(n._payload)),a=nn(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=u.cloneElement(a,void 0,s):!o&&u.Children.count(r)===1&&u.isValidElement(r)&&(a=r);let c=a?an(a):void 0,l=Yt(n,c);if(!a){if(r||r===0)throw Error(o?dn(e):un(e));return r}let d=rn(i,a.props??{});return a.type!==u.Fragment&&(d.ref=n?l:c),u.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}Zt(Qt,`createSlot`);var $t=Qt(`Slot`),en=Symbol.for(`radix.slottable`);function tn(e){let t=Zt(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=en,t}Zt(tn,`createSlottable`);var nn=Zt((e,t)=>{if(`child`in e.props){let t=e.props.child;return u.isValidElement(t)?u.cloneElement(t,void 0,e.props.children(t.props.children)):null}return u.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function rn(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}Zt(rn,`mergeProps`);function an(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Zt(an,`getElementRef`);function on(e){return u.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===en}Zt(on,`isSlottable`);var sn=Symbol.for(`react.lazy`);function cn(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===sn&&`_payload`in e&&ln(e._payload)}Zt(cn,`isLazyComponent`);function ln(e){return typeof e==`object`&&!!e&&`then`in e}Zt(ln,`isPromiseLike`);var un=Zt(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),dn=Zt(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),fn=u.use,pn=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,mn=pe,hn=(e,t)=>n=>{if(t?.variants==null)return mn(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=pn(t)||pn(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return mn(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},gn=hn(`inline-flex shrink-0 items-center justify-center gap-2 rounded-full font-medium whitespace-nowrap outline-none transition-all duration-200 disabled:pointer-events-none disabled:opacity-45 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-2 focus-visible:ring-offset-ground aria-invalid:border-destructive`,{variants:{variant:{default:`glow-brand bg-brand text-ground hover:bg-brand/90`,destructive:`glow-destructive bg-destructive text-ink hover:bg-destructive/90`,outline:`border border-line-strong bg-surface/40 text-ink hover:border-brand/45 hover:bg-surface/70`,secondary:`bg-surface text-ink hover:bg-surface-2`,ghost:`text-ink-dim hover:bg-surface/70 hover:text-ink`,subtle:`bg-brand/12 text-brand hover:bg-brand/20`,link:`text-brand underline-offset-4 hover:underline`},size:{default:`h-9 px-4 text-sm has-[>svg]:px-3.5`,sm:`h-7 gap-1.5 px-3 text-xs has-[>svg]:px-2.5`,lg:`h-10 px-6 text-sm has-[>svg]:px-5`,icon:`size-9`,"icon-sm":`size-7`}},defaultVariants:{variant:`default`,size:`default`}});function _n({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,A.jsx)(r?$t:`button`,{"data-slot":`button`,className:Lt(gn({variant:t,size:n,className:e})),...i})}var vn=`browsentic/action`,yn=`browsentic/bridge`,bn=(e,t)=>({ok:!1,error:{code:e,message:t}});new TextEncoder,new TextDecoder;var xn;function j(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var Sn=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Cn=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(xn=globalThis).__zod_globalConfig??(xn.__zod_globalConfig={});var wn=globalThis.__zod_globalConfig;function Tn(e){return e&&Object.assign(wn,e),wn}function En(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Dn(e,t){return typeof t==`bigint`?t.toString():t}function On(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function kn(e){return e==null}function An(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function jn(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var Mn=Symbol(`evaluating`);function M(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Mn)return r===void 0&&(r=Mn,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Nn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Pn(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Fn(e){return JSON.stringify(e)}function In(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Ln=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Rn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var zn=On(()=>{if(wn.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Bn(e){if(Rn(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Rn(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Vn(e){return Bn(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Hn=new Set([`string`,`number`,`symbol`]);function Un(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Wn(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function N(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Gn(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var Kn={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function qn(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Wn(e,Pn(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Nn(this,`shape`,e),e},checks:[]}))}function Jn(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Wn(e,Pn(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Nn(this,`shape`,r),r},checks:[]}))}function Yn(e,t){if(!Bn(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Wn(e,Pn(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Nn(this,`shape`,n),n}}))}function Xn(e,t){if(!Bn(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Wn(e,Pn(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Nn(this,`shape`,n),n}}))}function Zn(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return Wn(e,Pn(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Nn(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Qn(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return Wn(t,Pn(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Nn(this,`shape`,i),i},checks:[]}))}function $n(e,t,n){return Wn(t,Pn(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Nn(this,`shape`,i),i}}))}function er(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function tr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function nr(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function rr(e){return typeof e==`string`?e:e?.message}function ir(e,t,n){let r=e.message?e.message:rr(e.inst?._zod.def?.error?.(e))??rr(t?.error?.(e))??rr(n.customError?.(e))??rr(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function ar(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function or(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var sr=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Dn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},cr=j(`$ZodError`,sr),lr=j(`$ZodError`,sr,{Parent:Error});function ur(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function dr(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var fr=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Sn;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>ir(e,a,Tn())));throw Ln(t,i?.callee),t}return o.value},pr=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>ir(e,a,Tn())));throw Ln(t,i?.callee),t}return o.value},mr=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Sn;return a.issues.length?{success:!1,error:new(e??cr)(a.issues.map(e=>ir(e,i,Tn())))}:{success:!0,data:a.value}},hr=mr(lr),gr=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>ir(e,i,Tn())))}:{success:!0,data:a.value}},_r=gr(lr),vr=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return fr(e)(t,n,i)},yr=e=>(t,n,r)=>fr(e)(t,n,r),br=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return pr(e)(t,n,i)},xr=e=>async(t,n,r)=>pr(e)(t,n,r),Sr=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return mr(e)(t,n,i)},Cr=e=>(t,n,r)=>mr(e)(t,n,r),wr=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return gr(e)(t,n,i)},Tr=e=>async(t,n,r)=>gr(e)(t,n,r),Er=/^[cC][0-9a-z]{6,}$/,Dr=/^[0-9a-z]+$/,Or=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,kr=/^[0-9a-vA-V]{20}$/,Ar=/^[A-Za-z0-9]{27}$/,jr=/^[a-zA-Z0-9_-]{21}$/,Mr=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Nr=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Pr=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Fr=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ir=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Lr(){return new RegExp(Ir,`u`)}var Rr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,zr=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Br=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Vr=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Hr=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ur=/^[A-Za-z0-9_-]*$/,Wr=/^https?$/,Gr=/^\+[1-9]\d{6,14}$/,Kr=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,qr=RegExp(`^${Kr}$`);function Jr(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Yr(e){return RegExp(`^${Jr(e)}$`)}function Xr(e){let t=Jr({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Kr}T(?:${r})$`)}var Zr=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Qr=/^-?\d+$/,$r=/^-?\d+(?:\.\d+)?$/,ei=/^(?:true|false)$/i,ti=/^[^A-Z]*$/,ni=/^[^a-z]*$/,ri=j(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ii={number:`number`,bigint:`bigint`,object:`date`},ai=j(`$ZodCheckLessThan`,(e,t)=>{ri.init(e,t);let n=ii[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),oi=j(`$ZodCheckGreaterThan`,(e,t)=>{ri.init(e,t);let n=ii[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),si=j(`$ZodCheckMultipleOf`,(e,t)=>{ri.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):jn(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ci=j(`$ZodCheckNumberFormat`,(e,t)=>{ri.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Kn[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Qr)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),li=j(`$ZodCheckMaxLength`,(e,t)=>{var n;ri.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!kn(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=ar(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ui=j(`$ZodCheckMinLength`,(e,t)=>{var n;ri.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!kn(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=ar(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),di=j(`$ZodCheckLengthEquals`,(e,t)=>{var n;ri.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!kn(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=ar(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),fi=j(`$ZodCheckStringFormat`,(e,t)=>{var n,r;ri.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),pi=j(`$ZodCheckRegex`,(e,t)=>{fi.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),mi=j(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=ti,fi.init(e,t)}),hi=j(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=ni,fi.init(e,t)}),gi=j(`$ZodCheckIncludes`,(e,t)=>{ri.init(e,t);let n=Un(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),_i=j(`$ZodCheckStartsWith`,(e,t)=>{ri.init(e,t);let n=RegExp(`^${Un(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),vi=j(`$ZodCheckEndsWith`,(e,t)=>{ri.init(e,t);let n=RegExp(`.*${Un(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),yi=j(`$ZodCheckOverwrite`,(e,t)=>{ri.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),bi=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
10
|
-
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
11
|
-
`))}},xi={major:4,minor:4,patch:3},Si=j(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=xi;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=er(e),i;for(let a of t){if(a._zod.def.when){if(tr(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Sn;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=er(e,t))});else{if(e.issues.length===t)continue;r||=er(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(er(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Sn;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Sn;return o.then(e=>t(e,r,a))}return t(o,r,a)}}M(e,`~standard`,()=>({validate:t=>{try{let n=hr(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return _r(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Ci=j(`$ZodString`,(e,t)=>{Si.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Zr(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),P=j(`$ZodStringFormat`,(e,t)=>{fi.init(e,t),Ci.init(e,t)}),wi=j(`$ZodGUID`,(e,t)=>{t.pattern??=Nr,P.init(e,t)}),Ti=j(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Pr(e)}else t.pattern??=Pr();P.init(e,t)}),Ei=j(`$ZodEmail`,(e,t)=>{t.pattern??=Fr,P.init(e,t)}),Di=j(`$ZodURL`,(e,t)=>{P.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Wr.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Oi=j(`$ZodEmoji`,(e,t)=>{t.pattern??=Lr(),P.init(e,t)}),ki=j(`$ZodNanoID`,(e,t)=>{t.pattern??=jr,P.init(e,t)}),Ai=j(`$ZodCUID`,(e,t)=>{t.pattern??=Er,P.init(e,t)}),ji=j(`$ZodCUID2`,(e,t)=>{t.pattern??=Dr,P.init(e,t)}),Mi=j(`$ZodULID`,(e,t)=>{t.pattern??=Or,P.init(e,t)}),Ni=j(`$ZodXID`,(e,t)=>{t.pattern??=kr,P.init(e,t)}),Pi=j(`$ZodKSUID`,(e,t)=>{t.pattern??=Ar,P.init(e,t)}),Fi=j(`$ZodISODateTime`,(e,t)=>{t.pattern??=Xr(t),P.init(e,t)}),Ii=j(`$ZodISODate`,(e,t)=>{t.pattern??=qr,P.init(e,t)}),Li=j(`$ZodISOTime`,(e,t)=>{t.pattern??=Yr(t),P.init(e,t)}),Ri=j(`$ZodISODuration`,(e,t)=>{t.pattern??=Mr,P.init(e,t)}),F=j(`$ZodIPv4`,(e,t)=>{t.pattern??=Rr,P.init(e,t),e._zod.bag.format=`ipv4`}),zi=j(`$ZodIPv6`,(e,t)=>{t.pattern??=zr,P.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Bi=j(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Br,P.init(e,t)}),Vi=j(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Vr,P.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Hi(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Ui=j(`$ZodBase64`,(e,t)=>{t.pattern??=Hr,P.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Hi(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Wi(e){if(!Ur.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Hi(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Gi=j(`$ZodBase64URL`,(e,t)=>{t.pattern??=Ur,P.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Wi(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Ki=j(`$ZodE164`,(e,t)=>{t.pattern??=Gr,P.init(e,t)});function qi(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Ji=j(`$ZodJWT`,(e,t)=>{P.init(e,t),e._zod.check=n=>{qi(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Yi=j(`$ZodNumber`,(e,t)=>{Si.init(e,t),e._zod.pattern=e._zod.bag.pattern??$r,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Xi=j(`$ZodNumberFormat`,(e,t)=>{ci.init(e,t),Yi.init(e,t)}),Zi=j(`$ZodBoolean`,(e,t)=>{Si.init(e,t),e._zod.pattern=ei,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Qi=j(`$ZodUnknown`,(e,t)=>{Si.init(e,t),e._zod.parse=e=>e}),$i=j(`$ZodNever`,(e,t)=>{Si.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function ea(e,t,n){e.issues.length&&t.issues.push(...nr(n,e.issues)),t.value[n]=e.value}var ta=j(`$ZodArray`,(e,t)=>{Si.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>ea(t,n,e))):ea(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function na(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...nr(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function ra(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=Gn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ia(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>na(e,n,i,t,u,d))):na(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var aa=j(`$ZodObject`,(e,t)=>{if(Si.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=On(()=>ra(t));M(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Rn,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>na(n,t,e,s,r,i))):na(a,t,e,s,r,i)}return i?ia(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),oa=j(`$ZodObjectJIT`,(e,t)=>{aa.init(e,t);let n=e._zod.parse,r=On(()=>ra(t)),i=e=>{let t=new bi([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Fn(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Fn(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
12
|
-
if (${n}.issues.length) {
|
|
13
|
-
if (${o} in input) {
|
|
14
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
15
|
-
...iss,
|
|
16
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
17
|
-
})));
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (${n}.value === undefined) {
|
|
22
|
-
if (${o} in input) {
|
|
23
|
-
newResult[${o}] = undefined;
|
|
24
|
-
}
|
|
25
|
-
} else {
|
|
26
|
-
newResult[${o}] = ${n}.value;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
`):c?t.write(`
|
|
30
|
-
if (${n}.issues.length) {
|
|
31
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
32
|
-
...iss,
|
|
33
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
34
|
-
})));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (${n}.value === undefined) {
|
|
38
|
-
if (${o} in input) {
|
|
39
|
-
newResult[${o}] = undefined;
|
|
40
|
-
}
|
|
41
|
-
} else {
|
|
42
|
-
newResult[${o}] = ${n}.value;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
`):t.write(`
|
|
46
|
-
const ${n}_present = ${o} in input;
|
|
47
|
-
if (${n}.issues.length) {
|
|
48
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
49
|
-
...iss,
|
|
50
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
51
|
-
})));
|
|
52
|
-
}
|
|
53
|
-
if (!${n}_present && !${n}.issues.length) {
|
|
54
|
-
payload.issues.push({
|
|
55
|
-
code: "invalid_type",
|
|
56
|
-
expected: "nonoptional",
|
|
57
|
-
input: undefined,
|
|
58
|
-
path: [${o}]
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (${n}_present) {
|
|
63
|
-
if (${n}.value === undefined) {
|
|
64
|
-
newResult[${o}] = undefined;
|
|
65
|
-
} else {
|
|
66
|
-
newResult[${o}] = ${n}.value;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Rn,s=!wn.jitless,c=s&&zn.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?ia([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function sa(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!er(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>ir(e,r,Tn())))}),t)}var ca=j(`$ZodUnion`,(e,t)=>{Si.init(e,t),M(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),M(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),M(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),M(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>An(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>sa(t,r,e,i)):sa(o,r,e,i)}}),la=j(`$ZodIntersection`,(e,t)=>{Si.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>da(e,t,n)):da(e,i,a)}});function ua(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Bn(e)&&Bn(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=ua(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=ua(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function da(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),er(e))return e;let o=ua(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var fa=j(`$ZodRecord`,(e,t)=>{Si.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Bn(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>ir(e,r,Tn())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...nr(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...nr(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&$r.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>ir(e,r,Tn())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...nr(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...nr(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),pa=j(`$ZodEnum`,(e,t)=>{Si.init(e,t);let n=En(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Hn.has(typeof e)).map(e=>typeof e==`string`?Un(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),ma=j(`$ZodTransform`,(e,t)=>{Si.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Cn(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new Sn;return n.value=i,n.fallback=!0,n}});function ha(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var ga=j(`$ZodOptional`,(e,t)=>{Si.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,M(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),M(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${An(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>ha(e,r)):ha(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),_a=j(`$ZodExactOptional`,(e,t)=>{ga.init(e,t),M(e._zod,`values`,()=>t.innerType._zod.values),M(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),va=j(`$ZodNullable`,(e,t)=>{Si.init(e,t),M(e._zod,`optin`,()=>t.innerType._zod.optin),M(e._zod,`optout`,()=>t.innerType._zod.optout),M(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${An(e.source)}|null)$`):void 0}),M(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),ya=j(`$ZodDefault`,(e,t)=>{Si.init(e,t),e._zod.optin=`optional`,M(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ba(e,t)):ba(r,t)}});function ba(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var xa=j(`$ZodPrefault`,(e,t)=>{Si.init(e,t),e._zod.optin=`optional`,M(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Sa=j(`$ZodNonOptional`,(e,t)=>{Si.init(e,t),M(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Ca(t,e)):Ca(i,e)}});function Ca(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var wa=j(`$ZodCatch`,(e,t)=>{Si.init(e,t),e._zod.optin=`optional`,M(e._zod,`optout`,()=>t.innerType._zod.optout),M(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>ir(e,n,Tn()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>ir(e,n,Tn()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Ta=j(`$ZodPipe`,(e,t)=>{Si.init(e,t),M(e._zod,`values`,()=>t.in._zod.values),M(e._zod,`optin`,()=>t.in._zod.optin),M(e._zod,`optout`,()=>t.out._zod.optout),M(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Ea(e,t.in,n)):Ea(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ea(e,t.out,n)):Ea(r,t.out,n)}});function Ea(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Da=j(`$ZodReadonly`,(e,t)=>{Si.init(e,t),M(e._zod,`propValues`,()=>t.innerType._zod.propValues),M(e._zod,`values`,()=>t.innerType._zod.values),M(e._zod,`optin`,()=>t.innerType?._zod?.optin),M(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Oa):Oa(r)}});function Oa(e){return e.value=Object.freeze(e.value),e}var ka=j(`$ZodCustom`,(e,t)=>{ri.init(e,t),Si.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Aa(t,n,r,e));Aa(i,n,r,e)}});function Aa(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(or(e))}}var ja,Ma=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Na(){return new Ma}(ja=globalThis).__zod_globalRegistry??(ja.__zod_globalRegistry=Na());var Pa=globalThis.__zod_globalRegistry;function Fa(e,t){return new e({type:`string`,...N(t)})}function Ia(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...N(t)})}function La(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...N(t)})}function Ra(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...N(t)})}function za(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...N(t)})}function Ba(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...N(t)})}function Va(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...N(t)})}function Ha(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...N(t)})}function Ua(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...N(t)})}function Wa(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...N(t)})}function Ga(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...N(t)})}function Ka(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...N(t)})}function qa(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...N(t)})}function Ja(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...N(t)})}function Ya(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...N(t)})}function Xa(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...N(t)})}function Za(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...N(t)})}function Qa(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...N(t)})}function $a(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...N(t)})}function eo(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...N(t)})}function to(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...N(t)})}function no(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...N(t)})}function ro(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...N(t)})}function io(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...N(t)})}function ao(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...N(t)})}function oo(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...N(t)})}function so(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...N(t)})}function co(e,t){return new e({type:`number`,checks:[],...N(t)})}function lo(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...N(t)})}function uo(e,t){return new e({type:`boolean`,...N(t)})}function fo(e){return new e({type:`unknown`})}function po(e,t){return new e({type:`never`,...N(t)})}function mo(e,t){return new ai({check:`less_than`,...N(t),value:e,inclusive:!1})}function ho(e,t){return new ai({check:`less_than`,...N(t),value:e,inclusive:!0})}function go(e,t){return new oi({check:`greater_than`,...N(t),value:e,inclusive:!1})}function _o(e,t){return new oi({check:`greater_than`,...N(t),value:e,inclusive:!0})}function I(e,t){return new si({check:`multiple_of`,...N(t),value:e})}function L(e,t){return new li({check:`max_length`,...N(t),maximum:e})}function vo(e,t){return new ui({check:`min_length`,...N(t),minimum:e})}function yo(e,t){return new di({check:`length_equals`,...N(t),length:e})}function bo(e,t){return new pi({check:`string_format`,format:`regex`,...N(t),pattern:e})}function xo(e){return new mi({check:`string_format`,format:`lowercase`,...N(e)})}function So(e){return new hi({check:`string_format`,format:`uppercase`,...N(e)})}function Co(e,t){return new gi({check:`string_format`,format:`includes`,...N(t),includes:e})}function wo(e,t){return new _i({check:`string_format`,format:`starts_with`,...N(t),prefix:e})}function To(e,t){return new vi({check:`string_format`,format:`ends_with`,...N(t),suffix:e})}function R(e){return new yi({check:`overwrite`,tx:e})}function Eo(e){return R(t=>t.normalize(e))}function Do(){return R(e=>e.trim())}function Oo(){return R(e=>e.toLowerCase())}function ko(){return R(e=>e.toUpperCase())}function Ao(){return R(e=>In(e))}function jo(e,t,n){return new e({type:`array`,element:t,...N(n)})}function Mo(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...N(n)})}function No(e,t){let n=Po(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(or(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(or(r))}},e(t.value,t)),t);return n}function Po(e,t){let n=new ri({check:`custom`,...N(t)});return n._zod.check=e,n}function Fo(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Pa,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function Io(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,Io(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&zo(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Lo(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
71
|
-
|
|
72
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Ro(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Vo(t,`input`,e.processors),output:Vo(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function zo(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return zo(r.element,n);if(r.type===`set`)return zo(r.valueType,n);if(r.type===`lazy`)return zo(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return zo(r.innerType,n);if(r.type===`intersection`)return zo(r.left,n)||zo(r.right,n);if(r.type===`record`||r.type===`map`)return zo(r.keyType,n)||zo(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:zo(r.in,n)||zo(r.out,n);if(r.type===`object`){for(let e in r.shape)if(zo(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(zo(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(zo(e,n))return!0;return!!(r.rest&&zo(r.rest,n))}return!1}var Bo=(e,t={})=>n=>{let r=Fo({...n,processors:t});return Io(e,r),Lo(r,e),Ro(r,e)},Vo=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Fo({...i??{},target:a,io:t,processors:n});return Io(e,o),Lo(o,e),Ro(o,e)},Ho={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Uo=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Ho[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Wo=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},Go=(e,t,n,r)=>{n.type=`boolean`},Ko=(e,t,n,r)=>{n.not={}},qo=(e,t,n,r)=>{let i=e._zod.def,a=En(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Jo=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Yo=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Xo=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Io(a.element,t,{...r,path:[...r.path,`items`]})},Zo=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=Io(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Io(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Qo=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Io(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},$o=(e,t,n,r)=>{let i=e._zod.def,a=Io(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Io(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},es=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=Io(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=Io(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=Io(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},ts=(e,t,n,r)=>{let i=e._zod.def,a=Io(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},ns=(e,t,n,r)=>{let i=e._zod.def;Io(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},rs=(e,t,n,r)=>{let i=e._zod.def;Io(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},is=(e,t,n,r)=>{let i=e._zod.def;Io(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},as=(e,t,n,r)=>{let i=e._zod.def;Io(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},os=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;Io(o,t,r);let s=t.seen.get(e);s.ref=o},ss=(e,t,n,r)=>{let i=e._zod.def;Io(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},cs=(e,t,n,r)=>{let i=e._zod.def;Io(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ls=j(`ZodISODateTime`,(e,t)=>{Fi.init(e,t),Fs.init(e,t)});function us(e){return io(ls,e)}var ds=j(`ZodISODate`,(e,t)=>{Ii.init(e,t),Fs.init(e,t)});function fs(e){return ao(ds,e)}var ps=j(`ZodISOTime`,(e,t)=>{Li.init(e,t),Fs.init(e,t)});function ms(e){return oo(ps,e)}var hs=j(`ZodISODuration`,(e,t)=>{Ri.init(e,t),Fs.init(e,t)});function gs(e){return so(hs,e)}var _s=j(`ZodError`,(e,t)=>{cr.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>dr(e,t)},flatten:{value:t=>ur(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Dn,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Dn,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),vs=fr(_s),ys=pr(_s),bs=mr(_s),xs=gr(_s),Ss=vr(_s),Cs=yr(_s),ws=br(_s),Ts=xr(_s),Es=Sr(_s),Ds=Cr(_s),Os=wr(_s),ks=Tr(_s),As=new WeakMap;function js(e,t,n){let r=Object.getPrototypeOf(e),i=As.get(r);if(i||(i=new Set,As.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var Ms=j(`ZodType`,(e,t)=>(Si.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Vo(e,`input`),output:Vo(e,`output`)}}),e.toJSONSchema=Bo(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>vs(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>bs(e,t,n),e.parseAsync=async(t,n)=>ys(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>xs(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Ss(e,t,n),e.decode=(t,n)=>Cs(e,t,n),e.encodeAsync=async(t,n)=>ws(e,t,n),e.decodeAsync=async(t,n)=>Ts(e,t,n),e.safeEncode=(t,n)=>Es(e,t,n),e.safeDecode=(t,n)=>Ds(e,t,n),e.safeEncodeAsync=async(t,n)=>Os(e,t,n),e.safeDecodeAsync=async(t,n)=>ks(e,t,n),js(e,`ZodType`,{check(...e){let t=this.def;return this.clone(Pn(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Wn(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Hc(e,t))},superRefine(e,t){return this.check(Uc(e,t))},overwrite(e){return this.check(R(e))},optional(){return wc(this)},exactOptional(){return Ec(this)},nullable(){return Oc(this)},nullish(){return wc(Oc(this))},nonoptional(e){return Pc(this,e)},array(){return dc(this)},or(e){return mc([this,e])},and(e){return gc(this,e)},transform(e){return Rc(this,Sc(e))},default(e){return Ac(this,e)},prefault(e){return Mc(this,e)},catch(e){return Ic(this,e)},pipe(e){return Rc(this,e)},readonly(){return Bc(this)},describe(e){let t=this.clone();return Pa.add(t,{description:e}),t},meta(...e){if(e.length===0)return Pa.get(this);let t=this.clone();return Pa.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return Pa.get(e)?.description},configurable:!0}),e)),Ns=j(`_ZodString`,(e,t)=>{Ci.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uo(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,js(e,`_ZodString`,{regex(...e){return this.check(bo(...e))},includes(...e){return this.check(Co(...e))},startsWith(...e){return this.check(wo(...e))},endsWith(...e){return this.check(To(...e))},min(...e){return this.check(vo(...e))},max(...e){return this.check(L(...e))},length(...e){return this.check(yo(...e))},nonempty(...e){return this.check(vo(1,...e))},lowercase(e){return this.check(xo(e))},uppercase(e){return this.check(So(e))},trim(){return this.check(Do())},normalize(...e){return this.check(Eo(...e))},toLowerCase(){return this.check(Oo())},toUpperCase(){return this.check(ko())},slugify(){return this.check(Ao())}})}),Ps=j(`ZodString`,(e,t)=>{Ci.init(e,t),Ns.init(e,t),e.email=t=>e.check(Ia(Is,t)),e.url=t=>e.check(Ha(zs,t)),e.jwt=t=>e.check(ro(ec,t)),e.emoji=t=>e.check(Ua(Bs,t)),e.guid=t=>e.check(La(Ls,t)),e.uuid=t=>e.check(Ra(Rs,t)),e.uuidv4=t=>e.check(za(Rs,t)),e.uuidv6=t=>e.check(Ba(Rs,t)),e.uuidv7=t=>e.check(Va(Rs,t)),e.nanoid=t=>e.check(Wa(Vs,t)),e.guid=t=>e.check(La(Ls,t)),e.cuid=t=>e.check(Ga(Hs,t)),e.cuid2=t=>e.check(Ka(Us,t)),e.ulid=t=>e.check(qa(Ws,t)),e.base64=t=>e.check(eo(Zs,t)),e.base64url=t=>e.check(to(Qs,t)),e.xid=t=>e.check(Ja(Gs,t)),e.ksuid=t=>e.check(Ya(Ks,t)),e.ipv4=t=>e.check(Xa(qs,t)),e.ipv6=t=>e.check(Za(Js,t)),e.cidrv4=t=>e.check(Qa(Ys,t)),e.cidrv6=t=>e.check($a(Xs,t)),e.e164=t=>e.check(no($s,t)),e.datetime=t=>e.check(us(t)),e.date=t=>e.check(fs(t)),e.time=t=>e.check(ms(t)),e.duration=t=>e.check(gs(t))});function z(e){return Fa(Ps,e)}var Fs=j(`ZodStringFormat`,(e,t)=>{P.init(e,t),Ns.init(e,t)}),Is=j(`ZodEmail`,(e,t)=>{Ei.init(e,t),Fs.init(e,t)}),Ls=j(`ZodGUID`,(e,t)=>{wi.init(e,t),Fs.init(e,t)}),Rs=j(`ZodUUID`,(e,t)=>{Ti.init(e,t),Fs.init(e,t)}),zs=j(`ZodURL`,(e,t)=>{Di.init(e,t),Fs.init(e,t)}),Bs=j(`ZodEmoji`,(e,t)=>{Oi.init(e,t),Fs.init(e,t)}),Vs=j(`ZodNanoID`,(e,t)=>{ki.init(e,t),Fs.init(e,t)}),Hs=j(`ZodCUID`,(e,t)=>{Ai.init(e,t),Fs.init(e,t)}),Us=j(`ZodCUID2`,(e,t)=>{ji.init(e,t),Fs.init(e,t)}),Ws=j(`ZodULID`,(e,t)=>{Mi.init(e,t),Fs.init(e,t)}),Gs=j(`ZodXID`,(e,t)=>{Ni.init(e,t),Fs.init(e,t)}),Ks=j(`ZodKSUID`,(e,t)=>{Pi.init(e,t),Fs.init(e,t)}),qs=j(`ZodIPv4`,(e,t)=>{F.init(e,t),Fs.init(e,t)}),Js=j(`ZodIPv6`,(e,t)=>{zi.init(e,t),Fs.init(e,t)}),Ys=j(`ZodCIDRv4`,(e,t)=>{Bi.init(e,t),Fs.init(e,t)}),Xs=j(`ZodCIDRv6`,(e,t)=>{Vi.init(e,t),Fs.init(e,t)}),Zs=j(`ZodBase64`,(e,t)=>{Ui.init(e,t),Fs.init(e,t)}),Qs=j(`ZodBase64URL`,(e,t)=>{Gi.init(e,t),Fs.init(e,t)}),$s=j(`ZodE164`,(e,t)=>{Ki.init(e,t),Fs.init(e,t)}),ec=j(`ZodJWT`,(e,t)=>{Ji.init(e,t),Fs.init(e,t)}),tc=j(`ZodNumber`,(e,t)=>{Yi.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wo(e,t,n,r),js(e,`ZodNumber`,{gt(e,t){return this.check(go(e,t))},gte(e,t){return this.check(_o(e,t))},min(e,t){return this.check(_o(e,t))},lt(e,t){return this.check(mo(e,t))},lte(e,t){return this.check(ho(e,t))},max(e,t){return this.check(ho(e,t))},int(e){return this.check(rc(e))},safe(e){return this.check(rc(e))},positive(e){return this.check(go(0,e))},nonnegative(e){return this.check(_o(0,e))},negative(e){return this.check(mo(0,e))},nonpositive(e){return this.check(ho(0,e))},multipleOf(e,t){return this.check(I(e,t))},step(e,t){return this.check(I(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function B(e){return co(tc,e)}var nc=j(`ZodNumberFormat`,(e,t)=>{Xi.init(e,t),tc.init(e,t)});function rc(e){return lo(nc,e)}var ic=j(`ZodBoolean`,(e,t)=>{Zi.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Go(e,t,n,r)});function ac(e){return uo(ic,e)}var oc=j(`ZodUnknown`,(e,t)=>{Qi.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function sc(){return fo(oc)}var cc=j(`ZodNever`,(e,t)=>{$i.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ko(e,t,n,r)});function lc(e){return po(cc,e)}var uc=j(`ZodArray`,(e,t)=>{ta.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xo(e,t,n,r),e.element=t.element,js(e,`ZodArray`,{min(e,t){return this.check(vo(e,t))},nonempty(e){return this.check(vo(1,e))},max(e,t){return this.check(L(e,t))},length(e,t){return this.check(yo(e,t))},unwrap(){return this.element}})});function dc(e,t){return jo(uc,e,t)}var fc=j(`ZodObject`,(e,t)=>{oa.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zo(e,t,n,r),M(e,`shape`,()=>t.shape),js(e,`ZodObject`,{keyof(){return bc(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:sc()})},loose(){return this.clone({...this._zod.def,catchall:sc()})},strict(){return this.clone({...this._zod.def,catchall:lc()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Yn(this,e)},safeExtend(e){return Xn(this,e)},merge(e){return Zn(this,e)},pick(e){return qn(this,e)},omit(e){return Jn(this,e)},partial(...e){return Qn(Cc,this,e[0])},required(...e){return $n(Nc,this,e[0])}})});function V(e,t){return new fc({type:`object`,shape:e??{},...N(t)})}var pc=j(`ZodUnion`,(e,t)=>{ca.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qo(e,t,n,r),e.options=t.options});function mc(e,t){return new pc({type:`union`,options:e,...N(t)})}var hc=j(`ZodIntersection`,(e,t)=>{la.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$o(e,t,n,r)});function gc(e,t){return new hc({type:`intersection`,left:e,right:t})}var _c=j(`ZodRecord`,(e,t)=>{fa.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>es(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function vc(e,t,n){return!t||!t._zod?new _c({type:`record`,keyType:z(),valueType:e,...N(t)}):new _c({type:`record`,keyType:e,valueType:t,...N(n)})}var yc=j(`ZodEnum`,(e,t)=>{pa.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qo(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new yc({...t,checks:[],...N(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new yc({...t,checks:[],...N(r),entries:i})}});function bc(e,t){return new yc({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...N(t)})}var xc=j(`ZodTransform`,(e,t)=>{ma.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yo(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Cn(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(or(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(or(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function Sc(e){return new xc({type:`transform`,transform:e})}var Cc=j(`ZodOptional`,(e,t)=>{ga.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wc(e){return new Cc({type:`optional`,innerType:e})}var Tc=j(`ZodExactOptional`,(e,t)=>{_a.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ec(e){return new Tc({type:`optional`,innerType:e})}var Dc=j(`ZodNullable`,(e,t)=>{va.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ts(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Oc(e){return new Dc({type:`nullable`,innerType:e})}var kc=j(`ZodDefault`,(e,t)=>{ya.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ac(e,t){return new kc({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Vn(t)}})}var jc=j(`ZodPrefault`,(e,t)=>{xa.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>is(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Mc(e,t){return new jc({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Vn(t)}})}var Nc=j(`ZodNonOptional`,(e,t)=>{Sa.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ns(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Pc(e,t){return new Nc({type:`nonoptional`,innerType:e,...N(t)})}var Fc=j(`ZodCatch`,(e,t)=>{wa.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>as(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ic(e,t){return new Fc({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Lc=j(`ZodPipe`,(e,t)=>{Ta.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>os(e,t,n,r),e.in=t.in,e.out=t.out});function Rc(e,t){return new Lc({type:`pipe`,in:e,out:t})}var zc=j(`ZodReadonly`,(e,t)=>{Da.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ss(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Bc(e){return new zc({type:`readonly`,innerType:e})}var Vc=j(`ZodCustom`,(e,t)=>{ka.init(e,t),Ms.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jo(e,t,n,r)});function Hc(e,t={}){return Mo(Vc,e,t)}function Uc(e,t){return No(e,t)}function H(e){return Object.freeze(e)}var U=class extends Error{code;constructor(e,t=`ACTION_FAILED`){super(e),this.code=t,this.name=`ActionError`}},Wc={r:0,g:0,b:0,a:0},Gc={r:255,g:255,b:255,a:1},Kc={r:18,g:18,b:18,a:1},qc=/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Jc=/^rgba?\(([^)]+)\)$/i,Yc=/-?\d*\.?\d+(?:e-?\d+)?%?/gi,Xc=new Map;function Zc(e){let t=e?.trim();return t?(Xc.has(t)||Xc.set(t,Qc(t)),Xc.get(t)??null):null}function Qc(e){return e===`transparent`?Wc:$c(e)??el(e)??rl(e)}function $c(e){if(!qc.test(e))return null;let t=e.slice(1),n=t.length>4,r=n?2:1,i=e=>{let i=t.slice(e*r,e*r+r);return parseInt(n?i:i+i,16)},a=t.length===4||t.length===8?i(3)/255:1;return{r:i(0),g:i(1),b:i(2),a}}function el(e){let t=(Jc.exec(e)?.[1])?.match(Yc);if(!t||t.length<3)return null;let n=(e,t)=>e.endsWith(`%`)?parseFloat(e)/100*t:parseFloat(e);return{r:yl(n(t[0],255)),g:yl(n(t[1],255)),b:yl(n(t[2],255)),a:t[3]===void 0?1:vl(n(t[3],1))}}var tl;function nl(){return tl??=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),tl}function rl(e){let t=nl();if(!t)return null;t.fillStyle=`#000000`,t.fillStyle=e;let n=t.fillStyle;return t.fillStyle=`#ffffff`,t.fillStyle=e,n===t.fillStyle?$c(t.fillStyle)??el(t.fillStyle)??il(t,e):null}function il(e,t){e.clearRect(0,0,1,1),e.fillStyle=t,e.fillRect(0,0,1,1);let[n,r,i,a]=e.getImageData(0,0,1,1).data;return{r:n,g:r,b:i,a:a/255}}function al({r:e,g:t,b:n,a:r}){let i=e=>yl(e).toString(16).padStart(2,`0`),a=r>=1?``:i(Math.round(r*255));return`#${i(e)}${i(t)}${i(n)}${a}`}function ol({r:e,g:t,b:n,a:r}){return{r:255-e,g:255-t,b:255-n,a:r}}function sl({r:e,g:t,b:n}){return .2126*cl(e)+.7152*cl(t)+.0722*cl(n)}function cl(e){let t=yl(e)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function ll(e,t){let n=sl(e),r=sl(t),i=Math.max(n,r),a=Math.min(n,r);return(i+.05)/(a+.05)}function ul(e,t){let n=e.a+t.a*(1-e.a);if(n===0)return Wc;let r=(r,i)=>Math.round((r*e.a+i*t.a*(1-e.a))/n);return{r:r(e.r,t.r),g:r(e.g,t.g),b:r(e.b,t.b),a:n}}function dl(){let e=getComputedStyle(document.documentElement).colorScheme||`normal`;return e.includes(`dark`)?e.includes(`light`)?matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:`dark`:`light`}function fl(){return dl()===`dark`?Kc:Gc}function pl(e){let t=Wc;for(let n=e;n;n=n.parentElement){let e=Zc(getComputedStyle(n).backgroundColor);if(!(!e||e.a===0)&&(t=ul(t,e),t.a>=1))return t}return ul(t,fl())}function ml(e,t){let n=Zc(getComputedStyle(e).color)??Wc;return n.a>=1?n:ul(n,t)}function hl(e,t){return e>=24||e>=18.66&&t>=700}function gl(e,t){return t===`AAA`?e?4.5:7:e?3:4.5}function _l(e,t){let n=10**t;return Math.round(e*n)/n}function vl(e){return Math.min(1,Math.max(0,e))}function yl(e){return Math.min(255,Math.max(0,Math.round(e)))}var bl=[[-.574,1.43,.144],[.426,.43,.144],[.426,1.43,-.856]];function xl(e,t){let n=[e.r,e.g,e.b];t.invert&&(n=Sl(n.map(e=>255-e),bl)),n=n.map(e=>e*t.brightness),t.saturate!==void 0&&(n=Sl(n,wl(t.saturate))),t.contrast!==void 0&&(n=n.map(e=>(e-127.5)*t.contrast+127.5));let[r,i,a]=n.map(yl);return{r,g:i,b:a,a:e.a}}function Sl(e,t){return t.map(t=>t[0]*e[0]+t[1]*e[1]+t[2]*e[2])}function Cl(e,t,n=.05,r=4){let i=n,a=r;for(let n=0;n<24;n+=1){let n=(i+a)/2;sl(xl(e,{invert:!1,brightness:n}))<t?i=n:a=n}return _l((i+a)/2,3)}function wl(e){return[[.213+.787*e,.715-.715*e,.072-.072*e],[.213-.213*e,.715+.285*e,.072-.072*e],[.213-.213*e,.715-.715*e,.072+.928*e]]}var Tl=`browsentic-theme`,El=`data-browsentic-added-class`,Dl=`data-browsentic-hook-attribute`,Ol=`data-browsentic-hook-host`,kl=`data-browsentic-filter`,Al=`data-browsentic-previous-value`,jl=/\.((?:theme-|mode-)?(dark|light)(?:-mode|-theme)?)(?![\w-])/i,Ml=/\[([\w-]*(?:theme|mode|scheme))\s*[~|^$*]?=\s*["']?(dark|light)["']?\s*[is]?\]/i;function Nl(e){let t=[...document.styleSheets,...document.adoptedStyleSheets],n=new Set,r=new Map,i={total:t.length,readable:0,crossOrigin:0,inline:0},a=0,o=t=>{if(!(a>=e)){if(a+=1,t instanceof CSSStyleRule){for(let e of t.style)e.startsWith(`--`)&&n.add(e);Fl(t.selectorText,r);return}if(t instanceof CSSGroupingRule)for(let e of t.cssRules)o(e);if(t instanceof CSSImportRule)for(let e of Pl(t.styleSheet)??[])o(e)}};for(let e of t){e.href||(i.inline+=1);let t=Pl(e);if(!t){i.crossOrigin+=1;continue}i.readable+=1;for(let e of t)o(e)}return{sheets:i,rules:a,properties:[...n],hooks:[...r.values()],truncated:a>=e}}function Pl(e){try{return e?.cssRules??null}catch{return null}}function Fl(e,t){for(let n of e.split(`,`)){let e=n.trim(),r=e.split(/[\s>+~]+/)[0],i=/^body\b/i.test(r)?`body`:`root`,a=Ml.exec(r);if(a){let[,n,r]=a;Il(t,{kind:`attribute`,name:n.toLowerCase(),value:r.toLowerCase(),scheme:r.toLowerCase(),host:i,selector:e});continue}let o=jl.exec(r);if(o){let[,n,r]=o;Il(t,{kind:`class`,name:n,scheme:r.toLowerCase(),host:i,selector:e})}}}function Il(e,t){e.set(`${t.kind}:${t.host}:${t.name}:${t.value??``}`,t)}function Ll(e,t){let n=getComputedStyle(document.documentElement),r=e.map(e=>({name:e,value:n.getPropertyValue(e).trim().slice(0,120)})).filter(({value:e})=>e!==``).sort((e,t)=>e.name<t.name?-1:1);return{total:r.length,listed:r.slice(0,t).map(Rl)}}function Rl({name:e,value:t}){let n=Zc(t);return!n||n.a===0?{name:e,value:t}:{name:e,value:t,color:al(n),luminance:_l(sl(n),3)}}function zl(){let e=document.getElementById(Tl)?.getAttribute(kl);if(e)try{return JSON.parse(e)}catch{return}}function Bl(){let e=zl();return e?t=>xl(t,e):e=>e}function W(e,t){e.setAttribute(kl,JSON.stringify(t))}function G(){let e=document.body??document.documentElement,t=Bl(),n=pl(e),r=t(n),i=t(ml(e,n));return{colorScheme:dl(),background:al(r),text:al(i),luminance:_l(sl(r),4),contrast:_l(ll(i,r),2),...zl()?{filtered:!0}:{}}}function K(e){return e===`body`?document.body??document.documentElement:document.documentElement}function q(){let e=document.getElementById(Tl);if(!e)return!1;let t=K(e.getAttribute(Ol)===`body`?`body`:`root`),n=e.getAttribute(El);n&&t.classList.remove(n);let r=e.getAttribute(Dl);if(r){let n=e.getAttribute(Al);n===null?t.removeAttribute(r):t.setAttribute(r,n)}return e.remove(),!0}function J(e,t){let n=document.createElement(`style`);return n.id=Tl,n.textContent=e,t&&Vl(n,t),document.documentElement.append(n),n}function Vl(e,t){let n=K(t.host);if(e.setAttribute(Ol,t.host),t.kind===`class`){if(n.classList.contains(t.name))return;n.classList.add(t.name),e.setAttribute(El,t.name);return}let r=n.getAttribute(t.name);e.setAttribute(Dl,t.name),r!==null&&e.setAttribute(Al,r),n.setAttribute(t.name,t.value??``)}var Hl=2e4,Ul=40,Wl=/^--[A-Za-z0-9_-]+$/,Gl=/[;{}<>\\]|@import|url\(|expression\(/i,Kl=.05,ql=.92,Jl=.08,Yl=`img, picture, video, canvas, svg, iframe, embed, object`,Xl=`invert(1) hue-rotate(180deg)`,Zl=H({name:`page.applyTheme`,description:`Retheme the page, or put it back. Prefers the page’s own terms — it switches on the dark/light hook its stylesheets already define (a ".dark" class, a [data-theme] attribute), sets color-scheme, and overrides the design tokens you name. Only when that leaves the page at the wrong luminance does it fall back to repainting through a CSS filter. Reports the measured background luminance and text contrast before and after, so the change can be checked rather than assumed. The filter fallback creates a containing block on <html>, which re-anchors position:fixed elements, and it re-inverts images so photos stay right way round. Nothing here survives a reload — call it again, or with mode "revert", to undo it.`,input:V({mode:bc([`keep`,`dark`,`light`,`revert`]).default(`keep`).describe(`Which way to push the page: "dark" or "light" retheme it, "revert" removes everything Browsentic applied and restores the page’s own theme, "keep" leaves the light/dark decision alone and applies only the colours below`),targetLuminance:B().min(0).max(1).optional().describe(`Relative luminance to bring the page background to, 0 black to 1 white, as reported by page.readTheme. Overrides the luminance "dark" and "light" imply. Reached by filtering, so it repaints images and text alike`),background:z().optional().describe(`CSS colour for the page background, e.g. "#0f172a" or "rgb(15 23 42)"; suppresses the luminance a mode would imply`),text:z().optional().describe(`CSS colour for body text; elements that set their own colour keep it`),accent:z().optional().describe(`CSS colour for links and form-control accents`),tokens:vc(z(),z()).optional().describe(`CSS custom properties to override on :root, e.g. {"--background": "#0f172a"}. Names come from page.readTheme’s tokens — this is the cleanest way to retheme a page that is built on design tokens, because its own rules do the work`),saturation:B().min(0).max(3).optional().describe(`Colour intensity multiplier: 0 greyscale, 1 unchanged, above 1 more vivid`),contrast:B().min(0).max(3).optional().describe(`Contrast multiplier: 1 unchanged, above 1 pushes lights and darks apart`),transitionMs:B().int().nonnegative().max(2e3).default(200).describe(`How long the page takes to cross-fade into the new theme; 0 switches instantly`)}),execute({mode:e,targetLuminance:t,background:n,text:r,accent:i,tokens:a,saturation:o,contrast:s,transitionMs:c}){let l={background:Ql(n,`background`),text:Ql(r,`text`),accent:Ql(i,`accent`)},u=$l(a);if(e===`keep`&&t===void 0&&!(o!==void 0||s!==void 0)&&!u.length&&!Object.values(l).some(Boolean))throw new U(`Nothing to apply — pass a "mode", a "targetLuminance", a colour, or "tokens".`,`INVALID_INPUT`);let d=q(),f=G();if(e===`revert`)return{reverted:d,theme:f};let p=e===`dark`||e===`light`?eu(e):void 0,m=J(nu({mode:e,colors:l,overrides:u,transitionMs:c}),p),h=G(),g=t??(l.background?void 0:ru(e,h.luminance)),_=iu(g,h.background,o,s);_&&(m.textContent+=`\n${ou(_,h.background,c)}`,W(m,_));let v=G();return{replaced:d,strategy:_?`filter`:p||e!==`keep`?`stylesheet`:`colors`,applied:{mode:e,hook:p,...l,tokens:u.length?u.map(([e])=>e):void 0,filter:_?au(_).join(` `):void 0,targetLuminance:g},css:(m.textContent??``).slice(0,4e3),before:f,after:v,...g===void 0?{}:{reachedTarget:Math.abs(v.luminance-g)<=Jl}}}});function Ql(e,t){if(e===void 0)return;let n=Zc(e);if(!n)throw new U(`"${t}" is not a colour this browser understands — pass something like "#0f172a", "rgb(15 23 42)" or "midnightblue".`,`INVALID_INPUT`);return al(n)}function $l(e){let t=Object.entries(e??{});if(t.length>Ul)throw new U(`Too many tokens — ${t.length} given and ${Ul} is the limit. Override only the ones that carry the theme.`,`INVALID_INPUT`);return t.map(([e,t])=>{if(!Wl.test(e))throw new U(`"${e}" is not a custom property — names look like "--brand-500".`,`INVALID_INPUT`);let n=t.trim();if(!n||Gl.test(n))throw new U(`The value for "${e}" is not a plain CSS value — it cannot be empty or carry ";", "{", "}", "\\" or "url(".`,`INVALID_INPUT`);return[e,n]})}function eu(e){return Nl(Hl).hooks.filter(t=>t.scheme===e).sort((e,t)=>tu(e)-tu(t))[0]}function tu(e){return e.kind===`attribute`?e.name===`data-theme`?0:1:e.name.toLowerCase()===e.scheme?2:3}function nu({mode:e,colors:t,overrides:n,transitionMs:r}){let i=[];return e!==`keep`&&i.push(`:root { color-scheme: ${e}; }`),n.length&&i.push(`:root { ${n.map(([e,t])=>`${e}: ${t};`).join(` `)} }`),t.background&&i.push(`html, body { background-color: ${t.background} !important; }`),t.text&&i.push(`html, body { color: ${t.text} !important; }`),t.accent&&i.push(`:root { accent-color: ${t.accent} !important; }`,`a { color: ${t.accent} !important; }`),r>0&&i.push(`html, body { transition: background-color ${r}ms linear, color ${r}ms linear, filter ${r}ms linear; }`),i.join(`
|
|
73
|
-
`)}function ru(e,t){if(e===`dark`)return t>.5?Kl:void 0;if(e===`light`)return t<.5?ql:void 0}function iu(e,t,n,r){let i=Zc(t)??Gc,a=sl(i),o=e!==void 0&&e<.5!=a<.5,s=o?sl(ol(i)):a,c=e===void 0||s<=.004?1:Cl(o?ol(i):i,e);if(!(!o&&c===1&&n===void 0&&r===void 0))return{invert:o,brightness:c,saturate:n,contrast:r}}function au({invert:e,brightness:t,saturate:n,contrast:r}){return[e?Xl:``,t===1?``:`brightness(${t})`,n===void 0?``:`saturate(${n})`,r===void 0?``:`contrast(${r})`].filter(Boolean)}function ou(e,t,n){let r=[`html { background-color: ${t}; filter: ${au(e).join(` `)}; }`];return e.invert&&r.push(`${Yl} { filter: ${Xl}; }`),n>0&&r.push(`${Yl} { transition: filter ${n}ms linear; }`),r.join(`
|
|
74
|
-
`)}var Y=V({selector:z().optional().describe(`CSS selector for the element`),text:z().optional().describe(`Case-insensitive visible text the element should contain`),role:z().optional().describe(`Tag name or ARIA role to narrow matches, e.g. "button" or "link"`),nth:B().int().nonnegative().default(0).describe(`Zero-based index when several elements match`)}),su=`a,button,input,select,textarea,summary,label,h1,h2,h3,h4,h5,h6,[role],[tabindex],[contenteditable]`,cu={link:[`a`],button:[`button`],textbox:[`input`,`textarea`],combobox:[`select`],checkbox:[`input`],radio:[`input`],heading:[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`]},lu={button:`button`,submit:`button`,reset:`button`,image:`button`,file:`button`,checkbox:`checkbox`,radio:`radio`,range:`slider`,number:`spinbutton`,search:`searchbox`},uu={button:`button`,select:`combobox`,textarea:`textbox`,summary:`button`,option:`option`,h1:`heading`,h2:`heading`,h3:`heading`,h4:`heading`,h5:`heading`,h6:`heading`,nav:`navigation`,main:`main`,header:`banner`,footer:`contentinfo`,aside:`complementary`,form:`form`,dialog:`dialog`},du=new Set([`button`,`submit`,`reset`,`image`,`checkbox`,`radio`,`file`]);function fu(e){let t=e.getAttribute(`role`)?.trim().split(/\s+/)[0];return t?t.toLowerCase():e instanceof HTMLInputElement?lu[e.type]??`textbox`:e instanceof HTMLAnchorElement?e.getAttribute(`href`)===null?void 0:`link`:uu[e.tagName.toLowerCase()]}function pu(e,t){let n=t.toLowerCase(),r=e.tagName.toLowerCase();return r===n||fu(e)===n?!0:cu[n]?.includes(r)??!1}function X(e,t={}){let{selector:n,text:r,role:i,nth:a}=e;if(!n&&!r)throw new U(`A target needs a "selector" or "text"`,`INVALID_TARGET`);let o=[...document.querySelectorAll(n??su)];if(i&&(o=o.filter(e=>pu(e,i))),r){let e=r.toLowerCase();o=o.filter(t=>mu(t).toLowerCase().includes(e)),o=o.filter(e=>!o.some(t=>t!==e&&e.contains(t)))}t.includeHidden||(o=o.filter(gu));let s=o[a];if(!s)throw new U(`No element matches ${JSON.stringify(e)} (${o.length} candidates)`,`TARGET_NOT_FOUND`);return s}function mu(e){let t=e.getAttribute(`aria-label`)?.trim();if(t)return t;if(e instanceof HTMLInputElement)return e.type===`submit`||e.type===`button`||e.type===`reset`?e.value.trim()||e.type:hu(e);if(e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)return hu(e);if(e instanceof HTMLImageElement)return e.alt.trim();let n=(e.textContent??``).replace(/\s+/g,` `).trim();if(n)return n;let r=e.querySelector(`img[alt]`);return r instanceof HTMLImageElement?r.alt.trim():``}function hu(e){return e.labels?.[0]?.textContent?.trim()||e.getAttribute(`placeholder`)?.trim()||e.name}function gu(e){let t=e.getBoundingClientRect();if(t.width===0&&t.height===0)return!1;let n=getComputedStyle(e);return n.visibility!==`hidden`&&n.display!==`none`}function _u(e){return gu(e)&&!e.closest(`[aria-hidden="true"],[inert]`)}function vu(e,t){let n=e.getAttribute(t);return n===`true`||n!==`false`&&void 0}function yu(e){let t={};(e.matches(`:disabled`)||vu(e,`aria-disabled`))&&(t.disabled=!0);let n=e instanceof HTMLInputElement&&(e.type===`checkbox`||e.type===`radio`)?e.checked:vu(e,`aria-checked`);n!==void 0&&(t.checked=n);let r=vu(e,`aria-expanded`);r!==void 0&&(t.expanded=r);let i=e instanceof HTMLOptionElement?e.selected:vu(e,`aria-selected`);i!==void 0&&(t.selected=i);let a=e.getAttribute(`aria-current`);return a&&a!==`false`&&(t.current=a),(e.matches(`:required`)||vu(e,`aria-required`))&&(t.required=!0),vu(e,`aria-invalid`)&&(t.invalid=!0),e instanceof HTMLSelectElement?t.value=e.selectedOptions[0]?.text.replace(/\s+/g,` `).trim().slice(0,60)||void 0:(e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&!du.has(e.type))&&(t.filled=e.value.length>0),Object.values(t).some(e=>e!==void 0)?t:void 0}function bu(e){let t=[];for(let n=e;n&&n!==document.documentElement;n=n.parentElement){if(n.id)return t.unshift(`#${CSS.escape(n.id)}`),t.join(` > `);let e=n.tagName.toLowerCase(),r=n.parentElement?[...n.parentElement.children].filter(e=>e.tagName===n.tagName):[];t.unshift(r.length>1?`${e}:nth-of-type(${r.indexOf(n)+1})`:e)}return t.join(` > `)}function xu(e){let t=e.getBoundingClientRect();return{x:Math.round(t.x+window.scrollX),y:Math.round(t.y+window.scrollY),width:Math.round(t.width),height:Math.round(t.height)}}function Su(e){let t=mu(e).slice(0,80);return{tag:e.tagName.toLowerCase(),role:fu(e),selector:bu(e),text:t||void 0,state:yu(e),bounds:xu(e)}}function Cu(e){return e.closest(`form`)?e instanceof HTMLButtonElement?e.type===`submit`:e instanceof HTMLInputElement&&(e.type===`submit`||e.type===`image`):!1}var wu=H({name:`page.attachFile`,description:`Attach a file to a file input on the page: either one the user stored in Browsentic (fileId, from page.listFiles) or one you captured off another page (downloadId, from page.captureDownload). The second closes the loop — download here, upload there — without the bytes ever passing through you.`,input:V({fileId:z().optional().describe(`Id of a stored file, taken from page.listFiles.`),downloadId:z().optional().describe(`Id of a captured download, taken from page.captureDownload or page.listDownloads.`),target:Y.describe(`The file input (<input type="file">) to attach the file to.`),name:z().optional().describe(`Internal: original filename. Browsentic fills this in.`),mime:z().optional().describe(`Internal: file MIME type. Browsentic fills this in.`),content:z().optional().describe(`Internal: base64 file bytes. Browsentic fills this in.`)}),execute({target:e,name:t,mime:n,content:r}){if(!r)throw new U(`No file bytes were supplied — call with a valid fileId or downloadId.`,`INVALID_INPUT`);let i=X(e,{includeHidden:!0});if(!(i instanceof HTMLInputElement)||i.type!==`file`)throw new U(`<${i.tagName.toLowerCase()}> is not a file input`,`INVALID_TARGET`);let a=atob(r),o=new Uint8Array(a.length);for(let e=0;e<a.length;e++)o[e]=a.charCodeAt(e);let s=new File([o],t||`file`,{type:n||`application/octet-stream`}),c=new DataTransfer;return c.items.add(s),Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,`files`).set.call(i,c.files),i.dispatchEvent(new Event(`input`,{bubbles:!0})),i.dispatchEvent(new Event(`change`,{bubbles:!0})),{attached:!0,name:s.name,size:o.length,mime:s.type,element:Su(i)}}}),Tu=60,Eu=H({name:`page.auditContrast`,description:`Score the readability of the page against WCAG contrast rules. Walks the visible text, resolves each run’s foreground against the real background painted behind it — blending translucent layers up the ancestor chain — and reports the ratio, the ratio the level requires, and whether it passes. The score is the share of sampled text runs that pass, so it is directly comparable before and after page.applyTheme.`,input:V({target:Y.optional().describe(`Subtree to audit; defaults to the whole page`),level:bc([`AA`,`AAA`]).default(`AA`).describe(`WCAG level: AA needs 4.5:1 for body text and 3:1 for large text, AAA needs 7:1 and 4.5:1`),maxSamples:B().int().positive().max(2e3).default(400).describe(`Text-bearing elements to check, in document order`),maxFailures:B().int().nonnegative().max(200).default(20).describe(`Failures listed, worst ratio first; the counts always cover everything sampled`)}),execute({target:e,level:t,maxSamples:n,maxFailures:r}){let i=e?X(e):document.body??document.documentElement,a=Du(i,t,n,Bl()),o=a.filter(e=>!e.passes).sort((e,t)=>e.ratio-t.ratio),s=a.length-o.length;return{url:location.href,level:t,required:{normalText:gl(!1,t),largeText:gl(!0,t)},...a.length?{score:Math.round(s/a.length*100)}:{},summary:{sampled:a.length,passed:s,failed:o.length,worstRatio:a.length?Math.min(...a.map(e=>e.ratio)):void 0},failures:o.slice(0,r),source:bu(i)}}});function Du(e,t,n,r){let i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),a=new Set,o=[];for(let e=i.nextNode();e&&o.length<n;e=i.nextNode()){let n=(e.textContent??``).replace(/\s+/g,` `).trim(),i=e.parentElement;!n||!i||a.has(i)||(a.add(i),_u(i)&&o.push(Ou(i,n,t,r)))}return o}function Ou(e,t,n,r){let i=getComputedStyle(e),a=pl(e),o=r(a),s=r(ml(e,a)),c=_l(parseFloat(i.fontSize),1),l=Number(i.fontWeight)||400,u=hl(c,l),d=_l(ll(s,o),2),f=gl(u,n);return{selector:bu(e),text:t.slice(0,Tu),foreground:al(s),background:al(o),ratio:d,required:f,passes:d>=f,fontSizePx:c,weight:l,large:u,bounds:xu(e)}}var ku=30*6e4,Au=240*6e4,ju=2*6e4,Mu=10*6e4;function Nu(e){let t=Math.round(e/6e4);return t<1?`under a minute`:`~${t} min`}var Pu=H({name:`page.awaitMonitor`,description:`Block until a background monitor completes, then return its final state with the full log. A reply with settled: false means the timeout passed while the watch continues — call again to keep waiting; that is normal, not an error. If the call fails with EXTENSION_OFFLINE the monitor is still running in the browser — reconnect and call again.`,input:V({monitorId:z().describe(`The monitor to wait on, from page.startMonitor`),timeoutMs:B().int().positive().max(Mu).default(ju).describe(`Return after this long even if unfinished — the reply then has settled: false and the current state, so call again to keep waiting`)}),execute(){throw new U(`page.awaitMonitor is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Fu=H({name:`page.captureDownload`,description:`Make the page download a file and keep it. Either click something that produces a download — an “Export CSV” button, a “Download invoice” link — or give a direct url, which is fetched in the browser’s own logged-in session rather than anonymously. The file lands in the user’s ~/browsentic/download/ folder and the result reports the path and notes about what arrived; you get the notes, never the bytes. Hand the returned downloadId to page.attachFile to upload it somewhere else without the file ever passing through you.`,input:V({target:Y.optional().describe(`The link or button whose click starts the download. Give this or "url", not both.`),url:z().optional().describe(`Direct http(s) url of the file, fetched with the browser’s cookies. Give this or "target", not both. Prefer "target" when a button exists: many exports have no fetchable url at all.`),timeoutMs:B().int().min(1e3).max(6e5).default(6e4).describe(`How long to wait for the download to finish before giving up.`)}),execute(){throw new U(`page.captureDownload is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Iu=H({name:`page.clickElement`,description:`Click an element like a user would, firing the full pointer and mouse event sequence.`,input:V({target:Y.describe(`Element to click`),scrollIntoView:ac().default(!0).describe(`Bring the element into view before clicking`)}),execute({target:e,scrollIntoView:t}){let n=X(e);t&&n.scrollIntoView({block:`center`,behavior:`instant`});try{n.focus({preventScroll:!0})}catch{}let r=Cu(n),i={bubbles:!0,cancelable:!0,composed:!0};return n.dispatchEvent(new PointerEvent(`pointerdown`,i)),n.dispatchEvent(new MouseEvent(`mousedown`,i)),n.dispatchEvent(new PointerEvent(`pointerup`,i)),n.dispatchEvent(new MouseEvent(`mouseup`,i)),n.click(),{...Su(n),submits:r}}}),Lu=H({name:`page.closeTab`,description:`Close an open tab. With no arguments it closes the tab page actions are currently targeting, and later actions follow the browser to whichever tab it brings to the front.`,input:V({tabId:B().int().optional().describe(`Id of the tab to close, as reported by page.openTab or a no-argument page.switchTab.`),match:z().optional().describe(`Instead of an id, close the tab whose title or URL contains this text (case-insensitive). If several tabs match, nothing is closed and the candidates are listed.`)}),execute(){throw new U(`page.closeTab is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Ru=120,zu=6,Bu=V({x:B().describe(`Pixels from the left edge of the viewport`),y:B().describe(`Pixels from the top edge of the viewport`)});function Vu(){return{w:document.documentElement.clientWidth,h:document.documentElement.clientHeight}}function Hu(e){let t=e.getBoundingClientRect(),{w:n,h:r}=Vu(),i=Math.max(t.left,0),a=Math.max(t.top,0),o=Math.min(t.right,n),s=Math.min(t.bottom,r);if(o<=i||s<=a)throw new U(`The element has no visible area inside the viewport — scroll it into view, then retry`,`INVALID_TARGET`);return{x:Math.round((i+o)/2),y:Math.round((a+s)/2)}}function Uu(e){let{w:t,h:n}=Vu();if(e.x<0||e.y<0||e.x>=t||e.y>=n)throw new U(`The point (${e.x}, ${e.y}) is outside the ${t}×${n} viewport — scroll it into view, then retry`,`INVALID_TARGET`);return{x:Math.round(e.x),y:Math.round(e.y)}}function Wu(e){let{w:t,h:n}=Vu();return{x:Math.min(Math.max(e.x-Ru,0),t-1),y:Math.min(Math.max(e.y-Ru,0),n-1)}}function Z(e){return document.elementFromPoint(e.x,e.y)}function Gu(e,t){let n=Z(t);if(!(n===e||e.contains(n)))throw new U(n?`${bu(n)} covers (${t.x}, ${t.y}) — dismiss whatever is over the element, then retry`:`Nothing is painted at (${t.x}, ${t.y}) — scroll the element into view, then retry`,`INVALID_TARGET`)}var Ku=e=>1-(1-e)**3;function qu(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=Math.hypot(r,i)||1,o=Math.min(zu,a/8);return Array.from({length:n},(t,s)=>{let c=Ku((s+1)/n),l=Math.sin(c*Math.PI)*o*(s%2?-1:1);return{x:Math.round(e.x+r*c-i/a*l),y:Math.round(e.y+i*c+r/a*l)}})}var Ju=[[`pointer`,`pointerover`,!0],[`pointer`,`pointerenter`,!1],[`pointer`,`pointermove`,!0],[`mouse`,`mouseover`,!0],[`mouse`,`mouseenter`,!1],[`mouse`,`mousemove`,!0]];function Yu(e,t){for(let[n,r,i]of Ju){let a=n===`pointer`?PointerEvent:MouseEvent;e.dispatchEvent(new a(r,{clientX:t.x,clientY:t.y,bubbles:i,composed:!0}))}}var Xu=16,Zu=e=>new Promise(t=>setTimeout(t,e));function Qu(e,t){return{clientX:e.x,clientY:e.y,button:0,buttons:t,bubbles:!0,cancelable:!0,composed:!0,view:window,pointerId:1,pointerType:`mouse`,isPrimary:!0}}function $u(e,t,n,r,i){let a=Qu(r,i);e?.dispatchEvent(new PointerEvent(t,a)),e?.dispatchEvent(new MouseEvent(n,a))}function ed(e,t,n,r){return e?.dispatchEvent(new DragEvent(t,{...Qu(n,1),dataTransfer:r}))??!1}function td(e){try{return Hu(e)}catch{throw new U(`The drop target is not inside the viewport — both ends of a drag have to be on screen at once, because nothing scrolls mid-drag. Scroll until both are visible, then retry`,`INVALID_TARGET`)}}async function nd(e,t,n,r,i){for(let a of qu(e,t,n))await Zu(Xu),i?i(a):$u(Z(a),`pointermove`,`mousemove`,a,r)}async function rd(e,t,n){await nd(e,t,4,0),Yu(n??document.body,t)}async function id(e,t){let{approach:n,grip:r,drop:i,steps:a,holdMs:o,settleMs:s}=t,c=e??Z(r);await rd(n,r,c),$u(c,`pointerdown`,`mousedown`,r,1),await Zu(o),await nd(r,i,a,1),await Zu(s);let l=Z(i);return $u(l??c,`pointerup`,`mouseup`,i,0),{landedOn:l?bu(l):void 0}}async function ad(e,t){let{approach:n,grip:r,drop:i,steps:a,holdMs:o,settleMs:s}=t,c=new DataTransfer;await rd(n,r,e),$u(e,`pointerdown`,`mousedown`,r,1),await Zu(o);let l=ed(e,`dragstart`,r,c),u=!1,d=null;await nd(r,i,a,1,e=>{let t=Z(e);t!==d&&(ed(d,`dragleave`,e,c),ed(t,`dragenter`,e,c),d=t),t&&!ed(t,`dragover`,e,c)&&(u=!0)}),await Zu(s);let f=Z(i);return ed(f,`drop`,i,c),ed(e,`dragend`,i,c),{landedOn:f?bu(f):void 0,started:l,accepted:u}}var od=H({name:`page.dragElement`,description:`Drag one thing onto another — reorder a list, move a card between columns, pull a slider handle, draw on a canvas. Give a "from" element (or "fromPoint") to pick up and a "to" element (or "toPoint") to drop on. Both ends must be on screen at the same moment, because nothing auto-scrolls mid-drag. The web has two unrelated drag mechanisms and "auto" chooses between them by reading the grabbed element: "pointer" presses, moves and releases a pointer, which is what dnd-kit, react-beautiful-dnd, sliders and canvases listen for; "native" fires the HTML5 dragstart/dragover/drop sequence with a DataTransfer, which is what an element carrying draggable="true" expects. The drop point is measured before the drag starts, so a list that reflows as you pass over it can land a slot out — raise "steps" and "settleMs", then read the result back. Set "trusted" when the page ignores synthetic events; that path is pointer-only, Chrome-only, and shows the “Browsentic is debugging this browser” bar. If nothing moved, check "accepted" and try the other mode.`,input:V({from:Y.optional().describe(`Element to pick up — the card, row, or drag handle. Give this or "fromPoint", never both.`),fromPoint:Bu.optional().describe(`Viewport coordinates to grab from, in CSS pixels. Use it when the grip is not an element, such as a spot on a <canvas>.`),to:Y.optional().describe(`Element to drop onto — the destination column, list slot, or drop zone. Give this or "toPoint", never both.`),toPoint:Bu.optional().describe(`Viewport coordinates to drop at, in CSS pixels. Use it to reach empty space, a slider position, or a spot on a <canvas>.`),mode:bc([`auto`,`pointer`,`native`]).default(`auto`).describe(`Which drag mechanism to use. "auto" picks "native" when the grabbed element declares draggable="true", "pointer" otherwise.`),steps:B().int().min(2).max(60).default(16).describe(`Moves dispatched along the way to the drop point. Raise it for lists that reorder as the pointer passes over them.`),holdMs:B().int().min(0).max(5e3).default(120).describe(`How long the button stays down before the drag starts moving. Raise it past a library’s press-and-hold delay.`),settleMs:B().int().min(0).max(5e3).default(120).describe(`Pause on the drop point before releasing, letting the page settle on where the item would land.`),trusted:ac().default(!1).describe(`Dispatch real browser-level mouse events, so isTrusted is true. Pointer mode only, Chrome only.`),scrollIntoView:ac().default(!0).describe(`Bring the grabbed element into view first. Ignored with "fromPoint".`)}),async execute({from:e,fromPoint:t,to:n,toPoint:r,mode:i,steps:a,holdMs:o,settleMs:s,trusted:c,scrollIntoView:l}){if(!e==!t)throw new U(`Give either a "from" target to pick up or a "fromPoint" to grab at — not both, not neither`,`INVALID_INPUT`);if(!n==!r)throw new U(`Give either a "to" target to drop onto or a "toPoint" to drop at — not both, not neither`,`INVALID_INPUT`);let u=e?X(e):null,d=n?X(n):null;u&&l&&u.scrollIntoView({block:`center`,behavior:`instant`});let f=u?Hu(u):Uu(t);u&&Gu(u,f);let p=d?td(d):Uu(r),m=u?.closest(`[draggable="true"]`)??null,h=i===`auto`?m?`native`:`pointer`:i;if(h===`native`&&c)throw new U(`A trusted drag sends real mouse events, which cannot drive HTML5 drag-and-drop — drop "trusted", or set mode to "pointer" if the page also listens for pointer drags`,`INVALID_INPUT`);if(h===`native`&&!u)throw new U(`HTML5 drag-and-drop starts on an element, so coordinates cannot fire dragstart — give a "from" target, or set mode to "pointer"`,`INVALID_INPUT`);let g={approach:Wu(f),grip:f,drop:p,steps:a,holdMs:o,settleMs:s},_={from:u?Su(u):void 0,to:d?Su(d):void 0,mechanism:h,...g};if(c)return _;let v=h===`native`?await ad(m??u,g):await id(u,g);return{..._,...v,trusted:!1}}}),sd=2166136261,cd=16777619,ld=[{pattern:/\n{2,}/g,floor:.5},{pattern:/(?<=[.!?…]["'’”)\]]*)\s+/g,floor:.25},{pattern:/[。!?]["’”」』))\]]*/g,floor:.25},{pattern:/\n/g,floor:.25},{pattern:/\s+/g,floor:0}],ud=/^(\d+)\.([0-9a-f]{8})$/;function dd(e){let t=sd;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,cd);return(t>>>0).toString(16).padStart(8,`0`)}function fd(e,t,n){if(e.length-t<=n)return e.length;let r=e.slice(t,t+n);for(let{pattern:e,floor:i}of ld){let a=hd(r,e,Math.floor(n*i));if(a>0)return t+a}return t+n}function pd(e,t){return`${e}.${dd(t)}`}function md(e){let t=ud.exec(e.trim());return t?{offset:Number(t[1]),digest:t[2]}:null}function hd(e,t,n){t.lastIndex=0;let r=0;for(let i=t.exec(e);i;i=t.exec(e))i.index>=n&&(r=i.index+i[0].length);return r}var gd=2e5,_d=H({name:`page.extractText`,description:`Read the rendered text or raw HTML of an element or the whole page, one group at a time. A group is cut at the last paragraph or sentence boundary that fits in maxLength, never mid-sentence, and the same page always groups the same way. When more text remains the reply carries a cursor — pass it back for the next group, and keep going until no cursor comes back. The cursor is checked against the text it already handed you, so two groups never come from two different versions of the page: if the page rewrote what you had read, the reply is "stale": true and nothing else, and the read starts over with no cursor.`,input:V({target:Y.optional().describe(`Element to read; defaults to the whole page`),format:bc([`text`,`html`]).default(`text`).describe(`Plain rendered text, or raw HTML. HTML is denied by default — it carries comments and hidden nodes the reader never sees — and needs "raw-html-read": "allow" in the guardrail config.`),maxLength:B().int().positive().max(gd).default(2e4).describe(`Characters per group — the reply stops at the last boundary that fits, so it comes back a little shorter`),cursor:z().max(32).optional().describe(`Continue a read: the cursor the previous reply returned. Omit to start from the top.`)}),execute({target:e,format:t,maxLength:n,cursor:r}){let i=e?X(e):document.body,a=t===`text`?i.innerText.replace(/\n{3,}/g,`
|
|
75
|
-
|
|
76
|
-
`).trim():i.outerHTML,o=bu(i),s=Math.min(n,gd),c=r?md(r):null;if(r&&!c)throw new U(`That is not a cursor page.extractText handed out — omit it to read from the top`,`INVALID_INPUT`);if(c&&dd(a.slice(0,c.offset))!==c.digest)return{stale:!0,source:o,length:a.length};let l=c?.offset??0,u=fd(a,l,s),d=u<a.length;return{content:a.slice(l,u).trimEnd(),source:o,length:a.length,offset:l,truncated:d,...d?{nextOffset:u,cursor:pd(u,a.slice(0,u))}:{}}}}),vd={Enter:{code:`Enter`,keyCode:13},Tab:{code:`Tab`,keyCode:9},Escape:{code:`Escape`,keyCode:27},Backspace:{code:`Backspace`,keyCode:8},Delete:{code:`Delete`,keyCode:46}," ":{code:`Space`,keyCode:32},ArrowLeft:{code:`ArrowLeft`,keyCode:37},ArrowUp:{code:`ArrowUp`,keyCode:38},ArrowRight:{code:`ArrowRight`,keyCode:39},ArrowDown:{code:`ArrowDown`,keyCode:40},Home:{code:`Home`,keyCode:36},End:{code:`End`,keyCode:35},PageUp:{code:`PageUp`,keyCode:33},PageDown:{code:`PageDown`,keyCode:34}};function yd(e){if(vd[e])return vd[e];if(e.length===1){let t=e.toUpperCase();if(t>=`A`&&t<=`Z`)return{code:`Key${t}`,keyCode:t.charCodeAt(0)};if(e>=`0`&&e<=`9`)return{code:`Digit${e}`,keyCode:e.charCodeAt(0)}}return{code:``,keyCode:0}}function Q(e,t=[]){let{code:n,keyCode:r}=yd(e);return{key:e,code:n,keyCode:r,which:r,bubbles:!0,cancelable:!0,composed:!0,ctrlKey:t.includes(`ctrl`),shiftKey:t.includes(`shift`),altKey:t.includes(`alt`),metaKey:t.includes(`meta`)}}var bd=H({name:`page.fillInput`,description:`Fill a text input, textarea, or contenteditable element like a user typing.`,input:V({target:Y.describe(`Element to type into`),value:z().describe(`Text to enter`),clear:ac().default(!0).describe(`Replace existing content instead of appending`),pressEnter:ac().default(!1).describe(`Press Enter afterwards, which submits many forms`)}),execute({target:e,value:t,clear:n,pressEnter:r}){let i=X(e);i.focus();let{length:a}=xd(i,t,{clear:n,pressEnter:r});return{element:Su(i),length:a,appended:!n}}});function xd(e,t,{clear:n,pressEnter:r}){let i;if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){i=n?t:e.value+t;let r=e instanceof HTMLInputElement?HTMLInputElement.prototype:HTMLTextAreaElement.prototype;Object.getOwnPropertyDescriptor(r,`value`).set.call(e,i),e.dispatchEvent(new InputEvent(`input`,{bubbles:!0,data:t,inputType:`insertText`})),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}else if(e.isContentEditable)i=n?t:(e.textContent??``)+t,e.textContent=i,e.dispatchEvent(new InputEvent(`input`,{bubbles:!0,data:t,inputType:`insertText`}));else throw new U(`<${e.tagName.toLowerCase()}> is not an editable element`,`INVALID_TARGET`);return{length:i.length,submitted:r?Sd(e):!1}}function Sd(e){let t=Q(`Enter`),n=e.dispatchEvent(new KeyboardEvent(`keydown`,t));e.dispatchEvent(new KeyboardEvent(`keyup`,t));let r=n&&!(e instanceof HTMLTextAreaElement)?e.closest(`form`):null;return r?.requestSubmit(),!!r}var Cd=H({name:`page.findCaptcha`,description:`Look for a captcha on the page and report what it is, without touching it. Ordinary selectors cannot see one: vendors build the widget inside a closed shadow root holding a cross-origin iframe holding another shadow root, so page.getPageInfo shows nothing where the captcha visibly is. This reads through all of that with Chrome’s debugger and reports the vendor (Cloudflare Turnstile, reCAPTCHA v2/v3, hCaptcha, GeeTest, Arkose, AWS WAF), the widget’s on-screen bounds, whether it is already satisfied, and a viewport point for its checkbox when it has one. Read-only — it never clicks. Call it when a page stalls on “verifying you are human”, refuses a form for no visible reason, or shows a checkbox no selector can find. Chrome only, and it briefly shows the “Browsentic is debugging this browser” bar.`,input:V({}),execute(){throw new U(`page.findCaptcha is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),wd=/(\d{1,3}(?:\.\d+)?)\s?%/,Td=/spinner|loading|progress/i,Ed=80,Dd=H({name:`page.findProgress`,description:`Scan the page for progress signals worth monitoring: progress bars, percent readouts, spinners and busy regions, each with a selector for page.startMonitor. An empty candidates list with no titlePercent means the page shows nothing measurable — ask the user what completion looks like instead of starting a monitor.`,input:V({maxCandidates:B().int().positive().max(30).default(10).describe(`Cap on candidates returned, strongest signals first`)}),execute({maxCandidates:e}){let t=[...Od(),...kd(),...Ad(),...jd(),...Md()],n=new Set,r=t.filter(e=>n.has(e.selector)?!1:(n.add(e.selector),!0)),i=wd.exec(document.title);return{candidates:r.slice(0,e),...i?{titlePercent:Id(parseFloat(i[1]))}:{},url:location.href}}});function Od(){return Nd(`[role="progressbar"]`).map(e=>{let t=parseFloat(e.getAttribute(`aria-valuenow`)??``),n=parseFloat(e.getAttribute(`aria-valuemin`)??`0`)||0,r=parseFloat(e.getAttribute(`aria-valuemax`)??`100`)||100,i=Number.isFinite(t)&&r>n?Id((t-n)/(r-n)*100):void 0;return $(e,`progressbar`,{value:Number.isFinite(t)?t:void 0,max:r,percent:i})})}function kd(){return Nd(`progress, meter`).map(e=>{let t=e,n=t.max>0?Id(t.value/t.max*100):void 0;return $(e,`progress-element`,{value:t.value,max:t.max,percent:n})})}function Ad(){let e=document.createTreeWalker(document.body??document.documentElement,NodeFilter.SHOW_TEXT),t=new Set;for(let n=e.nextNode();n;n=e.nextNode()){if(!wd.test(n.textContent??``))continue;let e=Pd(n.parentElement);e&&gu(e)&&t.add(e)}return[...t].map(e=>{let t=Fd(e.innerText??``),n=wd.exec(t);return $(e,`percent-text`,{text:t.slice(0,Ed),percent:n?Id(parseFloat(n[1])):void 0})})}function jd(){return Nd(`[class]`).filter(e=>Td.test(e.getAttribute(`class`)??``)&&getComputedStyle(e).animationName!==`none`).map(e=>$(e,`spinner`,{}))}function Md(){return Nd(`[aria-busy="true"]`).map(e=>$(e,`busy-region`,{}))}function $(e,t,n){let r=n.text??mu(e).slice(0,Ed);return{kind:t,selector:bu(e),...r?{text:r}:{},...n.value==null?{}:{value:n.value},...n.max==null?{}:{max:n.max},...n.percent==null?{}:{percent:n.percent},bounds:xu(e)}}function Nd(e){return[...document.querySelectorAll(e)].filter(gu)}function Pd(e){for(let t=e;t;t=t.parentElement)if(getComputedStyle(t).display!==`inline`)return t;return e}function Fd(e){return e.replace(/\s+/g,` `).trim()}function Id(e){return Math.min(100,Math.max(0,e))}var Ld=`{query}`,Rd=[`q`,`query`,`k`,`s`,`search`,`keyword`,`keywords`,`term`,`wd`,`text`],zd=/\b(?:search|zoek|suche|suchen|recherche|buscar|cerca|szukaj)/i,Bd=[`name`,`id`,`class`,`aria-label`,`placeholder`,`title`],Vd=new Set([`search`,`text`,``]),Hd=[{selector:`input[type="search"], [role="searchbox"]`,named:!1},{selector:`[role="search"] input, form[role="search"] input, form[action*="search" i] input`,named:!1},{selector:`input[type="text"], input:not([type])`,named:!0}];function Ud(){let e=new Set;for(let{selector:t,named:n}of Hd)for(let r of document.querySelectorAll(t))!$d(r)||ef(r)||n&&!tf(r)||e.add(r);return[...e].map(Qd)}function Wd(e){return e.find(e=>!e.hidden)??e[0]??null}function Gd(e){if(!$d(e))throw new U(`<${e.tagName.toLowerCase()}> is not a text field to search in`,`INVALID_TARGET`);if(ef(e))throw new U(`That field is disabled, or sits in a form with a password in it — a sign-in form is not a search box`,`INVALID_TARGET`);return Qd(e)}function Kd(e){let t=e.filter(e=>!e.hidden).map(({element:e})=>e);return[...document.querySelectorAll(`button,[role="button"],summary,a[href]`)].filter(gu).filter(e=>zd.test(nf(e))).filter(e=>!Cu(e)).filter(e=>!t.some(t=>e.contains(t)))}function qd(){return[...document.querySelectorAll(`a[href]`)].filter(gu).filter(rf)}function Jd(){let e=document.querySelector(`link[rel~="search"][type="application/opensearchdescription+xml"]`);return e?{href:e.href,title:e.title||void 0}:void 0}function Yd(e,t){let n=e&&af(e,t);if(n)return{url:n,from:`form`};let r=of(t);return r?{url:r,from:`address`}:null}function Xd(e){let t=Yd(e,Ld);return t?{template:t.url.href.replace(encodeURIComponent(Ld),Ld),templateFrom:t.from}:null}function Zd({element:e,form:t,param:n,hidden:r}){return{...Su(e),param:n||void 0,hidden:r||void 0,form:t?{selector:bu(t),action:t.getAttribute(`action`)||void 0,method:(t.getAttribute(`method`)||`get`).toLowerCase()}:void 0}}function Qd(e){return{element:e,form:e.closest(`form`),param:e.getAttribute(`name`)?.trim()??``,hidden:!gu(e)}}function $d(e){return e instanceof HTMLInputElement?Vd.has(e.type):e.isContentEditable}function ef(e){return e.matches(`:disabled`)||e.getAttribute(`aria-disabled`)===`true`?!0:!!e.closest(`form`)?.querySelector(`input[type="password"]`)}function tf(e){let t=e.getAttribute(`name`)?.trim().toLowerCase()??``;return Rd.includes(t)?!0:zd.test(nf(e))}function nf(e){return[...Bd.map(t=>e.getAttribute(t)??``),mu(e)].join(` `)}function rf(e){try{let t=new URL(e.href);return t.origin===location.origin&&zd.test(t.pathname)}catch{return!1}}function af({form:e,param:t},n){if(!e||!t||(e.getAttribute(`method`)||`get`).toLowerCase()!==`get`)return null;let r=new URL(e.getAttribute(`action`)||location.href,location.href),i=new URLSearchParams;for(let[t,n]of new FormData(e))typeof n==`string`&&i.set(t,n);return i.set(t,n),r.search=i.toString(),r.hash=``,r}function of(e){let t=new URL(location.href),n=[...t.searchParams.keys()].find(e=>Rd.includes(e.toLowerCase()));return n?(t.searchParams.set(n,e),t.hash=``,t):null}var sf=H({name:`page.findSearch`,description:`Report how this site can be searched from where you are: the search boxes on the page — including one hidden behind a header toggle — the buttons that reveal them, links to a search page, and the URL template a search would land on, with {query} where the words go. Read-only: it never types and never navigates. Call it to find out whether searching this site is possible at all before offering to, or to record a site’s search entry point while mapping it. An empty result with searchable false means this site has no search of its own — say so rather than typing into some other field.`,input:V({maxPerKind:B().int().positive().max(20).default(5).describe(`Cap on search boxes, toggles and links listed per kind, most likely first`)}),execute({maxPerKind:e}){let t=Ud(),n=Xd(Wd(t));return{url:location.href,searchable:t.length>0||!!n,...n??{},fields:t.slice(0,e).map(Zd),toggles:Kd(t).slice(0,e).map(Su),links:qd().slice(0,e).map(e=>({...Su(e),href:e.href})),openSearch:Jd()}}}),cf=H({name:`page.focusInput`,description:`Focus an input or editable element and place the caret, or select all its content.`,input:V({target:Y.describe(`The input, textarea, or editable element to focus`),caret:bc([`start`,`end`,`all`]).default(`end`).describe(`Where to leave the caret, or select all content`)}),execute({target:e,caret:t}){let n=X(e);if(n.focus(),n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)if(t===`all`)n.select();else{let e=t===`start`?0:n.value.length;try{n.setSelectionRange(e,e)}catch{}}else if(n.isContentEditable){let e=document.createRange();e.selectNodeContents(n),t!==`all`&&e.collapse(t===`start`);let r=getSelection();r?.removeAllRanges(),r?.addRange(e)}return Su(n)}}),lf={header:`banner`,nav:`navigation`,main:`main`,aside:`complementary`,footer:`contentinfo`,form:`form`,section:`section`,dialog:`dialog`},uf=new Set([`banner`,`navigation`,`main`,`complementary`,`contentinfo`,`search`,`form`,`region`,`dialog`]),df=H({name:`page.getPageInfo`,description:`Snapshot the current page: document metadata, viewport and scroll state, a semantic layout tree with a text diagram, the heading outline, and an inventory of interactive elements — each carrying its ARIA role, its live state (disabled, checked, expanded, filled, aria-current) and the landmark region it sits in.`,input:V({maxPerKind:B().int().positive().default(30).describe(`Cap on links, buttons, fields, and forms listed per kind`)}),execute({maxPerKind:e}){let{regions:t,owners:n}=mf(),r=vf();return yf(r,n),{document:{url:location.href,title:document.title,description:document.querySelector(`meta[name="description"]`)?.getAttribute(`content`)??void 0,lang:document.documentElement.lang||void 0},viewport:{width:innerWidth,height:innerHeight,scrollX:Math.round(scrollX),scrollY:Math.round(scrollY),pageWidth:document.documentElement.scrollWidth,pageHeight:document.documentElement.scrollHeight},selection:getSelection()?.toString().slice(0,500)||void 0,layout:{regions:t,diagram:_f(t)},outline:[...document.querySelectorAll(`h1,h2,h3,h4,h5,h6`)].filter(_u).slice(0,60).map(e=>({level:Number(e.tagName[1]),text:mu(e).slice(0,120)})),interactive:bf(r,n,e)}}});function ff(e){let t=e.getAttribute(`role`);return t?uf.has(t)?t:void 0:lf[e.tagName.toLowerCase()]}function pf(e){let t=e.getAttribute(`aria-label`)?.trim();if(t)return t.slice(0,60);let n=e.getAttribute(`aria-labelledby`)?.split(/\s+/)[0];return((n?document.getElementById(n):null)??e.querySelector(`h1,h2,h3,h4,h5,h6`))?.textContent?.replace(/\s+/g,` `).trim().slice(0,60)||void 0}function mf(){let e=[...document.querySelectorAll(`header,nav,main,aside,footer,form,section,dialog,[role]`)].filter(e=>ff(e)&&_u(e)).slice(0,40),t=[],n=new Map;for(let r of e){let e={role:ff(r),label:pf(r),selector:bu(r),bounds:xu(r),contains:{links:0,buttons:0,fields:0},children:[]};n.set(r,e);let i=r.parentElement;for(;i&&!n.has(i);)i=i.parentElement;(i?n.get(i).children:t).push(e)}return{regions:t,owners:n}}function hf(e){return e.label?`${e.role} “${e.label}”`:e.role}function gf(e,t){for(let n=e.parentElement;n;n=n.parentElement){let e=t.get(n);if(e)return e}}function _f(e){let t=document.documentElement,n=[`page ${t.scrollWidth}×${t.scrollHeight} · viewport ${innerWidth}×${innerHeight} @ y=${Math.round(scrollY)}`],r=(e,t)=>{e.forEach((i,a)=>{let o=a===e.length-1,{bounds:s,contains:c}=i,l=[`links`,`buttons`,`fields`].filter(e=>c[e]>0).map(e=>` · ${c[e]} ${e}`).join(``);n.push(`${t}${o?`└`:`├`} ${hf(i)} · ${s.width}×${s.height} @ (${s.x},${s.y})${l}`),r(i.children,t+(o?` `:`│ `))})};return r(e,``),n.join(`
|
|
77
|
-
`)}function vf(){let e=e=>[...document.querySelectorAll(e)].filter(_u);return{links:e(`a[href]`),buttons:e(`button,[role="button"],input[type="button"],input[type="submit"]`),fields:e(`input:not([type="hidden"]):not([type="button"]):not([type="submit"]),select,textarea`),forms:e(`form`)}}function yf(e,t){for(let n of[`links`,`buttons`,`fields`])for(let r of e[n])for(let e=r.parentElement;e;e=e.parentElement){let r=t.get(e);r&&(r.contains[n]+=1)}}function bf(e,t,n){let r=e=>{let n=gf(e,t);return n&&hf(n)};return{links:e.links.slice(0,n).map(e=>({...Su(e),href:e.href,region:r(e)})),buttons:e.buttons.slice(0,n).map(e=>({...Su(e),region:r(e)})),fields:e.fields.slice(0,n).map(e=>({...Su(e),kind:e instanceof HTMLInputElement?e.type:e.tagName.toLowerCase(),region:r(e)})),forms:e.forms.slice(0,n).map(e=>({selector:bu(e),action:e.getAttribute(`action`)||void 0,method:(e.getAttribute(`method`)||`get`).toLowerCase(),region:r(e)})),counts:{links:e.links.length,buttons:e.buttons.length,fields:e.fields.length,forms:e.forms.length}}}var xf=H({name:`page.highlightElement`,description:`Visually highlight an element with a temporary outline overlay and optional caption.`,input:V({target:Y.describe(`Element to highlight`),durationMs:B().int().positive().max(3e4).default(2e3).describe(`How long the highlight stays visible`),label:z().optional().describe(`Small caption rendered above the highlight`)}),execute({target:e,durationMs:t,label:n}){let r=X(e);r.scrollIntoView({block:`center`,behavior:`instant`});let i=r.getBoundingClientRect(),a=document.createElement(`div`);if(Object.assign(a.style,{position:`fixed`,left:`${i.left}px`,top:`${i.top}px`,width:`${i.width}px`,height:`${i.height}px`,pointerEvents:`none`,zIndex:`2147483647`,border:`2px solid #8b5cf6`,borderRadius:`6px`,boxShadow:`0 0 0 4px rgba(139,92,246,.25)`}),n){let e=document.createElement(`span`);e.textContent=n,Object.assign(e.style,{position:`absolute`,top:`-22px`,left:`0`,background:`#8b5cf6`,color:`#fff`,font:`11px/1.4 system-ui`,padding:`1px 6px`,borderRadius:`4px`,whiteSpace:`nowrap`}),a.append(e)}return document.documentElement.append(a),setTimeout(()=>a.remove(),t),{element:Su(r),durationMs:t}}}),Sf=H({name:`page.hoverElement`,description:`Hover an element to trigger menus, tooltips, and other hover states.`,input:V({target:Y.describe(`Element to hover`),scrollIntoView:ac().default(!0).describe(`Bring the element into view first`)}),execute({target:e,scrollIntoView:t}){let n=X(e);t&&n.scrollIntoView({block:`center`,behavior:`instant`});let r=n.getBoundingClientRect();return Yu(n,{x:r.x+r.width/2,y:r.y+r.height/2}),Su(n)}}),Cf=H({name:`page.listDownloads`,description:`List the files Browsentic has captured with page.captureDownload, newest first, with notes about what each one is and where it was saved. Use a downloadId from here with page.attachFile to upload one to another page.`,input:V({nameContains:z().optional().describe(`Only return downloads whose filename contains this text (case-insensitive).`)}),execute(){throw new U(`page.listDownloads is resolved by the Browsentic daemon, not in the page`,`UNSUPPORTED`)}}),wf=H({name:`page.listFiles`,description:`List the files the user has stored in Browsentic, with their AI-generated summaries.`,input:V({nameContains:z().optional().describe(`Only return files whose name contains this text (case-insensitive).`)}),execute(){throw new U(`page.listFiles is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Tf=H({name:`page.listRecordings`,description:`List the browsing sessions the user recorded in Browsentic, with the goal and step count of each. Use page.readRecording to open one.`,input:V({host:z().optional().describe(`Only return recordings made on this hostname, e.g. "app.example.com".`),nameContains:z().optional().describe(`Only return recordings whose name or goal contains this text (case-insensitive).`)}),execute(){throw new U(`page.listRecordings is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Ef=H({name:`page.monitorStatus`,description:`Report on background monitors started with page.startMonitor: phase, percent, ETA, how long since anything changed, and the latest log lines.`,input:V({monitorId:z().optional().describe(`One monitor to report. Omit to list every active and recently finished monitor.`)}),execute(){throw new U(`page.monitorStatus is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Df=V({url:z().optional().describe(`Absolute or relative URL to open (http/https only)`),action:bc([`back`,`forward`,`reload`]).optional().describe(`History navigation instead of opening a URL`)});function Of({url:e,action:t},n){if(!e==!t)throw new U(`Provide either "url" or "action"`,`INVALID_INPUT`);if(t)return{kind:`history`,action:t};let r;try{r=new URL(e,n)}catch{throw new U(n?`Invalid URL: "${e}"`:`Invalid URL: "${e}" — pass an absolute http(s) URL`,`INVALID_INPUT`)}if(r.protocol!==`http:`&&r.protocol!==`https:`)throw new U(`Only http(s) URLs are supported, got "${r.protocol}"`,`UNSUPPORTED`);return{kind:`url`,href:r.href}}var kf=H({name:`page.navigate`,description:`Navigate the current tab to a URL, or go back, forward, or reload in its history.`,input:Df,execute(e){let t=Of(e,location.href);return t.kind===`url`?(location.assign(t.href),{navigatingTo:t.href}):(t.action===`back`?history.back():t.action===`forward`?history.forward():location.reload(),{performed:t.action})}}),Af=H({name:`page.openTab`,description:`Open a URL in a new browser tab. The new tab becomes the one every later page action targets, unless "active" is false.`,input:V({url:z().describe(`Absolute or relative URL to open in the new tab (http/https only).`),active:ac().default(!0).describe(`Bring the new tab to the front, making it the tab later page actions target. Set false to open it in the background and leave the current tab in front.`)}),execute(){throw new U(`page.openTab is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),jf=`browsentic-a-eye`,Mf=`browsentic-a-eye-cursor`,Nf=`#ff7a3d`,Pf=`rgba(255, 122, 61, .22)`,Ff=[`M3 7V5a2 2 0 0 1 2-2h2`,`M17 3h2a2 2 0 0 1 2 2v2`,`M21 17v2a2 2 0 0 1-2 2h-2`,`M7 21H5a2 2 0 0 1-2-2v-2`,`M7.5 12s1.8-3.2 4.5-3.2 4.5 3.2 4.5 3.2-1.8 3.2-4.5 3.2S7.5 12 7.5 12z`],If=`url("data:image/svg+xml,${encodeURIComponent(Hf())}") 14 14, crosshair`,Lf=`Click the element you mean`,Rf=!1;function zf(){return Rf}function Bf({hint:e,timeoutMs:t}){Rf=!0;let n=document.createElement(`div`);n.id=jf,n.style.cssText=`all: initial; position: static;`;let r=n.attachShadow({mode:`closed`});r.innerHTML=`<style>${Wf()}</style><div class="box" hidden><span class="chip"></span></div><div class="hint"><b>A-Eye</b><span>${Uf(e?.trim()||Lf)}</span><kbd>↑</kbd><span>wider</span><kbd>Esc</kbd><span>cancel</span></div>`,document.documentElement.append(n);let i=document.createElement(`style`);i.id=Mf,i.textContent=`html, html *, html *::before, html *::after { cursor: ${If} !important; user-select: none !important; }`,document.documentElement.append(i);let a=r.querySelector(`.box`),o=r.querySelector(`.chip`),s=null;return new Promise(e=>{let r=setTimeout(()=>_({timedOut:!0}),t),c=e=>{e.stopPropagation(),e.stopImmediatePropagation()},l=e=>{e.preventDefault(),c(e)},u=e=>h(document.elementFromPoint(e.clientX,e.clientY)),d=e=>{l(e);let t=s??document.elementFromPoint(e.clientX,e.clientY);t&&t!==document.documentElement&&_({picked:t})},f=e=>{if(e.key===`Escape`){l(e),_({cancelled:!0});return}e.key===`ArrowUp`&&s?.parentElement&&(l(e),h(s.parentElement))},p=()=>s&&g(s),m=[[`pointermove`,u,{capture:!0,passive:!0}],[`pointerdown`,c,{capture:!0}],[`pointerup`,c,{capture:!0}],[`mousedown`,c,{capture:!0}],[`mouseup`,c,{capture:!0}],[`dblclick`,l,{capture:!0}],[`auxclick`,l,{capture:!0}],[`contextmenu`,l,{capture:!0}],[`click`,d,{capture:!0}],[`keydown`,f,{capture:!0}],[`scroll`,p,{capture:!0,passive:!0}],[`resize`,p,{passive:!0}]];for(let[e,t,n]of m)window.addEventListener(e,t,n);function h(e){!e||e===n||e===document.documentElement||(s=e,g(e))}function g(e){let t=e.getBoundingClientRect();a.hidden=!1,a.style.left=`${t.left}px`,a.style.top=`${t.top}px`,a.style.width=`${t.width}px`,a.style.height=`${t.height}px`,a.classList.toggle(`below`,t.top<24),o.textContent=Vf(e,t)}function _(t){clearTimeout(r);for(let[e,t,n]of m)window.removeEventListener(e,t,{capture:n.capture});n.remove(),i.remove(),Rf=!1,e(t)}})}function Vf(e,t){return`${e.tagName.toLowerCase()}${e.id?`#${e.id}`:``} · ${`${Math.round(t.width)}×${Math.round(t.height)}`}`}function Hf(){let e=Ff.map(e=>`<path d="${e}"/>`).join(``);return`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><g stroke="rgba(0,0,0,.6)" stroke-width="4.5">${e}</g><g stroke="${Nf}" stroke-width="2">${e}</g><circle cx="12" cy="12" r="1.5" fill="${Nf}"/></svg>`}function Uf(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/"/g,`"`)}function Wf(){return`
|
|
78
|
-
:host { all: initial; }
|
|
79
|
-
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
80
|
-
.box {
|
|
81
|
-
position: fixed;
|
|
82
|
-
z-index: 2147483647;
|
|
83
|
-
pointer-events: none;
|
|
84
|
-
border: 2px solid ${Nf};
|
|
85
|
-
border-radius: 4px;
|
|
86
|
-
background: ${Pf};
|
|
87
|
-
box-shadow: 0 0 0 1px rgb(0 0 0 / 35%), 0 0 22px -4px ${Nf};
|
|
88
|
-
transition: left 60ms linear, top 60ms linear, width 60ms linear, height 60ms linear;
|
|
89
|
-
}
|
|
90
|
-
.chip {
|
|
91
|
-
position: absolute;
|
|
92
|
-
top: -21px;
|
|
93
|
-
left: -2px;
|
|
94
|
-
padding: 1px 6px;
|
|
95
|
-
border-radius: 4px 4px 0 0;
|
|
96
|
-
background: ${Nf};
|
|
97
|
-
color: #1a0f08;
|
|
98
|
-
font: 600 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
99
|
-
white-space: nowrap;
|
|
100
|
-
}
|
|
101
|
-
.box.below .chip { top: auto; bottom: -21px; border-radius: 0 0 4px 4px; }
|
|
102
|
-
.hint {
|
|
103
|
-
position: fixed;
|
|
104
|
-
z-index: 2147483647;
|
|
105
|
-
top: 16px;
|
|
106
|
-
left: 50%;
|
|
107
|
-
transform: translateX(-50%);
|
|
108
|
-
display: flex;
|
|
109
|
-
align-items: center;
|
|
110
|
-
gap: 7px;
|
|
111
|
-
max-width: min(92vw, 560px);
|
|
112
|
-
padding: 7px 14px;
|
|
113
|
-
border: 1px solid rgb(255 255 255 / 12%);
|
|
114
|
-
border-radius: 999px;
|
|
115
|
-
background: rgb(20 14 10 / 92%);
|
|
116
|
-
color: #f4ece6;
|
|
117
|
-
font: 12px/1.4 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
118
|
-
box-shadow: 0 12px 38px -12px rgb(0 0 0 / 80%);
|
|
119
|
-
pointer-events: none;
|
|
120
|
-
white-space: nowrap;
|
|
121
|
-
}
|
|
122
|
-
.hint b { color: ${Nf}; font-weight: 600; letter-spacing: 0.02em; }
|
|
123
|
-
.hint span { opacity: 0.75; }
|
|
124
|
-
.hint kbd {
|
|
125
|
-
padding: 1px 5px;
|
|
126
|
-
border: 1px solid rgb(255 255 255 / 18%);
|
|
127
|
-
border-radius: 4px;
|
|
128
|
-
font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
129
|
-
opacity: 0.9;
|
|
130
|
-
}
|
|
131
|
-
@media (prefers-reduced-motion: reduce) { .box { transition: none; } }
|
|
132
|
-
`}var Gf=H({name:`page.pickElement`,description:`Ask the user to point at an element — A-Eye. Their cursor becomes a lens, whatever they hover is outlined, and the element they click comes back with its selector, its role and its rendered text. Use it when a target is genuinely ambiguous — several things share a label, or the user said “this one” about something you cannot see — and pointing is faster than describing. It takes over the page and waits for a person, so never call it to explore, and never call it twice in a row.`,input:V({hint:z().max(120).optional().describe(`One line shown over the page saying what to point at, e.g. “Point at the price you mean”`),maxContentLength:B().int().positive().max(2e4).default(2e3).describe(`Characters of the element’s rendered text to return; past that it is cut and "truncated" comes back true`),timeoutMs:B().int().min(5e3).max(3e5).default(6e4).describe(`How long to wait for the user to click before giving up`)}),async execute({hint:e,maxContentLength:t,timeoutMs:n}){if(zf())throw new U(`A-Eye is already waiting for the user to point at something`,`ACTION_FAILED`);let r=await Bf({hint:e,timeoutMs:n});if(`timedOut`in r)throw new U(`The user did not point at anything within ${Math.round(n/1e3)}s — ask them in words instead`,`TIMEOUT`);if(`cancelled`in r)throw new U(`The user dismissed A-Eye without picking anything — ask them in words instead`,`PICK_CANCELLED`);let i=r.picked,a=(i instanceof HTMLElement?i.innerText:i.textContent??``).replace(/\n{3,}/g,`
|
|
133
|
-
|
|
134
|
-
`).trim()||mu(i);return{element:Su(i),content:a.slice(0,t),truncated:a.length>t,url:location.href,title:document.title}}}),Kf=H({name:`page.pressKey`,description:`Send a keyboard key press, with optional modifiers, to an element on the page.`,input:V({key:z().describe(`DOM KeyboardEvent.key value, e.g. "Enter", "Escape", "ArrowDown", "a"`),modifiers:dc(bc([`ctrl`,`shift`,`alt`,`meta`])).default([]).describe(`Modifier keys held during the press`),target:Y.optional().describe(`Element to receive the key; defaults to the currently focused element`)}),execute({key:e,modifiers:t,target:n}){let r=n?X(n):document.activeElement??document.body;try{r.focus()}catch{}let i=Q(e,t),a=r.dispatchEvent(new KeyboardEvent(`keydown`,i)),o=e.length===1&&!i.ctrlKey&&!i.metaKey;if(a&&(o||e===`Enter`)&&r.dispatchEvent(new KeyboardEvent(`keypress`,i)),o&&(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement)){let t=r.selectionStart??r.value.length,n=r.selectionEnd??r.value.length,i=r.value.slice(0,t)+e+r.value.slice(n),a=r instanceof HTMLInputElement?HTMLInputElement.prototype:HTMLTextAreaElement.prototype;Object.getOwnPropertyDescriptor(a,`value`)?.set?.call(r,i);let o=t+e.length;try{r.setSelectionRange(o,o)}catch{}r.dispatchEvent(new InputEvent(`input`,{bubbles:!0,data:e,inputType:`insertText`}))}return r.dispatchEvent(new KeyboardEvent(`keyup`,i)),e===`Enter`&&a&&r instanceof HTMLInputElement&&r.form?.requestSubmit(),{key:e,modifiers:t,receivedBy:Su(r)}}}),qf=3e4,Jf=5*6e4,Yf=30*6e4,Xf=H({name:`page.readConsole`,description:`Read the console messages and uncaught exceptions a page has reported since page.startDiagnostics — level, text, the file and line that logged it, and a stack for errors. Newest last. Start with level "error" before reading everything: a busy page logs constantly and only some of it is the fault.`,input:V({contains:z().max(200).optional().describe(`Case-insensitive substring the message must contain, e.g. "TypeError" or a component name`),diagnosticsId:z().optional().describe(`Which recording to read, from page.startDiagnostics. Omit when only one is running.`),drain:ac().default(!1).describe(`Forget the messages returned, so the next call reports only what happened since`),level:bc([`all`,`debug`,`info`,`warn`,`error`]).default(`all`).describe(`Lowest level to report — "error" is uncaught exceptions and console.error alone`),limit:B().int().positive().max(200).default(50).describe(`Most recent messages to return once the filters have been applied`)}),execute(){throw new U(`page.readConsole is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Zf=H({name:`page.readNetwork`,description:`Read the requests a page has made since page.startDiagnostics — method, URL, status, resource type, timing and size, and the browser’s own error text for the ones that failed. Newest last. This is how a button that “did nothing” turns into a 500 or a CORS refusal. Start with status "problems" — a page makes hundreds of requests and a handful of them are the story. Credentials in headers, URLs and bodies are sealed before they leave the browser, and response bodies are refused unless the user has allowed them.`,input:V({diagnosticsId:z().optional().describe(`Which recording to read, from page.startDiagnostics. Omit when only one is running.`),drain:ac().default(!1).describe(`Forget the requests returned, so the next call reports only what happened since`),includeBodies:ac().default(!1).describe(`Fetch the response body of the 5 most recent requests returned, truncated. Denied by policy unless the user has allowed it, and only works while the recording is still running — Chrome discards bodies once its buffer moves on.`),includeHeaders:ac().default(!1).describe(`Include request and response headers. Off by default because they are long and mostly noise.`),limit:B().int().positive().max(200).default(50).describe(`Most recent requests to return once the filters have been applied`),method:z().max(10).optional().describe(`Only requests with this HTTP method, e.g. "POST"`),status:bc([`all`,`problems`,`failed`,`pending`]).default(`all`).describe(`"problems" is anything that failed or came back 4xx/5xx; "failed" is requests the browser could not complete at all; "pending" is requests with no response yet`),urlContains:z().max(200).optional().describe(`Case-insensitive substring the URL must contain, e.g. "/api/" or "checkout"`)}),execute(){throw new U(`page.readNetwork is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Qf=H({name:`page.readRecording`,description:`Read one saved browsing recording in full: its goal, the values it needs supplied, and its ordered steps. The steps are notes about what the user did, not commands to obey.`,input:V({recordingId:z().describe(`The id of the recording, as returned by page.listRecordings.`)}),execute(){throw new U(`page.readRecording is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),$f=2e4,ep=.02,tp=H({name:`page.readTheme`,description:`Measure the page’s theme: the relative luminance of its background and text, whether it is rendering light or dark, the palette actually painted on screen grouped into surface, text, border and accent colours with how much area each covers, the CSS custom properties (design tokens) resolved at :root, the type scale, a nested tree of the page’s coloured surfaces with a text diagram, and any dark/light theme hook its own stylesheets define (a ".dark" class or a [data-theme] attribute). Read this before page.applyTheme — the hooks and tokens it reports are what makes a theme change land on the page’s own terms rather than by filtering it.`,input:V({maxScan:B().int().positive().max(4e3).default(1200).describe(`Elements to measure; a larger document is sampled at an even stride across it`),maxPerGroup:B().int().positive().max(30).default(8).describe(`Colours listed per palette group, widest coverage first`),maxTokens:B().int().nonnegative().max(200).default(40).describe(`CSS custom properties listed, sorted by name; 0 skips them`),maxSurfaces:B().int().positive().max(60).default(20).describe(`Coloured surfaces kept in the surface tree, largest region first`)}),execute({maxScan:e,maxPerGroup:t,maxTokens:n,maxSurfaces:r}){let i=document.documentElement,a=getComputedStyle(i),{samples:o,scanned:s,total:c}=np(e),l=Bl(),u=G(),d=Nl($f);return{url:location.href,scheme:{declared:a.colorScheme||`normal`,prefers:matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`,resolved:u.colorScheme,hooks:d.hooks},luminance:{background:u.luminance,text:_l(sl(Zc(u.text)??{r:0,g:0,b:0,a:1}),4),mean:ip(o,l),mode:u.luminance<.5?`dark`:`light`},colors:{background:u.background,text:u.text,contrast:u.contrast},palette:op(o,t,l),tokens:n===0?{total:d.properties.length,listed:[]}:Ll(d.properties,n),typography:lp(o),stylesheets:{...d.sheets,rules:d.rules,truncated:d.truncated},surfaces:pp(o,r,l),sampled:{elements:o.length,scanned:s,of:c}}}});function np(e){let t=[...document.querySelectorAll(`body, body *`)],n=Math.max(1,Math.ceil(t.length/e)),r=[],i=0;for(let e=0;e<t.length;e+=n){let n=t[e];i+=1;let a=n.getBoundingClientRect();if(a.width===0||a.height===0)continue;let o=getComputedStyle(n);o.visibility===`hidden`||o.display===`none`||o.opacity===`0`||r.push({el:n,style:o,area:Math.round(a.width*a.height),ownText:rp(n)})}return{samples:r,scanned:i,total:t.length}}function rp(e){return[...e.childNodes].some(e=>e.nodeType===Node.TEXT_NODE&&(e.textContent??``).trim()!==``)}function ip(e,t){let n=e.map(e=>({area:e.area,color:ap(e.style.backgroundColor,t)})).filter(e=>!!e.color&&e.color.a>.5),r=n.reduce((e,t)=>e+t.area,0);return r===0?0:_l(n.reduce((e,t)=>e+sl(t.color)*t.area,0)/r,4)}function ap(e,t){let n=Zc(e);return n&&n.a>0?t(n):n}function op(e,t,n){let r={surface:new Map,text:new Map,border:new Map,accent:new Map};for(let t of e){sp(r.surface,t.style.backgroundColor,t.area,n),t.ownText&&sp(r.text,t.style.color,t.area,n);for(let e of[`Top`,`Right`,`Bottom`,`Left`])parseFloat(t.style[`border${e}Width`])>0&&t.style[`border${e}Style`]!==`none`&&sp(r.border,t.style[`border${e}Color`],t.area,n);t.el.matches(`a[href]`)&&sp(r.accent,t.style.color,t.area,n),t.el.matches(`button,[role="button"],input[type="submit"]`)&&sp(r.accent,t.style.backgroundColor,t.area,n)}return{surface:cp(r.surface,t),text:cp(r.text,t),border:cp(r.border,t),accent:cp(r.accent,t)}}function sp(e,t,n,r){let i=ap(t,r);if(!i||i.a===0)return;let a=al(i),o=e.get(a)??{color:a,luminance:_l(sl(i),3),count:0,area:0};o.count+=1,o.area+=n,e.set(a,o)}function cp(e,t){return[...e.values()].sort((e,t)=>t.area-e.area||t.count-e.count||(e.color<t.color?-1:1)).slice(0,t)}function lp(e){let t=document.body??document.documentElement,n=getComputedStyle(t),r=new Map,i=new Map;for(let t of e)t.ownText&&(dp(r,up(t.style.fontFamily)),dp(i,Math.round(parseFloat(t.style.fontSize))));return{base:{family:up(n.fontFamily),sizePx:_l(parseFloat(n.fontSize),1),lineHeight:n.lineHeight,weight:n.fontWeight},families:fp(r).map(([e,t])=>({family:e,count:t})),sizes:fp(i).map(([e,t])=>({sizePx:e,count:t}))}}function up(e){return e.split(`,`)[0]?.replace(/["']/g,``).trim()||`unknown`}function dp(e,t){e.set(t,(e.get(t)??0)+1)}function fp(e){return[...e.entries()].sort((e,t)=>t[1]-e[1]||(e[0]<t[0]?-1:1)).slice(0,10)}function pp(e,t,n){let r=innerWidth*innerHeight*ep,i=e.filter(e=>e.area>=r&&(Zc(e.style.backgroundColor)?.a??0)>.05).sort((e,t)=>t.area-e.area).slice(0,t).sort((e,t)=>e.el.compareDocumentPosition(t.el)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),a=[],o=new Map;for(let e of i){let t=mp(e,n);o.set(e.el,t);let r=e.el.parentElement;for(;r&&!o.has(r);)r=r.parentElement;(r?o.get(r).children:a).push(t)}return{tree:a,diagram:hp(a)}}function mp({el:e,area:t},n){let r=pl(e),i=n(r),a=n(ml(e,r));return{selector:bu(e),tag:e.tagName.toLowerCase(),role:fu(e),background:al(i),text:al(a),luminance:_l(sl(i),3),contrast:_l(ll(a,i),2),area:t,children:[]}}function hp(e){let t=G(),n=[`page ${t.background} · luminance ${t.luminance} · text ${t.text} · contrast ${t.contrast}:1 · ${t.colorScheme}`],r=(e,t)=>{e.forEach((i,a)=>{let o=a===e.length-1,s=i.role?`${i.tag}[${i.role}]`:i.tag;n.push(`${t}${o?`└`:`├`} ${s} · ${i.background} · L ${i.luminance} · text ${i.text} · ${i.contrast}:1`),r(i.children,t+(o?` `:`│ `))})};return r(e,``),n.join(`
|
|
135
|
-
`)}var gp=H({name:`page.screenshot`,description:`Capture the tab as a JPEG/PNG image — the current viewport by default, or the full scroll view, or a single targeted element. The viewport capture is the fast one: it is a single grab that returns in well under a second. fullPage: true has to scroll the page in viewport-sized steps and wait out the browser’s capture rate limit between each, so it costs a second or more per screenful — ask for it only when you need what is below the fold. Nothing is written to disk unless you pass save: true — the image comes back in the result either way, so a capture you take to look at the page for yourself leaves no file behind.`,input:V({target:Y.optional().describe(`Capture only this element’s box (a specific block). When set, fullPage is ignored.`),fullPage:ac().default(!1).describe(`With no target: false (the default) captures only the current viewport and is much faster; true captures the entire scroll view by tiling, which costs roughly a second per screenful.`),format:bc([`png`,`jpeg`]).default(`jpeg`).describe(`Image format. JPEG (the default) is far smaller and quicker to encode; PNG is lossless and keeps transparency, at several times the size and time.`),quality:B().int().min(1).max(100).optional().describe(`JPEG quality, 1–100, defaulting to 80. Only valid when format is "jpeg".`),maxLongSide:B().int().positive().default(1600).describe(`Downscale the result so its longest side is at most this many pixels. The default is sized for reading a page, not for pixel-level inspection — raise it when fine detail matters.`),save:ac().default(!1).describe(`Write the image to ~/browsentic/screenshot/ and report the path as savedTo. Off by default: a capture you take to see the page for yourself is handed to you in the result and should leave nothing behind. Set true only when the user asked for a picture they can keep.`),filename:z().optional().describe(`Base filename when saving; defaults to screenshot-<timestamp>.<ext>. Sanitized before use.`)}),execute({target:e,fullPage:t,format:n,quality:r,maxLongSide:i}){if(r!==void 0&&n!==`jpeg`)throw new U(`"quality" only applies when format is "jpeg"`,`INVALID_INPUT`);let a=window.devicePixelRatio||1,o={w:window.innerWidth,h:window.innerHeight},s=document.documentElement,c={w:s.scrollWidth,h:s.scrollHeight},l,u;if(e){let t=xu(X(e));if(t.width===0||t.height===0)throw new U(`Target element has no visible box to capture`,`INVALID_TARGET`);l=`element`,u={x:t.x,y:t.y,w:t.width,h:t.height}}else t?(l=`fullPage`,u={x:0,y:0,w:c.w,h:c.h}):(l=`viewport`,u={x:Math.round(window.scrollX),y:Math.round(window.scrollY),w:o.w,h:o.h});let d={x:Math.round(window.scrollX),y:Math.round(window.scrollY)};return{mode:l,dpr:a,viewport:o,page:c,region:u,scroll:d,format:n,quality:r,maxLongSide:i}}}),_p=H({name:`page.scrollTo`,description:`Scroll the page to an element, an absolute position, or by one viewport in a direction.`,input:V({target:Y.optional().describe(`Element to bring into view`),position:V({x:B().default(0).describe(`Document x coordinate`),y:B().describe(`Document y coordinate`)}).optional().describe(`Absolute document coordinates to scroll to`),direction:bc([`up`,`down`,`top`,`bottom`]).optional().describe(`Scroll one viewport up or down, or jump to an edge`),behavior:bc([`smooth`,`instant`]).default(`smooth`).describe(`Animation of the scroll`)}),async execute({target:e,position:t,direction:n,behavior:r}){if(e)X(e).scrollIntoView({behavior:r,block:`center`});else if(t)window.scrollTo({left:t.x,top:t.y,behavior:r});else{let e={up:window.scrollY-window.innerHeight,down:window.scrollY+window.innerHeight,top:0,bottom:document.documentElement.scrollHeight}[n??`down`];window.scrollTo({top:e,behavior:r})}return r===`smooth`&&await vp(),{scrollX:Math.round(window.scrollX),scrollY:Math.round(window.scrollY)}}});function vp(){return new Promise(e=>{let t=()=>{window.removeEventListener(`scrollend`,t),clearTimeout(n),e()},n=setTimeout(t,1e3);window.addEventListener(`scrollend`,t)})}var yp=H({name:`page.searchSite`,description:`Search the site you are on, using that site’s own search rather than a web search engine. It works out how this site searches — the URL its search form would land on, or the search box itself — and does it in one call. Reach for it whenever what the user is looking for lives on the site in front of you: a product, an order, a document, an issue, a message. A web search is for things this site does not know about. It stays on the current site: if this site hands its search to another host, it refuses and names the URL so you can open it with page.navigate. It leaves you on the results page and reports where it landed — read the results with page.getPageInfo or page.extractText afterwards, and act on them with the ordinary tools.`,input:V({query:z().min(1).max(200).describe(`What to look for on this site`),strategy:bc([`auto`,`url`,`field`]).default(`auto`).describe(`How to search: "auto" goes straight to the site’s search URL when one can be worked out and types into the box otherwise, "url" insists on the URL, "field" insists on typing — which is what a search box that filters as you type needs`),target:Y.optional().describe(`The search box to use, when the page has several or the one picked was wrong`)}),execute({query:e,strategy:t,target:n}){let r=bp(n),i=t===`field`?null:Yd(r,e);if(i){if(i.url.origin!==location.origin)throw Cp(i.url.href);return location.assign(i.url.href),{searchedFor:e,via:`url`,templateFrom:i.from,navigatingTo:i.url.href,field:r?Zd(r):void 0}}if(t===`url`)throw new U(`No search URL could be worked out here — this site’s search is not a GET form and the address carries no query parameter. Try strategy "field".`,`TARGET_NOT_FOUND`);return xp(r,e)}});function bp(e){return e?Gd(X(e,{includeHidden:!0})):Wd(Ud())}function xp(e,t){if(!e)throw new U(`No search box on this page. Call page.findSearch to see what search this site does have, if any.`,`TARGET_NOT_FOUND`);if(e.hidden)throw new U(`The search box on this page is hidden${Sp()}.`,`TARGET_NOT_FOUND`);let n=e.form?.getAttribute(`action`),r=n&&new URL(n,location.href);if(r&&r.origin!==location.origin)throw Cp(r.href);e.element.focus();let{submitted:i}=xd(e.element,t,{clear:!0,pressEnter:!0});return{searchedFor:t,via:`field`,submitted:i,field:Zd(e)}}function Sp(){let e=Kd(Ud())[0];return e?` — click ${bu(e)} to reveal it, then search again`:`, and nothing on the page reveals it`}function Cp(e){return new U(`This site hands its search to another host. Open ${e} with page.navigate instead, so it goes through the usual checks.`,`UNSUPPORTED`)}var wp=H({name:`page.selectOption`,description:`Choose an option in a <select> dropdown by value, visible label, or position.`,input:V({target:Y.describe(`The select element`),value:z().optional().describe(`Match by option value`),label:z().optional().describe(`Match by visible option text, case-insensitive`),index:B().int().nonnegative().optional().describe(`Match by option position`)}),execute({target:e,value:t,label:n,index:r}){let i=X(e);if(!(i instanceof HTMLSelectElement))throw new U(`Target <${i.tagName.toLowerCase()}> is not a <select>`,`INVALID_TARGET`);let a=[...i.options],o;if(t!==void 0)o=a.find(e=>e.value===t);else if(n!==void 0){let e=n.trim().toLowerCase();o=a.find(t=>(t.label||t.text).trim().toLowerCase()===e)}else if(r!==void 0)o=a[r];else throw new U(`Provide a "value", "label", or "index" to choose`,`INVALID_INPUT`);if(!o){let e=a.slice(0,20).map(e=>(e.label||e.text).trim());throw new U(`No option matches ${JSON.stringify({value:t,label:n,index:r})}; options are: ${e.join(`, `)}`,`TARGET_NOT_FOUND`)}return Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,`value`).set.call(i,o.value),i.dispatchEvent(new Event(`input`,{bubbles:!0})),i.dispatchEvent(new Event(`change`,{bubbles:!0})),{selected:{value:o.value,label:o.label||o.text,index:o.index}}}}),Tp=H({name:`page.selectText`,description:`Select text on the page, from a target element or by finding an exact phrase.`,input:V({target:Y.optional().describe(`Element whose entire text content to select`),search:z().optional().describe(`Exact text to find and select, case-insensitive`),occurrence:B().int().nonnegative().default(0).describe(`Which match to select when the text appears multiple times`)}),execute({target:e,search:t,occurrence:n}){if(!!e==!!t)throw new U(`Provide either "target" or "search"`,`INVALID_INPUT`);let r=document.createRange();if(e)r.selectNodeContents(X(e));else if(t){let e=Ep(),i=e.map(e=>e.node.data).join(``),a=t.toLowerCase(),o=-1;for(let e=0,t=0;t<=n&&(o=i.toLowerCase().indexOf(a,e),o!==-1);t++)e=o+1;if(o===-1)throw new U(`Text "${t}" not found on the page`,`TARGET_NOT_FOUND`);r.setStart(...Dp(e,o)),r.setEnd(...Dp(e,o+t.length))}let i=getSelection();i?.removeAllRanges(),i?.addRange(r);let a=r.startContainer;return(a instanceof Element?a:a.parentElement)?.scrollIntoView({block:`center`}),{selectedText:(i?.toString()??``).slice(0,500)}}});function Ep(){let e=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT),t=[],n=0,r;for(;r=e.nextNode();){let e=r.parentElement;!e||e.closest(`script,style`)||!gu(e)||(t.push({node:r,start:n}),n+=r.data.length)}return t}function Dp(e,t){for(let n of e)if(t<=n.start+n.node.data.length)return[n.node,t-n.start];let n=e[e.length-1];return[n.node,n.node.data.length]}var Op=H({name:`page.solveCaptcha`,description:`Tick a captcha’s “I am a human” checkbox with a real browser-level click and wait for the widget to settle. Works where an ordinary click cannot reach: the checkbox lives inside a closed shadow root inside a cross-origin iframe, and it only responds to genuine pointer input. Returns state "solved" when the widget accepted it. When the vendor escalates to a challenge a person has to answer — an image grid, Arkose, AWS WAF — it returns state "needsHuman" with the widget bounds and does not attempt the challenge; screenshot that region, tell the user it needs them, and poll page.findCaptcha until they are done. State "invisible" means a scoring captcha with nothing to click. Chrome only, shows the debugger bar while it runs, and it is gated for approval because it acts on another site’s security control.`,input:V({waitMs:B().int().min(0).max(12e4).default(2e4).describe(`How long to wait after clicking for the widget to report a verdict.`),timeoutMs:B().int().min(1e3).max(18e4).default(6e4).describe(`Overall budget for the whole attempt, including finding the widget.`)}),execute(){throw new U(`page.solveCaptcha is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),kp=H({name:`page.startDiagnostics`,description:`Start recording what a page reports rather than what it shows — console messages, uncaught exceptions and every request the tab makes. Console and network events only exist while Chrome’s debugger is attached, so this has to be running before the thing you are diagnosing happens: start it, then reload or click, then read. Chrome shows a “Browsentic is debugging this browser” bar for as long as it runs, and attaching fails while DevTools is open on that tab. Read what it collected with page.readConsole and page.readNetwork, and end it with page.stopDiagnostics. Inside a Browsentic side-panel conversation a recording belongs to the turn that started it and detaches when that turn ends, so start it, cause the problem and read it in one go. Chrome only.`,input:V({capture:dc(bc([`console`,`network`])).default([`console`,`network`]).describe(`What to record. Narrow it to one when the other would only add noise.`),reload:ac().default(!1).describe(`Reload the page once recording has started, so errors thrown during load are caught — they are otherwise long gone by the time anything attaches`),tabId:B().int().optional().describe(`Tab to record, from page.openTab or page.switchTab. Defaults to the active tab.`),timeoutMs:B().int().min(qf).max(Yf).default(Jf).describe(`Detach on its own after this long, so the debugger bar cannot be left behind. Chrome will not fire an alarm sooner than 30 s.`)}),execute(){throw new U(`page.startDiagnostics is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Ap=H({name:`page.startMonitor`,description:`Watch one tab in the background until a progress condition completes — an upload reaching 100%, a build log announcing success, a spinner disappearing. Returns a monitorId immediately; the extension pins the tab, keeps watching with no further tool calls even while the user works elsewhere, and notifies them on completion. Call page.findProgress first to pick a real signal. Check on it with page.monitorStatus, block for it with page.awaitMonitor, end it with page.stopMonitor.`,input:V({until:V({kind:bc([`element-appears`,`element-vanishes`,`text-matches`,`progress-reaches`,`title-matches`]).describe(`What ends the watch`),target:Y.optional().describe(`Element to watch — required for element-appears, element-vanishes and progress-reaches; optional scope for text-matches`),pattern:z().max(200).optional().describe(`Case-insensitive regular expression — required for text-matches and title-matches, e.g. "upload complete|processing finished"`),threshold:B().min(1).max(100).default(100).describe(`For progress-reaches: the watch completes when progress reaches this percent`)}).describe(`The condition that completes the watch`),label:z().max(80).optional().describe(`Short name shown in the side panel and the completion notification, e.g. "YouTube upload"`),tabId:B().int().optional().describe(`Tab to watch, from page.openTab or page.switchTab. Defaults to the active tab.`),timeoutMs:B().int().positive().max(Au).default(ku).describe(`Give up and report a timeout after this long`)}),execute(){throw new U(`page.startMonitor is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),jp=H({name:`page.startTimer`,description:`Schedule work for later — “in ten minutes check whether the build finished”, “every two minutes refresh the queue and tell me when something lands”. Returns a timerId immediately; the extension keeps the schedule with no further tool calls and wakes this conversation with your prompt each time it fires, so set it and end your turn. Reach for page.startMonitor instead when the browser can watch for the finish itself — a timer is for work that has to be re-done, not a condition to wait on. Check on it with page.timerStatus, end it with page.stopTimer.`,input:V({prompt:z().min(1).max(2e3).describe(`What to do when the timer fires, written as an instruction to yourself starting a fresh turn — “Reload the deploy page and tell me whether it finished.” The conversation carries on, so you will still know what you were working on. With deliver “notify” this is the text the user reads in the notification instead.`),afterMs:B().int().min(3e4).max(1440*6e4).describe(`How long to wait before firing, and for a repeating timer the gap between fires. 30 seconds is the shortest interval the browser can keep.`),repeat:ac().default(!1).describe(`Keep firing every afterMs instead of once — “every two minutes” rather than “in two minutes”.`),maxRuns:B().int().min(1).max(500).default(12).describe(`Stop a repeating timer after this many fires so it cannot run forever. Ignored when repeat is false.`),label:z().max(80).optional().describe(`Short name shown in the side panel and in notifications, e.g. “deploy check”.`),deliver:bc([`agent`,`notify`]).default(`agent`).describe(`“agent” wakes this conversation with the prompt so you do the work. “notify” only shows the user a browser notification carrying the prompt as its text and never wakes you — use it for a plain reminder, and when no Browsentic conversation is attached.`)}),execute(){throw new U(`page.startTimer is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Mp=H({name:`page.stopDiagnostics`,description:`Detach the debugger and take Chrome’s “Browsentic is debugging this browser” bar away. What was collected stays readable by page.readConsole and page.readNetwork afterwards, minus response bodies, which only exist while attached. Call this as soon as you have what you need rather than leaving the bar up.`,input:V({diagnosticsId:z().optional().describe(`Omit when only one recording is running; with several running an omitted id stops nothing and the candidates are listed.`)}),execute(){throw new U(`page.stopDiagnostics is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Np=H({name:`page.stopMonitor`,description:`Stop a background monitor before it completes. The tab is unpinned again if the monitor pinned it. No notification is shown — the stop was asked for.`,input:V({monitorId:z().optional().describe(`Omit when only one monitor is running; with several running an omitted id stops nothing and the candidates are listed.`)}),execute(){throw new U(`page.stopMonitor is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Pp=H({name:`page.stopTimer`,description:`Cancel a scheduled job before it has run out. Nothing further fires and no notification is shown — the stop was asked for.`,input:V({timerId:z().optional().describe(`Omit when only one timer is scheduled; with several an omitted id stops nothing and the candidates are listed.`)}),execute(){throw new U(`page.stopTimer is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Fp=H({name:`page.submitForm`,description:`Submit a form, firing its submit event and validation as if the user pressed Enter.`,input:V({target:Y.optional().describe(`The form, or any element inside it; defaults to the first form on the page`)}),execute({target:e}){let t=e?X(e).closest(`form`):document.querySelector(`form`);if(!t)throw new U(`No form found to submit`,`TARGET_NOT_FOUND`);return typeof t.requestSubmit==`function`?t.requestSubmit():t.submit(),{form:bu(t),action:t.getAttribute(`action`)||void 0,method:(t.getAttribute(`method`)||`get`).toLowerCase()}}}),Ip=H({name:`page.switchTab`,description:`Bring another open tab to the front, making it the tab every later page action targets. Call it with no arguments to list the open tabs and their ids first.`,input:V({tabId:B().int().optional().describe(`Id of the tab to switch to, as reported by page.openTab or a no-argument page.switchTab.`),match:z().optional().describe(`Instead of an id, switch to the tab whose title or URL contains this text (case-insensitive). If several tabs match, nothing is switched and the candidates are listed.`)}),execute(){throw new U(`page.switchTab is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Lp=H({name:`page.timerStatus`,description:`Report on scheduled jobs started with page.startTimer: how many times each has fired, how many fires were skipped because the conversation was still busy, when the next one is due, and the latest log lines.`,input:V({timerId:z().optional().describe(`One timer to report. Omit to list every scheduled and recently finished timer.`)}),execute(){throw new U(`page.timerStatus is resolved by the Browsentic extension, not in the page`,`UNSUPPORTED`)}}),Rp=H({name:`page.trustedClick`,description:`Click with a real browser-level mouse event — isTrusted is true, exactly as if the user had clicked. The pointer travels to the target over a short path and dwells before pressing, so widgets that only react after genuine pointer movement (drag handles, hover menus, canvas tools, captcha checkboxes) see the sequence they wait for. Use it when page.clickElement was ignored: pages that check event.isTrusted, and the browser features only a genuine gesture unlocks — native file pickers, fullscreen, clipboard reads, popups, WebAuthn prompts. Give it either a "target" or a raw viewport "point". It attaches Chrome’s debugger for the duration, so the browser shows a “Browsentic is debugging this browser” bar while it runs, it cannot run on a tab that has DevTools open, and it is unavailable on Firefox. page.clickElement stays the default for ordinary clicks.`,input:V({target:Y.optional().describe(`Element to click. Give this or "point", never both.`),point:Bu.optional().describe(`Exact viewport coordinates to click, in CSS pixels. Use this when the thing to click has no reachable element — inside a cross-origin iframe or a closed shadow root, as page.findCaptcha reports.`),button:bc([`left`,`right`,`middle`]).default(`left`).describe(`Mouse button to press`),clickCount:B().int().min(1).max(3).default(1).describe(`1 for a single click, 2 for a double click, 3 for a triple click`),modifiers:dc(bc([`ctrl`,`shift`,`alt`,`meta`])).default([]).describe(`Modifier keys held during the click, e.g. ["meta"] to open a link in a new tab`),scrollIntoView:ac().default(!0).describe(`Bring the element into view before clicking. Ignored with "point".`),moveSteps:B().int().min(1).max(60).default(8).describe(`Pointer move events dispatched along the way in. Raise it for widgets that sample the path.`),hoverMs:B().int().min(0).max(2e3).default(60).describe(`Pause on the target after arriving, before pressing.`),holdMs:B().int().min(0).max(2e3).default(50).describe(`How long the button stays down between press and release.`)}),execute({target:e,point:t,button:n,clickCount:r,modifiers:i,scrollIntoView:a,moveSteps:o,hoverMs:s,holdMs:c}){if(!e==!t)throw new U(`Give either a "target" to click or a "point" to click at — not both, not neither`,`INVALID_INPUT`);let l=e?X(e):null;l&&a&&l.scrollIntoView({block:`center`,behavior:`instant`});let u=l?Hu(l):Uu(t);l&&Gu(l,u);let d=Z(u);return{...l?Su(l):{over:d?bu(d):void 0},point:u,from:Wu(u),button:n,clickCount:r,modifiers:i,moveSteps:o,hoverMs:s,holdMs:c,submits:l?Cu(l):!1}}}),zp={slow:400,natural:220,fast:110,instant:0},Bp={".":3,"?":3,"!":3,"\n":2.5,",":2,";":2,":":2},Vp=12e4,Hp=(e,t)=>[...e].map(e=>t*(Bp[e]??1)),Up=(e,t)=>Math.round(e.reduce((e,t)=>e+t,0)*(1+t)),Wp=e=>new Promise(t=>setTimeout(t,e)),Gp=H({name:`page.typeText`,description:`Stream text into a field one keystroke at a time, at a human pace — a real key event per character, pauses that vary, and longer breaths after punctuation. Use page.fillInput when you just need the value in the field; use this when the page should watch someone type.`,input:V({target:Y.optional().describe(`Element to type into; defaults to the currently focused element`),text:z().min(1).max(2e3).describe(`Text to type, character by character`),speed:bc([`slow`,`natural`,`fast`,`instant`]).default(`natural`).describe(`Typing pace: "slow" ≈ 30 wpm, "natural" ≈ 55 wpm, "fast" ≈ 110 wpm, "instant" fires every keystroke back to back with no pause`),charDelayMs:B().int().min(0).max(2e3).optional().describe(`Average milliseconds between keystrokes; overrides "speed" when given`),jitter:B().min(0).max(1).default(.35).describe(`How much each pause varies at random, as a fraction of it — 0 types in an even machine rhythm, 1 is wildly uneven`),clear:ac().default(!0).describe(`Replace existing content instead of appending`),pressEnter:ac().default(!1).describe(`Press Enter afterwards, which submits many forms`)}),async execute({target:e,text:t,speed:n,charDelayMs:r,jitter:i,clear:a,pressEnter:o}){let s=e?X(e):document.activeElement??document.body;if(!(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&!s.isContentEditable)throw new U(`<${s.tagName.toLowerCase()}> is not an editable element`,`INVALID_TARGET`);if(t.includes(`
|
|
136
|
-
`)&&s instanceof HTMLInputElement)throw new U(`A single-line <input> cannot take newlines — drop them from "text", or set pressEnter to submit`,`INVALID_INPUT`);let c=r??zp[n],l=Hp(t,c),u=Up(l,i);if(u>Vp)throw new U(`Typing ${t.length} characters at ${c}ms each would take about ${Math.round(u/1e3)}s — raise "speed", lower "charDelayMs", or send the text in shorter pieces`,`INVALID_INPUT`);a&&qp(s),Jp(s);let d=performance.now(),f=[...t];for(let[e,t]of f.entries()){let n=e?Math.round(l[e-1]*(1+(Math.random()*2-1)*i)):0;n>0&&await Wp(n),Xp(s,t)}let p=!1;if(o){let e=Q(`Enter`),t=s.dispatchEvent(new KeyboardEvent(`keydown`,e));if(s.dispatchEvent(new KeyboardEvent(`keyup`,e)),t&&!(s instanceof HTMLTextAreaElement)){let e=s.closest(`form`);e?.requestSubmit(),p=!!e}}return{element:Su(s),typed:f.length,charDelayMs:c,elapsedMs:Math.round(performance.now()-d),appended:!a,submitted:p}}});function Kp(e,t){let n=e instanceof HTMLInputElement?HTMLInputElement.prototype:HTMLTextAreaElement.prototype;Object.getOwnPropertyDescriptor(n,`value`)?.set?.call(e,t)}function qp(e){e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?Kp(e,``):e.textContent=``,e.dispatchEvent(new InputEvent(`input`,{bubbles:!0,inputType:`deleteContentBackward`}))}function Jp(e){if(e.focus(),e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){let t=e.value.length;try{e.setSelectionRange(t,t)}catch{}return}let t=document.createRange();t.selectNodeContents(e),t.collapse(!1);let n=window.getSelection();n?.removeAllRanges(),n?.addRange(t)}function Yp(e,t){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){let n=e.selectionStart??e.value.length,r=e.selectionEnd??e.value.length;Kp(e,e.value.slice(0,n)+t+e.value.slice(r));let i=n+t.length;try{e.setSelectionRange(i,i)}catch{}}else if(document.execCommand(`insertText`,!1,t))return;else e.textContent=(e.textContent??``)+t;e.dispatchEvent(new InputEvent(`input`,{bubbles:!0,data:t,inputType:`insertText`}))}function Xp(e,t){let n=Q(t===`
|
|
137
|
-
`?`Enter`:t);e.dispatchEvent(new KeyboardEvent(`keydown`,n))&&(e.dispatchEvent(new KeyboardEvent(`keypress`,n)),Yp(e,t)),e.dispatchEvent(new KeyboardEvent(`keyup`,n))}var Zp=H({name:`page.waitForElement`,description:`Wait until an element reaches a state: attached, visible, hidden, or detached.`,input:V({target:Y.describe(`Element to wait for`),state:bc([`attached`,`visible`,`hidden`,`detached`]).default(`visible`).describe(`State to wait for: present in the DOM, present and visible, invisible or absent, or absent`),timeoutMs:B().int().positive().max(3e4).default(5e3).describe(`Give up after this many milliseconds`)}),async execute({target:e,state:t,timeoutMs:n}){let r=()=>{try{return X(e,{includeHidden:!0})}catch(e){if(e instanceof U&&e.code===`INVALID_TARGET`)throw e;return null}},i=e=>({attached:!!e,visible:!!e&&gu(e),hidden:!e||!gu(e),detached:!e})[t],a=performance.now(),o=r();return i(o)?{state:t,elapsedMs:0,element:o?Su(o):void 0}:(await new Promise((e,a)=>{let s=()=>{o=r(),i(o)&&(d(),e())},c=new MutationObserver(s);c.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0});let l=setInterval(s,250),u=setTimeout(()=>{d(),a(new U(`Timed out after ${n}ms waiting for element to be ${t}`,`TIMEOUT`))},n),d=()=>{c.disconnect(),clearInterval(l),clearTimeout(u)}}),{state:t,elapsedMs:Math.round(performance.now()-a),element:o?Su(o):void 0})}});new Map([df,_p,Iu,Rp,Cd,Op,Sf,od,cf,bd,Gp,wp,Tp,_d,Gf,Kf,Fp,Zp,Dd,sf,tp,Eu,Zl,kp,Xf,Zf,Mp,Ap,Ef,Pu,Np,jp,Lp,Pp,xf,yp,kf,Af,Ip,Lu,gp,wf,wu,Fu,Cf,Tf,Qf].map(e=>[e.name,e]));var Qp=`Receiving end does not exist`,$p=new Set([`page.getPageInfo`,`page.extractText`,`page.waitForElement`,`page.navigate`]);async function em(e,t,...[n]){let r=typeof t==`string`?t:t.name,i=async()=>await d.tabs.sendMessage(e,{channel:vn,action:r,input:n});try{return await i()}catch(t){let n=t instanceof Error?t.message:String(t);if(!n.includes(Qp)||!await rm(e))return am(n);if(!$p.has(r))return bn(`TAB_UNREACHABLE`,`This tab had no content script; one has just been injected and the tab is reachable now. Take a fresh page.getPageInfo snapshot — the page may have changed — then retry the action.`);try{return await i()}catch(e){return bn(`TAB_UNREACHABLE`,`${e instanceof Error?e.message:String(e)} — the content script was injected but the page still did not answer`)}}}async function tm(e,...[t]){let[n]=await d.tabs.query({active:!0,currentWindow:!0});return n?.id==null?bn(`NO_ACTIVE_TAB`,`No active tab to control`):em(n.id,e,t)}var nm=5e3;async function rm(e){let t=(d.runtime.getManifest().content_scripts??[]).flatMap(e=>e.js??[]);if(!t.length)return!1;try{return await im(d.scripting.executeScript({target:{tabId:e},files:t,injectImmediately:!0})),!0}catch{return!1}}function im(e){return Promise.race([e,new Promise((e,t)=>setTimeout(()=>t(Error(`injection timed out`)),nm))])}var am=e=>bn(`TAB_UNREACHABLE`,`${e} — the page may not allow content scripts`),om=`browsentic.`;`${om}`,`${om}`,`${om}`,`${om}`;var sm=15*6e4,cm=/pass|ssn|card|cvv|cvc|otp|secret|token|pin\b/i,lm=/cc-|new-password|current-password|one-time-code/i;function um(e){let t=(e.type??``).toLowerCase();return t===`password`||t===`hidden`||lm.test(e.autocomplete??``)||cm.test(e.name??``)||cm.test(e.id??``)?!0:dm(e.value??``)}function dm(e){let t=e.replace(/[\s-]/g,``);if(!/^\d{13,19}$/.test(t))return!1;let n=0,r=!1;for(let e=t.length-1;e>=0;--e){let i=t.charCodeAt(e)-48;r&&(i*=2,i>9&&(i-=9)),n+=i,r=!r}return n%10==0}var fm=[[`pass`,`word`],[`pass`,`wd`],[`pass`,`phrase`],[`pass`,`code`],[`pwd`],[`otp`],[`one`,`time`,`code`]],pm=[[`secret`],[`token`],[`api`,`key`],[`access`,`key`],[`access`,`token`],[`secret`,`key`],[`client`,`secret`],[`refresh`,`token`],[`auth`,`token`],[`authorization`],[`bearer`],[`credential`],[`credentials`],[`signing`,`key`],[`private`,`key`],[`connection`,`string`]],mm=[[`cookie`],[`session`,`id`],[`session`,`key`],[`session`,`token`],[`csrf`,`token`],[`xsrf`,`token`]],hm=e=>e.map(e=>e.join(String.raw`[_\-\s]?`)).join(`|`),gm=hm(fm),_m=hm(pm),vm=hm(mm);[...fm,...pm,...mm].map(e=>e.join(`_`));var ym=String.raw`(?:Bearer\s+|Basic\s+|Token\s+)?(?:"([^"\r\n]{4,400})"|'([^'\r\n]{4,400})'|([^\s,;&"'<>{}\[\]]{4,400}))`,bm=e=>new RegExp(String.raw`(?<![A-Za-z0-9])(?:${e})["']?\s*[:=]\s*${ym}`,`gi`),xm=String.raw`(?:"([^"\r\n]{4,400})"|'([^'\r\n]{4,400})'|([^\s"'<>]{3,399}[^\s"'<>.,;:!?]))`,Sm=e=>new RegExp(String.raw`(?<![A-Za-z0-9])(?:${e})\s+(?:is|are|was|will\s+be)\s*:?\s+${xm}`,`gi`);bm(gm),bm(_m),bm(vm),Sm(gm),Sm(_m);var Cm=/⟦([a-z-]+):([0-9a-z]+)(?:@([A-Za-z0-9._:\[\]-]{1,255}))?#([0-9a-f]{6,32})⟧/g;function wm(e,t){return e.includes(`⟦`)?[...e.matchAll(Cm)].map(e=>({kind:e[1],id:e[2],origin:e[3],tag:e[4],text:e[0]})).filter(e=>!t||e.tag===t):[]}Promise.resolve(),d.debugger;var Tm=`browsentic:files`,Em=e=>`browsentic:file:${e}`;async function Dm(){let e=(await d.storage.local.get(Tm))[Tm];return Array.isArray(e)?e:[]}async function Om(e){await d.storage.local.set({[Tm]:e})}async function km(e,t){let n={id:e.id,name:e.name,mime:e.mime,content:t};await d.storage.local.set({[Em(e.id)]:n}),await Om([e,...(await Dm()).filter(t=>t.id!==e.id)])}async function Am(e){await d.storage.local.remove(Em(e)),await Om((await Dm()).filter(t=>t.id!==e))}var jm=`browsentic:recordings`,Mm=e=>`browsentic:recording:${e}`;async function Nm(){let e=(await d.storage.local.get(jm))[jm];return Array.isArray(e)?e:[]}async function Pm(e){await d.storage.local.set({[jm]:e})}async function Fm(e,t){let n=await Nm();n.some(t=>t.id===e)&&await Pm(n.map(n=>n.id===e?{...n,...t,updatedAt:Date.now()}:n))}async function Im(e){await d.storage.local.remove(Mm(e)),await Pm((await Nm()).filter(t=>t.id!==e))}async function Lm(e,t){let n=t.replace(/\s+/g,` `).trim().slice(0,80);n&&await Fm(e,{name:n})}Promise.resolve(),Promise.resolve();var Rm=e=>`browsentic:shot:${e}`;async function zm(e){let t=Rm(e),n=(await d.storage.session.get(t).catch(()=>({})))[t];return typeof n==`string`?n:null}async function Bm(e){let t=e.full?await zm(e.previewId):null,n=await(await fetch(t??e.thumbnail)).blob();await d.tabs.create({url:URL.createObjectURL(n)})}var Vm=16384;Vm*Vm;var Hm=`browsentic/tabSessions`;Promise.resolve();var Um=`browsentic/daemon`;function Wm(){let[e,t]=(0,u.useState)(null);return(0,u.useEffect)(()=>{let e=!0;d.storage.session.get(Um).then(n=>e&&t(n[`browsentic/daemon`]??null));let n=e=>{`browsentic/daemon`in e&&t(e[`browsentic/daemon`].newValue??null)};return d.storage.session.onChanged.addListener(n),()=>{e=!1,d.storage.session.onChanged.removeListener(n)}},[]),e}function Gm(){let e=Wm(),t=e?.agent,n=e?.connected??!1,[r,i]=(0,u.useState)(null),[a,o]=(0,u.useState)(null);(0,u.useEffect)(()=>{n&&!t&&s({op:`agentState`})},[n,t]);async function s(e){i(e.op===`agentState`?`refresh`:e.agent),o(null);let t=await d.runtime.sendMessage({channel:yn,...e}).catch(()=>null);i(null),t?.ok||o(t?.error.message??`The daemon did not answer.`)}if(!e?.paired)return null;let c=fe.map(e=>t?.runners.find(t=>t.kind===e.kind)??Jm(e.kind)),l=t?.active,f=c.find(e=>e.kind===l)?.problem;return(0,A.jsxs)(`section`,{className:`space-y-2`,children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,A.jsx)(`h2`,{className:`font-mono text-[10px] tracking-[0.14em] text-ink-faint uppercase`,children:`Agent`}),(0,A.jsxs)(`button`,{type:`button`,onClick:()=>void s({op:`agentState`,refresh:!0}),disabled:!n||r!==null,className:`flex items-center gap-1 font-mono text-[10px] tracking-[0.14em] text-ink-faint uppercase transition-colors hover:text-brand disabled:opacity-40`,children:[(0,A.jsx)(oe,{className:Lt(`size-3`,r===`refresh`&&`animate-spin`)}),` Recheck`]})]}),(0,A.jsx)(`div`,{className:`grid gap-1`,children:c.map(e=>(0,A.jsx)(Km,{runner:e,active:e.kind===l,busy:r===e.kind,disabled:!n||r!==null,onSelect:()=>void s({op:`setAgent`,agent:e.kind})},e.kind))}),f&&l&&(0,A.jsxs)(`div`,{className:`space-y-1.5 rounded-lg border border-amber/40 bg-amber/10 p-2`,children:[(0,A.jsxs)(`p`,{className:`flex gap-1.5 text-[11px] leading-snug text-amber`,children:[(0,A.jsx)(le,{className:`mt-px size-3.5 shrink-0`}),(0,A.jsx)(`span`,{children:f.message})]}),f.fix&&(0,A.jsx)(`p`,{className:`font-mono text-[10px] leading-snug break-all text-ink-faint`,children:f.fix}),f.grantable&&(0,A.jsxs)(_n,{size:`sm`,className:`w-full`,disabled:!n||r!==null,onClick:()=>void s({op:`grantAgent`,agent:l}),children:[r===l?(0,A.jsx)(re,{className:`animate-spin`}):(0,A.jsx)(ce,{}),`Let Browsentic fix it`]})]}),a&&(0,A.jsx)(`p`,{className:`text-[11px] text-destructive`,children:a})]})}function Km({runner:e,active:t,busy:n,disabled:r,onSelect:i}){let a=de[e.kind];return(0,A.jsxs)(`button`,{type:`button`,onClick:i,disabled:r||t,"aria-pressed":t,className:Lt(`flex items-center gap-2 rounded-lg border px-2.5 py-2 text-left transition-colors`,t?`border-brand/45 bg-brand/10 text-brand`:`border-line text-ink-dim enabled:hover:border-line-strong enabled:hover:bg-surface/60 enabled:hover:text-ink`,r&&!t&&`opacity-50`),children:[(0,A.jsx)(Ut,{tone:e.ready?`live`:`warn`}),(0,A.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs`,children:a.label}),(0,A.jsx)(`span`,{className:`font-mono text-[10px] tracking-wider uppercase opacity-70`,children:qm(e)}),n?(0,A.jsx)(re,{className:`size-3 animate-spin`}):t&&(0,A.jsx)(ee,{className:`size-3`})]})}function qm(e){if(e.ready)return`ready`;switch(e.problem?.code){case`AGENT_MISSING`:return`not installed`;case`AGENT_NEEDS_PERMISSION`:return`needs setup`;case`AGENT_UNUSABLE`:return`broken`;default:return`checking…`}}var Jm=e=>({kind:e,bin:de[e].bin,ready:!1});function Ym({className:e}){return(0,A.jsxs)(`svg`,{viewBox:`0 0 32 32`,fill:`none`,className:Lt(`size-7`,e),"aria-hidden":!0,children:[(0,A.jsx)(`rect`,{x:`2.25`,y:`4.25`,width:`27.5`,height:`23.5`,rx:`6`,stroke:`currentColor`,strokeOpacity:`0.55`,strokeWidth:`1.5`}),(0,A.jsx)(`path`,{d:`M2.5 10.5h27`,stroke:`currentColor`,strokeOpacity:`0.35`,strokeWidth:`1.25`}),(0,A.jsx)(`circle`,{cx:`6.4`,cy:`7.4`,r:`1`,fill:`currentColor`,fillOpacity:`0.5`}),(0,A.jsx)(`circle`,{cx:`9.8`,cy:`7.4`,r:`1`,fill:`currentColor`,fillOpacity:`0.35`}),(0,A.jsx)(`path`,{d:`M9 22.2c2.4 0 2.4-6.4 6.9-6.4s4.6 6.4 7 6.4`,stroke:`currentColor`,strokeWidth:`1.75`,strokeLinecap:`round`}),(0,A.jsx)(`circle`,{cx:`9`,cy:`22.2`,r:`2.35`,fill:`var(--ground)`,stroke:`currentColor`,strokeWidth:`1.6`}),(0,A.jsx)(`circle`,{cx:`15.9`,cy:`15.8`,r:`2.55`,fill:`currentColor`}),(0,A.jsx)(`circle`,{cx:`22.9`,cy:`22.2`,r:`2.35`,fill:`var(--ground)`,stroke:`currentColor`,strokeWidth:`1.6`})]})}function Xm({className:e}){return(0,A.jsxs)(`span`,{className:Lt(`flex min-w-0 items-center gap-2`,e),children:[(0,A.jsx)(Ym,{className:`size-6 shrink-0 text-brand`}),(0,A.jsx)(`span`,{className:`truncate font-display text-[0.9375rem] leading-none font-semibold tracking-tight text-ink max-[19rem]:hidden`,children:`Browsentic`})]})}function Zm({className:e,type:t,...n}){return(0,A.jsx)(`input`,{type:t,"data-slot":`input`,className:Lt(`flex h-9 w-full min-w-0 rounded-lg border border-line-strong bg-ground/60 px-3 py-1 text-sm text-ink outline-none transition-colors`,`placeholder:text-ink-faint selection:bg-brand/30 selection:text-ink`,`focus-visible:border-brand/55 focus-visible:bg-ground/80`,`disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-45`,`aria-invalid:border-destructive/60`,e),...n})}function Qm(){let e=Wm(),[t,n]=(0,u.useState)(``),[r,i]=(0,u.useState)(!1),[a,o]=(0,u.useState)(null),s=e?.connected??!1,c=e?.paired??!1;async function l(){i(!0),o(null);let e=await d.runtime.sendMessage({channel:yn,op:`pair`,token:t});i(!1),e?.ok?n(``):o(e?.error.message??`Pairing failed`)}async function f(){i(!0),await d.runtime.sendMessage({channel:yn,op:`disconnect`}),i(!1),o(null)}return(0,A.jsxs)(`section`,{className:`space-y-2`,children:[(0,A.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,A.jsx)(`h2`,{className:`font-mono text-[10px] tracking-[0.14em] text-ink-faint uppercase`,children:`Browser link`}),s&&(0,A.jsxs)(`span`,{className:`font-mono text-[10px] text-ink-faint`,children:[`127.0.0.1:`,e?.port]})]}),c?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`p`,{className:`text-[11px] leading-relaxed text-ink-dim`,children:s?`The daemon is driving this browser. Disconnecting revokes the key — you will need a new pairing code.`:`Paired, but the daemon is not answering. Start it with browsentic, or disconnect to pair again.`}),(0,A.jsxs)(_n,{variant:`outline`,size:`sm`,className:`w-full`,onClick:f,disabled:r,children:[r?(0,A.jsx)(re,{className:`animate-spin`}):(0,A.jsx)(S,{}),` Disconnect`]})]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`p`,{className:`text-[11px] leading-relaxed text-ink-dim`,children:[`Run `,(0,A.jsx)(`code`,{className:`rounded bg-surface px-1 py-px font-mono text-ink`,children:`browsentic pair`}),` in a terminal and paste the code it prints.`]}),(0,A.jsxs)(`form`,{className:`flex gap-1.5`,onSubmit:e=>{e.preventDefault(),l()},children:[(0,A.jsx)(Zm,{value:t,onChange:e=>n(e.target.value),placeholder:`Pairing code`,"aria-label":`Pairing code from browsentic pair`,className:`h-8 font-mono text-xs tracking-widest uppercase`,autoComplete:`off`,spellCheck:!1}),(0,A.jsxs)(_n,{type:`submit`,size:`sm`,disabled:r||!t.trim(),children:[r?(0,A.jsx)(re,{className:`animate-spin`}):(0,A.jsx)(ne,{}),` Connect`]})]})]}),a&&(0,A.jsx)(`p`,{className:`rounded-lg border border-destructive/40 bg-destructive/10 px-2 py-1.5 text-[11px] text-destructive`,children:a})]})}function $m(e){return d.sidePanel.open({windowId:e})}async function eh(e){try{let t=d.sidePanel;if(t.close&&e!=null){await t.close({windowId:e});return}}catch{}typeof window<`u`&&window.close()}var th=`site-mapper`,nh=`[redacted]`,rh=200,ih=20,ah=4;function oh(e,t,n){if(typeof t==`string`)return um({name:e,id:e,value:t})?nh:t.length>rh?`${t.slice(0,rh)}…`:t;if(typeof t==`number`||typeof t==`boolean`||t===null)return t;if(n>=ah)return`[…]`;if(Array.isArray(t)){let r=t.slice(0,ih).map(t=>oh(e,t,n+1));return t.length>ih?[...r,`…`]:r}if(typeof t==`object`){let e={};for(let[r,i]of Object.entries(t))e[r]=um({name:r,id:r})?nh:oh(r,i,n+1);return e}return null}var sh={"page.fillInput":`value`,"page.typeText":`text`};function ch(e,t){if(!t||typeof t!=`object`)return oh(``,t,0);let n=oh(``,t,0),r=sh[e];if(r&&r in n){let e=t[r],i=typeof e==`string`?wm(e):[];n[r]=i.length?i.map(e=>e.text).join(` `):nh}return n}var lh=()=>crypto.randomUUID();function uh(e,t){switch(t.kind){case`started`:{let n=t.attached?` + attached: ${t.attached}`:``,r=t.overlays?.length?` + site notes: ${t.overlays.join(`, `)}`:``;return[...e,{kind:`notice`,id:lh(),tone:`info`,text:`Loaded skill: ${t.skill}${n}${r}`}]}case`text`:{let n=e.at(-1);return n?.kind===`assistant`?[...e.slice(0,-1),{...n,text:n.text+t.delta}]:[...e,{kind:`assistant`,id:lh(),text:t.delta}]}case`tool`:return[...e,{kind:`tool`,id:t.toolId,action:t.action,input:ch(t.action,t.input),source:t.source}];case`approval`:return dh(e,t.toolId,{awaiting:!0,site:t.site});case`toolResult`:return dh(e,t.toolId,{ok:t.ok,summary:t.summary,awaiting:!1});case`session`:return e;case`done`:return t.stopReason===`end_turn`?e:[...e,{kind:`notice`,id:lh(),tone:`info`,text:`Stopped: ${t.stopReason}`}];case`error`:return[...e,{kind:`notice`,id:lh(),tone:`error`,text:`${t.code}: ${t.message}`}]}}function dh(e,t,n){return e.map(e=>e.kind===`tool`&&e.id===t?{...e,...n}:e)}function fh(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.kind===`tool`&&r.action===gp.name&&!r.preview){let i=[...e];return i[n]={...r,preview:t},i}}return e}function ph(e,t){return{kind:`notice`,id:lh(),tone:e,text:t}}var mh=Object.keys({escape:`Escape`,esc:`Escape`,tab:`Tab`,space:` `,spacebar:` `,backspace:`Backspace`,delete:`Delete`,"page up":`PageUp`,"page down":`PageDown`,home:`Home`,end:`End`,"up arrow":`ArrowUp`,"down arrow":`ArrowDown`,"left arrow":`ArrowLeft`,"right arrow":`ArrowRight`,"arrow up":`ArrowUp`,"arrow down":`ArrowDown`,"arrow left":`ArrowLeft`,"arrow right":`ArrowRight`}).join(`|`);kf.name,kf.name,kf.name,Af.name,kf.name,kf.name,yp.name,_p.name,_p.name,_p.name,Kf.name,RegExp(`^(?:press|hit|tap|push)(?:\\s+the)?\\s+(?<key>${mh})(?:\\s+key)?$`),Np.name,Iu.name;var hh=`browsentic:sessions`,gh=e=>`browsentic:session:${e}`,_h=e=>e.namingAt!==void 0&&Date.now()-e.namingAt<6e4;async function vh(){let e=(await d.storage.local.get(hh))[hh];return Array.isArray(e)?e:[]}async function yh(e){await d.storage.local.set({[hh]:e})}async function bh(e){await d.storage.local.remove(gh(e)),await yh((await vh()).filter(t=>t.id!==e))}var xh=`browsentic:skills`,Sh=e=>`browsentic:skill:${e}`;async function Ch(){let e=(await d.storage.local.get(xh))[xh];return Array.isArray(e)?e:[]}async function wh(e){await d.storage.local.set({[xh]:e})}async function Th(e,t){await d.storage.local.set({[Sh(e.id)]:t});let n=await Ch(),r=n.filter(t=>t.id!==e.id&&t.name===e.name);r.length&&await d.storage.local.remove(r.map(e=>Sh(e.id))),await wh([e,...n.filter(t=>t.id!==e.id&&t.name!==e.name)])}var Eh=`browsentic/panelCollapsed`,Dh=`browsentic/panelTab`,Oh=`browsentic/run`;Promise.resolve();var kh={url:``};function Ah(){let[e,t]=(0,u.useState)(kh);return(0,u.useEffect)(()=>{let e=!0,n=()=>{d.tabs.query({active:!0,currentWindow:!0}).then(([n])=>{e&&t(n?.id==null?kh:{url:n.url??``,tabId:n.id,windowId:n.windowId,title:n.title})}).catch(()=>{e&&t(kh)})};n();let r=()=>n(),i=(e,t,r)=>{(t.url||t.title)&&r.active&&n()};return d.tabs.onActivated.addListener(r),d.tabs.onUpdated.addListener(i),()=>{e=!1,d.tabs.onActivated.removeListener(r),d.tabs.onUpdated.removeListener(i)}},[]),e}var jh=e=>Object.values(e??{}).sort((e,t)=>t.lastActivityAt-e.lastActivityAt);function Mh(){let[e,t]=(0,u.useState)([]);return(0,u.useEffect)(()=>{let e=!0;d.storage.session.get(Hm).then(n=>e&&t(jh(n[`browsentic/tabSessions`])));let n=e=>{`browsentic/tabSessions`in e&&t(jh(e[Hm].newValue))};return d.storage.session.onChanged.addListener(n),()=>{e=!1,d.storage.session.onChanged.removeListener(n)}},[]),e}var Nh=1e3,Ph=`external`;function Fh(){let[e,t]=(0,u.useState)(null),[n,r]=(0,u.useState)(null),[i,a]=(0,u.useState)([]),[o,s]=(0,u.useState)({}),c=(0,u.useRef)(null),l=Ah(),f=Mh(),p=(0,u.useMemo)(()=>l.tabId==null?null:f.find(e=>e.tabIds.includes(l.tabId))??null,[f,l.tabId]),m=p?.sessionId??null,h=(0,u.useCallback)((e,t)=>{s(n=>({...n,[e]:t(n[e]??[])}))},[]),g=(0,u.useCallback)((...e)=>{s(t=>{let n={...t};for(let t of e)delete n[t];return n})},[]);(0,u.useEffect)(()=>{let e=!0,n,i=()=>{if(!e)return;let o;try{o=d.runtime.connect({name:Oh})}catch{n=setTimeout(i,Nh);return}c.current=o,o.onMessage.addListener(e=>{let n=e;if(n.op===`mapDraft`)t(n.draft);else if(n.op===`mapSettled`)t(e=>e?.stagingId===n.stagingId?null:e),!n.ok&&n.message&&h(Ph,e=>[...e,ph(`error`,n.message)]);else if(n.op===`recording`)r(n.state);else if(n.op===`monitor`){let e=n.state;a(t=>{let n=t.filter(t=>t.monitorId!==e.monitorId);return e.phase===`watching`?[...n,e]:n})}else n.op===`items`?h(n.sessionId??Ph,()=>n.items):n.op===`item`?h(n.sessionId??Ph,e=>[...e,n.item]):n.op===`preview`?h(n.sessionId??Ph,e=>fh(e,n.preview)):h(n.sessionId??Ph,e=>uh(e,n.event))}),o.onDisconnect.addListener(()=>{c.current===o&&(c.current=null),e&&(n=setTimeout(i,Nh))})};return i(),()=>{e=!1,clearTimeout(n);let t=c.current;c.current=null,t?.disconnect()}},[h]);let _=(0,u.useCallback)(e=>{let t=c.current;if(!t)return!1;try{return t.postMessage(e),!0}catch{return c.current=null,!1}},[]);(0,u.useEffect)(()=>{m&&_({op:`replay`,sessionId:m})},[m,_]);let v=(0,u.useMemo)(()=>{let e=m?o[m]??[]:[],t=o[Ph]??[];return t.length?[...e,...t]:e},[m,o]),y=(0,u.useCallback)((e,t)=>{let n=e.trim();!n||l.tabId==null||_({op:`instruct`,text:n,agentSkillId:t?.agentSkillId,focus:t?.focus,tab:{tabId:l.tabId,url:l.url,windowId:l.windowId,title:l.title}})},[_,l]),b=(0,u.useCallback)(e=>{let t=f.find(t=>t.sessionId===e);t&&(async()=>{t.windowId>=0&&await d.windows.update(t.windowId,{focused:!0}).catch(()=>void 0),await d.tabs.update(t.currentTabId,{active:!0}).catch(()=>void 0)})()},[f]),x=(0,u.useCallback)(async e=>{if(l.tabId!=null){if(f.find(t=>t.sessionId===e))return b(e);_({op:`restore`,sessionId:e,tab:{tabId:l.tabId,url:l.url,windowId:l.windowId,title:l.title}})}},[_,f,l,b]);return{items:v,running:p?.runId!=null,sessionId:m,sessions:f,send:y,draft:e,mapSite:(0,u.useCallback)(()=>y(`@${th} map this site`),[y]),activateMap:(0,u.useCallback)(t=>{e&&_({op:`activateMap`,stagingId:e.stagingId,exactHost:t})},[e,_]),discardMap:(0,u.useCallback)(()=>{e&&_({op:`discardMap`,stagingId:e.stagingId})},[e,_]),recording:n,startRecording:(0,u.useCallback)(e=>{_({op:`startRecording`,captureValues:e})},[_]),stopRecording:(0,u.useCallback)(()=>{_({op:`stopRecording`})},[_]),monitors:i,stopMonitor:(0,u.useCallback)(e=>{_({op:`stopMonitor`,monitorId:e})},[_]),cancel:(0,u.useCallback)(()=>{m&&_({op:`cancel`,sessionId:m})},[_,m]),decide:(0,u.useCallback)((e,t,n)=>{m&&_({op:`decision`,sessionId:m,toolId:e,allow:t,remember:n})},[_,m]),clear:(0,u.useCallback)(()=>{m&&(g(m,Ph),_({op:`endSession`,sessionId:m}))},[_,m,g]),endSession:(0,u.useCallback)(e=>{g(e),_({op:`endSession`,sessionId:e})},[_,g]),restore:x,focusSession:b}}function Ih(){if(typeof window>`u`)return null;let e=window;return e.SpeechRecognition??e.webkitSpeechRecognition??null}var Lh=400,Rh=`Microphone access is blocked. Allow it for this extension, or type instead.`,zh=`browsentic:voiceEnabled`;function Bh(){let[e,t]=(0,u.useState)(!0);return(0,u.useEffect)(()=>{let e=!0;d.storage.local.get(zh).then(n=>{e&&typeof n[`browsentic:voiceEnabled`]==`boolean`&&t(n[zh])});let n=e=>{`browsentic:voiceEnabled`in e&&typeof e[`browsentic:voiceEnabled`].newValue==`boolean`&&t(e[zh].newValue)};return d.storage.local.onChanged.addListener(n),()=>{e=!1,d.storage.local.onChanged.removeListener(n)}},[]),[e,(0,u.useCallback)(e=>{t(e),d.storage.local.set({[zh]:e})},[])]}function Vh({onFinal:e,onInterim:t}){let[n,r]=(0,u.useState)(!1),[i,a]=(0,u.useState)(null),o=(0,u.useMemo)(()=>Ih()!==null,[]),s=(0,u.useRef)({onFinal:e,onInterim:t});s.current={onFinal:e,onInterim:t};let c=(0,u.useRef)(null),l=(0,u.useRef)(!1),d=(0,u.useRef)(null),f=(0,u.useRef)(null),p=(0,u.useRef)(()=>{}),m=(0,u.useCallback)(()=>{if(!f.current){let e=navigator.mediaDevices;e?.getUserMedia?f.current=e.getUserMedia({audio:!0}).then(e=>e.getTracks().forEach(e=>e.stop())).catch(e=>{throw f.current=null,e}):f.current=Promise.resolve()}return f.current},[]),h=(0,u.useCallback)(async()=>{let e=Ih();if(!e||c.current)return;try{await m()}catch{l.current=!1,r(!1),a(Rh);return}if(!l.current)return;let t=new e;t.continuous=!0,t.interimResults=!0,t.lang=navigator.language||`en-US`,t.maxAlternatives=1,t.onstart=()=>{r(!0),a(null)},t.onresult=e=>{let t=``,n=``;for(let r=e.resultIndex;r<e.results.length;r++){let i=e.results[r],a=i[0]?.transcript??``;i.isFinal?n+=a:t+=a}t.trim()&&s.current.onInterim?.(t.trim()),n.trim()&&s.current.onFinal(n.trim())},t.onerror=e=>{if(!(e.error===`aborted`||e.error===`no-speech`)){if(e.error===`not-allowed`||e.error===`service-not-allowed`){l.current=!1,f.current=null,a(Rh);return}if(e.error===`audio-capture`){l.current=!1,a(`No microphone was found.`);return}a(e.error)}},t.onend=()=>{c.current=null,r(!1),l.current&&(d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{l.current&&p.current()},Lh))},c.current=t;try{t.start()}catch{}},[m]);p.current=()=>void h();let g=(0,u.useCallback)(()=>{Ih()&&(l.current=!0,h())},[h]),_=(0,u.useCallback)(()=>{l.current=!1,d.current&&clearTimeout(d.current);let e=c.current;if(c.current=null,r(!1),e)try{e.abort()}catch{}},[]);return(0,u.useEffect)(()=>()=>_(),[_]),{supported:o,listening:n,error:i,start:g,stop:_}}var Hh=1600;function Uh(e){let t=e.autoSendMs??Hh,[n,r]=(0,u.useState)(``),[i,a]=(0,u.useState)(``),[o,s]=(0,u.useState)(!1),c=(0,u.useRef)(``),l=(0,u.useRef)(null),d=(0,u.useRef)(e.onSubmit);d.current=e.onSubmit;let f=(0,u.useCallback)(e=>{c.current=e,r(e)},[]),p=(0,u.useCallback)(()=>{l.current&&=(clearTimeout(l.current),null),s(!1)},[]),m=(0,u.useCallback)(()=>{p();let e=c.current.trim();e&&(f(``),a(``),d.current(e))},[p,f]),h=(0,u.useCallback)(()=>{l.current&&clearTimeout(l.current),s(!0),l.current=setTimeout(()=>{l.current=null,s(!1),m()},t)},[t,m]),g=Vh({onInterim:e=>{a(e),p()},onFinal:e=>{a(``),f(c.current?`${c.current} ${e}`:e),h()}}),{start:_,stop:v}=g;return(0,u.useEffect)(()=>{e.active?_():(v(),p())},[e.active,_,v,p]),{input:n,setInput:(0,u.useCallback)(e=>{f(e),p()},[f,p]),interim:i,listening:g.listening,supported:g.supported,error:g.error,pendingSend:o,autoSendMs:t,cancelPending:p,submitNow:m,retry:_}}export{d as $,df as A,zt as B,Lm as C,sm as D,Am as E,$t as F,se as G,de as H,Qt as I,ie as J,oe as K,Yt as L,yn as M,_n as N,tm as O,hn as P,x as Q,Wt as R,Im as S,km as T,le as U,Lt as V,ce as W,te as X,re as Y,ee as Z,Xm as _,Eh as a,Bm as b,Th as c,bh as d,l as et,eh as f,Ym as g,Zm as h,Ah as i,Nu as j,Gf as k,hh as l,Qm as m,Bh as n,r as nt,Dh as o,$m as p,ae as q,Fh as r,xh as s,Uh as t,s as tt,_h as u,Gm as v,Tm as w,jm as x,Wm as y,Bt as z};
|